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
20485480675
from __future__ import (absolute_import, division, print_function) __metaclass__ = type from ansible.module_utils.basic import AnsibleModule from ansible_collections.zp4rker.basic.plugins.module_utils import calculator def run_module(): module_args = dict( x=dict(type='int', required=True), operation=dict(type=...
zp4rker/ansible-basic-collection
plugins/modules/calculate.py
calculate.py
py
1,339
python
en
code
0
github-code
36
[ { "api_name": "ansible.module_utils.basic.AnsibleModule", "line_number": 21, "usage_type": "call" }, { "api_name": "ansible_collections.zp4rker.basic.plugins.module_utils.calculator.add", "line_number": 31, "usage_type": "call" }, { "api_name": "ansible_collections.zp4rker.basic....
2706087078
import hashlib import itertools import json import os import time from typing import Any, Dict, List import googlemaps PLACE_TYPES = [ "Gym", "Park", "Café", "Supermarket", "Restaurant", "Vegetarian Restaurant", "Burger Restaurant", ] DISTRICT_NAMES = [ "Neuehrenfeld, Cologne, Germany"...
sbunzel/city-explorer
src/city_explorer/maps.py
maps.py
py
5,926
python
en
code
1
github-code
36
[ { "api_name": "googlemaps.Client", "line_number": 37, "usage_type": "call" }, { "api_name": "time.sleep", "line_number": 63, "usage_type": "call" }, { "api_name": "typing.List", "line_number": 41, "usage_type": "name" }, { "api_name": "typing.Dict", "line_numb...
10309522654
from random import randint from discord.ext import commands import discord from discord import Member from discord.ext.commands import has_permissions, MissingPermissions intents = discord.Intents.default() intents.members = True intents.messages = True #LIGNE MARCHE CHEZ MOI #intents.message_content = True LIGNE DANS...
GregoirePichard1/Discord-Bot
src/main.py
main.py
py
1,696
python
en
code
0
github-code
36
[ { "api_name": "discord.Intents.default", "line_number": 7, "usage_type": "call" }, { "api_name": "discord.Intents", "line_number": 7, "usage_type": "attribute" }, { "api_name": "discord.ext.commands.Bot", "line_number": 11, "usage_type": "call" }, { "api_name": "d...
29378610006
from bs4 import BeautifulSoup import requests req_headers = {"Accept": "*/*", "Accept-Encoding": "gzip, deflate, br", "User-Agent": 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) ' 'Chrome/71.0.3578.98 Safari/537.36 ', "Connection": "keep-alive"} DO...
JanMird/scrapping-telegram-bot
scrape.py
scrape.py
py
4,252
python
en
code
0
github-code
36
[ { "api_name": "requests.get", "line_number": 19, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_number": 23, "usage_type": "call" } ]
27717890086
import argparse import json import os import pickle from pathlib import Path import sqlite3 from tqdm import tqdm import random from utils.linking_process import SpiderEncoderV2Preproc from utils.pretrained_embeddings import GloVe from utils.datasets.spider import load_tables # from dataset.process.preprocess_kaggle i...
BeachWang/DAIL-SQL
data_preprocess.py
data_preprocess.py
py
2,914
python
en
code
90
github-code
36
[ { "api_name": "json.load", "line_number": 19, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 19, "usage_type": "call" }, { "api_name": "os.path", "line_number": 19, "usage_type": "attribute" }, { "api_name": "json.load", "line_number": 20...
73974477225
import contextvars import csv import logging from os import PathLike from typing import Callable, Dict, Union, Optional import xmltodict as xmltodict from discord.ext.commands import Bot, Context logger = logging.getLogger("bot.localization") class LocalizationHandler(object): default_handler = None # type: Lo...
Blaumeise03/AccountingBot
accounting_bot/localization.py
localization.py
py
3,837
python
en
code
6
github-code
36
[ { "api_name": "logging.getLogger", "line_number": 10, "usage_type": "call" }, { "api_name": "contextvars.ContextVar", "line_number": 18, "usage_type": "call" }, { "api_name": "discord.ext.commands.Bot", "line_number": 22, "usage_type": "name" }, { "api_name": "typ...
30330496099
# !/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2021/3/26 4:00 下午 # @Author : wangHua # @File : ProductAddCrawler.py # @Software: PyCharm from app.crawlers.BaseAmazonCrawler import BaseAmazonCrawler from utils import Http from app.repositories import ProductItemRepository, ProductRepository, SiteRepository ...
whale-fall-wh/producer-consumer
app/crawlers/ProductAddCrawler.py
ProductAddCrawler.py
py
2,295
python
en
code
0
github-code
36
[ { "api_name": "app.crawlers.BaseAmazonCrawler.BaseAmazonCrawler", "line_number": 18, "usage_type": "name" }, { "api_name": "app.entities.ProductAddJobEntity", "line_number": 24, "usage_type": "name" }, { "api_name": "utils.Http", "line_number": 24, "usage_type": "name" ...
5571329753
import pandas as pd import jieba import warnings import re warnings.filterwarnings('ignore') import json # 第一大部分,查全率,查准率的计算 def judge(strs): strs = strs.split(",") l = [] for s in strs: s = s.replace('[',"").replace(']',"").replace("'","") l.append(int(s)) return l def tongji(l1,l2): ...
MJ-NCEPU/HauZhongBei
DataMining.py
DataMining.py
py
7,045
python
en
code
0
github-code
36
[ { "api_name": "warnings.filterwarnings", "line_number": 5, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 108, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 110, "usage_type": "call" }, { "api_name": "re.sub", ...
5515870088
from __future__ import absolute_import from __future__ import division from __future__ import print_function import argparse import os import itertools import tensorflow as tf import numpy as np import cifar10_utils import cifar10_siamese_utils from convnet import ConvNet from siamese import Siamese from sklearn.mult...
frhrdr/dlc2016
practical_3/train_model.py
train_model.py
py
19,281
python
en
code
1
github-code
36
[ { "api_name": "tensorflow.train.AdamOptimizer", "line_number": 51, "usage_type": "call" }, { "api_name": "tensorflow.train", "line_number": 51, "usage_type": "attribute" }, { "api_name": "tensorflow.set_random_seed", "line_number": 91, "usage_type": "call" }, { "a...
71551273063
from functions import Complexity import os, re, csv, pickle import seaborn as sns import matplotlib.pyplot as plt plt.style.use('ggplot') import pandas as pd from scipy import stats import json # Get the interactions # Get the BDM values for each protein in each pair # get correlation # plot for fun # get interactio...
alyssa-adams/bdm_proteins
lambda_ppi.py
lambda_ppi.py
py
8,354
python
en
code
1
github-code
36
[ { "api_name": "matplotlib.pyplot.style.use", "line_number": 5, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.style", "line_number": 5, "usage_type": "attribute" }, { "api_name": "matplotlib.pyplot", "line_number": 5, "usage_type": "name" }, { "api_name"...
18287973881
import numpy as np import matplotlib.pyplot as plt from components.tests import ( test_helium, test_helium_x, test_helium_xc, test_helium_xc_Vosko ) from components.misc import get_n ## Command line arguments arg_verbose = False arg_plot = False ## r = radius in spherical coordinates r_max = 15 r_step = 0.015 rr ...
jdbosser/DFT-Jupyter
Notebooks/heliumdft.py
heliumdft.py
py
2,534
python
en
code
0
github-code
36
[ { "api_name": "numpy.arange", "line_number": 15, "usage_type": "call" }, { "api_name": "numpy.sqrt", "line_number": 18, "usage_type": "call" }, { "api_name": "numpy.pi", "line_number": 18, "usage_type": "attribute" }, { "api_name": "numpy.exp", "line_number": ...
37752345818
import sys # Prevent spurious errors during `python setup.py test`, a la # http://www.eby-sarna.com/pipermail/peak/2010-May/003357.html: try: import multiprocessing except ImportError: pass from setuptools import setup, find_packages extra_setup = {} if sys.version_info >= (3,): extra_setup['use_2to3'] ...
civiccc/verifier_date_utils
setup.py
setup.py
py
1,161
python
en
code
0
github-code
36
[ { "api_name": "sys.version_info", "line_number": 14, "usage_type": "attribute" }, { "api_name": "setuptools.setup", "line_number": 17, "usage_type": "call" }, { "api_name": "setuptools.find_packages", "line_number": 23, "usage_type": "call" } ]
36492860982
#!/usr/bin/env python3 from __future__ import absolute_import, division, print_function, unicode_literals from . import invoke_rpc_builtin, invoke_rpc_python_udf from . import ProcessGroupAgent from .internal_rpc_utils import serialize, PythonUDF import sys import torch from enum import Enum _agent = None def _r...
reynoldsm88/pytorch
torch/distributed/rpc.py
rpc.py
py
5,784
python
en
code
null
github-code
36
[ { "api_name": "enum.Enum", "line_number": 50, "usage_type": "name" }, { "api_name": "sys.version_info", "line_number": 56, "usage_type": "attribute" }, { "api_name": "distributed_c10d._get_default_group", "line_number": 66, "usage_type": "call" }, { "api_name": "t...
4543795483
import logging import requests class Move(object): def __init__(self, url, full_obj=None): self.full_obj = full_obj or self.get_from_api(url) self._name = None self._power = 0 @property def name(self): if self.full_obj is None: self.full_obj = self.get_move_fro...
yehted/pokemon
src/pokemon/moves.py
moves.py
py
998
python
en
code
0
github-code
36
[ { "api_name": "logging.info", "line_number": 37, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 38, "usage_type": "call" } ]
41669892511
# -*- coding: utf-8 -*- import os import tensorflow as tf from keras.applications.vgg16 import VGG16 from keras.applications.resnet50 import ResNet50,preprocess_input,decode_predictions from keras.preprocessing.image import ImageDataGenerator from keras.models import Sequential,Model from keras.layers import Input,Act...
POD-azlamarhyu/Python_resnet_recognition
src/resnet2.py
resnet2.py
py
2,806
python
en
code
0
github-code
36
[ { "api_name": "tensorflow.test.gpu_device_name", "line_number": 17, "usage_type": "call" }, { "api_name": "tensorflow.test", "line_number": 17, "usage_type": "attribute" }, { "api_name": "glob.glob", "line_number": 22, "usage_type": "call" }, { "api_name": "keras....
37428719988
from gl import * from pyglet import resource Mat4Floats = GLfloat*4 NOTEXTURES = False class MDLdict(object): """Materials display lists""" def __init__(self): self.mat_dls = {} self.mat_textures = {} self.mat_trans = {} def __del__(self): if glDeleteLists: for...
scavpy/Scav-Team-Pyweek-Aug-2010
gamelib/tdgl/material.py
material.py
py
2,940
python
en
code
3
github-code
36
[ { "api_name": "pyglet.resource.file", "line_number": 21, "usage_type": "call" }, { "api_name": "pyglet.resource", "line_number": 21, "usage_type": "name" }, { "api_name": "pyglet.resource.texture", "line_number": 56, "usage_type": "call" }, { "api_name": "pyglet.r...
24968801455
from typing import List from collections import deque class Solution: def nearestExit(self, maze: List[List[str]], entrance: List[int]) -> int: nei = [[-1, 0], [1, 0], [0, -1], [0, 1]] dq, seen = deque(), set() dq.append(entrance) row, col = len(maze), len(maze[0]) steps ...
inverseTrig/leet_code
1926_nearest_exit_from_entrance_in_maze.py
1926_nearest_exit_from_entrance_in_maze.py
py
1,646
python
en
code
0
github-code
36
[ { "api_name": "typing.List", "line_number": 6, "usage_type": "name" }, { "api_name": "collections.deque", "line_number": 8, "usage_type": "call" } ]
25686410069
import csv import os from keras.models import load_model import numpy as np import scipy.io as sio model = load_model("models/trained_model_h5.h5") def load_data(record_path, start_t, end_t): data = sio.loadmat(record_path) signal = data['ECG']['data'][0][0] signal = signal[:, start_t:end_t] featur...
AlexPetukhov/nnsu
GOOD/6sec/apply_model_no_delin.py
apply_model_no_delin.py
py
3,501
python
en
code
0
github-code
36
[ { "api_name": "keras.models.load_model", "line_number": 8, "usage_type": "call" }, { "api_name": "scipy.io.loadmat", "line_number": 12, "usage_type": "call" }, { "api_name": "scipy.io", "line_number": 12, "usage_type": "name" }, { "api_name": "numpy.empty", "l...
722631652
""" Реализовать два небольших скрипта: а) итератор, генерирующий целые числа, начиная с указанного, б) итератор, повторяющий элементы некоторого списка, определенного заранее. Подсказка: Использовать функцию count() и cycle() модуля itertools. Обратите внимание, что создаваемый цикл не должен быть бесконечным. Необходи...
Jaidergan/Lesson04
lesson04/example06.py
example06.py
py
2,775
python
ru
code
0
github-code
36
[ { "api_name": "itertools.count", "line_number": 22, "usage_type": "call" }, { "api_name": "itertools.cycle", "line_number": 42, "usage_type": "call" } ]
24722131243
#-*-coding:utf-8-*- """ This is base modoul bank """ import imp import json import urllib2 import urllib import os import time import sys from thePath import rootPath class BANK(object): """ Base class """ def __init__(self): self.useragent = ( "Mozilla/5.0 (Linux; Android 6.0;" ...
WYL-BruceLong/bank_spider
superBank.py
superBank.py
py
2,022
python
en
code
0
github-code
36
[ { "api_name": "time.strftime", "line_number": 25, "usage_type": "call" }, { "api_name": "urllib2.Request", "line_number": 32, "usage_type": "call" }, { "api_name": "urllib2.urlopen", "line_number": 33, "usage_type": "call" }, { "api_name": "urllib2.URLError", ...
2671644316
import math import os import sys import numpy as np import torch from torch import nn from torch.nn import Conv2d from torch.nn import functional as F from torch.nn.utils import remove_weight_norm, spectral_norm, weight_norm from . import commons, modules from .commons import get_padding from .modules import (ConvNex...
w-okada/voice-changer
server/voice_changer/RVC/inferencer/voras_beta/models.py
models.py
py
7,992
python
en
code
12,673
github-code
36
[ { "api_name": "os.path.dirname", "line_number": 17, "usage_type": "call" }, { "api_name": "os.path", "line_number": 17, "usage_type": "attribute" }, { "api_name": "os.path.abspath", "line_number": 17, "usage_type": "call" }, { "api_name": "sys.path.append", "l...
10863291429
import pytest from cleverwrap import CleverWrap from cleverwrap.errors import UnknownAPIError def test_init(): cw = CleverWrap("API_KEY") assert cw.key == "API_KEY" def test_say(mock_requests): mock_requests.add( mock_requests.GET, 'https://www.cleverbot.com/getreply?input=Hello&key=AP...
TotallyNotRobots/cleverwrap.py
tests/test_cleverwrap.py
test_cleverwrap.py
py
959
python
en
code
0
github-code
36
[ { "api_name": "cleverwrap.CleverWrap", "line_number": 8, "usage_type": "call" }, { "api_name": "cleverwrap.CleverWrap", "line_number": 27, "usage_type": "call" }, { "api_name": "cleverwrap.CleverWrap", "line_number": 39, "usage_type": "call" }, { "api_name": "pyte...
7137523065
import mysql.connector as connector import datetime as date import logging class User : dates1 = date.datetime.now() name = "RKFINANCE" def __init__(self): self.con = connector.connect(host='localhost', user='root', ...
Kitturamkrishna/RKFINANCE
User.py
User.py
py
4,361
python
en
code
0
github-code
36
[ { "api_name": "datetime.datetime.now", "line_number": 6, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 6, "usage_type": "attribute" }, { "api_name": "mysql.connector.connect", "line_number": 9, "usage_type": "call" }, { "api_name": "mys...
41493530569
# -*- coding: utf-8 -*- """ Created on Fri Jan 29 10:51:07 2021 @author: REMI DECOUTY, DAMIEN LU """ import pandas import glob, os import igraph as ig import math # récupération de la liste de tous les fichiers à étudier os.chdir("data") allCsvFiles = glob.glob("*") os.chdir("..") # coloration d'une arête, en fonc...
dlu02/projet-bioinfo
projet_multithread.py
projet_multithread.py
py
9,281
python
fr
code
0
github-code
36
[ { "api_name": "os.chdir", "line_number": 15, "usage_type": "call" }, { "api_name": "glob.glob", "line_number": 16, "usage_type": "call" }, { "api_name": "os.chdir", "line_number": 17, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 73, ...
21902537705
import subprocess import time from wifi import Cell import pathlib script_path = pathlib.Path(__file__).parent.resolve() import sys sys.path.append('../') from common import mesh_utils def scan_wifi(interface): ''' Scan wifi with the AuthAP pattern. If more than one, select the best quality one. If ...
tiiuae/mesh_com
modules/sc-mesh-secure-deployment/src/1_5/features/mutual/utils/wifi_ssrc.py
wifi_ssrc.py
py
2,045
python
en
code
12
github-code
36
[ { "api_name": "pathlib.Path", "line_number": 6, "usage_type": "call" }, { "api_name": "sys.path.append", "line_number": 9, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 9, "usage_type": "attribute" }, { "api_name": "wifi.Cell.all", "line_num...
2538475868
import uuid from django.db import models from django.db.models.deletion import CASCADE, SET_NULL # Create your models here. """ Crear un nuevo proyecto Django, con una app llamada PRODUCTOS, que sirva para manejar un catálogo de productos representado por las siguientes entidades: Producto(nombre, descripcion, url_i...
EsperanzaMacarena/ejerciciosDjango
ejercicio1/ejercicio1/productos/models.py
models.py
py
1,429
python
es
code
0
github-code
36
[ { "api_name": "django.db.models.Model", "line_number": 19, "usage_type": "attribute" }, { "api_name": "django.db.models", "line_number": 19, "usage_type": "name" }, { "api_name": "django.db.models.UUIDField", "line_number": 20, "usage_type": "call" }, { "api_name"...
75113361384
import arcade import random SCREEN_WIDTH = 800 SCREEN_HEIGHT = 600 COLORS = [arcade.color.BLUE, arcade.color.FANDANGO_PINK,arcade.color.GOLDEN_POPPY, arcade.color.TURQUOISE_BLUE,arcade.color.SPRING_GREEN,arcade.color.RED,arcade.color.LAVENDER_INDIGO] class Cercle(): def __init__(self,rayon,x,y,color): se...
Mousavir/main.py
Exercies_arcade.py
Exercies_arcade.py
py
1,984
python
en
code
0
github-code
36
[ { "api_name": "arcade.color", "line_number": 8, "usage_type": "attribute" }, { "api_name": "arcade.draw_circle_filled", "line_number": 20, "usage_type": "call" }, { "api_name": "arcade.Window", "line_number": 24, "usage_type": "attribute" }, { "api_name": "random....
39309304527
#!/usr/bin/python3 # # MEG sensor space analysis for visual LTP (vertical & horizontal gratings) # # Authors: Paul Sowman, Judy Zhu ####################################################################################### import os import mne import meegkit # for TSPCA import glob import matplotlib.pyplot as plt import...
Macquarie-MEG-Research/MEG_analysis_mne
Vince_MEG_MD_VEP.py
Vince_MEG_MD_VEP.py
py
7,910
python
en
code
0
github-code
36
[ { "api_name": "os.system", "line_number": 43, "usage_type": "call" }, { "api_name": "glob.glob", "line_number": 46, "usage_type": "call" }, { "api_name": "glob.glob", "line_number": 47, "usage_type": "call" }, { "api_name": "glob.glob", "line_number": 48, ...
617619433
# monitor import subprocess import os import time import datetime import threading import shutil import argparse import Dashboard BROWSER_PATH = '' METHOD = None URL = "http://127.0.0.1:8080/flag?" MODE1 = "--incognito" # 시크릿 모드 MODE2 = "--no-sandbox" # 샌드박스 비활성화 TIMEOUT = 300 # 5min p = None RUN_FLAG = False de...
BOB-Jour/Glitch_Fuzzer
run_fuzz_windows10.py
run_fuzz_windows10.py
py
3,327
python
en
code
0
github-code
36
[ { "api_name": "subprocess.Popen", "line_number": 35, "usage_type": "call" }, { "api_name": "subprocess.PIPE", "line_number": 35, "usage_type": "attribute" }, { "api_name": "datetime.datetime.now", "line_number": 42, "usage_type": "call" }, { "api_name": "datetime....
2795908861
from flask import Flask, render_template, redirect from flask_pymongo import PyMongo from .settings import Config from .search import Searcher from .forms import SearchForm def create_app(): app = Flask(__name__) app.config.from_object(Config) mongo = PyMongo(app, connect = True) webIndex = mongo.cx.w...
Patrick-Bender/wholesearchcatalog.com
flaskapp-Backup/flaskapp/__init__.py
__init__.py
py
965
python
en
code
0
github-code
36
[ { "api_name": "flask.Flask", "line_number": 9, "usage_type": "call" }, { "api_name": "settings.Config", "line_number": 10, "usage_type": "argument" }, { "api_name": "flask_pymongo.PyMongo", "line_number": 11, "usage_type": "call" }, { "api_name": "forms.SearchForm...
41042866801
import pandas as pd import seaborn as sns import matplotlib.pyplot as plt import matplotlib.patches as patches import itertools from PIL import Image from scipy.cluster.hierarchy import dendrogram from sklearn.datasets import load_iris import numpy as np from sklearn.cluster import AgglomerativeClustering from pandas.c...
pletnev-aleksandr/nsd_hackathon
libb.py
libb.py
py
6,556
python
en
code
0
github-code
36
[ { "api_name": "pickle.load", "line_number": 16, "usage_type": "call" }, { "api_name": "pickle.load", "line_number": 33, "usage_type": "call" }, { "api_name": "os.path.exists", "line_number": 39, "usage_type": "call" }, { "api_name": "os.path", "line_number": 3...
17581792452
from typing import Any, Dict, Tuple, Optional from urllib.parse import urlparse from starwhale.utils import config from starwhale.base.uri.exceptions import NoMatchException def _get_instances() -> Dict[str, Dict]: return config.load_swcli_config().get("instances", {}) # type: ignore[no-any-return] def _get_d...
star-whale/starwhale
client/starwhale/base/uri/instance.py
instance.py
py
3,238
python
en
code
171
github-code
36
[ { "api_name": "starwhale.utils.config.load_swcli_config", "line_number": 9, "usage_type": "call" }, { "api_name": "starwhale.utils.config", "line_number": 9, "usage_type": "name" }, { "api_name": "typing.Dict", "line_number": 8, "usage_type": "name" }, { "api_name...
5456383430
#!/usr/bin/env python3 # -*- coding:utf-8 -*- # # @name : PhoneInfoga - Phone numbers OSINT tool # @url : https://github.com/sundowndev # @author : Raphael Cerveaux (sundowndev) from bs4 import BeautifulSoup import hashlib import json from lib.output import * from lib.request import send ''' Scanning phone numbe...
wagdev1919/BulkPhonenumberVerifier
BulkPhoneNumberVerifier/scanners/numverify.py
numverify.py
py
2,294
python
en
code
2
github-code
36
[ { "api_name": "lib.request.send", "line_number": 27, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_number": 28, "usage_type": "call" }, { "api_name": "hashlib.md5", "line_number": 39, "usage_type": "call" }, { "api_name": "lib.request.send", ...
21625949314
#!/usr/bin/env python # -*- coding: utf-8 -*- import time import argparse import numpy as np import networkx as nx import subprocess import os from tulip import tlp import pandas as pd from evalne.utils import preprocess as pp def parse_args(): """ Parses Fruchterman-Reingold arguments.""" parser = argparse....
aida-ugent/graph-vis-eval
methods/fruchterman_reingold.py
fruchterman_reingold.py
py
7,489
python
en
code
0
github-code
36
[ { "api_name": "argparse.ArgumentParser", "line_number": 17, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 65, "usage_type": "call" }, { "api_name": "os.path", "line_number": 65, "usage_type": "attribute" }, { "api_name": "os.path.split", ...
15615165732
from sys import argv, exit from collections import OrderedDict from functools import reduce import re import httplib2 # Google API from apiclient import discovery from apiclient.errors import HttpError from oauth2client import client, tools from oauth2client.file import Storage # Reddit API import praw import OAuth2U...
JohnnyDeuss/reddit-bots
PenpalsVerification/PenpalsVerification.py
PenpalsVerification.py
py
16,850
python
en
code
5
github-code
36
[ { "api_name": "collections.OrderedDict", "line_number": 61, "usage_type": "call" }, { "api_name": "sys.argv", "line_number": 79, "usage_type": "argument" }, { "api_name": "sys.argv", "line_number": 81, "usage_type": "name" }, { "api_name": "sys.argv", "line_nu...
30019222748
from flask import Flask, render_template, redirect import pymongo from flask_pymongo import PyMongo import scrape_mars #Spin up the Flask App app = Flask(__name__, template_folder='templates') app.config["MONGO_URI"] = "mongodb://localhost:27017/mars_app" mongo = PyMongo(app) #Or set inline #mongo = PyMongo(app, ur...
fabzum/web-scraping-challenge
Missions_to_Mars/app.py
app.py
py
1,218
python
en
code
0
github-code
36
[ { "api_name": "flask.Flask", "line_number": 7, "usage_type": "call" }, { "api_name": "flask_pymongo.PyMongo", "line_number": 11, "usage_type": "call" }, { "api_name": "flask.render_template", "line_number": 36, "usage_type": "call" }, { "api_name": "scrape_mars.sc...
10763879949
import numpy as np from scipy.optimize import minimize import scipy.io def sigmoid(z): return 1.0/(1 + np.e**(-z)) def lrCostFunction(theta,X,y,reg_param): m = len(y) J =((np.sum(-y*np.log(sigmoid(np.dot(X,theta)))- (1-y)*(np.log(1-sigmoid(np.dot(X,theta))))))/m + (reg_param/m)*np.sum(th...
kumudlakara/MRM
multiclass_logistic_regression.py
multiclass_logistic_regression.py
py
2,225
python
en
code
0
github-code
36
[ { "api_name": "numpy.e", "line_number": 8, "usage_type": "attribute" }, { "api_name": "numpy.sum", "line_number": 12, "usage_type": "call" }, { "api_name": "numpy.log", "line_number": 12, "usage_type": "call" }, { "api_name": "numpy.dot", "line_number": 12, ...
16926338982
import dash from dash import dcc from dash import html import dash_daq as daq from dash.dependencies import Input, Output import pandas as pd import numpy as np import plotly.graph_objs as go import plotly.express as px import umap from umap import UMAP import dash_bootstrap_components as dbc # Launch the applic...
EbruAyyorgun/3Dexplore
leukemia_dash_final.py
leukemia_dash_final.py
py
17,987
python
en
code
0
github-code
36
[ { "api_name": "dash.Dash", "line_number": 21, "usage_type": "call" }, { "api_name": "dash_bootstrap_components.themes", "line_number": 21, "usage_type": "attribute" }, { "api_name": "pandas.read_csv", "line_number": 28, "usage_type": "call" }, { "api_name": "panda...
11367854731
import torch from torchvision import datasets, transforms # Define paths for the data data_dir = 'flowers' train_dir = data_dir + '/train' valid_dir = data_dir + '/valid' test_dir = data_dir + '/test' dirs = { 'train': train_dir, 'val': valid_dir, 'test': test_dir } # Define transforms for the training,...
codeballet/image-classifier-flowers
get_data.py
get_data.py
py
1,448
python
en
code
0
github-code
36
[ { "api_name": "torchvision.transforms.Compose", "line_number": 19, "usage_type": "call" }, { "api_name": "torchvision.transforms", "line_number": 19, "usage_type": "name" }, { "api_name": "torchvision.transforms.RandomRotation", "line_number": 20, "usage_type": "call" }...
463033195
from base64 import decodebytes import discord from discord import embeds from discord.ext import commands import random import datetime from requests.models import Response class Events(commands.Cog): def __init__(self, bot): self.bot = bot @commands.Cog.listener() async def on_ready(self): ...
Oreofreakshake/fodifulhu-discord-bot
cogs/events.py
events.py
py
3,572
python
en
code
3
github-code
36
[ { "api_name": "discord.ext.commands.Cog", "line_number": 11, "usage_type": "attribute" }, { "api_name": "discord.ext.commands", "line_number": 11, "usage_type": "name" }, { "api_name": "discord.ext.commands.Cog.listener", "line_number": 15, "usage_type": "call" }, { ...
14359245018
from classifiers.NCC import NCC from classifiers.NBC import NBC from classifiers.GNB import GNB from sklearn.naive_bayes import GaussianNB from sklearn import metrics from sklearn import datasets import MNIST import numpy as np def modify_data(data): modified = [] for d in data: tmp = [] fo...
niklashedstrom/EDAN95
lab5/main.py
main.py
py
3,091
python
en
code
0
github-code
36
[ { "api_name": "numpy.array", "line_number": 25, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 26, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 37, "usage_type": "call" }, { "api_name": "sklearn.datasets.load_digits", ...
28896311683
#!/usr/bin/env python # coding: utf-8 import numpy as np import pandas as pd import pyarrow as pa import pyarrow.parquet as pq import os from os import path import re class WeatherMax(): ''' pass file directory path with forward slashes ''' def __init__(self,directorypath): self.directorypath ...
bigdubya/Data_Engineer_DLG
Main_folder/weathermax.py
weathermax.py
py
3,239
python
en
code
0
github-code
36
[ { "api_name": "os.chdir", "line_number": 26, "usage_type": "call" }, { "api_name": "os.listdir", "line_number": 32, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 35, "usage_type": "call" }, { "api_name": "os.path.abspath", "line_numbe...
2216377889
import cv2 import numpy as np from PIL import Image def main(): capture = cv2.VideoCapture(0) while True: if cv2.waitKey(1) & 0xFF == ord('q'): break ret, frame = capture.read() cv2.imshow('Current', frame) gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY) imag...
jpbel65/Robot-D3-E9-H2019
scripts/QRTest.py
QRTest.py
py
680
python
en
code
0
github-code
36
[ { "api_name": "cv2.VideoCapture", "line_number": 6, "usage_type": "call" }, { "api_name": "cv2.waitKey", "line_number": 9, "usage_type": "call" }, { "api_name": "cv2.imshow", "line_number": 12, "usage_type": "call" }, { "api_name": "cv2.cvtColor", "line_number...
75216111782
import time #import img2txt import os import json from PIL import Image def load_file(fpath): # fpath是具体的文件 ,作用:#str to list assert os.path.exists(fpath) # assert() raise-if-not with open(fpath, 'r') as fid: lines = fid.readlines() records = [json.loads(line.strip('\n')) for line in lines] # str...
JoeLiHai/Mask_Detection_and_Social_Distance
data_preprocess/odgt2txt.py
odgt2txt.py
py
3,721
python
en
code
1
github-code
36
[ { "api_name": "os.path.exists", "line_number": 8, "usage_type": "call" }, { "api_name": "os.path", "line_number": 8, "usage_type": "attribute" }, { "api_name": "json.loads", "line_number": 11, "usage_type": "call" }, { "api_name": "os.getcwd", "line_number": 1...
24955171162
from fastapi import APIRouter from BusinessLayer.PersonaNatural import * from EntityLayer.PersonaNaturalEntity import * from fastapi.encoders import jsonable_encoder from Utilidades.Entidades.ResponseAPI import ResponseAPI, ResponseAPIError PersonaNaturalRouter = APIRouter() ApiName = "PersonaNatural" @PersonaNatura...
josedtl/AlmacenLogistico
Proyecto/server/routes/PersonaNaturalRoute.py
PersonaNaturalRoute.py
py
2,243
python
en
code
0
github-code
36
[ { "api_name": "fastapi.APIRouter", "line_number": 7, "usage_type": "call" }, { "api_name": "fastapi.encoders.jsonable_encoder", "line_number": 15, "usage_type": "call" }, { "api_name": "Utilidades.Entidades.ResponseAPI.ResponseAPI.Response", "line_number": 15, "usage_type...
14049558832
from . import views from django.urls import path urlpatterns = [ path('admin_dashboard', views.admin_dashboard, name="admin_dashboard"), path('admin_packages', views.admin_packages, name="admin_packages"), path('update_package/<package_id>', views.update_package, name="update_package"), path('delete_pa...
aniatki/pro-dad
admin_dashboard/urls.py
urls.py
py
389
python
en
code
0
github-code
36
[ { "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", ...
7570177447
from tkinter import Frame, DoubleVar from tkinter.ttk import Scale from typing import Dict, Tuple, List from ui.misc import NoneTypeCheck from ui.Components import Component class Range(Component): """ Tkinter range value """ def __init__(self, parent: Frame, style: Dict, geometry: Tuple[int] | List...
TwoSails/maze-generator
ui/Components/range.py
range.py
py
987
python
en
code
0
github-code
36
[ { "api_name": "ui.Components.Component", "line_number": 10, "usage_type": "name" }, { "api_name": "tkinter.Frame", "line_number": 14, "usage_type": "name" }, { "api_name": "typing.Dict", "line_number": 14, "usage_type": "name" }, { "api_name": "typing.Tuple", ...
31564159525
#!/usr/bin/env python3 """ 1 Aug 2022 Taeho Choi created for longhorn API python client KUBECONFIG needs to be imported properly before running this script """ import time import longhorn import os import json #Warning msg to user print("#"*40) print("!! WARNING: This script can cause catastrophic conseque...
nogodan/longhorn_python_client
longhorn_client.py
longhorn_client.py
py
7,674
python
en
code
0
github-code
36
[ { "api_name": "time.sleep", "line_number": 20, "usage_type": "call" }, { "api_name": "os.system", "line_number": 23, "usage_type": "call" }, { "api_name": "time.sleep", "line_number": 24, "usage_type": "call" }, { "api_name": "os.system", "line_number": 27, ...
33627483742
from sklearn.model_selection import train_test_split import numpy as np import torch import torch.nn as nn import torch.nn.functional as F import pickle import torch import torch.nn as nn import torch.optim as optim from train_lgbm import * import lightgbm as lgb from torch.utils.data import TensorDataset,D...
tianyao-aka/BotSpot
vectorized_botspot.py
vectorized_botspot.py
py
26,961
python
en
code
0
github-code
36
[ { "api_name": "torch.cuda.is_available", "line_number": 33, "usage_type": "call" }, { "api_name": "torch.cuda", "line_number": 33, "usage_type": "attribute" }, { "api_name": "torch.device", "line_number": 33, "usage_type": "call" }, { "api_name": "sys.argv", "...
36840895879
from __future__ import absolute_import, print_function, unicode_literals import argparse import os import sys import yaml # Get relative imports to work when the package is not installed on the PYTHONPATH. if __name__ == "__main__" and __package__ is None: sys.path.append(os.path.dirname(os.path.dirname(os.path.a...
mongodb/mongo
buildscripts/validate_mongocryptd.py
validate_mongocryptd.py
py
2,966
python
en
code
24,670
github-code
36
[ { "api_name": "sys.path.append", "line_number": 10, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 10, "usage_type": "attribute" }, { "api_name": "os.path.dirname", "line_number": 10, "usage_type": "call" }, { "api_name": "os.path", "line_num...
3206846810
""" Provides an intermediate datastructure close to the PDF, which is used to transform the lines in the pdf into TimeTable objects. """ from __future__ import annotations import logging from operator import attrgetter from pathlib import Path from typing import Callable, TypeAlias from pdf2gtfs.config import Config...
heijul/pdf2gtfs
src/pdf2gtfs/datastructures/pdftable/pdftable.py
pdftable.py
py
11,459
python
en
code
1
github-code
36
[ { "api_name": "logging.getLogger", "line_number": 22, "usage_type": "call" }, { "api_name": "typing.TypeAlias", "line_number": 23, "usage_type": "name" }, { "api_name": "typing.TypeAlias", "line_number": 24, "usage_type": "name" }, { "api_name": "pdf2gtfs.datastru...
71038539943
import torch.nn as nn import torch.nn.functional as F from ...utils import CONFIG from ..encoders.resnet_enc import ResNet_D from ..ops import GuidedCxtAtten, SpectralNorm class ResGuidedCxtAtten(ResNet_D): def __init__(self, block, layers, norm_layer=None, late_downsample=False): super...
XiaohangZhan/deocclusion
demos/GCAMatting/networks/encoders/res_gca_enc.py
res_gca_enc.py
py
3,937
python
en
code
764
github-code
36
[ { "api_name": "encoders.resnet_enc.ResNet_D", "line_number": 9, "usage_type": "name" }, { "api_name": "utils.CONFIG.model", "line_number": 13, "usage_type": "attribute" }, { "api_name": "utils.CONFIG", "line_number": 13, "usage_type": "name" }, { "api_name": "torc...
4002922556
#! /usr/bin/env python3 import json import time import rclpy from rclpy.node import Node from rclpy.executors import MultiThreadedExecutor from robot_navigator import BasicNavigator, TaskResult from geometry_msgs.msg import PoseStamped from std_msgs.msg import Float64MultiArray, Int32, String, Bool, Int32MultiArray ...
maurocs/knitting-amr
Navigation routine/AA_DOCK.py
AA_DOCK.py
py
11,537
python
en
code
2
github-code
36
[ { "api_name": "json.load", "line_number": 41, "usage_type": "call" }, { "api_name": "rclpy.node.Node", "line_number": 51, "usage_type": "name" }, { "api_name": "std_msgs.msg.Int32", "line_number": 59, "usage_type": "argument" }, { "api_name": "std_msgs.msg.Int32Mu...
17443182071
#!/usr/bin/env python """ A thermometer display stimulus. This module contains a class implementing a thermometer display stimulus. """ from __future__ import absolute_import, print_function, division from builtins import * __author__ = 'Florian Krause <florian@expyriment.org>' __version__ = '' __revision__ = '' _...
expyriment/expyriment-stash
extras/expyriment_stimuli_extras/thermometerdisplay/_thermometerdisplay.py
_thermometerdisplay.py
py
10,984
python
en
code
20
github-code
36
[ { "api_name": "expyriment.stimuli._visual.Visual", "line_number": 25, "usage_type": "name" }, { "api_name": "expyriment.stimuli._visual.Visual.__init__", "line_number": 79, "usage_type": "call" }, { "api_name": "expyriment.stimuli._visual.Visual", "line_number": 79, "usag...
42998098746
from __future__ import annotations from typing import TYPE_CHECKING, Any from ..network import ID_TOKEN_AUTHENTICATOR from .by_plugin import AuthByPlugin, AuthType from .webbrowser import AuthByWebBrowser if TYPE_CHECKING: from ..connection import SnowflakeConnection class AuthByIdToken(AuthByPlugin): """I...
snowflakedb/snowflake-connector-python
src/snowflake/connector/auth/idtoken.py
idtoken.py
py
2,028
python
en
code
511
github-code
36
[ { "api_name": "typing.TYPE_CHECKING", "line_number": 9, "usage_type": "name" }, { "api_name": "by_plugin.AuthByPlugin", "line_number": 13, "usage_type": "name" }, { "api_name": "by_plugin.AuthType.ID_TOKEN", "line_number": 21, "usage_type": "attribute" }, { "api_n...
70874373865
from __future__ import annotations from contextlib import contextmanager from datetime import datetime from decimal import Decimal from typing import ContextManager, List, Text from uuid import UUID, uuid4 import sqlalchemy as sa import sqlalchemy_utils as sa_utils from injector import inject from sqlalchemy import f...
lzukowski/workflow
src/ordering/db/buy_order.py
buy_order.py
py
4,190
python
en
code
5
github-code
36
[ { "api_name": "application.db.Base", "line_number": 24, "usage_type": "name" }, { "api_name": "interface.BuyOrder", "line_number": 24, "usage_type": "name" }, { "api_name": "uuid.UUID", "line_number": 27, "usage_type": "name" }, { "api_name": "decimal.Decimal", ...
19090796379
from __future__ import annotations # postpone evaluation of annotations import pandas as pd from itertools import combinations, product, permutations, repeat, chain import numpy as np import math from sklearn.metrics import auc import pickle import gzip from scipy.special import stdtr from scipy.stats import pearsonr ...
QuantitativeBiology/MiguelThesisPrecisionMed
src/resources/classes.py
classes.py
py
135,744
python
en
code
0
github-code
36
[ { "api_name": "sys.getsizeof", "line_number": 48, "usage_type": "call" }, { "api_name": "sys.path.append", "line_number": 63, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 63, "usage_type": "attribute" }, { "api_name": "gzip.open", "line_num...
18672719269
import json import logging from selenium.webdriver.common.by import By from selenium.webdriver.chrome.webdriver import WebDriver from selenium.webdriver.chrome.options import Options from selenium import webdriver from selenium.webdriver.remote.webelement import WebElement from selenium.webdriver.support.ui import WebD...
rnjacky777/automation_framework
core_framework/core_framework.py
core_framework.py
py
1,742
python
en
code
0
github-code
36
[ { "api_name": "configparser.ConfigParser", "line_number": 14, "usage_type": "call" }, { "api_name": "selenium.webdriver.chrome.options.Options", "line_number": 17, "usage_type": "call" }, { "api_name": "selenium.webdriver.Chrome", "line_number": 19, "usage_type": "call" ...
16521824851
###read training peptide input import sys, os, re from collections import OrderedDict def readtrainfile(length, trainfile_peptide): if os.path.exists(trainfile_peptide) == False: print('Error: "' + trainfile_peptide + '" does not exist.') sys.exit(1) upscaleAA = ['A', 'R', 'N', 'D', '...
17shutao/Anthem
bin/sware_j_newreadfiletrain.py
sware_j_newreadfiletrain.py
py
3,542
python
en
code
7
github-code
36
[ { "api_name": "os.path.exists", "line_number": 6, "usage_type": "call" }, { "api_name": "os.path", "line_number": 6, "usage_type": "attribute" }, { "api_name": "sys.exit", "line_number": 8, "usage_type": "call" }, { "api_name": "sys.exit", "line_number": 23, ...
38633646472
#imports import numpy as np import pandas as pd import matplotlib.pyplot as plt from main import number_of_pendulums class Plotting(): def __init__(self, pendulum_number, pendulum_list, dataframe, y): self.pendulum_number = pendulum_number self.pendulum_list = pendulum_list self.da...
EdwardTAllen/Damped-pendulum
plotting_methods.py
plotting_methods.py
py
1,213
python
en
code
0
github-code
36
[ { "api_name": "matplotlib.pyplot.plot", "line_number": 22, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 22, "usage_type": "name" }, { "api_name": "matplotlib.pyplot.plot", "line_number": 26, "usage_type": "call" }, { "api_name": "matpl...
34219146493
from __future__ import absolute_import, unicode_literals, division, print_function """Scrape contacts from a Google email account. Usage: - First, you need an OAuth2 access token. Run e.g. $ python2 oauth.py --client_id="..." --client_secret="..." --user=jdoe@example.com --generate_oauth2_token - Open the URL in a ...
kelleyk/imap-scripts
imap_scripts/get_correspondents.py
get_correspondents.py
py
6,133
python
en
code
0
github-code
36
[ { "api_name": "sys.version_info", "line_number": 37, "usage_type": "attribute" }, { "api_name": "imaplib.IMAP4_SSL", "line_number": 60, "usage_type": "call" }, { "api_name": "email.message_from_bytes", "line_number": 100, "usage_type": "call" }, { "api_name": "arg...
72717961063
#!/usr/bin/env python3 """ Experiment with different parameters the CNN training and collect accuracy Quick and dirty adaptation from train.py. Search `TUNING` in this code for hard coded parameters to try. [Code left as is, not cleaned, to explicit what I've tried...] """ import os import pickle import argpars...
jmg-74/exam
flowers/stats.py
stats.py
py
5,713
python
en
code
1
github-code
36
[ { "api_name": "argparse.ArgumentParser", "line_number": 29, "usage_type": "call" }, { "api_name": "torch.nn.NLLLoss", "line_number": 57, "usage_type": "call" }, { "api_name": "torch.nn", "line_number": 57, "usage_type": "name" }, { "api_name": "datetime.datetime.t...
9587814547
import os import subprocess from plugin import LINUX, WINDOWS, plugin, require VALID_OPTIONS = ['status', 'vendor', 'energy', 'technology', 'remaining'] @require(platform=WINDOWS) @plugin('battery') def battery_WIN32(jarvis, s): """ Provides basic info about battery for win32 """ # https://stackover...
sukeesh/Jarvis
jarviscli/plugins/battery.py
battery.py
py
3,633
python
en
code
2,765
github-code
36
[ { "api_name": "psutil.sensors_battery", "line_number": 23, "usage_type": "call" }, { "api_name": "plugin.require", "line_number": 9, "usage_type": "call" }, { "api_name": "plugin.WINDOWS", "line_number": 9, "usage_type": "name" }, { "api_name": "plugin.plugin", ...
25985906594
import stanza import json from tqdm import tqdm import os def save_as_json(objects, fname): with open('data/'+fname, 'w') as output: json.dump(objects, output, indent=4) nlp = stanza.Pipeline(lang='en', processors='tokenize,mwt,pos,lemma', logging_level='DEBUG') fiction_list = [_ for _ in os.listdir("inpu...
scarletcho/coca-fiction-search
sentence-tokenize.py
sentence-tokenize.py
py
793
python
en
code
0
github-code
36
[ { "api_name": "json.dump", "line_number": 8, "usage_type": "call" }, { "api_name": "stanza.Pipeline", "line_number": 10, "usage_type": "call" }, { "api_name": "os.listdir", "line_number": 11, "usage_type": "call" }, { "api_name": "tqdm.tqdm", "line_number": 13...
27232603168
import curses from ..config import CORRECT_LETTER_COLOR_PAIR_INDEX, EXISTS_LETTER_COLOR_PAIR_INDEX, INCORRECT_LETTER_COLOR_PAIR_INDEX, NORMAL_LETTER_COLOR_PAIR_INDEX, TILE_SIZE from .screen import apply_color_pair, remove_color_pair def generate_game_element(letter, correct=False, exists_in_answer=False, incorrect=F...
Samoray-l337/terminal-wordle
src/utils/game.py
game.py
py
3,334
python
en
code
1
github-code
36
[ { "api_name": "config.TILE_SIZE", "line_number": 12, "usage_type": "argument" }, { "api_name": "screen.apply_color_pair", "line_number": 51, "usage_type": "call" }, { "api_name": "config.CORRECT_LETTER_COLOR_PAIR_INDEX", "line_number": 51, "usage_type": "argument" }, ...
73478586985
from pprint import pformat from six import iteritems class PITimedValues(object): swagger_types = { 'items': 'list[PITimedValue]', 'units_abbreviation': 'str', 'web_exception': 'PIWebException', } attribute_map = { 'items': 'Items', 'units_abbreviation': 'UnitsAbbreviation', 'web_exception': 'WebExcep...
dcbark01/PI-Web-API-Client-Python
osisoft/pidevclub/piwebapi/models/pi_timed_values.py
pi_timed_values.py
py
2,018
python
en
code
39
github-code
36
[ { "api_name": "six.iteritems", "line_number": 56, "usage_type": "call" }, { "api_name": "pprint.pformat", "line_number": 76, "usage_type": "call" } ]
34321829332
#-*- coding: utf-8 -*- from django.db import models from django.db.models import Max from .category import Category class Product(models.Model): category = models.ForeignKey(Category, related_name="products", null=True, blank=True, on_delete=models.SET_NULL) name = models.CharField(db_index=True, max_leng...
anttiranta/sirkkapelkonen.net-python
app/www/models/www/product.py
product.py
py
1,737
python
en
code
0
github-code
36
[ { "api_name": "django.db.models.Model", "line_number": 6, "usage_type": "attribute" }, { "api_name": "django.db.models", "line_number": 6, "usage_type": "name" }, { "api_name": "django.db.models.ForeignKey", "line_number": 8, "usage_type": "call" }, { "api_name": ...
27550324610
import datetime from imap_tools import EmailAddress DATA = dict( subject='Re: TESTテストテスト', from_='atsushi@example.com', to=('rudeboyjet@gmail.com',), cc=(), bcc=(), reply_to=('rudeboyjet@gmail.com',), date=datetime.datetime(2011, 8, 19, 10, 47, 17, tzinfo=datetime.timezone(datetime.timedelt...
ikvk/imap_tools
tests/messages_data/rfc2822/example14.py
example14.py
py
1,236
python
en
code
608
github-code
36
[ { "api_name": "datetime.datetime", "line_number": 11, "usage_type": "call" }, { "api_name": "datetime.timezone", "line_number": 11, "usage_type": "call" }, { "api_name": "datetime.timedelta", "line_number": 11, "usage_type": "call" }, { "api_name": "imap_tools.Ema...
37662338422
import os import setuptools requirement_files = [] # walk the requirements directory and gather requirement files for root, dirs, files in os.walk('requirements'): for requirements_file in files: requirements_file_path = os.path.join(root, requirements_file) requirement_files.append(requirements_...
rackerlabs/poppy
setup.py
setup.py
py
874
python
en
code
null
github-code
36
[ { "api_name": "os.walk", "line_number": 8, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 10, "usage_type": "call" }, { "api_name": "os.path", "line_number": 10, "usage_type": "attribute" }, { "api_name": "setuptools.setup", "line_number"...
70376883625
import requests from random import randrange from randomWalk import dateIncrease from olivier import find_arrival def chooseDestination_new (depart , budget , date , dayspercity=2 , country = 'CH' , currency = 'CHF', locale = 'en-GB' , destination = 'anywhere' ) : url = 'http://partners.api.skyscanner.net/apiservi...
ttreyer/Skyscanner-CONpagnons
newgetters.py
newgetters.py
py
4,427
python
en
code
0
github-code
36
[ { "api_name": "requests.get", "line_number": 9, "usage_type": "call" }, { "api_name": "random.randrange", "line_number": 22, "usage_type": "call" }, { "api_name": "randomWalk.dateIncrease", "line_number": 59, "usage_type": "call" }, { "api_name": "randomWalk.dateI...
37432459091
import pygame as pg import sys from settings import * from player import * from world_object_manager import * from ray import * from ray_manager import * from object_renderer import * class Game: def __init__(self): pg.init() pg.mouse.set_visible(False) self.screen = pg.disp...
makaempffer/game_2d_DOS
Dawn_Of_The_system/src/main.py
main.py
py
1,826
python
en
code
0
github-code
36
[ { "api_name": "pygame.init", "line_number": 12, "usage_type": "call" }, { "api_name": "pygame.mouse.set_visible", "line_number": 13, "usage_type": "call" }, { "api_name": "pygame.mouse", "line_number": 13, "usage_type": "attribute" }, { "api_name": "pygame.display...
23958671415
from pytorch_lightning import LightningDataModule from pytorch_lightning.utilities.types import EVAL_DATALOADERS, TRAIN_DATALOADERS from torch.utils.data import DataLoader, Dataset class BasicDataModule(LightningDataModule): def __init__( self, train_dataset: Dataset, val_dataset: Dataset,...
adamcasson/minT5
mint5/datamodule.py
datamodule.py
py
1,165
python
en
code
0
github-code
36
[ { "api_name": "pytorch_lightning.LightningDataModule", "line_number": 6, "usage_type": "name" }, { "api_name": "torch.utils.data.Dataset", "line_number": 9, "usage_type": "name" }, { "api_name": "torch.utils.data.Dataset", "line_number": 10, "usage_type": "name" }, { ...
33197438917
from __future__ import print_function import sys import time from optparse import OptionParser import ezdxf __version__ = "0.1" class Stitcher(object): def __init__(self, input_name, output_name): self.old = ezdxf.readfile(input_name) self.new = ezdxf.new() self.output_name = output_nam...
thatch/dxf_fix
dxf_fix/__init__.py
__init__.py
py
7,096
python
en
code
1
github-code
36
[ { "api_name": "ezdxf.readfile", "line_number": 14, "usage_type": "call" }, { "api_name": "ezdxf.new", "line_number": 15, "usage_type": "call" }, { "api_name": "time.time", "line_number": 35, "usage_type": "call" }, { "api_name": "time.time", "line_number": 46,...
36771356783
# -*- coding: utf-8 -*- """Training KGE models based on the sLCWA.""" import logging from typing import Any, Mapping, Optional, Type import torch from torch.optim.optimizer import Optimizer from pykeen.training.training_loop import TrainingLoop from pykeen.training.utils import apply_label_smoothing from pykeen.los...
migalkin/NodePiece
inductive_lp/loops/inductive_slcwa.py
inductive_slcwa.py
py
6,454
python
en
code
131
github-code
36
[ { "api_name": "logging.getLogger", "line_number": 24, "usage_type": "call" }, { "api_name": "pykeen.training.training_loop.TrainingLoop", "line_number": 27, "usage_type": "name" }, { "api_name": "pykeen.sampling.NegativeSampler", "line_number": 30, "usage_type": "name" ...
36082506802
""" Gradient Penalty implementation for WGAN-GP """ import torch import torch.nn # Define the gradient penalty for Wasserstein GAN # Implementation as is in paper def gradient_penalty(critic, real, fake, device): BATCH_SIZE, C, H, W = real.shape epsilon = torch.rand((BATCH_SIZE, 1, 1, 1)).repeat(1, C, H, W)...
EoinM96/pokeGAN
utils.py
utils.py
py
885
python
en
code
1
github-code
36
[ { "api_name": "torch.rand", "line_number": 14, "usage_type": "call" }, { "api_name": "torch.autograd.grad", "line_number": 20, "usage_type": "call" }, { "api_name": "torch.autograd", "line_number": 20, "usage_type": "attribute" }, { "api_name": "torch.ones_like", ...
70996234665
import json from datetime import datetime, timezone from django.contrib import messages from django.contrib.auth.decorators import login_required from django.contrib.auth.mixins import AccessMixin from django.db.models import Count, Q, F from django.http import HttpResponse, HttpResponseRedirect from django.shortcuts ...
fnabiyevuz/crm
board/views.py
views.py
py
32,513
python
en
code
0
github-code
36
[ { "api_name": "django.http.HttpResponse", "line_number": 28, "usage_type": "call" }, { "api_name": "xlwt.Workbook", "line_number": 29, "usage_type": "call" }, { "api_name": "xlwt.XFStyle", "line_number": 31, "usage_type": "call" }, { "api_name": "xlwt.Font", "...
2022759755
import logging as log import math from itertools import islice import torch from nltocode.dataset import EdgePathTransform from nltocode.grammar.grammargraphvisitor import GrammarGraphVisitor class BeamSearch(): def __init__(self, model, grammargraph, codegener...
SmartDataAnalytics/codeCAI
nl2codemodel/src/nltocode/beamsearch.py
beamsearch.py
py
13,758
python
en
code
4
github-code
36
[ { "api_name": "nltocode.grammar.grammargraphvisitor.GrammarGraphVisitor", "line_number": 40, "usage_type": "call" }, { "api_name": "nltocode.dataset.EdgePathTransform", "line_number": 46, "usage_type": "call" }, { "api_name": "logging.info", "line_number": 62, "usage_type...
13650180009
''' openweathermap.org api_key = f54b13c3c6ecf6d1d51c6be402b095dc https://api.openweathermap.org/data/2.5/weather?lat={lat}&lon={lon}&appid={API key} ''' import requests APP_ID = "f54b13c3c6ecf6d1d51c6be402b095dc" # response = requests.get('https://google.com') # print(response) def getWeatherData(lat, lon): ...
moduchobo/mj_metrooo
MyApp/realtimeWeather 2.py
realtimeWeather 2.py
py
592
python
en
code
0
github-code
36
[ { "api_name": "requests.get", "line_number": 20, "usage_type": "call" } ]
33981754058
# # https://www.youtube.com/watch?v=bD05uGo_sVI&list=PL-osiE80TeTt2d9bfVyTiXJA-UTHn6WwU&index=36 # ''' # Generators - How to use them and the benefits you receive # Generator will not hold any value while printing hence it is good for performance - it is just holding current value from the loop # ''' import memory_pro...
techtolearn/Learning
Cory_Basic/Prg36_generatroPerfomance.py
Prg36_generatroPerfomance.py
py
1,634
python
en
code
0
github-code
36
[ { "api_name": "memory_profiler.memory_usage", "line_number": 14, "usage_type": "call" }, { "api_name": "random.choice", "line_number": 21, "usage_type": "call" }, { "api_name": "random.choice", "line_number": 22, "usage_type": "call" }, { "api_name": "random.choic...
44008043108
import pygame # import twitter from pygame.locals import * from io import BytesIO import urllib.request as ur pygame.init() alotfiles = "D:\\Users\\Charles Turvey\\Pictures\\Art\\Alots\\" alotpath = alotfiles + "Blank.png" alot = pygame.image.load_extended(alotpath) w = alot.get_width() h = alot.get_height() lft =...
ninjafrostpn/PythonProjects
Alotter.py
Alotter.py
py
3,066
python
en
code
0
github-code
36
[ { "api_name": "pygame.init", "line_number": 7, "usage_type": "call" }, { "api_name": "pygame.image.load_extended", "line_number": 12, "usage_type": "call" }, { "api_name": "pygame.image", "line_number": 12, "usage_type": "attribute" }, { "api_name": "pygame.surfar...
19876279061
import sys import os from setuptools import setup, find_packages, Extension # Import setupext ONLY if you want custom triggers # If you only use prep_cmd, you only need to include setupext in the package # import setupext os.chdir(os.path.dirname(sys.argv[0]) or ".") ''' =============================================...
sundarnagarajan/setupext
setup.py
setup.py
py
4,594
python
en
code
1
github-code
36
[ { "api_name": "os.chdir", "line_number": 9, "usage_type": "call" }, { "api_name": "os.path.dirname", "line_number": 9, "usage_type": "call" }, { "api_name": "os.path", "line_number": 9, "usage_type": "attribute" }, { "api_name": "sys.argv", "line_number": 9, ...
24338300355
""" distributions Provides likelihood functions for distributions and a method to assign the most likely distribution to observed numeric data. discreteData used to determine whether data is discrete or not. """ import numpy as np from scipy import special as sp from scipy import stats import sys def discreteDat...
stevec12/Stat-Tools
StatsTools/distributions.py
distributions.py
py
4,438
python
en
code
0
github-code
36
[ { "api_name": "numpy.array", "line_number": 16, "usage_type": "attribute" }, { "api_name": "numpy.min", "line_number": 26, "usage_type": "call" }, { "api_name": "numpy.unique", "line_number": 28, "usage_type": "call" }, { "api_name": "numpy.argmin", "line_numb...
34398023581
import shutil import torch from dataset import * from utils import * from settings_benchmark import * from dataset import writer from torch.utils.tensorboard import SummaryWriter all_dataset = prepareDatasets() print(f"Models: {[name for name in models]}") print(f"Datasets: {[name for name in all_dataset]}") # 自检:...
nhjydywd/OCTA-FRNet
run_benchmark.py
run_benchmark.py
py
6,001
python
en
code
5
github-code
36
[ { "api_name": "torch.cuda.device_count", "line_number": 29, "usage_type": "call" }, { "api_name": "torch.cuda", "line_number": 29, "usage_type": "attribute" }, { "api_name": "torch.device", "line_number": 39, "usage_type": "call" }, { "api_name": "torch.cuda.is_av...
41019512289
import re from django.views.generic.base import TemplateView from natsort import humansorted from ..conf import settings from ..utils import get_branches from ..utils import get_tags regex_hotfix = re.compile(settings.RELEASE_DASHBOARD_FILTER_MRXXX) regex_mr = re.compile(r"^mr.+$") def _projects_versions( proj...
sipwise/repoapi
release_dashboard/views/__init__.py
__init__.py
py
1,627
python
en
code
2
github-code
36
[ { "api_name": "re.compile", "line_number": 10, "usage_type": "call" }, { "api_name": "conf.settings.RELEASE_DASHBOARD_FILTER_MRXXX", "line_number": 10, "usage_type": "attribute" }, { "api_name": "conf.settings", "line_number": 10, "usage_type": "name" }, { "api_na...
30478020917
from collections import OrderedDict, namedtuple from decimal import Decimal from string import ascii_uppercase def tabular(table, widths): def sandwich(delim, contents): return delim + delim.join(contents) + delim def cell(value, width): return ' ' + str(value).ljust(width - 2) def...
hzhamed/Fast-Food-Menu-Calculator
Menu.py
Menu.py
py
1,687
python
en
code
0
github-code
36
[ { "api_name": "collections.namedtuple", "line_number": 16, "usage_type": "call" }, { "api_name": "decimal.Decimal", "line_number": 18, "usage_type": "call" }, { "api_name": "collections.OrderedDict", "line_number": 21, "usage_type": "call" }, { "api_name": "string...
39003004891
# Q.4 Write a python code to find the data distributions using box plot for Income.csv file # Code import matplotlib.pyplot as plt import pandas as pd import seaborn as sns dataframe = pd.read_csv("csv_data/income.csv") print(dataframe.head()) print(dataframe.isnull().values.any()) age = dataframe["age"] JobType = da...
ShubhamNagure/Assignments
AI_ML_KR/Assignment#2/question4.py
question4.py
py
795
python
en
code
0
github-code
36
[ { "api_name": "pandas.read_csv", "line_number": 7, "usage_type": "call" }, { "api_name": "seaborn.boxplot", "line_number": 16, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.show", "line_number": 17, "usage_type": "call" }, { "api_name": "matplotlib.pypl...
40612286632
from picamera import PiCamera from picamera.array import PiRGBArray import cv2 import time camera=PiCamera() camera.resolution=(800,600) camera.framerate=32 rawCaptures = PiRGBArray(camera,size=(800,600)) time.sleep(0.2) for rawCapture in camera.capture_continuous(rawCaptures,format="bgr",use_video_port=True): i...
sacrrie/people_finding
video-recording/record_by_frame_rgb.py
record_by_frame_rgb.py
py
486
python
en
code
0
github-code
36
[ { "api_name": "picamera.PiCamera", "line_number": 6, "usage_type": "call" }, { "api_name": "picamera.array.PiRGBArray", "line_number": 9, "usage_type": "call" }, { "api_name": "time.sleep", "line_number": 11, "usage_type": "call" }, { "api_name": "cv2.imshow", ...
23111160181
from rest_framework.exceptions import APIException from django.db.models import Q from stock_maintain.models import PriceList, QuarterlyFinancial, DividendInformation from stock_setup_info.models import Stock, StockManagement def get_stock_by_code(query_params): """ Get stock by the stock code provided""" t...
Maxcutex/stockman_project
stock_setup_info/services.py
services.py
py
7,473
python
en
code
2
github-code
36
[ { "api_name": "rest_framework.exceptions.APIException", "line_number": 14, "usage_type": "call" }, { "api_name": "stock_setup_info.models.Stock.objects.filter", "line_number": 15, "usage_type": "call" }, { "api_name": "stock_setup_info.models.Stock.objects", "line_number": 15...
10019831327
import csv from django.http import HttpResponse from django.shortcuts import render from .models import account from .models import deposite from .models import withdraw # Create your views here. def showindex(request): return render(request,"Home.html") def head(request): return render(request,"Head.html") ...
prasadnaidu1/django
bankinfo/prasad/views.py
views.py
py
3,584
python
en
code
0
github-code
36
[ { "api_name": "django.shortcuts.render", "line_number": 11, "usage_type": "call" }, { "api_name": "django.shortcuts.render", "line_number": 14, "usage_type": "call" }, { "api_name": "django.shortcuts.render", "line_number": 17, "usage_type": "call" }, { "api_name"...
29515253943
import base64 from plugins.googleapi.Google import Create_Service from email.mime.text import MIMEText from sql_data.schemas import Mail def create_mail_service(user_id): CLIENT_SECRET_FILE = 'plugins/googleapi/Credentials/keys.json' API_SERVICE_NAME = 'gmail' API_VERSION = 'v1' SCOPES = ['https://ww...
r0king/EventOn-api
plugins/gmail/mail.py
mail.py
py
2,985
python
en
code
1
github-code
36
[ { "api_name": "plugins.googleapi.Google.Create_Service", "line_number": 13, "usage_type": "call" }, { "api_name": "email.mime.text.MIMEText", "line_number": 17, "usage_type": "call" }, { "api_name": "base64.urlsafe_b64encode", "line_number": 21, "usage_type": "call" } ]
1107559956
import os import subprocess from docutils import nodes from docutils.parsers.rst import Directive from tutorials import tutorials import sphinx_material class Tutorials(Directive): def run(self): output = list() # General text intro = f""" <p> <b>viskex</b> is accompanied by a few tutorial...
viskex/viskex.github.io
_ext/ext.py
ext.py
py
8,064
python
en
code
0
github-code
36
[ { "api_name": "docutils.parsers.rst.Directive", "line_number": 8, "usage_type": "name" }, { "api_name": "docutils.nodes.raw", "line_number": 18, "usage_type": "call" }, { "api_name": "docutils.nodes", "line_number": 18, "usage_type": "name" }, { "api_name": "tutor...
718879097
from crossref.restful import Works import requests import re class CrossRef: def __init__(self): self.works = Works() self.metadata = None def get_doi_metadata(self, doi: str) -> dict: try: self.metadata = self.works.doi(doi=doi) return self.metadata ...
jamino30/dandiset-metadata-filler
clients/crossref.py
crossref.py
py
2,780
python
en
code
0
github-code
36
[ { "api_name": "crossref.restful.Works", "line_number": 9, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 28, "usage_type": "call" }, { "api_name": "re.sub", "line_number": 44, "usage_type": "call" } ]
14619387009
#画像処理_SURF #参考文献 #https://python-debut.blogspot.com/2020/02/blog-post_24.html #https://stackoverflow.com/questions/52305578/sift-cv2-xfeatures2d-sift-create-not-working-even-though-have-contrib-instal #opencvのバージョンを下げた import numpy as np import cv2 img = cv2.imread('dog.jpg') #特徴抽出するための箱を作る. surf = cv2.xfeatures2d.S...
mitanihayato/shinjinkadai
4_surf.py
4_surf.py
py
814
python
ja
code
0
github-code
36
[ { "api_name": "cv2.imread", "line_number": 10, "usage_type": "call" }, { "api_name": "cv2.xfeatures2d.SURF_create", "line_number": 13, "usage_type": "call" }, { "api_name": "cv2.xfeatures2d", "line_number": 13, "usage_type": "attribute" }, { "api_name": "cv2.drawK...
45138590856
import sys import argparse class BaseOptions(): def __init__(self): self.initialized = False def initialize(self, parser): # original arguments parser.add_argument("--epoch", type=int, default=0, help="epoch to start training from") parser.add_argument("--n_...
HBX-hbx/CGAN_jittor_landscape
options/base_options.py
base_options.py
py
4,573
python
en
code
0
github-code
36
[ { "api_name": "argparse.ArgumentParser", "line_number": 61, "usage_type": "call" } ]
2689293408
#========================================================================================#======================================================================================== # LIBRARIES #======================================================================================== import BH_Physics as BHP from fitool ...
sbustamante/Spinstractor
Subhalo_Color_Mass_Matcher.py
Subhalo_Color_Mass_Matcher.py
py
4,486
python
en
code
0
github-code
36
[ { "api_name": "matplotlib.rcParams", "line_number": 19, "usage_type": "attribute" }, { "api_name": "matplotlib.rcParams", "line_number": 20, "usage_type": "attribute" }, { "api_name": "matplotlib.pyplot.close", "line_number": 21, "usage_type": "call" }, { "api_nam...
71793784103
# -*- coding: utf-8 -*- """ API /api_part/formula_search - search API /api_part/contexts/<formula_id> - contexts for one formula (with span) """ from flask import Flask from flask_restful import Api from flask_cors import CORS from api_part.models import db from api_part.api import FormulaSearch, FormulaContexts app...
dkbrz/ice_site
api_part/app.py
app.py
py
854
python
en
code
0
github-code
36
[ { "api_name": "flask.Flask", "line_number": 15, "usage_type": "call" }, { "api_name": "flask_cors.CORS", "line_number": 17, "usage_type": "call" }, { "api_name": "api_part.models.db.app", "line_number": 22, "usage_type": "attribute" }, { "api_name": "api_part.mode...
41907938518
import os os.environ from PIL import Image from torchvision import transforms, models import torch import torch.nn as nn model = models.resnet50(pretrained=True) num_features = model.fc.in_features model.fc = nn.Linear(num_features, 8) model_path = './age_prediction_model/age_best_model.pth' model.load_state_dict(...
CSID-DGU/2022-2-SCS4031-EZ_SW
age_prediction_model/age_pred.py
age_pred.py
py
967
python
en
code
0
github-code
36
[ { "api_name": "os.environ", "line_number": 2, "usage_type": "attribute" }, { "api_name": "torchvision.models.resnet50", "line_number": 10, "usage_type": "call" }, { "api_name": "torchvision.models", "line_number": 10, "usage_type": "name" }, { "api_name": "torch.n...
14899572028
import pandas as pd import altair as alt import joblib RECT_SIZE = 13 source = pd.read_json(snakemake.input[0]) df_sb = source.loc[source.Encoding == "zscale", :].copy(deep=True) df_sb.Encoding = "zzz" df_sb.F1 = "separator" dfs, names_imbalanced = [], [] for bf in sorted(source["bio_field"].unique()): df_tmp ...
spaenigs/peptidereactor
nodes/vis/mds_1_Overview/scripts/hm_bio.py
hm_bio.py
py
2,481
python
en
code
7
github-code
36
[ { "api_name": "pandas.read_json", "line_number": 8, "usage_type": "call" }, { "api_name": "pandas.concat", "line_number": 20, "usage_type": "call" }, { "api_name": "pandas.concat", "line_number": 24, "usage_type": "call" }, { "api_name": "altair.Axis", "line_n...
42034957629
import sys import logging import gi gi.require_version('Gst', '1.0') from gi.repository import GObject, Gst, GLib Gst.init(None) class Pipeline: def __init__(self, export_dot, mainloop): self.mainloop = mainloop self.logger = logging.getLogger(__name__) self.pipeline = Gst.Pipeline("pipeli...
gscigala/packet-generation
fpm/test_sample/pipeline.py
pipeline.py
py
3,441
python
en
code
0
github-code
36
[ { "api_name": "gi.require_version", "line_number": 4, "usage_type": "call" }, { "api_name": "gi.repository.Gst.init", "line_number": 7, "usage_type": "call" }, { "api_name": "gi.repository.Gst", "line_number": 7, "usage_type": "name" }, { "api_name": "logging.getL...
1597831218
import numpy as np import astropy.units as u from astropy.time import Time from astropy.table import QTable import sys if '/home/serafinnadeau/Python/packages/scintillometry/' not in sys.path: sys.path.append('/home/serafinnadeau/Python/packages/scintillometry/') from numpy.lib.format import open_memmap import os...
Seraf-N/SinglePulseTasks
single_pulse_task/StreamSearch_utils.py
StreamSearch_utils.py
py
10,765
python
en
code
2
github-code
36
[ { "api_name": "sys.path", "line_number": 7, "usage_type": "attribute" }, { "api_name": "sys.path.append", "line_number": 8, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 8, "usage_type": "attribute" }, { "api_name": "utils.DispersionMeasure", ...