blob_id
large_string
language
large_string
repo_name
large_string
path
large_string
src_encoding
large_string
length_bytes
int64
score
float64
int_score
int64
detected_licenses
large list
license_type
large_string
text
string
download_success
bool
87d182c291cee7a970e6f6054526a4c0cb10841b
Python
likebupt/aml-modules
/modules/nyc_taxi/cleanse.py
UTF-8
2,135
2.796875
3
[ "MIT" ]
permissive
# Copyright (c) Microsoft. All rights reserved. # Licensed under the MIT license. import sys import os import subprocess import pandas as pd from azureml.pipeline.wrapper import dsl from azureml.pipeline.wrapper.dsl.module import ModuleExecutor, InputDirectory, OutputDirectory, StringParameter def get_dict(dict_str)...
true
2c89597c403d7c0171a78580a01b37d17afbe18c
Python
nik-weter/specialist1
/dicts.py
UTF-8
2,316
3.09375
3
[]
no_license
#Task 1 # s = input().split() # d = {} # for i in s: # n = d.get(i, 0) # print(n,end=' ') # d.update({i: n+1}) #Task 2 # d = {} # n =int(input("Enter number of sinonims ")) # for i in range(0,n): # s = input().split() # d.update({s[0]: s[1]}) # print(d) # m = input("Enter key ") # p=d.items() #...
true
0d38b07f558f962bb07f13071c50fe010ec72ea9
Python
IBSister/intro
/base2.py
UTF-8
372
3.9375
4
[]
no_license
#Opening a File fo = open("foo.txt", "wb") print("Name of file: ", fo.name) print("Closed or not: ", fo.closed) print("Opening mode: ", fo.mode) #Closing a file fo.close() #Writing to a file fo = open("foo.txt", "w") fo.write("Hey") fo.close() #Reading from file fo = open("foo.txt", "r+") str = fo.read...
true
b9c55e397b43d317a22d12d1d89450d978529d08
Python
prisnormando/waterbutler
/tests/core/streams/test_stringstream.py
UTF-8
1,344
3.109375
3
[ "LicenseRef-scancode-free-unknown", "Apache-2.0" ]
permissive
import pytest from waterbutler.core import streams class TestStringStream: @pytest.mark.asyncio async def test_works(self): data = b'This here be a string yar' stream = streams.StringStream(data) read = await stream.read() assert data == read @pytest.mark.asyncio asy...
true
5147fe8eaff803f5b16a3bb4a75e0aac2d9baf01
Python
luckyboy1220/tutorial
/pandas/pandas_demo.py
UTF-8
11,241
2.875
3
[]
no_license
#encoding=utf-8 __author__ = 'light' import pandas as pd import numpy as np from datetime import datetime from dateutil import relativedelta """ pandas demo for jiuzhang seminar. Prerequriement: pip install numpy pandas matplotlib pip install xlrd pip install sqlalchemy """ def miscellaneous(): """ :return...
true
4eb17c76d0a1b330601c23624dfb6dc61e285751
Python
crabsmack/Python-Tetris
/tetris.py
UTF-8
8,632
3.203125
3
[]
no_license
#tetris.py from Tkinter import * import random import copy def tetrisMousePressed(canvas, event): pass #calls appropriate function for each key press def tetrisKeyPressed(canvas, event): if (event.keysym == "r"): tetrisInit(canvas) if canvas.data.isGameOver == False: if (event.keysym ...
true
6973bb9fc4355fa05849ec9dc51f1847519b26cf
Python
chickenRCE/omu-linux-basics
/peekaboo_nth_column/chal/peekaboo
UTF-8
3,092
2.734375
3
[]
no_license
#!/usr/bin/env python3 import os import sys import threading import subprocess from ptrlib import * from logging import getLogger, CRITICAL RED='\033[0;31m' GREEN='\033[0;32m' NC='\033[0m' # No Color BOLD=Color.BOLD def exception_handler(exception_type, exception, traceback): return sys.excepthook = exception_han...
true
2970782d072d5473fd1a81e3e4a633bf114e9c6c
Python
maxweldsouza/jsseo
/config.py
UTF-8
270
2.578125
3
[]
no_license
import json import os try: config_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'config.json') f = open(config_path, 'r') config_text = f.read() except IOError: print 'Check whether config.json exists' config = json.loads(config_text)
true
4625af368ac1d74708c84b1da78620a663e101dc
Python
rjhd2/HadISD_v3
/qc_tests/pressure.py
UTF-8
4,463
2.625
3
[ "BSD-3-Clause" ]
permissive
#!/usr/local/sci/bin/python #***************************** # # Station Pressure Check (SPC) # Ensure SLP and STNLP are reasonable (SLP taken as truth) # #************************************************************************ # SVN Info #$Rev:: 219 $: Rev...
true
b102edb71dba8664c2ddc7f9270a88815ea51241
Python
sretof/tuala
/test/tusdktest.py
UTF-8
5,736
2.625
3
[]
no_license
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = 'Erik YU' import tushare as ts api = ts.pro_api('2b9cb5279a9297a6304a83c5512cccd0a274f09f01f1909f7ec28b5c') # # 测试接口 # df = api.query(api_name='dividend',ts_code='600848.SH',fields='ann_date') # # cols = df.columns # # rowv = [] # # for col in cols: # # ...
true
6625d49799174376c2811ca0f1dbcf1ac62d80d8
Python
Echelon9/vulk
/vulk/utils.py
UTF-8
257
3.546875
4
[ "Apache-2.0" ]
permissive
import time def millis(): '''Return the time in milliseconds''' return time.perf_counter() * 1000 def time_since_millis(previous_time): '''Return the time in millisecons from the previous_time argument''' return millis() - previous_time
true
c4d01b8fc2e12f247b2988eb8f427b593f5185ee
Python
pearsonlab/spiketopics
/experiments/roitman/discover_topics.py
UTF-8
7,678
2.609375
3
[]
no_license
""" Fit Gamma-Poisson topic model to Roitman-Shadlen dataset. """ from __future__ import division import numpy as np import pandas as pd import spiketopics.gamma_model as gp from spiketopics.helpers import jitter_inits import argparse import cPickle as pickle if __name__ == '__main__': parser = argparse.Argum...
true
603bb1eb4cef4b6534f83c6554381d436a2049bd
Python
Swadesh13/flipkart-grid
/main.py
UTF-8
893
2.578125
3
[ "MIT" ]
permissive
from flask import Flask, render_template, request, send_file from uploadDownloadHandler import uploadFile, downloadFile import os from dotenv import load_dotenv load_dotenv() app = Flask(__name__) bucket = os.environ['CLOUD_STORAGE_BUCKET'] @app.route('/') def home(): return render_template('home.html') @app.r...
true
6a28c2cd4d1e7886c1e95c4e25db8628cadc1281
Python
AdarshSekar04/Ngram-model
/ngram.py
UTF-8
17,483
3.71875
4
[]
no_license
#Ngram.py #Mamon Alsalihy and Adarsh Sekar #Mamon ID No. = 1545777 #Adarsh ID No. = 1619894 import fileinput,sys,math # Counter class is a dict subclass for counting hashable objects from collections import Counter # The way each model will work is different, as the probabilities have different dependencies. # So, to...
true
fb615131ac22febd2948b36a41d61b3a7c3dde32
Python
sandeep-18/think-python
/Chapter05/example03_multiple.py
UTF-8
172
4.0625
4
[]
no_license
# Sandeep Sadarangani 3/12/18 # Given x and y, determine if x is a multiple of y x = 70 y = 7 if(x%y == 0): print("x is divisible by y") else: print("x is NOT divisible by y")
true
61b8f5c5d79dfdeef883e8c8f5d854bca73c3cd3
Python
im07amed/python
/Conditions.py
UTF-8
197
3.21875
3
[]
no_license
Username = input('Please Enter Your Username: ') Password = input('Please Enter Your Password: ') if Username == 'M7md' and Password == '123': print('Welcome !') else: print('Access Denied')
true
94d74d405d848b34c4f9657345d41661e31bb71f
Python
zahinazher/PythonCrawlers
/astrolight.py
UTF-8
9,299
2.546875
3
[]
no_license
#************************************** # The script requires 1 input files #"*********How to run the script*****" # Usage: "python searchlight.py file.xlxs" # Dependencies: BeautifulSoup, xlwt and xlrd # You can give any name to these files. # Finds product info from Astrolight website import re import os import c...
true
d2e466612e4049683408db7ebabb14b0b60ed542
Python
vnavkal/digit-recognition
/visualization_issue.py
UTF-8
707
2.53125
3
[]
no_license
import numpy as np from matplotlib import pyplot as plt from skimage.feature import hog X,Y = np.mgrid[-256:256,-256:256] image = np.sqrt(X**2 + Y**2) _, hog_image = hog( image, orientations=5, pixels_per_cell=(32, 32), cells_per_block=(1, 1), visualise=True ) fig, (ax1, ax2) = plt.subplots(1, 2, f...
true
f10e7a1d000802f6605c63db51248dd3395b5a6d
Python
L1nwatch/Mac-Python-3.X
/Python项目开发实战/第5章 Python在Web中的应用/5.2 使用Python进行Web编程/1. 创建HTTP服务器/test_server.py
UTF-8
912
2.828125
3
[]
no_license
#!/bin/env python3 # -*- coding: utf-8 -*- # version: Python3.X ''' Mac OS X 10.10 Python3.4.4下测试socketserver模块和http.server模块 ''' __author__ = '__L1n__w@tch' import socketserver import http.server # 注意,变量PORT是全大写的,因为它是常量,在程序中不会改变 PORT = 8099 def main(): # 请求处理程序 Handsy = http.server.SimpleHTTPRequestHandler...
true
5755def7659af7a216a18bd77fc091f8c260d264
Python
wwwenguo/Python_Projects
/Day11_BlackJackGame.py
UTF-8
3,020
4.03125
4
[]
no_license
# blackjack import random import os def clear(): return os.system('cls') cards = ['A', 2, 3, 4, 5, 6, 7, 8, 9, 10, 'J', 'K', 'Q'] end_game = False while not end_game: # pick two cards for the player player_cards = random.sample(cards, 2) print(f"Your cards are: {player_cards}") # pick two cards for t...
true
5a16d6b7ba57926b74557bd6830bdf2e64c271a2
Python
KaioAntonio/Corretora_Python
/FuncoesEmpresa.py
UTF-8
2,369
3.3125
3
[]
no_license
import datetime import pandas as pd import string def Cadastro_Data(data): # Funcao para retornar a data data_f = datetime.date(int(data[4:]), int(data[2:4]), int(data[:2])) return data_f def Tratamento_Cpf(CPF_TEMP): # Função uti...
true
3c53b287a94d815c5fd122e08d862b11a4b4c7b8
Python
Aasthaengg/IBMdataset
/Python_codes/p03327/s587495872.py
UTF-8
231
2.921875
3
[]
no_license
import sys import heapq # \n def input(): return sys.stdin.readline().rstrip() def main(): N =int(input()) if N>999: print("ABD") else: print("ABC") if __name__ == "__main__": main()
true
869e2ec041ad0b120d773d970828df9809c2ff48
Python
MelissaChen15/quant
/backtest/duokongshouyilv/update.py
UTF-8
6,784
2.765625
3
[]
no_license
# coding=utf-8 ''' Author: Kangchen Wei Email: weixk@cifutures.com.cn Application : machine learning for investment date: 2019/6/4 16:49 desc: ''' import datetime from sql import pl_sql_oracle from FactorReturnsCal import FactorReturnsCal from FactorReturnCal_weekly import FactorReturnsCal_Weekly from FactorReturnCa...
true
ebc62db93726b2d1352d6f33f9425cfb9499f9db
Python
Imonymous/Practice
/DP/russian_dolls.py
UTF-8
416
3.328125
3
[]
no_license
#!/usr/bin/env python def russian_dolls(arr): sba = sorted(arr, key=lambda tup: tup[0]*tup[1], reverse=True) envelops = len(sba) print(sba[0]) dp = [1]*envelops ans = 1 for i in range(envelops): for j in range(i): if sba[i][0] < sba[j][0] and sba[i][1] < sba[j][1]: dp[i] = max(dp[i], dp[j]+1) an...
true
914c419f3e6af847b351c69c7dae7e5d88a746e3
Python
lelandbatey/hunt_the_wumpus
/wumpus_hunter/game_logic.py
UTF-8
3,358
3.140625
3
[]
no_license
import random from .model.wumpus import Player, Wumpus, Gold, Pit, Board, Difficulties GAME_SETTINGS = { Difficulties.Easy: { "size": 8, "wumpus_count": 1, "gold_count_range": (10, 15), "pit_count_range": (10, 15) }, Difficulties.Medium: { "size": 9, "wumpus_count": 1, "gold_count_range": (10, 15), ...
true
2d386588592daaae247dd03c54f119e4fd006d48
Python
nickkane999/Game-Bots
/Firestone/actors/utilities/queue_instructions/FirestoneQueueHelper.py
UTF-8
7,630
2.515625
3
[]
no_license
import pyautogui import time import re import sys import os import copy from data.actors.FirestoneData import FirestoneData class FirestoneQueueHelper: # Variables rotationsAfterBoss = 0 # Initializing Object def __init__(self): self.data_requirements = FirestoneData() def assignData(se...
true
baab109072910a4fc2065bbdf0c083a226c664de
Python
sharadb73/Python_Practice_Examples
/Python Engineer Intern/PrimeFactor/PrimeFactor.py
UTF-8
604
3.234375
3
[]
no_license
from numpy import sqrt def isprime(pnum): i = 2 while pnum > i: if pnum % i == 0: return i i += 1 return pnum def primefactor(pnum): divnum = [] fpnum = [] ans = 0 if pnum % 2 == 0: pass for i in range(3, sqrt(pnum).astype(int), 2): if pnum %...
true
a0f465ca588a33f0240f2d8133838817fe923db9
Python
NIEHS/muver
/muver/repeat_indels.py
UTF-8
14,575
2.6875
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
from collections import defaultdict import csv import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import math import re from scipy.optimize import curve_fit from fitting import logistic from wrappers.samtools import view_bam def calculate_repeat_occurrences(repeats): ''' I...
true
17ba0986999eef7b278cd2f773f069b937c8b112
Python
Larsterbraak/TimeGAN-short-rates
/scripts/plotting.py
UTF-8
7,513
3.0625
3
[]
no_license
""" MSc Thesis Quantitative Finance Title: Interest rate risk due to EONIA-ESTER transition Author: Lars ter Braak (larsterbraak@gmail.com) Last updated: October 25th 2020 Code Author: Lars ter Braak (larsterbraak@gmail.com) ----------------------------- Plotting - Code that helps to visualize the short rate data ...
true
3d9e61f05c3100aaf2f1b200f024402e4d7d69f6
Python
mmyoungman/code-snippets
/python/flask/rest01.py
UTF-8
626
2.78125
3
[]
no_license
# From https://sourcedexter.com/python-rest-api-flask/ import datetime import json import time from flask import Flask, request app = Flask(__name__) @app.route("/timestamp", methods=["GET"]) def get_timestamp(): currentTime = time.time() timeMillis = int(round(currentTime * 1000)) return str(timeMillis...
true
cc05c94408a7ab83d5fa3e59df2c2834ce38fe63
Python
githuan/python_journey
/Crash_Course/4.3-4.9/4-6_odd_numbers.py
UTF-8
122
3.625
4
[]
no_license
#!/user/bin/env python3 odd_num = list(range(1,21,2)) for num in odd_num: print("Counting odd number: " + str(num))
true
9e965e662fce859acb35d4d807ec9c55e68bc025
Python
deepakrajvenkat/dhilip
/b61.py
UTF-8
108
3.09375
3
[]
no_license
d=input().split() word=d[0] n=int(d[1]) l=[] for i in range (n): l.append(word[i]) s="".join(l) print(s)
true
d9dea85ce2f98d233a19265885c457c308ee42a4
Python
zhby99/Transformer-Network-on-CN-EN-Translation
/transformer/data_load.py
UTF-8
4,084
2.65625
3
[ "Apache-2.0" ]
permissive
# -*- coding: utf-8 -*- #/usr/bin/python2 ''' June 2017 by kyubyong park. kbpark.linguist@gmail.com. https://www.github.com/kyubyong/transformer ''' from __future__ import print_function from hyperparams import Hyperparams as hp import tensorflow as tf import numpy as np import codecs import regex def l...
true
6ef22c5559a86510493e7b3df6bd5f6d9d0a1634
Python
HuiJing-C/PythonLearning
/cjh/04finctional_programming/04decorator.py
UTF-8
2,617
4.34375
4
[]
no_license
# 由于函数也是一个对象,而且函数对象可以被赋值给变量,所以,通过变量也能调用该函数 import datetime import functools def now(): print("2021-08-08") def log(func): def wrapper(*args, **kw): print('call %s():' % func.__name__) return func(*args, **kw) return wrapper @log def now2(): print("2021-08-08") # 如果decorator本身需要传...
true
82a3515659f7a29c05cbff75a427b76d44d32c34
Python
som-sinha/learning-autopy
/try_except_fin.py
UTF-8
227
3.65625
4
[]
no_license
try: print('Gimme a number: ', end='') num = int(input()) print(num) except ValueError: print('Please input a valid value') print('You screwed it up now run the program again...') finally: print('Fin.')
true
38d422b726167eecb5b2fcceb15f2ce41db85638
Python
salilkansal/TextJustificationDynamicProgram
/text_justification.py
UTF-8
4,452
3.5
4
[]
no_license
#!/usr/bin/python """ Programming Project Design and Analysis of Algorithms CS 6363 Printing Neatly CLRS Pg 405 Dynamic Program """ import sys EXTRA_SPACES_SYMBOL = '+' DEFAULT_LINE_WIDTH = 80 # reading the input source if len(sys.argv) > 1: input_file = open(sys.argv[1], 'r') source = input_file.read() ...
true
c039d155fcc0355c8c5b0e3ea0d79d6672a2b960
Python
hokaze/ThemeShooter-Tk
/ThemeShooterTk.py
UTF-8
48,410
2.671875
3
[ "MIT" ]
permissive
#!/usr/bin/env python # -ThemeShooterTk by HoKaze- # Produces preview or screenshot of HBC theme # import everything from Tkinter import * from tkMessageBox import * import tkFileDialog import zipfile import os from PIL import Image, ImageTk, ImageFont, ImageDraw, ImageChops, ImageEnhance import re, linecache from dec...
true
7d932e82e23bec84a6d61d3dc4e1b46ad6ba6fa7
Python
paulperzhita/Interactive-Fractions-Pi
/rgbGUI.py
UTF-8
1,199
3.1875
3
[]
no_license
from tkinter import Tk,Frame,Grid, Label, Button, Canvas from rgbSensor import getRGB app = Tk() app.title("RGB GUI") # * Name of the window # * Main frame on which everything is added f = Frame(app,width=800,height=500) f.grid(row=1,column=0,sticky="NW") f.grid_propagate(0) f.update() # * Title Label title = Lab...
true
56c7c6b63d727b78d05a69ea62b32cc199e32672
Python
tinaba96/coding
/acode/abc278/c/check.py
UTF-8
56
3.015625
3
[]
no_license
a = ['i', 'it', []] print(a) print(a[2]) print(a[2:3])
true
1577cb4d0c3558b416fce47b98ec70c1971deb0b
Python
Rovbau/Robina
/v2.0/Model.py
UTF-8
946
3.140625
3
[]
no_license
class Model(): def __init__(self): self.data = Data() self.observer = [] def update(self, data): print(len(self.data.obstacles)) self.data.obstacles.extend(data.obstacles) self.data.path.extend(data.path) self.data.solvedPath.extend(data.solvedPath) self...
true
5efe150be8512272febdf446bd0bfaa285b3d1d7
Python
phrodrigue/URI-problems
/iniciante/2059/main.py
UTF-8
267
3.125
3
[]
no_license
p, j1, j2, r, a = [int(x) for x in input().split()] par = 1 if (j1 + j2) % 2 == 0 else 0 if r and a: print("Jogador 2 ganha!") elif (r and not a) or (not r and a) or (p and par) or (not p and not par): print("Jogador 1 ganha!") else: print("Jogador 2 ganha!")
true
89adeeb341cff414448efe84dba604a2e3c16b56
Python
runoguler/Project
/utils.py
UTF-8
8,763
2.640625
3
[]
no_license
import numpy as np import os from scipy.cluster.hierarchy import linkage, dendrogram, cophenet from scipy.spatial.distance import pdist import matplotlib matplotlib.use("TkAgg") from matplotlib import pyplot as plt from torch.utils.data.sampler import Sampler class TreeNode(): def __init__(self, value, left, ri...
true
9aca94a254f3d065151d0efa16ba82a01a22d363
Python
comp-syn/comp-syn
/compsyn/helperfunctions.py
UTF-8
4,295
2.515625
3
[ "MIT" ]
permissive
#!/usr/bin/env python # coding: utf-8 from __future__ import annotations import argparse import datetime import hashlib import io import json import os import random import requests import time from collections import defaultdict from pathlib import Path from PIL import Image, UnidentifiedImageError from google.clou...
true
d44fd809a03f35a2cc3e50f1c9ff556c21d842d5
Python
andreea-munteanu/Numeric-Calculus-2021
/Tema1/ex2.py
UTF-8
1,853
4.375
4
[]
no_license
""" Operatia +c este neasociativa: fie numerele reale a = 1.0, b = u/10, c = u/10, unde u este precizia masina calculata anterior. Sa se verifice ca operatia de adunare efectuata de calculator nu este asociativa, i.e.: (a +c b) +c != a +c (b +c c). Gasiti un exemplu pentru care operatia ×c este neasociativa """...
true
e09b0befa117b1476369e9e4b186ca3f4efd2125
Python
ramonvaleriano/python-
/Cursos/Curso Em Video - Gustavo Guanabara/Curso em Vídeo - Curso Python/Exercícios/desafio_064.py
UTF-8
278
3.5
4
[ "MIT" ]
permissive
# Program: desafio_064.py # Author: Ramon R. Valeriano # Description: # Updated: 29/09/2020 - 15:39 cont = 0 soma = 0 number = 0 while number != 999: number = int(input('Digite um número por favor: ')) if number != 999: cont+=1 soma+=number print(cont) print(soma)
true
3d0964c000505fa546dd2df9d45ec8dce5a2d01d
Python
cupy/cupy
/cupyx/scipy/special/_gammasgn.py
UTF-8
1,030
2.78125
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
""" The source code here is an adaptation with minimal changes from the following file in SciPy's bundled Cephes library: https://github.com/scipy/scipy/blob/master/scipy/special/cephes/gammasgn.c Cephes Math Library Release 2.0: April, 1987 Copyright 1984, 1987 by Stephen L. Moshier Direct inquiries to 30 Frost Str...
true
e15a647dda04fe846859f61bd30e24554689745d
Python
Li980701/ResistanceAI
/src-py/test_1m4l.py
UTF-8
4,054
2.8125
3
[ "MIT" ]
permissive
""" run the file by `python3 src-py/test_1m4r.py` [with pretrain & in train mode]: MCTAgent(name='m1', sharedMctNodes={}, isTest=False), r2 {'spy': [14, 40], 'resistance': [37, 60], 'total': [51, 100]} r3 {'spy': [15, 50], 'resistance': [28, 50], 'total': [43, 100]} r4 {'spy': [16, 43], 'resistance': [36, 57], 'total'...
true
ccee7de05c3f8dbc33c9597026f6399138745876
Python
chelsea7007/TranQuangMinh-fundamental-C4e20
/session01/circle2.py
UTF-8
127
3.140625
3
[]
no_license
from turtle import * shape('turtle') color('black') speed(-1) for i in range(50): circle(100) left(9) mainloop()
true
5202408a0e577fa9f9e3351301e4383e3db5a87e
Python
PandaCoding2020/pythonProject
/Python_Basic/6 for循环/wileelse.py
UTF-8
244
2.9375
3
[]
no_license
""" 这部分跟其它的语言不同 """ i = 1 while i <= 5: if i == 3: i += 1 continue print('这遍说得不真诚') print('媳妇,我错了') i += 1 else: print('媳妇原谅我了,哈哈……')
true
fbe284cbcb981501e87f7fe85ca9276acea22020
Python
Vallidevibolla/Assignment-4
/code.py
UTF-8
1,144
3.0625
3
[]
no_license
import numpy as np import matplotlib.pyplot as plt plt.axis([4,8,4,8]) plt.axis('on') #if using termux import subprocess import shlex #end if # import the math module import math # print the square root of 0 print(math.sqrt(0)) #Inputs n = np.array([1,-2]) c = 4 e1 = np.array([0,2]) e2 = np.array([4,0]) ...
true
25a19fe9ae8d6eac967734241febc6d842413adb
Python
Air-Zhuang/Test27
/High_Level_Coding/3/3_6.py
UTF-8
689
3.609375
4
[]
no_license
# _*_ coding: utf-8 _*_ __author__ = 'Air Zhuang' __date__ = '2018/4/22 18:57' ''' 在一个for语句中迭代多个可迭代对象 ''' from random import randint from itertools import chain #并行 chinese=[randint(60,100) for i in range(10)] math=[randint(60,100) for i in range(10)] english=[randint(60,100) for i in range(10)] total=[] for c,m,e i...
true
b27ee5a85468fd3a32d88d960b1e42b5d86efb62
Python
jaswanth04/Ensemble_techniques_parallel
/src/python/stacking_trial.py
UTF-8
1,419
2.96875
3
[]
no_license
import pandas as pd import numpy as np from sklearn.neighbors import KNeighborsClassifier from sklearn.naive_bayes import GaussianNB from sklearn.ensemble import RandomForestClassifier from sklearn.linear_model import LogisticRegression from ensembles_parallel.stackingModel import StackingModel if __name__ == '__main_...
true
c73759a3310e0f55188d3bf35d0ea7233a5df590
Python
dr-dos-ok/Code_Jam_Webscraper
/solutions_python/Problem_116/629.py
UTF-8
1,961
3.453125
3
[]
no_license
for t in xrange(input()): board = {} # input -> board = {(n, m): a} isfinish = True for line_n in xrange(4): temp = [each_letter for each_letter in raw_input().rstrip()] if isfinish and '.' in temp: isfinish = False for m in xrange(4): board[(li...
true
fdcf4a74a2c22e2e06237c51dbb7b75cab3b0dfb
Python
gracehaza/DevTools-Utilities
/scripts/dumpTree.py
UTF-8
750
2.6875
3
[]
no_license
#!/usr/bin/env python import os import sys import argparse import ROOT def parse_command_line(argv): parser = argparse.ArgumentParser(description='Dump contents of tfile') parser.add_argument('filename', type=str) parser.add_argument('path', type=str, default='', nargs='?') return parser.parse_args...
true
6b2711ee063c22ca5ab57e2569519db27ef7300b
Python
torokmark/builders_in_python
/classic.py
UTF-8
1,022
3.953125
4
[ "MIT" ]
permissive
#!/usr/bin/env python class Car: def __init__(self, wheel=4, seat=4, color='red'): self.wheel = wheel self.seat = seat self.color = color def __str__(self): return '[wheels: {}, seats: {}, color: {}]'.format(self.wheel, self.seat, self.color) class Builder: def set_wheels(...
true
786d9b7e4f0d3a56df03f8f7a5cf968ac6e117bf
Python
GCES-Pydemic/pydemic
/pydemic/empirical/epidemiology_group.py
UTF-8
3,030
2.90625
3
[ "MIT" ]
permissive
from collections.abc import Sequence import mundi import sidekick.api as sk from .epidemiology import Epidemiology from .utils import delegate_map, delegate_mapping, concat_frame, agg_frame info_method = lambda attr: delegate_mapping(attr, concat_frame) sum_method = lambda attr: delegate_mapping(attr, agg_frame("sum"...
true
080bc0283f11960c38717107d8ad7f783f578da2
Python
DaveWishesHe/adventofcode-solutions
/tom-bell/5-1.py
UTF-8
492
3.5625
4
[]
no_license
def vowel_count(s): return s.count('a') + s.count('e') + s.count('i') + s.count('o') + s.count('u') def repeats_letter(s): old = '' for c in s: if c == old: return True old = c return False banned = ["ab", "cd", "pq", "xy"] def contains_banned(s): for b in banned: if b in s: return True return Fal...
true
9ea3237e4f399874c8c6493a9c5a79e9ef7681b6
Python
petefitz/pygame
/src/sotw/pygame/sotw.py
UTF-8
4,281
2.859375
3
[]
no_license
import pygame, sys, time import random from decimal import * import RPi.GPIO as GPIO import time from pygame.locals import * pinA = 3 pinB = 5 pinC = 7 pinD = 8 pinE = 10 pinF = 11 pinG = 12 pinH = 13 pinButton = 18 GPIO.setmode(GPIO.BOARD) GPIO.setup(pinA, GPIO.OUT) GPIO.setup(pinB, GPIO.OUT) GPIO.setup(pinC, GPI...
true
e22cbed8209f4c2974b1ef7aa9074d3c8a54f646
Python
Smightym8/SQLKeywordsFormatter
/src/cmdtool/sqlKeywordsFormatter.py
UTF-8
3,172
3.078125
3
[ "Apache-2.0" ]
permissive
#!/usr/bin/env python3 import re import sys import argparse # Takes a file as argument and changes all keywords to uppercase # All other words will be changed to lowercase def format_keywords(infile: str, outfile: str): if not infile.endswith('.sql'): print("The input file is not a sql file.") sy...
true
3667dac45315faa093f270032a4a63d6edbb84cf
Python
fafafaf/livereplayserver
/server/src/chart.py
UTF-8
3,957
2.734375
3
[ "MIT" ]
permissive
from PyQt4 import QtGui, QtCore def SecondsToHuman(seconds): m, s = divmod(seconds, 60) h, m = divmod(m, 60) return "%dh%02dm%02ds" % (h, m, s) if h else "%2dm%02ds" % (m, s) if m else "%2ds" % s class ChartWidget(QtGui.QWidget): selectedTickSignal = QtCore.pyqtSignal(int) def __init_...
true
34f771cd19529f42e4de6f3e9c59777fb66f89a5
Python
whtahy/leetcode
/python/0009. isPalindrome.py
UTF-8
236
3.046875
3
[ "CC0-1.0" ]
permissive
class Solution: def isPalindrome(self, x): if x < 0: return False else: s = str(x) l = len(s) pivot = l // 2 return s[0: pivot] == s[pivot + l % 2: ][::-1]
true
55efefd18ec642e18f7afbbed3cf27cc3c659cfe
Python
LuWatson/fetch_mmr
/Desktop/fetch_mmr/run_mmr_fetch.py
UTF-8
689
2.6875
3
[]
no_license
import sys import mmr_fetch import csv inFile = sys.argv[1] ##run file inline terminal 'python program.py data.csv' with open(inFile, 'r') as csv_file: reader = csv.DictReader(csv_file) for row in reader: print(row['vin'], row['year'], row['make'], row['model'], row['trim'], row['mileage']) if len(row['vin'])==...
true
348519278a1c0b34c05acf64c13812ea2c7488a0
Python
zhonghui-wu/pythonAdvanced
/task/log.py
UTF-8
1,537
3.1875
3
[]
no_license
# -*- coding:utf-8 -*- # _author_:wuzhonghui # 2020/10/21 import logging ''' logging.basicConfig(level=logging.DEBUG, # 设置日志级别 format='%(asctime)s %(filename)s [line:%(lineno)d] %(levelname)s: %(message)s', # 指定日志格式 # 时间 产生日志的文件名 产生日志的行号 日志级别 日志正文 ...
true
791e886c148f7665d491e407e42c409cdbb7a97b
Python
terasakisatoshi/pythonCodes
/deeplearning/tensorflow/slimExer/otherAuthor/mnist/mnist.py
UTF-8
2,332
2.84375
3
[ "MIT" ]
permissive
""" Exercise for tensorflow.contrib.slim model Reference:http://arakan-pgm-ai.hatenablog.com/entry/2017/11/23/080000 """ import tensorflow as tf import tensorflow.contrib.slim as slim from tensorflow.examples.tutorials.mnist import input_data from contextlib import ExitStack def model(x_image): with ExitStack() ...
true
3a8f0c8bfdab8a7cd99997dbcc1d6718755bd980
Python
sky3z/Stazioni_Meteo_Trentino
/Program/Log_Bot_xls.py
UTF-8
9,214
2.8125
3
[]
no_license
# bot che deve connettersi al sito http://meteo.fmach.it con le credenziali # 'USER': "nicola.laporta@fmach.it" # 'PWD': "venturia" # import dei vari moduli necessari=============================================== import glob # per poter ricercare i file con le regular expression import os import time ...
true
4ec535a932a521dc5d01defc709bf0f05785e083
Python
lordpews/python-practice
/oops 15 abstract_base_class.py
UTF-8
625
3.625
4
[]
no_license
from abc import ABC, abstractmethod class Shape(ABC): @abstractmethod def printarea(self): return 0 class Rect(Shape): type = "Rectangle" sides = 4 def __init__(self): self.l = 12 self.b = 9 def printarea(self): return self.l * self.b # since we inherited Rec...
true
33f7ee702c6f0dd2e030510a2219d62fd83ec897
Python
shervinrad100/Python-Projects
/Hobby/My atari game/connect4.py
UTF-8
4,044
3.71875
4
[]
no_license
from itertools import groupby, chain import os,time,re def diagonalPos(board,columns,rows): for diag in ([(j, i - j) for j in range(columns)] for i in range(columns + rows -1)): yield [board[i][j] for i, j in diag if i >= 0 and j >= 0 and i < columns and j < rows] def diagonalNeg(board,columns,rows): ...
true
d448e14e867a5578ad3b42704974cb92c6c73855
Python
CMDXiong/python
/python_skills_py3.x/read_write_file_IO/file_IO.py
UTF-8
589
3.65625
4
[]
no_license
# -*- encoding: utf-8 -*- # 实际案例 # 某文本文件编码格式已知(如UTF-8, GBK, BIG5),在python 2.x和python3.x中分别如何读写该文件? # python2 python3 # str bytes # unicode str # python2.x:写入文件前对unicode编码,读入文件后对字节进行解码。 # s = u"hello, 潘雄" # f = open('a.txt','w') # f.write(s.encode('utf8')) # f.flush() # python3.x:open函数指定't'的文本模式,encoding指定编...
true
c402281108f3a69bef79a7ecc2468f696cc57c2b
Python
jtsteig/ServiceQuery
/src/model/businesshoursmodel.py
UTF-8
180
2.578125
3
[]
no_license
class BusinessHours: def __init__(self, day_of_week, open_at, close_at): self.day_of_week = day_of_week self.open_at = open_at self.close_at = close_at
true
b46ccbde107450b74e5f45f78872a0e4c3f64c35
Python
heliorrfreitas/python_exercises
/read_create_file/create_svg_from_txt.py
UTF-8
636
2.703125
3
[]
no_license
import os initial_path="./test" def create_svg_from_txt(path): with os.scandir(path) as it: for entry in it: if entry.is_file(): if not entry.name.startswith('.') and entry.name.endswith('.txt'): filepath = path + '/' +entry.name ...
true
1fc1d61a771a6bf85cc9c65fd96dd103e2466f19
Python
samruddhichitnis02/programs
/ProgramsA/algorithms/insertion_sort.py
UTF-8
258
3.140625
3
[]
no_license
import Utilities.algo_utility x = [] try: n = int(input('Enter the number of elements-')) for i in range(n): m=input('Enter the elements-') x.append(m) Utilities.algo_utility.i_s(x) except: print('Please Enter valid inputs!')
true
1ba33dce65f436bb2694df235bd93012418262ac
Python
LEAVESrepo/leaves
/QIF/utilities_pckg/utilities.py
UTF-8
536
3.46875
3
[]
no_license
import os import sys import math def createFolder(path): if not os.path.isdir(path): try: os.mkdir(path) except OSError: sys.exit("\nCreation of the directory %s failed" % path) else: print("\nSuccessfully created the directory %s " % path) else: ...
true
2a061bbcd9ef51cf87516ab5222f221b8564285a
Python
sudeep9211/Ethical-Hacking-Tools
/NameInfo.py
UTF-8
2,128
2.59375
3
[]
no_license
import requests import webbrowser from bs4 import BeautifulSoup R = '\033[31m' G = '\033[32m' C = '\033[36m' W = '\033[0m' def Nameinfo(): name=input("Enter the Full Name >> ") headers = { 'Access-Control-Allow-Origin': '*', 'Access-Control-Allow-Methods': 'GET', 'Access-Control-Allow...
true
32d03860dba453b9e1abc8200762356026770b90
Python
elthran/pestilence
/app/models/sessions.py
UTF-8
825
2.59375
3
[]
no_license
from datetime import datetime from .templates import db, ModelEvent class Session(ModelEvent): user_id = db.Column(db.Integer) login_time = db.Column(db.DateTime, default=datetime.utcnow) logout_time = db.Column(db.DateTime) length_in_seconds = db.Column(db.Integer) def __init__(self, user_id): ...
true
a0911952df0840eb73f8368f08adf13d2283d0bf
Python
mzenk/lif_pong
/training/plot_training_progress.py
UTF-8
1,460
2.515625
3
[]
no_license
from __future__ import division from __future__ import print_function import numpy as np import sys import os import matplotlib.pyplot as plt def get_progress(logfile): train_classrate = [] valid_classrate = [] nepoch = [] with open(logfile) as trainlog: for line in trainlog: parts ...
true
647537ef4b1c2c3b443d833e20d17d87c6e99803
Python
bejar/IWalker
/Analysis/Embedding.py
UTF-8
3,801
2.53125
3
[]
no_license
""" .. module:: Embedding Embedding ************* :Description: Embedding :Authors: bejar :Version: :Created on: 25/10/2016 10:25 """ __author__ = 'bejar' from Config.Constants import odatapath, datasets, datasets2, datasets3 import os import pandas as pd import matplotlib.pyplot as plt from mpl_to...
true
8e36eaf60d6db1941435b496fabf5e8828602326
Python
ACBozzi/Verificacao-de-uma-base
/findMatch.py
UTF-8
7,604
2.9375
3
[]
no_license
import shutil import os, glob import pandas as pd import numpy as np import re from pathlib import Path #FORMATA A LEGENDA PARA PROCURAR NO BANCO def formatLegend(file): legendaTxt = [] txt = open(file,"r") lines = txt.readlines() for line in lines: linha = line.split(' ') for elementos in linha: elemen...
true
8b5fe11b3a8df891dfc29da9908b3eb9c7ea159c
Python
EthanShin/Hackerrank_Python
/4.Sets/2.Symmetric Difference.py
UTF-8
191
3.046875
3
[]
no_license
M = int(input()) arr = set(map(int, input().split())) N = int(input()) arr2 = set(map(int, input().split())) print(*sorted(arr.difference(arr2).union(arr2.difference(arr))), sep='\n')
true
aa789d7ad8563f93760724698749040bcb51f587
Python
yuanqili/twitter-crawler
/utilities.py
UTF-8
1,776
2.890625
3
[]
no_license
import json import os import sys def print_json(json_file): print(json.dumps(json_file, sort_keys=True, indent=4, separators=(',', ':'))) def sqlite_url_gen(path, filename): return 'sqlite:///' + os.path.join(os.path.abspath(path), filename) palette = { 'black': '\033[30m', 'red': '\033[91m', '...
true
b9fd9fb00040829e78a398acd538dea2d9403328
Python
jasperyang/GibbsLDApy_TPTM
/Strtokenizer.py
UTF-8
2,371
3.078125
3
[]
no_license
#!/usr/bin/env python # encoding: utf-8 ''' @author: Jasperyang @license: (C) Copyright 2013-2017, Jasperyang Corporation Limited. @contact: yiyangxianyi@gmail.com @software: GibbsLDA @file: Strtokenizer.py @time: 3/6/17 8:20 PM @desc: ''' import re class Strtokenizer(object): tokens = [] idx = 0 def __i...
true
3c6f106aff40869d4c854bbfb4fc62000a8814f2
Python
RyanMarshall5765/RedditBot
/reddit_bot.py
UTF-8
1,621
2.78125
3
[ "MIT" ]
permissive
import praw import reddit_bot_config import os import time def reddit_bot_login(): print "Logging in" reddit = praw.Reddit(username = reddit_bot_config.username, password = reddit_bot_config.password, client_id = reddit_bot_config.client_id, client_secret = reddit_bot_config.client_secret, user_agent = "...
true
8b6888a9bbaed40da9ed434944c86f4dfd09f359
Python
vqrwp/Computational_algorithms
/lab_5/lab_1.py
UTF-8
2,937
3.234375
3
[]
no_license
'''Первая лабораторная работа по дисциплине Вычислительные алгоритмы Выполнила Мищенко Маргарита Всеволодовна ''' import math def sort_bubble(arr1, arr2): for i in range(len(arr1)): for j in range(len(arr1) - 1): if arr1[j] > arr1[j + 1]: arr1[j], arr1[j + 1] = arr1[j...
true
25c514696f35a9833115e9393a61aae4099c828b
Python
RobRoseKnows/umbc-cs-projects
/umbc/CMSC/2XX/201/Labs/lab4/pets.py
UTF-8
392
4.03125
4
[]
no_license
# File: pets.py # Author: Robert Rose # Date: 9/24/15 # E-mail: robrose2@umbc.edu # Description: # This program checks to see if an animal a user inputs is a pet or not. Puns # not included. def main(): userInput = str(input("Please enter the animal you have:")) if (userInput == "cat") or (userInput == "dog"):...
true
28f4f374f81ee96d20d21fd6c96a39316943bec2
Python
1tang/elexon_api_tool
/elexon_api/utils.py
UTF-8
2,868
2.921875
3
[ "MIT" ]
permissive
import os from pathlib import Path import pandas as pd from collections import defaultdict from typing import Dict, List from .config import REQUIRED_D, API_KEY_FILENAME import logging logger = logging.getLogger(__name__) logger.addHandler(logging.NullHandler()) def get_required_parameters(service_code: str) -> Lis...
true
4134eacc1c1322fa44470decb2b92eb4698c1a9a
Python
Pinafore/nlp-hw
/feateng/eval.py
UTF-8
5,041
2.71875
3
[ "MIT" ]
permissive
# Jordan Boyd-Graber # 2023 # # Run an evaluation on a QA system and print results from random import random from buzzer import rough_compare from params import load_guesser, load_questions, load_buzzer, \ add_buzzer_params, add_guesser_params, add_general_params,\ add_question_params, setup_logging kLABELS...
true
3dae5a7296bd10ab7f20cec4c38daa6bd00e5d27
Python
rshelans/GeneRing
/src/Chromatin.py
UTF-8
6,126
3.125
3
[ "MIT" ]
permissive
import scipy import collections import bisect import sys __version__="01.00.00" __author__ ="Robert Shelansky" BUBBLE = int(True) LINKER = int(False) class Region: """ Class Molecule represents individual bubbles or linkers """ def __init__(self, bubble, start, end, size): self.isbubble= bool(bubble) ...
true
a5941cca3bb153769b1635710d8a5df69b7b56ed
Python
Currycurrycurry/interview_internal_reference
/06.头条篇/strings.py
UTF-8
3,690
3.53125
4
[]
no_license
# 1、所求的最长公共前缀子串一定是每个字符串的前缀子串。所以随便选择一个字符串作为标准,把它的前缀串,与其他所有字符串进行判断,看是否是它们所有人的前缀子串。这里的时间性能是O(m*n*m)。 # 2、列出所有的字符串的前缀子串,将它们合并后排序,找出其中个数为n且最长的子串。时间性能为O(n*m+m*n*log(m*n)) # 3、纵向扫描:从下标0开始,判断每一个字符串的下标0,判断是否全部相同。直到遇到不全部相同的下标。时间性能为O(n*m)。 # 4、横向扫描:前两个字符串找公共子串,将其结果和第三个字符串找公共子串……直到最后一个串。时间性能为O(n*m)。 # 5、借助trie字典树。将这些字符串存储到trie...
true
57ac010e3b1425d184ddaff467f57bc4217ea034
Python
Adedic94/BigData
/BigData/Assignment2/Assignment2_multiprocessing_master.py
UTF-8
2,778
3.09375
3
[]
no_license
#!/usr/bin/env python3 """" author: Armin Dedic St.number: 342615 Assignment 2: fastQ parser that calculates the average quality score per base for all reads in a fastQ file. THis is the master script, which creates a manager and connects to a server. Clients from the client script will then connect to that server. T...
true
f4920687cf74809205218b7082f7f9d356461d4d
Python
nedgrimes/100-days-of-python
/day48/interaction.py
UTF-8
302
2.796875
3
[]
no_license
from selenium import webdriver chrome_driver_path = "/Users/lenargasimov/Development/chromedriver" driver = webdriver.Chrome(chrome_driver_path) driver.get("https://en.www.wikipedia.org/wiki/Main_Page") article_count = driver.find_element_by_css_selector("#articlecount a") print(article_count.text)
true
0d92166a1df7ba9ccc8f6fc3963c9df358234b18
Python
MLSA-Mehran-UET/learn2code
/Python/heap/Inserting.py
UTF-8
124
3.5625
4
[ "MIT" ]
permissive
import heapq H = [21,1,45,78,3,5] # Covert to a heap heapq.heapify(H) print(H) # Add element heapq.heappush(H,8) print(H)
true
88be51695980d8ef9eccb10ba506f78ab58e9a33
Python
tkravichandran/dealroom_assignment
/old/selenium-accept-cookies.py
UTF-8
2,640
2.71875
3
[]
no_license
## Import import pandas as pd import numpy as np ## Get the data into pandas df_t = pd.read_csv("data_scientist_intern_g2_scraper.csv") # print(df_t.columns) # print(df_t.head) df = df_t.copy() ## waiting from selenium import webdriver from selenium.webdriver.common.keys import Keys import time from random impo...
true
81812e0dc7f3055010ddbbfeb860828c6c7c3ac2
Python
junjaytan/python-data-structures
/ICake/1_max_subarray.py
UTF-8
1,138
4.03125
4
[]
no_license
import random def get_max_profit(stock_prices): # ensure we have at least 2 prices if len(stock_prices) < 2: raise IndexError('Getting a profit requires at least 2 prices') # use greedy algorithm to store min_price and max_profit as you iterate through prices # begin by initializing them to t...
true
9af7a382a7cdc542a2f753e211f77317d0692d58
Python
nathangibson14/dataDarts
/dataDarts.py
UTF-8
602
3.046875
3
[]
no_license
#!/usr/bin/python import games import players import sys def mainMenu(): while True: print """ Main Menu 1 -- Manage Players 2 -- Play Game 0 -- Exit dataDarts\n""" while True: option = input("Input option: ") if option==1: players.managePlaye...
true
5ab76e43a48de9745c2f250ff28b187def2e0f2d
Python
AaronVillanueva/InteractivePythonRunestone
/Capitulo 5/Pitagoras.py
UTF-8
342
4.375
4
[]
no_license
#encoding: UTF-8 def hipotenusa(x,y): hip=((x**2)+(y**2))**.5 return(hip) def Main(): primernumero=float(input("Ingrese un lado del triángulo: ")) segundonumero=float(input("Ingrese el otro lado del triángulo: ")) final=hipotenusa(primernumero,segundonumero) print("La hipotenusa del triángulo ...
true
e28fe25406f4b76ce14f5a822dbc461c96bfad36
Python
gevmart/Quasicryatal
/utils.py
UTF-8
4,212
2.921875
3
[]
no_license
import os import numpy as np from shutil import copy from config import GRID_SIZE, WAVELENGTH, CODE_PATH # %% x, y = np.meshgrid( np.linspace(-GRID_SIZE / 2, GRID_SIZE / 2, num=GRID_SIZE), np.linspace(-GRID_SIZE / 2, GRID_SIZE / 2, num=GRID_SIZE)) def copy_code(directory, create=False): if not os.path....
true
15ae8a02cccbf3567640befaee1bddf39c053e8e
Python
skulia15/Python-Course-Reykjavik-University
/v2/rank_hand.py
UTF-8
1,176
3.03125
3
[]
no_license
def rank_hand(hand): rank = 0 straight = False flush = False combo = [(card[0:-1], card[-1]) for card in hand] nrs = sorted([1 if n == "A" else 10 if n == "T" else 11 if n == "J" else 12 if n == "Q" else 13 if n == "K" else int(n) for n, y in combo]) nrsAce = sorted([14 if n == 1 else n for n in...
true
1e809239fe5b4723014c587dee59ce4b3d5aa67a
Python
FabioCostaR/aprendendoPYTHON
/teste import.py
UTF-8
166
3.296875
3
[]
no_license
import emoji import math num = float(input("num ")) print (f"A raiz de {num} é {math.sqrt(num):.3f}") print(emoji.emojize('Python is :v:', use_aliases=True))
true
6037ef0248583bd0af1d4abe0bafdf7273e21780
Python
0x15F9/PythonCrashCourse
/Chapter13/3_Raindrops/main.py
UTF-8
1,544
3.15625
3
[]
no_license
import pygame, time import sys from pygame.sprite import Group from rain import Raindrop def create_raindrops(screen, raindrops): raindrop = Raindrop(screen) raindrop_width = raindrop.rect.width raindrop_height = raindrop.rect.height w = screen.get_rect() available_space_x = w.width - 2 * raindrop...
true
39d9321801d887a37d1cba1ed0376a8152147629
Python
Abdullah-Hameed/Python-Programming
/Python - Assignment #1/Part6.py
UTF-8
193
3.34375
3
[]
no_license
#!/usr/bin/env python # coding: utf-8 # In[ ]: a = int(input("enter first number: ")) b = int(input("enter second number: ")) sum = a + b print("sum:", sum) # In[ ]: # In[ ]:
true
70a816e9086a94ba02967d72df946cad01bc5cd9
Python
LyleMi/Leetcode
/spiralOrder.py
UTF-8
363
2.90625
3
[]
no_license
class Solution(object): def spiralOrder(self, matrix): ret = [] while True: try: ret += matrix.pop(0) ret += [row.pop() for row in matrix] ret += matrix.pop()[::-1] ret += [row.pop(0) for row in matrix[::-1]] ...
true