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
75264403945
import socket import pygame # noinspection PyUnresolvedReferences,PyProtectedMember from pygame._sdl2 import Window from typing import Any from _thread import start_new_thread import winsound from time import sleep from json import loads, dumps, load from pymsgbox import alert class LimboKeysClient: def __init__(...
quasar098/limbos32
main.py
main.py
py
4,638
python
en
code
10
github-code
36
[ { "api_name": "pygame.Surface", "line_number": 17, "usage_type": "call" }, { "api_name": "_thread.start_new_thread", "line_number": 24, "usage_type": "call" }, { "api_name": "socket.socket", "line_number": 29, "usage_type": "call" }, { "api_name": "socket.AF_INET"...
20006327119
import numpy as np import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torch.nn.utils.rnn import pad_sequence from torch.nn.utils.rnn import pack_padded_sequence from torch.nn.utils.rnn import pad_packed_sequence from gensim.models.word2vec import Word2Vec import torch...
Woffee/dlvp
automl/main.py
main.py
py
18,654
python
en
code
0
github-code
36
[ { "api_name": "os.path.dirname", "line_number": 52, "usage_type": "call" }, { "api_name": "os.path", "line_number": 52, "usage_type": "attribute" }, { "api_name": "os.path.abspath", "line_number": 52, "usage_type": "call" }, { "api_name": "torch.device", "line...
19593309895
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('carga', '0001_initial'), ] operations = [ migrations.AlterField( model_name='carga', name='id_carga'...
wellicfaria/cargobr
carga/migrations/0002_auto_20150922_1258.py
0002_auto_20150922_1258.py
py
389
python
en
code
0
github-code
36
[ { "api_name": "django.db.migrations.Migration", "line_number": 7, "usage_type": "attribute" }, { "api_name": "django.db.migrations", "line_number": 7, "usage_type": "name" }, { "api_name": "django.db.migrations.AlterField", "line_number": 14, "usage_type": "call" }, {...
30395658662
from rest_framework import status from rest_framework.decorators import api_view from rest_framework.response import Response from django.http import HttpResponse from rest_framework.generics import ListAPIView from django.db.models import Q from posts.models import Post, PostCategory, PostOwner from memberships.model...
siklerdaniiii/astral
posts/api/views.py
views.py
py
5,074
python
en
code
0
github-code
36
[ { "api_name": "posts.models.Post.objects.all", "line_number": 19, "usage_type": "call" }, { "api_name": "posts.models.Post.objects", "line_number": 19, "usage_type": "attribute" }, { "api_name": "posts.models.Post", "line_number": 19, "usage_type": "name" }, { "ap...
37747156972
from lxml import etree import numpy as np import re class BhpDocumentParser: isCPTRegistrationRequest = False nsMap = {} metadata = {} cptMatrix = None dissipationMatrices = None def __init__(self, xmlTree): self.xmlTree = xmlTree self.generateNsMap() self.generateMatr...
ZBoukich/brofiles
scripts/bhpdocumentparser.py
bhpdocumentparser.py
py
6,683
python
en
code
0
github-code
36
[ { "api_name": "numpy.matrix", "line_number": 52, "usage_type": "call" }, { "api_name": "numpy.float", "line_number": 52, "usage_type": "attribute" }, { "api_name": "lxml.etree.fromstring", "line_number": 90, "usage_type": "call" }, { "api_name": "lxml.etree", ...
27068411013
from fastapi import APIRouter, Body from models.model import User, UserLogin from auth.jwt_handler import signJWT router = APIRouter( tags = ["User Routes"] ) users = [] @router.get("/") def get(): return {"Hello": "Wob"} @router.post("/user/signup") def user_signup(user: User = Body(defaul...
Namikaze007/TodoFastapi
routes/users.py
users.py
py
802
python
en
code
0
github-code
36
[ { "api_name": "fastapi.APIRouter", "line_number": 5, "usage_type": "call" }, { "api_name": "models.model.User", "line_number": 17, "usage_type": "name" }, { "api_name": "fastapi.Body", "line_number": 17, "usage_type": "call" }, { "api_name": "auth.jwt_handler.sign...
42778530183
from unittest.mock import Mock, patch import pytest from redshift_connector.error import InterfaceError, OperationalError, ProgrammingError from toucan_connectors.pagination import ( KnownSizeDatasetPaginationInfo, OffsetLimitInfo, PaginationInfo, ) from toucan_connectors.redshift.redshift_database_connec...
ToucanToco/toucan-connectors
tests/redshift/test_redshift.py
test_redshift.py
py
20,723
python
en
code
16
github-code
36
[ { "api_name": "toucan_connectors.redshift.redshift_database_connector.RedshiftConnector", "line_number": 26, "usage_type": "call" }, { "api_name": "toucan_connectors.redshift.redshift_database_connector.AuthenticationMethod.DB_CREDENTIALS", "line_number": 27, "usage_type": "attribute" ...
39205903455
import pytest import yaml import os import json def load_configuration(filename): prod_config_file = filename with open(prod_config_file) as input_file: config_parameters = yaml.load(input_file, Loader=yaml.FullLoader) return config_parameters def load_model_performance(filename): with open(fi...
jacordero/ESA-audio-sentiment-analysis
tests/test_cases/Threshold_test_cases/test_TTC_1a-Accuracy.py
test_TTC_1a-Accuracy.py
py
812
python
en
code
0
github-code
36
[ { "api_name": "yaml.load", "line_number": 9, "usage_type": "call" }, { "api_name": "yaml.FullLoader", "line_number": 9, "usage_type": "attribute" }, { "api_name": "json.load", "line_number": 14, "usage_type": "call" } ]
39587111591
import os import unittest import dateutil.parser from dropmunch import munch_data, munch_spec iso8601_timestamp1 = '2007-10-01T13:47:12.345Z' valid_datafile_name = 'DATAspecvalid_{0}.txt'.format(iso8601_timestamp1) class DataFileProcessing(unittest.TestCase): def setUp(self): self.working_directory = os....
zharben/dropmunch
dropmunch/test/test_munch_data.py
test_munch_data.py
py
5,174
python
en
code
0
github-code
36
[ { "api_name": "unittest.TestCase", "line_number": 9, "usage_type": "attribute" }, { "api_name": "os.getcwd", "line_number": 12, "usage_type": "call" }, { "api_name": "dropmunch.munch_data.MunchData", "line_number": 13, "usage_type": "call" }, { "api_name": "dropmu...
40657801370
import torch import numpy as np import torch.nn.functional as F from models import GetModel from datagen import DataPool from WGRutils import WGREnv, WandBScatterMaxlinePlot import os import wandb import argparse from datetime import datetime from termcolor import colored EPS = 1e-8 def temperature_schedule(args, t...
betairylia/WorldGen-Voxel-DMGibbs
eval.py
eval.py
py
5,086
python
en
code
0
github-code
36
[ { "api_name": "wandb.init", "line_number": 25, "usage_type": "call" }, { "api_name": "torch.device", "line_number": 31, "usage_type": "call" }, { "api_name": "torch.cuda.is_available", "line_number": 31, "usage_type": "call" }, { "api_name": "torch.cuda", "lin...
71514466985
import numpy as np import matplotlib.pyplot as plt x = np.loadtxt('test_accuracies') plt.figure(figsize=(5.2, 3.1)) plt.errorbar(x[:, 0], x[:, 1:].mean(axis=1), yerr=np.std(x[:, 1:], axis=1, ddof=1), capsize=3, label='SVM accuracy on SNN output') plt.axhline(y=95, color='orange', linestyle='--', label='SVM accuracy ...
colinshane/stdp-conv-speech
figures/accuracy.py
accuracy.py
py
475
python
en
code
0
github-code
36
[ { "api_name": "numpy.loadtxt", "line_number": 5, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.figure", "line_number": 7, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 7, "usage_type": "name" }, { "api_name": "matplotlib.pypl...
27691178390
# Import modules import random from scapy.all import IP, UDP, send, Raw from colorama import Fore # Load MEMCACHED servers list with open("tools/L4/memcached_servers.txt", "r") as f: memcached_servers = f.readlines() # Payload payload = "\x00\x00\x00\x00\x00\x01\x00\x00stats\r\n" def flood(target):...
LimerBoy/Impulse
tools/L4/memcached.py
memcached.py
py
1,026
python
en
code
2,202
github-code
36
[ { "api_name": "random.choice", "line_number": 15, "usage_type": "call" }, { "api_name": "random.randint", "line_number": 16, "usage_type": "call" }, { "api_name": "scapy.all.IP", "line_number": 21, "usage_type": "call" }, { "api_name": "scapy.all.UDP", "line_n...
21188323810
# Мне надоело постоянно менять номер версии в разных файлах, поэтому появился данный скрипт :) import io newver = input("Введите номер новой версии: ") f = open("installer.iss", "rt") buf = f.readlines() f.close() f = open("installer.iss", "wt") for item in buf: if item.startswith("#define MyAppVersion "): print(...
student-proger/BellManager
changeVersion.py
changeVersion.py
py
1,195
python
ru
code
0
github-code
36
[ { "api_name": "io.open", "line_number": 19, "usage_type": "call" }, { "api_name": "io.open", "line_number": 22, "usage_type": "call" }, { "api_name": "io.open", "line_number": 31, "usage_type": "call" }, { "api_name": "io.open", "line_number": 34, "usage_t...
44306025103
import click from datetime import timedelta from pathlib import Path from typing import Iterable # this library does not come with type stubs, so we tell mypy to ignore it import pytimeparse # type: ignore from urbasys import log_utils from urbasys.urbackup import retention BACKUP_ROOT_DIR = "/urbackup/mirror" @...
urbas/urbasys
urbasys/urbackup/app.py
app.py
py
2,012
python
en
code
2
github-code
36
[ { "api_name": "urbasys.log_utils.setup_logging", "line_number": 20, "usage_type": "call" }, { "api_name": "urbasys.log_utils", "line_number": 20, "usage_type": "name" }, { "api_name": "click.group", "line_number": 16, "usage_type": "call" }, { "api_name": "click.o...
34846400693
from django.shortcuts import render, redirect from django.contrib.auth.decorators import login_required from django.db.models import CharField, Value, Q from itertools import chain from authentication.models import User from website.models import Review, UserFollows, Ticket from website import forms @login_required...
TMee3/DA-PYTHON-9
website/views.py
views.py
py
8,215
python
en
code
0
github-code
36
[ { "api_name": "website.models.UserFollows.objects.filter", "line_number": 19, "usage_type": "call" }, { "api_name": "website.models.UserFollows.objects", "line_number": 19, "usage_type": "attribute" }, { "api_name": "website.models.UserFollows", "line_number": 19, "usage_...
8192772574
# -*- utf-8 -*- ######################################## # PSF license aggrement for logmsg.py # Developed by Ivan Rybko # Logmsg ######################################## from singleton import Singleton import logging @Singleton class Logmsg: def __init__(self, name): if isinstance(name, str): ...
irybko/pyclasses
logmsg.py
logmsg.py
py
1,573
python
en
code
0
github-code
36
[ { "api_name": "logging.getLogger", "line_number": 20, "usage_type": "call" }, { "api_name": "logging.DEBUG", "line_number": 21, "usage_type": "attribute" }, { "api_name": "logging.FileHandler", "line_number": 23, "usage_type": "call" }, { "api_name": "logging.DEBU...
70816879145
#!/usr/bin/env python ''' ./converter.py \ --model model.h5 \ --desc "Predicts either a phone is in the hands or in a pocket" \ --input_desc "Sensor samples (acc, gyro, mag, 50Hz)" \ --output_desc "1 - phone in the hands, 0 - phone in a pocket" \ --author "Danylo Kostyshyn" \ --license="MIT" ''' from __future__...
danylokos/activity-demo-model
converter.py
converter.py
py
1,593
python
en
code
1
github-code
36
[ { "api_name": "argparse.ArgumentParser", "line_number": 20, "usage_type": "call" }, { "api_name": "keras.models.load_model", "line_number": 32, "usage_type": "call" }, { "api_name": "coremltools.converters.keras.convert", "line_number": 34, "usage_type": "call" }, { ...
70939042984
import os import numpy as np import matplotlib.pyplot as plt from config import * from model import get_model from data import get_single_test def evaluate(test_num): model = get_model(train=TRAIN_MODEL) print("got model") test = get_single_test(test_num) print("got test") num_clips = test.shape[...
Colprit/VideoAnomolyDetection
main.py
main.py
py
1,321
python
en
code
0
github-code
36
[ { "api_name": "model.get_model", "line_number": 10, "usage_type": "call" }, { "api_name": "data.get_single_test", "line_number": 12, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_number": 16, "usage_type": "call" }, { "api_name": "numpy.zeros", "l...
18394788465
from typing import List, Union from openai.types.chat import ChatCompletionMessageParam, ChatCompletionContentPartParam from imported_code_prompts import ( IMPORTED_CODE_BOOTSTRAP_SYSTEM_PROMPT, IMPORTED_CODE_IONIC_TAILWIND_SYSTEM_PROMPT, IMPORTED_CODE_REACT_TAILWIND_SYSTEM_PROMPT, IMPORTED_CODE_TAILW...
abi/screenshot-to-code
backend/prompts.py
prompts.py
py
3,553
python
en
code
15,739
github-code
36
[ { "api_name": "typing.Union", "line_number": 31, "usage_type": "name" }, { "api_name": "imported_code_prompts.IMPORTED_CODE_TAILWIND_SYSTEM_PROMPT", "line_number": 33, "usage_type": "name" }, { "api_name": "imported_code_prompts.IMPORTED_CODE_TAILWIND_SYSTEM_PROMPT", "line_nu...
74747977385
#MORFOLOJİK OPERASYONLAR import cv2 import matplotlib.pyplot as plt import numpy as np # img = cv2.imread("img.png",0) plt.figure(),plt.imshow(img , cmap = "gray"),plt.axis("off") #EROZYON -ön plandaki nesnenin sınırlarını aşındırır kernel = np.ones((3,3),dtype = np.uint8) result = cv2.erode(img, ke...
tetroweb/opencv_lessons
lessons/chapter_9.py
chapter_9.py
py
1,993
python
tr
code
0
github-code
36
[ { "api_name": "cv2.imread", "line_number": 7, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.figure", "line_number": 9, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 9, "usage_type": "name" }, { "api_name": "matplotlib.pyplot....
75111308265
from django.db import models from mptt.models import MPTTModel, TreeForeignKey from accounts.models import User class Category(MPTTModel): name = models.CharField(max_length=100, verbose_name='Имя категории') slug = models.SlugField(max_length=100, verbose_name='Ссылка') parent = TreeForeignKey('self', ...
Maksat-developer/ProjectDjangoShool
cook/blog/models.py
models.py
py
6,738
python
en
code
0
github-code
36
[ { "api_name": "mptt.models.MPTTModel", "line_number": 7, "usage_type": "name" }, { "api_name": "django.db.models.CharField", "line_number": 8, "usage_type": "call" }, { "api_name": "django.db.models", "line_number": 8, "usage_type": "name" }, { "api_name": "django...
31213617621
# set FLASK_APP=app # set FLASK_ENV=development # flask run from flask import Flask, render_template, request import semsim_funcs import semtag_funcs import semnull_funcs import semcluster_funcs import textCoder_funcs app = Flask(__name__) @app.route('/') def home(): return render_template('index....
thomasgladwin/webapps
app.py
app.py
py
6,804
python
en
code
0
github-code
36
[ { "api_name": "flask.Flask", "line_number": 12, "usage_type": "call" }, { "api_name": "flask.render_template", "line_number": 16, "usage_type": "call" }, { "api_name": "flask.render_template", "line_number": 20, "usage_type": "call" }, { "api_name": "flask.request...
6143716089
import itertools import math from collections import defaultdict import brownie import pytest from scripts.utils import pack_values ZERO_ADDRESS = "0x0000000000000000000000000000000000000000" @pytest.fixture(scope="module", autouse=True) def registry( Registry, provider, gauge_controller, alice, ...
curvefi/curve-pool-registry
tests/local/unitary/Registry/test_remove_pool_lending.py
test_remove_pool_lending.py
py
4,686
python
en
code
169
github-code
36
[ { "api_name": "scripts.utils.pack_values", "line_number": 34, "usage_type": "call" }, { "api_name": "scripts.utils.pack_values", "line_number": 35, "usage_type": "call" }, { "api_name": "pytest.fixture", "line_number": 13, "usage_type": "call" }, { "api_name": "py...
6262380149
import os,sys,re import slide_window import vcf_operating import read_group import read_dict from multiprocessing import Pool #https://github.com/mfumagalli/ngsPopGen/blob/9ee3a6d5e733c1e248e81bfc21514b0527da967b/scripts/getDxy.pl def help(): print("python3 xx.py vcf two_group_list fasta_fai outfile window step") ...
ZJin2021/SCRIPT_ostrya
script/Population_Genetics/dxy.py
dxy.py
py
3,460
python
en
code
0
github-code
36
[ { "api_name": "sys.exit", "line_number": 11, "usage_type": "call" }, { "api_name": "multiprocessing.Pool", "line_number": 40, "usage_type": "call" }, { "api_name": "read_group.Read_group1", "line_number": 78, "usage_type": "call" }, { "api_name": "read_dict.read_f...
14017937824
import maya.cmds as cmds from functools import partial def rename_sl(*args): new_name = cmds.textField('Rename', q = True, text =True) items = cmds.ls(sl=True) for item in items: cmds.rename(item , new_name) def replace_sl(*args): name_to_replace = cmds.textField('RePlace_before', q = True, tex...
s-nako/MayaPythonTools
ModelingTools/name_change/rename_sl.py
rename_sl.py
py
1,426
python
en
code
0
github-code
36
[ { "api_name": "maya.cmds.textField", "line_number": 5, "usage_type": "call" }, { "api_name": "maya.cmds", "line_number": 5, "usage_type": "name" }, { "api_name": "maya.cmds.ls", "line_number": 6, "usage_type": "call" }, { "api_name": "maya.cmds", "line_number"...
72673433065
import time start_time = time.time() from global_var import * from demandSimulate import * from oneStepOptimization_poly import * from sklearn import preprocessing from sklearn.linear_model import LinearRegression from scipy.stats import qmc def microgrid_poly2d(): # stock alpha = 0.5; K0 = 0; sigma...
thihaa2019/WindEnergy
Aditya(Python)/microgrid_poly2d.py
microgrid_poly2d.py
py
4,451
python
en
code
0
github-code
36
[ { "api_name": "time.time", "line_number": 2, "usage_type": "call" }, { "api_name": "scipy.stats.qmc.Sobol", "line_number": 23, "usage_type": "call" }, { "api_name": "scipy.stats.qmc", "line_number": 23, "usage_type": "name" }, { "api_name": "sklearn.linear_model.L...
23343506239
""" NOMBRE: Maria del Carmen Hernandez Diaz ACCOUNT: 1718110389 GROUP: TIC 51 DATE: 30-05-2020 DESCRIPTION: Creación de cookies con nombre, número de visitas, fecha, y hora del visitante. En caso de que no haya nombre como respuesta del usuario se marcara como 'Anónimo'. """ import web # Libre...
CarmenKaplanB/awi40
semana_3/mvc/controllers/visitas.py
visitas.py
py
2,221
python
es
code
0
github-code
36
[ { "api_name": "web.cookies", "line_number": 17, "usage_type": "call" }, { "api_name": "datetime.datetime.now", "line_number": 22, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 22, "usage_type": "attribute" }, { "api_name": "web.setcooki...
31124460363
import os import torch import numpy as np from torch.utils.data import Dataset import h5py class DataSet(Dataset): def __init__(self, transform, split='train'): self.image_list = [] self.transform = transform file_list_path = os.path.join('dataset', split + '.list') with open(file_l...
yeshunlong/Reproduce
UA-MT/dataset.py
dataset.py
py
2,746
python
en
code
2
github-code
36
[ { "api_name": "torch.utils.data.Dataset", "line_number": 7, "usage_type": "name" }, { "api_name": "os.path.join", "line_number": 11, "usage_type": "call" }, { "api_name": "os.path", "line_number": 11, "usage_type": "attribute" }, { "api_name": "os.path.join", ...
9366664262
#coding=utf-8 import json import queue import random import re import time import traceback import urllib import urllib.request import uuid import requests import wipe_off_html_tag from bs4 import BeautifulSoup import data_storager class ParentChild(object): def __init__(self): self....
ChandlerBang/Movie-QA-System
jw/spider.py
spider.py
py
17,068
python
en
code
58
github-code
36
[ { "api_name": "queue.Queue", "line_number": 43, "usage_type": "call" }, { "api_name": "uuid.uuid3", "line_number": 50, "usage_type": "call" }, { "api_name": "uuid.NAMESPACE_DNS", "line_number": 50, "usage_type": "attribute" }, { "api_name": "time.sleep", "line...
19270176336
#!C:\Users\Bhavya Mulpuri\AppData\Local\Programs\Python\Python36-32\python.exe import requests from bs4 import BeautifulSoup import cgi, cgitb import csv from mpl_toolkits.mplot3d import Axes3D import matplotlib.pyplot as plt import numpy as np print("Content-Type:text/html\r\n\r\n") cgitb.enable(); form = ...
bhavyamulpuri/DADV
Scrapping.py
Scrapping.py
py
1,956
python
en
code
0
github-code
36
[ { "api_name": "cgitb.enable", "line_number": 11, "usage_type": "call" }, { "api_name": "cgi.FieldStorage", "line_number": 12, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 21, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "l...
12814337666
# 금광 / p375 / DP # # 내가 푼 방법 from collections import deque T = int(input()) dx = [-1,0,1] # 왼위, 왼, 왼아래 dy = [-1,-1,-1] for i in range(T): queue = deque() n,m = map(int,input().split()) data = [[] for i in range(n)] str = list(map(int,input().split())) for i in range(n): for j in range(m):...
Girin7716/PythonCoding
pythonBook/Problem Solving/Q31.py
Q31.py
py
2,169
python
ko
code
1
github-code
36
[ { "api_name": "collections.deque", "line_number": 11, "usage_type": "call" } ]
71929274985
from fastapi import FastAPI, HTTPException from fastapi.middleware.cors import CORSMiddleware from model import Todo app = FastAPI() from database import( fetchOneTodo, fetchAllTodos, createTodo, updateTodo, removeTodo, ) origins = ['http://localhost:3000', 'http://localhost:4000'] app.add_middl...
coronel08/farm-stack-todo
backend/main.py
main.py
py
1,660
python
en
code
0
github-code
36
[ { "api_name": "fastapi.FastAPI", "line_number": 5, "usage_type": "call" }, { "api_name": "fastapi.middleware.cors.CORSMiddleware", "line_number": 18, "usage_type": "argument" }, { "api_name": "database.fetchAllTodos", "line_number": 32, "usage_type": "call" }, { "...
7075228208
"""Strava API key update. :authors JP at 17/04/20 """ from google.cloud import firestore import logging import requests import time db = firestore.Client() collection = db.collection('strava') class RefreshTokenBadRequest(Exception): """Expection for an invalid request to Strava to get a new token.""" ...
j-penson/strava-leaderboards
functions/strava_key/main.py
main.py
py
1,886
python
en
code
0
github-code
36
[ { "api_name": "google.cloud.firestore.Client", "line_number": 12, "usage_type": "call" }, { "api_name": "google.cloud.firestore", "line_number": 12, "usage_type": "name" }, { "api_name": "logging.info", "line_number": 26, "usage_type": "call" }, { "api_name": "tim...
10773542334
import sqlite3 import matplotlib.pyplot as plt import matplotlib.dates as mdates import datetime ''' This is a simple tool i made to create a plot graph with the data from the database. You can manually enter the prefix's of the companys you want to look at in the prefix_list and it will use all the data it c...
Barrenjoey/Company-Sentiment-Project
Graph.py
Graph.py
py
4,618
python
en
code
0
github-code
36
[ { "api_name": "datetime.datetime.today", "line_number": 16, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 16, "usage_type": "attribute" }, { "api_name": "datetime.timedelta", "line_number": 18, "usage_type": "call" }, { "api_name": "sql...
21539613759
from pynput import keyboard # Defines a function for the keylogger def keyPressed(key): print(str(key)) with open("keyfile.text",'a') as logKey: try: char = key.char logKey.write() except: print("Error getting char") if __name__ == "__main__":...
Roscalion/cybersecuritykeylogger
keylogger.py
keylogger.py
py
410
python
en
code
0
github-code
36
[ { "api_name": "pynput.keyboard.Listener", "line_number": 15, "usage_type": "call" }, { "api_name": "pynput.keyboard", "line_number": 15, "usage_type": "name" } ]
39467758886
import errno import sqlite3 import os from mdde_stats.service.data import Benchmark class LocalDataManager: def __init__(self, data_dir: str): """ Constructor :param data_dir: path to directory where database should be stored """ if data_dir is None: raise Typ...
jcridev/mdde
stats-processor/src/mdde_stats/service/data/manager.py
manager.py
py
3,347
python
en
code
1
github-code
36
[ { "api_name": "os.path.abspath", "line_number": 19, "usage_type": "call" }, { "api_name": "os.path", "line_number": 19, "usage_type": "attribute" }, { "api_name": "os.makedirs", "line_number": 22, "usage_type": "call" }, { "api_name": "errno.EEXIST", "line_num...
22773409160
# -*- coding:utf-8 -*- """ Pour éviter de surcharger de commandes le drone. """ from vector import Vector class Queue (object): """ Permet de moduler le flux de commandes à donner au drone, en moyennant les vecteurs déplacement successifs sur plusieurs frames. """ def __init__(self, drone, cmd_max):...
micronoyau/NSA-Drone
queue.py
queue.py
py
1,609
python
fr
code
0
github-code
36
[ { "api_name": "vector.Vector", "line_number": 35, "usage_type": "call" }, { "api_name": "vector.Vector", "line_number": 48, "usage_type": "call" } ]
32932643233
from django.db import models # from address.models import AddressField from django import forms # from django_google_maps import fields as map_fields from Location.models import Address from django.utils.html import mark_safe from django.conf import settings from django.db.models import Avg from decimal import * class...
chandra10207/food_delivery
restaurant/models.py
models.py
py
2,868
python
en
code
0
github-code
36
[ { "api_name": "django.forms.Form", "line_number": 11, "usage_type": "attribute" }, { "api_name": "django.forms", "line_number": 11, "usage_type": "name" }, { "api_name": "django.forms.ImageField", "line_number": 13, "usage_type": "call" }, { "api_name": "django.fo...
70679148583
import sys import csv import json import time import urllib.request from urllib.error import HTTPError from optparse import OptionParser import argparse def get_page(url, page, collection_handle=None): full_url = url if collection_handle: full_url += '/collections/{}'.format(collection_handle) full...
gilloglym/ShopifyWebScraper
shopify_scraper.py
shopify_scraper.py
py
13,303
python
en
code
5
github-code
36
[ { "api_name": "urllib.request.request.Request", "line_number": 15, "usage_type": "call" }, { "api_name": "urllib.request.request", "line_number": 15, "usage_type": "attribute" }, { "api_name": "urllib.request", "line_number": 15, "usage_type": "name" }, { "api_nam...
74059837544
import warnings import configparser from pathlib import Path from typing import List, NamedTuple, Optional FileConfiguration = NamedTuple( "FileConfiguration", [ ("project", Optional[str]), ("remote", Optional[str]), ("server", Optional[str]), ("ignore", List[str]), ], ) d...
facultyai/faculty-sync
faculty_sync/cli/config.py
config.py
py
4,382
python
en
code
10
github-code
36
[ { "api_name": "typing.NamedTuple", "line_number": 6, "usage_type": "call" }, { "api_name": "typing.Optional", "line_number": 9, "usage_type": "name" }, { "api_name": "typing.Optional", "line_number": 10, "usage_type": "name" }, { "api_name": "typing.Optional", ...
5054290299
import os import papermill as pm def train_ct(dataset_name, hampel_window_len, num_sigmas): input = "constant-threshold.ipynb" output = "out/constant-threshold-" + dataset_name + ".ipynb" pm.execute_notebook(input, output, parameters = dict( dataset_name = dataset_name, hampel_window_len = ...
williewheeler/time-series-demos
papermill/train-all.py
train-all.py
py
744
python
en
code
18
github-code
36
[ { "api_name": "papermill.execute_notebook", "line_number": 7, "usage_type": "call" }, { "api_name": "os.path.exists", "line_number": 20, "usage_type": "call" }, { "api_name": "os.path", "line_number": 20, "usage_type": "attribute" }, { "api_name": "os.mkdir", ...
21885227488
""" Tests brewblox_ctl.commands.docker """ import pytest from brewblox_ctl.commands import docker from brewblox_ctl.testing import check_sudo, invoke TESTED = docker.__name__ @pytest.fixture def m_utils(mocker): m = mocker.patch(TESTED + '.utils', autospec=True) m.optsudo.return_value = 'SUDO ' return ...
BrewBlox/brewblox-ctl
test/commands/test_docker.py
test_docker.py
py
2,291
python
en
code
3
github-code
36
[ { "api_name": "brewblox_ctl.commands.docker.__name__", "line_number": 10, "usage_type": "attribute" }, { "api_name": "brewblox_ctl.commands.docker", "line_number": 10, "usage_type": "name" }, { "api_name": "pytest.fixture", "line_number": 13, "usage_type": "attribute" }...
26264738548
# import member import datetime as dt import random from member import Member import requests import json import pandas as pd from pandas import json_normalize from tkinter import * import numpy as np class KoreaHolidays: def get_holidays(self): today = dt.datetime.today().strftime("%Y%m%d") tod...
intacka/friendshipRice
main.py
main.py
py
16,078
python
en
code
0
github-code
36
[ { "api_name": "datetime.datetime.today", "line_number": 17, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 17, "usage_type": "attribute" }, { "api_name": "datetime.datetime.today", "line_number": 18, "usage_type": "call" }, { "api_name":...
826465711
""" :Product: three_day_forecast.txt :Issued: 2012 Dec 12 1235 UTC # Prepared by the U.S. Dept. of Commerce, NOAA, Space Weather Prediction Center # A. NOAA Geomagnetic Activity Observation and Forecast The greatest observed 3 hr Kp over the past 24 hours was 1 (below NOAA Scale levels). The greatest expected 3 hr Kp ...
diacritica/spaceweather
misc/scripts/load3dayforecast.py
load3dayforecast.py
py
6,924
python
en
code
2
github-code
36
[ { "api_name": "requests.get", "line_number": 69, "usage_type": "call" }, { "api_name": "datetime.datetime.strptime", "line_number": 72, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 72, "usage_type": "attribute" }, { "api_name": "dateti...
38834210088
import hashlib import os import time import jsonlines import openai import tiktoken import json import tqdm import numpy as np from numpy.linalg import norm from pathlib import Path from .utils import SaveUtils from .ai_openai import OpenAI class OpenAIEmbedding: openAI = OpenAI() def __init__(self): p...
doum1004/diginomard-make-it-rain-blog
diginomard_toolkit/ai_openai_embed.py
ai_openai_embed.py
py
8,260
python
en
code
2
github-code
36
[ { "api_name": "ai_openai.OpenAI", "line_number": 16, "usage_type": "call" }, { "api_name": "ai_openai.OpenAI.getTokenUsage", "line_number": 39, "usage_type": "call" }, { "api_name": "ai_openai.OpenAI", "line_number": 39, "usage_type": "name" }, { "api_name": "time...
15807172488
# -------------------------------------------------------- # PYTHON PROGRAM # Here is where we are going to define our set of... # - Imports # - Global Variables # - Functions # ...to achieve the functionality required. # When executing > python 'this_file'.py in a terminal, # the Python interpreter will load...
segunar/BIG_data_sample_code
Spark/Workspace/1_Spark_Core/6_Text_File_Examples/24_average_length_of_words.py
24_average_length_of_words.py
py
13,654
python
en
code
0
github-code
36
[ { "api_name": "os.path.exists", "line_number": 253, "usage_type": "call" }, { "api_name": "os.path", "line_number": 253, "usage_type": "attribute" }, { "api_name": "shutil.rmtree", "line_number": 254, "usage_type": "call" }, { "api_name": "pyspark.SparkContext.get...
44550764149
from source.core.visualiser import Visualiser # Fetch some GP models from agents.example_agents import agents # Unobserve the points from some GPs i = 8 agents[i].unobserve_true_points(x=agents[i].x_seen) agents[i].kappa = 3 # Higher regard for uncertainty works better for toy problem # Initialise visualiser class ...
mgm21/GPs-visualised
source/main.py
main.py
py
4,443
python
en
code
0
github-code
36
[ { "api_name": "agents.example_agents.agents", "line_number": 8, "usage_type": "name" }, { "api_name": "agents.example_agents.agents", "line_number": 9, "usage_type": "name" }, { "api_name": "source.core.visualiser.Visualiser", "line_number": 12, "usage_type": "call" }, ...
23949329045
# -*- coding: utf-8 -*- """ Created on Fri Jan 4 15:28:32 2019 @author: abhinav.jhanwar """ import boto3 # from s3 bucket if __name__=="__main__": filename="farmer-looks-mountain-view.jpg" bucket="bucket" client=boto3.client('rekognition') response = client.detect_labels(Image={'S3Object':...
AbhinavJhanwar/Amazon-API-boruta
basics/ObjectSceneDetectionImage.py
ObjectSceneDetectionImage.py
py
973
python
en
code
0
github-code
36
[ { "api_name": "boto3.client", "line_number": 15, "usage_type": "call" }, { "api_name": "boto3.client", "line_number": 28, "usage_type": "call" } ]
11316416709
import facebook import json import requests #young creators group facebook_group_id = '327549154019925' # A helper function to pretty-print Python objects as JSON def pp(o): print(json.dumps(o, indent=2)) # Create a connection to the Graph API with your access token access_token = 'EAACEdEose0cBABht2FYjCr2DkkBFBHU...
adamhipster/hackathon_website
python_fb_group_crawls/crawl.py
crawl.py
py
1,134
python
en
code
0
github-code
36
[ { "api_name": "json.dumps", "line_number": 10, "usage_type": "call" }, { "api_name": "facebook.GraphAPI", "line_number": 14, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 29, "usage_type": "call" } ]
8666976439
import argparse, os, string, sys # Parse all parameters parser = argparse.ArgumentParser() parser.add_argument('ctfdir', type=str, help='Directory containing all tasks and descriptions, e.g. example-ctf-2015/') args = parser.parse_args() # os.walk returns: dirpath (args.ctfdir), dirnames, filenames missing=external=c...
ctfs/write-ups-tools
checkreadme.py
checkreadme.py
py
1,638
python
en
code
222
github-code
36
[ { "api_name": "argparse.ArgumentParser", "line_number": 4, "usage_type": "call" }, { "api_name": "os.walk", "line_number": 10, "usage_type": "call" } ]
34212069095
# https://www.acmicpc.net/problem/1697 # solution dfs # 1) 현재위치 n에서 가능한 세가지 경우 +1, -1, *2 를 dfs한다 # 2) 이때 dfs의 depth는 탐색 시간을 의미하기에 depth가 현재 최소탐색시간보다 큰 경우는 탐색하지 않는다 # 3) 모든 탐색이 끝난 후 최소탐색시간을 출력한다 # 한계: 파이썬 재귀 depth의 한계(기본적으로 1000) -> ex) 인풋으로 0 100000 이 들어올 경우 10만번 초과 재귀로 런타임 에러 # 좀더 근본적인 한계: 재귀로 탐색하기에는 너무 큰 범위(0 ~ 100...
chankoo/problem-solving
graph/1697-숨바꼭질.py
1697-숨바꼭질.py
py
3,234
python
ko
code
1
github-code
36
[ { "api_name": "collections.deque", "line_number": 67, "usage_type": "call" } ]
40325909166
from ase.io import * import numpy as np import torch from torch.autograd import Variable from torch.nn.parameter import Parameter import torch.nn as nn import torch.nn.functional as F import torch.optim as optim import torch.nn.init as init from sklearn.metrics import mean_squared_error from math import sqrt import tim...
Augustegm/Water-Pt
Water-Pt(111)/NeuralNet.py
NeuralNet.py
py
9,197
python
en
code
0
github-code
36
[ { "api_name": "numpy.linspace", "line_number": 30, "usage_type": "call" }, { "api_name": "numpy.ones", "line_number": 31, "usage_type": "call" }, { "api_name": "random.sample", "line_number": 50, "usage_type": "call" }, { "api_name": "numpy.concatenate", "line...
3962464959
import datetime from django import forms from django.core.exceptions import ValidationError from .models import Appointment from django.contrib.auth.models import User class DateInput(forms.DateInput): """ This class gets the widget working to show a datepicker """ input_type = 'date' class TimeInpu...
Giov3ss/iHealthy
appointments/forms.py
forms.py
py
2,524
python
en
code
0
github-code
36
[ { "api_name": "django.forms.DateInput", "line_number": 8, "usage_type": "attribute" }, { "api_name": "django.forms", "line_number": 8, "usage_type": "name" }, { "api_name": "django.forms.TimeInput", "line_number": 15, "usage_type": "attribute" }, { "api_name": "dj...
22353413985
from typing import Any, Dict, List import numpy as np import transformers import mlrun from mlrun.serving.v2_serving import V2ModelServer class HuggingFaceModelServer(V2ModelServer): """ Hugging Face Model serving class, inheriting the V2ModelServer class for being initialized automatically by the model...
mlrun/mlrun
mlrun/frameworks/huggingface/model_server.py
model_server.py
py
5,513
python
en
code
1,129
github-code
36
[ { "api_name": "mlrun.serving.v2_serving.V2ModelServer", "line_number": 10, "usage_type": "name" }, { "api_name": "mlrun.MLClientCtx", "line_number": 20, "usage_type": "attribute" }, { "api_name": "transformers.pipeline", "line_number": 86, "usage_type": "call" }, { ...
73985065704
from datetime import datetime, timedelta from typing import Union from uuid import uuid4 from django.apps import AppConfig from django.conf import settings class DjangoLightAuthConfig(AppConfig): name = "django_light_auth" default = True login_path = "/login" logout_path = "/logout" success_path...
rexzhang/django-light-auth
django_light_auth/apps.py
apps.py
py
1,598
python
en
code
0
github-code
36
[ { "api_name": "django.apps.AppConfig", "line_number": 9, "usage_type": "name" }, { "api_name": "uuid.uuid4", "line_number": 21, "usage_type": "call" }, { "api_name": "typing.Union", "line_number": 23, "usage_type": "name" }, { "api_name": "datetime.datetime", ...
34541981528
import dash from dash import html from dash import dcc from dash.dependencies import Input, Output import dash_bootstrap_components as dbc import pandas as pd import numpy as np import calendar import plotly.express as px import plotly.graph_objects as go import datamodel order = datamodel.get_data() df_year = datam...
Patriciatworek1998/patr_demo_dash
app.py
app.py
py
1,928
python
en
code
0
github-code
36
[ { "api_name": "datamodel.get_data", "line_number": 15, "usage_type": "call" }, { "api_name": "datamodel.get_year", "line_number": 16, "usage_type": "call" }, { "api_name": "datamodel.get_month", "line_number": 17, "usage_type": "call" }, { "api_name": "plotly.expr...
6314719484
import os import sys os.environ["TOKENIZERS_PARALLELISM"] = "true" sys.path.insert(0, os.getcwd()) import gc import time import random import warnings warnings.filterwarnings("ignore") import wandb import os import sys import argparse from datasets import load_dataset import torch from transformers import AutoTokeniz...
ixtiyoruz/EmotionClassification
src/train.py
train.py
py
11,025
python
en
code
0
github-code
36
[ { "api_name": "os.environ", "line_number": 3, "usage_type": "attribute" }, { "api_name": "sys.path.insert", "line_number": 4, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 4, "usage_type": "attribute" }, { "api_name": "os.getcwd", "line_numb...
70850460263
import pandas as pd import os import time from datetime import datetime from os import listdir from os.path import isfile, join path ="/Users/Sanjay/Documents/StockPredictor/TodayStats" def key_stats(gather="Total Debt/Equity"): statspath=path+'/TodayStats' #k = [225,226,227,228,229,230,231,232,233,234,235] ...
cloudmesh-community/fa18-523-66
project-code/PredictDowIndex_1.py
PredictDowIndex_1.py
py
5,169
python
en
code
0
github-code
36
[ { "api_name": "os.listdir", "line_number": 13, "usage_type": "call" }, { "api_name": "os.path.isfile", "line_number": 13, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 13, "usage_type": "call" }, { "api_name": "pandas.DataFrame", "line_n...
19331078030
import telebot from model_predict import predict from preprocessing import preprocess_text bot = telebot.TeleBot( "2087987681:AAG813Ais8YRNy4nlhrHZTK5UfQc4ZYa55Y", parse_mode=None) # for /start and /help commands @bot.message_handler(commands=['start', 'help']) def send_welcome(message): bot.reply_to(messa...
Jenpoer/pythoneers-hatespeech-bot
pythoneers_hatespeechbot.py
pythoneers_hatespeechbot.py
py
876
python
en
code
0
github-code
36
[ { "api_name": "telebot.TeleBot", "line_number": 6, "usage_type": "call" }, { "api_name": "preprocessing.preprocess_text", "line_number": 19, "usage_type": "call" }, { "api_name": "model_predict.predict", "line_number": 24, "usage_type": "call" } ]
71354369385
#!/bin/usr/env python # =========================================================== # Created By: Richard Barrett # Organization: DVISD # DepartmenT: Data Services # Purpose: Skyward Administration # Date: 04/01/2020 # =========================================================== import selenium import shutil import xls...
aiern/ITDataServicesInfra
Python/Skyward/Administration/remove_sec_groups_inactive_users.py
remove_sec_groups_inactive_users.py
py
5,755
python
en
code
0
github-code
36
[ { "api_name": "os.path.exists", "line_number": 34, "usage_type": "call" }, { "api_name": "os.path", "line_number": 34, "usage_type": "attribute" }, { "api_name": "subprocess.call", "line_number": 35, "usage_type": "call" }, { "api_name": "json.load", "line_num...
36517097823
import json from sqlite_testdb import SqliteTest class TestSbsVariationApi(SqliteTest): def test_get_integrity(self): """ Tests if expected result is returned for integrity api """ actual_json = self.client.get('/sbs/analyses/1/integrities') actual_json = json.loads(actual...
rohitbs113/DupontSBS
tests/test_sbs_variation.py
test_sbs_variation.py
py
1,611
python
en
code
0
github-code
36
[ { "api_name": "sqlite_testdb.SqliteTest", "line_number": 6, "usage_type": "name" }, { "api_name": "json.loads", "line_number": 12, "usage_type": "call" }, { "api_name": "json.dumps", "line_number": 21, "usage_type": "call" }, { "api_name": "json.loads", "line_...
15130460020
# Databricks notebook source # MAGIC %pip install -r requirements.txt # COMMAND ---------- import warnings warnings.filterwarnings("ignore") # COMMAND ---------- # MAGIC %sh # MAGIC mkdir -p /dbfs/FileStore/solution_accelerators/digitization/ && touch /dbfs/FileStore/solution_accelerators/digitization/init.sh # MAG...
databricks-industry-solutions/digitization-documents
config/configure_notebook.py
configure_notebook.py
py
1,508
python
en
code
5
github-code
36
[ { "api_name": "warnings.filterwarnings", "line_number": 7, "usage_type": "call" }, { "api_name": "mlflow.set_experiment", "line_number": 24, "usage_type": "call" } ]
16520579385
import datetime from operator import itemgetter from django.core.management.base import BaseCommand, CommandError from django.db.models import * from buckley.models import * def cache_totals(): totals = Total.objects.all() if totals: total = totals[0] else: total = Total() ie_total = ...
sunlightlabs/reportingsite
buckley/management/commands/cache_totals.py
cache_totals.py
py
4,878
python
en
code
0
github-code
36
[ { "api_name": "operator.itemgetter", "line_number": 21, "usage_type": "call" }, { "api_name": "datetime.date.today", "line_number": 45, "usage_type": "call" }, { "api_name": "datetime.date", "line_number": 45, "usage_type": "attribute" }, { "api_name": "datetime.t...
40130281674
#!/usr/bin/env python #coding=utf-8 # pip install aliyun-python-sdk-alidns from aliyunsdkcore import client from aliyunsdkalidns.request.v20150109 import SetDomainRecordStatusRequest from flask import current_app from datetime import datetime class UpRecordStatus(object): ''' region_id需要提交工单查询,默认cn_hangzhou ...
fish2018/prometheus_exporter
utils/alidns.py
alidns.py
py
1,385
python
en
code
4
github-code
36
[ { "api_name": "aliyunsdkcore.client.AcsClient", "line_number": 15, "usage_type": "call" }, { "api_name": "aliyunsdkcore.client", "line_number": 15, "usage_type": "name" }, { "api_name": "flask.current_app.config", "line_number": 16, "usage_type": "attribute" }, { ...
1132507113
import logging import time import random from langchain.agents import initialize_agent, load_tools from langchain.chat_models import ChatOpenAI logging.basicConfig() logger = logging.getLogger() logger.setLevel(logging.DEBUG) # import and initialize graphsignal # add GRAPSIGNAL_API_KEY to your environment variables i...
graphsignal/examples
langchain-app/main.py
main.py
py
1,010
python
en
code
3
github-code
36
[ { "api_name": "logging.basicConfig", "line_number": 7, "usage_type": "call" }, { "api_name": "logging.getLogger", "line_number": 8, "usage_type": "call" }, { "api_name": "logging.DEBUG", "line_number": 9, "usage_type": "attribute" }, { "api_name": "graphsignal.con...
23059482493
import peewee import main import logging db_filename = main.CONF.get('VK', 'db_file', fallback='') db = peewee.SqliteDatabase(db_filename, pragmas={'journal_mode': 'wal', 'cache_size': 64, 'foreign_keys': 1, ...
Sithief/async_bot
database/db_api.py
db_api.py
py
5,009
python
en
code
0
github-code
36
[ { "api_name": "main.CONF.get", "line_number": 6, "usage_type": "call" }, { "api_name": "main.CONF", "line_number": 6, "usage_type": "attribute" }, { "api_name": "peewee.SqliteDatabase", "line_number": 7, "usage_type": "call" }, { "api_name": "peewee.Model", "l...
135256696
from enum import Enum import logging import coloredlogs import itertools _LoggerEnums = { 1: ['system', 'SYSTEM'], 2: ['client', 'CLIENT'], 3: ['handler', 'HANDLER'], } LoggerEnums = Enum( value='LoggerEnums', names=itertools.chain.from_iterable( itertools.product(v, [k]) for k, v in _Logg...
techolutions/madqtt-pi
madqtt/utils/Logging.py
Logging.py
py
900
python
en
code
0
github-code
36
[ { "api_name": "enum.Enum", "line_number": 12, "usage_type": "call" }, { "api_name": "itertools.chain.from_iterable", "line_number": 14, "usage_type": "call" }, { "api_name": "itertools.chain", "line_number": 14, "usage_type": "attribute" }, { "api_name": "itertool...
17929496471
#!/usr/bin/python3 import sys import collections class Tree: children = None metadata = None def __init__(self): self.children = collections.deque() self.metadata = collections.deque() def parse_input(): line = next(sys.stdin).strip() i = 0 while i < len(line): num =...
Easimer/advent-of-code-2018
day8/day8.py
day8.py
py
1,553
python
en
code
0
github-code
36
[ { "api_name": "collections.deque", "line_number": 11, "usage_type": "call" }, { "api_name": "collections.deque", "line_number": 12, "usage_type": "call" }, { "api_name": "sys.stdin", "line_number": 15, "usage_type": "attribute" }, { "api_name": "sys.stdin", "l...
4079006523
""" Plot omega, sliding net charge plot sliding fraction of Q/N, S/T, A/G, P """ import os import pandas as pd import matplotlib.pyplot as plt from deconstruct_lc import tools_lc from deconstruct_lc.complementarity import motif_seq class Fraction(object): def __init__(self): self.k = 6 self.lca = ...
shellydeforte/deconstruct_lc
deconstruct_lc/complementarity/sliding_fraction.py
sliding_fraction.py
py
3,162
python
en
code
0
github-code
36
[ { "api_name": "deconstruct_lc.tools_lc.seq_to_kmers", "line_number": 20, "usage_type": "call" }, { "api_name": "deconstruct_lc.tools_lc", "line_number": 20, "usage_type": "name" }, { "api_name": "matplotlib.pyplot.plot", "line_number": 30, "usage_type": "call" }, { ...
32105984708
from datetime import datetime from string import Template import pandas as pd def read_template(file: str) -> Template: with open(file, "r") as f: content = f.read() return Template(content) df = pd.read_csv("export.csv") df = df.astype( { "repository_stars_count": "Int64", } ) df =...
dbeley/lpa-table
lpa_html_builder.py
lpa_html_builder.py
py
1,930
python
en
code
1
github-code
36
[ { "api_name": "string.Template", "line_number": 10, "usage_type": "call" }, { "api_name": "string.Template", "line_number": 7, "usage_type": "name" }, { "api_name": "pandas.read_csv", "line_number": 13, "usage_type": "call" }, { "api_name": "datetime.datetime.toda...
36408701647
from django.http import HttpResponseRedirect, HttpResponse from django.shortcuts import get_object_or_404, render from django.urls import reverse from django.views import generic from .forms import PilotForm from .models import Site, Pilot, Comment from . import creed from . import webster import datetime import traceb...
chadwickcheney/SeleniumTests
assure/views.py
views.py
py
6,511
python
en
code
0
github-code
36
[ { "api_name": "django.views.generic.ListView", "line_number": 12, "usage_type": "attribute" }, { "api_name": "django.views.generic", "line_number": 12, "usage_type": "name" }, { "api_name": "forms.PilotForm", "line_number": 16, "usage_type": "name" }, { "api_name"...
36244286092
#!/usr/bin/env python import boto3 import subprocess #output = subprocess.call(['/home/ansadmin/nagaratest/docker.sh']) import time ec2 = boto3.resource('ec2') import yaml config = yaml.load(open('config.yml')) ec2 = boto3.resource('ec2') instance = ec2.create_instances( ImageId = config['ImageId'], MinCount =...
hotkey123/test
nagaratest/final_create_instance.py
final_create_instance.py
py
1,161
python
en
code
0
github-code
36
[ { "api_name": "boto3.resource", "line_number": 6, "usage_type": "call" }, { "api_name": "yaml.load", "line_number": 8, "usage_type": "call" }, { "api_name": "boto3.resource", "line_number": 10, "usage_type": "call" } ]
29976613151
import os.path as osp import mmcv import numpy as np import pycocotools.mask as maskUtils from pycocotools.coco import COCO from .coco import CocoDataset from .registry import DATASETS @DATASETS.register_module class SideWalkDataset(CocoDataset): CLASSES = ('barricade', 'bench', 'bicycle', 'bollard', 'bus', 'c...
ytaek-oh/mmdetection
mmdet/datasets/sidewalk.py
sidewalk.py
py
2,636
python
en
code
2
github-code
36
[ { "api_name": "coco.CocoDataset", "line_number": 13, "usage_type": "name" }, { "api_name": "pycocotools.coco.COCO", "line_number": 24, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 34, "usage_type": "call" }, { "api_name": "os.path", "li...
8680864840
"""The module contains test functions to test Tankerkoenig API wrapper.""" import tempfile import os from unittest import TestCase from unittest.mock import MagicMock, patch from homemonitoring.tankerkoenig import TankerKoenig class TestTankerKoenig(TestCase): """TestTankerKoenig contains the test cases for th...
BigCrunsh/home-monitoring
homemonitoring/tests/tankerkoenig_test.py
tankerkoenig_test.py
py
2,091
python
en
code
2
github-code
36
[ { "api_name": "unittest.TestCase", "line_number": 12, "usage_type": "name" }, { "api_name": "homemonitoring.tankerkoenig.TankerKoenig", "line_number": 26, "usage_type": "call" }, { "api_name": "unittest.mock.patch", "line_number": 21, "usage_type": "call" }, { "ap...
34928053014
import requests from bs4 import BeautifulSoup import pandas as pd from selenium import webdriver from webdriver_manager.chrome import ChromeDriverManager from selenium.webdriver.chrome.options import Options import re with open('raw_kaggle_huffpost.json', 'r') as file: entries = file.read().lower().split("\n") d...
the-super-toys/ml-there-will-be-news
fetch-dataset.py
fetch-dataset.py
py
4,295
python
en
code
1
github-code
36
[ { "api_name": "selenium.webdriver.chrome.options.Options", "line_number": 14, "usage_type": "call" }, { "api_name": "selenium.webdriver.Chrome", "line_number": 16, "usage_type": "call" }, { "api_name": "selenium.webdriver", "line_number": 16, "usage_type": "name" }, {...
14114648700
import sys from collections import deque def bfs(node): queue = deque() queue.append(node) visited[node] = True while len(queue) != 0: cur_node = queue.popleft() for linked_node in adj[cur_node]: if not visited[linked_node]: visited[linked_node] = True ...
nashs789/JGAlgo
Week02/Q11724/Q11724_Inbok.py
Q11724_Inbok.py
py
786
python
en
code
2
github-code
36
[ { "api_name": "collections.deque", "line_number": 5, "usage_type": "call" }, { "api_name": "sys.stdin.readline", "line_number": 19, "usage_type": "call" }, { "api_name": "sys.stdin", "line_number": 19, "usage_type": "attribute" }, { "api_name": "sys.stdin.readline...
25460261702
import logging from markdown.extensions import Extension from markdown.inlinepatterns import Pattern from markdown.util import etree logger = logging.getLogger(__name__) def build_url(label, base, end): """ Build a url from the label, a base, and an end. """ return '%s%s%s' % (base, label, end) def build_...
ghtyrant/mdwiki
mdwiki/backend/extensions/mdwikilinks.py
mdwikilinks.py
py
2,780
python
en
code
1
github-code
36
[ { "api_name": "logging.getLogger", "line_number": 7, "usage_type": "call" }, { "api_name": "markdown.extensions.Extension", "line_number": 24, "usage_type": "name" }, { "api_name": "markdown.inlinepatterns.Pattern", "line_number": 48, "usage_type": "name" }, { "ap...
17411415924
"""mysite URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.2/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based ...
miyanda2/Driver-Qr
mysite/urls.py
urls.py
py
2,046
python
en
code
0
github-code
36
[ { "api_name": "django.urls.path", "line_number": 32, "usage_type": "call" }, { "api_name": "django.contrib.admin.site", "line_number": 32, "usage_type": "attribute" }, { "api_name": "django.contrib.admin", "line_number": 32, "usage_type": "name" }, { "api_name": "...
27980503870
#!/usr/bin/env python2 """ Minimal Example =============== Generating a square wordcloud from the US constitution using default arguments. """ from os import path from wordcloud import WordCloud, STOPWORDS d = path.dirname(__file__) # Read the whole text. text = open(path.join(d, 'titles.txt')).read() # Generate a...
schollz/scholar-pull
makeCloud.py
makeCloud.py
py
769
python
en
code
0
github-code
36
[ { "api_name": "os.path.dirname", "line_number": 11, "usage_type": "call" }, { "api_name": "os.path", "line_number": 11, "usage_type": "name" }, { "api_name": "os.path.join", "line_number": 14, "usage_type": "call" }, { "api_name": "os.path", "line_number": 14,...
21476691969
from urllib import quote from django.shortcuts import get_object_or_404, render_to_response, redirect from django.http import HttpResponseRedirect, HttpResponse from django.core.urlresolvers import reverse from django.template import RequestContext from django.contrib.auth.models import User from django.contrib.auth im...
sherbondy/Attend
attend/events/views.py
views.py
py
5,143
python
en
code
2
github-code
36
[ { "api_name": "datetime.datetime.strptime", "line_number": 47, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 47, "usage_type": "name" }, { "api_name": "datetime.datetime.strptime", "line_number": 48, "usage_type": "call" }, { "api_name"...
34082247012
import traceback import logger as log import pandas as pd from datetime import ( datetime ) from database import ( DrugsMetaCollection, IngredientsCollection, LyophilizedCollection ) from dash import ( html, dcc ) class MongoData(object): def __init__(self): self._ingredients_db_ob...
ashwani1310/Lyophilized-Drugs-Analysis-Tool
ui_data.py
ui_data.py
py
12,601
python
en
code
2
github-code
36
[ { "api_name": "database.IngredientsCollection", "line_number": 26, "usage_type": "call" }, { "api_name": "database.LyophilizedCollection", "line_number": 32, "usage_type": "call" }, { "api_name": "datetime.datetime.today", "line_number": 63, "usage_type": "call" }, { ...
18909708203
""" Description: A tool for translating transcript coordinates to reference coordinates using the CIGAR string. Contributors: 20210119 - Larry Clos II (drlclos@gmail.com) Assumptions: - For a given genetic sequence (transcript) the sequence coordinate and index are the same and start at zero (0). - CIGAR defines the...
LClos/bfx_tools
genetic_coordinates/cigar_translate.py
cigar_translate.py
py
9,659
python
en
code
0
github-code
36
[ { "api_name": "collections.namedtuple", "line_number": 44, "usage_type": "call" }, { "api_name": "re.findall", "line_number": 64, "usage_type": "call" }, { "api_name": "typing.List", "line_number": 47, "usage_type": "name" }, { "api_name": "typing.Tuple", "lin...
9353725368
import os import atexit import dotenv from dotenv import load_dotenv from flask import Flask from flask import render_template, request, url_for, flash, redirect from flask_bootstrap import Bootstrap5 from mexc_sdk import Spot from agents import TradingAgent from clients import MexcClient def to_float(x): try: ...
ArtemNechaev/traderbot
app.py
app.py
py
2,908
python
en
code
0
github-code
36
[ { "api_name": "dotenv.load_dotenv", "line_number": 20, "usage_type": "call" }, { "api_name": "clients.MexcClient", "line_number": 22, "usage_type": "call" }, { "api_name": "mexc_sdk.Spot", "line_number": 23, "usage_type": "call" }, { "api_name": "os.environ.get", ...
40328938266
from sklearn.base import BaseEstimator, TransformerMixin from sklearn.multioutput import MultiOutputClassifier from data.tokenizer import tokenize from sklearn.preprocessing import OneHotEncoder from sklearn.feature_extraction.text import CountVectorizer, TfidfTransformer from sklearn.model_selection import GridSearch...
DietzRep/disaster_response_pipeline_project
models/model_factory.py
model_factory.py
py
3,650
python
en
code
0
github-code
36
[ { "api_name": "sklearn.base.BaseEstimator", "line_number": 13, "usage_type": "name" }, { "api_name": "sklearn.base.TransformerMixin", "line_number": 13, "usage_type": "name" }, { "api_name": "sklearn.pipeline.Pipeline", "line_number": 41, "usage_type": "call" }, { ...
74207450663
import argparse import logging from .system import system_parser from .network import network_parser from .stress import stress_parser log_debug = logging.getLogger("debugLog") def get_parser(parent=None): # connection with main parser if not parent: anomaly_inject = argparse.ArgumentParser(descripti...
Ydjeen/openstack_anomaly_injection
openstack_anomaly_injection/anomaly_injection/config/argparser/argparser.py
argparser.py
py
5,377
python
en
code
0
github-code
36
[ { "api_name": "logging.getLogger", "line_number": 7, "usage_type": "call" }, { "api_name": "argparse.ArgumentParser", "line_number": 13, "usage_type": "call" }, { "api_name": "argparse.ArgumentParser", "line_number": 20, "usage_type": "call" }, { "api_name": "syst...
5840512827
from django.http import HttpResponse from django.http import JsonResponse from bs4 import BeautifulSoup import requests def index(request): url = "https://air-quality.com/place/india/delhi/a32ed7fc?lang=en&standard=aqi_us" req = requests.get(url) soup = BeautifulSoup(req.content, 'html.parser') val =...
amanpreets01/pollutantAPI
mysite/polls/views.py
views.py
py
622
python
en
code
0
github-code
36
[ { "api_name": "requests.get", "line_number": 10, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_number": 11, "usage_type": "call" }, { "api_name": "django.http.JsonResponse", "line_number": 19, "usage_type": "call" } ]
41787908029
#from django.shortcuts import render # Create your views here. from rest_framework.decorators import api_view from rest_framework.response import Response from rest_framework import generics from animals.models import Categories, Status, Tags, Animal, AnimalForm from api.serializers import AnimalSerializer from djan...
nejcRazpotnik/pet_store_djangoAPI
backend/petStore/api/views.py
views.py
py
3,732
python
en
code
0
github-code
36
[ { "api_name": "rest_framework.generics.RetrieveAPIView", "line_number": 23, "usage_type": "attribute" }, { "api_name": "rest_framework.generics", "line_number": 23, "usage_type": "name" }, { "api_name": "animals.models.Animal.objects.all", "line_number": 24, "usage_type":...
25304954617
""" Author: Diego Pinheiro github: https://github.com/diegompin """ from itertools import cycle from maracatu.src.plotting.plot_base import PlotBase # import pandas as pd # from dataintensive.src import Joint # from dataintensive.src import BinsDataFrame # from dataintensive.src import Parameter # from dataintensive....
diegompin/maracatu
maracatu/src/plotting/curves.py
curves.py
py
4,421
python
en
code
0
github-code
36
[ { "api_name": "maracatu.src.plotting.plot_base.PlotBase", "line_number": 16, "usage_type": "name" }, { "api_name": "maracatu.src.plotting.plot_base.PlotBase.colors", "line_number": 43, "usage_type": "attribute" }, { "api_name": "maracatu.src.plotting.plot_base.PlotBase", "lin...
43676904102
import numpy as np import cv2 from PIL import Image, ImageFilter import training_vs2 weights = np.load('weights.npy') biases = np.load('biases.npy') def imageprepare(argv): im = Image.open(argv).convert('L') width = float(im.size[0]) height = float(im.size[1]) newImage = Image.new('L', (28, 28),...
tpvt99/detect-gomoku-using-neural-network
test.py
test.py
py
2,093
python
en
code
1
github-code
36
[ { "api_name": "numpy.load", "line_number": 7, "usage_type": "call" }, { "api_name": "numpy.load", "line_number": 8, "usage_type": "call" }, { "api_name": "PIL.Image.open", "line_number": 12, "usage_type": "call" }, { "api_name": "PIL.Image", "line_number": 12,...
38285183708
import mock import pytest from fc.qemu.exc import MigrationError from fc.qemu.incoming import ( IncomingAPI, IncomingServer, authenticated, parse_address, ) def test_authentication_wrapper(): @authenticated def test(cookie): return 1 context = mock.Mock() context.cookie = "as...
flyingcircusio/fc.qemu
src/fc/qemu/tests/test_migration.py
test_migration.py
py
2,712
python
en
code
4
github-code
36
[ { "api_name": "fc.qemu.incoming.authenticated", "line_number": 14, "usage_type": "name" }, { "api_name": "mock.Mock", "line_number": 18, "usage_type": "call" }, { "api_name": "pytest.raises", "line_number": 22, "usage_type": "call" }, { "api_name": "fc.qemu.exc.Mi...
17436736893
import argparse import torch from tqdm import tqdm import matplotlib.pyplot as plt import os from torchvision import transforms import dataset from torch.utils.data import DataLoader from utils.metric import get_overall_valid_score from utils.generate_CAM import generate_validation_cam from utils.pyutils impo...
xmed-lab/OEEM
classification/train.py
train.py
py
6,342
python
en
code
29
github-code
36
[ { "api_name": "argparse.ArgumentParser", "line_number": 17, "usage_type": "call" }, { "api_name": "yaml.safe_load", "line_number": 34, "usage_type": "call" }, { "api_name": "os.path.exists", "line_number": 40, "usage_type": "call" }, { "api_name": "os.path", "...
11303967232
import logging import musicbrainzngs from retrying import retry from ..constants import SAMPLE_RATE logger = logging.getLogger(__name__) class MusicbrainzLookup(object): @retry(stop_max_attempt_number=5, wait_exponential_multiplier=100) def query(self, disc_id): logger.debug('Retrieving disc meta ...
pisarenko-net/cdp-sa
hifi_appliance/meta/musicbrainz.py
musicbrainz.py
py
2,585
python
en
code
0
github-code
36
[ { "api_name": "logging.getLogger", "line_number": 9, "usage_type": "call" }, { "api_name": "musicbrainzngs.set_useragent", "line_number": 17, "usage_type": "call" }, { "api_name": "musicbrainzngs.auth", "line_number": 18, "usage_type": "call" }, { "api_name": "mus...
70521690663
import time from django.core import cache from django.http import HttpResponse from django.utils.deprecation import MiddlewareMixin from xiaochengxu import settings class CountipMiddle(MiddlewareMixin): # 在视图执行前调用 def process_request(self,request): # 获取客户端ip x_forwarded_for = re...
zhoujialefanjiayuan/liu-lian
xiaochengxu/middleware/fanpa.py
fanpa.py
py
1,113
python
en
code
0
github-code
36
[ { "api_name": "django.utils.deprecation.MiddlewareMixin", "line_number": 10, "usage_type": "name" }, { "api_name": "xiaochengxu.settings", "line_number": 19, "usage_type": "argument" }, { "api_name": "django.http.HttpResponse", "line_number": 21, "usage_type": "call" },...
28856693359
import yaml import json from typing import Sequence from types import SimpleNamespace from itertools import combinations, permutations from sympy import symbols, Symbol from sympy.logic.boolalg import BooleanFunction, And, Or, Not import numpy as np import torch from torch import nn, Tensor from dataset import collat...
noahleegithub/neurosat-cs4950
ranking_models.py
ranking_models.py
py
4,281
python
en
code
0
github-code
36
[ { "api_name": "torch.nn.Module", "line_number": 18, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 18, "usage_type": "name" }, { "api_name": "types.SimpleNamespace", "line_number": 20, "usage_type": "name" }, { "api_name": "models.activation...
23585423225
""" EEGNet edit by hichens """ import numpy as np from sklearn.metrics import roc_auc_score, precision_score, recall_score, accuracy_score import torch import torch.nn as nn import torch.optim as optim import torch.nn.functional as F import torch.optim as optim import sys; sys.path.append("..") from utils.options imp...
hehichens/Cognitive
models/EEGNet.py
EEGNet.py
py
3,378
python
en
code
6
github-code
36
[ { "api_name": "sys.path.append", "line_number": 14, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 14, "usage_type": "attribute" }, { "api_name": "torch.nn.Module", "line_number": 17, "usage_type": "attribute" }, { "api_name": "torch.nn", "li...
69815063464
import requests import json TMDB_API_KEY ='2ee130f2ba9bf221b6fe5107cffcac46' def get_movie_genre(): request_url = f"https://api.themoviedb.org/3/genre/movie/list?api_key={TMDB_API_KEY}&language=en" genres = requests.get(request_url).json() for genre in genres['genres']: fields = { ...
uttamapaksa/MOVISION
db data/makegenre.py
makegenre.py
py
710
python
en
code
0
github-code
36
[ { "api_name": "requests.get", "line_number": 13, "usage_type": "call" }, { "api_name": "json.dump", "line_number": 40, "usage_type": "call" } ]
73335280743
# coding: utf-8 """ Test webservices """ import sys import os PROJECT_HOME = os.path.abspath( os.path.join(os.path.dirname(__file__), '../../../')) sys.path.append(PROJECT_HOME) import json import unittest from flask import url_for from flask_testing import TestCase from httmock import urlmatch, HTTMock from tug...
adsabs/tugboat
tugboat/tests/tests_unit/test_webservices.py
test_webservices.py
py
2,331
python
en
code
0
github-code
36
[ { "api_name": "os.path.abspath", "line_number": 8, "usage_type": "call" }, { "api_name": "os.path", "line_number": 8, "usage_type": "attribute" }, { "api_name": "os.path.join", "line_number": 9, "usage_type": "call" }, { "api_name": "os.path", "line_number": 9...
22397199213
import os from datetime import datetime from celery import Celery from celery.schedules import crontab from celery.utils.log import get_task_logger # 1-s terminal celery -A MainWater beat # 2-s terminal celery -A MainWater worker --loglevel=info logger = get_task_logger(__name__) # Set the default Django ...
dillag/countersAPI
MainWater/MainWater/celery.py
celery.py
py
1,497
python
en
code
0
github-code
36
[ { "api_name": "celery.utils.log.get_task_logger", "line_number": 11, "usage_type": "call" }, { "api_name": "os.environ.setdefault", "line_number": 13, "usage_type": "call" }, { "api_name": "os.environ", "line_number": 13, "usage_type": "attribute" }, { "api_name":...
28639327912
#-*- coding: GBK-*- import time from wxauto import * import openai import os #代理端口 os.environ['HTTP_PROXY'] = 'http://127.0.0.1:7890' os.environ['HTTPS_PROXY'] = 'http://127.0.0.1:7890' #https://platform.openai.com/overview openai.api_key="your_key" def chatretern(prompt,moudel_engine="gpt-3.5-turbo"): cmpletio...
sfs999/win_chatgpt
chatwx.py
chatwx.py
py
1,735
python
en
code
0
github-code
36
[ { "api_name": "os.environ", "line_number": 7, "usage_type": "attribute" }, { "api_name": "os.environ", "line_number": 8, "usage_type": "attribute" }, { "api_name": "openai.api_key", "line_number": 11, "usage_type": "attribute" }, { "api_name": "openai.ChatCompleti...
34682614662
import numpy as np import matplotlib import scipy import netCDF4 as nc4 import numpy.ma as ma import matplotlib.pyplot as plt from netCDF4 import Dataset import struct import glob import pandas as pd from numpy import convolve import datetime import atmos import matplotlib.dates as mdates #""" #Created on Wed Nov 13...
ClauClouds/PBL_paper_repo
myFunctions.py
myFunctions.py
py
168,788
python
en
code
1
github-code
36
[ { "api_name": "datetime.datetime", "line_number": 44, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 45, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 48, "usage_type": "call" }, { "api_name": "datetime.dateti...