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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
74078292179 | from pyhdf.HDF import *
from pyhdf.V import *
from pyhdf.VS import *
from pyhdf.SD import *
import numpy as np
import pprint
from HDFread import HDFread # 读取hdf文件
from decoder import decoderScenario
import cartopy.crs as ccrs
import cartopy.feature as cfeature
# matplotlib:用来绘制图表
import matplotlib.pyplot as plt
# shap... | eraevil/cloud_type_classfication | src/1_match/hdf_to_csv.py | hdf_to_csv.py | py | 7,346 | python | en | code | 0 | github-code | 13 |
36588242266 | from heapq import heappush, heappop
class MedianFinder:
def __init__(self):
"""
initialize your data structure here.
A max-heap to store the smaller half of the input numbers
A min-heap to store the larger half of the input numbers
"""
self.minheap, self.maxheap = []... | ysonggit/leetcode_python | 0295_FindMedianfromDataStream.py | 0295_FindMedianfromDataStream.py | py | 1,360 | python | en | code | 1 | github-code | 13 |
10887855732 | import optuna
import pandas as pd
import numpy as np
import xgboost as xgb
from dotenv import dotenv_values
from sklearn.model_selection import train_test_split
config = dotenv_values('../../.env')
train = pd.read_parquet(config["ENGINEERED_DATA"] + "viml_train_V1.parquet")
def amex_metric_mod(y_true, y_pred):
l... | Dael-the-Mailman/ML-Capstone-Project | models/model_6/xgb.py | xgb.py | py | 3,926 | python | en | code | 0 | github-code | 13 |
4278345695 | from .dependencies import *
def get_tadm_picture_callbacks(app):
@app.callback(
Output("tadm-images", "items"),
Input("tadm-pictures-table", "selectionChanged"),
Input("tadm-pictures-table", "rowData"),
)
def get_tadm_pictures(selection, data):
if ctx.triggered_id == "tadm-... | AaronRipleyQiagen/NeuMoDxRawDataServices.SystemQCDataSync | RunReview/Callbacks/tadm_pictures.py | tadm_pictures.py | py | 11,334 | python | en | code | 0 | github-code | 13 |
24362270366 | import sqlite3
from dataclasses import dataclass
@dataclass
class User:
name: str
age: int
gender: str
# class User:
# def __init__(self, name: str, age: int, gender : str):
# self.name = name
# self.age = age
# self.gender = gender
#
# try:
# connection = sqlite3.connect(... | Den4ik20020/modul4 | modul3/lesson11/1.py | 1.py | py | 2,131 | python | en | code | 0 | github-code | 13 |
12700194915 | # -*- coding: utf-8 -*-
import scrapy
from bs4 import BeautifulSoup
from finance_crawl.items import FinanceCrawlItem
import json
import requests
class TvbsSpider(scrapy.Spider):
name = 'tvbs'
allowed_domains = ['news.tvbs.com.tw']
# start_urls = ['https://news.tvbs.com.tw/news/LoadMoreOverview?limit=30&offs... | plusoneee/crawl.collection | finance_news/finance_crawl/spiders/tvbs.py | tvbs.py | py | 1,878 | python | en | code | 0 | github-code | 13 |
30140707590 | import os
import sys
import time
import cutil
import signal
import logging
from scraper_monitor import scraper_monitor
from models import db_session, Setting, Whatif, NoResultFound, DBSession
from scraper_lib import Scraper
from web_wrapper import DriverSeleniumPhantomJS, DriverRequests
# Create logger for this script... | xtream1101/scrape-xkcd | xkcd-whatif.py | xkcd-whatif.py | py | 7,877 | python | en | code | 0 | github-code | 13 |
5408702329 | import os
import datetime
from django.contrib.auth.mixins import LoginRequiredMixin
from django.views.generic import (
TemplateView,
ListView,
CreateView,
UpdateView,
)
from django.urls import reverse_lazy
from django.shortcuts import redirect
from items.models import SpotifySession, Comment, Item
from... | titou386/OCmusic | items/views.py | views.py | py | 6,798 | python | en | code | 0 | github-code | 13 |
2864457288 | import httplib
import mock
import stubout
import webtest
from google.apputils import app
from google.apputils import basetest
from simian.mac import admin
from simian.mac import models
from simian.mac.admin import main as gae_main
from simian.mac.common import auth
from tests.simian.mac.common import test
@mock.p... | googlearchive/simian | src/tests/simian/mac/admin/groups_test.py | groups_test.py | py | 5,642 | python | en | code | 334 | github-code | 13 |
26455531432 | import cv2
import mediapipe as mp
mp_drawing = mp.solutions.drawing_utils
mp_hands = mp.solutions.hands
cap = cv2.VideoCapture(0)
width = int(cap.get(cv2.CAP_PROP_FRAME_WIDTH))
height = int(cap.get(cv2.CAP_PROP_FRAME_HEIGHT))
line_x = width // 3
line_y_top = height // 3
line_y_bottom = height * 2 // 3
line_height = ... | diegoperea20/hand-interaction-lines | lines.py | lines.py | py | 2,162 | python | en | code | 0 | github-code | 13 |
72124305937 | from django.urls import path
from .views import (
compare_games_view, global_sales_view,
compare_publishers_productions, compare_genres_view,
)
namespace = 'api'
urlpatterns = [
path('compare-games/',compare_games_view, name='compare_games'),
path('global-sale/', global_sales_view, name='global-s... | disciple-zarrin/cloud | analytical_service/api/urls.py | urls.py | py | 507 | python | en | code | 1 | github-code | 13 |
17537016756 | import sv
import vtk
# FROM https://github.com/SimVascular/SimVascular-Tests/blob/master/new-api-tests/graphics/graphics.py
def add_line(renderer, pt1, pt2, color=[1.0, 1.0, 1.0], width=2):
line = vtk.vtkLineSource()
line.SetPoint1(pt1)
line.SetPoint2(pt2)
line.Update()
polydata = line.GetOutput()
... | eric-yim/simvascular_scripts | graphics.py | graphics.py | py | 10,604 | python | en | code | 3 | github-code | 13 |
23149198725 | # Evergreen Tweets
# By @5amwiltshire
# Version 1.0
import datetime
import tweepy
import random
import gspread
from _constant import *
from gdocs import sheet_tweets, sheet_log
auth = tweepy.OAuthHandler(CONSUMER_KEY, CONSUMER_SECRET)
auth.set_access_token(ACCESS_KEY, ACCESS_SECRET)
api = tweepy.API(auth... | 5amwiltshire/evergreentweets | main.py | main.py | py | 3,680 | python | en | code | 0 | github-code | 13 |
35173312920 | import logging
from typing import Dict, Sequence, TypeVar, Generic, List
from io import StringIO
E = TypeVar('E')
class Element:
class_ = []
output = StringIO()
def __init__(self, *args, **kwargs):
super().__init__()
self.children = []
if args:
for arg in args:
... | iuantu/openform | app/markup.py | markup.py | py | 4,548 | python | en | code | 9 | github-code | 13 |
73491841936 | import os
import pickle as pkl
import numpy as np
from collections import defaultdict
def sequence_ids(file_path,file_name):
IdsL = [] # L is for denoting list
file_path = os.path.join(file_path,file_name+".fasta")
file = open(file_path,'r')
for line in file:
if line[0] == '>':
IdsL... | DhananjayKimothi/Supervised-BioRepL | HSuVec_and_BLAST/utils_herierchical_approach.py | utils_herierchical_approach.py | py | 3,811 | python | en | code | 1 | github-code | 13 |
20463715038 | import sys
sys.path.append('../../')
from hydroDL import master, utils
from hydroDL.data import camels
from hydroDL.master import default
from hydroDL.model import rnn, crit, train
import os
import numpy as np
import torch
from collections import OrderedDict
import random
import json
import datetime as dt
## fix the ... | mhpi/dPLHBVrelease | hydroDL-dev/example/dPLHBV/traindPLHBV.py | traindPLHBV.py | py | 13,923 | python | en | code | 5 | github-code | 13 |
39167917299 | # -*- coding: utf-8 -*-
# @Author: Macpotty
# @Date: 2016-03-12 09:58:53
# @Last Modified by: Macsnow
# @Last Modified time: 2017-04-01 08:58:22
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.animation as animation
import copy
# V = np.arange(10)
# E = np.random.randint(1, 50, size=[10, 10])
... | Thrimbda/python_code | GeneticAlgorithm/GeneticAlgorithm.py | GeneticAlgorithm.py | py | 8,447 | python | en | code | 1 | github-code | 13 |
219482703 | def Qsort(left, right):
if left < right:
pivot = arr[right]
pos = left
for i in range(left, right):
if arr[i] <= pivot:
arr[i], arr[pos] = arr[pos], arr[i]
pos += 1
arr[right], arr[pos] = arr[pos], arr[right]
Qsort(left, pos - 1)
... | ignis535/baekjoon | DFS, BFS, 그래프/퀵정렬.py | 퀵정렬.py | py | 506 | python | en | code | 0 | github-code | 13 |
5584259911 | #消息队列通信 通过消息包传递
# 在同一时刻,只能有一个进程来取值,它内部有一个锁的机制。那么另外一个进程就会阻塞一会,但是阻塞的时间非常短
# 队列能保证数据安全,同一个数据,不能被多个进程获取。
from multiprocessing import Queue,Process
from time import sleep
from random import randint
#创建消息队列
# q = Queue(5) 自定义队列大小 5 个 Queue(maxsize = 0) 默认值是根据内存大小存放个数
#
# def request():
# for i in range(20):
#... | ivoryli/myproject | class/phase2/current/day02/queue_1.py | queue_1.py | py | 3,933 | python | en | code | 0 | github-code | 13 |
15489289221 | import requests
from django.shortcuts import render
def home(request):
url='http://api.openweathermap.org/data/2.5/weather?q={}&units=imperial&appid=8fc1bb7939c21d3e79b02852cd3d6e79'
if request.method=='POST':
city=request.POST['city']
#city='las vegas'
r=requests.get(url.format(city)).jso... | mrmoon007/Weather-Forecast | home/views.py | views.py | py | 709 | python | en | code | 0 | github-code | 13 |
16184812933 | """
정렬된 배열에서 특정 수의 개수 구하기
- 시간 복잡도 O(logN)으로 알고리즘을 설계하지 않으면 시간초과 판정
- 입력 : N, x(1 <= N <= 1,000,000, -10^9 <= x <= 10^9)
N개의 정수(-10^9 <= 각 원소의 값 <= 10^9)
- 출력 : 수열의 원소 중에서 값이 x인 원소의 개수, 없으면 -1을 출력
"""
from sys import stdin
# 정렬된 수열에서 값이 x인 원소의 개수를 세는 메서드
def count_by_value(array, x):
... | akana0321/Algorithm | 이것이 코딩테스트다 with 파이썬/Previous_Question_by_Algorithm_Type/specific_number.py | specific_number.py | py | 3,184 | python | ko | code | 0 | github-code | 13 |
74870472016 | N, K = list(map(int, input().split()))
idx, cur = 1, 0
needs = list(map(int, input().split()))
needs = [[i+1,j] for i, j in enumerate(needs)]
while True:
least = min(needs, key=lambda x:x[1])[1]
if least * N < K:
K -= least * N
needs = [(i, j-least) for i,j in needs if j > least]
N = l... | yeung66/leetcode-everyday | py/ponyai-1.py | ponyai-1.py | py | 391 | python | en | code | 0 | github-code | 13 |
2852591705 | # pip install GitPython mteb beir seaborn
import os
import random
import seaborn as sns
import matplotlib.pyplot as plt
from mteb import MTEB
from mteb.evaluation.evaluators.utils import cos_sim
import numpy as np
import pandas as pd
from sentence_transformers import SentenceTransformer
import torch
if os.path.exist... | embeddings-benchmark/mtebscripts | plotstables/dataset_sim.py | dataset_sim.py | py | 9,421 | python | en | code | 7 | github-code | 13 |
19147172654 | import json
from gdown.download_folder import download_and_parse_google_drive_link # noqa
from gdown.download_folder import get_directory_structure # noqa
def nest_dict(dict1):
result = {}
for k, v in dict1.items():
# for each key call method split_rec which
# will split keys to form recurs... | ethanluoyc/corax | corax/datasets/tfds/vd4rl/generate_vd4rl_file_list.py | generate_vd4rl_file_list.py | py | 1,127 | python | en | code | 27 | github-code | 13 |
6105640987 | import joblib
import shap
from utils.settings import *
from utils.utils import load_data
import argparse
import numpy as np
parser = argparse.ArgumentParser()
parser.add_argument('-c', '--combined', action='store_true',
help='Path to model which should be explained')
parser.add_argument('-s', '--sa... | MiriUll/text_complexity | feature_relevance_analysis.py | feature_relevance_analysis.py | py | 1,705 | python | en | code | 3 | github-code | 13 |
36733262750 | #!/usr/bin/python3
""" Takes in a URL and an email, sends a POST request to the passed URL
with the email as a parameter, and displays the body of the response.
"""
if __name__ == "__main__":
from urllib.request import Request, urlopen
from urllib.parse import urlencode
import sys
url = sys.argv[1]
... | SNderi/alx-higher_level_programming | 0x11-python-network_1/2-post_email.py | 2-post_email.py | py | 588 | python | en | code | 0 | github-code | 13 |
10385692015 | import matplotlib
matplotlib.use('Agg')
import seaborn as sns, numpy as np
sns.set();
#np.random.seed(0)
#x = np.random.randn(100)
#sns_plot = sns.distplot(x)
#figure = sns_plot.get_figure()
#figure.savefig('/tmp/yzy.output.png', dpi=400)
import fileinput
import time
# _pos_dict = {
# "U_PREF": 30,
# "V_AUDIEN... | alever520/tensorflow-ctr | python/yzy/data/parser/ps_log_parser.py | ps_log_parser.py | py | 3,628 | python | en | code | 0 | github-code | 13 |
4114903898 | from djitellopy import tello
from threading import Thread
from pygame import mixer
import TestKeyboard as kp
import numpy as np
import time
import cv2
import os
kp.init()
mixer.init()
me = tello.Tello()
me.connect()
print(me.get_battery())
global img
me.streamon()
w,h = 360,200
fbRange = [6200,6800]... | Oscar6647/Parker-Drone | FotoDrone.py | FotoDrone.py | py | 2,683 | python | en | code | 0 | github-code | 13 |
28567754298 | """
Module Docstring
"""
import pandas as pd
import plotly.express as px
import snoop
from dash import Dash, dash_table, dcc, html
from snoop import pp
def type_watch(source, value):
return f"type({source})", type(value)
snoop.install(watch_extras=[type_watch])
app = Dash(__name__)
df = pd.read_csv(
"http... | miccaldas/oficina | oficina/dash/app.py | app.py | py | 742 | python | en | code | 0 | github-code | 13 |
10446825046 | import torch
import torch.nn as nn
import torch.nn.functional as F
from blocks import *
class ResNet(nn.Module):
def __init__(self, block, num_blocks, in_channel=3, zero_init_residual=False):
super(ResNet, self).__init__()
self.in_planes = 64
self.conv1 = nn.Conv2d(in_channel, 64, kernel... | khangt1k25/Contrastive-Bottleneck-Segmentation | models.py | models.py | py | 5,678 | python | en | code | 0 | github-code | 13 |
39352537376 | class Time:
"""Represents the time of day.
attributes: hour, minute, second
"""
def __init__(self, hour=0, minute=0, second=0):
"""Initializes a time object.
hour: int
minute: int
second: int or float
"""
self.hour = hour
self.minute = minu... | gicanon/class_time | class Time.py | class Time.py | py | 5,702 | python | en | code | 0 | github-code | 13 |
27409432235 | import sys
def main():
infile = sys.argv[1]
outfile = sys.argv[2]
with open(infile, 'r') as f:
with open(outfile,'w') as out:
out.write( "track type=wiggle_0" )
current_chrom = None
total = 0
reads = {}
for line in f:
... | gwlilabmit/MTC_2023_Scripts | Raw Data Analysis Scripts/density_to_wig.py | density_to_wig.py | py | 2,290 | python | en | code | 0 | github-code | 13 |
26414775142 | from ursina import *
import GameConfiguration
from Screens.Screen import Screen
from Graphics.Container import Container
from Graphics.GameButton import GameButton
from utils.Event import Event
from .TestingCategories.Entity.Entity import Entity
from .TestingCategories.UI.UI import UI
from .TestingCategories.Compone... | GDcheeriosYT/Gentrys-Quest-Ursina | Screens/Testing/Testing.py | Testing.py | py | 5,773 | python | en | code | 1 | github-code | 13 |
16621512721 | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
#
from similarity_words import *
import sys
import codecs
import re
import argparse
#reload(sys)
#sys.stdout = codecs.getwriter('utf-8')(sys.stdout)
#sys.stdin = codecs.getreader('utf-8')(sys.stdin)
class duplicateFilter(object):
def __init__(self, threshold = 0.65):... | DrSkippy/Data-Science-45min-Intros | pos-tagging/duplicate_filter.py | duplicate_filter.py | py | 4,989 | python | en | code | 1,560 | github-code | 13 |
37063772289 | # python3
# -*- coding: utf-8 -*-
# @File : rst2md.py
# @Desc : rst & md converter
# @Project : docTools
# @Time : 19-6-3 上午10:42
# @Author : Loopy
# @Contact : peter@mail.loopy.tech
# @License : CC BY-NC-SA 4.0 (subject to project license)
import requests
def help_md_rst(from_file, to_file, data):
"""... | loopyme/docTools | rst2md.py | rst2md.py | py | 1,237 | python | en | code | 0 | github-code | 13 |
33578949925 | from typing import List
from schemas import BucketSchema, BucketUpdateSchema
from sqlalchemy.orm import Session
from fastapi import HTTPException
from db.models import User as UserModel, Bucket as BucketModel
from db.repository.bucket import (
query_bucket_by_id,
query_bucket_by_user_id,
query_buckets_by_us... | rexsimiloluwah/fastapi-github-actions-test | src/controllers/bucket.py | bucket.py | py | 4,142 | python | en | code | 1 | github-code | 13 |
24556870341 | import enum
from dataclasses import dataclass
from typing import Any, Union
from trees import tree_exceptions
from trees.binary_trees import binary_tree
class Color(enum.Enum):
"""Color definition for Red-Black Tree."""
RED = enum.auto()
BLACK = enum.auto()
@dataclass
class LeafNode(binary_tree.Node... | burpeesDaily/python-sample-code | trees/binary_trees/red_black_tree.py | red_black_tree.py | py | 22,400 | python | en | code | 10 | github-code | 13 |
70662700819 | import time
import matplotlib.pyplot as plt
import numpy as np
import math
def pow(x,a):
return math.pow(x,a)
plt.ion()
figure,ax=plt.subplots()
lines,=ax.plot([],[],color="red")
ax.set_autoscaley_on(True)
ax.grid()
X=np.linspace(-1.8,1.8,1000)
a=1
while True:
#设置函数
y = [pow(pow(x, 2), 1 / 3) + 0.9 * pow(3.... | LxmSpirit/PyhtonPycharm | untitled/123321/2.py | 2.py | py | 556 | python | en | code | 0 | github-code | 13 |
3870197291 | import hppfcl
import pinocchio as pin
import numpy as np
from utils_render import create_complex_scene
def reset_objects_placements(scene, transforms):
for s in range(len(scene.collision_objects)):
scene.collision_objects[s].setTransform(transforms[s])
# The scene is made of a box (6 walls) with a bunch o... | agimus-project/winter-school-2023 | simulation/sim2_collision/aws_collision.py | aws_collision.py | py | 3,200 | python | en | code | 0 | github-code | 13 |
37158320414 | from distutils.command import register
from django.contrib import admin
# Register your models here.
from app.models import Club, Activity, ClubPartnerPreregister, ClubPartner, Category, ClubSeatActivity, \
ClubSeatActivityPlace, ClubSeat
class AdminClub(admin.ModelAdmin):
list_display = ('name','status',)
... | BrendaManrique/cod-bookingApp | app/admin.py | admin.py | py | 1,799 | python | en | code | 0 | github-code | 13 |
35037941553 | """
0 right
1 down
2 left
3 up
"""
# Qlearning implementation in example 6.6
import gym
import numpy as np
import matplotlib.pyplot as plt
from cliffWalking import CustomEnvironment
float_formatter = "{:.3f}".format
np.set_printoptions(formatter={'float_kind': float_formatter})
env = CustomEnvironmen... | Aditya12123/RL | qCliff.py | qCliff.py | py | 1,658 | python | en | code | 0 | github-code | 13 |
16863741943 | from __future__ import division
from __future__ import print_function
from builtins import map
from builtins import str
from builtins import range
from past.utils import old_div
import sys
import networkx as nx
import chicago_edge_scores as ces
import random
def is_shaved_tail(G,shave_round,shaved_degree,shave_limit):... | DovetailGenomics/HiRise_July2015_GR | scripts/component_chunk_filter.py | component_chunk_filter.py | py | 21,779 | python | en | code | 28 | github-code | 13 |
42828601189 | from clean import preprocess
import sqlite3
import pandas as pd
import spacy
import re
from sklearn.naive_bayes import MultinomialNB
from sklearn.svm import SVC
from sklearn.pipeline import Pipeline
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.svm import LinearSVC
from sklearn.preprocessing ... | saireddyavs/Avanov | model/main.py | main.py | py | 5,878 | python | en | code | 0 | github-code | 13 |
9018671678 | import socket
target_host = "127.0.0.1"
target_port = 9997
#ソケットオブジェクトの作成
client = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
#データの送信
client.sendto(b"AAABBBCCC", (target_host, target_port))
#データの受信
data, address = client.recvfrom(4096)
print("Success!")
print(data.decode('utf-8'))
print(address)
client.clos... | ryu1998/Security_Practice | base practice/udp_client.py | udp_client.py | py | 373 | python | en | code | 0 | github-code | 13 |
31097820542 | # -*- coding: utf-8 -*-
"""
Created on Thu May 3 08:46:17 2018
@author: Thierry CHAUVIER
"""
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from sklearn import metrics
class T_roc_curve():
"""
Return metrics on ROC curve for a binary classifier
"""
def __init__(self,y_test, ... | tchau2403/p6repo | t_lib_util.py | t_lib_util.py | py | 11,051 | python | fr | code | 0 | github-code | 13 |
71717271059 | #!/usr/bin/env python
# coding: utf-8
'''
使用迭代方法
'''
def fab(n):
n1 = 1
n2 = 1
n3 = 1
if n < 1:
print('输入有误!')
return -1
while (n-2) > 0:
n3 = n2 + n1
n1 = n2
n2 = n3
n -= 1
return n3
result = fab(40)
if result != -1:
print('总共有%d对小兔崽子诞生!... | auspbro/code-snippets | Python/pycode_LXF/fab_1.py | fab_1.py | py | 371 | python | en | code | 2 | github-code | 13 |
72915493458 | import logging
import os.path
import pytest
from qutebrowser.qt.core import QUrl
from qutebrowser.browser import pdfjs
from qutebrowser.utils import urlmatch
pytestmark = [pytest.mark.usefixtures('data_tmpdir')]
@pytest.mark.parametrize('available, snippet', [
(True, '<title>PDF.js viewer</title>'),
(Fals... | qutebrowser/qutebrowser | tests/unit/browser/test_pdfjs.py | test_pdfjs.py | py | 8,101 | python | en | code | 9,084 | github-code | 13 |
25328093150 | import pandas as pd
import altair as alt
df = pd.read_csv('data/beer.csv')
df['time'] = pd.to_timedelta(df['time'] + ':00')
df = pd.melt(df,
id_vars=['time', 'beer', 'ml', 'abv'],
value_vars=['Mark', 'Max', 'Adam'],
var_name='name', value_name='quantity'
)
weight = pd.DataFrame({
'name': ['Max', 'Mar... | maxhumber/talks | 2018-05-03_data_creationism/03-2_beer.py | 03-2_beer.py | py | 2,082 | python | en | code | 8 | github-code | 13 |
34834733489 | import re
from sqlalchemy import Column, DateTime, ForeignKeyConstraint, Integer, String
from sqlalchemy.orm import relationship, validates
from database import Base
# it seems that github has a limit of:
# * 39 chars for usernames (according to https://github.com/shinnn/github-username-regex)
# * 100 chars for rep... | wk8/github_retry | models.py | models.py | py | 3,240 | python | en | code | 0 | github-code | 13 |
34935977015 | from keras.models import model_from_yaml
from keras.optimizers import Adam
from keras.datasets import fashion_mnist
from keras.utils import to_categorical
yaml_file = open('best-gBest-model.yaml', 'r')
loaded_model_yaml = yaml_file.read()
yaml_file.close()
loaded_model = model_from_yaml(loaded_model_yaml)
loaded_mode... | seamusl/OpenNAS-v1 | pso-util-build_model.py | pso-util-build_model.py | py | 865 | python | en | code | 0 | github-code | 13 |
38324938635 | from django.utils.translation import ugettext_lazy as _
from rest_framework import serializers
from app.geo import models
class State(serializers.ModelSerializer):
initials = serializers.CharField()
class Meta:
model = models.State
exclude = ('id', )
def create(self, validated_data):
... | shinneider/events-challenge | django-event/app/geo/api_v1/serializer/event.py | event.py | py | 1,304 | python | en | code | 0 | github-code | 13 |
11939258472 | from django.db import models
from django.utils import timezone
# Main model of Elevators
class Elevator(models.Model):
direction = models.CharField(max_length=64,choices=(('up','up'),('down','down'),('ideal','ideal')),default='ideal')
door = models.CharField(max_length=64,choices=(('open','open'),('close','clo... | knowarunyadav/elevator_project | api/models.py | models.py | py | 2,496 | python | en | code | 0 | github-code | 13 |
39406011780 | import sys
import os
import json
import urllib2
import xmltodict
query = 'https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=sra&term='
fetch = 'https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=sra&id='
sra_file = open('SRA_IDs.txt', 'r')
for line in sra_file:
# Get the current SRA ID.
sra... | spficklin/Kamiak-GEM | scripts/retrieve_sample_metadata.py | retrieve_sample_metadata.py | py | 1,099 | python | en | code | 0 | github-code | 13 |
19254035492 | import pandas as pd
import plotly.express as px
import numpy as np
import pycountry_convert as pc
import dash
from dash import dcc
from dash import html
import dash_bootstrap_components as dbc
from dash.dependencies import Input, Output
# http://127.0.0.1:8050/ to go to the website
app = dash.Dash(__name__, external... | HieuPhamNgoc/Data-Science-Project-Group-2 | HieuWork/second.py | second.py | py | 4,508 | python | en | code | 0 | github-code | 13 |
41893672772 | #coding:utf-8
'''
读取基因的gff数据
[geneID:[flag,start,end]]
1.需要基因组gff注释文件
2.ot2gtf脚本处理并且过滤之后的文件
3.每个基因名字的长度信息
eg: Ghir_A09G006360 填15
4.sgRNA的结果文件 sgRNAcas9_report.xls
5.输出文件
'''
def usage():
print("usage:\n")
print("\t"+"-h|--help"+"\t"+"print help information")
print("\t"+"-g|--gff="+"\t"+"gff file path ... | zpliu1126/Bioinformatic | sgRNAcas9/comparisonsgRNA.py | comparisonsgRNA.py | py | 5,434 | python | en | code | 0 | github-code | 13 |
40336517755 | import os
import numpy as np
from skimage import io
import tensorflow as tf
import matplotlib.pyplot as plt
from PIL import Image
from tqdm import tqdm
from utils.utils import working_directory
from utils.download_data import download_data_material
from utils.dirs import listdir_nohidden
from utils.logger import Logge... | yigitozgumus/Polimi_Thesis | utils/DataLoader.py | DataLoader.py | py | 18,319 | python | en | code | 5 | github-code | 13 |
8909799305 | import json
import os
from flask import Blueprint, request, jsonify, send_file, abort
from flask_jwt_extended import jwt_required
analysis = Blueprint("analysis", __name__)
# api/analysis/model/<folder>/<file>
@analysis.route("/model/<folder>/<file>", methods=["GET"])
def serve_model(folder="tfjs_model", f... | marinov98/Sign-Lang-Tutor | api/routes/analysis.py | analysis.py | py | 700 | python | en | code | 3 | github-code | 13 |
30599368735 | """Exercise from https://exercism.io/my/tracks/python."""
import sys
import time
def flatten(iterable):
"""Returns a flattened list of non-list-like objects from `iterable` in DFS
traversal order.
"""
return list(items_from(iterable))
def items_from(iterable):
"""Genertor that yields every non-l... | cglacet/exercism-python | flatten-array/complete_flatten_array.py | complete_flatten_array.py | py | 3,190 | python | en | code | 5 | github-code | 13 |
41337144145 | import requests
from requests.exceptions import RequestException
from bs4 import BeautifulSoup
import csv
import codecs
from multiprocessing import Pool
import random
import time
import sys
ua_list = [
"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/22.0.1207.1 Safari/537.1",
... | otracyleeo/anjuke | anjuke_ks.py | anjuke_ks.py | py | 7,037 | python | en | code | 0 | github-code | 13 |
14386402590 | """functions for updating the pagebrowser"""
"""test this locally like thus:
curl http://localhost:5000/archivefiles/1/2495 -d status=1
curl -X PUT -d status=2 http://localhost:5000/archivefiles/1/2495
"""
import logging
from restrepo import celery_tasks
# dont spoil our log with lots of info about requests handl... | sejarah-nusantara/repository | src/restrepo/restrepo/pagebrowser/update.py | update.py | py | 997 | python | en | code | 0 | github-code | 13 |
15864172815 | # -*- coding: utf-8 -*-
# This file is part of PyBOSSA.
#
# PyBOSSA is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# PyBOSSA... | justinsalamon/sonyc-citizensound | sounddata.py | sounddata.py | py | 1,427 | python | en | code | 0 | github-code | 13 |
7517086862 | """
CUDA_VISIBLE_DEVICES=1 nsys profile --force-overwrite true -o "output/nsys" -c cudaProfilerApi -t cuda,cublas,nvtx -e EMIT_NVTX=1 python -c "from boardlaw.multinet import *; profile()"
docker cp boardlaw:/code/output/nsys.qdrep ~/Code/tmp/nsys.qdrep
/usr/local/NVIDIA-Nsight-Compute/nv-nsight-cu-cli -f -o prof/nc... | andyljones/boardlaw | rebar/profiling.py | profiling.py | py | 1,746 | python | en | code | 29 | github-code | 13 |
19971509706 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
@Time : 2019/7/7 3:45
@Author : miaoweiwei
@File : test.py
@Software: PyCharm
@Desc :
"""
import tensorflow as tf
hello = tf.constant('Hello, TensorFlow!')
sess = tf.Session()
print(sess.run(hello))
if __name__ == '__main__':
print(tf.__version__)
| miaoweiwei/Smart-Scales | smartscales/test.py | test.py | py | 316 | python | en | code | 0 | github-code | 13 |
19649398432 | # type:str UNICODE gegevens
# Encoding is mapping tussen bytes en karakters
# ASCII encoding: Bevat 127 tekens. 32 -> SPACE
# ANSI (heel oud, microsoft) 256 tekens (1 byte)
# 'latin-1' 256 tekens
# UNICODE Encoding
# UTF-8: Twee bytes na elkaar kunnen 1 karakter zijn.
# UTF-16
f = open("c:\\Users\\denni\\test.txt", ... | Xorbit17/motoblog | open_files_lesson.py | open_files_lesson.py | py | 476 | python | nl | code | 0 | github-code | 13 |
38618931331 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import random
from multiprocessing import Process
import uwsgi
from pyprometheus.contrib.uwsgi_features import UWSGICollector, UWSGIStorage, UWSGIFlushStorage
from pyprometheus.registry import BaseRegistry
from pyprometheus.utils.exposition import registry_to_tex... | Lispython/pyprometheus | tests/test_uwsgi_collector.py | test_uwsgi_collector.py | py | 9,606 | python | en | code | 13 | github-code | 13 |
32506153814 | import pandas as pd
import datetime as dt
import geopandas as gpd
import folium
import branca.colormap as cm
from folium.plugins import TimestampedGeoJson
#from folium.features import GeoJsonPopup, GeoJsonTooltip
#Reading json file
bikedata=pd.read_json('/Users/alexanderlindell/Documents/Programmering /Python/Sthlm-Ebi... | ACRLindell/Sthlm-EbikeVis- | BikeVis.py | BikeVis.py | py | 2,741 | python | en | code | 1 | github-code | 13 |
8933667673 | import pandas as pd
unpickled_df = pd.read_pickle("./mydata.pkl")
# for index, row in unpickled_df.iterrows():
# print("index", index)
# print("row", row)
print(unpickled_df.head)
apps = unpickled_df.iterrows()
count_row = unpickled_df.shape[0]
print("row count is: ", count_row)
# while True:
# try:
... | MzXuan/RL_motion_plan | data/load_test.py | load_test.py | py | 634 | python | en | code | 2 | github-code | 13 |
376664597 | import matplotlib.pyplot as plt
from math import *
def plot(x,y):
fig = plt.figure(figsize=(7,7))
ax = fig.add_axes([0.06, 0.05, 0.6, 0.9])
ax.plot(x,y,'go-')
plt.show()
plt.close('all')
def getFn(x,a0,an,bn):
f = pi/2
for n in range(1,11):
f = f + (eval(an)*cos(n*x))+(eval(bn)*sin(n*x))
return f
def start... | bleezmo/mat434 | fourier_series.py | fourier_series.py | py | 586 | python | en | code | 0 | github-code | 13 |
688734184 | #!/usr/bin/env python
#
# Modules can't add the same outbox multiple times
#
from I3Tray import *
tray = I3Tray()
from icecube.icetray import I3Module
class DoubleOutboxModule(I3Module):
def __init__(self, context):
I3Module.__init__(self, context)
def Configure(self):
self.AddOutBox("box")
... | wardVD/IceSimV05 | src/icetray/resources/test/double_outbox.py | double_outbox.py | py | 674 | python | en | code | 1 | github-code | 13 |
8613816004 | #!/usr/bin/env python3
from pwn import *
from colorama import Fore
offset = input("Specify Offset: ")
buff = 'A' * int(offset)
program_name = input('Please specify the program to overflow. ')
program_name = program_name.strip()
program = ELF(program_name)
function_address = program.symbols['flag']
EBP = b'BBBB'
... | GreyStrawHat/Portfolio | buffer_overflow.py | buffer_overflow.py | py | 987 | python | en | code | 0 | github-code | 13 |
35184342027 | import os
from strategy import *
from base_options import *
from player import MultiPlayer
def IPDRoundRobin(players, num_iter, against_itself=False, return_ranking=False, save_plot=False, save_img=False, DEBUG=False, root=''):
"""Round Robin tournament."""
n = len(players)
p = {obj:[0] * num_iter for obj... | eliabntt/iterative_prisoner_dilemma | code/ipdmp.py | ipdmp.py | py | 6,751 | python | en | code | 3 | github-code | 13 |
20850709393 | import json
import os
from urllib.request import Request, urlopen
def _build_header_as_dict():
"""return HTTP request header as dict
token to call API is specified
as a environment variable `SLACK_BOT_USER_TOKEN`.
"""
token = os.environ.get("SLACK_BOT_USER_TOKEN")
if token is None:
ra... | ftnext/diy-slack-post | postslack/http.py | http.py | py | 912 | python | en | code | 3 | github-code | 13 |
21668740888 | # -*- coding: utf-8 -*-
"""
Model PyTorch implementation.
"""
import torch
import torch.nn as nn
import torch.nn.functional as F
import numpy as np
from .backbone.lucas import AlignedXception
class Model(nn.Module):
def __init__(self, backbone='lucas',
filters=[32, 64, 128, 256, 256, 512], pi=0... | BCV-Uniandes/SAMA | models/model.py | model.py | py | 9,800 | python | en | code | 1 | github-code | 13 |
7063501566 | from flask_login import current_user, login_required
from flask_restful import Resource, fields, marshal
from sqlalchemy.orm import aliased
from app import db
from app.chat.models import Message
from app.users.models import User
chat_fields = {
'recipientId': fields.Integer,
'recipientName': fields.... | micpst/chat-app | backend/app/chat/resources.py | resources.py | py | 2,524 | python | en | code | 0 | github-code | 13 |
17493828714 | import numpy as np
import math
def score_function(A, B):
"""
A and B are pitch-class representations
:param A:
:param B:
:return:
"""
denominator = len(A | B)
if denominator == 0:
# Means both are silence
return 1
AandB = A & B
AorB = A | B
posTerm = len(Aan... | qsdfo/orchestration_aws | DatasetManager/DatasetManager/arrangement/nw_align.py | nw_align.py | py | 4,542 | python | en | code | 0 | github-code | 13 |
22021475402 | import pygame
pygame.init()
white = (255,255,255)
black = (0,0,0)
gameDisplay = pygame.display.set_mode((800,600))
pygame.display.set_caption('Slither')
gameExit = False
lead_x = 300
lead_y = 300
lead_x_change = 0 #for continuous pressing of the key, it should move
lead_y_change = 0
clock = pygame.time.Clock() ... | yashasviananya/test-5 | test3.py | test3.py | py | 1,425 | python | en | code | 0 | github-code | 13 |
35444486631 | from flask import Flask
from flask_restful import Resource, Api
import json
# it will run this file automatically
# import jx_cpu_kprobe
from subprocess import call
from threading import Thread
import sys
import v2_grpc_client
import threading
app = Flask(__name__)
api = Api(app)
# node2port
node2por... | victorliu-sq/theebees | v2/v2_coordinator.py | v2_coordinator.py | py | 1,290 | python | en | code | 0 | github-code | 13 |
71830985299 | L = ['Michael', 'Sarah', 'Tracy', 'Bob', 'Jack']
print (L[0:3])
print (L[:3])
print (L[1:3])
print (L[-1])
def trim(num):
if num[:1] == ' ':
return trim(num[1:])
elif num[-1:] == ' ':
return trim(num[:-1])
else:
return num
print (trim(' 123 ')) | amusitelangdan/pythonTest | 20200103py/do_slice.py | do_slice.py | py | 280 | python | en | code | 0 | github-code | 13 |
27049789996 | import os
import numpy as np
import librosa
from matplotlib import pyplot as plt
from sklearn.ensemble import RandomForestClassifier
from sklearn.metrics import accuracy_score, confusion_matrix, ConfusionMatrixDisplay
# Preprocessing
def preprocessing(filename, sample_rate):
print('[Process]: Preprocess... | dmatsanganis/Spoken_Digit_Recognition_System | Source/functions.py | functions.py | py | 12,179 | python | en | code | 0 | github-code | 13 |
41509322975 | #!/usr/bin/env python
from typing import List
class Solution:
def merge(self, intervals: List[List[int]]) -> List[List[int]]:
if not intervals:
return []
intervals.sort(key=lambda x: x[0])
ans = []
prev = intervals[0]
for ele in intervals[1:]:
... | aadi58002/leetcode | python/merge-intervals.py | merge-intervals.py | py | 635 | python | en | code | 0 | github-code | 13 |
13614765410 | class Rlist(object):
class EmptyList(object):
def __len__(self):
return 0
empty = EmptyList()
def __init__(self, first, rest=empty):
self.first = first
self.rest = rest
def __len__(self):
return 1 + len(self.rest)
def __getitem__(self, index):
... | clovery410/mycode | python/chapter-2/lab8-rlist-5.py | lab8-rlist-5.py | py | 1,429 | python | en | code | 1 | github-code | 13 |
15049011542 | # -*- coding: utf-8 -*-
"""
Created on Wed Jun 21 00:18:50 2023
@author: osama
"""
import pandas as pd
import numpy as np
from datetime import date, timedelta
import os
#Directory where the Script loactes
os.chdir('C:/Work/Research/Data Analysis/Tools/Python_Scripts')
from Data_Analyses_Fns import *
Wor... | osamatarabih/LOONE | Extra Scripts/LOONE_DATA_PREP.py | LOONE_DATA_PREP.py | py | 47,225 | python | en | code | 3 | github-code | 13 |
3019702763 | #!/usr/bin/env python
#
import time
import zmq
import sys
# initialie request argument
i1 = 4
i2 = 7
print(sys.argv, len(sys.argv))
if len(sys.argv) > 1:
i1 = int(sys.argv[1])
if len(sys.argv) > 2:
i2 = int(sys.argv[2])
request = {'i1': i1, 'i2': i2}
print("Connecting to 5555")
context = zmq.Context()
socket... | jsk-lecture/software2-Kota-0226 | 0627/zmq/add_two_client.py | add_two_client.py | py | 565 | python | en | code | 0 | github-code | 13 |
24151035424 | import sqlite3
from typing import Any, Optional, List
DATA: List[dict] = [
{'id': 0, 'title': 'A Byte of Python', 'author': 'Swaroop C. H.'},
{'id': 1, 'title': 'Moby-Dick; or, The Whale', 'author': 'Herman Melville'},
{'id': 3, 'title': 'War and Peace', 'author': 'Leo Tolstoy'},
]
class Book:
def _... | ilnrzakirov/Python_advanced | module_14_mvc/homework/models.py | models.py | py | 3,786 | python | en | code | 0 | github-code | 13 |
22977313105 | # -*- coding: utf-8 -*-
"""
Created on Sun Nov 8 21:10:24 2020
@author: mitta
"""
import pulp as p
import time
from datetime import timedelta
x = []
month = [0,1,2,3,4]
m = 3
demand = [0,50,40,70,0]
D = dict(zip(month,demand))
E=5
Hcost=32
Fcost=40
S=200
C=8
OTC=3
OTprice=35
W=6
w ... | divyansh99991/LPDAAHW5 | untitled1.py | untitled1.py | py | 1,540 | python | en | code | 0 | github-code | 13 |
18697918450 | from setuptools import setup
package_name = 'wall_following'
setup(
name=package_name,
version='0.0.0',
packages=[package_name],
data_files=[
('share/ament_index/resource_index/packages',
['resource/' + package_name]),
('share/' + package_name, ['package.xml']),
],
... | cosynus-lix/f1tenth_quickstart_ros2 | src/wall_following/setup.py | setup.py | py | 749 | python | en | code | 1 | github-code | 13 |
70294748178 | from django.shortcuts import render
from django.http import HttpResponseRedirect
from django.urls import reverse
import sweetify
from environment.env import DATA_HORA_ZONA, DATA_ANO
from aluno.forms import Aluno_Form, Matricula_Form, Reclamacao_Form, Confirmar_Matricula_Form
from pessoa.forms import Pessoa_Form
from co... | ismaely/kanguito-academic-system | aluno/views.py | views.py | py | 3,291 | python | pt | code | 1 | github-code | 13 |
22642472664 | import codecs
import datetime as dt
import pickle
import matplotlib.pyplot as plt
#For tokenizing sentences
import nltk
import numpy as np
import pandas as pd
from tqdm import tqdm_notebook as tqdm
from tone_count import *
nltk.download('punkt')
plt.style.use('seaborn-whitegrid')
jpn = 'DB/rate_jpn'
infile = open(jpn... | Vedia-JerezDaniel/CB | JPN/Analysis_preliminary.py | Analysis_preliminary.py | py | 11,754 | python | en | code | 0 | github-code | 13 |
1115430051 | # This is file 5.py
#
# def AppendtoList(s):
# l = [1, 4, 9, 10, 23]
# l.append(s)
# return l
#
#
# print(AppendtoList(90))
# l1 = [1, 2, 5, 20]
# print(l1)
#
# l1 = l1 + [90]
# print(l1)
# def getAverage(s):
# avg = sum(s) / len(s)
# return avg
#
#
# s = [1, 4, 9, 10, 23]
# print(getAverage(s))
def remove... | tripura-kant/Python-Scripting | 250questions/5.py | 5.py | py | 447 | python | en | code | 0 | github-code | 13 |
28126882325 | #20190628
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import os
from tqdm import tqdm
def itx_to_pandas(path):
file = open(path,'r')
a = file.read().splitlines()
file.close()
key = []
values = []
cur = 0
while cur < len(a) - 1 :
if 'WAVES/D/N=' in a[cur... | yypai/ITX-pandas | itx_to_pandas_df.py | itx_to_pandas_df.py | py | 2,738 | python | en | code | 0 | github-code | 13 |
74265554259 | from flask import Flask, render_template, Response, jsonify,request
from Camera import VideoCamera
import cv2
a = 0
app = Flask(__name__)
video_stream = VideoCamera()
@app.route('/',methods=['GET','POST'])
def index():
global a
if request.method == 'POST':
if 'button_name' in request.form:... | Thulasirobocop/Emotion-Detection | Web Application/app.py | app.py | py | 867 | python | en | code | 0 | github-code | 13 |
17061847084 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.ZmEpAePrepayExtParam import ZmEpAePrepayExtParam
class ZhimaCreditEpAeprepayOrderRefundModel(object):
def __init__(self):
self._advance_amount = None
self._ad... | alipay/alipay-sdk-python-all | alipay/aop/api/domain/ZhimaCreditEpAeprepayOrderRefundModel.py | ZhimaCreditEpAeprepayOrderRefundModel.py | py | 7,346 | python | en | code | 241 | github-code | 13 |
27151539434 | from django.test import TestCase, Client
from repository.models import PRIVATE, Repository
from django.contrib.auth.models import User
from branch.models import Branch
from django.urls import reverse, resolve
class BranchTestCase(TestCase):
def setUp(self):
user = User.objects.create(username="user1", pas... | marijamilanovic/UksGitHub | Uks/branch/tests/test_branch.py | test_branch.py | py | 1,323 | python | en | code | 0 | github-code | 13 |
38449248725 | import random
N = 100000 #試行回数
#一回の試行
def montyOneTime():
treasure_door = random.randint(1,3)
#print("司会:宝は",treasure_door)
challengers_choice = random.randint(1,3)
#print("ゲスト:最初の選択",challengers_choice)
#司会の誘導
left_door=[1,2,3]
#当たりの場合
if challengers_choice == treasure_door:
... | bkh4149/aocchi | monty/monty.py | monty.py | py | 2,492 | python | ja | code | 0 | github-code | 13 |
73876167057 | import torch
class ImagesFromChunksCreator():
def __init__(self, chunk_size: int, image_size: int, inner_noise_dim: int, noise_dim: int):
self.__chunk_size = chunk_size
self.image_size = image_size
self.__inner_noise_dim = inner_noise_dim
self.__noise_dim = noise_dim
... | gmum/LocoGAN | src/utils/images_from_chunks_creator.py | images_from_chunks_creator.py | py | 1,776 | python | en | code | 11 | github-code | 13 |
21700636227 | import logging
from django.core.management.base import BaseCommand
from mooringlicensing.components.main.utils import sticker_export, email_stickers_document
logger = logging.getLogger('mooringlicensing')
class Command(BaseCommand):
help = 'Export and email sticker data'
def handle(self, *args, **options):... | jmushtaq/mooringlicensing-old | mooringlicensing/management/commands/export_and_email_sticker_data.py | export_and_email_sticker_data.py | py | 920 | python | en | code | 0 | github-code | 13 |
34824871949 | from tkinter import *
from tkinter import ttk
root = Tk()
# Top row, stick means expand in West.
# Different directions are N S E W NE NW etc
# Padding 4 pixels
Label(root,text = "First Name").grid(row = 0,sticky = W, padx = 4)
# A space for user entry
Entry(root).grid(row = 0, column = 1, sticky = E, pady = 4)... | miketr33/python-learning | tkinter_with_derekbanas/grid_manager.py | grid_manager.py | py | 509 | python | en | code | 0 | github-code | 13 |
8154509261 | import pytest
from pg_grant import NoSuchObjectError
from pg_grant.query import get_all_table_acls, get_table_acl
expected_acls = {
'public': {
# table1 has default privileges, so None is returned.
'table1': None,
# alice is owner, bob was granted all
'table2': {'alice=arwdDxt/ali... | RazerM/pg_grant | tests/query/test_table.py | test_table.py | py | 2,056 | python | en | code | 5 | github-code | 13 |
38924493815 | import threading
import concurrent.futures
from perf.defines import DATA_FEED_CONTAINER, REDIS_CONTAINER, REDIS_EXPORTER_CONTAINER
from perf.state.phase_result_scheduling_state import PhaseResultSchedulingState
from perf.utils import local_now
MAX_RESCHEDULES = 1
class SchedulingState(PhaseResultSchedulingState):
... | dirtyValera/svoe | data_feed/perf/state/scheduling_state.py | scheduling_state.py | py | 7,387 | python | en | code | 12 | github-code | 13 |
19383440824 | import requests as reqs
import os
import sys
def main(fileList :list):
for i, file in enumerate(fileList):
url = file
name = url.split('/')
if name[-1] == '':
name.pop(-1)
name = name[-1]
r = reqs.get(url)
rstr = str(r.content)
rstr = rstr[r... | KirppuAapo/StreamTapeDownloader | StreamTapeDownloader.py | StreamTapeDownloader.py | py | 1,706 | python | en | code | 3 | github-code | 13 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.