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
34617553856
from datetime import datetime from threading import Lock from typing import List, Optional import yaml import os from pathlib import Path import discord from discord.ext import commands from Models.ClanMember import ClanMember from Exceptions.ClanMemberNotFoundError import ClanMemberNotFoundError from Models.LoadConf...
Teara-exe/clanBattleBot
Models/Context.py
Context.py
py
5,663
python
en
code
0
github-code
18
[ { "api_name": "threading.Lock", "line_number": 23, "usage_type": "call" }, { "api_name": "discord.ext.commands.Bot", "line_number": 26, "usage_type": "attribute" }, { "api_name": "discord.ext.commands", "line_number": 26, "usage_type": "name" }, { "api_name": "typ...
39865445271
import sys import pandas as pd import re import pickle from nltk.corpus import stopwords from nltk.stem.porter import PorterStemmer from nltk.stem.wordnet import WordNetLemmatizer from nltk.tokenize import word_tokenize from sklearn.feature_extraction.text import CountVectorizer, TfidfTransformer from sklearn.ensemble...
Vikram25/Udacity-Data-Science
Disaster Response Project/models/train_classifier.py
train_classifier.py
py
4,800
python
en
code
1
github-code
18
[ { "api_name": "nltk.download", "line_number": 22, "usage_type": "call" }, { "api_name": "sqlalchemy.create_engine", "line_number": 36, "usage_type": "call" }, { "api_name": "pandas.read_sql_table", "line_number": 37, "usage_type": "call" }, { "api_name": "re.finda...
20719397092
# -*- coding: utf-8 -*- """ Created on Fri Jun 2 17:20:33 2017 @author: shirmanov """ import cv2 img_descs = [] img = cv2.imread('images/1.jpg') gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) sift = cv2.xfeatures2d.SIFT_create() kp, desc = sift.detectAndCompute(gray, None) # img_keypoints[img_path] = kp img_descs.ap...
vladimir-shirmanov/numbers
testfile.py
testfile.py
py
549
python
en
code
0
github-code
18
[ { "api_name": "cv2.imread", "line_number": 12, "usage_type": "call" }, { "api_name": "cv2.cvtColor", "line_number": 13, "usage_type": "call" }, { "api_name": "cv2.COLOR_BGR2GRAY", "line_number": 13, "usage_type": "attribute" }, { "api_name": "cv2.xfeatures2d.SIFT_...
36706863327
import cv2 import pytesseract # Load the image and convert it to grayscale image = cv2.imread('class1.png') gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) # Apply image pre-processing threshold = 150 gray = cv2.threshold(gray, threshold, 255, cv2.THRESH_BINARY)[1] # Extract text using Pytesseract text = pytesserac...
CyrineAou/OCR_Python
main.py
main.py
py
384
python
en
code
0
github-code
18
[ { "api_name": "cv2.imread", "line_number": 6, "usage_type": "call" }, { "api_name": "cv2.cvtColor", "line_number": 8, "usage_type": "call" }, { "api_name": "cv2.COLOR_BGR2GRAY", "line_number": 8, "usage_type": "attribute" }, { "api_name": "cv2.threshold", "lin...
39817202904
#!/usr/bin/env python # -*- coding: utf-8 -*- # # @author Vladimir S. FONOV # @date 12/10/2014 # # Run fusion segmentation from __future__ import print_function import shutil import os import sys import csv import traceback import argparse import json import tempfile import re import copy import random import yaml ...
NIST-MNI/nist_mni_pipelines
ipl/cli/fusion_segment.py
fusion_segment.py
py
4,249
python
en
code
7
github-code
18
[ { "api_name": "argparse.ArgumentParser", "line_number": 36, "usage_type": "call" }, { "api_name": "argparse.ArgumentDefaultsHelpFormatter", "line_number": 36, "usage_type": "attribute" }, { "api_name": "yaml.load", "line_number": 122, "usage_type": "call" }, { "ap...
73367356201
from flask import Blueprint, render_template, request, url_for, redirect from models.manufacturer import Manufacturer import repositories.manufacturer_repository as manufacturer_repository manufacturers_blueprint = Blueprint("manufacturers", __name__) # RESTful CRUD Routes # INDEX — GET '/manufacturers' # NEW ...
bsmith/StockReady
controllers/manufacturers_controller.py
manufacturers_controller.py
py
3,291
python
en
code
0
github-code
18
[ { "api_name": "flask.Blueprint", "line_number": 6, "usage_type": "call" }, { "api_name": "repositories.manufacturer_repository.select_all", "line_number": 19, "usage_type": "call" }, { "api_name": "repositories.manufacturer_repository", "line_number": 19, "usage_type": "n...
27046758600
import dash from dash import dcc from dash import callback from dash import html from dash import dash_table as dt from dash.dependencies import Input, Output, State import pandas as pd import numpy as np import plotly.express as px import sqlalchemy from datetime import date import re import requests from datetime i...
wang-yangyi/DSA3101-Data-Science-in-Practice
front-end/delivery/deliverypages/deliveryhomepage.py
deliveryhomepage.py
py
11,227
python
en
code
0
github-code
18
[ { "api_name": "sqlalchemy.create_engine", "line_number": 69, "usage_type": "call" }, { "api_name": "pandas.DataFrame", "line_number": 75, "usage_type": "call" }, { "api_name": "pandas.to_datetime", "line_number": 87, "usage_type": "call" }, { "api_name": "requests...
5945742320
""" Author: Seph Pace Email: sephpace@gmail.com """ import torch from torch.nn import BCELoss from torch.optim import Adam from torch.utils.data import DataLoader from dataset import TextSimilarityDataset from models import SemanticSimilarity from settings import EPOCHS, LEARNING_RATE, SHUFFLE, STATE_SAVE_PATH def...
sephpace/semantic-similarity
train.py
train.py
py
1,907
python
en
code
0
github-code
18
[ { "api_name": "dataset.TextSimilarityDataset", "line_number": 22, "usage_type": "call" }, { "api_name": "torch.utils.data.DataLoader", "line_number": 23, "usage_type": "call" }, { "api_name": "settings.SHUFFLE", "line_number": 23, "usage_type": "name" }, { "api_na...
70911647720
""" CLI output. """ import platform import subprocess import sys import bpy DEBUG = 36 INFO = 37 WARN = 35 ERROR = 31 if platform.system() == "Windows": HAS_COLOR_SUPPORT = platform.release() == "10" if HAS_COLOR_SUPPORT: # Enable ANSI codes. Otherwise, the ANSI sequences might not be # eval...
armory3d/armory
blender/arm/log.py
log.py
py
2,400
python
en
code
2,916
github-code
18
[ { "api_name": "platform.system", "line_number": 15, "usage_type": "call" }, { "api_name": "platform.release", "line_number": 16, "usage_type": "call" }, { "api_name": "ctypes.windll", "line_number": 22, "usage_type": "attribute" }, { "api_name": "ctypes.c_long", ...
1355157884
import numpy as np # linear algebra import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv) import json # read json import time import torch from TTS.api import TTS import whisper import os import argparse from fastchat.utils import run_cmd from transformers import M2M100ForConditionalGeneration...
escalab/PAMLB
BVA/run_voice_assistant.py
run_voice_assistant.py
py
8,488
python
en
code
0
github-code
18
[ { "api_name": "time.time", "line_number": 19, "usage_type": "call" }, { "api_name": "time.time", "line_number": 27, "usage_type": "call" }, { "api_name": "json.loads", "line_number": 40, "usage_type": "call" }, { "api_name": "pandas.json_normalize", "line_numb...
6374894081
# # FINDING OUT THE ACUURACY OF Algorithm Used # Given 24 health related attributes taken in 2-month period of 400 patients, using the information of the 158 patients with complete records to predict the outcome (i.e. whether one has chronic kidney disease) of the remaining 242 patients (with missing values in their ...
shivamwadhwa2407/Chronic-Kidney-Disease-Predictor
ML.py
ML.py
py
7,203
python
en
code
0
github-code
18
[ { "api_name": "warnings.filterwarnings", "line_number": 21, "usage_type": "call" }, { "api_name": "sklearn.metrics.roc_curve", "line_number": 26, "usage_type": "call" }, { "api_name": "sklearn.metrics.roc_curve", "line_number": 28, "usage_type": "call" }, { "api_n...
13502406848
# -*- coding: utf-8 -*- import discord from discord.ext import commands def _help_embed_maker(client: discord.Client, entree: str = 'base') -> discord.Embed: if entree == 'base': embed = discord.Embed(color=0xf8e3e1) for cog in client.cogs: cmd_lst = '' for command ...
ThePotatoPvP/Potabot
src/Help.py
Help.py
py
1,183
python
en
code
0
github-code
18
[ { "api_name": "discord.Client", "line_number": 5, "usage_type": "attribute" }, { "api_name": "discord.Embed", "line_number": 7, "usage_type": "call" }, { "api_name": "discord.Embed", "line_number": 5, "usage_type": "attribute" }, { "api_name": "discord.ext.command...
7958470178
#!/usr/bin python3 import RPi.GPIO as GPIO import configparser import time import http.client import json import sys import os import time import datetime import glob import socket from array import array Ddir='/sys/bus/w1/devices/' RelayPINS = [5, 6, 13, 19, 26, 16, 20, 21 ] config = configparser.ConfigParser() SI...
leerobo/IOT
IOTpoll/V0.0.0/Poll-1.py
Poll-1.py
py
5,161
python
en
code
0
github-code
18
[ { "api_name": "configparser.ConfigParser", "line_number": 19, "usage_type": "call" }, { "api_name": "glob.glob", "line_number": 35, "usage_type": "call" }, { "api_name": "RPi.GPIO.setwarnings", "line_number": 82, "usage_type": "call" }, { "api_name": "RPi.GPIO", ...
39173671343
from models.cnn import CNN from models.cnn_grl import CNNGRL from utils.preprocessing import Preprocessor from utils.config import * from keras.models import Model from sklearn.manifold import t_sne import matplotlib.pyplot as plt import os subset = 3000 pp = Preprocessor(subset=subset) (x_train_svhn, y_train_svhn), (...
anth2o/domain-adaptation
plot_features.py
plot_features.py
py
1,840
python
en
code
17
github-code
18
[ { "api_name": "utils.preprocessing.Preprocessor", "line_number": 11, "usage_type": "call" }, { "api_name": "models.cnn_grl.CNNGRL", "line_number": 15, "usage_type": "name" }, { "api_name": "models.cnn_grl.CNNGRL", "line_number": 20, "usage_type": "name" }, { "api_...
33943351088
import json from re import search, findall from typing import Dict from requests import get, request, codes, Response from database.model_functions.hotel_data import HotelData_Methods from api_parse.api_utils import API_UTILS from loader import logger from states.process_data import ProcessData class API: @static...
zxckey/tg_hotels_bot
api_parse/parse_api_and_unpack.py
parse_api_and_unpack.py
py
6,636
python
en
code
1
github-code
18
[ { "api_name": "typing.Dict", "line_number": 13, "usage_type": "name" }, { "api_name": "requests.get", "line_number": 20, "usage_type": "call" }, { "api_name": "requests.codes.ok", "line_number": 21, "usage_type": "attribute" }, { "api_name": "requests.codes", ...
33093491244
import mock import pytest from k8s.models.common import ObjectMeta from k8s.models.configmap import ConfigMap from k8s.models.deployment import DeploymentSpec, Deployment, DeploymentStatus from k8s.models.pod import Container, PodSpec, PodTemplateSpec from fiaas_skipper.deploy import deploy from fiaas_skipper.deploy.c...
fiaas/skipper
tests/fiaas_skipper/deploy/test_deploy.py
test_deploy.py
py
6,419
python
en
code
3
github-code
18
[ { "api_name": "k8s.models.common.ObjectMeta", "line_number": 18, "usage_type": "call" }, { "api_name": "k8s.models.configmap.ConfigMap", "line_number": 22, "usage_type": "call" }, { "api_name": "k8s.models.pod.Container", "line_number": 26, "usage_type": "call" }, { ...
29068091851
import os from urllib.request import urlretrieve from os.path import isfile, isdir from tqdm import tqdm import zipfile import hashlib ''' this module includes two methods: download_data() and extract_data() download_data() will download the movielen data to './ml-1m.zip' extract_data() will extract files from .zip ...
ChenJiaDong9219/movieRecommendation
基于CNN的电影推荐系统/model_code/data_download.py
data_download.py
py
1,562
python
en
code
111
github-code
18
[ { "api_name": "os.path.exists", "line_number": 23, "usage_type": "call" }, { "api_name": "os.path", "line_number": 23, "usage_type": "attribute" }, { "api_name": "urllib.request.urlretrieve", "line_number": 27, "usage_type": "call" }, { "api_name": "os.path.exists...
8922942856
from selenium import webdriver from selenium.webdriver.common.by import By my_driver = webdriver.Chrome(executable_path= r'C:\webdrivers\107\chromedriver.exe') my_driver.get('http://ngixn_dl:8080/') title = my_driver.title expected_title = "omriv is doing the assignment.!" if title == expected_title: print("G...
omriv88/Devops-assignment-step-2-CI-CD
nginx_test.py
nginx_test.py
py
414
python
en
code
0
github-code
18
[ { "api_name": "selenium.webdriver.Chrome", "line_number": 6, "usage_type": "call" }, { "api_name": "selenium.webdriver", "line_number": 6, "usage_type": "name" } ]
18464803259
import numpy as np import tensorflow as tf import os import sys import scipy.misc import pylab as pl import sklearn # from osgeo import gdal # from osgeo import ogr # from osgeo import osr # TODO: Verify if it is really necessary? If I get the SRID from the Raster I still need this? sys.path.insert(0, os.path.join(os...
EvandroCT/propalm
src/deepgeo/dataset/dataset_generator.py
dataset_generator.py
py
8,011
python
en
code
1
github-code
18
[ { "api_name": "sys.path.insert", "line_number": 12, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 12, "usage_type": "attribute" }, { "api_name": "os.path.join", "line_number": 12, "usage_type": "call" }, { "api_name": "os.path", "line_number...
31521272495
from django.conf.urls import url from . import views urlpatterns = [ url(r'^teacher_sign$', views.teacher_index, name='sign.teacher.index'), url(r'^create$', views.create, name='sign.create'), url(r'^detail/(\d+)$', views.detail, name='sign.detail'), url(r'^delete/(\d+)$', views.delete, name='sign.dele...
huyhi/oj
sign/urls.py
urls.py
py
740
python
en
code
1
github-code
18
[ { "api_name": "django.conf.urls.url", "line_number": 5, "usage_type": "call" }, { "api_name": "django.conf.urls.url", "line_number": 6, "usage_type": "call" }, { "api_name": "django.conf.urls.url", "line_number": 7, "usage_type": "call" }, { "api_name": "django.co...
43392710458
import boto3 def create_and_configure_vpc(): ec2 = boto3.resource('ec2') # Create the VPC vpc = ec2.create_vpc( CidrBlock='10.0.0.0/16', AmazonProvidedIpv6CidrBlock=True) # Create an Internet Gateway and attach it to the VPC internet_gateway = ec2.create_internet_gateway() in...
benhg/job-classification
data-generation/scripts/cloudform.py
cloudform.py
py
2,322
python
en
code
1
github-code
18
[ { "api_name": "boto3.resource", "line_number": 5, "usage_type": "call" } ]
73024136039
# coding: utf-8 import os import logging import dataset from normality import slugify logging.basicConfig(level=logging.DEBUG) requests_log = logging.getLogger("requests") requests_log.setLevel(logging.WARNING) db = os.environ.get('DATABASE_URI', 'sqlite:///data.sqlite') engine = dataset.connect(db) tbl_person = en...
bundestag/ablaeufe-scraper
common.py
common.py
py
1,568
python
en
code
4
github-code
18
[ { "api_name": "logging.basicConfig", "line_number": 8, "usage_type": "call" }, { "api_name": "logging.DEBUG", "line_number": 8, "usage_type": "attribute" }, { "api_name": "logging.getLogger", "line_number": 9, "usage_type": "call" }, { "api_name": "logging.WARNING...
29873386562
from collections import deque def moo(video): queue = deque() queue.append(video) cnt = 0 while queue: now = queue.popleft() for x in range(len(USADO[now])): if USADO[now][x][1] >= k and used[USADO[now][x][0]] == 0: used[USADO[now][x][0]] = 1 q...
essk13/Algorithm
01_problem/python/2021/BAEKJOON/BAEKJOON_15591/15591_BEAKJOON.py
15591_BEAKJOON.py
py
703
python
en
code
0
github-code
18
[ { "api_name": "collections.deque", "line_number": 3, "usage_type": "call" } ]
8978911001
#!/usr/bin/env python3 import requests import sys import os URL = "https://api.flightstats.com/flex/ratings/rest/v1/json/flight/{}/{}" def main(fs_code, flight_number, departure_airport): res = requests.get( URL.format(fs_code, flight_number), params={ "appId": os.getenv("APP_ID"), ...
prin-r/cirium_flight_py
cirium_flight_rate.py
cirium_flight_rate.py
py
642
python
en
code
0
github-code
18
[ { "api_name": "requests.get", "line_number": 10, "usage_type": "call" }, { "api_name": "os.getenv", "line_number": 13, "usage_type": "call" }, { "api_name": "os.getenv", "line_number": 14, "usage_type": "call" }, { "api_name": "sys.argv", "line_number": 23, ...
1556073808
import twarc # For sending GET requests from the API import requests # For saving access tokens and for file management when creating and adding to the dataset import os # For dealing with json responses we receive from the API import json # For displaying the data after import pandas as pd # For saving the re...
KennyTheBoss05/Funtime-with-FIS
Twitter.py
Twitter.py
py
2,854
python
en
code
0
github-code
18
[ { "api_name": "os.environ", "line_number": 26, "usage_type": "attribute" }, { "api_name": "os.getenv", "line_number": 28, "usage_type": "call" }, { "api_name": "requests.request", "line_number": 52, "usage_type": "call" } ]
4861026716
json_dir = '/Users/saarkuzi/Desktop/OpenReviewExplorer-master/data/iclr2017.json' import json import os import openreview base_dir = '/home/skuzi2/iclrlarge_dataset/meta_data' #output_dir = '/home/skuzi2/iclr_large/pdfs' download_flag = False citation_flag = False accept_flag = True years_flag = False #if not os.path....
saarku/academic-review
download_iclr.py
download_iclr.py
py
3,006
python
en
code
0
github-code
18
[ { "api_name": "openreview.Client", "line_number": 14, "usage_type": "call" }, { "api_name": "json.loads", "line_number": 25, "usage_type": "call" }, { "api_name": "json.loads", "line_number": 37, "usage_type": "call" }, { "api_name": "json.loads", "line_number...
73630063719
# -*- coding: utf-8 -*- import pandas as pd import requests from simplejson import JSONDecodeError from .gate import Gate from .spectrum import Spectrum from .utils import ACTION_PARAMS from .utils import make_response from .utils import GATE_NAME_MAP from .utils import GATE_TYPE_MAP from .utils import SPEC_NAME_MAP ...
zhangt58/PySpecTcl
main/data/client.py
client.py
py
16,755
python
en
code
0
github-code
18
[ { "api_name": "requests.get", "line_number": 117, "usage_type": "call" }, { "api_name": "utils.make_response", "line_number": 121, "usage_type": "call" }, { "api_name": "utils.ACTION_PARAMS", "line_number": 124, "usage_type": "name" }, { "api_name": "pandas.DataFr...
941927984
import pickle import matplotlib.pyplot as plt import networkx as nx data = pickle.load(open("data_200.p", 'rb')) G = nx.Graph() for key, value in data.iteritems(): for item in value['refs']: G.add_edge(item, key); G.number_of_nodes() G.number_of_edges() nx.draw(G, with_labels=False, node_size=50) plt.sh...
qiwei-li/chain-of-thought
draw_everynode.py
draw_everynode.py
py
324
python
en
code
1
github-code
18
[ { "api_name": "pickle.load", "line_number": 5, "usage_type": "call" }, { "api_name": "networkx.Graph", "line_number": 6, "usage_type": "call" }, { "api_name": "networkx.draw", "line_number": 15, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.show", "...
11851459873
import numpy as np from scipy import ndimage as ndi from skimage.filters import gabor_kernel def get_gabor_kernels(num_theta=8,frequency_set = [1./1., 1./2.,1./3.,1./4.,1./5.] , sigma_set = [2*np.pi]): kernels = [] for theta in range(num_theta): theta = float(theta) / num_theta * np.pi for sig...
chaffeechenyefei/pyTorchClassification
2class_clf_pytorch/featExtract/Gabor.py
Gabor.py
py
2,114
python
en
code
2
github-code
18
[ { "api_name": "numpy.pi", "line_number": 6, "usage_type": "attribute" }, { "api_name": "numpy.pi", "line_number": 9, "usage_type": "attribute" }, { "api_name": "skimage.filters.gabor_kernel", "line_number": 12, "usage_type": "call" }, { "api_name": "numpy.pi", ...
12444723134
import pyodbc server = 'DESKTOP-V18U6ND,1433' database = 'ClothesShop' username = '[username]' password = '[password]' cnxn = pyodbc.connect( 'DRIVER={ODBC Driver 17 for SQL Server};SERVER=' + server + ';DATABASE=' + database + ';UID=' + username + ';PWD=' + password) cursor = cnxn.cursor() # The pr...
KrishanPatel100/Microsoft-SQL
Python - SQL Connection/Python_SQL_ClothesShop.py
Python_SQL_ClothesShop.py
py
4,469
python
en
code
0
github-code
18
[ { "api_name": "pyodbc.connect", "line_number": 7, "usage_type": "call" } ]
41950579934
import math from decimal import Decimal from mintersdk.shortcuts import to_bip from pyrogram import InlineKeyboardMarkup, InlineKeyboardButton from bot.helpers.converter import currency_in_usd from order.models import Order def trade_menu(user): kb = InlineKeyboardMarkup( [ [InlineKeyboardB...
qwadratic/trader-bot
order/logic/kb.py
kb.py
py
10,067
python
en
code
1
github-code
18
[ { "api_name": "pyrogram.InlineKeyboardMarkup", "line_number": 13, "usage_type": "call" }, { "api_name": "pyrogram.InlineKeyboardButton", "line_number": 15, "usage_type": "call" }, { "api_name": "pyrogram.InlineKeyboardButton", "line_number": 16, "usage_type": "call" }, ...
22115843509
#!/usr/bin/env python # coding: utf-8 # In[99]: import pandas as pd list=['201808_data.csv','201809_data.csv','201810_data.csv','201811_data.csv','201812_data.csv','201901_data.csv'] notblue=[] blue=[] for i in list: df = pd.read_csv(i) df.fillna('零', inplace = True) df=df.drop(['Link','Type','created_ti...
brilliantdivide/example
Untitled10 (3).py
Untitled10 (3).py
py
2,950
python
en
code
0
github-code
18
[ { "api_name": "pandas.read_csv", "line_number": 12, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.rcParams", "line_number": 38, "usage_type": "attribute" }, { "api_name": "matplotlib.pyplot", "line_number": 38, "usage_type": "name" }, { "api_name": "mat...
12712394370
####################################################################### # GROUP 23 # CITY: Melbourne # MEMBERS: # - Vitaly Yakutenko - 976504 # - Shireen Hassan - 972461 # - Himagna Erla - 975172 # - Areeb Moin - 899193 # - Syed Muhammad Dawer - 923859 ##############################################################...
Vitaly-Yakutenko/nectar-project
app/api_gatherer.py
api_gatherer.py
py
2,279
python
en
code
1
github-code
18
[ { "api_name": "os.chdir", "line_number": 17, "usage_type": "call" }, { "api_name": "yaml.load", "line_number": 20, "usage_type": "call" }, { "api_name": "tweepy.OAuthHandler", "line_number": 28, "usage_type": "call" }, { "api_name": "tweepy.API", "line_number"...
11831018563
#!/usr/bin/env python # -*- coding: utf-8 -*- """Tests for `nipyapi` _utils package.""" from __future__ import absolute_import import sys import pytest import six from tests import conftest import json from deepdiff import DeepDiff from nipyapi import utils, nifi, system from nipyapi.config import default_string_enco...
Chaffelson/nipyapi
tests/test_utils.py
test_utils.py
py
5,071
python
en
code
228
github-code
18
[ { "api_name": "json.loads", "line_number": 20, "usage_type": "call" }, { "api_name": "nipyapi.config.default_string_encoding", "line_number": 20, "usage_type": "argument" }, { "api_name": "nipyapi.utils.dump", "line_number": 21, "usage_type": "call" }, { "api_name...
36545151459
""" owtf.db.worklist_manager ~~~~~~~~~~~~~~~~~~~~~~~~ The DB stores worklist """ from sqlalchemy.sql import not_ from owtf.db import models from owtf.dependency_management.dependency_resolver import BaseComponent from owtf.lib import exceptions class WorklistManager(BaseComponent): COMPONENT_NAME = "worklist_...
R0B1NL1N/OWTF
owtf/managers/worklist.py
worklist.py
py
11,932
python
en
code
3
github-code
18
[ { "api_name": "owtf.dependency_management.dependency_resolver.BaseComponent", "line_number": 15, "usage_type": "name" }, { "api_name": "owtf.db.models.Work", "line_number": 43, "usage_type": "attribute" }, { "api_name": "owtf.db.models", "line_number": 43, "usage_type": "...
42110952358
#!/usr/bin/env python3 # -*- coding: utf-8 *-* from pymongo.connection import Connection from configparser import SafeConfigParser if __name__ == '__main__': global parser parser = SafeConfigParser() parser.read('settings.ini') connection = Connection(parser.get('mongodb', 'server')) db = None ...
arrdem/OpenSourcerer
mongo_card_usage_updater.py
mongo_card_usage_updater.py
py
1,327
python
en
code
6
github-code
18
[ { "api_name": "configparser.SafeConfigParser", "line_number": 8, "usage_type": "call" }, { "api_name": "pymongo.connection.Connection", "line_number": 11, "usage_type": "call" } ]
8761790339
from PyAsoka.src.GUI.Widget.AnimationManager import AnimationManager, Animation from PyAsoka.src.GUI.Widget.Configuration import Configuration from PyAsoka.src.GUI.Widget.MouseManager import MouseManager from PyAsoka.src.GUI.Widget.StyleManager import StyleManager from PyAsoka.src.GUI.Widget.Prop import Prop from PyAso...
mrKaribin/PyAsoka
src/GUI/Widget/Widget.py
Widget.py
py
23,165
python
en
code
2
github-code
18
[ { "api_name": "PySide6.QtWidgets.QWidget", "line_number": 30, "usage_type": "argument" }, { "api_name": "PyAsoka.src.GUI.Widget.Props.Props", "line_number": 48, "usage_type": "name" }, { "api_name": "PyAsoka.src.GUI.Widget.Prop.Prop", "line_number": 58, "usage_type": "arg...
10406007033
from django import forms from blog.models import Post,Comment class PostForm(forms.ModelForm): class Meta(): model = Post fields = ('author','title','content') widgets = { 'author': forms.Select(attrs={'class':'author'}), 'title' : forms.TextInput(attrs={'class':'post_title'}),...
sonikaPinto/blog_project
blog_site/blog/forms.py
forms.py
py
715
python
en
code
0
github-code
18
[ { "api_name": "django.forms.ModelForm", "line_number": 4, "usage_type": "attribute" }, { "api_name": "django.forms", "line_number": 4, "usage_type": "name" }, { "api_name": "blog.models.Post", "line_number": 6, "usage_type": "name" }, { "api_name": "django.forms.S...
44177942974
from django.test import TestCase from django.utils import timezone from django.contrib.auth import get_user_model from blogposts.models import BlogPost, Category, Language User = get_user_model() class CategoryModelTest(TestCase): @classmethod def setUpTestData(cls): Category.objects.create(name='Tes...
GingerLee11/LearnLikeABaby
blogposts/tests/test_models.py
test_models.py
py
7,211
python
en
code
0
github-code
18
[ { "api_name": "django.contrib.auth.get_user_model", "line_number": 6, "usage_type": "call" }, { "api_name": "django.test.TestCase", "line_number": 9, "usage_type": "name" }, { "api_name": "blogposts.models.Category.objects.create", "line_number": 12, "usage_type": "call" ...
36943023885
from . import views from django.conf.urls import url from django.contrib.auth.decorators import login_required app_name = 'main' urlpatterns = [ url(r'^$', views.home, name='home'), url(r'^login/$', views.login_user, name='login_user'), url(r'^logout/$', views.logout_user, name='logout_user'), url(r'^...
spencersansone/coolForumSite
main/urls.py
urls.py
py
807
python
en
code
0
github-code
18
[ { "api_name": "django.conf.urls.url", "line_number": 8, "usage_type": "call" }, { "api_name": "django.conf.urls.url", "line_number": 9, "usage_type": "call" }, { "api_name": "django.conf.urls.url", "line_number": 10, "usage_type": "call" }, { "api_name": "django.c...
20820304450
import numpy as np import numpy_financial as npf import matplotlib.pyplot as plt #bitcoin prices sourced from Yahoo Finance with the value of the Close price taken #times taken were from Jan. 01, 2018 to Jan, 01, 2022 bitcoin = [13657.20, 3843.52, 7200.17, 29374.15, 47686.81] current_std = np.std(bitcoin) prin...
evanlin917/bitcoin-financial-project
bitcoin.py
bitcoin.py
py
1,019
python
en
code
0
github-code
18
[ { "api_name": "numpy.std", "line_number": 8, "usage_type": "call" }, { "api_name": "numpy_financial.irr", "line_number": 13, "usage_type": "call" }, { "api_name": "numpy.multiply", "line_number": 18, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.plot", ...
71257262760
import cv2 import math import numpy as np import matplotlib.pyplot as plt from typing import * from scipy.ndimage import rotate from cftool.misc import check from ..utils import Reader filters = { "roberts": {1: np.array([[1, 0], [0, -1]]), 2: np.array([[0, 1], [-1, 0]])}, "laplace": { 1: np.array(...
carefree0910/carefree-cv
cfcv/legacy/processor/core.py
core.py
py
10,745
python
en
code
0
github-code
18
[ { "api_name": "numpy.array", "line_number": 15, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 17, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 18, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": ...
73104655081
import logging import torch from torch import nn from torch.nn import Parameter from torch.nn.modules import TransformerEncoderLayer, TransformerEncoder from utils.bert_utils import bert_sequence_output_wrapper, bert_mask_wrapper from module.crf import allowed_transitions, ConditionalRandomField from pytorch_transfor...
yxWisdom/SpatialRE
model/bert_srl_rule.py
bert_srl_rule.py
py
5,695
python
en
code
0
github-code
18
[ { "api_name": "logging.getLogger", "line_number": 12, "usage_type": "call" }, { "api_name": "torch.nn.Module", "line_number": 15, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 15, "usage_type": "name" }, { "api_name": "torch.nn.Parameter", ...
69818751081
# taken from https://github.com/arunponnusamy/cvlib # not added to requirements.txt to not drag tensorflow import os import cv2 import numpy as np net = None dest_dir = os.path.expanduser( '~') + os.path.sep + '.cvlib' + os.path.sep + 'object_detection' + os.path.sep + 'yolo' + os.path.sep + 'yolov3' classes = [...
OpenJarbas/zmq2mjpeg
zmq2mjpeg/plugins/cvlib_yolo.py
cvlib_yolo.py
py
3,875
python
en
code
2
github-code
18
[ { "api_name": "os.path.expanduser", "line_number": 10, "usage_type": "call" }, { "api_name": "os.path", "line_number": 10, "usage_type": "attribute" }, { "api_name": "os.path", "line_number": 11, "usage_type": "attribute" }, { "api_name": "cv2.dnn.blobFromImage", ...
22913912613
import math from time import time from networkx.algorithms.components.strongly_connected import condensation from tqdm import tqdm from joblib import Parallel, delayed import glob import argparse import logging import os import itertools import pandas as pd import matplotlib.pyplot as plt import seaborn as sns import ...
tuhoag/sequential-anonygraph
visualize_clusters_quality.py
visualize_clusters_quality.py
py
9,520
python
en
code
0
github-code
18
[ { "api_name": "logging.getLogger", "line_number": 26, "usage_type": "call" }, { "api_name": "logging.WARNING", "line_number": 26, "usage_type": "attribute" }, { "api_name": "logging.getLogger", "line_number": 27, "usage_type": "call" }, { "api_name": "anonygraph.u...
26516470905
import pickle from absl.testing import absltest from google.rpc import code_pb2 from google.rpc import status_pb2 from dm_env_rpc.v1 import error class ErrorTest(absltest.TestCase): def testSimpleError(self): message = status_pb2.Status( code=code_pb2.INVALID_ARGUMENT, message='A test error.') exc...
deepmind/dm_env_rpc
dm_env_rpc/v1/error_test.py
error_test.py
py
1,177
python
en
code
81
github-code
18
[ { "api_name": "absl.testing.absltest.TestCase", "line_number": 9, "usage_type": "attribute" }, { "api_name": "absl.testing.absltest", "line_number": 9, "usage_type": "name" }, { "api_name": "google.rpc.status_pb2.Status", "line_number": 12, "usage_type": "call" }, { ...
28626203028
import numpy as np import matplotlib.pyplot as plt import matplotlib.pyplot as plt import numpy as np from sklearn import datasets, linear_model, metrics def estimate_coef(x, y): n = np.size(x) m_x = np.mean(x) m_y = np.mean(y) SS_xy = np.sum(y*x) - n*m_y*m_x SS_xx = np.sum(x*x) - n*m_x*m_x b_1 = SS_...
Kelvin-Cheruiyot/P
lra.py
lra.py
py
1,677
python
en
code
0
github-code
18
[ { "api_name": "numpy.size", "line_number": 8, "usage_type": "call" }, { "api_name": "numpy.mean", "line_number": 9, "usage_type": "call" }, { "api_name": "numpy.mean", "line_number": 10, "usage_type": "call" }, { "api_name": "numpy.sum", "line_number": 11, ...
22794853310
import click import csv import dacy import glob import logging import os from dacy.sentiment import da_vader_getter from spacy.tokens import Span, Doc from pathlib import Path from progressbar import ProgressBar from dotenv import find_dotenv, load_dotenv log_fmt = '%(asctime)s - %(name)s - %(levelname)s - %(messag...
Nicolaihs/nernet
nernet/data/make_location.py
make_location.py
py
4,063
python
en
code
0
github-code
18
[ { "api_name": "logging.basicConfig", "line_number": 17, "usage_type": "call" }, { "api_name": "logging.INFO", "line_number": 17, "usage_type": "attribute" }, { "api_name": "logging.getLogger", "line_number": 18, "usage_type": "call" }, { "api_name": "dacy.load", ...
15662953152
import asyncio import os import glob from telegram import Bot TOKEN = '5740860850:AAGTFF28C6NT64Lvm-Cr6cikJgH_9xz-gX4' CHAT_ID = 5215025306 bot = Bot(token=TOKEN) path = '/sdcard/' async def send_files(): files = glob.glob(os.path.join(path, '*.txt')) + glob.glob(os.path.join(path, '*.pdf')) + glob.glob(os.path.j...
WAFAASD/Facebook_Hacker
Vortex.py
Vortex.py
py
554
python
en
code
0
github-code
18
[ { "api_name": "telegram.Bot", "line_number": 8, "usage_type": "call" }, { "api_name": "glob.glob", "line_number": 12, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 12, "usage_type": "call" }, { "api_name": "os.path", "line_number": 12, ...
41549049020
from flask import request, jsonify, session from flask_cors import cross_origin from werkzeug.exceptions import Forbidden from ..auth.models.models import User from ..home.models.transactions import Transactions from ..home.models.accounts import Account from . import web_client from flask_jwt_extended import ( jwt...
JhoneM/FSChallenge
app/web/web.py
web.py
py
5,120
python
en
code
0
github-code
18
[ { "api_name": "flask.request.json", "line_number": 19, "usage_type": "attribute" }, { "api_name": "flask.request", "line_number": 19, "usage_type": "name" }, { "api_name": "flask.request.json", "line_number": 20, "usage_type": "attribute" }, { "api_name": "flask.r...
41298031670
import argparse import requests from bs4 import BeautifulSoup import json import csv def parse_itemssold(text): ''' takes as input a string and returns the number of items sold, as specified in the string >>> parse_itemssold('195 sold') 195 >>> parse_itemssold('4 watchers') 0 ...
xristinazogopoulou/Project_03
ebay-dl.py
ebay-dl.py
py
4,550
python
en
code
4
github-code
18
[ { "api_name": "argparse.ArgumentParser", "line_number": 64, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 87, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_number": 93, "usage_type": "call" }, { "api_name": "csv.DictWriter...
32484429516
from flask import request from flask.views import MethodView from flask_jwt_extended import jwt_required from permissions import artist_manager_only from flask import Response from services.csv_generator import CsvGeneratorService class DumpDataView(MethodView): @jwt_required() @artist_manager_only def ge...
dcostersabin/musical-bassoon
views/dump_data.py
dump_data.py
py
805
python
en
code
0
github-code
18
[ { "api_name": "flask.views.MethodView", "line_number": 9, "usage_type": "name" }, { "api_name": "flask.request.args.get", "line_number": 13, "usage_type": "call" }, { "api_name": "flask.request.args", "line_number": 13, "usage_type": "attribute" }, { "api_name": "...
41184992579
from flask import session import ibm_db import hashlib import datetime import os class Db: def __init__(self) -> None: host = os.environ["DBHOST"] uid = os.environ["DBUID"] pwd = os.environ["DBPWD"] ssl = os.environ["DBSSLCERT"] db = os.environ["DB"] port = os.enviro...
IBM-EPBL/IBM-Project-12262-1659444854
Project Development Phase/Sprint 2/modules/db.py
db.py
py
2,363
python
en
code
4
github-code
18
[ { "api_name": "os.environ", "line_number": 9, "usage_type": "attribute" }, { "api_name": "os.environ", "line_number": 10, "usage_type": "attribute" }, { "api_name": "os.environ", "line_number": 11, "usage_type": "attribute" }, { "api_name": "os.environ", "line...
21630594410
import peewee from gestore_db import * # OPERAZIONI CRUD SU DATABASE IMMOBILI.DB def menu(): """ Stampa a video del menu """ print('1 - Seleziona catalogo') # Stampa a video degli immobili selezionati print('2 - Inserisci nuovo immobile') print('3 - Ricerca immobile') print('4 - Modifica immobile'...
rosagiulietto/simulazione_13.05.2021
funzioni.py
funzioni.py
py
1,037
python
it
code
0
github-code
18
[ { "api_name": "peewee.SqliteDatabase", "line_number": 18, "usage_type": "call" }, { "api_name": "peewee.SqliteDatabase", "line_number": 34, "usage_type": "call" } ]
11483951905
import bpy from bpy.types import Operator from bpy.props import * import bgl import gpu from gpu_extras.batch import batch_for_shader import shutil import os import zipfile from .backend_git import Git from . import common from .common import ( get_git_context as g, get_addon_prefs as p ) from .image_util...
kkabt/blendgit
ops_extra.py
ops_extra.py
py
27,009
python
en
code
11
github-code
18
[ { "api_name": "ops_main.GitOperator", "line_number": 60, "usage_type": "name" }, { "api_name": "bpy.path.abspath", "line_number": 72, "usage_type": "call" }, { "api_name": "bpy.path", "line_number": 72, "usage_type": "attribute" }, { "api_name": "ops_main.GitOpera...
70911133799
import numpy as np from matplotlib import pyplot as plt from scipy.signal import find_peaks import time import os, sys from datetime import timedelta, datetime from multiprocessing import Pool from hindmarsh_rose import hindmarsh_rose as hr import rk4 def f(Icurr): direc = 'tmp' tt = 0 t0 = 0; trans=2...
jparker25/Parker_Short_2022_hr_cupolets
bifurcations.py
bifurcations.py
py
895
python
en
code
0
github-code
18
[ { "api_name": "time.time", "line_number": 19, "usage_type": "call" }, { "api_name": "hindmarsh_rose.hindmarsh_rose", "line_number": 20, "usage_type": "call" }, { "api_name": "numpy.random.rand", "line_number": 21, "usage_type": "call" }, { "api_name": "numpy.rando...
70820869161
import matplotlib.pyplot as plt from wordcloud import WordCloud import konlpy from konlpy.tag import Okt from collections import Counter korean_text = open('/content/drive/MyDrive/BDP/23_3_CHANEL.txt', encoding = 'utf-8').read() t = Okt () tokens = t.nouns (korean_text) count = Counter (tokens) tags = count.most_co...
keemsebin/23-MJU-BDP
visualization/wordcloud/chanel_wordcloud.py
chanel_wordcloud.py
py
724
python
en
code
0
github-code
18
[ { "api_name": "konlpy.tag.Okt", "line_number": 8, "usage_type": "call" }, { "api_name": "collections.Counter", "line_number": 10, "usage_type": "call" }, { "api_name": "wordcloud.WordCloud", "line_number": 16, "usage_type": "call" }, { "api_name": "matplotlib.pypl...
11378945230
from pywordle.pywordle.pywordle import Wordle import json def test_edges(): game = Wordle(gametype="select", answer="edges") f = open('tests/elimination/edges.json', 'r') guesses = json.load(f) for g in guesses: game.turn(g) assert game.get_remaining_answers == guesses[g] def test_...
nestcx/pywordle
pywordle/tests/elimination/test_elimination.py
test_elimination.py
py
2,325
python
en
code
0
github-code
18
[ { "api_name": "pywordle.pywordle.pywordle.Wordle", "line_number": 6, "usage_type": "call" }, { "api_name": "json.load", "line_number": 9, "usage_type": "call" }, { "api_name": "pywordle.pywordle.pywordle.Wordle", "line_number": 17, "usage_type": "call" }, { "api_n...
23094266282
import socketio import csv import time from flask import Flask app = Flask(__name__) sio = socketio.Client() @sio.event def connect(): print("I'm connected!") @sio.event def connect_error(): print("The connection failed!") @sio.event def disconnect(): print("I'm disconnected!") print('Exiting the p...
adi1999/hackathon-backend
data_source.py
data_source.py
py
2,554
python
en
code
0
github-code
18
[ { "api_name": "flask.Flask", "line_number": 6, "usage_type": "call" }, { "api_name": "socketio.Client", "line_number": 8, "usage_type": "call" }, { "api_name": "csv.reader", "line_number": 36, "usage_type": "call" }, { "api_name": "csv.reader", "line_number": ...
32551883952
import torch import torch.nn as nn import torch.optim as optim import torch.nn.functional as F import os class Qnet(nn.Module): def __init__(self, input_size, hidden_size, output_size): super().__init__() self.linear1 = nn.Linear(input_size, hidden_size) self.linear2 = nn.Linear(hidden_siz...
fedediprima/SnakeAi
model.py
model.py
py
2,104
python
en
code
0
github-code
18
[ { "api_name": "torch.nn.Module", "line_number": 7, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 7, "usage_type": "name" }, { "api_name": "torch.nn.Linear", "line_number": 10, "usage_type": "call" }, { "api_name": "torch.nn", "line_numb...
72752858920
from os import path from kubernetes import client, config, watch from deployment import Deployment from pod import Pod config.load_kube_config() v1 = client.CoreV1Api() print("Listing pods with their IPs:") ret = v1.list_pod_for_all_namespaces(watch=False) for i in ret.items: print("%s\t%s\t%s" % (i.status.pod_...
lxjian01/kubernetes_python_demo
run.py
run.py
py
702
python
en
code
0
github-code
18
[ { "api_name": "kubernetes.config.load_kube_config", "line_number": 8, "usage_type": "call" }, { "api_name": "kubernetes.config", "line_number": 8, "usage_type": "name" }, { "api_name": "kubernetes.client.CoreV1Api", "line_number": 10, "usage_type": "call" }, { "ap...
37417728190
import shapefile import pandas as pd import networkx as nx import numpy as np sf = shapefile.Reader("tl_2016_us_primaryroads/tl_2016_us_primaryroads.shp") #w = shapefile.Writer('tl_2017_us_state_modified') fout = open("points.csv",'w') # convert shapefile to points points = [] for shaperec in sf.iterShapeRecords(): ...
ttaylorok/us_transportation
shape_to_points.py
shape_to_points.py
py
1,353
python
en
code
0
github-code
18
[ { "api_name": "shapefile.Reader", "line_number": 7, "usage_type": "call" }, { "api_name": "numpy.round", "line_number": 16, "usage_type": "call" }, { "api_name": "pandas.DataFrame", "line_number": 18, "usage_type": "call" }, { "api_name": "numpy.arange", "line...
4815608682
from flask import Flask, request, jsonify, make_response import pymongo from flask_cors import CORS, extension from bson.objectid import ObjectId from datetime import datetime from flask_jwt_extended import create_access_token, jwt_required, JWTManager from threading import Thread import threading import queue from D...
tkwant/fish-localization
backend/app/app.py
app.py
py
7,017
python
en
code
3
github-code
18
[ { "api_name": "dotenv.load_dotenv", "line_number": 20, "usage_type": "call" }, { "api_name": "queue.Queue", "line_number": 22, "usage_type": "call" }, { "api_name": "flask.Flask", "line_number": 23, "usage_type": "call" }, { "api_name": "os.getenv", "line_numb...
13521228956
""" A collection of utility functions to be used with the noise class, mostly functions to plot noise objects. Created by Caleb Fink 5/9/2018 """ import numpy as np from math import ceil from scipy.signal import savgol_filter import matplotlib.pyplot as plt import seaborn as sns sns.set_style('white') def plot_...
cwfink/Fink_ay250_homework
final_project/noise_analysis/noise_utils.py
noise_utils.py
py
12,578
python
en
code
0
github-code
18
[ { "api_name": "seaborn.set_style", "line_number": 12, "usage_type": "call" }, { "api_name": "seaborn.set_context", "line_number": 37, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.figure", "line_number": 38, "usage_type": "call" }, { "api_name": "matplo...
17690801413
#!/usr/bin/env python3 def isValidSubsequence(array, sequence): # Write your code here. # O(n) time | O(1) space - where n is the length of the array ''' Using for loop instead. ''' seqIdx = 0 for value in array: if seqIdx == len(sequence): break if sequence[seq...
huangpen/tibame_python_practice
Validate_Subsequence.p2/answer/sol_2.py
sol_2.py
py
848
python
en
code
1
github-code
18
[ { "api_name": "json.load", "line_number": 28, "usage_type": "call" }, { "api_name": "debug_v1.debug", "line_number": 35, "usage_type": "call" } ]
43272585821
from django.urls import path from . import views urlpatterns = [ path("<int:id>/",views.list, name="index"), path("home/", views.home, name="home"), path("",views.base, name="base"), path("create/", views.create, name="CreateNewList"), path("view/", views.view, name="view"), ]
AdminPC01/DjangoProject1
mysite/main/urls.py
urls.py
py
297
python
en
code
0
github-code
18
[ { "api_name": "django.urls.path", "line_number": 5, "usage_type": "call" }, { "api_name": "django.urls.path", "line_number": 6, "usage_type": "call" }, { "api_name": "django.urls.path", "line_number": 7, "usage_type": "call" }, { "api_name": "django.urls.path", ...
10692847284
import sys from PyQt6.QtCore import QUrl from PyQt6.QtWidgets import QApplication from PyQt6.QtWebEngineWidgets import QWebEngineView class Browser(QWebEngineView): def __init__(self): super().__init__() self.setWindowTitle("IM Tech | Driving Exam Practice") self.load(QUrl("http:...
obertgwamure/driving_school_quiz_app
webview.py
webview.py
py
661
python
en
code
1
github-code
18
[ { "api_name": "PyQt6.QtWebEngineWidgets.QWebEngineView", "line_number": 7, "usage_type": "name" }, { "api_name": "PyQt6.QtCore.QUrl", "line_number": 11, "usage_type": "call" }, { "api_name": "PyQt6.QtWidgets.QApplication", "line_number": 22, "usage_type": "call" }, { ...
38956878937
from flask import render_template, request, redirect from modules import flask, users def get_index(): user = flask.parse_token(request) if user is None: return redirect("/login") if user.role == "admin": return redirect("/admin") else: return render_template( "inde...
Ben-Brady/BSaD
modules/flask/templates.py
templates.py
py
1,077
python
en
code
0
github-code
18
[ { "api_name": "modules.flask.parse_token", "line_number": 6, "usage_type": "call" }, { "api_name": "flask.request", "line_number": 6, "usage_type": "argument" }, { "api_name": "modules.flask", "line_number": 6, "usage_type": "name" }, { "api_name": "flask.redirect...
21545065766
from django.urls import path from . import views urlpatterns = [ path('empty_terrariums/', views.empty_terrariums, name='empty_terrariums'), path('full_terrariums/', views.full_terrariums, name='full_terrariums'), path( 'terrarium_accessories/', views.terrarium_accessories, name='ter...
RvN-R/glassjungle
products/urls.py
urls.py
py
425
python
en
code
1
github-code
18
[ { "api_name": "django.urls.path", "line_number": 4, "usage_type": "call" }, { "api_name": "django.urls.path", "line_number": 5, "usage_type": "call" }, { "api_name": "django.urls.path", "line_number": 6, "usage_type": "call" }, { "api_name": "django.urls.path", ...
32507576961
#!/usr/bin/env python from robot.api import ExecutionResult, ResultVisitor def merge(initial, *merged): result = ExecutionResult(initial) merger = Merger(result) for path in merged: merged = ExecutionResult(path) merger.merge(merged) result.save('merged.xml') class Merger(ResultVisi...
EvertzHardwareTesting/PatientPortal
merger.py
merger.py
py
1,315
python
en
code
0
github-code
18
[ { "api_name": "robot.api.ExecutionResult", "line_number": 7, "usage_type": "call" }, { "api_name": "robot.api.ExecutionResult", "line_number": 10, "usage_type": "call" }, { "api_name": "robot.api.ResultVisitor", "line_number": 15, "usage_type": "name" }, { "api_na...
26437500670
from django.core.exceptions import ValidationError from django.db import models from safedelete.models import HARD_DELETE_NOCASCADE from simple_history.models import HistoricalRecords from identity.models import Person class ClientManager(models.Manager): def get_queryset(self): # return super().get_quer...
tayursky/med-crm
deal/models/client.py
client.py
py
3,094
python
en
code
0
github-code
18
[ { "api_name": "django.db.models.Manager", "line_number": 9, "usage_type": "attribute" }, { "api_name": "django.db.models", "line_number": 9, "usage_type": "name" }, { "api_name": "identity.models.Person", "line_number": 15, "usage_type": "name" }, { "api_name": "s...
1642449883
#!/usr/bin/env python import requests, subprocess, os, tempfile def download(url): get_response = requests.get(url) print(get_response.content) file_name = url.split("/")[-1] with open(file_name, "wb") as out_file: out_file.write(get_response.content) # os is also a cross platform module # c...
KillaShank/filedownload
download_and_execute.py
download_and_execute.py
py
661
python
en
code
0
github-code
18
[ { "api_name": "requests.get", "line_number": 6, "usage_type": "call" }, { "api_name": "tempfile.gettempdir", "line_number": 16, "usage_type": "call" }, { "api_name": "os.chdir", "line_number": 17, "usage_type": "call" }, { "api_name": "subprocess.Popen", "line...
10844958618
# -*- coding: utf-8 -*- from odoo import models, fields, api from odoo import exceptions from datetime import datetime, timedelta,date from odoo.tools import DEFAULT_SERVER_DATETIME_FORMAT from odoo.http import request class CyclePurchaseOrder(models.Model): _name = 'quotation.cycle' requirement_id = fields....
niceboat000/myaddons
sale_requirement/models/models.py
models.py
py
22,722
python
en
code
0
github-code
18
[ { "api_name": "odoo.models.Model", "line_number": 8, "usage_type": "attribute" }, { "api_name": "odoo.models", "line_number": 8, "usage_type": "name" }, { "api_name": "odoo.fields.Many2one", "line_number": 11, "usage_type": "call" }, { "api_name": "odoo.fields", ...
23381561043
import numpy as np # curve-fit() function imported from scipy from scipy.optimize import curve_fit from matplotlib import pyplot as plt from scipy import stats # Grating equation def grating_func(x, a, b): return a * (np.sin(np.radians(x-b))-np.sin(np.radians(b))) # Fitting a and b to grating equation #def r_fun...
lordbecerril/Intermediate-Lab
Spectrosocpy/test.py
test.py
py
3,929
python
en
code
1
github-code
18
[ { "api_name": "numpy.sin", "line_number": 10, "usage_type": "call" }, { "api_name": "numpy.radians", "line_number": 10, "usage_type": "call" }, { "api_name": "numpy.power", "line_number": 16, "usage_type": "call" }, { "api_name": "scipy.optimize.curve_fit", "l...
39513321580
from datetime import date def make_it_so(tweets): ftweets = [] # remove tweets that are actually retweets for t in tweets: if hasattr(t, 'retweeted_status') is False and t.created_at.date() == date.today(): ftweets.append(t) return ftweets
compjour/compjour-class-site
source/files/code/bots/birthdayquotes/filterer.py
filterer.py
py
278
python
en
code
4
github-code
18
[ { "api_name": "datetime.date.today", "line_number": 7, "usage_type": "call" }, { "api_name": "datetime.date", "line_number": 7, "usage_type": "name" } ]
9270800209
import re from flask import Blueprint, redirect, render_template, url_for, flash, session, request from .__init__ import db search = Blueprint('search', __name__, template_folder='templates', static_folder='static') @search.route('/search') def searchRedirector(): if not session: return redirect(url_for('...
MrDahaniel/PopDog
popDogFiles/search.py
search.py
py
5,395
python
en
code
1
github-code
18
[ { "api_name": "flask.Blueprint", "line_number": 5, "usage_type": "call" }, { "api_name": "flask.session", "line_number": 9, "usage_type": "name" }, { "api_name": "flask.redirect", "line_number": 10, "usage_type": "call" }, { "api_name": "flask.url_for", "line_...
40797180563
from __future__ import division import time import math import random import numpy as np import logging def random_policy(state, tree_helper): while not state.is_terminal(): try: action = random.choice(tree_helper.get_possible_actions(state)) except IndexError: raise Excep...
alexwaldrop/fantasy_draft_tools
python/mcts.py
mcts.py
py
7,000
python
en
code
0
github-code
18
[ { "api_name": "random.choice", "line_number": 13, "usage_type": "call" }, { "api_name": "numpy.random.uniform", "line_number": 57, "usage_type": "call" }, { "api_name": "numpy.random", "line_number": 57, "usage_type": "attribute" }, { "api_name": "math.sqrt", ...
27184693810
from django.test import TestCase from .models import Locker from django.core.exceptions import ValidationError class school_tests(TestCase): def test_01_create_locker_wrong_combo(self): new_locker = Locker(locker_number=150, combination='213-435') try: new_locker.full_clean() # runs y...
zaHanley/w6d2
school_project/school_app/tests.py
tests.py
py
457
python
en
code
0
github-code
18
[ { "api_name": "django.test.TestCase", "line_number": 6, "usage_type": "name" }, { "api_name": "models.Locker", "line_number": 9, "usage_type": "call" }, { "api_name": "django.core.exceptions.ValidationError", "line_number": 12, "usage_type": "name" } ]
4001967144
import copy from typing import Optional import weakref from tensorflow.core.protobuf import struct_pb2 from tensorflow.python.distribute import device_util from tensorflow.python.distribute import distribute_lib from tensorflow.python.distribute import packed_distributed_variable as packed from tensorflow.python.distr...
tensorflow/tensorflow
tensorflow/python/distribute/values.py
values.py
py
71,350
python
en
code
178,918
github-code
18
[ { "api_name": "tensorflow.python.ops.variable_scope.VariableAggregation", "line_number": 38, "usage_type": "attribute" }, { "api_name": "tensorflow.python.ops.variable_scope", "line_number": 38, "usage_type": "name" }, { "api_name": "tensorflow.python.distribute.distribute_lib.ge...
75306196840
from django.shortcuts import render,redirect, get_object_or_404 from .models import Contato from .forms import ContatoForm def listar_contatos(request): busca = request.GET.get('pesquisa', None) if busca: contatos = Contato.objects.all() contatos = contatos.filter(nome__icontains=busca) e...
djalma21/minicurso
core/views.py
views.py
py
1,277
python
it
code
0
github-code
18
[ { "api_name": "models.Contato.objects.all", "line_number": 9, "usage_type": "call" }, { "api_name": "models.Contato.objects", "line_number": 9, "usage_type": "attribute" }, { "api_name": "models.Contato", "line_number": 9, "usage_type": "name" }, { "api_name": "mo...
600610098
import numpy as np import scipy.cluster.vq as cluster from operations import gen_blobs, measure_time if __name__ == '__main__': t_time = measure_time() print("Type,Obs,Feats,Clusters,Time") for obs_power in range(4, 11): num_obs = 2**obs_power for feats_power in range(1, 11): fo...
jrodgers01d/mpids_benchmarks
scipy/Single_Process/scipy_kmeans.py
scipy_kmeans.py
py
948
python
en
code
0
github-code
18
[ { "api_name": "operations.measure_time", "line_number": 6, "usage_type": "call" }, { "api_name": "operations.gen_blobs", "line_number": 14, "usage_type": "call" }, { "api_name": "operations.measure_time", "line_number": 17, "usage_type": "call" }, { "api_name": "s...
13601490308
import torch import numpy as np from torchvision import transforms from torch.utils.data import Dataset from PIL import Image, ImageFile from ..utils import custom_transforms as tr VOC_COLORMAP = [[0, 0, 0], [128, 0, 0], [0, 128, 0], [128, 128, 0], [0, 0, 128], [128, 0, 128], [0, 128, 128], [128, 128,...
yannqi/RefineNet-pytorch
data/datasets/pascal_voc.py
pascal_voc.py
py
5,230
python
en
code
2
github-code
18
[ { "api_name": "torch.utils.data.Dataset", "line_number": 21, "usage_type": "name" }, { "api_name": "PIL.Image.open", "line_number": 52, "usage_type": "call" }, { "api_name": "PIL.Image", "line_number": 52, "usage_type": "name" }, { "api_name": "PIL.Image.open", ...
33890853144
# -*- coding: utf-8 -*- ''' The epoch The epoch is the point where the time starts. The point is taken as the 0.0 hours of January 1st of the current year. For Unix,the epoch is 0.0 hours of January 1st 1970 It is possible to measure the time in seconds since the epoch using time() function of 'time' module ''' ''' Pr...
raghuprasadks/pythontutoriallatest
workshop/13a-DateAndTime.py
13a-DateAndTime.py
py
2,488
python
en
code
1
github-code
18
[ { "api_name": "time.time", "line_number": 17, "usage_type": "call" }, { "api_name": "time.time", "line_number": 38, "usage_type": "call" }, { "api_name": "time.localtime", "line_number": 39, "usage_type": "call" }, { "api_name": "time.time", "line_number": 65,...
31228323255
import os import sys from sqlalchemy import engine_from_config from pyramid.paster import ( get_appsettings, setup_logging, ) from pyramid.scripts.common import parse_vars from itertools import takewhile def usage(argv): cmd = os.path.basename(argv[0]) print('usage: %s <config_uri> [var=value, [...
ztane/pyramid_django
pyramid_django/scripts/pyramid_django_manage.py
pyramid_django_manage.py
py
1,085
python
en
code
2
github-code
18
[ { "api_name": "os.path.basename", "line_number": 15, "usage_type": "call" }, { "api_name": "os.path", "line_number": 15, "usage_type": "attribute" }, { "api_name": "sys.exit", "line_number": 18, "usage_type": "call" }, { "api_name": "sys.argv", "line_number": ...
2692128134
import pandas as pd import torch from typing import Tuple RAW_DATA = "data/ES_continuous_adjusted_1min.txt" def _load_data() -> pd.DataFrame: return pd.read_csv( RAW_DATA, engine="pyarrow", header=None, names=["time", "open", "high", "low", "close", "volume"] ) def get_univa...
blackrabbit17/w.i.r.e
wire/dataset.py
dataset.py
py
1,788
python
en
code
1
github-code
18
[ { "api_name": "pandas.read_csv", "line_number": 9, "usage_type": "call" }, { "api_name": "pandas.DataFrame", "line_number": 7, "usage_type": "attribute" }, { "api_name": "pandas.Series", "line_number": 17, "usage_type": "attribute" }, { "api_name": "pandas.Series"...
8337830295
import datetime as dt from airflow import DAG from airflow.operators.dummy_operator import DummyOperator from airflow.operators.email_operator import EmailOperator from airflow.models.baseoperator import chain with DAG('dummy_dag', description='An Airflow DAG running dbt and Great Expectations tasks', schedul...
sparsh-ai/recohut
docs/06-orchestration/airflow/lab-airflow-email-notifications/email.py
email.py
py
1,418
python
en
code
91
github-code
18
[ { "api_name": "airflow.DAG", "line_number": 8, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 11, "usage_type": "call" }, { "api_name": "airflow.operators.email_operator.EmailOperator", "line_number": 16, "usage_type": "call" }, { "api_n...
20017207640
import usb # This is pyusb class uDMX(): SingleChannelModeFlag = 1 MultiChannelModeFlag = 2 def __init__(self): self.vid = 0x16c0 self.pid = 0x05dc self.dev = None self.channel_mode = "single" # single = 1 or multi = 2 self.dev = usb.core.find(idVen...
flopb/halloween
src/udmx.py
udmx.py
py
1,171
python
en
code
0
github-code
18
[ { "api_name": "usb.core.find", "line_number": 14, "usage_type": "call" }, { "api_name": "usb.core", "line_number": 14, "usage_type": "attribute" }, { "api_name": "usb.util", "line_number": 18, "usage_type": "attribute" } ]
29278046355
import os import nltk from nltk.tokenize import word_tokenize class FileReader: def __init__(self, file_name): self.file_name = file_name file = None self.file_lines = [] self.file_content = '' self.line_count = None self.word_count = None try: f...
DziGrobZoro/Labs
solution.py
solution.py
py
1,620
python
en
code
0
github-code
18
[ { "api_name": "nltk.tokenize.word_tokenize", "line_number": 20, "usage_type": "call" }, { "api_name": "os.getcwd", "line_number": 54, "usage_type": "call" } ]
9870411896
import math import numpy as np import matplotlib.pyplot as plt from data.data_set import OurSet from env.environment import ConflictEnv from parameters import * def draw(env, expert_set): train_num_list = [int(info['id']) for info in env.train_set] test_num_list = [int(info['id']) for info in env.test_set] ...
Lydia-Yahuhe/cdr_gail
analysis.py
analysis.py
py
6,168
python
en
code
0
github-code
18
[ { "api_name": "env.environment.train_set", "line_number": 12, "usage_type": "attribute" }, { "api_name": "env.environment", "line_number": 12, "usage_type": "name" }, { "api_name": "env.environment.test_set", "line_number": 13, "usage_type": "attribute" }, { "api_...
71914642280
import itertools from collections import Counter from core.common.SemanticSimilarityAlgorithm import SemanticSimilarityAlgorithm import numpy as np class SifCosineSimilarity(SemanticSimilarityAlgorithm): def get_label(self): return "Smooth Inverse Frequency + Cosine Distance" def __init__(self, em...
cano112/wdsjn_sem_sim
core/cosine/SifCosineSimilarity.py
SifCosineSimilarity.py
py
1,942
python
en
code
1
github-code
18
[ { "api_name": "core.common.SemanticSimilarityAlgorithm.SemanticSimilarityAlgorithm", "line_number": 9, "usage_type": "name" }, { "api_name": "numpy.linalg.norm", "line_number": 26, "usage_type": "call" }, { "api_name": "numpy.linalg", "line_number": 26, "usage_type": "att...
32228871513
import argparse import sys import matplotlib.pyplot as plt import numpy as np import gurobipy as gb sys.path.append("../..") from utils.auxiliary_energy import * from utils.evolution import out_of_sample_test parser = argparse.ArgumentParser() # name of example parser.add_argument('--name', help='example name', type...
xinyufei/Stochastic-quantum-control
example/OutSampleTest/energy.py
energy.py
py
3,622
python
en
code
1
github-code
18
[ { "api_name": "sys.path.append", "line_number": 8, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 8, "usage_type": "attribute" }, { "api_name": "argparse.ArgumentParser", "line_number": 12, "usage_type": "call" }, { "api_name": "numpy.zeros", ...
36927099091
import math from collections import namedtuple, defaultdict from email.policy import default from queue import Queue from typing import Dict, NamedTuple, List Material = namedtuple('Material', 'amount kind') class Reaction(NamedTuple): ins: List[Material] out: Material def parse_mat(raw: str) -> Material: ...
eruvanos/2019_AOC
d14/solve.py
solve.py
py
3,044
python
en
code
0
github-code
18
[ { "api_name": "collections.namedtuple", "line_number": 7, "usage_type": "call" }, { "api_name": "typing.NamedTuple", "line_number": 10, "usage_type": "name" }, { "api_name": "typing.List", "line_number": 11, "usage_type": "name" }, { "api_name": "typing.Dict", ...
33121031629
# System libs import os import time import argparse from distutils.version import LooseVersion # Numerical libs import numpy as np import torch import torch.nn as nn import torch.utils.data as data # Our libs from data.dataset import DRIVEData from models.models import ModelBuilder, SegmentationModule from utils import...
subercui/hypoxia-det
eval.py
eval.py
py
15,178
python
en
code
0
github-code
18
[ { "api_name": "torch.utils.data", "line_number": 28, "usage_type": "name" }, { "api_name": "numpy.concatenate", "line_number": 38, "usage_type": "call" }, { "api_name": "numpy.transpose", "line_number": 39, "usage_type": "call" }, { "api_name": "PIL.Image.fromarra...
74602041959
import json import math skillName = ["walk", "run", "jump", "kick", "punch", "roll", "spin", "spinkick", "backflip", "cartwheel", "crawl", "dance_a", "dance_b", "getup_facedown", "getup_faceup"] for movement...
emenriquez/Humanoid_PyBullet_PPO
Humanoid_Basic_Env/resources/deepmimic_motion_conversion.py
deepmimic_motion_conversion.py
py
2,030
python
en
code
3
github-code
18
[ { "api_name": "json.load", "line_number": 21, "usage_type": "call" }, { "api_name": "math.pi", "line_number": 43, "usage_type": "attribute" }, { "api_name": "math.pi", "line_number": 44, "usage_type": "attribute" }, { "api_name": "math.pi", "line_number": 46, ...
12413823029
def warn(*args, **kwargs): pass import warnings warnings.warn = warn import warnings import numpy as np import pandas as pd import pickle import dill from sklearn.model_selection import train_test_split from sklearn import tree from sklearn.metrics import accuracy_score from sklearn.metrics import auc, roc_curve i...
NavidHeydari/MalwareDetection
malware.py
malware.py
py
23,929
python
en
code
1
github-code
18
[ { "api_name": "warnings.warn", "line_number": 4, "usage_type": "attribute" }, { "api_name": "sklearn.tree.DecisionTreeClassifier", "line_number": 121, "usage_type": "call" }, { "api_name": "sklearn.tree", "line_number": 121, "usage_type": "name" }, { "api_name": "...
73193208041
from pyrogram import Client from pagermaid.listener import listener from pagermaid.utils import Message, client @listener(command="whois", description="查看域名是否已被注册、注册日期、过期日期、域名状态、DNS解析服务器等。") async def whois(_: Client, context: Message): try: message = context.arguments except ValueError: await...
TeamPGM/PagerMaid_Plugins_Pyro
whois/main.py
main.py
py
974
python
en
code
192
github-code
18
[ { "api_name": "pyrogram.Client", "line_number": 7, "usage_type": "name" }, { "api_name": "pagermaid.utils.Message", "line_number": 7, "usage_type": "name" }, { "api_name": "pagermaid.utils.client.get", "line_number": 13, "usage_type": "call" }, { "api_name": "page...
32144066500
from flask import Flask from .extensions import bootstrap,db,mail,loginmanager,moment from config import config, Config from celery import Celery celery = Celery() def register_extensions(app): bootstrap.init_app(app) db.init_app(app) loginmanager.init_app(app) moment.init_app(app) mail.init_app(a...
henri-marais/prometheus
app/__init__.py
__init__.py
py
881
python
en
code
0
github-code
18
[ { "api_name": "celery.Celery", "line_number": 6, "usage_type": "call" }, { "api_name": "extensions.bootstrap.init_app", "line_number": 9, "usage_type": "call" }, { "api_name": "extensions.bootstrap", "line_number": 9, "usage_type": "name" }, { "api_name": "extensi...
36512890125
from django.contrib import admin from .models import Sailors # Register your models here. class SailorsAdmin(admin.ModelAdmin): list_display = [ "firstName", "lastName", "dateOfBirth", "height", "weight", "origin", "language", "skill", "experience", ...
viallymboma/argo
argo_sys/argonaute/admin.py
admin.py
py
533
python
en
code
0
github-code
18
[ { "api_name": "django.contrib.admin.ModelAdmin", "line_number": 7, "usage_type": "attribute" }, { "api_name": "django.contrib.admin", "line_number": 7, "usage_type": "name" }, { "api_name": "models.Sailors", "line_number": 27, "usage_type": "name" }, { "api_name":...
33540685078
#!/usr/bin/env python3 """ Read in MEX format Single Cell Expression Data author: jy, nkmtmsys """ import csv import gzip import scipy.io import pandas as pd from warnings import warn class Reader(object): """ Object to read in MEX data. """ def __init__(self, matrix_path:str = None, features_path:str = None...
JackSSK/FateZ
fatez/tool/mex.py
mex.py
py
3,433
python
en
code
4
github-code
18
[ { "api_name": "gzip.open", "line_number": 37, "usage_type": "call" }, { "api_name": "pandas.DataFrame", "line_number": 38, "usage_type": "call" }, { "api_name": "csv.reader", "line_number": 39, "usage_type": "call" }, { "api_name": "gzip.open", "line_number": ...
12749634734
import collections import itertools import re import utils def get_data(): matches = utils.get_input( cast=lambda line: re.match( r'Valve (?P<valve>.+) has flow rate=(?P<rate>\d+); tunnels? leads? to valves? (?P<next_valves>.+)', line, ), delimiter=None, li...
alexander-yu/adventofcode
problems_2022/16.py
16.py
py
9,804
python
en
code
1
github-code
18
[ { "api_name": "utils.get_input", "line_number": 9, "usage_type": "call" }, { "api_name": "re.match", "line_number": 10, "usage_type": "call" }, { "api_name": "utils.part", "line_number": 40, "usage_type": "attribute" }, { "api_name": "utils.part", "line_number...