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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
70680031910 | import pandas
MARKER = b'PAR1'
import struct
import msgpack
from io import BytesIO as cStringIO
from array import array
import zlib
import numpy
def differ(first, second):
return [item for item in first if item not in second]
def globalorder(f,gdict, chunk, ordering):
output = cStringIO()
output.truncat... | johnfouf/SIGMOD_REPRODUCIBILITY | pyimplementation/global_encoding_opt.py | global_encoding_opt.py | py | 8,125 | python | en | code | 1 | github-code | 71 | [
{
"api_name": "io.BytesIO",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "struct.pack",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "msgpack.dumps",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "struct.pack",
"line_number":... |
12467925936 | import collections
import csv
from dm_control import mujoco
from dm_control.rl import control
from dm_control.suite import base
from dm_control.suite import common
from dm_control.utils import containers
from dm_control.utils import rewards
import numpy as np
import os
_DEFAULT_TIME_LIMIT = 40
_CONTROL_TIMESTEP = .04... | ss555/drqv2 | custom_Mujoco_tasks/fish_tasks_envs/fishD.py | fishD.py | py | 5,240 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "dm_control.utils.containers.TaggedTasks",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "dm_control.utils.containers",
"line_number": 23,
"usage_type": "name"
},
{
"api_name": "dm_control.suite.common.read_model",
"line_number": 29,
"usage_type":... |
73902062629 | import copy
import csv
import random
from typing import List, Tuple
def create_base(
trainSamples: int,
) -> Tuple[List[List[float]], List[List[float]], List[int], List[int]]:
X_test = []
X_train = []
with open("src/datasets/jm1.csv", newline="") as csvfile:
spamreader = csv.reader(csvfile, de... | Flaviomagalhaest/classifier-cellular-automata | prep/find_classifiers.py | find_classifiers.py | py | 2,583 | python | en | code | 2 | github-code | 71 | [
{
"api_name": "csv.reader",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "random.shuffle",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "random.shuffle",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "random.shuffle",
"line_n... |
2116335277 | # coding=utf-8
# created by msg on 2019/11/24 2:30 下午
import re
import unicodedata
import tensorflow as tf
from sklearn.model_selection import train_test_split
# 第一个参数指定字符串标准化的方式。
# NFC表示字符应该是整体组成(比如可能的话就使用单一编码)
# NFD表示字符应该分解为多个组合字符表示。
# unicodedata.category(chr) 把一个字符返回它在UNICODE里分类的类型
def unicode_to_ascii(s):
r... | Youly172/nlp-journey | tutorials/tf2-tutorial/05.machine_translation/seq2seq/01.preprocess_data.py | 01.preprocess_data.py | py | 3,429 | python | en | code | null | github-code | 71 | [
{
"api_name": "unicodedata.normalize",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "unicodedata.category",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "re.sub",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "re.sub",
"line_... |
23082052524 | #!/usr/bin/env python
from __future__ import absolute_import
import json
import logging
from . import IndicatorTypes
API_V1_ROOT = "{}/api/v1/"
PULSES_ROOT = "{}/pulses".format(API_V1_ROOT)
SUBSCRIBED = "{}/subscribed".format(PULSES_ROOT)
EVENTS = "{}/events".format(PULSES_ROOT)
try:
# For Python2
from urlli... | gcrahay/otx_misp | src/otx_misp/otx/OTXv2.py | OTXv2.py | py | 5,423 | python | en | code | 52 | github-code | 71 | [
{
"api_name": "logging.getLogger",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "urllib.request.ProxyHandler",
"line_number": 58,
"usage_type": "call"
},
{
"api_name": "urllib.request.build_opener",
"line_number": 59,
"usage_type": "call"
},
{
"api_nam... |
22092624888 | from typing import List
def intcode(program: List[int], inputs: List[int] = [], perpetual_input: bool = False,
loop_mode: bool = False, print_outputs: bool = True, extend: int = 0,
i: int = 0):
assert len(program) > 0
p = program.copy()
p.extend([0] * extend)
relat... | marcolussetti/adventofcode | 2019/intcode_lib/intcode.py | intcode.py | py | 4,436 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "typing.List",
"line_number": 4,
"usage_type": "name"
},
{
"api_name": "typing.List",
"line_number": 89,
"usage_type": "name"
},
{
"api_name": "typing.List",
"line_number": 97,
"usage_type": "name"
}
] |
16799124438 | #Convert XML to TXT
import xml.etree.ElementTree as ET
import glob
#list of xml files
listOfFiles = sorted(glob.glob('/Users/shiva.hnf/Documents/IIT/visual-targets/Demo/VT_DataAnnotation/VT_InputData/Annotations/TwoPeople_ThreeObjects(2)/*.xml'))
#opening a txt file
f = open('/Users/shiva.hnf/Documents/IIT/visual-ta... | shivahanifi/visual-targets | Demo/VT_Demo_CustomInput/VT_CI_Annotation/xmltotxt.py | xmltotxt.py | py | 1,176 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "glob.glob",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "xml.etree.ElementTree.parse",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "xml.etree.ElementTree",
"line_number": 15,
"usage_type": "name"
}
] |
35293364012 | import xml.etree.ElementTree as ET
def read_anntation(xml_file: str):
tree = ET.parse(xml_file)
root = tree.getroot()
bounding_box_list = []
file_name = root.find('filename').text
for obj in root.iter('object'):
object_label = obj.find("name").text
for box in obj.findall("bndbox"... | YoonSungLee/Image_Augmentation_Tool | Read_anno.py | Read_anno.py | py | 665 | python | en | code | 1 | github-code | 71 | [
{
"api_name": "xml.etree.ElementTree.parse",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "xml.etree.ElementTree",
"line_number": 4,
"usage_type": "name"
}
] |
74205228389 | from bottle import get, response
import json
import mysql.connector
from g import (
DATABASE_CONFIG
)
###################################################################
# FETCH ALL BOOKING DATA
###################################################################
@get('/api-fetch-booking_data')
def _():
... | Elisha2605/Dara-Coaching | api/GET/fetch_booking_data_GET.py | fetch_booking_data_GET.py | py | 3,738 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "mysql.connector.connector.connect",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "mysql.connector.connector",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "mysql.connector",
"line_number": 18,
"usage_type": "name"
},
{
"... |
35916618183 | import torch
import torchvision
import torch.nn as nn
import torch.optim as optim
from torch.utils.data import DataLoader, Dataset
from torchvision import transforms
# Define hyperparameters
batch_size = 32
learning_rate = 0.001
num_epochs = 10
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
# D... | 32192442sangho/TeamProjectModel | model_build/situation.py | situation.py | py | 4,364 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "torch.device",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "torch.cuda.is_available",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "torch.cuda",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "torch.utils.data... |
13033022310 | # coding:utf-8
from LineApi import *
from LineApi.hooks import HooksTracer
from collections import OrderedDict
import random, requests, json, random, sqlite3, sys
with open("Tokens.json","r",encoding="utf8") as f:
tokens = json.loads(f.read(),object_pairs_hook=OrderedDict)
with open("Help.txt","r",encoding... | Dosugamea/scriptkiddie-nano | 販売保護キッカー5.py | 販売保護キッカー5.py | py | 14,218 | python | ja | code | 4 | github-code | 71 | [
{
"api_name": "json.loads",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "collections.OrderedDict",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "sqlite3.connect",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "LineApi.hooks.HooksT... |
6678147568 | from io import BytesIO
from django.http import HttpResponse, HttpResponseRedirect
from django.shortcuts import render
from pydub import AudioSegment
from django.http import JsonResponse
from django.views.decorators.csrf import csrf_exempt
import tempfile
import os
from django.conf import settings
import soundfile as s... | Great1-Azed/voice-chat-assistant | core/views.py | views.py | py | 2,886 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "django.shortcuts.render",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "pydub.AudioSegment.from_mp3",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "pydub.AudioSegment",
"line_number": 22,
"usage_type": "name"
},
{
"api_name":... |
16970187008 | import argparse
import json
import os
import subprocess
import sys
from ddkcore.parser import DdkParser
class Kit(object):
__app_description = 'Docker Development Kit'
__app_name = 'ddk'
__commands = {}
__help_message = "Show this help message and exit."
__parser = None
__subparsers = None
... | simbigo/ddk | ddkcore/kit.py | kit.py | py | 11,956 | python | en | code | 6 | github-code | 71 | [
{
"api_name": "os.getcwd",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "os.path.abspath",
"line_number": 49,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 49,
"usage_type": "attribute"
},
{
"api_name": "os.path.isfile",
"line_num... |
31136418250 | # coding=utf-8
import numpy as np
#An example of centroid distance, based on pytorch1.9
def cal_Cmass(data):
'''
input:data(ndarray):数据样本
output:mass(ndarray):数据样本质心
'''
Cmass = np.mean(data,axis=0)
return Cmass
def distance(x, y, p=2):
'''
input:x(ndarray):第一个样本的坐标
... | Lsx0802/discriminative | AGDAF/centroid_example.py | centroid_example.py | py | 3,341 | python | en | code | 2 | github-code | 71 | [
{
"api_name": "numpy.mean",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "numpy.sum",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "numpy.abs",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "numpy.power",
"line_number": 22,
... |
33649919463 | from typing import Any, Callable, Dict, Iterable, List, MutableMapping, TypeVar, Union
import numpy as np
import tensorflow as tf
import torch
from fastestimator.op.op import Op, get_inputs_by_op, write_outputs_by_op
from fastestimator.util.traceability_util import traceable
from fastestimator.util.util import to_num... | Phillistan16/fastestimator | fastestimator/op/numpyop/numpyop.py | numpyop.py | py | 7,361 | python | en | code | null | github-code | 71 | [
{
"api_name": "typing.TypeVar",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "tensorflow.Tensor",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "torch.Tensor",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "numpy.ndarray... |
38167483752 | import numpy as np
from astropy.time.core import Time
from datetime import datetime
import h5py
import os
from pyspi.io.package_data import get_path_of_internal_data_dir
from pyspi.utils.function_utils import get_time_object
double_names = {19: [0, 1], 20: [0, 2], 21: [0, 3], 22: [0, 4], 23: [0, 5],
2... | BjoernBiltzinger/pyspi | pyspi/utils/livedets.py | livedets.py | py | 4,525 | python | en | code | 7 | github-code | 71 | [
{
"api_name": "pyspi.utils.function_utils.get_time_object",
"line_number": 44,
"usage_type": "call"
},
{
"api_name": "numpy.arange",
"line_number": 47,
"usage_type": "call"
},
{
"api_name": "astropy.time.core.Time",
"line_number": 52,
"usage_type": "call"
},
{
"ap... |
27295063279 | import pymongo
import json
with open('newrlm.json', 'r') as json_file:
data = json.load(json_file)
mydb = None
for item in data:
if item['type'] == 'table':
mycol = mydb[item['name']]
mylist = item['data']
mycol.insert_many(mylist)
if item['type'] == 'database':
myclient ... | HagarHaytham/Database-Optmization | data_generation/NOSQL.py | NOSQL.py | py | 409 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "json.load",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "pymongo.MongoClient",
"line_number": 16,
"usage_type": "call"
}
] |
73059665511 | from flask_wtf import FlaskForm
from flask import Flask, session, request, redirect, url_for
from wtforms import TextField, SubmitField
from flask_wtf.file import FileField, FileRequired, FileAllowed
from random import randint
import numpy as np
from cv2 import cv2 as cv2
import os
from werkzeug.utils import secure_fil... | hm-software56/computer-gv | models/edge.py | edge.py | py | 3,218 | python | en | code | 2 | github-code | 71 | [
{
"api_name": "os.path.dirname",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "os.path.abspath",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "flask_wtf.FlaskForm",
... |
14266957499 | """A demo of the Google CloudSpeech recognizer."""
import threading
import time
import os
import aiy.audio
import aiy.cloudspeech
import aiy.voicehat
import pygame
import sys
class musicThread(threading.Thread):
def __init__(self, threadID, name, mode):
threading.Thread.__init__(self)
self.threadI... | ddr78226/helpful-tools | 互動式生活小幫手.py | 互動式生活小幫手.py | py | 3,273 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "threading.Thread",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "threading.Thread.__init__",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "threading.Thread",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": ... |
9686226438 | import os
import openai
from config import apikey
openai.api_key = apikey
response = openai.Completion.create(
model="text-davinci-003",
prompt="write a mail for my boss for leave",
temperature=1,
max_tokens=256,
top_p=1,
frequency_penalty=0,
presence_penalty=0
)
print(response) | prathamgyanani/python_projects | Jarvis AI/openaitest.py | openaitest.py | py | 294 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "openai.api_key",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "config.apikey",
"line_number": 4,
"usage_type": "name"
},
{
"api_name": "openai.Completion.create",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "openai.Comple... |
14919570510 | from marshmallow import fields
from marshmallow.validate import Length
from wazo_confd.helpers.mallow import BaseSchema, PJSIPSection, PJSIPSectionOption
class PJSIPTransportDeleteRequestSchema(BaseSchema):
fallback = fields.UUID(missing=None)
class PJSIPTransportSchema(BaseSchema):
uuid = fields.UUID(dump_... | wazo-platform/wazo-confd | wazo_confd/plugins/pjsip/schema.py | schema.py | py | 513 | python | en | code | 9 | github-code | 71 | [
{
"api_name": "wazo_confd.helpers.mallow.BaseSchema",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "marshmallow.fields.UUID",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "marshmallow.fields",
"line_number": 7,
"usage_type": "name"
},
{
"api_... |
42507188219 | import requests, os, sys
import shutil
msvc_redist = "https://aka.ms/vs/17/release/VC_redist.x64.exe"
apache2 = "https://archive.apache.org/dist/httpd/binaries/win32/apache_2.2.9-win32-x86-openssl-0.9.8h-r2.msi"
apache2_zip = "https://www.apachelounge.com/download/VS17/binaries/httpd-2.4.57-win64-VS17.zip"
php8 = "ht... | mouseroot/CLAMPP | PAM_Install.py | PAM_Install.py | py | 7,884 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "os.listdir",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 26,
"usage_type": "attribute"
},
{
"api_name": "os.path.isfile",
"line_numbe... |
23365452276 | import matplotlib.pyplot as plt
import numpy as np
from math import ceil
from time import time
from random import randint, randrange
def bin_search(arr, key):
low = 0
high = len(arr) - 1
while low != high:
mid = ceil((low + high)/2)
if arr[mid] == key:
return mid
if a... | Michanix/Algorithms-Intro-Course | 04.py | 04.py | py | 935 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "math.ceil",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "time.time",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "random.randrange",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "time.time",
"line_number": 3... |
24579005338 | from django.conf import settings
from django.db.models import Model, ForeignKey, CASCADE, CharField, IntegerField
# Create your models here.
account_types = (("CHK", "Checking"), ("SVG", "Savings"))
class BankAccount(Model):
owner = ForeignKey(settings.AUTH_USER_MODEL, on_delete=CASCADE)
name = CharField(max_len... | oka4dc/django.drf.react.bank.project | backend/bank_accounts/models.py | models.py | py | 660 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "django.db.models.Model",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "django.db.models.ForeignKey",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "django.conf.settings.AUTH_USER_MODEL",
"line_number": 9,
"usage_type": "attribute"
},
... |
8317237198 | import sqlite3
def create_tables(database_name):
"""
Builds all table structure in a new SQLite3 database
"""
if not isinstance(database_name, str):
raise TypeError("Database name must be a string.")
if not '.' in database_name:
# define extension
database_name += '.db'
... | yanniskatsaros/hockey-analytics | src/initdb.py | initdb.py | py | 4,159 | python | en | code | 1 | github-code | 71 | [
{
"api_name": "sqlite3.connect",
"line_number": 109,
"usage_type": "call"
}
] |
9022581919 | """
Name : c5_25_get_critical_value_F_test.py
Book : Hands-on Data Science with Anaconda )
Publisher: Packt Publishing Ltd.
Author : Yuxing Yan and James Yan
Date : 1/25/2018
email : yany@canisius.edu
paulyxy@hotmail.com
"""
import scipy as sp
alpha=0.10
d1=1
d2=1
critical=s... | PacktPublishing/Hands-On-Data-Science-with-Anaconda | Chapter05/c5_25_get_critical_value_F_test.py | c5_25_get_critical_value_F_test.py | py | 495 | python | en | code | 23 | github-code | 71 | [
{
"api_name": "scipy.stats.f.ppf",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "scipy.stats",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "scipy.stats.f.cdf",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "scipy.stats",
... |
7064108769 | import ext # import dependencies first
import logging
from powermatcher import Auctioneer
from agents import PVAgent, BatteryAgent, LoadAgent, ImbalanceAgent
import settings
# Initialize logging, see also https://docs.python.org/3/howto/logging-cookbook.html
logger = logging.getLogger(settings.app_name)
# Create cons... | laurens-jan/pythonmatcher | pythonmatcher/run.py | run.py | py | 993 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "logging.getLogger",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "settings.app_name",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "logging.StreamHandler",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "logging.... |
38871400271 | """empty message
Revision ID: ba06bbe34655
Revises: 58ef29a3b40f
Create Date: 2021-04-15 13:19:32.518429
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'ba06bbe34655'
down_revision = '58ef29a3b40f'
branch_labels = None
depends_on = None
def upgrade():
# ... | connormahern/Caled | migrations/versions/ba06bbe34655_.py | ba06bbe34655_.py | py | 951 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "alembic.op.add_column",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "alembic.op",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "sqlalchemy.Column",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.Integer... |
15363444541 | import pytest
import os.path
import json
import stripe
from flask_login import login_user
from models.basket import Basket
from models.product import PriceTier
from models.payment import StripePayment, RefundRequest
from apps.payments.stripe import (
stripe_start,
stripe_capture,
stripe_capture_post,
... | emfcamp/Website | tests/test_purchase.py | test_purchase.py | py | 3,815 | python | en | code | 32 | github-code | 71 | [
{
"api_name": "os.path.path.join",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "os.path.path",
"line_number": 24,
"usage_type": "attribute"
},
{
"api_name": "os.path",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "os.path.path.dirname",
... |
35277267055 | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import argparse
import math
import time
from heapq import heappush, nlargest
import numpy as np
from PIL import Image
import matplotlib.pyplot as plt
import matplotlib.patches as patches
from tensorflow.contr... | sweetdream779/tensorflow_lite | scripts/object_detection_new.py | object_detection_new.py | py | 7,253 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 76,
"usage_type": "call"
},
{
"api_name": "tensorflow.contrib.lite.python.interpreter.Interpreter",
"line_number": 107,
"usage_type": "call"
},
{
"api_name": "tensorflow.contrib.lite.python.interpreter",
"line_number": 1... |
15958249269 | import socket
import sys
from getpass import getpass
from contextlib import closing
import threading
from Crypto.Cipher import DES3
from Crypto.Random import get_random_bytes
from random import randint
import hashlib
MSG_SIZE = 8192
NUMBER_OF_SERVERS = 3
P = 2409254109293510934796826672457339113288246933... | LikhithaGaddi/End-to-End-Messaging-System | client.py | client.py | py | 15,798 | python | en | code | 1 | github-code | 71 | [
{
"api_name": "socket.socket",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "socket.AF_INET",
"line_number": 24,
"usage_type": "attribute"
},
{
"api_name": "socket.SOCK_STREAM",
"line_number": 24,
"usage_type": "attribute"
},
{
"api_name": "socket.SOL_... |
23394711315 | from rest_framework import status, viewsets
from django.db import transaction
from rest_framework.decorators import action
from rest_framework.response import Response
from backend.api.decorators import FormValidator
from backend.api.forms import ResponderEstimacionForm, MoverUserStoryForm
from backend.api.models impor... | kukiamarilla/polijira | backend/api/views/SprintBacklogViewSet.py | SprintBacklogViewSet.py | py | 10,625 | python | es | code | 1 | github-code | 71 | [
{
"api_name": "rest_framework.viewsets.ViewSet",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "rest_framework.viewsets",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "backend.api.models.Usuario.objects.get",
"line_number": 20,
"usage_type": "c... |
3354913349 |
import os
from flask import Flask, flash, request, redirect, url_for
from werkzeug.utils import secure_filename
from misc import allowed_file, ALLOWED_EXTENSIONS, UPLOAD_FOLDER
from nn import load_model, predict
import os
app = Flask(__name__)
app.config['UPLOAD_FOLDER'] = UPLOAD_FOLDER
app.config['model'] = load_mo... | hassanTiger11/idc_classifier | api/app.py | app.py | py | 1,631 | python | en | code | 0 | github-code | 69 | [
{
"api_name": "flask.Flask",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "misc.UPLOAD_FOLDER",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "nn.load_model",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "flask.request.files",
... |
23000101677 | import pytest
from proyecto_ets import (
CLIENT_DATABASE,
EMPLOYEE_DATABASE,
PRODUCT_DATABASE,
SALES_DATABASE,
Person,
Client,
Product,
Product_Detail,
Sale,
Sale_Detail,
Employee,
Manager,
)
# CONSTRUCTORES
@pytest.fixture
def create_person():
code = "P001"
na... | AbianGustavo/proyecto-ets | testing/test_proyecto_ets.py | test_proyecto_ets.py | py | 8,408 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "proyecto_ets.Person",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "pytest.fixture",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "proyecto_ets.Client",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "pytest.fi... |
23998511229 | import cv2 as cv
# Open notebook camera
camera = cv.VideoCapture(0)
while True:
_, frame = camera.read()
cv.imshow("camera", frame)
key = cv.waitKey(60)
if key == 27:
break
cv.waitKey(0)
cv.destroyAllWindows() | patrickpiccini/ComputacaoGrafica | Aula08/faceDetect.py | faceDetect.py | py | 237 | python | en | code | 0 | github-code | 69 | [
{
"api_name": "cv2.VideoCapture",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "cv2.imshow",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "cv2.waitKey",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "cv2.waitKey",
"line_number"... |
22002012328 | # Functions and classes operating on a raw Mulran dataset
import numpy as np
import os
from typing import List
from torch.utils.data import Dataset, ConcatDataset
from sklearn.neighbors import KDTree
import torch
from datasets.mulran.utils import read_lidar_poses, in_test_split, in_train_split
from misc.point_clouds ... | jac99/Egonn | datasets/mulran/mulran_raw.py | mulran_raw.py | py | 6,938 | python | en | code | 40 | github-code | 71 | [
{
"api_name": "misc.point_clouds.PointCloudLoader",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "numpy.fromfile",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "numpy.float32",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "... |
1134950504 | #!/usr/bin/env python3
####################################################################################################
#
# Project: Embedded Learning Library (ELL)
# File: version.py
# Authors: Chris Lovett
#
# Requires: Python 3.4+, psutil (pip install psutil)
#
#########################################... | microsoft/ELL | tools/utilities/pythonlibs/version.py | version.py | py | 1,310 | python | en | code | 2,231 | github-code | 69 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "sys.exit",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "sys.exit",
"line_number": 44,
"usage_type": "call"
}
] |
36114637067 | from aocd import lines, submit
import networkx
with open("sample.txt") as fi:
readIn = fi.readlines()
def preProcess(inp):
data = [line.strip() for line in inp]
data = [x for x in data if x != ""]
return data
def solve(inp, expanded):
factor = len(inp)
def getWeight(v):
right = v[0] //... | bensonalec/AdventOfCode2021 | day15/day15.py | day15.py | py | 1,021 | python | en | code | 0 | github-code | 69 | [
{
"api_name": "networkx.grid_2d_graph",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "networkx.single_source_dijkstra",
"line_number": 22,
"usage_type": "call"
}
] |
6226851647 | #import sys
#print(sys.path)
#sys.path.append('/Users/takumi/opt/anaconda3/envs/qc/lib/python3.9/site-packages')
import numpy as np
import matplotlib.pyplot as plt
import tensorflow as tf
import tensornetwork as tn
from opt_einsum import contract
import time
"""
The code is the fc2 neural network for mnist whose linea... | koboritakumi/mnist-code-for-submit | mnist_mpo.py | mnist_mpo.py | py | 8,662 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "numpy.array",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "numpy.random.random",
"line_n... |
23391496711 | import json
from stravabot.clients import weather # Should wrap this up
from stravabot.messages import context, field, image, mrkdwn, plain_text, section
from stravabot.models import (
StravaActivityType,
StravaAspectType,
StravaEvent,
StravaObjectType,
)
from stravabot.services.map import MapService
... | Taiters/stravabot | lambda/stravabot/processor.py | processor.py | py | 2,633 | python | en | code | 0 | github-code | 69 | [
{
"api_name": "stravabot.services.user.UserService",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "stravabot.services.strava.StravaService",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "stravabot.services.map.MapService",
"line_number": 19,
"usage... |
69956532700 | import random
from requests import get
class Jogodavelha:
def __init__(self, jogador_1=None, jogador_2=None):
self.jogador_X = ""
self.jogador_O = ""
self.jogador_1 = jogador_1
self.jogador_2 = jogador_2
self.vez = 0
self.lista_nomes = []
self.ler_cidades_e... | luxu/fpython | jogo-da-velha.py | jogo-da-velha.py | py | 5,916 | python | pt | code | 1 | github-code | 69 | [
{
"api_name": "requests.get",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "random.randint",
"line_number": 140,
"usage_type": "call"
},
{
"api_name": "random.randint",
"line_number": 142,
"usage_type": "call"
},
{
"api_name": "random.randint",
"li... |
34987129018 | #!/usr/bin/python3
"""Starts a Flask web application listening on any interface port 5000.
Routes: /cities_by_states - Displays a HTML page with a list of all states
present in DBStorage and the cities in the states.
"""
from models import storage
from flask import Flask
from flask import r... | McBrian103/AirBnB_clone_v2 | web_flask/8-cities_by_states.py | 8-cities_by_states.py | py | 847 | python | en | code | 0 | github-code | 69 | [
{
"api_name": "flask.Flask",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "models.storage.all",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "models.storage",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "flask.render_template",... |
72336471900 | import asyncio
import discord
from discord.ext import commands
COGS = [
"cogs.core",
]
class MyBot(commands.Bot):
def __init__(self, prefix, intents, rust_class):
super().__init__(command_prefix=prefix, intents=intents, help_command=None)
self.rust_class = rust_class
async def on_rea... | gosuto0/rustbot | discordbot.py | discordbot.py | py | 612 | python | en | code | 0 | github-code | 69 | [
{
"api_name": "discord.ext.commands.Bot",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "discord.ext.commands",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "discord.Intents.all",
"line_number": 20,
"usage_type": "call"
},
{
"api_name":... |
14650097068 | # This is the Wireguard WG swiss army knife.
# You can add, remove, list wireguard clients and send configuration via email, or show QR code in terminal.
import argparse
import json
import smtplib
import subprocess
from email.mime.image import MIMEImage
from email.mime.multipart import MIMEMultipart
from email.mime.te... | devaleriofrancesco/wireguard-victorinox | wg_victorinox.py | wg_victorinox.py | py | 5,938 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "subprocess.check_output",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "subprocess.check_output",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "subprocess.run",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "email.... |
18658317853 | import re
from datetime import datetime
from .base import BaseParser
from .utils import norm
from .static import SupportedPages
class LectureCancellationParser(BaseParser):
"""Parser for lecture cancellation page"""
URL = SupportedPages.LECTURE_CANCELLATION.value
def parse(self):
"""
Par... | StudioAquatan/student_portal_crawler | student_portal_crawler/parser/lec_cancel.py | lec_cancel.py | py | 2,053 | python | en | code | 0 | github-code | 69 | [
{
"api_name": "base.BaseParser",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "static.SupportedPages.LECTURE_CANCELLATION",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "static.SupportedPages",
"line_number": 11,
"usage_type": "name"
},
{
... |
42732029001 | import pygame
from pygame.locals import *
# keys = dict('a',K_A; 'b',K_B;
LETTERS = ["A","B","C","D","E","F","G","H","I","J","K","L","M",
"N","O","P","Q","R","S","T","U","V","W","X","Y","Z"]
def waitForKey():
waiting = True
while waiting:
event=pygame.event.wait()
if event.type == KEYDOWN:
waiting... | JohnSchlerf/MRI-tools | ImageStacker/SimpleUI.py | SimpleUI.py | py | 547 | python | en | code | 0 | github-code | 69 | [
{
"api_name": "pygame.event.wait",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "pygame.event",
"line_number": 11,
"usage_type": "attribute"
}
] |
3363997359 | from os import getenv
from dotenv import load_dotenv
import pyodbc
from collections import namedtuple
from datetime import date
import numpy as np
import pandas as pd
import math
from sys import argv
class DB:
_TABLE_ATTRS = [
'ORDINAL_POSITION', 'COLUMN_NAME', 'DATA_TYPE',
'CHARACTER_MAXIMUM_LENGTH', 'IS_... | ish-101/EF-Copy | db.py | db.py | py | 2,845 | python | en | code | 0 | github-code | 69 | [
{
"api_name": "dotenv.load_dotenv",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number":... |
36965196364 | from urllib import response
import boto3
from botocore.exceptions import ClientError
Session = boto3.Session()
s3 = boto3.client('s3', region_name='eu-west-1')
response = s3.list_buckets()
for bucket in response['Buckets']:
#block public access
try:
bpa = s3.get_public_access_block(Bucket = bucket['Na... | dfoley84/Python | boto3/S3/S3BlockPublicAccess.py | S3BlockPublicAccess.py | py | 1,027 | python | en | code | 0 | github-code | 69 | [
{
"api_name": "boto3.Session",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "boto3.client",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "urllib.response",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "urllib.response",
"line_n... |
18575113529 | import os
import cv2
DATA_DIR = '../data'
OUTPUT_DIR = '../output'
SCALE_FACTOR = 1/2
# 打开本地视频文件或网络摄像头,并播放视频
def OpenAndPlayVideoFile(filename1,filename2):
total=0
vw = None
i=0
try:
print("======to start play video file...")
# 使用OpenCV自带的VideoCapture()函数定义视频文件对象,网络摄像机本质上可以看作远程网络视频文件
... | SHIDi233/OwlSystem-DangerBehaviorDetect | detect-yolov5/stitching/test by shy.py | test by shy.py | py | 2,363 | python | en | code | 0 | github-code | 69 | [
{
"api_name": "cv2.VideoCapture",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "cv2.VideoCapture",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "cv2.resize",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "cv2.resize",
"line_n... |
25249057443 | from mesa.visualization.modules import CanvasGrid, ChartModule
from mesa.visualization.ModularVisualization import ModularServer
from mesa.visualization.UserParam import UserSettableParameter
from .model import infection_model
def portrayCell(cell):
'''
This function is registered with the visualization... | vlpreda1/CA_SIR_model | SIR_Model/server.py | server.py | py | 3,130 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "mesa.visualization.modules.CanvasGrid",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "mesa.visualization.modules.ChartModule",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "mesa.visualization.modules.ChartModule",
"line_number": 43,
... |
23989688094 | import cv2
import mediapipe as mp
import math
import numpy as np
class faceMeshDetection:
def __init__(self, staticMode=False, maxFaces=1, minDetectionCon=0.5, minTrackCon=0.5):
self.staticMode = staticMode
self.maxFaces = maxFaces
self.minDetectionCon = minDetectionCon
self.minTrac... | masanbasa3k/Blink-Counter | faceMeshModule.py | faceMeshModule.py | py | 2,377 | python | en | code | 2 | github-code | 69 | [
{
"api_name": "mediapipe.solutions",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "mediapipe.solutions",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "cv2.cvtColor",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "cv2.CO... |
26594409918 | from flask import request, render_template, redirect, Blueprint, session
from member.models.mem_model import Service, Member
bp = Blueprint('member', __name__, url_prefix='/member')
service = Service()
@bp.route('/list')
def list():
mlist = service.getAll()
return render_template('member/list.html', mlist=ml... | yoozung/Study-Python | member/routes/mem_route.py | mem_route.py | py | 1,839 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "flask.Blueprint",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "member.models.mem_model.Service",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "flask.render_template",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "f... |
9164721500 | # encoding: utf-8
import random, os, magic, Image, base64, struct, time, mimetypes
from flask import redirect
from flask.helpers import send_file
from util import check_store_key
from simples3 import S3Bucket
def unique_id():
return base64.urlsafe_b64encode(struct.pack('fHH', time.time(), os.getpid() % 65536, rand... | mschuetz/tamaraw | src/tamaraw/storage.py | storage.py | py | 8,056 | python | en | code | 2 | github-code | 69 | [
{
"api_name": "base64.urlsafe_b64encode",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "struct.pack",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "time.time",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.getpid",
"line_num... |
5124901037 | # -*- coding: UTF-8 -*-
'''
Created on 18.05.2013
@author: scond_000
'''
from sqlalchemy import Integer, BigInteger, SmallInteger, String, Date, Boolean
from sqlalchemy import Sequence, Column, ForeignKey, MetaData
from sqlalchemy.orm.properties import ColumnProperty
from sqlalchemy.ext.declarative import declarative_... | Scondo/fiosm | fiosm/fias_db.py | fias_db.py | py | 7,845 | python | en | code | 28 | github-code | 71 | [
{
"api_name": "sqlalchemy.MetaData",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.ext.declarative.declarative_base",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.types.TypeDecorator",
"line_number": 23,
"usage_type": "name"
... |
39685711594 | from hartree_fock.rhf import RHF
from quantum_systems import (
TwoDimensionalHarmonicOscillator,
SpatialOrbitalSystem,
)
from quantum_systems import construct_pyscf_system_ao
import numpy as np
from hartree_fock.mix import AlphaMixer, DIIS
import pytest
def test_rhf():
molecule = "li 0.0 0.0 0.0; h 3.08 ... | HyQD/hartree-fock | tests/test_rhf.py | test_rhf.py | py | 3,070 | python | en | code | 0 | github-code | 69 | [
{
"api_name": "quantum_systems.construct_pyscf_system_ao",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "hartree_fock.rhf.RHF",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "pyscf.gto.Mole",
"line_number": 52,
"usage_type": "call"
},
{
"api... |
33818334830 | from __future__ import print_function
import sys
import xml
import xml.dom
import xml.dom.minidom
import math
import planetMakerHelper
stardatafile=None
arg=0
remakePlanets=0
while (arg<len(sys.argv)):
match=0
if sys.argv[arg].find("-csv")==0:
stardatafile=sys.argv[arg][4:]
match=1
if sys.argv[arg].find("-replan... | vegastrike/Vega-Strike-Engine-Source | engine/objconv/starSystemPlanetMaker.py | starSystemPlanetMaker.py | py | 3,067 | python | en | code | 239 | github-code | 69 | [
{
"api_name": "sys.argv",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"line_number... |
33324488439 | from os.path import join
from glob import glob
import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="xsInterface",
version="0.3.2",
author="Dan Kotlyar",
author_email="dan.kotlyar@me.gatech.edu",
description="Cross Section Interface for mul... | CORE-GATECH-GROUP/xs-interface | setup.py | setup.py | py | 1,040 | python | en | code | 1 | github-code | 69 | [
{
"api_name": "setuptools.setup",
"line_number": 10,
"usage_type": "call"
}
] |
21859754220 | import json
import glob, os
import dash
import datetime
import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Input, Output
import plotly.express as px
from django_plotly_dash import DjangoDash
import plotly.graph_objects as go
import pandas as pd
import numpy as np
from E... | gipplab/Electronic-Laboratory-Notebook | Lab_Dash/dash_plot_DAF.py | dash_plot_DAF.py | py | 5,831 | python | en | code | 1 | github-code | 69 | [
{
"api_name": "Exp_Main.models.DAF.objects.get",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "Exp_Main.models.DAF.objects",
"line_number": 25,
"usage_type": "attribute"
},
{
"api_name": "Exp_Main.models.DAF",
"line_number": 25,
"usage_type": "name"
},
{
... |
32586766716 | from datetime import datetime
from config import config
# draw charts
class DrawChart:
def __init__(self, color, tick, chart_flag, no_row, no_col):
self.tick = tick
self.no_row = no_row
self.chart_flag = True if chart_flag in config['translation']['boolean_true'] else False
# forma... | namnamir/access-log-parser | draw_chart.py | draw_chart.py | py | 7,728 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "config.config",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "config.config",
"line_number": 26,
"usage_type": "name"
},
{
"api_name": "datetime.datetime.strptime",
"line_number": 84,
"usage_type": "call"
},
{
"api_name": "datetime.datet... |
22308612878 | from sklearn.datasets import load_iris
import numpy as np
def train_test():
# load the data
iris = load_iris()
X = iris.data[:, 0:4] # X for the set of features
y = iris.target # for the set of labels
print(np.unique(y)) # to print the labels
# One Hot Encode Y: necessary for classificati... | abid-dhoha/multiclass-classification-with-keras | train_test_multiclass_net.py | train_test_multiclass_net.py | py | 1,435 | python | en | code | 0 | github-code | 69 | [
{
"api_name": "sklearn.datasets.load_iris",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "numpy.unique",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "sklearn.preprocessing.LabelBinarizer",
"line_number": 16,
"usage_type": "call"
},
{
"api_n... |
14984660239 | import json
from decouple import Config
from decouple import DEFAULT_ENCODING
from decouple import RepositoryEnv
from decouple import RepositoryIni
from .extensions import ConfigByModel
from .repositories import RepositoryAWSParameterStore
from .repositories import RepositoryAWSSecrets
class CRUDConfig(Config):
... | ralamosm/decouple-extended | decouple_extended/crud.py | crud.py | py | 5,301 | python | en | code | 0 | github-code | 69 | [
{
"api_name": "decouple.Config",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "extensions.ConfigByModel",
"line_number": 49,
"usage_type": "name"
},
{
"api_name": "decouple.RepositoryEnv",
"line_number": 64,
"usage_type": "name"
},
{
"api_name": "decou... |
73828461660 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Nov 19 11:52:37 2021
@author: hannes
"""
from flask import Flask, redirect, url_for, render_template, request, session, flash, json
from datetime import timedelta
import pandas as pd
import time
from datetime import datetime
#create a class for perman... | caldetas/bio-294 | treebrowser/treebrowser.py | treebrowser.py | py | 2,005 | python | en | code | 0 | github-code | 69 | [
{
"api_name": "flask.Flask",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "flask.render_template",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "os.walk",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "flask.request.method",
... |
34149627128 | from random import sample
import matplotlib.pyplot as plt
import numpy as np
from tqdm import tqdm
import cv2
import torch
from torch.utils.data import RandomSampler, DataLoader, Subset
from preprocess.dataset import Dataset
from models.generator import Generator
from models.discriminator import Discriminator
from torc... | Rubiksman78/Sketch2Waifu | trainer.py | trainer.py | py | 6,270 | python | en | code | 6 | github-code | 71 | [
{
"api_name": "config.DEFAULT_CONFIG",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "preprocess.dataset.Dataset",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "torch.utils.data.Subset",
"line_number": 24,
"usage_type": "call"
},
{
"api_name... |
31686143996 | from keras.preprocessing.image import ImageDataGenerator
from keras.models import Sequential
from keras.layers import Conv2D, MaxPooling2D
from keras.layers import Activation, Dropout, Flatten, Dense
from keras import backend as K
import os
import subprocess
import tensorflow as tf
from create_nn_model import create_n... | neuroon-engineering/FlowAPI | new_train_model.py | new_train_model.py | py | 1,628 | python | en | code | 1 | github-code | 69 | [
{
"api_name": "keras.backend.image_data_format",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "keras.backend",
"line_number": 23,
"usage_type": "name"
},
{
"api_name": "create_nn_model.create_nn_model",
"line_number": 28,
"usage_type": "call"
},
{
"api... |
37527508726 | import numpy as np
import pandas as pd
from numba import jit
import matplotlib.pyplot as plt
from torch.optim.lr_scheduler import StepLR
import pickle
import time
from ipypb import track
import argparse
import torch
from t_alg import mttcrp, mttcrp1, get_elem_deriv_tensor, factors_to_tensor, gcp_grad, multi_ind_to_i... | AlbMLpy/Link-prediction | gpu/gd_torch.py | gd_torch.py | py | 9,311 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "pickle.load",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "pickle.load",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "torch.sum",
"line_number": 56,
"usage_type": "call"
},
{
"api_name": "t_alg.mttcrp1",
"line_number": ... |
8194277030 | import json
json_path = '/data/yujie/Ebert/pre_dataset.json'
# 密码子-氨基酸对照表
codon_to_amino_acid = {
'TTT':'F','TTC':'F','TTA':'L','TTG':'L','CTT':'L','CTC':'L','CTA':'L','CTG':'L',
'ATT':'I','ATC':'I','ATA':'I','ATG':'M','GTT':'V','GTC':'V','GTA':'V','GTG':'V',
'TCT':'S','TCC':'S','TCA':'S','TCG':'S','CCT':'... | 20375380/ECODON | Process2.py | Process2.py | py | 3,273 | python | en | code | 0 | github-code | 69 | [
{
"api_name": "json.load",
"line_number": 69,
"usage_type": "call"
},
{
"api_name": "json.dump",
"line_number": 82,
"usage_type": "call"
}
] |
38148559697 | from . import get_env_variable
from art import tprint
SECRET_KEY = get_env_variable("SECRET")
TEST = get_env_variable("TEST")
# ----------------------------------------------
DEBUG = True
ROOT_URLCONF = 'settings.urls'
WSGI_APPLICATION = 'settings.wsgi.application'
# ----------------------------------------------
... | TheZhenok/spam_api | settings/conf.py | conf.py | py | 996 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "art.tprint",
"line_number": 38,
"usage_type": "call"
}
] |
13975404575 | from django.db.models import Count
from rest_framework import serializers
from rest_framework.validators import UniqueValidator, UniqueTogetherValidator
from utils.utils import CurrentUserDefault
from .models import PlayList, Tag, Song, PlayListFav
from song.serializers import SongListSerializer
class TagSerializer(... | dgut-group-ten/song | apps/playlist/serializers.py | serializers.py | py | 4,628 | python | en | code | 0 | github-code | 69 | [
{
"api_name": "rest_framework.serializers.ModelSerializer",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "rest_framework.serializers",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "rest_framework.serializers.SerializerMethodField",
"line_number": ... |
25918595634 | from collections import namedtuple, Counter
import time
import random
import sys
Cell = namedtuple('Cell', ['x', 'y'])
X = 10
Y = 10
# Constants
WHITE_SPACE = u"\u25A1"
FILLED_SPACE = u"\u25A0"
CLEAR_SCREEN = "\033[2J\033[1;1H"
NEW_LINE = '\n'
def get_neighbor_cells(cell, is_bounded=True):
"""
This is a gen... | atbPy/GameOfLife | game.py | game.py | py | 3,891 | python | en | code | 0 | github-code | 69 | [
{
"api_name": "collections.namedtuple",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "collections.Counter",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "random.randrange",
"line_number": 81,
"usage_type": "call"
},
{
"api_name": "sys.argv",... |
28728115032 | # Write your code here
import random
import sqlite3
class BankAccount:
def __init__(self, *args, **kwargs):
if args:
self.account_number = args[0][1]
self.pin = args[0][2]
self.balance = args[0][3]
elif kwargs:
print(kwargs)
else:
... | ohall1/SimpleBankingSystem | banking.py | banking.py | py | 8,613 | python | en | code | 0 | github-code | 69 | [
{
"api_name": "random.randint",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "random.randint",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "random.seed",
"line_number": 69,
"usage_type": "call"
},
{
"api_name": "sqlite3.connect",
"line... |
37695396916 | import os
import unittest
import tempfile
import shutil
import uuid
import time
from pathlib import Path
from typing import Optional
import pluca
import pluca.file
from pluca.test import CacheTester
class TestFile(CacheTester, unittest.TestCase):
def setUp(self) -> None:
self._dir: Optional[Path] = Path... | flaviovs/pluca | tests/test_file.py | test_file.py | py | 1,507 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "pluca.test.CacheTester",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "unittest.TestCase",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "typing.Optional",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "pathlib... |
75048275740 | from keras.models import Model
from keras.layers import Input, merge, ZeroPadding2D
from keras.layers.core import Dense, Dropout, Activation
from keras.layers.convolutional import Convolution2D
from keras.layers.pooling import AveragePooling2D, GlobalAveragePooling2D, MaxPooling2D
from keras.layers.normalization import... | kimren227/Yelp_Photo_Classification_Challenge | densenet/models.py | models.py | py | 7,972 | python | en | code | 4 | github-code | 69 | [
{
"api_name": "keras.layers.normalization.BatchNormalization",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "keras.layers.core.Activation",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "keras.layers.convolutional.Convolution2D",
"line_number": 36,
... |
34770748129 | import webbrowser
import cv2
import os
import PySimpleGUI as sg
import subprocess
import atexit
def make_frames(input_path, quality, output_folder):
if input_path.lower().endswith(('.mp4', '.avi', '.mkv', '.mov')):
is_video = True
cap = cv2.VideoCapture(input_path)
if not cap.isOpened():
... | revolverocelot1/viddiff-test | main2.py | main2.py | py | 4,413 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "cv2.VideoCapture",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "cv2.VideoCapture",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "cv2.CAP_PROP_FRAME_COUNT",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "os.pa... |
72877487271 | from flask import Flask,request
import pandas as pd
import numpy as np
import pickle
"""the first stzp when we use flak"""
app = Flask(__name__)#instanciate the flask object
pickle_in=open("classifier.pkl","rb")#open the ML model
classifier=pickle.load(pickle_in)
@app.route('/foobarbaby')#il s'agit d'un declarate... | AlouDiakhi/flasgger | temp.py | temp.py | py | 1,088 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "flask.Flask",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "pickle.load",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "flask.request.args.get",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "flask.request.args",
... |
70710914146 | import zmq
from abc import ABCMeta, abstractmethod
import struct
from logging import DEBUG, INFO, ERROR
import threading
from multiprocessing import Process
from zmq.eventloop.ioloop import IOLoop, PeriodicCallback
from zmq.eventloop.zmqstream import ZMQStream
from utils.logging_util import SetGlobalLoggingLevel, ... | JPLOpenSource/fprime-sw-Rel1.0 | Gse/src/server/AdapterLayer/adapter_base.py | adapter_base.py | py | 7,408 | python | en | code | 1 | github-code | 70 | [
{
"api_name": "server.ServerUtils.server_config.ServerConfig.getInstance",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "server.ServerUtils.server_config.ServerConfig",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "abc.ABCMeta",
"line_number": 28,
... |
71564850141 | # -*- coding:utf-8 -*-
import os
import web
import math
import datetime
import time
import urllib
from util import render_mako
from util import StaticDirHandler
from util import StaticFileHandler
def localtime(d):
return d + datetime.timedelta(seconds=28800)
def gmttime(d):
return d - datetime.timedelta(seconds... | xiexiao/blogPy | pages.py | pages.py | py | 16,052 | python | en | code | 0 | github-code | 69 | [
{
"api_name": "datetime.timedelta",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "datetime.timedelta",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "os.path.dirname",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "os.path",
"... |
12278781282 | import numpy as np
import uuid
import datetime
import pandas as pd
import os
import unidecode
cities = {}
cities["UNITED_STATES"] = [city.upper() for city in ["New York", "Chicago", "Los Angeles", "Boston", "San Francisco"]]
cities["FRANCE"] = [city.upper() for city in ["Paris","Marseille","Lyon","Toulouse","Nice","N... | Henri-Hoyez/buisness_intelligence_project | create_cars_data.py | create_cars_data.py | py | 5,382 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "numpy.sum",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "numpy.exp",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "numpy.sum",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "numpy.arange",
"line_number": 28,
... |
20354180019 | from os import getcwd
from glob import glob
from zipfile import ZipFile
import pandas as pd
# Du .zip failus iš aplanko Duomenys pasibandymui nukopijuokite į aplanką Files. Rezultatą rasite aplanke Results.
dir_path = f'{getcwd()}\\Files'
i = ''
for i in glob(f'{dir_path}\\*.zip'):
ZipFile(i).extractall(dir_pat... | DainiusPythonPTU11/inat-common-names-ltu | list.py | list.py | py | 1,377 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "os.getcwd",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "glob.glob",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "zipfile.ZipFile",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_numbe... |
35441970466 | import smtplib
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
def sendmessagetomail():
host = "smtp.gmail.com:587"
server=smtplib.SMTP(host)
sender="automailpython@gmail.com"
recipient=["ssasirekha95@gmail.com"]
msg=MIMEMultipart()
msg['Subject']="automailpython t... | ssasirekha25/PythonInRealWorld | Sendmail.py | Sendmail.py | py | 780 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "smtplib.SMTP",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "email.mime.multipart.MIMEMultipart",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "email.mime.text.MIMEText",
"line_number": 17,
"usage_type": "call"
},
{
"api_name"... |
15098538756 | #!/usr/bin/env python3
import requests
import sys
import time
import base64
import json
class KademliaNode:
def __init__(self, address):
self.address = address
def store_here(self, key, value):
requests.post("http://{}/store_here/{}".format(self.address, key), data=value)
def store(self... | pdelong/Kademlia | scripts/kademlia.py | kademlia.py | py | 1,912 | python | en | code | 9 | github-code | 69 | [
{
"api_name": "requests.post",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "requests.post",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_num... |
29106590071 | import torch
import os
import numpy as np
import math
import dataset
import model
import name_test
def append_progress(file, values):
f = open(file, 'a')
f.write(",".join(map(str, values)) + '\n')
f.close()
def train(epochs = 100):
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu... | aljazerzen/data-science-amph-ident | name_train.py | name_train.py | py | 2,312 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "torch.device",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "torch.cuda.is_available",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "torch.cuda",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "model.AmphiNameN... |
41280163638 | import os
from img_app import create_app
from img_app.main.db import get_db, init_db
import tempfile
import pytest
with open(os.path.join(os.path.dirname(__file__), 'data.sql'), 'rb') as f:
_data_sql = f.read().decode('utf8')
image_path = os.path.join(os.path.dirname(__file__), 'images')
@pytest.fixture
def ... | KrupinSA/image_services | tests/conftest.py | conftest.py | py | 764 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "os.path.join",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "os.path.dirname",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_numbe... |
9967054462 | from PIL import Image
import os
def crop (image_path, coords, saved_location):
image_obj = Image.open(image_path)
cropped_image = image_obj.crop(coords)
cropped_image.save(saved_location)
cropped_image.show()
if __name__ == '__main__':
pdf_list = []
for file in os.listdir(os.getcwd()):
... | maxfornacon/scripts | crop.py | crop.py | py | 381 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "PIL.Image.open",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "PIL.Image",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "os.listdir",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.getcwd",
"line_number": 12,
... |
11840478148 | import requests
import bs4
from bs4 import BeautifulSoup as bs
url = 'https://movie.naver.com/movie/sdb/rank/rmovie.nhn?sel=pnt&date=20200303'
headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.64 Safari/537.36 Edg/101.0.1210.53'}
data = reques... | snailweeds/pythonProject | Q1_crawling.py | Q1_crawling.py | py | 738 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "requests.get",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 10,
"usage_type": "call"
}
] |
9560703148 | import sys
from typing import List
class Solution:
def minimumAbsDifference(self, arr: List[int]) -> List[List[int]]:
if not arr:
return []
arr.sort()
result = []
N = len(arr)
minimum_value = sys.maxsize
for index in range(N):
if index + 1 < N:... | yanansun2020/leetcode | python/array/1200-Minimum-Absolute-Difference.py | 1200-Minimum-Absolute-Difference.py | py | 860 | python | en | code | 1 | github-code | 71 | [
{
"api_name": "typing.List",
"line_number": 4,
"usage_type": "name"
},
{
"api_name": "sys.maxsize",
"line_number": 10,
"usage_type": "attribute"
}
] |
70845071906 | """Helper functions for geocoding and coordinate conversions."""
from builtins import enumerate
import requests
import json
def get_RDXY(postcode, huisnummer):
"""
Fetches X, Y Rijksdriehoek coordinates from BAG.
postcode: Dutch zipcode in format '1234AB'
huisnmmmer: house number, without any addi... | dataverbinders/nimbletl | nimbletl/gis.py | gis.py | py | 5,522 | python | en | code | 4 | github-code | 70 | [
{
"api_name": "requests.get",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "builtins.enumerate",
"line_number": 134,
"usage_type": "call"
},
{
"api_name": "builtins.enumerate",
"line_number": 144,
"usage_type": "call"
},
{
"api_name": "builtins.enumera... |
27869300251 | import scipy.stats as st
from collections import Counter
import sklearn
from matplotlib import cm
import scipy
import itertools
from datetime import datetime
from seaborn import clustermap
from scipy.cluster.hierarchy import linkage
import matplotlib as mpl
from sklearn.linear_model import LogisticRegression
import os... | gerberlab/cdiff_paper_analyses | scripts/make_heatmaps.py | make_heatmaps.py | py | 24,421 | python | en | code | 1 | github-code | 69 | [
{
"api_name": "matplotlib.rc",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 70,
"usage_type": "call"
},
{
"api_name": "scipy.spatial.distance.pdist",
"line_number": 116,
"usage_type": "call"
},
{
"api_name": "scipy.spa... |
70416886950 | import numpy as np
import torch
def one_hot(vector, n):
out = np.zeros(n)
for i in vector:
out[i] = 1
return out
def masked_mse(pred, label, mask):
# multi-output mse with masking
return torch.sum(((pred-label)**2)*mask)/torch.sum(mask)
def masked_aCC(pred, label, mask):
# multi-outpu... | yysun0116/drug_response_prediction | 1.Computational_method_comparison/WL_GNN_model/utils.py | utils.py | py | 709 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "numpy.zeros",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "torch.sum",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "torch.sum",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "torch.sum",
"line_number": 17,
... |
23863785269 |
import requests
import base64
from datetime import datetime
from os import path
from os import system
from response_actions import change_battery, stay_on, update, send_log, get_trap_status, send_run_time
from Autofocus import get_focus
from picamera import PiCamera
from ctypes import * # Motorized 8mp line
import tim... | gigalala/trap-scripts | trap-daily.py | trap-daily.py | py | 18,935 | python | en | code | 0 | github-code | 69 | [
{
"api_name": "requests.head",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "requests.ConnectionError",
"line_number": 33,
"usage_type": "attribute"
},
{
"api_name": "logging.info",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "logging.erro... |
33913827105 | import logging
from hashlib import new as hashnew
import requests
from odoo import _, api, fields, models
from odoo.exceptions import ValidationError
from odoo.addons.payment_ogone import const
_logger = logging.getLogger(__name__)
class PaymentProvider(models.Model):
_inherit = 'payment.provider'
code ... | odoo/odoo | addons/payment_ogone/models/payment_provider.py | payment_provider.py | py | 5,866 | python | en | code | 31,745 | github-code | 71 | [
{
"api_name": "logging.getLogger",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "odoo.models.Model",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "odoo.models",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "odoo.fields.Sele... |
73467165980 | import time, datetime
from google.cloud import firestore
import os
os.environ['GOOGLE_APPLICATION_CREDENTIALS'] = './credentials/YOUR_GOOGLE_APPLICATION_CREDENTIALS_FILE.json'
PROJECT_ID = "spotify-co-featuring2gra-34f8c"
MODE = 'staging'
PATH_DASHBOARD = MODE + '-dashboard'
PATH_ARTIST_DATA = MODE + '-artist_data'
... | adammln/song-co-featuring-graph-mining | DataMining/src/data_mining/firestore_api.py | firestore_api.py | py | 12,175 | python | en | code | 0 | github-code | 69 | [
{
"api_name": "os.environ",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "google.cloud.firestore.Client",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "google.cloud.firestore",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "g... |
35139748864 | # -*- coding: utf-8 -*-
"""
Created on Thu Apr 22 13:06:23 2021
@author: Sassan Mokhtar
"""
import numpy as np
from scipy.io import loadmat
import matplotlib.pyplot as plt
#==========================================================
# Vectors and Matrices in Python
#===================================================... | Sassanmtr/Statistical-Pattern-Recognition | 1. Introduction/ps1.py | ps1.py | py | 1,494 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "numpy.array",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "numpy.random.random",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "numpy.array",
"... |
29022446766 | from selenium import webdriver
def Taoyuan():
target_url = 'https://www.cwb.gov.tw/V7/forecast/taiwan/Taoyuan_City.htm'
driver = webdriver.PhantomJS(executable_path=r'C:\Users\lltin\.PyCharm2019.1\phantomjs.exe')#導入PhantomJS路徑
driver.get(target_url)
text = driver.find_element_by_xpath('//*[@id="f... | chieh89/fetch-weather | weather.py | weather.py | py | 407 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "selenium.webdriver.PhantomJS",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 5,
"usage_type": "name"
}
] |
39590795105 | import win32serviceutil
import win32service
import win32event
import servicemanager
import socket
import sys
import os
from flask import Flask, render_template, request
class FlaskService(win32serviceutil.ServiceFramework):
_svc_name_ = 'FlaskService'
_svc_display_name_ = 'Flask Service'
def __init__(s... | zhixe/Python-Script | projects/words_count/flask_service.py | flask_service.py | py | 2,077 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "win32serviceutil.ServiceFramework",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "win32serviceutil.ServiceFramework.__init__",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "win32serviceutil.ServiceFramework",
"line_number": 18,
... |
1873855803 | #Mini-project for to see the wheater from the region you live.
#First, import this libs
#for the window
import tkinter as tk
#for the wheater
import requests as rq
from bs4 import BeautifulSoup
#Search -> 'Wheater in [your region]' -> search on google
search = 'Weather in São Bernardo do Campo'
url = f'https://www.go... | JhonatasMenezes/JhonatasMenezes | Personal Projects/PYTHON/Atualização do tempo.py | Atualização do tempo.py | py | 987 | python | en | code | 2 | github-code | 71 | [
{
"api_name": "requests.get",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "tkinter.Tk",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "tkinter.Label",
"line_n... |
19611091726 | from datetime import date
from django.core.exceptions import ValidationError
from legal.common.forms import Form
from legal.common.fields import CharField, AmountField, CurrencyField, DateField, ChoiceField
from legal.common.widgets import TextWidget, DateWidget, RadioWidget
OPTS = (
('none', 'sine'),
('epr... | tompecina/legal | legal/sop/forms.py | forms.py | py | 1,383 | python | en | code | 11 | github-code | 71 | [
{
"api_name": "legal.common.forms.Form",
"line_number": 22,
"usage_type": "name"
},
{
"api_name": "legal.common.fields.AmountField",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "legal.common.widgets.TextWidget",
"line_number": 25,
"usage_type": "call"
},
... |
6070505970 | import random
import datetime
import time
import matplotlib.animation as animation
import matplotlib.pyplot as plt
from paho.mqtt import client as mqtt_client
from threading import Thread
import sqlite3
conn = sqlite3.connect('SENSEHAT.db')
"""
#ID == UNIX TIME/DATE
conn.execute('''CREATE TABLE SENSEHAT
(ID... | TakudzwaMzembegwa/LiveWeather | mqtt_subscriber_server.py | mqtt_subscriber_server.py | py | 3,632 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "sqlite3.connect",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "random.randint",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "time.time",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "paho.mqtt.client.Client",
... |
72182679906 | import time
from aiogram.types import ChatPermissions
async def ban_command(message, bot):
if message.chat.type == "private":
await message.reply(text="Команда для бана участников(доступно только админам паблика). Работает так:\n"
"Чтобы забанить игрока ответи на его сооб... | HarveyCR/shool_project | handlers/ban.py | ban.py | py | 2,630 | python | ru | code | 0 | github-code | 70 | [
{
"api_name": "aiogram.types.ChatPermissions",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "time.time",
"line_number": 38,
"usage_type": "call"
}
] |
39832663765 | import ndspy
import ndspy.rom, ndspy.bmg, ndspy.codeCompression
import ndspy.narc
import code
import io
import os
import json
import copy
import sys
import re
# code.interact(local=dict(globals(), **locals()))
######################### CONSTANTS #############################
def set_global_vars(rom_name):
global ... | hzla/Pokeweb-Live | python/move_effects_table_writer.py | move_effects_table_writer.py | py | 2,903 | python | en | code | 2 | github-code | 70 | [
{
"api_name": "json.load",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "json.load",
"line_number": 56,
"usage_type": "call"
},
{
"api_name": "json.load",
"line_number": 87,
"usage_type": "call"
},
{
"api_name": "json.dump",
"line_number": 95,
... |
36597701967 | import requests
from selenium import webdriver
import smtplib
import csv
from email.message import EmailMessage
driver = webdriver.Chrome(executable_path=r"driver-path")
link = "https://summerofcode.withgoogle.com/archive/2020/organizations/"
driver.get(link)
orgs = driver.find_elements_by_class_name("organization-c... | adit19shah/E-Commerce-Price-Tracker | Mid-evaluation Script/scrape.py | scrape.py | py | 1,694 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "csv.writer",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "email.message.E... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.