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
f136c002ca7bb3145d1905e2f647e3a724ea3750
Python
JJ/phageParser
/acc_and_filter.py
UTF-8
1,687
2.71875
3
[ "MIT" ]
permissive
#!/usr/bin/env python """Fetch GenBank entries for given accessions. Adapted from https://www.biostars.org/p/66921/ USAGE: cat <file> | python acc2gb.py <email> > <output> or python acc2gb.py <email> <file> (this is easier for debugging) where: <file> is the name of a file containing accession numbers to downloa...
true
88cf39f59ebefbefa15fef06856e6ba159008860
Python
SergioPeterson/dsna
/binary-tree/__init__.py
UTF-8
3,049
3.421875
3
[ "MIT" ]
permissive
import importlib import sys sys.path.append("./") queue_list = importlib.import_module("queue-list") class Node(object): def __init__(self, value): self.value = value self.left = None self.right = None class BinaryTree(object): def __init__(self, root, traversal_style="level_order"...
true
ef850077b02d11226e9fed6be0b4647c2a7b3002
Python
vitortomic/python-xlsx-compare
/compare.py
UTF-8
1,971
3.21875
3
[]
no_license
import os from openpyxl import load_workbook from openpyxl.styles import PatternFill header_row = 6 red_fill = PatternFill(start_color='FFFF0000', end_color='FFFF0000', fill_type='solid') first_dir = list(filter(lambda filename: filename.endswith('.xlsx'), os.listdir('./first'))...
true
a682644e7e09aadde4f8c48b1b12d9ba9ec03eaf
Python
xliu117/ISIC2018-Challenge
/PatchPreprocessing/data_preprocessing.py
UTF-8
1,793
2.546875
3
[]
no_license
import os import cv2 from utils import PaddingCrop from tqdm import tqdm def main(): image_path = '/scratch/group/xqian-group/ISIC2018/ISIC2018_Task1-2_Training_Input/' mask_path = '/scratch/group/xqian-group/ISIC2018/ISIC2018_Task1_Training_GroundTruth/' image_paddingcrop_path = '/scratch/group/xqian-...
true
e0f105e565ae7dc0f6735e5030a1158ddbab24c3
Python
sepidhk/EDA-WiDS_Datathon_2021
/utils.py
UTF-8
8,603
2.8125
3
[]
no_license
import math import warnings import numpy as np import pandas as pd import seaborn as sns import matplotlib.pyplot as plt from matplotlib.ticker import FuncFormatter def bar_plot(df, x, xlabels, order, title='', fontsize='large', palette='PuBu_r',height=6, alpha=1): df_aux = df[x].value_counts(normalize=True) d...
true
e99550b712df67a7be307ee2da5ce290db4a5ac3
Python
suhasreddy/Data-Analysis-and-Testing
/analyze_tweets.py
UTF-8
3,553
3.171875
3
[]
no_license
from textblob import TextBlob import traceback import sys # IMPORTANT ! # Have ony the number of tweets in your tweets.csv file that you can classify at this moment. Like 30, 50 or 100 # Have new set of tweets each time in your tweets.csv # Record accuracy displayed at the end also record the number of tweets. # Your...
true
6811b55f3805f76e9ad2a366755499478eee81a8
Python
adhidharmawan/Python-Projects-Protek
/praktikum 6/praktikum 4 - no 1.py
UTF-8
85
2.890625
3
[]
no_license
def jumlah(a, b): print (hasil) a = 10 b = 20 hasil = a + b jumlah(a, b)
true
6040d02eeb817d8dce66c1dc393df2ce3ce42b9d
Python
hanu1234/Daily_Update
/TIMING_MODULE/utc_time_ex1.py
UTF-8
810
3.53125
4
[]
no_license
import datetime from time import sleep utc_time = datetime.datetime.utcnow() print(utc_time) # Get UTC TIME After 15 Minutes utc_time = utc_time + datetime.timedelta(minutes=10) print(utc_time) hours = utc_time.strftime("%H") minutes = utc_time.strftime("%M") print(hours, minutes) utc_time = utc_time + datetime.timed...
true
433039f3a1316a3a2536ba4b92dec86e29994a89
Python
boblsturm/folkplagiarism
/ONeills_blogpost7.py
UTF-8
10,693
2.65625
3
[]
no_license
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Mar 9 12:43:17 2020 This code contributed to the blog post: https://highnoongmt.wordpress.com/2020/03/31/an-analysis-of-the-365-double-jigs-in-oneills-pt-7/ @author: bobs """ import numpy as np import matplotlib.pyplot as plt import textdistan...
true
59c4876ef307c421d85d481d449a6ebecad19489
Python
acdlee/Interview-Prep
/ctci/chapters/chpt3/3_1.py
UTF-8
535
3.75
4
[]
no_license
# To implement three stacks with one array, we could have indexing #such that we separate the array into three parts. We maintain #a starting and ending index for each stack. The 'ending index' would #be the location where we add and remove items from each stack. #whenever the stacks are about to overlap, we would rea...
true
890c186a5f0dc30423f2c23dd73ece31c14ee06b
Python
JoseJunior23/Iniciando-Python
/treinando_pythonLista1/ex 014.py
UTF-8
1,120
3.734375
4
[]
no_license
''' João Papo-de-Pescador, homem de bem, comprou um microcomputador para controlar o rendimento diário de seu trabalho. Toda vez que ele traz um peso de peixes maior que o estabelecido pelo regulamento de pesca do estado de São Paulo (50 quilos) deve pagar uma multa de R$ 4,00 por quilo excedente. João precisa que você...
true
497ca7bae9a380d8f135bc96d13dad34ffcd19dd
Python
datacentricorg/datacentric
/py/src/datacentric/types/time/local_minute.py
UTF-8
1,292
3.453125
3
[ "Apache-2.0" ]
permissive
from __future__ import annotations import datetime as dt class LocalMinute: def __init__(self, hour: int, minute: int): hour: int minute: int if hour < 0 or hour > 23: raise AttributeError(f'Hour {hour} is not between 0 and 23.') if minute < 0 or minute > 59: ...
true
241722dfcd643479f0983c5e9f06594158c70ea2
Python
milindgaikwad13/AWS-BigData
/PythonBootcamp/Lessons/13_Advanced_Python_Modules/Collections/namedTupleCol.py
UTF-8
166
3.15625
3
[]
no_license
from collections import namedtuple t= (1,2,4,4) print(t) dog =namedtuple('Dog','age breed name') sam = dog(age=2,breed='gratedane', name='scooby') sam.breed
true
44ace368d0914582a2b2ad757418c53a372d19fc
Python
murilobsd/cartaohelija
/cartao/utils.py
UTF-8
248
3.078125
3
[ "BSD-3-Clause" ]
permissive
# coding=utf-8 import os def check_folder(folder): """ checa se a pasta existe caso contrario cria """ if os.path.exists(folder) and os.path.isdir(folder): return folder else: os.makedir(folder) return folder
true
ba8f1c003a75e30d53b3090a31d2568eba4739b7
Python
AnitaGrimm/python
/homework 1/4.py
UTF-8
862
3.390625
3
[]
no_license
import math, cmath a = int(input("a = ")) b = int(input("b = ")) c = int(input("c = ")) if a==0: print("a=0 => уравнение не является квадратным...\nРешение линейного уравнения:") if b==0: print("решений нет") else: if c==0: print("x=0") else: x=-c/b ...
true
72a8fc57de6f33d47ee4b6853de035703713959b
Python
qoin-open-source/samen-doen-cc3
/cc3/accounts/templatetags/map_tags.py
UTF-8
3,358
2.703125
3
[]
no_license
from django import template from django.utils.http import urlencode register = template.Library() def var(variable, ctx): if variable: try: return template.Variable(variable).resolve(ctx) except template.VariableDoesNotExist: return None else: return None def...
true
8e98e6d1171b0712171b434e2b8b2df62e460f59
Python
Shashankramesh28/heatmap-generator-for-air-pollution
/waqi_schema_helper.py
UTF-8
4,730
2.5625
3
[]
no_license
from shared_utils import * class WaqiSchemaHelper: @staticmethod def parse_waqi_json_packet_to_csv_row(packet): if not packet.get('data'): return None data = packet['data'] if not type(data) is dict: return None # general info aqi = '' ...
true
9a372a69b1a03ba92a8042485940fe6ef3742994
Python
Yobretaw/AlgorithmProblems
/EPI/Python/Searching/12_16_find_element_that_appears_only_once.py
UTF-8
1,238
3.6875
4
[]
no_license
import sys import os import math import random """ Given an integer array, in which each entry but one appears in triplicate, with the remaining element appearing once, find the element appearing once. For example, if the array is [2, 4, 2, 5, 2, 5, 5], you should return 4 """ def find_element_appear_once(...
true
a0881c92a84937a0fdd48525f8d6c99d23a2f8b7
Python
frongk/sa-air
/weather_station_grid.py
UTF-8
1,537
2.5625
3
[ "MIT" ]
permissive
# extract unique weather station coordinates by Site ID # these will be loaded into triangulation mapping script # *triangulate_dict.py* which will be used to ultimately # interpolate values for where the stations are import pandas import plotly import plotly.graph_objs as go from SECRETS import mapbox_token DATA_F...
true
783876b222126f5fcd27eb98fecf437a64b67067
Python
yuly3/atcoder
/ABC/ABC136/C.py
UTF-8
455
3.4375
3
[]
no_license
n = int(input()) numbers = list(map(int, input().split())) def checkCondition(): for i in range(n-1): if numbers[i] > numbers[i+1]: if numbers[i] - numbers[i+1] > 1: return False for i in range(-1, -n, -1): sub = numbers[i-1] - numbers[i] if sub == 1: numbers[i-1] -= 1 elif sub ...
true
a7bd922b9ce8a3ee1cce4c5ef0c70dde7cbc5e66
Python
Cmheidelberg/wcm
/src/wcm/_makeyaml.py
UTF-8
3,880
2.578125
3
[ "Apache-2.0" ]
permissive
import logging import json import wings import os import click import yaml from wcm import _schema, _utils from contextlib import contextmanager logger = logging.getLogger() schemaDefinitions = _schema.get_schema()["definitions"] error_log = "" def make_yaml(download_path=None): # sets path, this determines whe...
true
c11d6ed94bead1b943fa84d521553f52718caa9e
Python
fagan2888/pyina
/pyina/__main__.py
UTF-8
4,115
2.609375
3
[ "BSD-3-Clause" ]
permissive
#!/usr/bin/env python # # Author: Mike McKerns (mmckerns @caltech and @uqfoundation) # Copyright (c) 1997-2016 California Institute of Technology. # Copyright (c) 2016-2020 The Uncertainty Quantification Foundation. # License: 3-clause BSD. The full license text is available at: # - https://github.com/uqfoundation/py...
true
c4cf9117d7ee122a3e598f74108837110363d1ac
Python
AdamZhouSE/pythonHomework
/Code/CodeRecords/2944/60688/260351.py
UTF-8
402
3.453125
3
[]
no_license
stringrow = list(input()); stackf = []; result=True; for i in range(len(stringrow)): if stringrow[i] == "(": stackf.append("("); continue elif stringrow[i]==")": if len(stackf)!=0: stackf.pop(); continue; else: result=False break ...
true
bae4ce5c59d2d9c0d9d2d6bb6b6b6196313f7d85
Python
jmarin/hmda-fan
/hmda_fips_process/hmda_county.py
UTF-8
2,467
2.578125
3
[ "CC0-1.0" ]
permissive
#mike byrne #consumer finance protection bureau #may 2014 #update the state field on a hmda public data row #processing step towards geospatial analysis import os import string import psycopg2 import time import datetime from datetime import date import json now = time.localtime(time.time()) print " start time: ...
true
54ff0d688be9f2fb29f2648020fcaddd74f54f6e
Python
shrutiyer/warmup_project_2017
/warmup/src/person_following.py
UTF-8
5,839
2.578125
3
[]
no_license
#!/usr/bin/env python # IMPORTS ====================================================================== import math import rospy from geometry_msgs.msg import Twist from sensor_msgs.msg import LaserScan from visualization_msgs.msg import Marker from neato_node.msg import Bump # CLASSES =============================...
true
521b76dfee8cb6a66a4d8719c4752a4dc8554853
Python
aishwaryasarath/Coursera
/1_py_intro/tuple-filenames.py
UTF-8
476
3
3
[]
no_license
filenames = ["program.c", "stdio.hpp", "sample.hpp", "a.out", "math.hpp", "hpp.out"] result = [] for filename in filenames: if filename.endswith(".hpp"): result.append("({}, {})".format(filename, filename[:-2])) else: result.append("({}, {})".format(filename, filename)) print(result) # Shoul...
true
170a1f346984f09b2565219091b651f995ddf4b8
Python
GHshangmu/Python_case
/python_code/plane_war_v2.0/shump_1/lesson_1.py
UTF-8
782
3.296875
3
[]
no_license
import pygame from pygame.locals import * # 定义屏幕宽、高 WIDTH = 480 HEIGHT = 600 # 初始化 pygame.init() # 创建屏幕 screen = pygame.display.set_mode((WIDTH, HEIGHT)) # 创建Surface surf_plane = pygame.Surface((50, 50)) # 设置surf_plane的背景颜色 surf_plane.fill((0, 255, 0)) running = True while running: for event in pygame.event.g...
true
1980cb6be50a2d5f3268b65e71b60de1534655eb
Python
fuleying/cvbase
/cvbase/tests/test_visualize.py
UTF-8
585
2.640625
3
[]
no_license
from os import path from cvbase import draw_bboxes, read_labels def test_read_labels(): label_names = ['a', 'b', 'c'] assert read_labels(label_names) == label_names voc_labels = [ 'aeroplane', 'bicycle', 'bird', 'boat', 'bottle', 'bus', 'car', 'cat', 'chair', 'cow', 'diningtable', 'dog', '...
true
ae69b184de618a716d77c6a9e95513a10b6b0c4d
Python
mswedrowski/WZSI_NIM
/logic/Board/Board.py
UTF-8
620
3.578125
4
[ "MIT" ]
permissive
from .Row import Row class Board: def __init__(self, num_of_rows): self.rows = [Row(num_of_matches) for num_of_matches in range(1, num_of_rows+1)] def display_board(self): for index, row in enumerate(self.rows): print("RowNum:" + str(index) + " " + row.get_row_as_string()) de...
true
79eb5f5356430c8b2fb19a9db5119b08547d6668
Python
brightyoun/Complement-Cross-Entropy
/loader.py
UTF-8
5,992
2.65625
3
[]
no_license
import os import torch from torchvision import datasets import torchvision.transforms as transforms class Loader: @staticmethod def __get_transform(image_height, image_width, data_augmentation=False, mean=None, std=None, for_normalize=False): # for train if data_augment...
true
783b3b5c950921694e6ae20f12368ed887fb9f5d
Python
DaltonBorges/Curso-de-Python
/pythonDesafios/des073.py
UTF-8
1,224
4.1875
4
[]
no_license
# Crie uma tupla com os 20 primeiros colocados da Tabela do Campeonato Brasileiro de Futebol, na ordem de colocação. Depois mostre: #* A) Apenas os 5 primeiros colocados. #* B) Os últimos 4 colocados da tabela. #* C) Uma lista com os times em ordem alfabética. #* D) Em que posição na tabela está o time da Chapecoense. ...
true
8f744581dc67a8616cc91beaa61080c69bd6f406
Python
Giangblackk/hanoi_road_map_analysis
/vietnam-highway/from_vn_highway_to_graph.py
UTF-8
6,759
2.5625
3
[ "Apache-2.0" ]
permissive
# -*- coding: utf-8 -*- """ Spyder Editor This is a temporary script file. """ from osgeo import ogr, osr import networkx as nx import numpy as np #calculate length of StringLine def calculateGeometryLength(pointList, sourceSRS, destSRS): line = ogr.Geometry(ogr.wkbLineString) transform = osr.CoordinateTrans...
true
57c08ba7c888b9d4feba9d75ffbd3c116ffb4059
Python
nashid/GNNSurvey
/Implementation Codes/Program Synthesis/AutoPandas/autopandas_v2/generators/dsl/values.py
UTF-8
2,216
2.53125
3
[ "BSD-3-Clause" ]
permissive
from typing import Any from autopandas_v2.iospecs import SearchSpec class Value: def __init__(self, val: Any): self.val = val class Default(Value): def __eq__(self, o: object) -> bool: try: if not isinstance(o, Value): return self.val == o if isinsta...
true
61915f9da33d59726ef286be2faa63cb244a2d2d
Python
terrifyzhao/educative
/2_two_pointers/1_pair_with_targetsum.py
UTF-8
1,239
4
4
[]
no_license
# 给定一个排好序数组,找到相加等于sum的数的下标 def pair_with_targetsum(arr, target_sum): arr_len = len(arr) start = 0 end = arr_len - 1 while start < end: if arr[start] + arr[end] > target_sum: end -= 1 elif arr[start] + arr[end] < target_sum: start += 1 elif arr[start] + a...
true
dafbb0bcdbf79b194c403c2076d5be951f94667c
Python
leonardocouy/analysis_nosql
/sentimentanalysis.py
UTF-8
1,691
2.546875
3
[]
no_license
import re import tweepy from pymongo import MongoClient from textblob import TextBlob from decouple import config from tweepy import Stream from tweepy import StreamListener from tweepy.streaming import json CONSUMER_KEY = config('CONSUMER_KEY') CONSUMER_SECRET = config('CONSUMER_SECRET') ACCESS_TOKEN = config('ACCESS...
true
be9bd6cdbaff0aa11ca61d4c977b6c5239cd0ea9
Python
joongchan1/Refactoring__pycon-kr-2018
/src/tdd/test_main.py
UTF-8
668
3.3125
3
[]
no_license
import unittest from main import calc class TestTdd(unittest.TestCase): def test_calc(self): given = (1, 2, 3, 4, 5) target = calc(given) expected = 15 self.assertEqual(target, expected) def test_calc_with_various_odd(self): given = (1, 3, 5, 6, 7) target = ca...
true
0e3398cdb8c807ca926ae0925d86c842651cb11d
Python
cheers32/tradepartner
/test/DataProvider.py
UTF-8
725
2.890625
3
[]
no_license
import datetime from enum import Enum from alpha_vantage.timeseries import TimeSeries API_URL = "https://www.alphavantage.co/query?" API_KEY = "4BYXFB9D3TYUYNN5" class ApiFunc(Enum): daily = 1 dailyAdjusted = 2 intraday = 3 def getStock(symbol, apiFunc, outputSize="compact"): ts = TimeSeries(key=AP...
true
638b48bce307815ec04c770d81c5f1093f4d7a5b
Python
brianchiang-tw/CodingInterviews
/10-1_Fibonacci Series/by_iteration.py
UTF-8
1,099
3.6875
4
[ "MIT" ]
permissive
class Solution: def fib(self, n: int) -> int: if n <= 1: return n f_n_2, f_n_1 = 0, 1 f_n = -1 for i in range(2, n+1): # compute f(n) = f(n-2) + f(n-1) f_n = f_n_2 + f_n_1 # update f(n-2) and f(n-1) as f(n-1...
true
27cfb44f5a0daa34cb0c15beae81406191f01a21
Python
matheuscburger/DengueAnalysis
/src/microarrayAnalysis/enrichr.py
UTF-8
2,393
2.609375
3
[]
no_license
#!/usr/bin/env python3 # vim:fileencoding=utf8 """Enrichr Usage: enrichr.py --input=<file> --output=<file> (--gs=<geneset>...) enrichr.py (-h | --help) enrichr.py --version Options: -h --help Show this screen. --version Show version. --output=<file> output file ...
true
66ef42f5d6416170c63b9bbe2a25e0980ad4e013
Python
paulseghers/fractalmethods
/code/timing_bc.py
UTF-8
1,567
2.734375
3
[]
no_license
# -*- coding: utf-8 -*- """ Created on Sat Apr 11 22:42:14 2020 @author: Zpaffled """ from dim import bcnt from fracgen import sierpinsky from time import time import numpy as np import matplotlib.pyplot as ptl def intersect(seg,x,y): # in sierpinsk x1!=x2 (x1,y1),(x2,y2) = seg if min...
true
84058d02def96301affc42b8196f5cfc60a0f653
Python
princepurohit153/A-byte-of-python
/operators.py
UTF-8
570
3.859375
4
[]
no_license
''' This program demonstrates simple operators and related concepts @author - Nitinkumar Gove @Verstion - V1.0 / 23 Oct 2016 ''' __version__ = 1.0 st = 'no ' # + operator x = 10 y = 20 print 'sum:',x + y print 'first and ' + 'second' # if no first operand is provided to - operator, it is 0 by default b = 50 print...
true
3da5ffd37599c977f0ba0d09237bc0bbd853af75
Python
CiesliixW/Codecool_W1D2
/list_min_etc_MT.py
UTF-8
2,134
4.125
4
[]
no_license
# # # # # # # # # # # # # # # # :) # # # # # # # # # # # # # # # # list_to_find_min = [9,6,7,4,9,1,6,7,8] list_to_find_min_2 = [12,6,7,4,9,1,-6,7,8,1,6,0,2,5,3] def my_min(my_list): current_min = my_list[0] for elem in my_list: if elem < current_min: current_min = e...
true
fe4f276e8db18c34b4f1450a3fc033cfc994005e
Python
Rajagopalan-Ranganathan/IOT-Gateway
/app/camera.py
UTF-8
248
2.765625
3
[]
no_license
import json class Camera(): def __init__(self, ipaddress, name, id): self.ipaddress = ipaddress self.name = name self.id = id def __str__(self): return self.id + ":" + self.ipaddres + ":" + self.name
true
ef886c449b4b9cc81d31851acc80d2697a3a06c4
Python
nickstellato/draw_shapes
/draw_shapes.py
UTF-8
625
3.875
4
[ "MIT" ]
permissive
import turtle def draw_shapes(): window = turtle.Screen() window.bgcolor("red") brad = turtle.Turtle() brad.shape("arrow") brad.color("white") brad.speed(6) i = 0 while (i < 4): brad.forward(100) brad.right(90) i += 1 angie = turtle.Turtle() angie.shap...
true
bced32c5e761d91a289b77abea87fa86ab53ebaf
Python
jeffwen/Kaggle
/Whats Cooking/cooking.py
UTF-8
12,289
2.640625
3
[]
no_license
path = '/Users/Jeffwen/Documents/Python/kaggle/Whats Cooking' import json import xgboost as xgb import pandas as pd import re import numpy as np import scipy from nltk.corpus import wordnet as wn from nltk.tag import pos_tag from progressbar import ProgressBar from sklearn.feature_extraction.text import TfidfVectorize...
true
1ef5fcc6e466c421c8942139fbd7e4543f15a672
Python
rmcommand/movie-trailer-website
/movie/entertainment_center.py
UTF-8
4,161
2.90625
3
[]
no_license
__author__ = 'rm00' import fresh_tomatoes import rmedia #Movie title, storyline, poster and youtube file information that is exported to the webpage the_matrix = rmedia.Movie("The Matrix", ("Depicts a dystopian future in which reality perceived by humans is in the Matrix"), "http://ia.me...
true
a63cffe1eb94b9427268c4599beebe67701d79b9
Python
christopherdavideh/curso-profesional-python
/numero_primo.py
UTF-8
645
3.75
4
[]
no_license
def es_primo(n: int) -> bool: if n < 2: return False else: divisors = [i for i in range(2, n) if n % i == 0] return len(divisors) == 0 def run(): print(f'El número 3 es primo: {es_primo(3)}') print(f'El número 4 es primo: {es_primo(4)}') print(f'El número 5 es primo: {es_primo(5)}') print(f'El...
true
8c37d6449787de47e6b1540284f729b3aaf93ba2
Python
Joostluijben/Python_programming
/Les4/pere_3.41.py
UTF-8
171
3.109375
3
[]
no_license
def hit(xC, yC, radC, xP, yP): if (xC+radC >= xP or xP <= xC+radC )and (yC+radC>=yP or yP <=yC+radC): print(True) else: print(False) hit(0,0,5,5,5)
true
a2eb594d7377318753b9c792ca9e0d553ae8ed4c
Python
DeMarcoHeath/avito_grabber
/web_page_grabber.py
UTF-8
8,249
2.625
3
[]
no_license
# -*- coding: utf-8 -*- from bs4 import BeautifulSoup import requests import urllib import json from datetime import * from db_provider import * import response_fields as rf import merger URL = 'https://www.avito.ru/sankt-peterburg/kvartiry/sdam/na_dlitelnyy_srok?pmax=23000&pmin=0' DEBUG = False URL_WITH_PAGE = '/san...
true
7a5b69a709abbc394dfd7db67e1b9b1c876aba26
Python
miclaraia/swap-2
/swap/utils/collection.py
UTF-8
1,447
3.265625
3
[]
no_license
class Collection: def __init__(self, config, items=None): self.config = config if items is None: items = {} if type(items) is list: items = {item.id: item for item in items} self.items = items def add(self, item): self.items[item.id] = item ...
true
bb89ffb602ce750386a53f73befae30acc40e758
Python
Alancow/AE402_Alanco
/human.py
UTF-8
877
3.625
4
[]
no_license
class Human(): def __init__(self,name,weight,height): self.name = name self.weight = weight self.height = height def bmi(self): return self.weight/((self.height/100)**2) class Woman(Human): def __init__(self, name,weight,height,bust,waist,hip): su...
true
b326e59dab57bf8debb623b8891dc864d0fb3008
Python
Alanwong2000321/py
/算法/岛屿数量.py
UTF-8
10,348
3.65625
4
[]
no_license
class Solution: def numIslands(self, grid: List[List[str]]) -> int: def sink(i, j): if 0 <= i < len(grid) and 0 <= j < len(grid[i]) and int(grid[i][j]): grid[i][j] = '0' for i, j in zip((i, i+1, i, i-1), (j+1, j, j-1, j)): sink(i, j) return 1 ...
true
3e10c6f2eb309a6c9e0b5a0ac6e4e654f922e9a1
Python
mkrdiop/scriptPY
/getDeputy.py
UTF-8
1,831
2.75
3
[]
no_license
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Jun 18 16:15:28 2019 @author: makhtardiop """ from selenium import webdriver from selenium.webdriver.common.keys import Keys import pandas as pd import time data = pd.read_csv('liste-deputes.csv') rich_data = pd.DataFrame(index=range(0,1800), columns ...
true
a469f25453e6ce8cc7b4574e89659b2516490136
Python
jaymit31/Mathematics-for-Machine-Learning
/Course 3: PCA/week1/Mean Covariance of a data set and effect of a linear transformation.py
UTF-8
10,624
3.84375
4
[]
no_license
Mean/Covariance of a data set and effect of a linear transformation We are going to investigate how the mean and (co)variance of a dataset changes when we apply affine transformation to the dataset. Learning objectives Get Farmiliar with basic programming using Python and Numpy/Scipy. Learn to appreciate implemen...
true
67985b15c117d7455493c75f963cd449f95e7cff
Python
dr-dos-ok/Code_Jam_Webscraper
/solutions_python/Problem_117/1507.py
UTF-8
1,274
3.15625
3
[]
no_license
#!/usr/bin/env python import sys class Lawn: n = 0 m = 0 field = [] def __init__(self, n, m, data): self.n = n self.m = m self.field = [[0 for j in range(self.m)] for i in range(self.n)] for i in range(self.n): for j in range(self.m): self.fie...
true
7bc6ffa4aa73a637a4a23babb730ee44b8183084
Python
ayushaggar/fraud_transaction_detection
/analyse.py
UTF-8
14,176
2.5625
3
[]
no_license
# Load libraries import psycopg2 as pg import pandas as pd import matplotlib.pyplot as plt import datetime import numpy as np from sklearn.model_selection import train_test_split from sklearn.preprocessing import StandardScaler, OneHotEncoder from sklearn.compose import make_column_transformer from sklearn.impute impor...
true
ac9924a62d79a8b0fab46da1746a882c23fa18af
Python
nrai/hiver-interview
/hiver/hiver/apps/base/middlewares/request.py
UTF-8
608
2.71875
3
[]
no_license
# coding=utf-8 """ Response Middleware """ import json import logging from django.http import HttpResponse logger = logging.getLogger(__name__) class RequestMiddleWare(object): """ Request Middleware Class """ def __init__(self, get_response): self.get_response = get_response def __cal...
true
8c521d579ada899205c1ab12bb29a9e0107550b0
Python
Feenix33/PyGameG
/Wang/create.py
UTF-8
4,654
3.234375
3
[]
no_license
""" create.py Create the basic 2-edge tileset """ import random def create2edge(tiledb, tile2db, ndb, wdb, sdb, edb): # build the nwse set by counting to 16 for n in range(16): ndb[n%2].append(n) wdb[(n//2)%2].append(n) sdb[(n//4)%2].append(n) edb[(n//8)%2].append(n) ti...
true
56acc3a8f59ca060718265f82f437570f379ad41
Python
Raj2503/Open-CV-classes
/chapter6.py
UTF-8
2,132
3.25
3
[]
no_license
# JOINING IMAGES import cv2 import numpy as np def stackImages(scale,imgArray): rows = len(imgArray) cols = len(imgArray[0]) rowsAvailable = isinstance(imgArray[0], list) width = imgArray[0][0].shape[1] height = imgArray[0][0].shape[0] if rowsAvailable: for x in range ( 0, ro...
true
1873df5e3f5157c1d7489e817c3ac4a80273f1f2
Python
smielqf/DQN_CartPole
/main.py
UTF-8
12,531
2.578125
3
[]
no_license
import torch import torch.nn as nn import torch.nn.functional as F import gym import numpy as np import random import matplotlib.pyplot as plt import time from collections import namedtuple random.seed(0) np.random.seed(0) torch.manual_seed(0) Transition = namedtuple('Transition', 'state, action, next_state, reward')...
true
5bd7be6493b8b1322e2e8ad570399f928bed2c34
Python
modengdai/learning_notes
/fact_digui.py
UTF-8
109
2.84375
3
[]
no_license
def jiecheng(n): a=n*jiecheng(n-1) return a n=eval(input()) while n>0: jiecheng(n) print(a)
true
541e9cedcd8a69b4c222bea20cf45e122d162531
Python
xiangzaizi/Knowledge
/base_knowledge/3.ajax_request.py
UTF-8
823
2.671875
3
[ "MIT" ]
permissive
#!/usr/bin/env python # -*- coding:utf-8 -*- import urllib import urllib2 def send_request(): # 发送请求的url是通过抓包找到的 base_url = "https://movie.douban.com/j/chart/top_list?" # 查询字符串参数,也是通过抓包找到的 query_data = {"type" : "24", "interval_id" : "100:90", "action" : "", "start" : "0", ...
true
3e0cbbfe917fa357c4a3e51d0fce1e318efbb4fc
Python
13leaf/exercises
/leetcode/python/easy/path_sum.py
UTF-8
758
3.09375
3
[]
no_license
from __init__ import * #path sum #https://leetcode.com/problems/path-sum/ class Solution: def _hasPathSum(self,node,sum,expect): sum = sum + node.val if node.left is None and node.right is None: return sum == expect if node.left is not None and node.right is not None: ...
true
2c285bf1f41921649e4df63585eda2a54665cf8d
Python
ushanemani/AWS-Services-Python-Automation
/python-scripts/create_glue_crawlers.py
UTF-8
1,655
2.65625
3
[]
no_license
import json import sys import boto3 env_name = sys.argv[1] aws_account_no = sys.argv[2] file_name='jsons/glue_create_crawlers_input.json' print("Creating Crawlers...") crawler_role_arn = 'arn:aws:iam::'+ aws_account_no +':role/AWSGlueServiceRole-' + env_name client = boto3.client('glue') def call_glue_create_crawler(...
true
56aaae72aee6f262736fab5efa81a5ac64214f65
Python
fedorajzf/opveclib
/opveclib/test/test_unary_math.py
UTF-8
6,007
2.6875
3
[ "Apache-2.0" ]
permissive
# Copyright 2016 Hewlett Packard Enterprise Development LP # # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or ...
true
dc8020a661beb4204dccf80900cc0f183ae5efe1
Python
SHIBILAHAMED/python-practice
/exp3.py
UTF-8
410
3.984375
4
[]
no_license
print ('I will now count my chickens:') print ('Hens',25+ 30 /6) print ('Roosters', 100-25 *3%4) print ('Now I will count the eggs:') print (3+2+1-5+4%2-1/4+6) print('Is it true 3+2 < 5-7?') print (3+2< 5-7) print ('what is 3+2?', 3+2) print ('what is 5-7?',5-7) print ("oh,that's why it's False") print (" is it great...
true
32b753ce847ec8825bd8dba2adb3096372f0fd9f
Python
maoto1201/CRL_gamedata
/crl_playerdata.py
UTF-8
21,477
2.625
3
[]
no_license
#df_CRLdataファイルの読み込み import pandas as pd df_CRLdata = pd.read_csv('CRLdata_goo.csv', encoding='utf-8',index_col=0) #DeckNameのバグ修正、ただし、セット数ごとの条件分岐(2v2は2人のデッキを足す)はできてない。 def DNcheck(x): if "three-musketeers" in x: return "三銃士" elif ("golem" in x) and ("ice-golem" not in x): retur...
true
95f438c37650d8d1d7af4d1c91bffeef890cd25f
Python
Anil314/HackerEarth-Solutions
/Basics of Input-Output/Life, the Universe, and Everything.py
UTF-8
471
3.703125
4
[]
no_license
''' Your program is to use the brute-force approach in order to find the Answer to Life, the Universe, and Everything. More precisely... rewrite small numbers from input to output. Stop processing input after reading in the number 42. All numbers at input are integers of one or two digits. SAMPLE INPUT 1 2 88 42 9...
true
1d647a1db43e1fca3bdb89b4888b0fadf9669134
Python
Snazzythat/ECSE420_Lab2
/grid_4_4.py
UTF-8
28,903
3
3
[]
no_license
#ECSE420 #LAB2 #ANDONI ROMAN #EXTRA PYTHON IMPLEMENTATION OF 4x4 GRID #PYTHONIC DRUM 5.0 from mpi4py import MPI import numpy as np import sys #GLOBALS GRID_SIZE = 4 SIZE = GRID_SIZE * GRID_SIZE #Node dictionary containing (i,j) of node as key and [t2,t1,t] as time values for each node node_dict = {} size = 0 rank =...
true
26f3409d10eb119fd937d7d6a1de80e848370c44
Python
ajayau404/testRepo
/test2.py
UTF-8
286
2.765625
3
[]
no_license
#!/usr/bin/env python import sys, os, time, json def main(): numElem = 3 elemStr = "1 0 0" elemList = elemStr.split(" ") val = 0 count = 0 for eachElem in elemList[::-1]: val += (int(eachElem) ^ 1) * pow(2, count) count +=1 print val if __name__ == "__main__": main()
true
199e814a05d6e0c8a4171a4f8c48f36e486acb8a
Python
aoishiki/face
/main.py
UTF-8
877
2.84375
3
[]
no_license
import cv2 color_red = (0, 0, 225) #枠の色 windowName = "face test" if __name__ == '__main__': # window cv2.namedWindow(windowName) # webcamera cap = cv2.VideoCapture(0) # 分類器の指定 cascadeFile = "data\haarcascade_frontalface_default.xml" cascade = cv2.CascadeClassifier(cascadeFile) while (True): # frameに映像,retに...
true
88e1c12ae572a3e74d26241a0df65e8c3cb41451
Python
saulshanabrook/CrossHair
/crosshair/enforce_test.py
UTF-8
1,794
3.015625
3
[ "MIT" ]
permissive
import unittest from crosshair.enforce import * def foo(x: int) -> int: ''' pre: 0 <= x <= 100 post: _ > x ''' return x * 2 class Pokeable: ''' inv: self.x >= 0 ''' x: int = 1 def poke(self) -> None: self.x += 1 def pokeby(self, amount: int) -> None: ''...
true
ca6437224adfcb393dacc551b849924289e8a492
Python
rapsealk/f1tenth_gym
/gym/f110_gym/unittest/pyglet_test_camera.py
UTF-8
3,754
2.96875
3
[ "MIT" ]
permissive
import pyglet from pyglet.gl import * # Zooming constants ZOOM_IN_FACTOR = 1.2 ZOOM_OUT_FACTOR = 1/ZOOM_IN_FACTOR class App(pyglet.window.Window): def __init__(self, width, height, *args, **kwargs): conf = Config(sample_buffers=1, samples=4, depth_size=16, ...
true
90de9121c68f7e6f2041eeb968986dd2b88bc4e7
Python
yunse2633s/blogsSj
/python_demo/201904/face/face002.py
UTF-8
2,097
2.609375
3
[]
no_license
# -*- coding: utf-8 -*- """ Created on Thu Apr 11 14:02:25 2019 @author: admin 环境: python v3.7.1 opencv v4.0 tensorflow v1.13.1 numpy v1.16.2 作用: 人脸、人眼数量 人头数量不行; 完成度90% """ import cv2 import numpy as np OPENCV_PATH = r"d:/Program Files (x86)/python/Lib/site-packages/cv2/data" #face_cas...
true
b5d88c32fbba84997b312fcaa2beb7fa309458ce
Python
gf0842wf/gevent-server-sample
/wserver.py
UTF-8
1,355
2.625
3
[]
no_license
# -*- coding: utf-8 -*- """WSGI Server Sample""" import gevent from gevent import socket from gevent.pywsgi import WSGIServer import tornado.web import tornado.wsgi from gmysql import Pool class MainHandler(tornado.web.RequestHandler): def get(self): rows = self.application.pool.fetchall("select ...
true
2f0e82f35221b608baa5f636e50cf9b4b610145f
Python
Mrsteveson/Review
/coaching_sessions/super_digits/super_digits.py
UTF-8
1,385
3.78125
4
[ "MIT" ]
permissive
# sum the digits of an int in string form # return an int def sum_digits(p): l = [] l[:0] = p return reduce(lambda x, y: int(x) + int(y), l) ​ def superDigit(n, k): # check the length of the string # then check for the terminating case # after the first recursive call, do we still need k? # construct...
true
54449e77cc9b45de64b848b21f4ad0bdafd6dfea
Python
Anjalidubey01/BDA-tasks
/Task4_PCA for dimension reduction.py
UTF-8
11,298
2.71875
3
[]
no_license
#!/usr/bin/env python # coding: utf-8 # In[138]: from sklearn.naive_bayes import GaussianNB from sklearn.svm import SVC from sklearn.linear_model import LinearRegression from sklearn.linear_model import LogisticRegression from sklearn.metrics import confusion_matrix,classification_report # In[139]: import numpy ...
true
97649f6cda6274dd8eaa9f4d641a4da6203f89d2
Python
hugaba/scraping_social_meteo
/reddit.py
UTF-8
911
2.71875
3
[]
no_license
from datetime import datetime, timedelta import praw import pandas as pd # loading of reddit account reddit = praw.Reddit(client_id='S-Wlacq0w975Lg', client_secret='3z1RIPVHCNRt11_U2c2h6aQ1DCC7qw', user_agent= 'reddit webscriping') # initialize posts list posts = [] # get informations from AustinFC subreddit for pos...
true
eca80617c20222f608aa7d9559dffc9ec49f41d3
Python
Chunlinx/Onto_Topic_Labeling
/tool/dep_graph_parser.py
UTF-8
2,656
2.640625
3
[]
no_license
# -*- coding: utf-8 -*- import os from nltk.parse.stanford import StanfordDependencyParser from nltk.tokenize import sent_tokenize import configparser #dep graph visualization import networkx as nx import matplotlib.pyplot as plt class DepGraphParser: configs = None def __init__(self, settingFilePa...
true
319eba7ffc5d4626b053017aca1899faad11ce91
Python
SteffyDevassy/PythonLuminar
/GUI_Pgm/frame_pgm.py
UTF-8
392
2.984375
3
[]
no_license
from tkinter import * root=Tk() tFrame=Frame(root) bFrame=Frame(root) tFrame.pack() bFrame.pack(side=BOTTOM) btn1=Button(tFrame,text="FirstButton",fg="green") btn2=Button(tFrame,text="SecondButton",fg="red") btn3=Button(bFrame,text="ThirdButton",fg="blue") btn4=Button(bFrame,text="4Button",fg="yellow") btn3.pack() b...
true
e9808eefacb59cf92d4fa14ee8dba7401dc8aa39
Python
ds-connectors/econ-models-textbook
/content/03-public/utils.py
UTF-8
9,214
2.6875
3
[ "CC-BY-SA-4.0" ]
permissive
import matplotlib.pyplot as plt import numpy as np import sympy from ipywidgets import HBox, VBox, Label, interactive_output, Accordion import ipywidgets as widgets from IPython.display import display solve = lambda x,y: float(sympy.solve(x-y)[0]) if len(sympy.solve(x-y))==1 else "Not Single Solution" plt.style.use("se...
true
009fc577ad0806cf68987f02a09e7136ae20d98b
Python
elleFlorio/py-snake
/engine/items/snake.py
UTF-8
759
3.515625
4
[]
no_license
from collections import deque class Snake: def __init__(self, body, symbol, color): self._body = deque(body) self._symbol = symbol self._color = color self._bonus = 0 def move(self, direction): head = self._body[-1] self._body.append(tuple(sum(x) for x in zip(...
true
5a9d55d998473ffa34e33ef501224734a1db5d5c
Python
lantoli/codejam-python
/Examples/sympy/polinomial_interpolation.py
UTF-8
924
3.9375
4
[]
no_license
#! /usr/bin/env python3 """ Polynomial interpolation Input is a number of points (x1,y1) ... (xn, yn) and print the result N-grade polynomial. It uses Lagrange polynomials: http://en.wikipedia.org/wiki/Polynomial_interpolation """ points = [ (0, 0), (1, 0), (2, 0), (3, 0), (4, 0), (5, 0), ...
true
90c8e1525444ed012d6136d3b04a6891f5cc7a9a
Python
WinnerOK/rest_messenger
/rest_messenger/messenger/serializers/messageSerializers.py
UTF-8
1,712
2.546875
3
[]
no_license
from rest_framework import serializers, status from rest_framework.exceptions import NotAuthenticated from rest_framework.response import Response from messenger.models import Message class MessageSerializer(serializers.ModelSerializer): class Meta: model = Message fields = ["id", "text", "sender...
true
03b9956a1a49e8ede0f8e9e01d07a05ca5949732
Python
nomorelint/slideshow
/slideshow.py
UTF-8
11,200
2.8125
3
[]
no_license
import os, sys from tkinter import Tk, Label from PIL import Image, ImageTk import argparse class ArgsContainer: def __init__(self, args): self.args = args self.filePaths = args['filePaths'][0] self.transitionTime = int(args['transition'] * 1000) self.stopTime = args['stopTime'] * 1000 self.goToNextDir = ar...
true
aea711432f0d0ee4babc26128056a24b676d46e7
Python
Somesh1501/Codes
/dictionaries.py
UTF-8
580
3.71875
4
[]
no_license
# dictionaries ''' dictionaries are also list like statements In dictionaries we use {} for storing a value dictionaries does not act like list or tuples its content is not associated with numbering like 0,1,2..... it only associates with specific keys which are described. There is no position factor , we use keys...
true
b84b06a388ee329d17f2bae614bd91167ba75067
Python
RooshRoosh/Pythonyashki
/preprocess_text.py
UTF-8
5,956
3.25
3
[]
no_license
''' Для построения word embedding предварительно необходимо: 1. Удалить из текста все изображения и HTML теги. 2. Удалить все знаки препинания и отделить их от других слов. 3. Удалить слова длинной выше 20 символов. 4. Присоединить НЕ к следующему слову. 5. Привести все слова в верхний регистр (...
true
3f6d4d10859c4b1b2d9eff7fa91958ccf6eeb818
Python
andigu/contest-programming
/src/dmoj/ccc17s4.py
UTF-8
898
2.9375
3
[]
no_license
def find(d, x): return x if d[x] == x else find(d, d[x]) n, m, d = [int(i) for i in input().split(' ')] edges = [] for i in range(m): a, b, w = [int(i) for i in input().split(" ")] edges.append([a - 1, b - 1, w, i < n - 1]) edges = sorted(edges, key=lambda x: x[2]) disjoint = [i for i in range(n)] rank =...
true
1965696da19378a157da55e40143a0c32119123f
Python
jbogomol/2frame-object-tracker
/max_offset_32/resize_all.py
UTF-8
1,152
2.8125
3
[]
no_license
# resize_all.py # # @author Jackson Bogomolny <jbogomol@andrew.cmu.edu> # @date 06/11/2020 # # Resizes all images in a specified directory to a specified size import os import cv2 import torch # on server or local computer on_server = torch.cuda.is_available() # directory with images if on_server: ...
true
ad5ce35d2e527ae3fc27dc89856f63849089ef7f
Python
DylanDerouard/Bddpokemon
/code_pokemon/game.py
UTF-8
1,389
2.6875
3
[]
no_license
import random, os, time, msvcrt from collections import Counter from code_pokemon.game import Game from code_pokemon.inventory import Inventory from code_pokemon.pokeball import Pokeball from code_pokemon.shop import Shop class Game(Inventory, Pokeball, Shop): def _init_(self, pokedollars, ball, inventory): ...
true
943cbd89c7c8a7d059a3b9c43c170bfe335b6d82
Python
alTaWBC/python
/functions/guessinggame.py
UTF-8
883
4.34375
4
[]
no_license
answer = 5 def get_integer(prompt: str) -> int: """Creates a banner where text is centered Args: text (str, optional): Text to center. Defaults to " ". screen_width (int, optional): size of banner. Defaults to 80. Raises: ValueError: len(text) is larger than width """ whi...
true
62867d6cc9bdeb87b37d70e5b88837a70a8c8af2
Python
ingridpacheco/Scientific-Recommender
/getArticleData.py
UTF-8
15,707
2.828125
3
[ "MIT" ]
permissive
# -*- coding: utf-8 -*- """ # **MAI712** - Fundamentos em Ciência de Dados ___ #### **Professores:** Sergio Serra e Jorge Zavaleta ___ #### **Equipe:** Ingrid Pacheco, Eduardo Prata ___ ### **OBJETIVO:** Script de criação de um dataset com os artigos publicados em alguns eventos para o projeto final da matéria MAI712 ...
true
fb520911e43a26d92250457dae09007e35eef1bf
Python
EmilianStankov/HackBulgaria
/week0/problem 15 - list_to_number/solution.py
UTF-8
109
3.484375
3
[]
no_license
def list_to_number(digits): num_str = '' for digit in digits: num_str += str(digit) return int(num_str)
true
38d077ff25837de5b92ce61c5439a4f75e5f1550
Python
sim6/django-importer
/tests/test_csvmodels.py
UTF-8
1,129
2.578125
3
[]
no_license
""" The `CsvModel` class is essentially shortcuts for automatically creating serializers based on a given model class. These tests deal with ensuring that we correctly map the model fields onto an appropriate set of serializer fields for each case. """ import os import tempfile from django.db import models from django...
true
ba48486a6f8fe51c58081551e2d2fc0d440b147b
Python
abiB1994/CMEECourseWork
/Project/python.py
UTF-8
2,913
2.8125
3
[]
no_license
# !/usr/bin/env python __author__ = "Abigail Baines a.baines17@imperial.ac.uk" __version__ = '0.0.1' import cv2 import numpy as np import matplotlib.image as mpimg import matplotlib.pyplot as plt img1 = cv2.imread("Testing/Abigail/UNADJUSTEDNONRAW_thumb_a54.jpg",0) # queryImage img2 = cv2.imread("Testing...
true
92d112861f08d207b76dc40c9f705c09cf2c8756
Python
jainendrak/python-training
/functions/variableargs.py
UTF-8
110
3.09375
3
[]
no_license
#variable length args def add(*a): print(a,type(a)) add() add(1,2) add(1,2,3) add(1,2,3,4) add(1,2,3,4,5)
true
d74771fc321fe1cc422b26d5ba2f67c7ce4d32fb
Python
ozgeKrt/OpenCv-CesitliCalismalar
/goruntuPiramitleri (1).py
UTF-8
273
2.546875
3
[ "MIT" ]
permissive
import cv2 import numpy as np def main(): resim=np.zeros((400,400,3),dtype="uint8") #400e400 bir matris oluştursun her matrisi de 3 tane yapı tutuyor. print(resim) cv2.waitKey(0) cv2.destroyAllWindows() if __name__ == '__main__': main()
true
ea7e4acea22655e170d6768e1587e5db8d48d945
Python
bakunobu/exercise
/1400_basic_tasks/chap_4/4.6.py
UTF-8
213
3.03125
3
[]
no_license
# a def find_value(x:float) -> float: if x <= 2: return(x) else: return(2.0) # b def find_value_two(x:float) -> float: if x <= 3: return(x) else: return(-3.0)
true
69a5f2208eb580267f596147a1562f3925098887
Python
jvansteeter/CS-360
/Lab3/downloadAccelerator.py
UTF-8
3,218
3.203125
3
[]
no_license
import argparse import os import requests import sys import threading import time class Shared: """ Shared memory """ def __init__(self,url): self.index = 0 self.data = {} self.sem = threading.Semaphore() self.url = url header = {'Accept-Encoding':'identity'} sel...
true
3d776e962242506ed312e16e8fa5f0308520a8d7
Python
wiktorn/onedrive-mirror
/onedrivemirror/__main__.py
UTF-8
1,179
2.671875
3
[ "MIT" ]
permissive
import onedrivemirror import argparse import functools sessions_file = ".onedrive.session" def main(): parser = argparse.ArgumentParser(description="Copy OneDrive folder to local path. Remember to set your " "ONEDRIVEMIRROR_CLIENTID and ONEDRIVEMIRROR_CLIENT_SECRET...
true