blob_id
stringlengths
40
40
language
stringclasses
1 value
repo_name
stringlengths
5
133
path
stringlengths
2
333
src_encoding
stringclasses
30 values
length_bytes
int64
18
5.47M
score
float64
2.52
5.81
int_score
int64
3
5
detected_licenses
listlengths
0
67
license_type
stringclasses
2 values
text
stringlengths
12
5.47M
download_success
bool
1 class
357de6310b875ed6cc7c7e139a610c970d7e663a
Python
JJayeee/CodingPractice
/BaekJoon/단계별로 풀어보기/Backtracking/15651_N과 M(3).py
UTF-8
218
2.78125
3
[]
no_license
def sol(result, depth): if depth == lenth: print(result.strip()) else: for x in range(1, num+1): sol(result+str(x)+' ', depth + 1) num, lenth = map(int, input().split()) sol('', 0)
true
d5c1351e6c48c30195f4e3d42318c3109a03e99b
Python
DeltaEcho192/Glenwood_School_Code
/array_excersize.py
UTF-8
259
2.78125
3
[]
no_license
nameArr = ['ant','tiger','lawrance','chris','godfree','anastacia','jazz'] i = 0 x = 0 lenarray = len(nameArr) for i in range(lenarray): lencheck = len(nameArr[i]) if lencheck > 6: print(nameArr[i]) i = i + 1
true
1e413e84a055647b781fbafbb644b0ee544b9b5b
Python
tabegon/monster-fighter
/gui/test.py
UTF-8
1,101
3.140625
3
[]
no_license
import pygame from pygame.locals import * pygame.init() win = pygame.display.set_mode((400,500)) run = True nb_cases_cote = 10 taille_case = min(win.get_size()) / nb_cases_cote # min renvoie la valeur minimale d'une liste, ici la dimension de la fenêtre font = pygame.font.SysFont("",20) while run: win.fil...
true
7d05d3104452b15a28ff4219ce1559533885f517
Python
klich1984/holbertonschool-higher_level_programming
/0x0A-python-inheritance/3-is_kind_of_class.py
UTF-8
496
4
4
[]
no_license
#!/usr/bin/python3 """ function that check if the object is an instance of, or if the object is an instance of a class that inherited from, the specified class """ def is_kind_of_class(obj, a_class): """check if obj is an instance of a_class Args: obj (object): [description] a_class (...
true
28eb0371e876c9bcd199909178d324df550964d3
Python
dougsoa/Cursoemvideo
/teste 34.py
UTF-8
370
4.21875
4
[]
no_license
salario = float(input('Qual é o salário do funcinário? R$')) # Salários acima R$1.250,00 calculado aumento de 10% # Salários abaixo ou igual a R$1.250,00 calculado aumento de 15% if salario <= 1250: novo = salario + (salario * 15 / 100) else: novo = salario + (salario * 10 / 100) print('Quem ganhava R${:.2f} pa...
true
568e4ef09db4b35a391accf76225f09ba31202b4
Python
D3f0/txscada
/src/pysmve/nguru/apps/mara/tests/test_dsl.py
UTF-8
4,662
2.578125
3
[]
no_license
''' This file tests the DSL for changing attribute +----------------------+ +------------------------+ +--------------------+ | Formula |+->| SVGElement | | SVGScreen | |----------------------|| |------------------------| |--------------------| | last_error || | tag ...
true
0f8ccf0f2bb2284f0a0407550eac864338e0979d
Python
jgarte/friends-omg
/src/app/plotting.py
UTF-8
1,043
2.890625
3
[]
no_license
"""Utilities to produce plots using eplots.""" from math import sqrt def normal_approximation_interval(k: int, n: int, z: float = 1.96) -> float: """Compute the normal approximation for the interval around a binomial P.""" if min(k, n) <= 0: return None p = k / n return z * sqrt((p * (1 - p)) ...
true
8814a7966d1944232936ca96510337b8ed6a1126
Python
nurdanay/sentimentanalysis
/sentiment_analysis/get_ftse_value_test.py
UTF-8
196
2.796875
3
[]
no_license
import pytest from get_ftse_value import get_ftse_value def test_get_ftse_value(): ftse_value = get_ftse_value() # check we got the ftse value as a float assert isinstance(ftse_value, float)
true
d489b1e43f6c337e1abcd6ec383a554e42867f68
Python
Roshgar/SmallVersionningPythonScript
/srcs/utils.py
UTF-8
6,955
3.046875
3
[]
no_license
# -*- coding: utf-8 -*- import sys import os import time import parse import argparse import shutil import re defaultFolderPath = "./projectFolder/" archivePath = "./Archives/" # Class used to take care of the versionning information class versionHeader: # All commits excluding overwrites. versions = 1 # Commits w...
true
753dc2aea601d8498804bfcc688222115572af55
Python
dresen/praat
/scripts/Tier.py
UTF-8
6,224
2.921875
3
[ "MIT" ]
permissive
from Interval import Interval import sys class Tier(object): """ A class for a Praat Tier. The class supports extraction of new tiers from existing Tiers and adding new Tiers from extracted Praat object as well as transforms on the Interval objects that are stored in a Tier object. Also implement...
true
2b834aef2c79fc881e5be8c603576c34666cfac3
Python
NoahRottman/Shrimpy-Balancer
/portfolio-balancer.py
UTF-8
2,587
3.21875
3
[]
no_license
from scipy.optimize import minimize import numpy as np np.seterr(divide='ignore', invalid='ignore') # Log of 0 may be encountered class PortfolioManager(object): def __init__(self, coins): """ Initialize instance of the PortfolioManager. Parameters ---------- coins: list ...
true
65b173752d66db7c167aad9e78333a8328fbf751
Python
Tomos-Evans/garrison
/test/apis/ingredients.py
UTF-8
2,860
2.546875
3
[ "MIT" ]
permissive
from test.apis import ApiTestCase from app.models.drinks import Ingredient class TestGet(ApiTestCase): def setUp(self): super().setUp() Ingredient.from_params('vodka', True, 40) Ingredient.from_params('gin', True, 35) Ingredient.from_params('orange juice', False) def test_get_a...
true
0795c93b5e7cb2275a35199e790416fbabd93115
Python
CheckMateSergei/PandasTutorial
/PandasIntro.py
UTF-8
359
2.890625
3
[]
no_license
#! /usr/bin/python3 import pandas as pd import matplotlib.pyplot as plot df = pd.read_csv("avocado.csv") #print(df.head(3)) #print(df["AveragePrice"].head()) albany_df = df[ df['region'] == 'Albany' ] #print(albany_df.head()) albany_df.set_index('Date', inplace=True, drop=True) print(albany_df.head()) plot.imshow(...
true
b4431a058c01c9858e35a576fdc5e7d1de77540e
Python
Irwinlinker/Powerball
/powerball.py
UTF-8
5,691
4.3125
4
[]
no_license
#Robert Marsh #July 7, 2020 #Program simulates a lottery drawing ##The game allows the player to enter 3 regular numbers and a powerball number ##and the input is validated ##Regular numbers must be in the range 1 through 9 ##Regular numbers must be unique, there can be no duplicates ##The powerball number...
true
cbac286867c970d8f8fecce47a042d1996930140
Python
shananiki/spieldochmit
/1.0/CharacterSelectState.py
UTF-8
405
2.546875
3
[]
no_license
from GameState import * from SelectionRectangle import * from Inventory import Inventory from Interface import Interface import pygame class CharacterSelectState(GameState): def __init__(self): self.interface_list = [] def render(self, screen): for interface in self.interface_list: ...
true
898e50ec48c52d05b0049d299274074cd7416e0d
Python
anmoldp7/SimpleWebCrawler
/CrackedCrawler.py
UTF-8
437
3.09375
3
[]
no_license
import requests import bs4 import re import urllib.parse def parse_title(title): return ' '.join(urllib.parse.unquote(title, encoding="utf-8", errors="replace").split('+')) url = "http://www.cracked.com/" soup = bs4.BeautifulSoup(requests.get(url).text, 'html.parser') x = soup.find_all('h3') print('#' * 80) for s...
true
e8eb6946c74f21d1a8f203974f900090824bc8d1
Python
AMYMEME/algorithm-study
/common/2021.08.10/maplejh_1516.py
UTF-8
1,024
3.125
3
[]
no_license
# https://www.acmicpc.net/problem/1516 import sys from collections import defaultdict, deque N = int(sys.stdin.readline()) buildings = defaultdict(int) # 건물 짓는데 걸리는 시간 order = defaultdict(list) # 먼저: 나중 indegree = [0] * (N + 1) # 진입차수 q = deque() # 진입차수가 0인 노드 dp = [0] * (N + 1) # 먼저 지어져야 하는 건물들이 완성되는데 걸리는 시간 fo...
true
8c7a4ba03ab1928ef199c1b6d34d9933323ce144
Python
lyl617/SDN-TORME
/large-topo/Data/CDF.py
UTF-8
854
2.546875
3
[]
no_license
import json from collections import defaultdict def read(path): con=json.load(open(path)) return con dict_of_load=defaultdict(int) staticDyn_link_load=read("staticDyn_link_load.json") staticDyn_linknumber=read("staticDyn_linknumber.json") numberrate=0 for link in staticDyn_link_load["800"]: linklo...
true
28362fe8287260732de181595c00facf998b7b69
Python
Smookii/ParticlesEnvironnement
/particle.py
UTF-8
2,280
3.125
3
[]
no_license
import random class Particle(): def __init__(self, startpos, initspeed, col): self.startpos = [startpos[0],startpos[1]] self.pos = [startpos[0],startpos[1]] scatterx = [-20,20] scattery = [-18,8] self.start_speed = [initspeed[0]*2 + random.uniform(scatterx[0],scatterx[1]),i...
true
4adfd9a5e3b922b5131c1ce182596ad844f5d035
Python
siphera/tkinter-intro
/tkregister.py
UTF-8
1,191
3.015625
3
[]
no_license
from tkinter import * import tkinter window = Tk() window.geometry("300x250") window.title("Register") # window.configure(background="grey") fields = {} # Name name_label = Label(window, text="Name") name_field = Entry(window) fields['name'] = name_field name_label.grid(row=0, column=0) name_field.grid(row=0, column...
true
cdd26917b7acf8fd1dfa3280531fac61982aa656
Python
neelamy/Algorithm
/Array/Find2NonRepeatingNo.py
UTF-8
1,136
3.921875
4
[]
no_license
# Source : http://www.geeksforgeeks.org/?p=2457 # Find the two non-repeating elements in an array of repeating elements # Algo/DS : Array , bit manipulation # Complexity :O(n) , space - O(1) # Note : x ^ x = 0 so xor will remove all even nos and only odd nos are left # if all nos are repeated except one : xor al...
true
7c07ac3249ae13cb21e3d994e21d6f01e352b504
Python
Vincent105/python
/04_The_Path_of_Python/12_class/1316__eq__.py
UTF-8
259
3.40625
3
[]
no_license
class City(): def __init__(self, name): self.name = name def __eq__(self, city2): return self.name.upper() == city2.name.upper() one = City('Taipei') two = City('taipei') three = City('myhome') print(one == two) print(one == three)
true
8a403cae9f65654ab5a3396553c307b853bd7160
Python
zhongxiangboy/TKMRC-1
/ir/put.py
UTF-8
3,121
2.625
3
[ "Apache-2.0" ]
permissive
#! /user/bin/evn python # -*- coding:utf8 -*- """ @Author : Lau James @Contact : LauJames2017@whu.edu.cn @Project : TKMRC @File : put.py @Time : 18-10-17 下午4:54 @Software : PyCharm @Copyright: "Copyright (c) 2018 Lau James. All Rights Reserved" """ from ir.config import Config from elasticsearch import ...
true
d00aae89be3a4f4be0c8c0ffdb7551c0a8853f59
Python
canvassanalytics/streamhist
/streamhist/utils.py
UTF-8
2,804
2.921875
3
[ "MIT", "Apache-2.0" ]
permissive
#!/usr/bin/env python """Some useful utility functions and classes.""" import ctypes as _ctypes import sys as _sys from sys import platform as _platform from math import log, sqrt import types if _sys.version_info >= (3, 3): from collections.abc import Iterable else: from collections import Iterable iterator...
true
80bb56fb1eb7b546218e7151220ddcd28c34d1fb
Python
Sohieb/reversi-game
/main.py
UTF-8
2,496
3.28125
3
[]
no_license
import pygame import random import view import board import common from view import * from board import * from common import * class game_manager: """ The Main class which handle the overall game control """ def __init__(self): ## create a veiw and a model objects self.window = view.game_interface() self.b...
true
228db9bb329234917faec0a659698473b9a0b201
Python
chelseashin/My-Algorithm
/daily_study/samsung2021/boj/17070_파이프옮기기1.py
UTF-8
1,159
3.046875
3
[]
no_license
# Memoization 풀이 # DP 연습 많이 하자.. import sys input = sys.stdin.readline direction = [[(0, 1), (1, 1)], [(1, 0), (1, 1)], [(0, 1), (1, 1), (1, 0)]] def available(dr, dc): if (dr, dc) == (0, 1): # 가로 return 0 elif (dr, dc) == (1, 0): # 세로 return 1 elif ...
true
d68afb2abb1f3c5c42a57fd3acc1780883d87bf2
Python
EasyPost/easypost-python
/tests/test_end_shipper.py
UTF-8
1,711
2.65625
3
[ "MIT" ]
permissive
import pytest from easypost.models import EndShipper @pytest.mark.vcr() def test_endshipper_create(ca_address_1, test_client): endshipper = test_client.end_shipper.create(**ca_address_1) assert isinstance(endshipper, EndShipper) assert str.startswith(endshipper.id, "es_") assert endshipper.street1 ==...
true
82803ac4537ba23111934a0c1f4c402aa55680fa
Python
ayuratuputri/I-Gst-Ayu-Ratu-Putri-Maharani_I0320049_Andhika_Tugas6
/I0320049_exercise 6.7.py
UTF-8
172
4.15625
4
[]
no_license
#membuat for untuk rentang nilai tertentu for i in range (2, 9): #melakukan pengulangan nilai mulai dari i = 2 sampai i <9 print("kuadrat dari", i, "adalah", i**2)
true
3055e493953ef4a26361e74985d9ecc1de851cbb
Python
mjacobsen32/CS331
/CS331-Assignment1/a_2.py
UTF-8
8,798
2.96875
3
[]
no_license
import sys class State: def __init__(s,parent,lc,lw,lb,rc,rw,rb,d): s.depth = d s.parent = parent s.lc = lc s.lw = lw s.lb = lb s.rc = rc s.rw = rw s.rb = rb def state_allowed(s, lc, lw, lb, rc, rw, rb): if (lc < lw and lc > 0) or (rc < rw...
true
4c19e277d97707ededb3c37e884cad57eaa88cb9
Python
Lehyu/pyml
/optimizer/sgd.py
UTF-8
1,685
2.671875
3
[]
no_license
import sys from base import BaseOptimizer from .loss import LossWithSumOfSquare, LossWithLogits, LossWithSoftmax from utils import nutils Test = False class SGD(BaseOptimizer): def __init__(self, learning_rate=1e-1, eps=1e-5, max_iter=100000, batch_size=10, loss="SumOfSquares", decay='step'): self.lear...
true
595645519bda048cf5cd980e31798be114bc8abb
Python
dunitian/BaseCode
/python/5.concurrent/Thread/2.lock_queue/2.Lock/Ext/4.sortlock1.py
UTF-8
2,354
3.5
4
[ "Apache-2.0" ]
permissive
from time import sleep from multiprocessing.dummy import Pool as ThreadPool, Lock class Account(object): def __init__(self, name, money=5000): self.name = name self.lock = Lock() self.money = money # 设置一个初始金额 class Bank(object): tie_lock = Lock() @classmethod def __get_hash...
true
c31a316bc737a797615e02d1234720382b6018b7
Python
iyouyue/Python-Exercises
/codebase/格式化输出.py
UTF-8
374
3.453125
3
[]
no_license
name = input("请输入你的名字:") age = int(input("请输入你的年龄:")) job = input("请输入你的工作:") hobbie = input("请输入你的爱好:") msg = """ ---------------- info of %s -------------------- Name : %s Age : %d job : %s Hobbie: %s ------------------ end ------------------------- """ %(name,name,age,job,hobbie) print(msg)
true
623b9c5d182bb7e9240ea4708457fbe2998a6a48
Python
HamidZiyaee/Image_classifier
/train.py
UTF-8
5,233
2.53125
3
[]
no_license
import argparse parser=argparse.ArgumentParser() parser.add_argument('-d','--data_dir', help='Directory to data', default='flowers') parser.add_argument('-s','--save_dir', help='Directory to save checkpoints', default="") parser.add_argument('-a','--arch', help='Choose pretrained model architecture either vgg19_bn or...
true
ecc87afed9ec94063b81d346c2f190ece167af9a
Python
SaiPrahladh/scad_tot
/verification/clustering.py
UTF-8
10,142
2.546875
3
[]
no_license
import os, pickle, argparse import numpy as np import pandas as pd import seaborn as sns from sklearn.cluster import KMeans from kmodes.kmodes import KModes from kmodes.kprototypes import KPrototypes from sklearn_extra.cluster import KMedoids from scipy.spatial import distance from matplotlib import pyplot as plt from ...
true
04365d99e4b92c52b6887458826d87ea03dd9a52
Python
sushi-aa/idTech-pythonMaterial
/tetris_pieces.py
UTF-8
3,955
2.75
3
[]
no_license
#ALL CREDIT FOR CODE TO iD TECH import random # Piece shapes types = ["I", "J", "L", "O", "S", "T", "Z"] # dict of pieces and their rotations. Key is tile type. pieces = { "I": [ [[0, 0, 0, 0], [1, 1, 1, 1], [0, 0, 0, 0], [0, 0, 0, 0]], [[0, 0, 1, 0], [0, 0, 1,...
true
b0fc2e8e0b6b64fb78c78493ab5a1043b0189af7
Python
liujxing/KalmanFilter
/tests/test_optimize_diagonal.py
UTF-8
3,684
3.03125
3
[]
no_license
import numpy as np from KalmanFilter.kalman_filter import KalmanFilter, KalmanMatrix from tests.matrix_generation import generate_random_kalman_matrix if __name__ == "__main__": # generate matrix for the process state_dim = 4 observation_dim = 1 noise_level = 0.0001 state_transition_matrix = np.d...
true
e8a9df1d27090f6dac3918c9a40172e00bf99e3d
Python
anyuhanfei/study_PyQt5
/033~077-QWidget/043~047-QWidget-鼠标操作/046-QWidget-鼠标操作-鼠标跟踪.py
UTF-8
1,062
3.53125
4
[]
no_license
''' 045-QWidget-鼠标操作-鼠标跟踪 ''' import sys from PyQt5.QtWidgets import QApplication, QWidget class Window(QWidget): def __init__(self): super().__init__() self.setWindowTitle('045_QWidget_鼠标操作_鼠标跟踪') self.resize(700, 700) self.move(200, 200) # 获取鼠标是否被跟踪 print(self.h...
true
0e3a32d1fafd4e1f7ab863617a49560bb7e2341d
Python
Harish4948/Guvi
/CKPRO05.py
UTF-8
235
3.28125
3
[]
no_license
n=int(raw_input()) arr=map(int,raw_input().split()) l=0 for i in range(0,n-2): for j in range(i+1,n-1): for k in range(j+1,n): if arr[i]<arr[j]<arr[k]: l+=1 print(l)
true
739dbce9a6579c67c53e87297bf6f4890788b568
Python
anikur93/Hackerrank_Artificial_Intelligence
/10 days of Stats/lsrl.py
UTF-8
557
3.390625
3
[]
no_license
x1,y1 = list(map(int, input().split())) x2,y2 = list(map(int, input().split())) x3,y3 = list(map(int, input().split())) x4,y4 = list(map(int, input().split())) x5,y5 = list(map(int, input().split())) sumx = x1 + x2 + x3 + x4 + x5 sumy = y1 + y2 + y3 + y4 + y5 sumxy = x1*y1 + x2*y2 + x3*y3 + x4*y4 + x5*y5 sumx2 ...
true
46aef3623ad6dce2540d2a37218f749c92f2562f
Python
chpark-ML/Age_Prediction_for_AD_Diagnosis
/prac/plot_logit_on_2D.py
UTF-8
747
2.796875
3
[]
no_license
import nibabel as nib import numpy as np import matplotlib.pyplot as plt tmp_dir_file_0 = './logit_0.nii.gz' tmp_dir_file_1 = './logit_1.nii.gz' logit_0_img = nib.load(tmp_dir_file_0).get_fdata() logit_1_img = nib.load(tmp_dir_file_1).get_fdata() x =logit_0_img y = logit_1_img print("x : {}".format(x.reshape(-1).sum...
true
2122147447ea19fb8214646d98a6a0c00c4fb595
Python
mhezarei/robotics-course-2021
/HW1/part_one.py
UTF-8
3,451
3.28125
3
[]
no_license
import math import matplotlib import matplotlib.pyplot as plt import numpy as np CONVERSION = math.pi / 180 NUM_ITERATIONS = 10000 def forward(constants: list, location: list) -> dict: phi_x, phi_y, r, d, f = constants x, y, theta = location dt = 1 / f theta_rad = CONVERSION * theta x_...
true
f23335774f692a642760f4b5953f3ee8c1a0adc7
Python
WebarchivCZ/grainery
/frontend/views/figures.py
UTF-8
4,880
3.21875
3
[ "MIT" ]
permissive
from math import pi from bokeh.embed import components from bokeh.plotting import figure, ColumnDataSource from bokeh.palettes import Category20c from bokeh.transform import cumsum class HarvestFigures(): """ generate graphs with bokeh library""" def __init__(self, data): self.data = data def ha...
true
d13e36d36ac170a9c10315758b6395ecf8edaed4
Python
Johnny00520/CSCI3203-Artificial-Intelligence
/PS4/perception2.py
UTF-8
1,570
3.546875
4
[]
no_license
#!/bash/python #The perceptron equation is S = sum(wi x xi) from i = 0 to i = n #The function of the separated line is f(s) = 1 if S >= 0, 0 otherwise. I call it #a step funciton from random import choice from numpy import array, dot, random unitStep = lambda x: 0 if x < 0 else 1 training_data = [ # arr...
true
840b15ff128ac0ddfc77d5e6df72b9468fb669d3
Python
zhoutong1996/SocketTest
/test.py
UTF-8
3,988
2.75
3
[]
no_license
import socket import argparse from binascii import hexlify class SodcketFunc: def __init__(self): pass def get_machine_info(self): host_name = socket.gethostname() ip_addr = socket.gethostbyname(host_name) return {'host_name': host_name, 'ip_addr': ip_addr} def get_remote_...
true
1100606d65a931053d7c6ab34ec6ebeb19d7fd67
Python
Imaginerum/training-python
/0010_pasły_się_owce.py
UTF-8
2,781
4.25
4
[]
no_license
''' Napisz program, który wczyta liczby całkowite B, W, Z a następnie poprawnie napisze tekst: Na łące [pasła / pasły / pasło] się B [owca / owce / owiec]. Wieczorem [przyszedł / przyszły / przyszło] W [wilk / wilki / wilków] i [zjadł / zjadły] Z [owcę / owce / owiec]. Rano na łące [nie było / była / były / było już t...
true
7fc9427586b51f495ccced8a969f12065290faf2
Python
zeeviiosub/advanced-system-design
/cli.py
UTF-8
948
2.84375
3
[]
no_license
class CommandLineInterface: def __init__(self): self.functions = {} def command(self, f): import inspect self.functions[f.__name__] = (inspect.getfullargspec(f).args, f) return f def main(self): import sys errmsg = 'USAGE: python example.py <command> [<key>...
true
0c091486a33b9ff10b1a5e34ee443b787cc03e33
Python
supertask/icpc
/recruit/2013/C.py
UTF-8
848
3.140625
3
[]
no_license
T = input() for t in range(T): player_num = input() cards = raw_input() cards_len = len(cards) modd = 0 scores = [0 for w in range(player_num)] i = 0 while True: if i > cards_len-1: break if modd >= player_num: modd = 0 if cards[i] == "X": i+=1 while True: if i > cards_len-1: break ...
true
a5cb001863bcb0a24f8af9ded63e71313b45b7c7
Python
kenkoooo/twitter-utils
/twitterkenkoooo/config.py
UTF-8
1,352
2.625
3
[]
no_license
import json from typing import List import logzero import twitter class Config: def __init__(self, config_file: str): with open(config_file, "r") as f: config = json.load(f) self.consumer_key = config["consumer_key"] self.consumer_secret = config["consumer_secret"] ...
true
da81e6b407acd7f20084e2068525949d969d18b8
Python
RichardPoulson/object-oriented-project
/tests/TestingMoveStrategyFactory.py
UTF-8
533
3.25
3
[]
no_license
import sys sys.path.append('../') from MoveStrategyFactory import * factory = MoveStrategyFactory('matrix') for playerNumber in [1, 2]: for moveType in ['moveLeft', 'moveRight', 'jumpLeft', 'jumpRight']: print("Player {} {}: {}".format(playerNumber, moveType, factory.getMoveStrategy(playerNumber, moveTyp...
true
484920d47af6ba32f9871833732e83041dbeb4c6
Python
dev100kg/aoj
/Lesson - ITP1/ITP1_6_C/main.py
UTF-8
312
3.171875
3
[]
no_license
n = int(input()) buildings = [[[0 for x in range(10)] for y in range(3)] for z in range(4)] for x in range(n): b, f, r, v = map(int, input().split()) buildings[b - 1][f - 1][r - 1] += v for x in range(4): for floor in buildings[x]: print("", *floor) if x != 3: print("#" * 20)
true
9fe130d9beaf875c51d9763f10715cfceebf59d3
Python
ThorstenVogt/Python
/python/835converter/835convert.py
UTF-8
10,624
2.984375
3
[]
no_license
### The purpose of this script is converting 835 messages in .x12 file format ### to csv files. ### The general idea is to iterate through all files, ### then through all transaction sets, ### then through all claims, ### then through all service line items ### Data is collected into variable...
true
a792c2dfcbdcfb7f4df9babd3eca7064ef49c5fe
Python
MDomanski-dev/MDomanski_projects
/Python_Crash_Course_Eric_Matthes/many_users.py
UTF-8
475
3.59375
4
[]
no_license
users = { 'aeinstein': { 'first': 'albert', 'last': 'einstein', 'location': 'princeton', }, 'mcurie': { 'first': 'maria', 'last': 'skłodowska-curie', 'location': 'paryż', }, } for username, user_info in users.items(): print("\nNazwa użytkownika: " + username) full_name = user_info['first'] + " " + ...
true
1e07dd5507e8f3ece339ddb924f266e047cdc17e
Python
IgorPereira1997/Python-SQL-Basics
/banco_de_dados/boxplot.py
UTF-8
538
3.484375
3
[]
no_license
''' Boxplot Boxplot (diagrama de caixa) é uma técnica de visualização de dados em que representa a variação de dados por meio de quartis. O retângulo central concentra 50% dos dados plotados. A linha ao centro indica a mediana. Os círculos representam os outlines (valores que destoam muito dos outros valores apresentad...
true
126a5b9b0f6cba7410c8ec0bdb8d0288164ac008
Python
abelchun39/Dota2-Heroes-Recommendation
/app.py
UTF-8
1,420
2.6875
3
[]
no_license
from flask import Flask, render_template,request from RandomForest.random_forest import RandomForest from engine import Engine import json app = Flask(__name__) engine = Engine(RandomForest()) #URL_PREFIX = 'http://127.0.0.1:5000' with open('heroes.json', 'r') as fp: heroesData = json.load(fp) def get_api_strin...
true
8e3912b5afc73d71c6a4cb5b1c49971ff6d430fd
Python
grandq33769/llh
/Python/regression/housing/training_2.py
UTF-8
1,882
3.0625
3
[]
no_license
''' Created on 2017年4月12日 @author: LokHim ''' from llh.Python.regression.housing.data_input import TARGET_LIST WEIGHT = -2.3272 WEIGHT_2 = 0.0434 BIAS = 42.8169 LEARNING_RATE = 0.0000000195 STEP = 200000 def predict(input_attr): '''Function for prediction''' return WEIGHT * input_attr + WEIG...
true
087d1c8ab097e4e11d4f7c0d8250682af4c7e952
Python
CarlosChato/Python-Linked-List
/Singles Linked List/SNode.py
UTF-8
291
3.0625
3
[]
no_license
#We have to create a node, it will be like a part of a list class SNode(): #the node only have a external parameter that is the element that it will have #Only have a memory reference that is the next node def __init__(self,e): self.elem = e self.next = None
true
43d607e629797da186d16043d44251590f02882a
Python
DN0000/SecureCRT
/Prefix_no.py
UTF-8
480
2.546875
3
[ "Apache-2.0" ]
permissive
# $language = "python" # $interface = "1.0" # NoToggle.py # # Description: # # Port of NoToggle.vbs # Be "tab safe" by getting a reference to the tab for which this script # has been launched: objTab = crt.GetScriptTab() strLines = objTab.Screen.Selection if not strLines.strip(): crt.Dialog.MessageBox("No Text Se...
true
d5c0c65386c4f7b4977cc9c15dd00ab7983640bd
Python
andres-rad/Programming-Challenges
/RPC1318/horsemeet2.py
UTF-8
1,347
2.734375
3
[]
no_license
import numpy as np def m(i, j, k , l): return i + 8*j + 8*8*k + 8*8*8*l def r(i, j): ans = [] dx = [1, 1, 2, 2, -1, -1, -2, -2]; dy = [2, -2, 1, -1, -2, 2, -1, 1]; for d in range(8): if (i+dx[d] < 8 and i + dx[d] >= 0 and j + dy[d] < 8 and j + dy[d] >= 0): ans.append((i+dx[d], j+dy[d])) return a...
true
589a76002d7e9b87080aeffdadfc62ac749fa16b
Python
rlatmd0829/algorithm
/알고리즘풀이시즌2/21.08.19/스타트와링크다른풀이.py
UTF-8
875
2.765625
3
[]
no_license
N = int(input()) graph = [list(map(int, input().split())) for _ in range(N)] check = [False]*N curMin = 1000000 def recursive(index, howMany, curSum): global curMin if index == N: if howMany != N/2: return else: sum = 0 for x in range(N): if ch...
true
d92aa24166c688615fd3cd3683b95e91abd48930
Python
daniel-chuang/beaverworks
/Error/polling.py
UTF-8
2,392
3.453125
3
[]
no_license
import time import sys import threading #global var polled for change keep_running_polled = True class SigFinish(Exception): pass def throw_signal_function(frame, event, arg): raise SigFinish() def do_nothing_trace_function(frame, event, arg): # Note: each function called will actually call this functio...
true
4fd3f1708d00c0ff460fca4326a1381fd20608c7
Python
hkedariya/my-captain
/fibonacci series (1).py
UTF-8
281
3.390625
3
[]
no_license
#!/usr/bin/env python # coding: utf-8 # In[ ]: def fibonacci(n): if n==0: return 0 elif n==1: return 1 else: return fibonacci(n-2)+ fibonacci(n-1) n=int(input("Enter the no terms ")) for i in range(n): print(fibonacci(i)) input() # In[ ]:
true
b513526d6f8a8f35f39da43c3bdfb943c315dbca
Python
daveymason/pythonProjects
/Slideshow/Slideshow.py
UTF-8
923
3.21875
3
[ "MIT" ]
permissive
from itertools import cycle import tkinter as tk class App(tk.Tk): def __init__(self, image_files, x, y, delay): tk.Tk.__init__(self) self.geometry('+{}+{}'.format(x, y)) self.delay = delay self.pictures = cycle((tk.PhotoImage(file=image), image) ...
true
b3a4d2faafd9672f5b2def16b0b826189199896a
Python
Alek96/SZR
/SZR/apps/GitLabApi/base.py
UTF-8
606
2.78125
3
[ "MIT" ]
permissive
class RESTObject(object): def __init__(self, rest_object): self.__dict__.update({ '_rest_object': rest_object }) def __getattr__(self, name): return getattr(self._rest_object, name) def __setattr__(self, name, value): setattr(self._rest_object, name, value) ...
true
ce6427d4ee8d5c1da771ab2b21b8f5afae50d76e
Python
dr-dos-ok/Code_Jam_Webscraper
/solutions_python/Problem_118/1496.py
UTF-8
3,902
3.296875
3
[]
no_license
from math import log from math import log10 from math import atan, pi def intToList(n): maxDigitSeat = int(log10(n)) list = [] for i in xrange(0,maxDigitSeat+1): list.append(int(n/pow(10,(maxDigitSeat-i)))%10) return list def listToInt(list): l = len(list) num = 0 for i in xrange(l...
true
ec6dc7f0a28d47952d3e683c09dcaa24a81c71e2
Python
Anurag14/accessfaceid
/register/register.py
UTF-8
3,435
2.546875
3
[ "Apache-2.0" ]
permissive
import sys sys.path.insert(0,'.') import cv2 import numpy as np from modules import face_track_server, face_describer_server, face_db, camera_server,face_align_server from configs import configs ''' The register app utilize all servers in model I have a camera product and I need to use it to find all visitors in my ...
true
f771d07f5d14ed876b725d3f9bed85a593c4af2e
Python
NikitaMishin/Django.Practice
/Mysite/first/models.py~
UTF-8
1,358
2.703125
3
[]
no_license
from django.db import models #CATEGORIES = ((1, "A"),(2,"B"),(3,"C") ) class Category(models.Model): name = models.CharField(max_length =30, unique = True) description = models.TextField() def __str__(self): return self.name class Good(models.Model): name = models.CharField(max_length = 30,...
true
f58b2e42d6d76b24f4139fdaa3f4c485de0885d7
Python
Aasthaengg/IBMdataset
/Python_codes/p02580/s324308590.py
UTF-8
659
2.71875
3
[]
no_license
H, W, M = map(int, input().split()) h = [0 for _ in range(H+1)] w = [0 for _ in range(W+1)] hmax = 0 wmax = 0 Q = [] for _ in range(M): a, b = map(int, input().split()) Q.append((a, b)) h[a] += 1 hmax = max(hmax, h[a]) w[b] += 1 wmax = max(wmax, w[b]) h_ok = False w_ok = False hm = [False for _ in range(H+1...
true
034206cadc25623d52e1b48512eed6129f39e296
Python
omnea/distributed-service-framework
/scripts/clean_rabbit.py
UTF-8
1,980
2.609375
3
[]
no_license
# -*- coding: utf-8 -*- import pika import pyrabbit class StructureManager(object): _host = '88.99.15.151' _port = 5672 _username = 'test' _password = 'test' _connection = None _channel = None _api_client = None def __init__(self): super().__init__() self._configure() ...
true
a059dcc437e4f1dc244f608938cdd42e7b31e69f
Python
SirJakesalot/MinecraftMobIdentifier
/models/findCentroids.py
UTF-8
5,601
2.984375
3
[ "MIT" ]
permissive
#This program returns the centroids of each MOB in a cropped image image1 = [[.5,.3,.2,0,0], [.2,.1,.4,.3,0], [0,0,.9,.1,0], [.1,.9,0,0,0], [.1,.4,.4,0,.1], [.1,.1,.8,0,0], [0,1,0,0,0], [0,.6,.4,0,0]] image2 = [[0,0,0,0,0], [0,0,0,0,0], [.2,.1,0,0,.7], [.2,0,0,.5,.3], [.9,0,0,0,.1], [0,0,0,0,1], [.4,.1,.1,.4,0], [.8,...
true
5297b0161430d1d4869f6afd35dfc5e40d2f8d11
Python
startrekdude/byref
/tests/test3.py
UTF-8
350
3.890625
4
[ "ISC" ]
permissive
from byref import byref @byref("x") def add(x, /, *xs): for y in xs: x += y def main(): nums = [] while True: s = input("Enter a number? ") if not s: break if not s.isdigit(): continue nums.append(int(s)) x, *xs = nums add(x, *xs) print(f"The sum of these numbers is {x}.") print("Goodbye.") if _...
true
6c42b98a4577aa8290da6a48ed568ad01856b70b
Python
ArtTheFirst/CyTech
/practice/python/100-days-of-code/tip_calculator.py
UTF-8
651
4.5
4
[]
no_license
#If the bill was $150.00, split between 5 people, with 12% tip. #Each person should pay (150.00 / 5) * 1.12 = 33.6 #Format the result to 2 decimal places = 33.60 #Tip: There are 2 ways to round a number. You might have to do some Googling to solve this.💪 #Write your code below this line 👇 bill = 150 pe...
true
43bd039079fae2e4bf05158922dbe45509e7124d
Python
nja2will/InstructionsTypographiques
/src/test.py
UTF-8
3,215
3.671875
4
[]
no_license
from projet import * def test() : print("Pour effectuer le test, veuillez décrire 3 automates ayants le même alphabet.\n") while True : while True : expr1 = input("Veuillez entrer l'expression régulière définissant le première automate utilisé pour le test :\n") try : ...
true
9916ae4c8904de14f9e5b49568a605d6a317bf1e
Python
mfatihaktas/anonymity-mixes
/intersection_wsenders/intersection_model.py
UTF-8
1,823
2.890625
3
[]
no_license
from log_utils import * from math_utils import * """ Probability of observing the delivery of NO message from a sender during target's attack window. Delta: Length of the attack window ar: Message generation rate at the sender d: Unit time epoch length T: Delivery time of a message, a r.v. """ def Pr_ObservingNoDeliv...
true
4543520c9bf156e04de3627e92838824eb16da43
Python
BojanKr/ssn
/scripts/sort_clusterONE_results.py
UTF-8
1,245
2.734375
3
[]
no_license
import pandas as pd import os def get_root_dir(): for file in os.listdir(os.path.join(os.getcwd(), 'network/')): if not file.endswith('xgmml'): continue else: print(file) dir = os.path.join(os.getcwd(), file+'/') print(dir) return dir ...
true
cea5c5c8ad99a1a22dc23878605f16b357032445
Python
lleonova/Automation2
/Amazon_WholeFoods_deals_practice.py
UTF-8
1,412
2.671875
3
[]
no_license
from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.support.wait import WebDriverWait PRODUCTS_UNDER_YELLOW_LINE = (By.CSS_SELECTOR, "#wfm-pmd_deals_section div.wfm-desktop-section-size:nth-of-type(6) li") P...
true
abb216a2ba8299c0a39673829d685c7989e761a9
Python
maximan3000/IntelligenceSystems
/RecSys/project/sugrate.py
UTF-8
7,542
3.359375
3
[]
no_license
import numpy class UserSuggestingRate: """ Класс для рекомендационной системы. Строится на основании данных конкретного пользователя """ def __init__(self, myName: str, usersRates: dict, usersDaysOfWeek: dict, usersPlaces: dict, kNN: int = 7) -> None: super().__init__() self.__myName =...
true
5df6be989240425089f4a90bf216b86d13420df9
Python
zhongpei0820/LeetCode-Solution
/Python/1-99/018_4Sum.py
UTF-8
2,479
3.53125
4
[]
no_license
#Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = target? Find all unique quadruplets in the array which gives the sum of target. # #Note: The solution set must not contain duplicate quadruplets. # # # #For example, given array S = [1, 0, -1, 0, -2, 2], and target =...
true
9929bf67b377598bf4c6b2bfdf0c44370c79c2a1
Python
jay3ss/congenial-rotary-phone
/singlylinkedlist.py
UTF-8
2,732
4.40625
4
[ "MIT" ]
permissive
class ListNode: """ A node in a singly-linked list. """ def __init__(self, data=None, next=None): self.data = data self.next = next def __repr__(self): return repr(self.data) class SinglyLinkedList: def __init__(self): """ Create a new singly-linked lis...
true
ebb8ad1925823222764ae07680f8280b74c7cc72
Python
bp40/attendanceLog
/attendance.py
UTF-8
2,978
2.859375
3
[]
no_license
import mysql.connector import os import sys import RPi.GPIO as GPIO from mfrc522 import SimpleMFRC522 from RPLCD.i2c import CharLCD import time import datetime #setup GPIO.setwarnings(False) now = datetime.datetime.now() current_time = now.strftime("%H:%M:%S") run = True; print("Current Time =", current_time) lcd ...
true
81f7afb1489c3b3a077fc2b7ee6b09cf45434cfd
Python
NadavFeldman/Lending-Club-Issued-Loans-Analysis-
/src/models/7-Train-Test-Preparation.py
UTF-8
6,909
3.25
3
[ "BSD-3-Clause" ]
permissive
# coding: utf-8 # # Train - Dev - Test Preparation # In[1]: import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns # In[2]: ############################################################################## ########## DATABASE FUNCTIONS #####...
true
fe98ebaeb7d190cdae0e795a23a005f4d3ed70c6
Python
sailfish009/protein-function-prediction
/protfun/data_management/data_manager.py
UTF-8
24,864
2.59375
3
[]
no_license
import shutil import abc import numpy as np import os import protfun.data_management.preprocess as prep from protfun.data_management.label_factory import LabelFactory from protfun.data_management.validation import EnzymeValidator from protfun.utils import save_pickle, load_pickle, construct_hierarchical_tree from prot...
true
3c0fdd3e01f8dbe2780cd0a2d23d60ab47234306
Python
NelaSvozilikova/freelance
/Bash/Navegar_Sitio_JEO/PASO_NUEVOO/File_Lib.py
UTF-8
459
3.140625
3
[]
no_license
def saveFile(FILENAME, LISTA): file = open(FILENAME,"w") for valor in LISTA: file.write(valor.strip() + '\n'); file.close(); return def loadFile(FILENAME, LISTA): try: file = open(FILENAME, "r") for line in file: LISTA.append(line) file.close(); except (FileNotFoundError): file = open(FIL...
true
e0215c3c332f8021dc4b7cff691fce7fd17b4f3a
Python
lilin199309261023/ceshi2
/day3/test9.py
UTF-8
1,798
2.796875
3
[]
no_license
from time import sleep from appium import webdriver # server 启动参数 from appium.webdriver.common.touch_action import TouchAction desired_caps = {} # 设备信息 desired_caps['platformName'] = 'Android' desired_caps['platformVersion'] = '5.1' desired_caps['deviceName'] = '192.168.56.101:5555' # 输入中文 desired_caps['unicodeKeybo...
true
0cc232d4254b1a1a3a2c3d9c27fc21ee6f8efc39
Python
yue-cherry-ying/Textual-Analysis
/digital_approaches/week8_cont.py
UTF-8
2,187
2.625
3
[]
no_license
# Yue "Cherry" Ying # Python Exercise for Tuesday March 2nd import os import re import sys from sklearn.decomposition import LatentDirichletAllocation from sklearn.feature_extraction.text import CountVectorizer, TfidfVectorizer import numpy from nltk.corpus import stopwords from nltk.stem import WordNetLemmatizer from...
true
e90f6d4e663f5e9b9bb58e981f3f4a077f28d5f9
Python
ngardiner7/google-trends
/gsheets.py
UTF-8
827
2.75
3
[]
no_license
import pygsheets # should replace this with sheet_id cause errors def write_df_to_sheet(sheet_name, df): # ensure that our dataframe isn't larger than the google sheets max (2,000,000). if df.shape[0] * df.shape[1] > 18000000: print "Number of records is too large for Google Sheets to handle. Please r...
true
fdaa64a38d765b6ef241b86680345591f22fd1f5
Python
sujayshah/BEEP_BOOP
/MP4/pong.py
UTF-8
8,442
3.046875
3
[]
no_license
import random from state import GameState as gameState import math #global variables # q_table = [list([0, 0, 0])] * 10369 # N= [list([0, 0, 0])] * 10369 q_table = {} N = {} epsilon = 0.05 # This function udpates the ball position and checks the bounce/termination conditions. Returns a state def play_game(state, act...
true
0538b71f5181ff836ece28d065ad68f815bf1ae4
Python
kshithijiyer/widgetastic.patternfly4
/testing/test_nav.py
UTF-8
1,518
2.859375
3
[ "Apache-2.0" ]
permissive
import pytest from widgetastic_patternfly4 import Navigation NAVS = [ ( ".//div[@id='ws-react-c-nav-default']/nav", ["Link 1", "Link 2", "Link 3", "Link 4"], ["Link 1"], ), ( ".//div[@id='ws-react-c-nav-expandable']/nav", { "Link 1": ["Subnav Link 1", "...
true
68a47f2e8b93d3f417598bc97c9318cc7c2257c2
Python
prash94/HeartDiseasePrediction
/hdprediction/preprocessors.py
UTF-8
6,097
2.9375
3
[]
no_license
#!/usr/bin/env python # coding: utf-8 # In[4]: import numpy as np import pandas as pd from sklearn.base import BaseEstimator, TransformerMixin # from lrmodel.processing.errors import InvalidModelInputError # In[ ]: # catagorical variables are imputed by labling them as 'Missing' class ImputeCategoricalVariables...
true
dc22c331d8d21f5569cde1626184dd5af18b524e
Python
BiYuqi/daily-practice
/Python/Python-Base-Practice/functional-programming/higher-order-functions/map-reduce.py
UTF-8
2,376
4.3125
4
[]
no_license
# coding=UTF-8 """ Python内建了map()和reduce()函数。 map()函数接收两个参数,一个是函数,一个是Iterable map将传入的函数依次作用到序列的每个元素,并把结果作为新的Iterator返回。 """ """ 举例说明,比如我们有一个函数f(x)=x2, 要把这个函数作用在一个list [1, 2, 3, 4, 5, 6, 7, 8, 9]上,就可以用map()实现如下: """ L = [1, 2, 3, 4, 5, 6, 7, 8, 9] def f(x): return x * x res = map(f, L) # map()传入的第一个参数是f,即函数对象...
true
66b84e7f3256fb854a7d9754bc31915e448595a6
Python
kurry3/meme_generator
/src/QuoteEngine/PDFIngestor.py
UTF-8
2,110
3.21875
3
[]
no_license
"""PDF Ingestor. This script requires that the 'typing, 'os', and 'subprocess' libraries be installed within the Python environment this script is being run in. """ import os import subprocess import random from typing import List from .IngestorInterface import IngestorInterface from .QuoteModel import Qu...
true
a7699380d4dad7a77b01909c32569a6bb4c7e157
Python
takeller/Code-Challenges
/equal_sides_of_an_array/test_equal_sides.py
UTF-8
696
2.765625
3
[]
no_license
import equal_sides def test_how_many_words(): assert equal_sides.find_even_index([1,2,3,4,3,2,1]) == 3 assert equal_sides.find_even_index([1,100,50,-51,1,1]) == 1 assert equal_sides.find_even_index([1,2,3,4,5,6]) == -1 assert equal_sides.find_even_index([20,10,30,10,10,15,35]) == 3 assert equal_s...
true
7ac0e7b957629308158b5199ba898d8122f47b90
Python
sejaldua/advent-of-code-2020
/day05/binary-boarding.py
UTF-8
1,024
3.390625
3
[]
no_license
def get_boarding_passes(): with open("input.txt", 'r') as file: return file.read().split('\n')[:-1] def binary_search(s, lo, hi): for char in s: if char == "F" or char == "L": hi -= (hi - lo) // 2 + 1 else: lo += (hi - lo) // 2 + 1 return lo if char == "...
true
af37135f6a6498ea9788e0c8cff5c2ccc479dde3
Python
simonwrafter/FMN050
/ex4/task2.py
UTF-8
395
2.71875
3
[]
no_license
# -*- coding: utf-8 -*- """ Created on Tue Apr 28 09:59:34 2015 @author: simon """ from scipy import * from pylab import * from task1 import * y = [1, 3, -2, 0, 1, 0, 1] x = [0, 1, 2, 3, 4, 5, 6] coeff = cubspline(x,y) yval = [] xplot = array(linspace(0, x[-1], 200)) for i in range(len(xplot)): yval.append(cu...
true
bf8f5de115dda18feabb9b149035746d4c7457d3
Python
1203zy/tmcrtrl
/Flask/script/rabbitopt.py
UTF-8
1,159
2.578125
3
[]
no_license
#!/usr/bin/env python # -*- coding: utf-8 -*- # auth : pangguoping import sys sys.path.append(r'../') import pika import lib.database # ########################## 消费者 ########################## credentials = pika.PlainCredentials('tmp', 'tmp') # 连接到rabbitmq服务器 connection = pika.BlockingConnection(pika.ConnectionParame...
true
1bfec1f1ad8877b311745b683449672d211e9273
Python
sheilapaiva/LabProg1
/Unidade8/complemento_excesso_original/complemento_excesso_original.py
UTF-8
1,254
3.40625
3
[]
no_license
#coding: utf-8 #UFCG - Ciência da Computação #Programação I e laboratório de Programação I #Aluna: Sheila Maria Mendes Paiva #Unidade: 8 Questão: Complemento Excesso Original #coding: utf-8 #UFCG - Ciência da Computação #Programação I e laboratório de Programação I #Aluna: Sheila Maria Mendes Paiva #Unidade: 8 Q...
true
e705506b402547ce221e913b735e1f3c61c34c29
Python
Shwebs/Python-practice
/BasicConcepts/3.strings/type-casting3.py
UTF-8
147
3.34375
3
[]
no_license
spam = "7" spam = spam + "0" #70 eggs = int(spam) + 3 # 70 +3 print(float(eggs)) # 73.0 x=7 print (str(x)) #O/P:- 7 ||| It's not SEVEN
true
61cf094d69892d09156ac6d28119d6fe8e1a3f10
Python
LuisAlvarez98/MachineLearning-course
/01-linear-regression/LinearRegressor.py
UTF-8
4,009
3.625
4
[]
no_license
""" Modified by: - Jesús Omar Cuenca Espino A01378844 - Luis Felipe Alvarez Sanchez A01194173 - Juan José González Andrews A01194101 - Rodrigo Montemayor Faudoa A00821976 Date: 03/09/2021 """ import numpy as np from progressbar import progressbar, streams # Setup Progressbar wrapper function streams.wrap_stder...
true
b409a263e349ddad66cbd44c6a267045f4f327b0
Python
Olionheart/SIFAS-Tier-and-Chill
/parking_calculator.py
UTF-8
5,117
2.734375
3
[]
no_license
import numpy as np import pandas as pd """ Copyright <2020> <Olionheart> Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" A...
true
17446457f8867769dc49bc23e4483716b5387be5
Python
D3coy/Python
/algos_structures/binary_tree_ya.py
UTF-8
2,742
3.484375
3
[]
no_license
# while flooding !next free! node in existing tree-structure def newnode(memstruct): memory, firstfree = memstruct # get next empty node pointer from fillable and make it next empty memstruct[1] = memory[firstfree][1] return firstfree # while releasing node, it shifts to first index and becomes th...
true
65887fd941b6b46332fed42aed93fa35f0f30eeb
Python
Humaira-Shah/ECE499
/asst2/AX12funcADJUSTED.py
UTF-8
2,519
3.359375
3
[]
no_license
# FUNCTION getChecksum(buff) # Takes packet as a list for its parameter. # Packet must include at least 6 elements in order to have checksum calculated # last element of packet must be the checksum set to zero, function will return # packet with correct checksum value. def getChecksum(buff): n = len(buff) if(n >= ...
true