seq_id
stringlengths
4
11
text
stringlengths
113
2.92M
repo_name
stringlengths
4
125
โŒ€
sub_path
stringlengths
3
214
file_name
stringlengths
3
160
file_ext
stringclasses
18 values
file_size_in_byte
int64
113
2.92M
program_lang
stringclasses
1 value
lang
stringclasses
93 values
doc_type
stringclasses
1 value
stars
int64
0
179k
โŒ€
dataset
stringclasses
3 values
pt
stringclasses
78 values
170525452
import sys def sort_get_degree(term): return (term.degree) def handle_degree(object_list): degree = -1 for obj in object_list: try: if int(obj.degree) > degree: degree = int(obj.degree) except ValueError: raise SystemExit('Degree must be an Intege...
MikeyLHolm/Hive-computorV1
src/degree.py
degree.py
py
621
python
en
code
0
github-code
36
42164236500
#!/usr/bin/env python """ Provide image saving service. The callback is function wait_for_message. The message is transferred to cv and then saved. imageSave: request has two attributes, path and number (sequence number) response has a single bool type of whether image saving success. When passing request to the servic...
wuyang3/workspace
catkin_ws/src/poke_gazebo/scripts/poke_image_saver.py
poke_image_saver.py
py
3,559
python
en
code
0
github-code
36
37412163105
from copy import deepcopy import h5py import numpy as np import pytest import six from ...util.functions import virtual_file from .. import (CartesianGrid, CylindricalPolarGrid, SphericalPolarGrid, AMRGrid, OctreeGrid) ALL_GRID_TYPES = ['car', 'sph', 'c...
hyperion-rt/hyperion
hyperion/grid/tests/test_io.py
test_io.py
py
6,744
python
en
code
51
github-code
36
7770832461
import arcpy def CorridorTreeLoss(): # CorridorTreeLoss # To allow overwriting outputs change overwriteOutput option to True. arcpy.env.overwriteOutput = False # Check out any necessary licenses. arcpy.CheckOutExtension("spatial") San_Lucas_5_ = arcpy.Raster("Tree Loss Cost Distance\\...
jpaleja/jaguar-corridor-analysis
CorridorTreeLoss.py
CorridorTreeLoss.py
py
4,728
python
en
code
0
github-code
36
74498162984
import streamlit as st from sklearn import datasets from sklearn.ensemble import RandomForestClassifier import pandas as pd # Chargement du dataset Iris et Random Forest Classifier iris = datasets.load_iris() x = iris.data y = iris.target foret=RandomForestClassifier() foret.fit(x,y) # Creation de l'ap...
MamadouPNDIAYE/ML_App
iris.py
iris.py
py
1,538
python
fr
code
0
github-code
36
21077990927
from tool import * import re desktop = GetDesktopPath() comment_list = [] for file_path in laf(desktop + '\\aicharacter'): # print(os.path.splitext(file_path)) if os.path.splitext(file_path)[1] == '.aic': with open(file_path, 'r+', encoding='utf-8') as f: content = f.read() path ...
hongxiaoo/DOF_TaiWan
Apc/apc.py
apc.py
py
738
python
en
code
13
github-code
36
6353439339
import json import psycopg2 def lambda_handler(event, context): db_host = "database-2.cjcukgskbtyu.ap-southeast-2.rds.amazonaws.com" db_user = "postgres" db_password = "sengpsql" # Please don't hack us db_name = "database2" db_port = 5432 conn = psycopg2.connect( host=db_host, ...
SENG3011-megAPIxels/interactive-outbreak-predictor
PHASE_1/API_SourceCode/parser/report.py
report.py
py
1,078
python
en
code
1
github-code
36
4154017173
# -*- coding: utf-8 -*- """ Created on Sun Sep 25 11:48:09 2016 @author: Francisco """ #import numpy as np balance = 320000 annualInterestRate = 0.2 i = 0 for p in ((balance//12.0), (balance*(1 + annualInterestRate//12)**12)/12,1): bal_1 = [balance] print[p] for i in range(13): ...
pakinja/Python-Codes
MIT/fixpay_bisec1.py
fixpay_bisec1.py
py
582
python
en
code
0
github-code
36
35376276958
# class Unit : # ๋ถ€๋ชจ ํด๋ž˜์Šค # def __init__(self, name, hp, speed) : # init๋Š” Unit์œผ๋กœ ์ƒ์„ฑ๋ ๋•Œ ์ž๋™์œผ๋กœ ๋“ค์–ด๊ฐ # self.name = name # self.hp = hp # self.speed = speed # print ("{} ์œ ๋‹›์ด ์ƒ์„ฑ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.".format(name)) # def move(self, location) : # print ("[์ง€์ƒ ์œ ๋‹› ์ด๋™]") # print ("{} ...
wrath-sinsa/Study
nadocoding/studying_mono.py/free8.py
free8.py
py
6,843
python
ko
code
0
github-code
36
42154643868
N, M = map(int, input().split()) a = set() b = set() for i in range(N): a.add(input()) for j in range(M): b.add(input()) print(len(a & b)) for i in sorted(a & b): print(i)
FeelingXD/algorithm
beakjoon/solve.ac/1764.py
1764.py
py
184
python
en
code
2
github-code
36
856491497
#!/usr/bin/env python from pyhesity import * import argparse parser = argparse.ArgumentParser() parser.add_argument('-v', '--vip', type=str, default='helios.cohesity.com') parser.add_argument('-u', '--username', type=str, default='helios') parser.add_argument('-d', '--domain', type=str, default='local') parser.add_ar...
bseltz-cohesity/scripts
python/protectMongoDB/protectMongoDB.py
protectMongoDB.py
py
8,412
python
en
code
85
github-code
36
38565479182
from gluonts.dataset.util import to_pandas import logging import pandas as pd import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt from gluonts.dataset.field_names import FieldName import os import numpy as np from pandas.tseries import offsets from pandas.tseries.frequencies import to_offs...
joelongLin/Shared_SSM
gluonts/lzl_shared_ssm/utils/tool_func.py
tool_func.py
py
14,028
python
en
code
0
github-code
36
38676635360
# -*- coding: utf-8 -*- """ Created on Thu May 4 10:51:36 2017 @author: FunkyBlack """ import numpy as np import matplotlib.pyplot as plt def obj_fun(A, b, x): #============================================================================== # define the test function # T T # T...
FunkyBlack/CSMath-homeworks
Homework4/levenberg_marquardt.py
levenberg_marquardt.py
py
2,756
python
en
code
0
github-code
36
40748274206
import numpy as np from math import atan2 class Point: def __init__(self, x: float = None, y: float = None, z: float = None, vector: np.ndarray = None): self._x = x self._y = y self._z = z self.vector = vector if None not in (self.x, self.y, self.z): self.vect...
TelergySoftware/PyRobo
pyrobo/core.py
core.py
py
5,584
python
en
code
1
github-code
36
75104184745
# In a non-empty array of numbers, every number appears exactly twice except # two numbers that appear only once. Find the two numbers that appear only once. # Example: # Input: [1, 4, 2, 1, 3, 5, 6, 2, 3, 5] # Output: [4, 6] def find_single_numbers(nums): x = nums[0] for i in range(1, len(nums)): x ...
itsmeichigo/Playgrounds
GrokkingTheCodingInterview/BitwiseXOR/two-single-numbers.py
two-single-numbers.py
py
1,250
python
en
code
0
github-code
36
31845165162
from libqtile.config import Key, Screen, Group, Drag, Click from libqtile.lazy import lazy from libqtile import layout, bar, widget, hook from libqtile.widget import cpu,BatteryIcon, battery, khal_calendar import psutil import dateutil #import iwlib from os import path import subprocess @hook.subscribe.startup_once ...
cesareduardomejia/my_arch_configuration
.config/qtile/config.py
config.py
py
15,985
python
en
code
0
github-code
36
74967962022
#!/usr/bin/env python # coding: utf-8 # In[1]: get_ipython().run_line_magic('matplotlib', 'inline') # (section:results_wagner)= # # Identification of a dynamical system for the Wagner function # # ## Data generation # # As a first step, data for the analytical form of the Wagner function is generated. As seen in...
enricofoglia/SIA_RP_Report
_build/jupyter_execute/08WagnerSINDy.py
08WagnerSINDy.py
py
12,852
python
en
code
0
github-code
36
18735035904
import scrapy from Lab5_1.SeleniumRequest import SeleniumRequest from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions from Lab5_1.items import Lab51Item class AirbnbSpider(scrapy.Spider): name = "airbnb" allowed_domains = ["airbnb.com.ua"] start_urls = ["h...
Ivan7281/Lab-Data-Scraping
Lab5_1/Lab5_1/spiders/airbnb.py
airbnb.py
py
762
python
en
code
0
github-code
36
18489726570
from sys import stdin R, C = map(int, stdin.readline().split()) # '.' = ๋นˆ์นธ, 's' = ์–‘, 'w' = ๋Š‘๋Œ€ # ๋Š‘๋Œ€๊ฐ€ ์–‘์ด ์žˆ๋Š” ์นธ์œผ๋กœ ๊ฐˆ ์ˆ˜ ์—†๊ฒŒ ํ•  ์ˆ˜ ์žˆ๋‹ค๋ฉด 1์ถœ๋ ฅ # ์šธํƒ€๋ฆฌ๋Š” 'D' # ๋Š‘๋Œ€๊ฐ€ ์–‘ํ•œํ…Œ ๊ฐˆ ์ˆ˜ ์žˆ๋‹ค๋ฉด 0 ์ถœ๋ ฅ pasture = [list(input()) for _ in range(R)] # ๋ชฉ์žฅ ์ƒํƒœ ์ž…๋ ฅ move = [(-1, 0), (1, 0), (0, -1), (0, 1)] # ์ƒ,ํ•˜,์ขŒ,์šฐ ์ขŒํ‘œ์ด๋™ flag = False for i in range(R): for...
Hansung-include/Coding-Test-Study
03์ฃผ์ฐจ/16956/๊น€๋ฏผ์ค€_16956.py
๊น€๋ฏผ์ค€_16956.py
py
974
python
ko
code
0
github-code
36
41978343892
from ja.common.job import JobStatus from ja.server.config import ServerConfig from ja.server.database.sql.database import SQLDatabase from ja.server.database.types.work_machine import WorkMachineState from ja.server.dispatcher.dispatcher import Dispatcher from ja.server.dispatcher.proxy_factory import WorkerProxyFactor...
DistributedTaskScheduling/JobAdder
src/ja/server/main.py
main.py
py
5,061
python
en
code
2
github-code
36
39689533340
from atlas import Operation, Entity from physics import Point3D from rules import Location from mind.goals.dynamic.DynamicGoal import DynamicGoal class School(DynamicGoal): """Move in a shoal with other animals of the same type""" def __init__(self, members=[], desc="mirror the movement of other animals lik...
worldforge/cyphesis
data/rulesets/basic/scripts/mind/goals/animal/herd.py
herd.py
py
8,106
python
en
code
95
github-code
36
18431033624
import copy import random import math from fastapi import HTTPException from nltk.tree import Tree from schemas.paraphrasing_schemas import TreeParaphraseList, TreeParaphrase class TreeParaphrasingService: def __init__(self, tree_str: str): self.tree = Tree.fromstring(tree_str) def count_tree_permu...
Cerne13/paraphrasing-test-task
services/paraphrasing_service.py
paraphrasing_service.py
py
2,400
python
en
code
0
github-code
36
39553984143
import numpy as np import cv2 import os import time from process_img import grab_screen from direct_keys import PressKey, ReleaseKey, W, S, A, D from getkeys import key_check from tensorflow.keras.models import load_model from global_var import * def straight(): PressKey(W) ReleaseKey(A) ReleaseKey(D) d...
MendelDamian/Using-AI-to-follow-path-in-minecraft
main.py
main.py
py
2,254
python
en
code
0
github-code
36
71606824103
import os import sys import threading from paho.mqtt import client as mqtt_client from App.Utilities import save_sensor_data # Environmental Variables broker = str(os.environ['MQTT_BROKER_IP']) # '167.233.7.5' port = int(os.environ['MQTT_BROKER_PORT']) # 1883 topic = [str(os.environ['MQTT_GPS_MESSAGE_TOPIC'])...
jacobpaul07/Django-Api-Sensor-Monitoring
App/MQTT/mqtt_subscribe.py
mqtt_subscribe.py
py
1,713
python
en
code
0
github-code
36
38917312351
# -*- coding: utf-8 -*- from bot import BotPlugin import re regex = BotPlugin() search_re = re.compile(r'(?:^|\s)s/([^/]+)/([^/]*)/([gi]*)(?:\s|$)') match_re = re.compile(r'^([^\s]+):\s+s/([^/]+)/([^/]*)/([gi]*)$') lastline = {} def dosub(orig, repl, line, flags): f = 0 count = 1 if "i" in flags: ...
anatidae/entchen
plugins/regex.py
regex.py
py
1,241
python
en
code
3
github-code
36
19830142972
from datetime import datetime from typing import List, Optional, Tuple from api.models.booking_model import Booking from api.models.room_model import Room from api.models.user_model import User from api.repository.rooms_repository import RoomsRepository from api.repository.user_repository import UserRepository from ....
Tomdango/Q4-2021-SoftEngDevOps
api/repository/booking_repository.py
booking_repository.py
py
5,261
python
en
code
0
github-code
36
30071276942
from datetime import datetime from elasticsearch import Elasticsearch DEBUG = True def connect_elasticsearch(): _es = None _es = Elasticsearch([{'host': 'localhost', 'port': 9200}]) if DEBUG: if _es.ping(): print('[+] Connected to elasticsearch successfully') else: ...
CUTLER-H2020/DataCrawlers
Economic/maps.me/elasticsearch_functions.py
elasticsearch_functions.py
py
773
python
en
code
3
github-code
36
34113477971
import numpy as np import matplotlib.pyplot as plt import pystan np.set_printoptions(precision=5, suppress=True) import gzip import os import pdb import pickle seed = 1 np.random.seed(seed) n_N = 500 n_F = 5 n_Y = 10 n_D = 2000 n_W = 1000 n_C = 4 AD = 0.95 Y = np.zeros((n_N, n_Y)) B = np.zeros((n_Y, n_F)) log_F_s...
atechnicolorskye/post_sum
infer/infer.py
infer.py
py
2,408
python
en
code
1
github-code
36
8613109116
from tkinter import * class RetaPontoMedio: def __init__(self,imagem): self.imagem = imagem def desenhaRetaPontoMedio(self,start, end): # Condiรงรตes iniciais de configuraรงรฃo x1, y1 = start x2, y2 = end dx = x2 - x1 dy = y2 - y1 # Determine o quรฃo รญng...
carlos-hns/Computacao-Grafica
laboratorios/lab2/algoritmos/ponto_medio.py
ponto_medio.py
py
1,470
python
pt
code
0
github-code
36
39124423429
"""Classes that represent an IPS patch.""" import operator BYTEORDER = 'big' OFFSET_SIZE = 3 OFFSET_BITS = OFFSET_SIZE * 8 OFFSET_MAX = 2 ** OFFSET_BITS - 1 SIZE_SIZE = 2 SIZE_BITS = SIZE_SIZE * 8 SIZE_MAX = 2 ** SIZE_BITS - 1 RLE_SIZE_SIZE = 2 RLE_SIZE_BITS = RLE_SIZE_SIZE * 8 RLE_SIZE_MAX = 2 ** RLE_SIZE_BITS - 1 P...
eduardomezencio/python-patcher
ips_patch.py
ips_patch.py
py
6,189
python
en
code
0
github-code
36
26543825982
from setuptools import setup with open('README.rst') as f: long_description = f.read() setup( name = 'PorownywarkaOfert', version = '0.1', author = 'saraCzelusniak', author_email = 'saraCzelusniak@bitbucket.org', url = '', description = 'Porownywanie ofert', long_description = long_des...
czelsa/porownywarka-ofert
virt2/setup.py
setup.py
py
683
python
en
code
0
github-code
36
37502404537
# https://www.acmicpc.net/problem/1654 K, N = map(int, input().split()) lan = [] for _ in range(K): lan.append(int(input())) le = 1 ri = 0x7fffffff mid = 0 ans = 0 while le <= ri: mid = (le + ri) // 2 cnt = 0 for cm in lan: cnt += cm // mid if cnt > N: break if cnt < N : ...
junsgi/Algorithm
Binary_Search/๋žœ์„  ์ž๋ฅด๊ธฐ.py
๋žœ์„  ์ž๋ฅด๊ธฐ.py
py
410
python
en
code
0
github-code
36
9829683140
def parking_lot(count): parking = set() for i in range(count): data = input().split(", ") command, car = data if command == "IN": parking.add(car) else: parking.remove(car) if parking: for car in parking: print(car) else: ...
skafev/Python_advanced
02Second_week/04Parking_lot.py
04Parking_lot.py
py
410
python
en
code
0
github-code
36
8463069059
# -*- coding: utf-8 -*- # author๏ผšyaoyao time:2019/9/27 """ ๆ ผๅผ๏ผš ๅฎšไน‰ไธ€ไธชๅ˜้‡๏ผŒ่ต‹ๅ€ผ while ๆกไปถๅˆคๆ–ญ่ฏญๅฅ โ‘ ๏ผš ้‡ๅคๆ‰ง่กŒไปฃ็ ๅ— โ‘ก: ไฟฎๆ”นๆกไปถ็š„่ฏญๅฅ โ‘ข ๆ‰ง่กŒๆต็จ‹๏ผš โ‘ โ‘กโ‘ขโ‘ฃ - โ‘กโ‘ขโ‘ฃ - โ‘กโ‘ขโ‘ฃ - ... , ็›ดๅˆฐโ‘ก็š„็ป“ๆžœไธบFalse,ๆ•ดไธชๅพช็Žฏ่ฏญๅฅๅฐฑ็ป“ๆŸไบ†,ไธๅ†ๅพช็Žฏไบ†. """ # ๆ‰“ๅฐๅ‡บ 1-5ไน‹้—ด็š„ๆฏไธชๆ•ฐๅญ—. i = 1 while i <= 5: print(i) # ่ฎฉiๅŠ 1๏ผŒๆ˜ฏไธบไบ†ไธ‹ๆฌกๆ‰“ๅฐๆ—ถ๏ผŒๆ‰“ๅฐๅ‡บๆฅๅŽ้ขไธ€ไธชๆ•ฐๅญ— i += 1
yywecanwin/PythonLearning
day03/02.ๅพช็Žฏ่ฏญๅฅ.py
02.ๅพช็Žฏ่ฏญๅฅ.py
py
521
python
zh
code
1
github-code
36
26540694817
import math from PyQt5.QtWidgets import QApplication, QLabel, QLineEdit, QPushButton, QVBoxLayout, QWidget, QCheckBox class Quader(): def __init__(self, lรคnge, breite, hรถhe): self.A = int(lรคnge) self.B = int(breite) self.C = int(hรถhe) def __str__(self): outputStr = "---------...
su595/MyPython
math programs/volumenRechner.py
volumenRechner.py
py
4,416
python
de
code
2
github-code
36
74224406183
import datetime import logging import numpy as np import os import skimage.io as io from sklearn.cluster import KMeans from skimage import img_as_float from skimage.color import rgb2lab from skimage.exposure import equalize_adapthist from skimage.filters import gaussian from skimage.transform import resize from src.d...
AntoineRouland/ki67
src/v3_Lab_separation/run_v3.py
run_v3.py
py
6,283
python
en
code
1
github-code
36
13889355883
import sys arguments = sys.argv[1:] def isVowel(char): if(char in 'aeiou'): return True return False def isAlpha(char): return not isVowel(char) if(len(arguments) < 2): print('''let\'s try this. python count.py [type] [string] [type] is type of char which you want to count in string....
Revitate/TheInternship-dev-sol
1/count.py
count.py
py
1,147
python
en
code
0
github-code
36
13070210533
def solution(n, k): k -= 1 i = k A = list(range(1, n + 1)) res = [] while len(A) > 1: res.append(A.pop(i)) i = (i + k) % (len(A)) return res print(solution(5, 3))
Jason003/Interview_Code_Python
Quora/OA/elimanating.py
elimanating.py
py
203
python
en
code
3
github-code
36
39240946152
""" Writes MESS input for a monte carlo partition function calculation """ import os from mako.template import Template from mess_io.writer import util # OBTAIN THE PATH TO THE DIRECTORY CONTAINING THE TEMPLATES # SRC_PATH = os.path.dirname(os.path.realpath(__file__)) TEMPLATE_PATH = os.path.join(SRC_PATH, 'template...
sjklipp/interfaces_1219
mess_io/writer/monte_carlo.py
monte_carlo.py
py
2,141
python
en
code
0
github-code
36
4944678267
#!/usr/bin/python # -*- coding: utf-8 -*- # encoding: utf-8 #ๅฎขๆˆท็ซฏ่ฐƒ็”จ๏ผŒ็”จไบŽๆŸฅ็œ‹API่ฟ”ๅ›ž็ป“ๆžœ import json import os import hashlib import json import platform def getSysType(): sysSystem = platform.system() if sysSystem == 'Windows': #mac็ณป็ปŸ return 'win' elif sysSystem == 'Darwin': return 'mac' elif...
fengmm521/okex_robot
util/signTool.py
signTool.py
py
1,077
python
en
code
0
github-code
36
42147526124
import copy import logging import traceback from typing import Any, Dict, Optional, List from .base_trigger import TriggerEvent, BaseTrigger from .playbook_utils import merge_global_params from .playbooks_event_handler import PlaybooksEventHandler from ..model.events import ExecutionBaseEvent from ..reporting.base imp...
m8e/robusta
src/robusta/core/playbooks/playbooks_event_handler_impl.py
playbooks_event_handler_impl.py
py
8,001
python
en
code
null
github-code
36
2863282601
""" ๅŠŸ่ƒฝ๏ผš ๅฎž็Žฐ็™พๅบฆ็ฟป่ฏ‘็š„็•Œ้ข๏ผˆ็บฏ็ฒนๆจกไปฟ็™พๅบฆ็ฟป่ฏ‘้กต้ข๏ผ‰ ไฝœ่€…๏ผš Miller ๆ—ฅๆœŸ๏ผš 2019-04-10 """ from PyQt5.QtWidgets import * class BaiduDialog(QDialog): def __init__(self, crawler, parent=None): super().__init__(parent=parent) self.__crawler = crawler # ------------- ่ฎพ่ฎกไธŽๆž„ๅปบUI็•Œ้ขๅผ€ๅง‹ # ่ฎพ่ฎกๅธƒๅฑ€ layout_ou...
XiaJune/A-small
d10_pro_baidu_zhihu/baidu/baidudialog.py
baidudialog.py
py
2,309
python
zh
code
0
github-code
36
7152283168
# ##### BEGIN GPL LICENSE BLOCK ##### # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distrib...
Looking-Glass/blenderLKG
looking_glass_tools/looking_glass_settings.py
looking_glass_settings.py
py
9,262
python
en
code
34
github-code
36
4952473730
from enum import Enum from pprint import PrettyPrinter PREFIX = 'Unit' SUFIX = 'Event' def parse_unit_event_string(input): min_length = len(PREFIX) + len(SUFIX) if len(input) > min_length: begin = len(PREFIX) end = len(input) - len(SUFIX) return input[begin:end] else: ret...
khklau/sc2-analysis
facts/unit_event.py
unit_event.py
py
329
python
en
code
0
github-code
36
43145801264
# -*- encoding: utf-8 -*- import os import time import pyautogui as auto import PyHook3 as pyhook import pythoncom from PIL import Image from pytesseract import image_to_string from googletrans import Translator import asyncio import tkinter as tk # ๅผ•ๅ…ฅๅญ—ไฝ“ๆจกๅ— import tkinter.font as tkFont from concurrent.futures import ...
minskiter/capword
index.py
index.py
py
2,564
python
en
code
0
github-code
36
17260671113
from scipy import stats import numpy as np import csv sentiment_scores = np.random.random(52) # input should be a numpy array of sentiment scores for the 50 states def calculateRegressions(sentiment_scores): white_ratios = [] male_ratios = [] educations = [] populations = [] incomes = [] criteria = ("white r...
yongzheng9405/-TwitterSentimentAnalysisProject
scripts/regression.py
regression.py
py
1,673
python
en
code
0
github-code
36
28147932222
import math def distance_from_fft(point, ratio, image_shape): '''This is a function used to calculate the distance\ between one point and origin. The ratio should be in\ unit of pixel/nm''' cord_list = [] for i in range(len(point)): cord_list.append(point[i]**2) pixel_length ...
crystalmaths/crystalmaths
crystalmaths/distance_from_fft.py
distance_from_fft.py
py
479
python
en
code
2
github-code
36
8473334100
"""To run this: $ python3 parse.py test.xml The script will pase a XML file and print its node tags. Compatible with Python 3; changing the print statements should make this compatible with Python 2. """ import sys # http://docs.python.org/library/xml.etree.elementtree.html from xml.etree import ElementTree def ope...
babywyrm/sysadmin
pyth3/xml/print_node_tags_.py
print_node_tags_.py
py
1,104
python
en
code
10
github-code
36
27102703139
import os import re import logging import json from datetime import datetime, timedelta from pathlib import Path import requests import spotipy from spotipy import SpotifyOAuth from spotipy.oauth2 import SpotifyClientCredentials from dagster_cron import SystemCronScheduler from dagster import ( RepositoryDefinitio...
ikedaosushi/ikedaosushi-dagster
spotify.py
spotify.py
py
6,273
python
en
code
0
github-code
36
1243606709
import pygame as pg from numpy import zeros from constants import consts as c from id_mapping import id_map, reverse_id_map class World: def __init__(self): self.grid = zeros((c.num_cells, c.num_cells), dtype=int) self.ore_locations = [] self.grid[10:13, 10:12] = id_map["coal"] s...
chanrt/py-factory
world.py
world.py
py
1,382
python
en
code
11
github-code
36
25458093560
"""Analyze word-level LIWC scores between lucid and non-lucid dreams. ***Note this does not re-run LIWC, but loads in prior results. IMPORTS ======= - original post info, dreamviews-posts.tsv - word-level LIWC scores, validate-liwc_wordscores.tsv - LIWC dictionary, dictionaries/custom.dic EXPORT...
remrama/dreamviews
validate-liwc_word_stats.py
validate-liwc_word_stats.py
py
5,290
python
en
code
1
github-code
36
38227453623
from collections import defaultdict from datetime import time from typing import Dict, List import pandas as pd from pandas import ExcelFile class ConfigMaker: def make_regions_config(self, excel_file: ExcelFile) -> Dict[str, str]: regions = {} df = pd.read_excel(excel_file, sheet_name="Region--...
tenetko/phone-numbers-beautifier
backend/src/core/config_maker/tzb_config_maker.py
tzb_config_maker.py
py
3,898
python
en
code
0
github-code
36
5371067321
from splinter import Browser from bs4 import BeautifulSoup import time import pandas as pd import pymongo import requests def init_browser(): executable_path = {"executable_path": "chromedriver.exe"} return Browser("chrome", **executable_path, headless=False) def scrape(): browser = init_browser() # ...
omeza3547/web-scraping-challenge
Mission_to_Mars/scrape_mars.py
scrape_mars.py
py
3,060
python
en
code
0
github-code
36
7775693352
from torch.utils.data import Dataset from torchvision import transforms import numpy as np import pandas as pd import random from src.dataset import get_load_data import torch from tqdm import tqdm def generate_train_set(train): train_set = [] classes = [i[1] for i in train] classes = np.array(classes) ...
tappyness1/triplet-loss-revisit
src/dataloader.py
dataloader.py
py
1,930
python
en
code
0
github-code
36
29344589576
#!/usr/bin/python # -*- encoding: utf-8 -*- #Created by 'quanpower' on '15-4-4' #Email:quanpower@gmail.com #QQ:252527676 #Site:www.smartlinkcloud.com __author__ = 'quanpower' import numpy as np import cv2 #่Žทๅพ—่ง†้ข‘็š„ๆ ผๅผ videoCapture =cv2.VideoCapture('../files/video_test.rmvb') #่Žทๅพ—็ ็އๅŠๅฐบๅฏธ fps = videoCapture.get(cv2.cv.CV_...
SmartHomeRobot/OpenCV
src/cv_video_play_rmvb.py
cv_video_play_rmvb.py
py
982
python
en
code
1
github-code
36
20528028503
import os import re import xlrd import xlwt from xlutils.copy import copy class HandleExcel: def __init__(self): self.root = '' self.dir = '' self.files = '' self.allFile_url = '' self.final_file_name = 'ๆต‹่ฏ•ๆ•ฐๆฎๆธ…ๆด—็‰ˆ.xls' self.title = ['ๆก็ ๅ†…ๅฎน', 'ๆ•…้šœ้€š้“', 'ๆต‹่ฏ•ๆ—ถ้—ด'] self...
chenyaqiao0505/Code111
HandleExcel/excel_method.py
excel_method.py
py
3,916
python
en
code
0
github-code
36
33956150728
inputValue = "" numberList = [] while (inputValue != 'x'): inputValue = input("Please enter numbers. If you enter x you will be shown all the numbers you have entered that repeat themselves ") if (inputValue != 'x'): numberList.append(inputValue) repeatedNumbers = [] x = 0 for i in range(len(numberList)...
JoelWebber/ICTPRG-Python
Week5 210329/week5quiz1question7.py
week5quiz1question7.py
py
539
python
en
code
0
github-code
36
36246411351
#!/usr/bin/env python import numpy as np import rospy from ar_commander.msg import State, ControllerCmd RATE = 10 class EstimatorOL(): def __init__(self): rospy.init_node('estimator') # incominng measurements (inputs) self.vel_cmd = None self.omega_cmd = None # robot st...
benkmoore/ar_commander
scripts/estimator/estimator_ol.py
estimator_ol.py
py
1,652
python
en
code
0
github-code
36
29884125473
""" AndAgainAndAgainAndAgainAndAgainAndAgainAndAgain """ def main(): """ a e i o u """ words = input().strip().split() words_result = words.copy() result = [] for num in range(len(words)): fixed_word = words[num].replace('a', '#').replace('e', '#').replace('i', '#') \ .replace('o', '...
DefinitelyNotJay/ejudge
AndAgainAndAgainAndAgainAndAgainAndAgainAndAgain.py
AndAgainAndAgainAndAgainAndAgainAndAgainAndAgain.py
py
560
python
en
code
0
github-code
36
33552308938
#!/usr/bin/env python3 import os import logging import argparse import csv def process_result(result_folder): status = "success" summary = [] paths = [] tests = ["TLPWhere", "TLPGroupBy", "TLPHaving", "TLPWhereGroupBy", "TLPDistinct", "TLPAggregate"] for test in tests: err_path = '{}/{}....
ByConity/ByConity
docker/test/sqlancer/process_sqlancer_result.py
process_sqlancer_result.py
py
2,749
python
en
code
1,352
github-code
36
74430361063
from flask import Flask from flask import render_template, request import subprocess, os, base64 from subprocess import PIPE, Popen app = Flask(__name__) @app.route('/') def Compiler(): check = '' return render_template('home.html', check=check) @app.route('/submit', methods=['GET', 'POST']) def submit(): ...
apollliinaria/moodle_compiler_testik
app.py
app.py
py
2,066
python
en
code
0
github-code
36
3520925666
#!/usr/bin/env python import math import copy import matplotlib.pyplot as plt def plot_obstacles(previous_obstacles, new_obstacles, updated_obstacles, updated_labels): # Extract x and y coordinates from the obstacles lists prev_x, prev_y, new_x, new_y, updated_x, updated_y = [], [],[],[],[],[] if len(pr...
husamhamu/ps_robotik
update_obstacles_approach.py
update_obstacles_approach.py
py
5,081
python
en
code
1
github-code
36
20142637580
import os, sys, argparse os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' import numpy as np import pandas as pd import tensorflow as tf import tensorflow.keras.backend as K from tensorflow.keras.layers import Add, Concatenate, Dense, Embedding, Flatten, Input, InputLayer, Lambda, Layer, Reshape, Subtract tf.keras.backend.set...
zachglick/directional-mpnn
train.py
train.py
py
4,767
python
en
code
6
github-code
36
1436356058
import pathlib import math import pygame as pg # bd is short for board bd_size = 900 grid_size = bd_size // 19 stone_radius = grid_size // 2 cross_half_len = stone_radius // 3 center_circle = [(3, 3), (3, 9), (3, 15), (9, 3), (9, 9), (9, 15), (15, 3), (15, 9), (15, 15)] circle_radius = stone_radius ...
XuanSmallProj/GoBang
src/params.py
params.py
py
920
python
en
code
0
github-code
36
625334349
import os import time import aiofiles import aiohttp import asyncio from retrying import retry class Spider(object): """ ไธ‹่ฝฝ่ทฏๅพ„ๅœจๅฎžไพ‹ๅŒ–ๆ—ถๅ€™ๆŒ‡ๅฎš๏ผŒๆฏ”ๅฆ‚:r'd:\test\\'๏ผŒ่ฟ™ไธช็›ฎๅฝ•ๅฆ‚ๆžœไธๅญ˜ๅœจ๏ผŒไผšๅ‡บ้”™ใ€‚ ้ป˜่ฎค่ทฏๅพ„ไธบๅฝ“ๅ‰ๆ–‡ไปถไธ‹็š„downpic็›ฎๅฝ•๏ผŒๆญค็›ฎๅฝ•ๅฆ‚ๆžœไธๅญ˜ๅœจไผš่‡ชๅŠจ็”Ÿๆˆ """ def __init__(self, down_path='', ): self.headers = { 'User-Agent': 'Mozi...
chenxy2022/long
yituhuitu.py
yituhuitu.py
py
5,707
python
en
code
0
github-code
36
43836978030
from extract_video_frames import * from make_barcode import * videopath = 'video.mp4' if os.path.exists(videopath): frames_dir = extract_video_frames(videopath) barcode = make_barcode(frames_dir, bar_width=20, dims=(1920,1080)) else: print('ERROR: video file does not exist')
kaili-chen/writing-supplements
video-barcodes/barcode.py
barcode.py
py
289
python
en
code
7
github-code
36
9285859360
from os import path from tkinter import Label, Frame, TOP, BOTTOM, RIGHT, LEFT, N, E, S, W, X, Y, BOTH, Tk, filedialog import math from pathlib import Path import pyautogui import numpy as np from time import sleep from PIL import Image, ImageTk from pyautogui import position import cv2 from src.auto_align import aut...
IronicPickle/dw-piper
src/snap.py
snap.py
py
11,091
python
en
code
0
github-code
36
71688402345
__author__ = 'vamsee' import geojson as geo Center = (-83.79706,42.268138) Center_Point = geo.Point(Center) def get_locations(filename,lat_idx,long_idx, write_filename,point_properties): opened_file = open(filename) features_list = [] for line in opened_file: line_contents = line.split(',') ...
vamseedhar-reddyvari/Connected-Vehicles
scripts/rse-locations.py
rse-locations.py
py
1,254
python
en
code
0
github-code
36
11880730133
#!/usr/bin/python import argparse import time import struct import socket import select import sys class PingOptions(object): def __init__(self): """Reset the class; indicates the class hasn't been initailized""" self.initialized = False def initialize(self, parser): parser.add_argum...
jansona/MyPingGUI
src/main/python/MyPing/opts.py
opts.py
py
1,425
python
en
code
0
github-code
36
31352736355
# For data loading from scipy.io import loadmat # For splitting the data into test, train, validation splits from sklearn.model_selection import train_test_split # For manipulation of the arrays import numpy as np # For file manipulation and locating import os # For plotting import json # For showing progress from tqdm...
martinferianc/PatternRecognition-EIE4
Coursework 2/pre_process.py
pre_process.py
py
8,332
python
en
code
1
github-code
36
16172261977
"""A wrapper env that handles multiple tasks from different envs. Useful while training multi-task reinforcement learning algorithms. It provides observations augmented with one-hot representation of tasks. """ import random import akro import gym import numpy as np from src.metarl.envs.multi_env_wrapper import Mul...
icml2020submission6857/metarl
src/metarl/envs/multi_env_sampling_wrapper.py
multi_env_sampling_wrapper.py
py
2,661
python
en
code
2
github-code
36
37215521511
import pymc as pm import numpy as np x = np.random.normal(loc=0, scale=1, size=10) # Data Placeholder y = np.random.normal(loc=2*x, scale=1, size=10) # Data Placeholder with pm.Model() as model: # Priors ฮฑ = pm.Normal("ฮฑ", 1, 2) ฮฒ = pm.Normal("ฮฒ", -1, 2) ฯƒ = pm.Exponential("ฯƒ", 3) # Linear Model ฮผ = pm.Deter...
pbrowne88/pykrusch
examples/simple_model.py
simple_model.py
py
587
python
en
code
0
github-code
36
73903152425
# Escribe un programa que lea 2 valores a y b y que muestre en la pantalla pares de nรบmeros en donde el valor de a se incrementa de 2 en 2 y el valor de b se decrementa de 1 en 1 hasta llegar a 1. El ciclo se va a detener cuando b llegue a 1. a = int(input("Insert first integer value: ")) b = int(input("Insert seco...
marcosdayanm/Pensamiento_Computacional_Ingenieria_TEC
Ejercicios extra/Ds contadores con while v2.py
Ds contadores con while v2.py
py
576
python
es
code
0
github-code
36
71859061225
# -*- coding: utf-8 -*- """ Created on Mon Dec 6 08:38:52 2021 @author: pcondon """ def ProcessDay(data): initialLength = len(data) for i in range(initialLength): if data[i] > 0: data[i]-=1 elif data[i] ==0: data[i] = 6 data.append(8) ret...
Pad094/AoC-2021
p6.py
p6.py
py
1,314
python
en
code
0
github-code
36
10831210647
n=int(input("Enter the number of values you want: ")) lis=[] for i in range(n): v=input("Enter the value: ") lis.append(v) dict={k:v for k,v in enumerate(lis)} # d={"Name":"Karan","Class":"IT","Rollno":33,"Name2":"Karan"} print(dict) temp={} for i in range(n): if dict[i] not in temp.values(): temp[...
Karan-Johly/Python_journey
d20_dictques_3.py
d20_dictques_3.py
py
352
python
en
code
0
github-code
36
74612388585
import tkinter win = tkinter.Tk() win.title("hanyb") win.geometry("400x400+200+0") # <ButtonRelease-1> ้ผ ๆ ‡ๅทฆ้”ฎ้‡Šๆ”พ # <ButtonRelease-2> ้ผ ๆ ‡ไธญ้”ฎ้‡Šๆ”พ # <ButtonRelease-3> ้ผ ๆ ‡ๅณ้”ฎ้‡Šๆ”พ label = tkinter.Label(win, text="you are a good man!") label.pack() def func(event): print(event.x,event.y) label.bind("<ButtonRelease-1>",func)...
hanyb-sudo/hanyb
tkinter/่กจๆ ผๆ•ฐๆฎ-ไบ‹ไปถ-ๅธƒๅฑ€/7ใ€้ผ ๆ ‡้‡Šๆ”พไบ‹ไปถ.py
7ใ€้ผ ๆ ‡้‡Šๆ”พไบ‹ไปถ.py
py
372
python
en
code
0
github-code
36
25434378518
#!/usr/bin/env python import os import sys def checkImport(lib): parentDir = os.path.dirname(os.getcwd()) sys.path.append(parentDir) if not os.path.exists(os.path.join(parentDir, lib)): print("%s library not found." % lib) print("please clone github.com/andrewbooker/%s.git into %s" % (lib, ...
andrewbooker/midicomposer
exampleMidi.py
exampleMidi.py
py
1,298
python
en
code
0
github-code
36
733407856
import sqlite3 import pandas as pd from sklearn.metrics.pairwise import cosine_similarity def get_latent_dataframe(): conn = sqlite3.connect('db/latent_features.db') # Load the DataFrame from the database latent_df = pd.read_sql_query('SELECT * FROM latent_features', conn,index_col='index') conn.close(...
haris-bit/TMDB
util.py
util.py
py
3,156
python
en
code
0
github-code
36
40086679560
# -*- coding: utf-8 -*- """ Created on Fri Aug 27 13:25:02 2021 @author: Luca Medeiros """ import glob import yaml import torch import wandb import random import json from argparse import ArgumentParser, Namespace from collections import defaultdict from sklearn.metrics import f1_score from model impo...
luca-medeiros/zeroshot_lightning
test.py
test.py
py
7,875
python
en
code
0
github-code
36
1188276033
import json from fastapi.testclient import TestClient from sqlalchemy.orm import Session from app import config class TestNodeInfoNodeInfo: # ใƒ†ใ‚นใƒˆๅฏพ่ฑกAPI apiurl = "/NodeInfo" # ๏ผœๆญฃๅธธ็ณป1๏ผž # ้€šๅธธๅ‚็…ง def test_nodeinfo_normal_1(self, client: TestClient, session: Session): resp = client.get(self.apiu...
BoostryJP/ibet-Wallet-API
tests/app/node_info_NodeInfo_test.py
node_info_NodeInfo_test.py
py
3,543
python
en
code
9
github-code
36
36935613463
hiking = input() base_camp = 5364 everest_peak = 8848 hiking_days = 1 while hiking != "END": hiked_meters = int(input()) if hiking == "Yes": hiking_days += 1 if hiking_days > 5: print("Failed!") print(f"{base_camp}") break base_camp += hiked_meters ...
didarata/SoftUni-Python-Software-Engineering
SoftUni Basics/20.Prelim Exam/05_everest.py
05_everest.py
py
662
python
en
code
0
github-code
36
29719398042
# # Hot Wire RNN #%% import tensorflow as tf import numpy as np import matplotlib.pyplot as plt import time #%% #Import data, U for velocity and sample rate as frequency import h5py with h5py.File('../resource/asnlib/publicdata/hot_wire_data.mat', 'r') as f: U = list(f['U']) freq = list(f['samp_rate']) #%% ...
nathanboachie/sw_projects
src_deeplearningtf/wire_rnn_lstm_tf.py
wire_rnn_lstm_tf.py
py
3,546
python
en
code
0
github-code
36
22911051083
# %% from typing import Dict, List from kfp import dsl @dsl.component(base_image="zhuwq0/quakeflow:latest") def cut_templates( root_path: str, region: str, config: Dict, index: int = 0, model_path: str = "../PhaseNet/", mseed_list: List = None, protocol: str = "file", bucket: str = ""...
YuancongGou/QuakeFlow
slurm_MON/cut_templates.py
cut_templates.py
py
17,298
python
en
code
null
github-code
36
35026081994
import warnings warnings.filterwarnings('ignore') import pandas as pd import numpy as np import matplotlib.pyplot as plt plt.style.use('seaborn-notebook') import re import string from nltk.stem import WordNetLemmatizer from sklearn.model_selection import train_test_split import tensorflow as tf from tensorflow.keras...
Ravi-Maurya/Natural_Language_Processing
TwitterClassification/TwitterClassification.py
TwitterClassification.py
py
5,410
python
en
code
0
github-code
36
39524138596
def main(): weight = 0.5 alpha = 0.01 # speed of learning goal_pred = 0.8 income = 2 alpha = 0.1 def neural_network(income, weight): pred = income * weight return pred for i in range(20): prediction = income * weight error = (prediction - goal_pred)**2...
Viachkov/Tutor_ML
lesson_02.py
lesson_02.py
py
840
python
en
code
0
github-code
36
16636321945
from torch import nn __all__ = ["DropPath"] def drop_path(x, drop_prob: float = 0.0, training: bool = False, scale_by_keep: bool = True): """Drop paths (Stochastic Depth) per sample (when applied in main path of residual blocks). This is the same as the DropConnect impl I created for EfficientNet, etc netwo...
BloodAxe/pytorch-toolbelt
pytorch_toolbelt/modules/drop_path.py
drop_path.py
py
1,579
python
en
code
1,447
github-code
36
25734461539
import discord import os from discord.ext import commands from asyncio import sleep from dotenv import load_dotenv from cogs.giveaway import giveaway from cogs.polls import Polls load_dotenv() intents = discord.Intents.default() intents.members = True prefix = commands.when_mentioned_or('-') bot = commands.Bot(comma...
tyler7kehoe/Argus
bot.py
bot.py
py
1,489
python
en
code
0
github-code
36
32120333326
import scrapy from scrapy.loader import ItemLoader from goodreads.items import QuoteItem # used to filter the data class GoodReadsSpider(scrapy.Spider): #identity name = 'goodreads' #request def start_requests(self): url = 'https://www.goodreads.com/quotes?page=1' yield scrapy.Reque...
Karthiindia90/Goodreads
goodreads/spiders/goodreads.py
goodreads.py
py
1,593
python
en
code
0
github-code
36
41028938045
from Functions import Functions_Configs as configFunc from Functions import Functions_SQL_Interfacing as sqlf from Functions import Functions_FFlogsAPI as fflogs import pandas as pd import csv import time import os import datetime import mysql.connector import _01_Extract_Data as extract import _02_Map_Statics as mapst...
ystol/FFlogs-Analysis
_04_Get_static_performance.py
_04_Get_static_performance.py
py
4,951
python
en
code
0
github-code
36
29029006849
""" Definition of forms. """ from django import forms from django.contrib.auth.forms import AuthenticationForm from django.utils.translation import ugettext_lazy as _ from django.db import models # ะ›ะฐะฑะฐ 9 from .models import Comment # ะ›ะฐะฑะฐ 9 from .models import Blog #ะปะฐะฑะฐ 10 from .models import Catalog #New class Bo...
InovTe4/DjangoWebProject1
app/forms.py
forms.py
py
3,202
python
ru
code
0
github-code
36
29264163869
from time import sleep from threading import Thread class Task(Thread): def __init__(self, id, temp): Thread.__init__(self) self.id = id self.temp = temp def run(self): print(f"Start tread {self.id}") sleep(self.id) print(f"finish tread {self.id}...
albiserra/TPSIT_python
tread.py
tread.py
py
704
python
en
code
0
github-code
36
73478576745
from pprint import pformat from six import iteritems class PIResponse(object): swagger_types = { 'status': 'int', 'headers': 'dict(str, str)', 'content': 'object', } attribute_map = { 'status': 'Status', 'headers': 'Headers', 'content': 'Content', } def __init__(self, status=None, headers=None, cont...
dcbark01/PI-Web-API-Client-Python
osisoft/pidevclub/piwebapi/models/pi_response.py
pi_response.py
py
1,762
python
en
code
39
github-code
36
29101217047
row1 = row3 = row5 = row7 = "+---+---+---+" row21 = row22 = row23 = row41 = row42 = row43 = row61 = row62 = row63 = " " turn = 1 endgame = 0 #alternates between X and O def symbol(): if turn % 2 == 0: return "O" else: return "X" #prints the board at the start of the game print(row1)...
maxyvisser/Python-projects
Tic Tac Toe.py
Tic Tac Toe.py
py
3,962
python
en
code
0
github-code
36
12217757601
import zmq import os import time #Send Receve Server process = str(os.getpid()) print ('PID: ' + process) try: ctx = zmq.Context.instance() #socket = ctx.socket(zmq.REP) socket = ctx.socket(zmq.DEALER) socket.bind('tcp://127.0.0.1:4000') print('Server listening on : 127.0.0.1:3000\n...') except ...
mcesarpl/pyZMQ-Monitor-Master-Client
SR_server.py
SR_server.py
py
681
python
en
code
0
github-code
36
37380582441
# File name: floatlayout.py from kivy.lang import Builder from kivy.app import App from kivy.uix.floatlayout import FloatLayout from kivy.uix.togglebutton import ToggleButton from kivy.clock import Clock from kivy.utils import platform class FloatLayoutWidget(FloatLayout): def __init__(self, *args, **kwargs): sup...
Conner-JD/ISAT-280
lab5/mfield/myfield/main.py
main.py
py
1,503
python
en
code
0
github-code
36
72193969063
#!/usr/bin/env python # coding: utf-8 # In[7]: import os import csv import json f2 = open('allproducts.csv', 'w') f2.write("prod_id,prod_sku,prod_cat,prod_name\n") f2.close() f2 = open('allproducts.csv', 'a') writer = csv.writer(f2, delimiter=',', lineterminator='\n') for root, dirs, files in os.walk('output'): ...
chennavc/threding
combine.py
combine.py
py
942
python
en
code
0
github-code
36
6791686071
from django.core.exceptions import ObjectDoesNotExist from rest_framework import serializers from exo_mentions.api.serializers import SearchMentionResultsSerializer from circles.models import Circle class SearchMentionSerializer(serializers.Serializer): search = serializers.CharField(required=False, allow_blan...
tomasgarzon/exo-services
service-exo-core/mentions/api/serializers.py
serializers.py
py
1,062
python
en
code
0
github-code
36
20895643740
from . import create_app from .model import Option, Meal, TIME_FORMAT, list_of import json from datetime import datetime from typing import List from flask import request from flask_restful import ( Api, Resource, fields, marshal_with, marshal_with_field, ) app = create_app() api = Api(app) mea...
genzj/flask-restful-api-course
s03-output-fields/meal_options/meal_options/app.py
app.py
py
1,605
python
en
code
1
github-code
36
35053401637
class Endpoint: def __init__(self, d_latency): self.d_latency = d_latency self.caches = {} self.video_requests = {} self.new_set = set(self.video_requests.values()) class Cache: def __init__(self, size): self.size = size self.videos = []
onshimiye/hashcode
endpoint.py
endpoint.py
py
296
python
en
code
0
github-code
36
70188064425
import re import requests url = "https://search.51job.com/list/020000,000000,0000,00,9,99,python,2,{}.html?lang=c&stype=&postchannel=0000&workyear=99&cotype=99&degreefrom=99&jobterm=99&companysize=99&providesalary=99&lonlat=0%2C0&radius=-1&ord_field=0&confirmdate=9&fromType=&dibiaoid=0&address=&line=&specialarea=00&fr...
M0025/PythonSpider
codes/crawlers/51job-demo-2.py
51job-demo-2.py
py
1,620
python
en
code
0
github-code
36