seq_id string | text string | repo_name string | sub_path string | file_name string | file_ext string | file_size_in_byte int64 | program_lang string | lang string | doc_type string | stars int64 | dataset string | pt string | api list |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4019428072 | import numpy as np
from sklearn.decomposition import PCA
from sklearn.preprocessing import StandardScaler, MinMaxScaler
from itertools import islice
import random
def batches(batch_size, data_size):
idx_all = random.sample(range(data_size), batch_size)
idx_iter = iter(idx_all)
yield from iter(lambda: lis... | hanyas/mimo | mimo/utils/data.py | data.py | py | 4,485 | python | en | code | 15 | github-code | 21 | [
{
"api_name": "random.sample",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "itertools.islice",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "sklearn.decomposition.PCA",
"line_number": 34,
"usage_type": "argument"
},
{
"api_name": "numpy.sq... |
38525507892 | import ast
import PySimpleGUI as sg
from NetLogoDOE.src.gui.custom_components import title, question_mark_button, number_input, text_input
from NetLogoDOE.src.gui.custom_windows import show_help_window
from NetLogoDOE.src.gui.help_dictionary import help_text
from NetLogoDOE.src.util.Sampler import MonteCarloSampler, ... | robinfaber97/NetLogoDOE | NetLogoDOE/src/gui/navigation/ExperimentScreen.py | ExperimentScreen.py | py | 13,871 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "NetLogoDOE.src.gui.custom_components.title",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "PySimpleGUI.Text",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "NetLogoDOE.src.gui.custom_components.text_input",
"line_number": 17,
"usage_t... |
73036304373 | import numpy
import six
from chainer import cuda
from chainer import function
from chainer.functions.pooling import pooling_2d
from chainer.utils import conv
from chainer.utils import conv_nd
from chainer.utils import type_check
if cuda.cudnn_enabled:
cudnn = cuda.cudnn
libcudnn = cudnn.cudnn
_cudnn_vers... | LiuFang816/SALSTM_py_data | python/pfnet_chainer/chainer-master/chainer/functions/pooling/pooling_nd.py | pooling_nd.py | py | 3,003 | python | en | code | 9 | github-code | 21 | [
{
"api_name": "chainer.cuda.cudnn_enabled",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "chainer.cuda",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "chainer.cuda.cudnn",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "... |
71099285492 | """empty message
Revision ID: b6a6b5923248
Revises: 973e7acfbaab
Create Date: 2019-10-11 14:00:01.197126
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
# revision identifiers, used by Alembic.
revision = 'b6a6b5923248'
down_revision = '973e7acfbaab'
branch_labels = None... | vrcompugo/EV-Manager-Data-API | migrations/versions/b6a6b5923248_.py | b6a6b5923248_.py | py | 1,413 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "alembic.op.alter_column",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "alembic.op",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "sqlalchemy.VARCHAR",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.Stri... |
43026289556 | import pprint
import random
from deap import creator, base, tools, algorithms
# Definindo peso máximo da mochila
PESO_MAXIMO = int(input("Digite o peso máximo da mochila: "))
print(f"O peso maximo é {PESO_MAXIMO}\n")
# Criando itens
def colocarItens(numItems):
items = []
for x in range(numItems):
ite... | danilomichell/Problema-da-mochila-IA | Script/problema_mochila.py | problema_mochila.py | py | 4,086 | python | pt | code | 0 | github-code | 21 | [
{
"api_name": "random.randint",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "random.uniform",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "deap.creator.create",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "deap.creator",
... |
21527726072 | import onnx
import numpy as np
from onnx import numpy_helper
class OnnxParser():
def __init__(self, model):
self.model = model
self.node_list, self.constant_node_list, self.former_layer_dict, self.next_layer_dict = OnnxParser.topo_sort(
self.model)
self.constant_node_output = [... | yaqingLi467/onnx_log | oonxparse.py | oonxparse.py | py | 13,260 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "onnx.numpy_helper.to_array",
"line_number": 123,
"usage_type": "call"
},
{
"api_name": "onnx.numpy_helper",
"line_number": 123,
"usage_type": "attribute"
},
{
"api_name": "onnx.numpy_helper.to_array",
"line_number": 248,
"usage_type": "call"
},
{
"a... |
12478560611 | import torch
import random
import numpy as np
from collections import deque
from snake2 import SnakeGame
from DQN_model import Linear_QNet, QTrainer
from helper import plot
MAX_MEMORY = 100_000
BATCH_SIZE = 1000
LR = 0.005
class Agent:
def __init__(self):
self.game = SnakeGame(50, 5)
... | LJX2017/snake-ai-reboot | agent.py | agent.py | py | 3,945 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "snake2.SnakeGame",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "collections.deque",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "DQN_model.Linear_QNet",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "DQN_model.QT... |
22618201056 | import pdb
import geohash
import gc
import re
from validate_email import validate_email
import phonenumbers
from pyshorteners import Shortener
from django.conf import settings
from django.core.files.storage import default_storage
from datetime import datetime
import pytz
from datetime import timedelta
from dateutil imp... | wizcarder/wizcard-server | lib/wizlib.py | wizlib.py | py | 5,978 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "gc.collect",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "geohash.encode",
"line_number": 48,
"usage_type": "call"
},
{
"api_name": "django.conf.settings.MKEY_SEP.join",
"line_number": 54,
"usage_type": "call"
},
{
"api_name": "django.c... |
37106387721 | import requests, bs4, webbrowser
try:
headers = {
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36'
}
res = requests.get(
'https://www.greaterkashmir.com/latest/', headers=headers)
gkSoup = bs4.Beau... | mirsayib/automationGimmicks | greaterKashmirScraper.py | greaterKashmirScraper.py | py | 737 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "requests.get",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "webbrowser.open",
"line_number": 23,
"usage_type": "call"
}
] |
43184044429 | import numpy as np
import matplotlib.pyplot as plt
import nengo
from nengo.dists import Uniform
from SBG_pair import SBG_Pair
from eye_plant import Eye
from control.noise import Signal_Dep_Noise
k = 0.009 # signal-dep noise coefficient
noise = Signal_Dep_Noise([k])
dt = 0.001
init_state = [[0], [0], [0], [0]]
r_ey... | youssefzaky/phd | gaze_control/gaze_control/1D/neural.py | neural.py | py | 8,577 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "control.noise.Signal_Dep_Noise",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "eye_plant.Eye",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "eye_plant.Eye",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "numpy.matr... |
16562193122 | import os
import sys
import requests
mytoken = "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"
def download_images(url):
index = 0
img_name = 0
list_img = []
while i <= 969:
endpoint = url + index
response = requests.get(endpoint)
img = open(f"img_name_{index}.png", "wb")
img.write(response.content)
img.clos... | codewiztinsing/Algorithms | bulk_image.py | bulk_image.py | py | 397 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "requests.get",
"line_number": 12,
"usage_type": "call"
}
] |
24257234105 | # -*- coding: utf-8 -*-
import pymysql
import traceback
from pymysql.connections import Connection
MYSQL_USER = 'tyx'
MYSQL_PASS = 'tyx'
MYSQL_DB = 'faq_management'
STATE_ERROR_NUMBER = -1
STATE_READY_NUMBER = 0
STATE_TRAINING_NUMBER = 1
STATE_USING_NUMBER = 2
conn = None
def get_mysql_connect():
global conn
... | tobytyx/ST_resources_faq | mysql_utils.py | mysql_utils.py | py | 7,742 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "pymysql.connect",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "traceback.print_exc",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "pymysql.connections.Connection",
"line_number": 36,
"usage_type": "name"
},
{
"api_name": "tr... |
43817297331 | import functools
from functools import reduce
# -- read the entire log into a list in memory
#
# lines is a list, where each element is a record from the loudacre log
#
lines = [ ]
file = open('loudacre.log','rt')
lines = file.readlines()
file.close()
# -- load devicebase
#
# onerecord is a list made of each field... | EduardoJMR/Python_Samsung-Big-Data | Python/Functional_programming_Training_Python/Functional_Programming_5/ejer6_04_11_hands_on_exercise_program_structure.py | ejer6_04_11_hands_on_exercise_program_structure.py | py | 4,266 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "functools.reduce",
"line_number": 146,
"usage_type": "call"
},
{
"api_name": "functools.reduce",
"line_number": 151,
"usage_type": "call"
}
] |
35641636995 | import argparse
import glob
import json
import numpy as np
import torch
import os
from random import shuffle
from tqdm import tqdm
from typing import Any, Dict, Generator, Optional, Tuple, Union
import constant
def to_torch(
batch: Dict,
device: torch.device
) -> Tuple[Dict[str, torch.Tensor], torch.Tensor]:
i... | ShingHuuu/hrmm4ET | hrmm/data_utils.py | data_utils.py | py | 10,468 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "typing.Dict",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "torch.device",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "typing.Tuple",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "typing.Dict",
"line_nu... |
33535423398 | import click
from cerberus.cerberus import *
from cerberus.cerberusannotation import *
@click.group()
def cli():
pass
####### create a reference #######
@cli.command(name='gtf_to_bed')
@click.option('--gtf',
help='GTF file',
required=True)
@click.option('--mode',
help='Ch... | mortazavilab/cerberus | cerberus/main.py | main.py | py | 9,995 | python | en | code | 6 | github-code | 21 | [
{
"api_name": "click.group",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "click.option",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "click.option",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "click.option",
"line_number"... |
16809240119 | """Plotting functions for neurodsp.spectral."""
from itertools import repeat
import numpy as np
import matplotlib.pyplot as plt
from neurodsp.plts.style import style_plot
from neurodsp.plts.utils import check_ax, savefig
###############################################################################################... | arokem/neurodsp | neurodsp/plts/spectral.py | spectral.py | py | 4,535 | python | en | code | null | github-code | 21 | [
{
"api_name": "neurodsp.plts.utils.check_ax",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "numpy.ndarray",
"line_number": 35,
"usage_type": "attribute"
},
{
"api_name": "itertools.repeat",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "nump... |
41799472016 | import numpy as np
import pytest
from srl.utils.render_functions import print_to_text, text_to_rgb_array
@pytest.mark.parametrize(
"name, text",
[
["str", "StubRender\nAAA"],
["none", ""],
["japanese", "あいうえお"],
],
)
def test_print_to_text(name, text):
text2 = print_to_text(la... | pocokhc/simple_distributed_rl | tests/utils/test_render_functions.py | test_render_functions.py | py | 952 | python | en | code | 25 | github-code | 21 | [
{
"api_name": "srl.utils.render_functions.print_to_text",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "pytest.mark.parametrize",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "pytest.mark",
"line_number": 7,
"usage_type": "attribute"
},
{
"a... |
14889069694 | from django.db import models
from django.core.exceptions import ValidationError
from django.contrib.auth.models import User
# Create your models here.
class Post(models.Model):
# author = models.CharField(max_length=50)
title = models.CharField(max_length=50)
text = models.TextField()
time_created = ... | alexzborovskii/DI-Bootcamp | Week5/Day4/Lesson/mysite/polls/models.py | models.py | py | 2,297 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "django.db.models.Model",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "django.db.models",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "django.db.models.CharField",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": ... |
74203762294 | import csv
import datetime
import cfg
from command import run_cmd
column_names = [
"Subject",
"Repetition",
"Test index",
"MATE coverage",
"ETG coverage",
"Coverage difference",
"Total actions",
"Failing actions",
"Percentage failing actions",
"Diverging screenshots",
"P... | FlyingPumba/etg-paper-replication-package | test_case_level_csv.py | test_case_level_csv.py | py | 6,465 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "csv.DictReader",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "command.run_cmd",
"line_number": 46,
"usage_type": "call"
},
{
"api_name": "cfg.results_path",
"line_number": 46,
"usage_type": "attribute"
},
{
"api_name": "command.run_cmd"... |
42361926807 | from django.conf.urls import url
from VBIMusicApp import views
app_name = 'VBIMusicApp'
urlpatterns = [
url(r'^user_login/$',views.user_login, name='user_login'),
url(r'^$', views.index, name='index'),
url(r'^list_all_songs/$', views.list_all_songs, name='list_all_songs'),
url(r'^search_song/$', views.search_song... | ArunKrish132/MusicApp | VBIMusicApp/urls.py | urls.py | py | 939 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "django.conf.urls.url",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "VBIMusicApp.views.user_login",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "VBIMusicApp.views",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": ... |
10839640448 | import os
import math
from typing import List, Dict
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from Classes.Data import DataFactory, Creation_Grasp
from Classes.Factories import DataInfoFactory
from Classes.Data import DataReader
from Classes.Info import IDataInfo
class Manager():
def... | KentaKamikokuryo/Grasp_taxonomy | Grasp_Analysis/2_create_dataset_mocap.py | 2_create_dataset_mocap.py | py | 9,194 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "typing.List",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "typing.Dict",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "Classes.Factories.DataInfoFactory",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "numpy.conca... |
34700397923 | #!/usr/bin/env python3
import os
import sys
import numpy
import argparse
from datetime import datetime
from lsl.reader import vdif, errors
from lsl.correlator import fx as fxc
from lsl.misc import parser as aph
from utils import *
from matplotlib import pyplot as plt
def main(args):
# Parse the command line
... | lwa-project/eLWA | vdifSpectra.py | vdifSpectra.py | py | 5,044 | python | en | code | 3 | github-code | 21 | [
{
"api_name": "lsl.reader.vdif.read_guppi_header",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "lsl.reader.vdif",
"line_number": 27,
"usage_type": "name"
},
{
"api_name": "lsl.reader.vdif.FRAME_SIZE",
"line_number": 32,
"usage_type": "attribute"
},
{
... |
14395366013 | from celery.schedules import crontab
from celery.task import periodic_task
from celery.utils.log import get_task_logger
from celery import task
from django.contrib.gis.geos import GEOSGeometry
from twython import Twython
from twitter_stream_api.models import MonitorTwitter, GeoTwitter
import datetime
logger = get_task... | IDEHCO3/stream | twitter_stream_api/tasks.py | tasks.py | py | 2,533 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "celery.utils.log.get_task_logger",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.now",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 15,
"usage_type": "attribute"
},
{
"api... |
41773664064 | import argparse
import base64
import requests
parser = argparse.ArgumentParser(description='Example api usage')
parser.add_argument('--model_name', default='inception_v3', type=str, help='model file name')
args = parser.parse_args()
API_ENDPOINT = "http://0.0.0.0:5000/image_classifier/predict?model_name={}".format(a... | shawpan/simple-image-classifier-app | example.py | example.py | py | 619 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "base64.b64encode",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "requests.post",
"line_number": 20,
"usage_type": "call"
}
] |
70622842614 | import psycopg2
def create_tables():
""" create tables in the PostgreSQL database"""
commands = ("""CREATE TABLE details ( User_ID serial PRIMARY KEY,Username VARCHAR (50) UNIQUE NOT NULL,Emp_ID VARCHAR (50) NOT NULL,
Role VARCHAR (355) UNIQUE NOT NULL)""")
connection = None
try:
## REPLACE WI... | vamseeachanta/aceengineercode | ExistingCodes/postgreSQL/create-table.py | create-table.py | py | 919 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "psycopg2.connect",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "psycopg2.DatabaseError",
"line_number": 20,
"usage_type": "attribute"
}
] |
35245028772 | import sys
from collections import deque
input = sys.stdin.readline
def bfs():
q = deque()
q.append((0,0,0))
visited[0][0][0] = 1
while q:
(x,y,crash) = q.popleft()
# 끝 점에 도달하면 이동 횟수를 출력
if x == N - 1 and y == M - 1:
return visited[crash][x][y]
for ... | lyh951212/algorithm | bfs_dfs/2206_2.py | 2206_2.py | py | 1,117 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "sys.stdin",
"line_number": 3,
"usage_type": "attribute"
},
{
"api_name": "collections.deque",
"line_number": 6,
"usage_type": "call"
}
] |
29734950958 | #!/usr/bin/env python3
import datetime
def getInternetTimeString():
dtnow = datetime.datetime.utcnow()
beats = 0.0
beats += ((dtnow.hour +1.0)%24) * 3600
beats += dtnow.minute * 60
beats += dtnow.second
beats /= 86.4
return "@"+str(round(beats,1))
def main():
print(getInternetTimeStrin... | Fildor/InternetTime | Python/InternetTime/src/beats.py | beats.py | py | 363 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "datetime.datetime.utcnow",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 5,
"usage_type": "attribute"
}
] |
72739338613 | from apscheduler.schedulers.background import BackgroundScheduler
from news_parsing.models import *
import logging
import validators
from news_parsing.utils import *
def update_news():
"""
Обновление новостей.
"""
try:
get_news()
for i in range(0, len(NEWS)):
title = NEWS[i... | QofMi/news-parsing-app | api/news_parsing/news_scheduler/news_updater.py | news_updater.py | py | 975 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "validators.url",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "logging.error",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "apscheduler.schedulers.background.BackgroundScheduler",
"line_number": 35,
"usage_type": "call"
}
] |
73149245813 |
import pandas as pd
import matplotlib.pyplot as plt
import imageio
from pathlib import Path
from sklearn.preprocessing import StandardScaler
from sklearn.model_selection import train_test_split
import keras
from utils import get_the_hourly_data, get_time_cosine, clean_and_resample, \
create_x_y_datase... | gulcinvardar/time_series_lstm_weather | cnn_lstm.py | cnn_lstm.py | py | 4,021 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "pathlib.Path",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
"line_numbe... |
6837428860 | #!/bin/python3
import math
import os
import random
import re
import sys
from collections import defaultdict
# Complete the whatFlavors function below.
# 1 2 3 4 5
def whatFlavors(cost, money):
hashtable = defaultdict(int)
for index, price in enumerate(cost):
hashtable[price] = index
for i, p... | zelzhan/Challenges-and-contests | Hackerrank-Interview-Preparation-Kit/ice_cream_parlor.py | ice_cream_parlor.py | py | 725 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "collections.defaultdict",
"line_number": 13,
"usage_type": "call"
}
] |
72139162612 | from crypt import methods
import re
from flask import (
Blueprint, flash, g, redirect, render_template, request, url_for
)
from flask_login import current_user
from .models.paper import Paper
from flask import Blueprint
bp = Blueprint('basicsearch', __name__)
@bp.route('/basicsearch', methods=('GET... | YichenQian09/CS516-project | app/basicsearch.py | basicsearch.py | py | 3,364 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "flask.Blueprint",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "flask.request.method",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "flask.request",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "flask.render_... |
38988618295 | from PyQt6.QtWidgets import *
from PyQt6.QtCore import Qt
import sys
class MyWindow(QWidget):
def __init__(self):
super().__init__()
self.setWindowTitle("13_slider")
self.create_widgets()
def create_widgets(self):
self.slider = QSlider()
self.slider.setOrientation(Qt.Or... | Jihad-surf/Curso_PyQt | secao2/13_slider.py | 13_slider.py | py | 911 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "PyQt6.QtCore.Qt.Orientation",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "PyQt6.QtCore.Qt",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "sys.argv",
"line_number": 29,
"usage_type": "attribute"
},
{
"api_name": "sys.ex... |
13799945277 | import numpy as np
from PIL import Image
import matplotlib.pyplot as plt
def is_full_people(label,less_pro):
"""
根据头顶点、脚底点、左右腕点出现的概率,判断图片中人体是否完整
:param label: (16,3)的标记值
:less_pro float 低于这个概率的值认为没有检测到
:return: True or False list [5],五个位置分别标记,头顶点、左右腕点、脚底点、人体,
"""
index=[0,11,12,15]
pro... | Weia/cal_accuracy | check_pro.py | check_pro.py | py | 5,982 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "numpy.asarray",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "numpy.asarray",
"line_number": 58,
"usage_type": "call"
},
{
"api_name": "PIL.Image.open",
"line_number": 115,
"usage_type": "call"
},
{
"api_name": "PIL.Image",
"line_num... |
7698559813 | #pip simple_websocket_server
from simple_websocket_server import WebSocketServer, WebSocket
import serial
import time
port = "/dev/ttyACM0"
arduino = serial.Serial()
arduino.baudrate = 9600
arduino.port = port
arduino.open()
bell = {
"count": 0,
"silent": True,
"bell_ringing": False,
"... | Yyyyaaaannnnoooo/dhvani | dhvani-main_OLD/command_sender.py | command_sender.py | py | 1,471 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "serial.Serial",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "simple_websocket_server.WebSocket",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "simple_websocket_server.WebSocketServer",
"line_number": 62,
"usage_type": "call"
}
] |
20916348171 | import datetime
from django.contrib import auth
from django.http import HttpResponse
from django.shortcuts import render, render_to_response
from django.template.defaulttags import register
from basic_parser.models import Profile
from pandas.io import json
from profiler.models import Comments
@register.filter
def get_... | AlexEntersis/Grabber | profiler/views.py | views.py | py | 2,230 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "django.template.defaulttags.register.filter",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "django.template.defaulttags.register",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "django.contrib.auth.get_user",
"line_number": 17,
"... |
18169059237 | import urllib
from bs4 import BeautifulSoup
import sys
import unicodedata
import random
import re
import csv
# Put all UFC fighter names in a list
def all_fighters():
wiki = "https://en.wikipedia.org/wiki/List_of_current_UFC_fighters"
from urllib.request import urlopen
page = ... | flugrugger/mma_db | get_data.py | get_data.py | py | 8,491 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "urllib.request.urlopen",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "random.randrange",
"line_number": 68,
"usage_type": "call"
},
{
"api_name": "urllib.requ... |
73473650293 | """
Demonstration of the GazeTracking library.
Check the README.md for complete documentation.
"""
from screeninfo import get_monitors
import pyautogui
import keyboard
import cv2
from gaze_tracking import GazeTracking
gaze = GazeTracking()
webcam = cv2.VideoCapture(0)
screen_width = get_monitors()[0].width
screen_hei... | KarinePistili/pupil-tracker | main.py | main.py | py | 1,645 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "gaze_tracking.GazeTracking",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "cv2.VideoCapture",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "screeninfo.get_monitors",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "s... |
73672858293 | # %% [markdown]
# # Import Libraries
# %%
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
from sklearn.ensemble import RandomForestRegressor
from sklearn.gaussian_process import GaussianProcessRegressor
from sklearn.gaussian_process.kernels import RBF, WhiteKernel
from skl... | franklinobasy/Multivariate-Timeseries | efose.py | efose.py | py | 26,835 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "pandas.read_csv",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "pandas.merge",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"l... |
70309714614 | # pylint: disable=redefined-outer-name
import importlib
import numpy as np
import pytest
import xarray as xr
from ...data import from_dict
from ...plots.backends.matplotlib import dealiase_sel_kwargs, matplotlib_kwarg_dealiaser
from ...plots.plot_utils import (
compute_ranks,
filter_plotters_list,
format_... | arviz-devs/arviz | arviz/tests/base_tests/test_plot_utils.py | test_plot_utils.py | py | 11,836 | python | en | code | 1,461 | github-code | 21 | [
{
"api_name": "importlib.util.find_spec",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "importlib.util",
"line_number": 26,
"usage_type": "attribute"
},
{
"api_name": "plots.plot_utils.format_sig_figs",
"line_number": 41,
"usage_type": "call"
},
{
"api... |
34320975938 | import joblib
import pandas as pd
from sklearn.ensemble import IsolationForest
from sklearn.neighbors import LocalOutlierFactor
from sklearn.svm import OneClassSVM
from sklearn.preprocessing import StandardScaler
sc=StandardScaler()
df = pd.read_csv('../data/sample.csv')
df['Time'] = sc.fit_transform(df['Time'].values... | slime21023/ad-of-credit-card-fraud | prepare/train_model.py | train_model.py | py | 1,101 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "sklearn.preprocessing.StandardScaler",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "sklearn.ensemble.IsolationForest",
"line_number": 15,
"usage_type": "call"
},
{
... |
29684357441 | import numpy as np
import cv2
import typing
# Here is your draw_boxes function from the previous exercise
def draw_boxes(img, bboxes, color=(0, 0, 255), thick=6):
# Make a copy of the image
imgcopy = np.copy(img)
# Iterate through the bounding boxes
for bbox in bboxes:
# Draw a rectangle given... | hortovanyi/udacity-vehicle-detection-project | boxes.py | boxes.py | py | 8,472 | python | en | code | 9 | github-code | 21 | [
{
"api_name": "numpy.copy",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "cv2.rectangle",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "typing.NamedTuple",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_num... |
43894236711 | import json
import logging
import threading
import websocket
from functools import partial
import marshmallow
from xivo_bus.resources.auth.events import (
UserExternalAuthAddedEvent,
UserExternalAuthAuthorizedEvent,
UserExternalAuthDeletedEvent,
)
from wazo_auth.exceptions import UnknownUserException
from... | wazo-platform/wazo-auth | wazo_auth/services/external_auth.py | external_auth.py | py | 6,979 | python | en | code | 7 | github-code | 21 | [
{
"api_name": "logging.getLogger",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "threading.Thread",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "websocket.WebSocketApp",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "functools.p... |
18915733389 | from subprocess import check_output
from multiprocessing import Process, Queue
import re
import os
import time
from datetime import datetime
import boto3
RUN_TIME = 10800 ### NOTE - Time in seconds script is to run
START_TIME = time.time()
TARGET = "x.x.x.x"
NUMBER_OF_PINGS = 50
### MAC REGEX
"""
REGEX = re.compile(
... | bfbenf/latency_testing | ping.py | ping.py | py | 4,988 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "time.time",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "re.compile",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "boto3.client",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 24,... |
74839645813 | import matplotlib.pyplot as plt
import numpy as np
# zufallszahlen importieren
print("lese daten ein ...")
x1 = np.genfromtxt("build/random1.txt", unpack=True)
x2 = np.genfromtxt("build/random2.txt", unpack=True)
print("-daten eingelesen-")
# histogramme erstellen mit mpl
x_plot = np.linspace(0, np.pi/2)
plt.figure(1)... | JLammering/ComputationalPhysics | Blatt2/aufgabe2/b2.py | b2.py | py | 1,000 | python | de | code | 0 | github-code | 21 | [
{
"api_name": "numpy.genfromtxt",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "numpy.genfromtxt",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "numpy.linspace",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "numpy.pi",
"line_n... |
940373288 | # -*- coding: utf-8 -*-
"""
Create temp. Timeseries MEGAN coupled to CTM
@author: Jordan Capnerhurst 2016
"""
# import netCDF
import numpy as np
import netCDF4
import matplotlib.pyplot as plt
from pylab import rcParams
fm = netCDF4.Dataset('O:/Honours_data/KMEGAN/KFebmegv2.nc', 'r')
# plot Daily averag... | jordanc365/Atmos-chem-models | temp Timeser MC D3 MONTHLY.py | temp Timeser MC D3 MONTHLY.py | py | 3,257 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "netCDF4.Dataset",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "numpy.concatenate",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "numpy.std",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "numpy.arange",
"line_... |
33110909026 | # -*- coding: utf-8 -*-
"""Parse text from html."""
import traceback
from bs4 import BeautifulSoup
from tcex import TcEx
def parse_arguments():
"""Parse arguments coming into the app."""
tcex.parser.add_argument('--html_input', help='HTML Input', required=True)
return tcex.args
def main():
"""."""... | ThreatConnect-Inc/threatconnect-playbooks | apps/TCPB_-_HTML_Text_Parser/html_text_parser/html_text_parser.py | html_text_parser.py | py | 1,037 | python | en | code | 66 | github-code | 21 | [
{
"api_name": "tcex.parser.add_argument",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "tcex.parser",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "tcex.args",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "tcex.playboo... |
5940582949 | from collections import deque
def solution(maps):
answer = -1
visit = [[0] * len(maps[0]) for i in range(len(maps))]
move = [
[-1, 0],
[1, 0],
[0, -1],
[0, 1]
]
d = deque()
d.append((0, 0))
visit[0][0] = True
while d:
cur_x, cur_y = d.popleft(... | Jeonghoon2/Coding-once-a-day | 파이썬 (Python)/프로그래머스/Lv.2/게임 맵 최단거리.py | 게임 맵 최단거리.py | py | 884 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "collections.deque",
"line_number": 14,
"usage_type": "call"
}
] |
32495033530 | import json
import tensorflow as tf
from tensorflow import keras
from tensorflow.keras import layers
import numpy as np
class BillyRocket:
# Static
nInput = 12
nHidden1 = 10
nHidden2 = 6
nOutput = 4
validationReserve = 10
batchSize = 5
epochs = 2
@staticmethod
def initNetwork... | EriKaffeKanN/trackmania-ai-comparison | server/src/billyrocket/billyrocket.py | billyrocket.py | py | 2,973 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "tensorflow.keras.Input",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "tensorflow.keras",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "tensorflow.keras.layers.Dense",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": ... |
12128637511 | #下拉框处理
from selenium import webdriver
import time
browser = webdriver.Firefox()
file_path = 'file:///F:/TOOLS/%E6%B5%8B%E8%AF%95/TESThtml/drop_down.html'
browser.get(file_path)
D = browser.find_element_by_id('ShippingMethod')
time.sleep(10)
D.find_element_by_xpath("//*[@id='ShippingMethod']/option[5]").click()
time.sl... | WWaken/TestCode | selenium/test05.py | test05.py | py | 553 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "selenium.webdriver.Firefox",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "time.sleep",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "time.sleep",
... |
19065668608 | #!/usr/bin/env python3
import rclpy
from rclpy.node import Node
from std_msgs.msg import Float64MultiArray
from sensor_msgs.msg import Imu
import numpy as np
from rclpy.qos import QoSProfile, ReliabilityPolicy, HistoryPolicy
from matplotlib import pyplot as plt
#Data Logging Variables
TimeVector = []
Ctrl_Inputs = []... | brendanneal12/ENPM662_Project_1 | car/scripts/controller.py | controller.py | py | 4,747 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "rclpy.node.Node",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "rclpy.qos.QoSProfile",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "rclpy.qos.ReliabilityPolicy.BEST_EFFORT",
"line_number": 24,
"usage_type": "attribute"
},
{
... |
18708463416 | import json
import random
import threading
import traceback
from .. import config
from ..kora_utils import debugPopup, getApp
from ..modules import nlp
class KoraThread(threading.Thread):
def __init__(self):
threading.Thread.__init__(self)
self.stopped = False
self.paused = ... | fischjer4/Kora-Voice-Assistant | Kora/main/event_handlers/kora_thread.py | kora_thread.py | py | 2,595 | python | en | code | 2 | github-code | 21 | [
{
"api_name": "threading.Thread",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "threading.Thread.__init__",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "threading.Thread",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": ... |
27263548514 | import json
import matplotlib.pyplot as plt
import time
from pprint import pprint
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
import numpy as np
def main():
with open('110.json') as data_file:
data = json.load(data_file)
teamData = ['homeTrackingData', 'awayTrackingData']
... | michelleon/nfl_hackathon | victor_work/loader.py | loader.py | py | 2,225 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "json.load",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.figure",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "matplotlib.pyplo... |
17600718732 | import requests as rq
from bs4 import BeautifulSoup
import statistics
import sys
def get_current_prices(item):
current_listings = []
try:
url = 'https://sobump.com/search?q=' + item.replace(' ', '%20')
html = rq.get(url=url)
soup = BeautifulSoup(html.text, 'html.parser')
for i... | yasserqureshi1/price-checking-tools | src/BumpBot.py | BumpBot.py | py | 1,214 | python | en | code | 14 | github-code | 21 | [
{
"api_name": "requests.get",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "statistics.stdev",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "sys.argv",
"line_... |
19475581481 | import queue
from network import network
import sqlite3 as lite
class URLJob:
def __init__(self, url, priority, description=False, timeout=1):
self.description=description
self.priority=priority
self.url=url
self.timeout=self.timeout(timeout=timeout)
self.__task_... | Darksider3/monitorNet | src/lib/jobs.py | jobs.py | py | 2,501 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "network.network",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "network.network",
"line_number": 49,
"usage_type": "call"
},
{
"api_name": "sqlite3.connect",
"line_number": 61,
"usage_type": "call"
},
{
"api_name": "sqlite3.connect",
... |
28349864757 | from model_1_m import *
from matplotlib import pyplot as plt
Loss_over_itt = []
X, y = cs.create_data(100, 3)
dense1 = Layer_Dense(2,3)
activation1 = Activation_ReLU()
dense2 = Layer_Dense(3, 3)
activation2 = Activation_Softmax()
loss_function = Loss_CatagoricalCrossEntropy()
# Experimental #
lowest_loss = 99999... | caelanhadley/NNFSIP | _oldmodels/Model_1/model_1_train_1.py | model_1_train_1.py | py | 1,800 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "matplotlib.pyplot.plot",
"line_number": 58,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 58,
"usage_type": "name"
},
{
"api_name": "matplotlib.pyplot.ylabel",
"line_number": 59,
"usage_type": "call"
},
{
"api_name": "mat... |
11026463815 | from __future__ import division, print_function, unicode_literals
import os
import datetime
import json
from shutil import move, copyfile
from uuid import uuid4
from flask import Blueprint, request, flash, redirect, url_for, abort, Markup, Response
from flask_babel import gettext as _
from flask_login import current_u... | cryptexdigital/cryptexdigital.github.io | calibre-web/cps/editbooks.py | editbooks.py | py | 35,481 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "flask.Blueprint",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "helper.get_sorted_author",
"line_number": 85,
"usage_type": "call"
},
{
"api_name": "flask_login.current_user.role_delete_books",
"line_number": 132,
"usage_type": "call"
},
{
... |
2813221223 | import pandas as pd
import numpy as np
from os.path import join
def prepare_compiled(fn='compiled.csv'):
df = pd.read_csv(fn)
df = df[df.columns[:-1]]
df.set_index('Source', inplace=True)
df.columns = [c[10:] for c in df.columns]
# remove column Melissa Zimdars
df.drop('Melissa Zimdars', axis=... | shaochengcheng/hoaxy-sites | consensus.py | consensus.py | py | 2,829 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "pandas.read_csv",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
... |
1894489301 | """Simple tool to monitor system in a thread"""
VERSION = (0, 1)
__version__ = '.'.join([str(i) for i in VERSION])
__author__ = "Anthony Monthe (ZuluPro)"
__email__ = 'contact@cloud-mercato.com'
import time
import threading
import logging
import psutil
logger = logging.getLogger()
class Collector:
def setup(self... | cloudmercato/monitorlib | monitorlib.py | monitorlib.py | py | 2,890 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "logging.getLogger",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "psutil.cpu_times_percent",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "psutil.getloadavg",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "psutil.v... |
4509239325 | ## Configuration File for Social Distance detector
from enum import Enum
import os
from easydict import EasyDict
_BASE_DIR = os.path.dirname(os.path.abspath(__file__))
Cfg = EasyDict()
## Location of object detection configuration file
Cfg.cfg_file = os.path.join(_BASE_DIR, 'cfg', 'regular_prune_0.7_yolov4-tiny-per... | brandon-l-ut/social_distancing_violation_detector | sd_detector_cfg.py | sd_detector_cfg.py | py | 2,988 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "os.path.dirname",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "os.path.abspath",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "easydict.EasyDict",
"li... |
26843230637 | from matplotlib import pyplot as plot
from numpy import trapz
from os import spawnlp
from os import P_WAIT
from psutil import cpu_percent
from threading import Thread
def eqSolver (split) :
spawnlp(P_WAIT, "./equation.py", "equation.py", str(split)) # start solving an equation
def listSum (list) :
s = 0.
... | Lonelind/python | inf/integralUsage.py | integralUsage.py | py | 1,048 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "os.spawnlp",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.P_WAIT",
"line_number": 9,
"usage_type": "argument"
},
{
"api_name": "threading.Thread",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "psutil.cpu_percent",
"lin... |
41922321533 | from pyvis.network import Network
import ipaddress, os
import matplotlib
matplotlib.use('Agg') # Usamos un renderizador Agg que no requiere UI.
import matplotlib.pyplot as plt
import base64
import io
def convertir_contadores_paquetes_en_lista(datos: list) -> list:
# Variable con el resultado
resultado = []
# It... | humbertowoody/administracion-servicios-red-escom | proyecto/aplicacion-principal/source/dibujo.py | dibujo.py | py | 6,489 | python | es | code | 1 | github-code | 21 | [
{
"api_name": "matplotlib.use",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.rcParams",
"line_number": 32,
"usage_type": "attribute"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 32,
"usage_type": "name"
},
{
"api_name": "io.By... |
70066915254 | import sys
from PyQt5 import QtWidgets
from PyQt5.QtGui import QIntValidator
import design
from calculate import get_name, get_corner
class MainWindow(QtWidgets.QMainWindow, design.Ui_MainWindow):
def __init__(self):
super().__init__()
self.setupUi(self)
for widget in self.findC... | Anarom/MapSheetCode | main.py | main.py | py | 2,043 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "PyQt5.QtWidgets.QMainWindow",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "PyQt5.QtWidgets",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "design.Ui_MainWindow",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_na... |
15176671044 | #!/usr/bin/env python
# coding: utf-8
"""
Given an array of bird sightings where every element represents a bird type id,
determine the id of the most frequently sighted type. If more than 1 type has
been spotted that maximum amount, return the smallest of their ids.
Function Description
Complete the migratoryBirds... | akerimov/HACKER_RANK | MigratoryBirds.py | MigratoryBirds.py | py | 1,973 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "collections.Counter",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 59,
"usage_type": "attribute"
}
] |
21723275538 | import requests.exceptions as rexcept
from requests import get
from urllib.parse import urlparse, parse_qs, quote
from bs4 import BeautifulSoup
from typing import TypeVar, Generic
from datetime import datetime
from hashlib import md5
from re import sub, compile
from multiprocessing import Process, Manager
class FoodS... | MrFlynn/UCR-Food | ucrfood/food_sort.py | food_sort.py | py | 8,196 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "typing.TypeVar",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "typing.Generic",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "multiprocessing.Manager",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "requests.get",
... |
9082099358 | '''
Created on Jan 27, 2021
@author: freddy
'''
#%%
import matplotlib.pyplot as plt
import numpy as np
#import seaborn
plt.style.use('classic') # Estilo clásico
# Ejemplos de gráficos de líneas (graficando funciones)
# Datos del eje X para los siguientes gráficos
x = np.linspace(0, 10, 100)
x
#%%
# Lo siguiente s... | rmarinbe/IE-0217_02 | Semana11/Clase21/pyClase04/MaterialCurso/src/pyModulo05/ScriptModulo05.py | ScriptModulo05.py | py | 6,233 | python | es | code | 0 | github-code | 21 | [
{
"api_name": "matplotlib.pyplot.style.use",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.style",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 13,
"usage_type": "name"
},
{
"api_na... |
39935315467 | # -*- coding: utf-8 -*-
import os
import requests
class AreaNotFoundException(BaseException):
pass
class HotPepperGourmetAPI(object):
BASE_URL = 'http://webservice.recruit.co.jp/hotpepper/{0}/v1/'
def __init__(self, api_key=None):
self.__api_key = os.environ.get('HOTPEPPER_API_KEY', api_key)
... | Hironsan/HotPepperGourmetDialogue | modules/BackEnd/APIs/hotpepper.py | hotpepper.py | py | 2,775 | python | en | code | 275 | github-code | 21 | [
{
"api_name": "os.environ.get",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "requests.get",
"line_number": 21,
"usage_type": "call"
}
] |
40549372432 | from contextlib import suppress
from unittest.mock import MagicMock
import pytest
from infection_monkey.exploit import IslandAPIAgentOTPProvider
from infection_monkey.island_api_client import (
IslandAPIAuthenticationError,
IslandAPIConnectionError,
IslandAPIError,
IslandAPIRequestError,
IslandAPI... | guardicore/monkey | monkey/tests/unit_tests/infection_monkey/exploit/test_island_api_agent_otp_provider.py | test_island_api_agent_otp_provider.py | py | 1,595 | python | en | code | 6,367 | github-code | 21 | [
{
"api_name": "unittest.mock.MagicMock",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "infection_monkey.island_api_client.IslandAPIRequestLimitExceededError",
"line_number": 23,
"usage_type": "name"
},
{
"api_name": "infection_monkey.exploit.IslandAPIAgentOTPProvider"... |
2970927852 | from socket import*
import datetime
import time
def zaman():
millis = int(round(time.time() * 1000))
return millis
s = socket(AF_INET, SOCK_STREAM)
host = ""
port = 142
buf = 1024
UTC = 5 # UTC degeri buradan degistirilebilir
s.bind((host, port))
s.listen(1)
while True:
print("Baglanti bekleniyor.")
con, addr ... | nyucel/blm304 | final/170401075/sunucu.py | sunucu.py | py | 541 | python | en | code | 8 | github-code | 21 | [
{
"api_name": "time.time",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.fromtimestamp",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 21,
"usage_type": "attribute"
}
] |
2686783152 | import cv2
import numpy as np
class FaceTracker:
"""Tracks face"""
def __init__(self, new_window):
self.new_window = new_window
def apply(self, image):
face_cascade = cv2.CascadeClassifier(
cv2.data.haarcascades + "haarcascade_frontalface_default.xml"
)
# scal... | renzo-b/realsense-projects | face_tracking.py | face_tracking.py | py | 1,402 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "cv2.CascadeClassifier",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "cv2.data",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "cv2.cvtColor",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "cv2.COLOR_BGR2GRAY",... |
28400355875 | import copy
import os
import torch
from torch import nn, optim
from torch.autograd import Variable
from tensorboardX import SummaryWriter
from time import gmtime, strftime
from quora_utils import Quora
from model import SiameseNetwork
from test import test
# Hyper Parameters
max_sent_len = 60
input_size = 50
hidden_... | vesparo/demo-tensorboard-pytorch | train.py | train.py | py | 2,984 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "time.strftime",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "time.gmtime",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "quora_utils.Quora",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "model.SiameseNetwork",
... |
27611658724 | import torch
import torch.nn.functional as F
from torch import nn
class LogMSELoss(nn.Module):
def __init__(self, tol=1e-10):
super().__init__()
self.mse = nn.MSELoss()
self.tol = tol
def forward(self, pred, actual):
return self.mse(
torch.log(F.relu(pred) + self.t... | AvivSham/auxinash | experiments/loss_utils.py | loss_utils.py | py | 1,736 | python | en | code | 27 | github-code | 21 | [
{
"api_name": "torch.nn.Module",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "torch.nn.MSELoss",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line_numb... |
4832582706 | from typing import Any, Text, Dict, List, Union
from googletrans import Translator
from rasa_sdk import Action, Tracker
from rasa_sdk.executor import CollectingDispatcher
import wikipediaapi
from rasa_sdk.events import SlotSet
from bs4 import BeautifulSoup
import requests
wiki = wikipediaapi.Wikipedia('ru')
class A... | rustamovilyos/GeoWebSite | Rasa-bot/actions/actions.py | actions.py | py | 5,225 | python | ru | code | 2 | github-code | 21 | [
{
"api_name": "wikipediaapi.Wikipedia",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "rasa_sdk.Action",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "typing.Text",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "rasa_sdk.executor.... |
11810324344 | # 국내, 해외 기초자산 ETF 기간수익률 차트
# 1. URL 데이터를 Json 형식으로 읽어온다.
# 2. 크롤링한 데이터 속에서 3M기간 수익률 / 당일 거래금액 차트를 만든다.
# 3. 국내, 해외 기초자산별 Sheet을 만든다.
import pandas as pd
import requests
import dash
import dash_core_components as dcc
import dash_html_components as html
import plotly.express as px
import dash_table
from dash.dependencie... | neusj47/etf_data | app.py | app.py | py | 14,828 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "pandas.DataFrame",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "requests.get",
"li... |
45677695945 | from protein_learning.common.protein_constants import ONE_TO_THREE
import torch
SC_ATOMS = [
"CE3",
"CZ",
"SD",
"CD1",
"NH1",
"OG1",
"CE1",
"OE1",
"CZ2",
"OH",
"CG",
"CZ3",
"NE",
"CH2",
"OD1",
"NH2",
"ND2",
"OG",
"CG2",
... | MattMcPartlon/AttnPacker | protein_learning/common/io/pdb_io.py | pdb_io.py | py | 5,953 | python | en | code | 50 | github-code | 21 | [
{
"api_name": "os.path.join",
"line_number": 57,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 57,
"usage_type": "attribute"
},
{
"api_name": "urllib.request.urlretrieve",
"line_number": 59,
"usage_type": "call"
},
{
"api_name": "urllib.request",... |
28949339233 | import glob
from torch.utils.tensorboard import SummaryWriter
import torch
import torch.nn as nn
import torch.utils.data as data
import cv2
import os
import numpy as np
from natsort import natsorted
from data.datasets import Dataset_epoch_test
from callNet.model1 import DNA_Sequencer
from utils.utils import AverageMet... | pksolar/sailus | callSum/callbase_1.2_msk_1/predict.py | predict.py | py | 3,759 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "torch.device",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "torch.cuda.is_available",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "torch.cuda",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "glob.glob",
... |
1787588870 | """
.. module:: parse_obsid_k2
:synopsis: Given a K2 obsID returns the corresponding K2 target ID,
file name, cadence type, campaign, etc.
.. moduleauthor:: Scott W. Fleming <fleming@stsci.edu>
"""
import collections
import os
import re
#--------------------
def parse_obsid_k2(obsid):
"""
G... | spacetelescope/MASTDataDelivery | parse_obsid_k2.py | parse_obsid_k2.py | py | 3,263 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "collections.namedtuple",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "re.split",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 67,
"usage_type": "attribute"
},
{
"api_name": "os.path",
"line_numb... |
242743306 | import numpy as np
from scipy.integrate import odeint
from itertools import chain, izip
from domain import Domain
from shapely.geometry import LineString, LinearRing, Point, MultiPolygon, Polygon, box
import shapely
import shapely.affinity
import copy
class NavCar(Domain):
_discrete_actions = np.array([[0,-np.p... | gehring/CLAM-SPOPT | python/NavCar.py | NavCar.py | py | 17,673 | python | en | code | 2 | github-code | 21 | [
{
"api_name": "domain.Domain",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "numpy.array",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "numpy.pi",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "numpy.pi",
"line_number":... |
5768759284 | import pygame as pg
import math
from random import choice
from barrel import Barrel
from settings import *
class Tank(pg.sprite.Sprite):
def __init__(self, game: 'Game', pos):
super().__init__(game.tanks)
self.game = game
self.pos = pg.Vector2(pos)
self.speed = TANK_SPEED
... | ROUVELL/Tanks | tank.py | tank.py | py | 1,538 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "pygame.sprite",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "pygame.Vector2",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "math.pi",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "pygame.Vector2",
"... |
38045999347 | import logging
from smtplib import SMTPException
from django.conf import settings
from django.contrib.auth.hashers import make_password
from django.core.mail import send_mail
from rest_framework import status, viewsets
from rest_framework.exceptions import ValidationError
from rest_framework.pagination import PageNum... | nazarovaea1/api_yamdb | api_auth/views.py | views.py | py | 5,054 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "logging.basicConfig",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "rest_framework.views.APIView",
"line_number": 26,
"usage_type": "name"
},
{
"api_name": "rest_framework.permissions.AllowAny",
"line_number": 27,
"usage_type": "name"
},
{
... |
20130497125 | from pymongo import MongoClient, ASCENDING, DESCENDING
from bson.json_util import dumps
from bson.objectid import ObjectId
import json
import datetime
from constants.dbpath import db_path
class DBRole:
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.__client = MongoClie... | kartikeybhardwaj/circuit-bapi | database/role/role.py | role.py | py | 2,740 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "pymongo.MongoClient",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "constants.dbpath.db_path",
"line_number": 12,
"usage_type": "argument"
},
{
"api_name": "json.loads",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "bson.json... |
39523027140 | from absl.testing import absltest
from unittest.mock import patch
import numpy as np
import scipy.stats
import scipy.integrate
from wfa_planning_evaluation_framework.models.reach_point import ReachPoint
from wfa_planning_evaluation_framework.models.gamma_poisson_model import (
GammaPoissonModel,
)
class GammaPo... | world-federation-of-advertisers/planning-evaluation-framework | src/models/tests/gamma_poisson_model_test.py | gamma_poisson_model_test.py | py | 11,207 | python | en | code | 3 | github-code | 21 | [
{
"api_name": "absl.testing.absltest.TestCase",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "absl.testing.absltest",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "scipy.stats.stats.poisson.pmf",
"line_number": 23,
"usage_type": "call"
},
... |
2850405093 | from time import perf_counter
from sys import platform
from casadi import Importer
import numpy as np
from casadi import horzcat, vertcat, sum1, sum2, nlpsol, SX, MX, reshape
from .solver_interface import SolverInterface
from ..gui.plot import OnlineCallback
from ..interfaces.solver_options import Solver
from ..limit... | AurelienRenou/Stage_link_home_lab | bioptim-master/bioptim-master/bioptim/interfaces/ipopt_interface.py | ipopt_interface.py | py | 10,647 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "solver_interface.SolverInterface",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "interfaces.solver_options.Solver.IPOPT",
"line_number": 60,
"usage_type": "call"
},
{
"api_name": "interfaces.solver_options.Solver",
"line_number": 60,
"usage_type... |
29982552012 | import random
import pygame
(width,height) = (300,200)
background_color = (255,255,255)
class Particle:
def __init__(self, position, size):
self.x, self.y = position
self.size = size
self.colour = (0,0,255)
self.thickness = 1
def display(self):
pygame.draw.circle(screen, self.colour, (self.x,self... | ruforavishnu/pygame-projects | randomness.py | randomness.py | py | 957 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "pygame.draw.circle",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "pygame.draw",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "pygame.display.set_mode",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "pygame.di... |
20130502505 | import inspect
from utils.log import logger as log
thisFilename = __file__.split("/")[-1]
import json
from constants.secret import FapiToBapiSecret
ignoreProcessRequestForPath = [
"/creator",
"/destroyer",
"/add-superuser"
]
class Middleware:
def __init__(self, *args, **kwargs):
super().__in... | kartikeybhardwaj/circuit-bapi | middleware/middleware.py | middleware.py | py | 2,731 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "utils.log.logger.info",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "utils.log.logger",
"line_number": 32,
"usage_type": "name"
},
{
"api_name": "inspect.currentframe",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "utils.log... |
39080957926 | ##### Natural Language Processing libraries #####
import nltk
from nltk.stem import WordNetLemmatizer
lemmatizer = WordNetLemmatizer()
import pickle
import numpy as np
##### Machine Learning Libraries #####
from keras.models import load_model
model = load_model('model.h5')
##### Libraries for file manageme... | jessica-nam/SmartBot | processor.py | processor.py | py | 3,474 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "nltk.stem.WordNetLemmatizer",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "keras.models.load_model",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "pickle.... |
23276987341 | import numpy as np
import matplotlib.pyplot as plt
from PIL import Image
def step_function(x):
y = x > 0
return y.astype(np.int)
def sigmoid(x):
return 1 / (1 + np.exp(-x))
def relu(x):
return np.maximum(0, x)
def identity(x):
return x
def softmax(x):
c = np.max(x)
exp_x = np.exp(x-... | augustinLib/neuralflow | test/neural_network/function.py | function.py | py | 2,132 | python | en | code | 6 | github-code | 21 | [
{
"api_name": "numpy.int",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "numpy.exp",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "numpy.maximum",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "numpy.max",
"line_number": ... |
38667970213 | import numpy as np
import torch
from collections import namedtuple
Transition = namedtuple('Transition', ('state', 'action', 'reward', 'done', 'next_state'))
class DQNAgent:
"""
DQN agent implementation
"""
def __init__ (self, env, replay_memory):
self.env = env
self.replay_memory = r... | entangledqubit0110/Pong-RL-PLE | agents/dqn/dqn_agent.py | dqn_agent.py | py | 1,661 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "collections.namedtuple",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "numpy.random.random",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 31,
"usage_type": "attribute"
},
{
"api_name": "torch.ten... |
6790222225 | import zipfile, datetime
from os import path
class ACDReader(object):
def __init__(self, data_directory, start_date, end_date):
if path.isdir(data_directory):
self.data_directory = data_directory
else:
raise InvalidInputException('Invalid path for ACD files')
... | InfinityTotality/mitel-tools | acdreader.py | acdreader.py | py | 1,893 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "os.path.isdir",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "datetime.datetime.strptime",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
... |
34664246843 | """empty message
Revision ID: 1fe1fda6ff43
Revises: c05df771cc26
Create Date: 2021-03-19 21:33:08.418805
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "1fe1fda6ff43"
down_revision = "c05df771cc26"
branch_labels = None
depends_on = None
def upgrade():
# ... | Diverso-NVR/NVR | backend/migrations/versions/1fe1fda6ff43_.py | 1fe1fda6ff43_.py | py | 821 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "alembic.op.drop_column",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "alembic.op",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "alembic.op.add_column",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "alembic.op",
... |
70309792694 | """
Posterior Plot (reducing school dimension)
==========================================
_gallery_category: Distributions
"""
import matplotlib.pyplot as plt
import arviz as az
az.style.use("arviz-doc")
data = az.load_arviz_data("centered_eight")
coords = {"school": ["Choate", "Mt. Hermon", "Deerfield"]}
axes = az... | arviz-devs/arviz | examples/matplotlib/mpl_plot_posterior_combinedims.py | mpl_plot_posterior_combinedims.py | py | 575 | python | en | code | 1,461 | github-code | 21 | [
{
"api_name": "arviz.style.use",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "arviz.style",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "arviz.load_arviz_data",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "arviz.plot_pos... |
16531925328 | # -*- coding: utf-8 -*-
from PyQt5 import Qt
from spectrum import Spectrum
from figure_canvas import SpectraFigureCanvas
# Load from ui
# from PyQt5 import uic
# form_class = uic.loadUiType('spectrum_comparator.ui')[0]
# or use the generated file
from spectrum_comparator_ui import Ui_MainWindow as form_class
class... | galou/spectrum_comparator | window.py | window.py | py | 2,270 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "PyQt5.Qt.QMainWindow",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "PyQt5.Qt",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "spectrum_comparator_ui.Ui_MainWindow",
"line_number": 15,
"usage_type": "name"
},
{
"api_name"... |
2982311939 | # -*- coding: utf-8 -*-
import scrapy
from pcProxy.items import PcProxyItem
class ListdailySpider(scrapy.Spider):
name = 'listdaily'
allowed_domains = ['proxylistdaily.net']
start_urls = ['https://www.proxylistdaily.net/']
def parse(self, response):
item = PcProxyItem()
post_body = res... | PchenSniper/scrapy_ip_proxy | pcProxy/pcProxy/spiders/listdaily.py | listdaily.py | py | 981 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "scrapy.Spider",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "pcProxy.items.PcProxyItem",
"line_number": 11,
"usage_type": "call"
}
] |
32718013008 | """Signal handling related helpers."""
import logging
import signal
import sys
from types import FrameType
from vehicletracker.core import VehicleTrackerNode
from vehicletracker.const import RESTART_EXIT_CODE
_LOGGER = logging.getLogger(__name__)
def async_register_signal_handling(node: VehicleTrackerNode) -> None:
... | niklascp/vehicletracker | vehicletracker/helpers/signal.py | signal.py | py | 2,176 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "logging.getLogger",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "vehicletracker.core.VehicleTrackerNode",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "sys.platform",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_na... |
73960676214 | import json
from bs4 import BeautifulSoup
import requests
with open("out.json", "r") as file:
arr = json.loads(file.read())
professors = set()
for i in arr:
professors.add(i["lecture"]["prof"])
if "prof" in i["lab"]:
professors.add(i["lab"]["prof"])
professors.remove("")
with open("professors... | Nanoscience202/Codes | Python/scraper/prof.py | prof.py | py | 3,141 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "json.loads",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "json.dumps",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 68,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_numbe... |
12113379 | import boto3
import os
#Enter your ACCESS_KEY and ACCESS_ID
aws_region = "ap-south-1"
access_id = "ACCESS_ID"
access_key = "ACCESS_KEY"
def DirTraverse(dirPath, s3Client, bucket, folder):
for root, dirs, files in os.walk(dirPath):
for file in files:
filepath = os.path.join(root,file)
... | abhikarkamkar/aws | s3/FilesUploader.py | FilesUploader.py | py | 2,279 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "os.walk",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "boto3.Session",
"line_number": ... |
19132937439 | # fringe - struktura danych przechowująca wierzchołki do odwiedzenia
# explored - lista odwiedzonych stanów
# istate - stan początkowy2
# succ - funkcja następnika
# goaltest - test spełnienia celu
from collections import deque
matrix = [[0, 0, 0, 0, 0, 0, 0, 0, 0],
[0, 1, 1, 1, 1, 1, 1, 1, 1],
[0,... | KarinaYarmosh/Project_AI | old/agent_test.py | agent_test.py | py | 3,063 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "collections.deque",
"line_number": 99,
"usage_type": "call"
}
] |
24361068106 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Test figure 6 def"""
from pathlib import Path
from .utils import DATA_DIR, TEST_DIR, PLOT_DIR
import matplotlib.pyplot as plt
import matplotlib.ticker
import math
import numpy as np
from scipy import special
from tdsr import Config, TDSR, TDSR1, LCM, Traditional, CFM,... | torstendahm/tdsr | tests/test_fig6def.py | test_fig6def.py | py | 9,183 | python | en | code | 3 | github-code | 21 | [
{
"api_name": "numpy.loadtxt",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "utils.DATA_DIR",
"line_number": 23,
"usage_type": "name"
},
{
"api_name": "numpy.zeros",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "numpy.append",
"line_num... |
70309672694 | """Convert PyJAGS sample dictionaries to ArviZ inference data objects."""
import typing as tp
from collections import OrderedDict
from collections.abc import Iterable
import numpy as np
import xarray
from .inference_data import InferenceData
from ..rcparams import rcParams
from .base import dict_to_dataset
class P... | arviz-devs/arviz | arviz/data/io_pyjags.py | io_pyjags.py | py | 13,204 | python | en | code | 1,461 | github-code | 21 | [
{
"api_name": "typing.Optional",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "typing.Mapping",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "numpy.ndarray",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "typing.Op... |
13051145935 | import pyautogui as p
x,y=p.locateCenterOnScreen('C:\\Users\\PM\\Desktop\\yourpng.PNG')
p.click(x,y)
p.typewrite('BOT: Hii Harikaa !!!!!')
p.press('enter')
count = 0
while count < 100:
p.typewrite('HAI DUDE! ')
p.press('enter')
print(count)
count += 1
| DN007/whatsapp_unlimited_messages_send_By_python | CERA 1.0.py | CERA 1.0.py | py | 287 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "pyautogui.locateCenterOnScreen",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "pyautogui.click",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "pyautogui.typewrite",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "pyaut... |
39165738741 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sun Aug 14 17:34:42 2022
@author: monica
"""
posts = [
{
'author':'ddg',
'title': 'love1',
'content': 'first meet',
'date_posted':'march 21, 2020'
},
{
'author':'mnk',
'title': 'love2',
'content': 'second mee... | mnkkkkk/test | flaskblog.py | flaskblog.py | py | 711 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "flask.Flask",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "flask.render_template",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "flask.render_template",
"line_number": 35,
"usage_type": "call"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.