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
34088379674
# apt install python3-scapy python3-xmltodict # python3 burp2pcap.py TARGET_XML_FILE from scapy.all import Ether, IP, TCP, PcapWriter from scapy.layers.http import HTTP import argparse import base64 import json import sys import xmltodict XML_KEY_ITEMS = "items" XML_KEY_ITEM = "item" XML_KEY_RAW_VALUE = "#text" XML...
turekt/burp2pcap
burp2pcap.py
burp2pcap.py
py
1,878
python
en
code
0
github-code
18
[ { "api_name": "xmltodict.parse", "line_number": 32, "usage_type": "call" }, { "api_name": "base64.b64decode", "line_number": 38, "usage_type": "call" }, { "api_name": "scapy.all.Ether", "line_number": 40, "usage_type": "call" }, { "api_name": "scapy.layers.http.HT...
38771723639
from itertools import permutations def solution(numbers): arr = [] for i in range(len(numbers)): for j in permutations(numbers, i + 1): arr.append(int(''.join(j))) dic = {} for i in arr: dic[i] = 1 arr = list(dic.keys()) prime = [True] * (max(arr) + 1) prime[0], ...
physicallaw/Programmers-Algorithm
완전탐색/42839/42839.py
42839.py
py
549
python
en
code
0
github-code
18
[ { "api_name": "itertools.permutations", "line_number": 6, "usage_type": "call" } ]
31610080151
import execnet import os import numpy as np # Import global options. from ..conf import cupy # Import utility functions for cubitpy. from .cubit_wrapper_utility import cubit_item_to_id, is_base_type class CubitConnect(object): """ This class holds a connection to a python2 interpreter and initializes cu...
imcs-compsim/cubitpy
cubitpy/cubit_wrapper/cubit_wrapper3.py
cubit_wrapper3.py
py
11,523
python
en
code
0
github-code
18
[ { "api_name": "execnet.makegateway", "line_number": 43, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 47, "usage_type": "call" }, { "api_name": "os.path", "line_number": 47, "usage_type": "attribute" }, { "api_name": "os.path.dirname", "...
6923422911
from wx.providers.trade import daily_mtm as mtm from wx.providers.common import Common_Functions as CF from flask_script import Command, Option import datetime from datetime import date, datetime, timedelta class MTM_OTC_Command(Command): """ This is the command line interface for saving RT LBMP data from ...
swsethuraman/wx-py
wx/batch/MTM_OTC_EOD.py
MTM_OTC_EOD.py
py
1,145
python
en
code
0
github-code
18
[ { "api_name": "flask_script.Command", "line_number": 7, "usage_type": "name" }, { "api_name": "flask_script.Option", "line_number": 13, "usage_type": "call" }, { "api_name": "flask_script.Option", "line_number": 16, "usage_type": "call" }, { "api_name": "datetime....
41263075118
import os import datetime import sys testLabel = 'test_' pyExtensionLabel = '.py' runnerPath = scriptDir = os.path.dirname(os.path.abspath(__file__)) scriptsPath = os.path.join(runnerPath, "unityScripts") testScriptsPath = [] for root, dirs, files in os.walk(scriptsPath): for file in files: if file.start...
IFB-Company/UnityAutomationToolsPython
testRunner.py
testRunner.py
py
1,037
python
en
code
0
github-code
18
[ { "api_name": "os.path.dirname", "line_number": 7, "usage_type": "call" }, { "api_name": "os.path", "line_number": 7, "usage_type": "attribute" }, { "api_name": "os.path.abspath", "line_number": 7, "usage_type": "call" }, { "api_name": "os.path.join", "line_nu...
34267681618
#! /usr/bin/python3 """Load a gumpy Genome object, and use pickle to save to disk. Due to the security implications of the pickle module, USE AT YOUR OWN RISK. It is recommended to avoid sending and recieving pickled objects. """ import argparse import pickle import os import gumpy if __name__ == "__main__": par...
oxfordmmm/gumpy
bin/gumpy-save-genome.py
gumpy-save-genome.py
py
1,267
python
en
code
4
github-code
18
[ { "api_name": "argparse.ArgumentParser", "line_number": 13, "usage_type": "call" }, { "api_name": "gumpy.Genome", "line_number": 28, "usage_type": "call" }, { "api_name": "os.path.exists", "line_number": 30, "usage_type": "call" }, { "api_name": "os.path", "li...
23518094611
from flask import Blueprint, render_template, request, redirect, url_for, abort, flash from ..repositories import deskRepository deskRep = deskRepository.deskRepository() desk_page = Blueprint("desks", __name__, url_prefix="/desks") @desk_page.route("", methods=['GET']) def getAllDesks(): desks = deskRep.getAllDe...
ArtemInyushev/Flask
task/api/controllers/deskController.py
deskController.py
py
1,345
python
en
code
0
github-code
18
[ { "api_name": "repositories.deskRepository.deskRepository", "line_number": 4, "usage_type": "call" }, { "api_name": "repositories.deskRepository", "line_number": 4, "usage_type": "name" }, { "api_name": "flask.Blueprint", "line_number": 5, "usage_type": "call" }, { ...
12457616228
import numpy as np import pandas as pd from sklearn.pipeline import Pipeline from sklearn.model_selection import train_test_split, GridSearchCV from sklearn.feature_selection import f_classif, SelectKBest, SelectPercentile from sklearn.naive_bayes import GaussianNB heart = pd.read_csv("https://raw.githubusercontent.com...
ekaterine12345/my
Lec11_GridSearchQuizz_SelectKBest/preperation_for_quiz5.py
preperation_for_quiz5.py
py
927
python
en
code
0
github-code
18
[ { "api_name": "pandas.read_csv", "line_number": 7, "usage_type": "call" }, { "api_name": "sklearn.feature_selection.SelectPercentile", "line_number": 11, "usage_type": "call" }, { "api_name": "sklearn.feature_selection.f_classif", "line_number": 11, "usage_type": "name" ...
26515209295
from typing import Any, Callable, NamedTuple, Tuple from bsuite.baselines import base from bsuite.baselines.utils import sequence import dm_env from dm_env import specs import haiku as hk import jax import jax.numpy as jnp import optax import rlax Logits = jnp.ndarray Value = jnp.ndarray PolicyValueNet = Callable[[j...
deepmind/bsuite
bsuite/baselines/jax/actor_critic/agent.py
agent.py
py
4,178
python
en
code
1,400
github-code
18
[ { "api_name": "jax.numpy.ndarray", "line_number": 14, "usage_type": "attribute" }, { "api_name": "jax.numpy", "line_number": 14, "usage_type": "name" }, { "api_name": "jax.numpy.ndarray", "line_number": 15, "usage_type": "attribute" }, { "api_name": "jax.numpy", ...
36769244434
import datetime import hashlib import logging import pdb from django.db import IntegrityError from django.http import JsonResponse from django.shortcuts import render from datetime import datetime, timedelta import requests from django.shortcuts import render, redirect from django.contrib.auth import authenticate, logi...
TamizhKamal09/cripto
members/views.py
views.py
py
16,830
python
en
code
0
github-code
18
[ { "api_name": "django.contrib.auth.authenticate", "line_number": 24, "usage_type": "call" }, { "api_name": "django.contrib.auth.login", "line_number": 27, "usage_type": "call" }, { "api_name": "django.shortcuts.redirect", "line_number": 28, "usage_type": "call" }, { ...
39793294087
from flask import render_template, redirect, request from flask_app import app from flask_app.model import ninja, dojo @app.route("/ninjas") def create_ninja(): x = dojo.Dojo.get_all_dojo() return render_template("ninjas.html", dojos=x) @app.route("/createninja", methods=["POST"]) def create(): data = { ...
Cars0nLee/Flask-MySQL
flask_app/controllers/ninjas.py
ninjas.py
py
568
python
en
code
0
github-code
18
[ { "api_name": "flask_app.model.dojo.Dojo.get_all_dojo", "line_number": 7, "usage_type": "call" }, { "api_name": "flask_app.model.dojo.Dojo", "line_number": 7, "usage_type": "attribute" }, { "api_name": "flask_app.model.dojo", "line_number": 7, "usage_type": "name" }, ...
25238696698
from __future__ import annotations from functools import lru_cache, partial, wraps import logging from string import Template from typing import ( Any, Callable, cast, MutableMapping, Optional, Type, TYPE_CHECKING, TypeVar, Union, ) from PyQt5 import Qt from vspreview.core import Time, TimeInter...
Endilll/vapoursynth-preview
vspreview/utils/utils.py
utils.py
py
5,011
python
en
code
69
github-code
18
[ { "api_name": "typing.TypeVar", "line_number": 17, "usage_type": "call" }, { "api_name": "typing.Union", "line_number": 20, "usage_type": "name" }, { "api_name": "vspreview.core.TimeType", "line_number": 20, "usage_type": "name" }, { "api_name": "PyQt5.Qt.QTime", ...
11955382644
import sys import os.path as osp import subprocess import sys import time import traceback from utils import get_yml_content, dump_yml_content, setup_experiment, get_nni_log_path, is_experiment_done from utils import GREEN, RED, CLEAR, EXPERIMENT_URL TUNER_LIST = ['GridSearch', 'BatchTuner', 'TPE', 'Random', 'Anneal'...
niuxinzan/microsoft-nni
test/tuner_test.py
tuner_test.py
py
3,182
python
en
code
0
github-code
18
[ { "api_name": "sys.platform", "line_number": 16, "usage_type": "attribute" }, { "api_name": "os.path.join", "line_number": 17, "usage_type": "call" }, { "api_name": "os.path", "line_number": 17, "usage_type": "name" }, { "api_name": "os.path.join", "line_numbe...
2245222226
#!/usr/bin/env python import logging, os, urllib, sys, threading, cgi, inspect, re, csv import voxpop import caches import cache import simplejson as json from lib import couch from lib import nltk from nltk import * from config.config import * from lib.typecode.util import * #lv = [-1,0,1] class WordnetParser(): ...
typecode/voxpop
services/vp/vpNLPdep.py
vpNLPdep.py
py
4,872
python
en
code
2
github-code
18
[ { "api_name": "lib.nltk.corpus.wordnet.synset", "line_number": 17, "usage_type": "call" }, { "api_name": "lib.nltk.corpus", "line_number": 17, "usage_type": "attribute" }, { "api_name": "lib.nltk", "line_number": 17, "usage_type": "name" }, { "api_name": "lib.nltk...
42593769623
import abc from difflib import SequenceMatcher from typing import Any, Callable, Optional from ..exceptions import NoMoreItems from ..utils import _pretty_format, maybe_coroutine __all__ = ( "BaseObject", "AsyncIterator", "UnNamedBaseObject" ) class UnNamedBaseObject(metaclass=abc.ABCMeta): """The a...
PendragonLore/async_pokepy
async_pokepy/types/abc.py
abc.py
py
6,245
python
en
code
4
github-code
18
[ { "api_name": "abc.ABCMeta", "line_number": 15, "usage_type": "attribute" }, { "api_name": "typing.Any", "line_number": 48, "usage_type": "name" }, { "api_name": "abc.ABCMeta", "line_number": 70, "usage_type": "attribute" }, { "api_name": "utils._pretty_format", ...
13033795574
import os import sqlite3 import requests from flask import Flask,render_template, redirect,url_for,request requests.packages.urllib3.disable_warnings() app = Flask(__name__) basedir = os.path.abspath(os.path.dirname(__file__)) DATABASE_URL = os.path.join(os.path.split(os.path.realpath(__file__))[0],'db\\test.sqlite...
yangleiqing0/MytestFlaskOra
app.py
app.py
py
4,451
python
en
code
0
github-code
18
[ { "api_name": "requests.packages.urllib3.disable_warnings", "line_number": 5, "usage_type": "call" }, { "api_name": "requests.packages", "line_number": 5, "usage_type": "attribute" }, { "api_name": "flask.Flask", "line_number": 9, "usage_type": "call" }, { "api_na...
21118579638
# -*- coding: utf-8 -*- from __future__ import absolute_import import json import logging import sys from time import sleep from Crypto.Hash import SHA256 from cached_property import cached_property from standardjson import StandardJSONEncoder import requests from six import string_types if not logging.getLogger()....
pydanny/webhooks
webhooks/senders/base.py
base.py
py
7,874
python
en
code
58
github-code
18
[ { "api_name": "logging.getLogger", "line_number": 16, "usage_type": "call" }, { "api_name": "logging.basicConfig", "line_number": 17, "usage_type": "call" }, { "api_name": "logging.DEBUG", "line_number": 17, "usage_type": "attribute" }, { "api_name": "cached_prope...
37880187535
# -*- coding: utf-8 -*- """ HNSW + KNN Querying: Base method """ import datetime import workflow_neo4j_cluster_V2 as wflo import os import pickle import numpy as np import neo4j import pandas as pd import time # Database Credentials httpUri = "http://localhost:7474" boltUri = "bolt://localhost:7687"...
agb24/product_design_kg_code
query_method.py
query_method.py
py
12,304
python
en
code
0
github-code
18
[ { "api_name": "neo4j.GraphDatabase.driver", "line_number": 24, "usage_type": "call" }, { "api_name": "neo4j.GraphDatabase", "line_number": 24, "usage_type": "attribute" }, { "api_name": "numpy.vstack", "line_number": 51, "usage_type": "call" }, { "api_name": "hnsw...
17075727535
from typing import Tuple, Dict, List, Generator, Any import json from datetime import datetime, timedelta, timezone import numpy as np import pandas as pd from websocket import create_connection from bytewax.inputs import ManualInputConfig from bytewax.dataflow import Dataflow from bytewax.window import EventClockConf...
Paulescu/build-and-deploy-real-time-feature-pipeline
src/flow_steps.py
flow_steps.py
py
6,920
python
en
code
94
github-code
18
[ { "api_name": "src.logger.get_console_logger", "line_number": 19, "usage_type": "call" }, { "api_name": "bytewax.dataflow.Dataflow", "line_number": 21, "usage_type": "name" }, { "api_name": "typing.List", "line_number": 27, "usage_type": "name" }, { "api_name": "w...
14137997440
import requests import smtplib from datetime import datetime response = requests.get(url='http://api.open-notify.org/iss-now.json') response.raise_for_status() data = response.json() positional_data = data['iss_position'] iss_latitude = float(positional_data['latitude']) iss_longitude = float(positional_data['longit...
KlayClarke/ISS-tracker
main.py
main.py
py
1,888
python
en
code
0
github-code
18
[ { "api_name": "requests.get", "line_number": 5, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 27, "usage_type": "call" }, { "api_name": "datetime.datetime.now", "line_number": 35, "usage_type": "call" }, { "api_name": "datetime.datetime", ...
16081506295
from django.core import serializers from django.http import HttpResponse from django.shortcuts import render from django.template import loader from django.views.decorators.csrf import csrf_exempt import logging import zhaw.wall_db as wall_db from .models import IfcModel, WallElement import json logger = logging....
mjgordon/django_ifc_viewer
zhaw/views.py
views.py
py
2,020
python
en
code
1
github-code
18
[ { "api_name": "logging.getLogger", "line_number": 16, "usage_type": "call" }, { "api_name": "django.template.loader.get_template", "line_number": 21, "usage_type": "call" }, { "api_name": "django.template.loader", "line_number": 21, "usage_type": "name" }, { "api_...
2971909657
import asyncio import aiohttp from django.shortcuts import render import requests import time async def fetch(session, url): async with session.get(url) as response: assert response.status == 200 return await response.json() async def async_home_view(request): start_time = time.time() ...
durvalcarvalho/django-projects
django-async-versus-sync/config/views.py
views.py
py
1,423
python
en
code
1
github-code
18
[ { "api_name": "time.time", "line_number": 16, "usage_type": "call" }, { "api_name": "aiohttp.ClientSession", "line_number": 23, "usage_type": "call" }, { "api_name": "asyncio.ensure_future", "line_number": 27, "usage_type": "call" }, { "api_name": "asyncio.gather"...
17648326389
import matplotlib.pyplot as plt import numpy as np xp = np.linspace(0.1, 0.4, 100) xs=0.5 mu=1 rop=xp/mu ros=xs/mu yp=1+(0.5/(1-rop)) ys=1+(0.5/((1-rop)*(1-rop-ros))) plt.plot(xp, yp,label="Elsődleges felhasználó") plt.plot(xp,ys,label="Kognitív felhasználó") plt.legend(loc="upper right") plt.title("CRN") plt.ylim(ymi...
Jelenszky/Zarovizsga
crn_avg_waiting_time.py
crn_avg_waiting_time.py
py
532
python
hu
code
0
github-code
18
[ { "api_name": "numpy.linspace", "line_number": 4, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.plot", "line_number": 11, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 11, "usage_type": "name" }, { "api_name": "matplotlib.pyp...
12235702166
import cv2 import tkinter as tk from PIL import Image, ImageTk root = tk.Tk() root.title("Webcam App") label = tk.Label(root) label.pack() cap = cv2.VideoCapture("http://192.168.1.6:8080/video") def update(): ret, frame = cap.read() if ret: img = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB) img = ...
Duc0509Ngo/Pokemon-classfication
src/app.py
app.py
py
506
python
en
code
0
github-code
18
[ { "api_name": "tkinter.Tk", "line_number": 5, "usage_type": "call" }, { "api_name": "tkinter.Label", "line_number": 8, "usage_type": "call" }, { "api_name": "cv2.VideoCapture", "line_number": 11, "usage_type": "call" }, { "api_name": "cv2.cvtColor", "line_numb...
25550112542
import matplotlib.pyplot as plt import pandas as pd import numpy as np import json train = pd.read_json('../static/json/train.json') icebergs = train[train.is_iceberg==1].sample(n=9,random_state=123) ships = train[train.is_iceberg==0].sample(n=9,random_state=456) fig = plt.figure(1,figsize=(15,15)) for i in range(9)...
raymerta/statoil-kaggle
test/imagetest.py
imagetest.py
py
654
python
en
code
0
github-code
18
[ { "api_name": "pandas.read_json", "line_number": 6, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.figure", "line_number": 11, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 11, "usage_type": "name" }, { "api_name": "numpy.resh...
71426844840
import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns train_identity = pd.read_csv('/kaggle/input/ieee-fraud-detection/train_identity.csv', index_col='TransactionID') train_transaction = pd.read_csv('/kaggle/input/ieee-fraud-detection/train_transaction.csv', index_col='Tran...
aorursy/new-nb-3
gmannella_eda-focused-on-finding-correlation-with-isfraud.py
gmannella_eda-focused-on-finding-correlation-with-isfraud.py
py
3,159
python
en
code
0
github-code
18
[ { "api_name": "pandas.read_csv", "line_number": 11, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 13, "usage_type": "call" }, { "api_name": "seaborn.set", "line_number": 81, "usage_type": "call" }, { "api_name": "seaborn.heatmap", "li...
560972875
import dataclasses from typing import List, Mapping, Optional, Tuple from flax import linen as nn, traverse_util from flax.core import frozen_dict from flax.linen import partitioning as nn_partitioning # Default sharding rules for the ESM-2 model on TPUs. DEFAULT_TPU_RULES = [ ("batch", "X"), ("hidden", "Y")...
irhum/esmjax
esmjax/modules/partitioning.py
partitioning.py
py
3,785
python
en
code
13
github-code
18
[ { "api_name": "flax.core.frozen_dict.FrozenDict", "line_number": 20, "usage_type": "attribute" }, { "api_name": "flax.core.frozen_dict", "line_number": 20, "usage_type": "name" }, { "api_name": "flax.core.frozen_dict.FrozenDict", "line_number": 21, "usage_type": "attribut...
13064415676
import sys from neutron.common import config from neutron.db import api as neutron_db_api from oslo_config import cfg from oslo_db.exception import DBDuplicateEntry from oslo_log import log as logging from quark.db import models LOG = logging.getLogger(__name__) def main(): config.init(sys.argv[1:]) if not...
MichaelPorras/quark
quark/tools/insert_provider_subnets.py
insert_provider_subnets.py
py
2,223
python
en
code
null
github-code
18
[ { "api_name": "oslo_log.log.getLogger", "line_number": 11, "usage_type": "call" }, { "api_name": "oslo_log.log", "line_number": 11, "usage_type": "name" }, { "api_name": "neutron.common.config.init", "line_number": 15, "usage_type": "call" }, { "api_name": "neutro...
6399819622
import os import stripe from datetime import datetime, timedelta from assets.models import DataSource stripe.api_key = os.environ.get("STRIPE_API_KEY", None) stripe.api_version = "2020-08-27" def query_subscription_data(api_key, data): """ Query subscription data and populate the data dictionary """ ...
wizenheimer/Arcadian
metrics/util.py
util.py
py
4,751
python
en
code
1
github-code
18
[ { "api_name": "stripe.api_key", "line_number": 6, "usage_type": "attribute" }, { "api_name": "os.environ.get", "line_number": 6, "usage_type": "call" }, { "api_name": "os.environ", "line_number": 6, "usage_type": "attribute" }, { "api_name": "stripe.api_version", ...
10414897650
import json import boto3 def lambda_handler(event, context): def handleGetActivities(id): dynamodb = boto3.resource('dynamodb') activitiesTable = dynamodb.Table('fbla_activities_table') response = activitiesTable.get_item( Key={ 'id': id } )...
codingshreyash/KolbAcademy
samFBLA/sam-fbla/activities_function/app.py
app.py
py
1,049
python
en
code
1
github-code
18
[ { "api_name": "boto3.resource", "line_number": 8, "usage_type": "call" }, { "api_name": "json.loads", "line_number": 17, "usage_type": "call" }, { "api_name": "json.dumps", "line_number": 28, "usage_type": "call" }, { "api_name": "json.dumps", "line_number": 3...
37970563534
import pandas as pd import os import warnings from tqdm import tqdm from config import * from gen_html import gen_html warnings.filterwarnings("ignore") def deal_name_changes(name): if name=='天才呆黑魔魔': return '胡乱思维的猫' return name def cal(): # 出场次数 总得分 一位率 二位率 三位率 四位率 总局数 和牌率 放铳率 立直率 副露率 自摸率 ...
123000001212/MahjongSoul-Event-WebPage-Generator
cal.py
cal.py
py
3,933
python
en
code
1
github-code
18
[ { "api_name": "warnings.filterwarnings", "line_number": 7, "usage_type": "call" }, { "api_name": "pandas.read_excel", "line_number": 20, "usage_type": "call" }, { "api_name": "os.walk", "line_number": 28, "usage_type": "call" }, { "api_name": "tqdm.tqdm", "lin...
24243706049
from jupyter_ui_poll import ui_events import ipywidgets as widgets from jupyterMagicCommands.outputters.outputter import AbstractOutputterReadCB from jupyterMagicCommands.outputters.outputter import AbstractOutputter, EmptyOutputterReadCB from IPython.display import display class InteractiveOutputter(AbstractOutput...
catwang01/jupyterMagicCommands
jupyterMagicCommands/outputters/interactive_outputter.py
interactive_outputter.py
py
1,254
python
en
code
0
github-code
18
[ { "api_name": "jupyterMagicCommands.outputters.outputter.AbstractOutputter", "line_number": 10, "usage_type": "name" }, { "api_name": "jupyter_ui_poll.ui_events", "line_number": 13, "usage_type": "call" }, { "api_name": "ipywidgets.Output", "line_number": 15, "usage_type"...
37216575367
from generalized_alphanpi.utils import import_dyn_class from generalized_alphanpi.core.PolicyOnly import PolicyOnly import numpy as np import pandas as pd from argparse import ArgumentParser import yaml import time import os from tqdm import tqdm import torch if __name__ == "__main__": parser = ArgumentParser...
geektoni/learning_programs_from_traces
generalized_alphanpi/core/validate_agent.py
validate_agent.py
py
5,282
python
en
code
0
github-code
18
[ { "api_name": "argparse.ArgumentParser", "line_number": 18, "usage_type": "call" }, { "api_name": "yaml.load", "line_number": 29, "usage_type": "call" }, { "api_name": "yaml.FullLoader", "line_number": 29, "usage_type": "attribute" }, { "api_name": "generalized_al...
24463099758
''' @package tfignite.parser Customized parser for tfignite. ''' import argparse class ArgumentParser(argparse.ArgumentParser): def __init__(self, Model, Dataset, *args, **kwargs): self._Model = Model self._Dataset = Dataset argparse.ArgumentParser.__init__(self, *args, **kwargs) def ...
ipod825/tfignite
tfignite/parser.py
parser.py
py
666
python
en
code
1
github-code
18
[ { "api_name": "argparse.ArgumentParser", "line_number": 8, "usage_type": "attribute" }, { "api_name": "argparse.ArgumentParser.__init__", "line_number": 12, "usage_type": "call" }, { "api_name": "argparse.ArgumentParser", "line_number": 12, "usage_type": "attribute" }, ...
21701742132
import subprocess try: from termcolor import colored except ModuleNotFoundError: def colored(string, *args, **kwargs): return string from sys import argv class TestFile: def __init__(self, filename, expected_code = 0, expected_output = "", expected_in_error = [], folder = "test_files/") -> None: ...
Mareaucanard/GLaDOS-epitech-2026
test/LISP/Functional.py
Functional.py
py
5,783
python
en
code
0
github-code
18
[ { "api_name": "subprocess.run", "line_number": 26, "usage_type": "call" }, { "api_name": "subprocess.DEVNULL", "line_number": 26, "usage_type": "attribute" }, { "api_name": "subprocess.TimeoutExpired", "line_number": 27, "usage_type": "attribute" }, { "api_name": ...
73646904680
from setuptools import setup with open("README", "r") as fh: long_description = fh.read() setup( name='placeandroute', version='0.0.0', packages=['placeandroute','placeandroute.routing', 'placeandroute.tilebased'], install_requires=['networkx>=2.4,<3.0', 'dwave...
boothby/placeandroute
setup.py
setup.py
py
960
python
en
code
0
github-code
18
[ { "api_name": "setuptools.setup", "line_number": 7, "usage_type": "call" } ]
36368041690
# -*- coding: utf-8 -*- """ 这个类负责所有和音乐有关的操作 """ import wx import pygame import os class MusicControl: MusicPath = "" musicList = [] index = 0 def __init__(self): pygame.mixer.init() # Music单独保存自己的路径,与工作相独立,存在默认播放路径 self.MusicPath = "d:\\Music" self.mu...
GuilmK/Document
成果物/6. Translation Assistant/Translation assistant/MusicPanel.py
MusicPanel.py
py
2,052
python
en
code
0
github-code
18
[ { "api_name": "pygame.mixer.init", "line_number": 16, "usage_type": "call" }, { "api_name": "pygame.mixer", "line_number": 16, "usage_type": "attribute" }, { "api_name": "os.listdir", "line_number": 20, "usage_type": "call" }, { "api_name": "wx.DirDialog", "li...
3951917004
import os import sys from absl import app import tensorflow as tf from tensorflow.compiler.mlir.tfr.python import composite from tensorflow.compiler.mlir.tfr.python.op_reg_gen import gen_register_op from tensorflow.compiler.mlir.tfr.python.tfr_gen import tfr_gen_from_module from tensorflow.python.ops import gen_array...
tensorflow/tensorflow
tensorflow/compiler/mlir/tfr/examples/pad/ops_defs.py
ops_defs.py
py
4,951
python
en
code
178,918
github-code
18
[ { "api_name": "tensorflow.compiler.mlir.tfr.python.composite.Composite", "line_number": 13, "usage_type": "attribute" }, { "api_name": "tensorflow.compiler.mlir.tfr.python.composite", "line_number": 13, "usage_type": "name" }, { "api_name": "tensorflow.python.platform.flags.FLAGS...
35892256181
import bs4 import requests import constants as keys from services import convert_price class WatsonsHelper: @staticmethod def get_category_urls(base_url): r = requests.get(base_url) soup = bs4.BeautifulSoup(r.content, features="lxml") urls = list() links = soup.findAll("a", {"...
selimslab/entrophy
spiders/spider_modules/visible/with_search/watsons_helper.py
watsons_helper.py
py
1,829
python
en
code
0
github-code
18
[ { "api_name": "requests.get", "line_number": 11, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_number": 12, "usage_type": "call" }, { "api_name": "services.convert_price", "line_number": 38, "usage_type": "call" }, { "api_name": "constants.LINK"...
33977987526
import numpy as np import cv2 import re # 绘制画布 canvas = np.zeros((720,1280,3),dtype="uint8") # 定义颜色 green = (0,255,0) red = (0,0,255) blue = (255,0,0) f = open('xml.txt', 'r') # 用于存储需要绘制直线的三个点坐标 因为点坐标为数字 所以必须用数组 x = [0, 0, 0] y = [0, 0, 0] # 一次性读取所有的内容 节省时间 line = f.readlines() # print(line) # print(line[0]) # 设置...
hejiam/ann
test/write_line.py
write_line.py
py
1,381
python
zh
code
0
github-code
18
[ { "api_name": "numpy.zeros", "line_number": 5, "usage_type": "call" }, { "api_name": "re.split", "line_number": 35, "usage_type": "call" }, { "api_name": "cv2.line", "line_number": 53, "usage_type": "call" }, { "api_name": "cv2.line", "line_number": 54, "u...
41765704307
import numpy import itertools import functools def evaluate_test_data(self, test_data): test_res = [(numpy.argmax(self.compute(x)), numpy.argmax(exp)) for (x, exp) in test_data] return sum([int(idx_got == idx_exp) for (idx_got, idx_exp) in test_res]) def evaluate_test_mnist_data(self, test_data): test_res...
pmgzo/whatIsThisFlower
server/cnn/evaluation.py
evaluation.py
py
1,558
python
en
code
0
github-code
18
[ { "api_name": "numpy.argmax", "line_number": 6, "usage_type": "call" }, { "api_name": "numpy.argmax", "line_number": 10, "usage_type": "call" }, { "api_name": "numpy.argmax", "line_number": 28, "usage_type": "call" }, { "api_name": "numpy.argmax", "line_number...
32646999665
import argparse import os from rinna_ure import get_ure_answers from dotenv import load_dotenv, find_dotenv load_dotenv(find_dotenv()) if __name__ == "__main__": parser = argparse.ArgumentParser(description="Query URE for an answer.") parser.add_argument("query", type=str, help="The query to ask.") parse...
AkihiroFujimotoChocolate/openai-ure-sample
get_ure_answer.py
get_ure_answer.py
py
794
python
en
code
0
github-code
18
[ { "api_name": "dotenv.load_dotenv", "line_number": 7, "usage_type": "call" }, { "api_name": "dotenv.find_dotenv", "line_number": 7, "usage_type": "call" }, { "api_name": "argparse.ArgumentParser", "line_number": 10, "usage_type": "call" }, { "api_name": "rinna_ure...
26911478574
import matplotlib.pyplot as plt import numpy as np N = 3 ind = np.arange(N) # the x locations for the groups width = 0.25 # the width of the bars fig, ax = plt.subplots() pos_bar = (0.36, 0.32, 0.28) neg_bar = (0.54, 0.41, 0.34) neu_bar = (0.08, 0.26, 0.38) no_bar = (0.02, 0.01, 0.00) rects1 = ax.bar(ind+...
wuzhenyusjtu/TwitterSentimentAnalysis_GOPDebates
SentimentClassification/draw.py
draw.py
py
1,245
python
en
code
0
github-code
18
[ { "api_name": "numpy.arange", "line_number": 7, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.subplots", "line_number": 10, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 10, "usage_type": "name" }, { "api_name": "matplotlib.p...
40866047183
from django.shortcuts import redirect, render from django.contrib.auth.forms import AuthenticationForm, UserCreationForm from .forms import RegisterForm from django.contrib.auth import login as auth_login, authenticate, login from django.views.generic import CreateView, UpdateView from django.contrib.auth.models import...
0-lingual/likelion
projectlion/test_jwt/accounts/views.py
views.py
py
1,873
python
en
code
0
github-code
18
[ { "api_name": "django.views.generic.CreateView", "line_number": 12, "usage_type": "name" }, { "api_name": "django.contrib.auth.forms.UserCreationForm", "line_number": 13, "usage_type": "name" }, { "api_name": "django.urls.reverse_lazy", "line_number": 14, "usage_type": "c...
18367266473
from discord.ext import commands from discord.ext.commands import Bot from app.core.player import mp class Clear(commands.Cog): def __init__(self, client: Bot): self.client = client @commands.command(help="Clears the current queue of songs.") async def clear(self, ctx: commands.Context): ...
xNykram/rhenus_bot
app/commands/clear.py
clear.py
py
637
python
en
code
0
github-code
18
[ { "api_name": "discord.ext.commands.Cog", "line_number": 7, "usage_type": "attribute" }, { "api_name": "discord.ext.commands", "line_number": 7, "usage_type": "name" }, { "api_name": "discord.ext.commands.Bot", "line_number": 8, "usage_type": "name" }, { "api_name...
9083697178
""" Simple events listener The events listener require a WSGI server to handle the actual http requests. """ import json import uuid from wsgiref import simple_server import falcon import scgapi class EventsListener(object): def __init__(self, callback): self.callback = callback def on_get(self, r...
Syniverse/Messaging-Python
scgapi/Events.py
Events.py
py
1,368
python
en
code
2
github-code
18
[ { "api_name": "falcon.HTTP_200", "line_number": 22, "usage_type": "attribute" }, { "api_name": "falcon.HTTPBadRequest", "line_number": 27, "usage_type": "call" }, { "api_name": "json.loads", "line_number": 33, "usage_type": "call" }, { "api_name": "falcon.HTTPErro...
39013979564
from random import sample from itertools import chain from typing import List from colour import Color import numpy as np from tqdm.auto import tqdm from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.metrics.pairwise import cosine_distances as pairwise_cos_dist class Avance(): def __in...
Marceau-h/Dedoublonneur
Dedoubloneur/avance.py
avance.py
py
4,105
python
fr
code
0
github-code
18
[ { "api_name": "typing.List", "line_number": 14, "usage_type": "name" }, { "api_name": "tqdm.auto.tqdm.write", "line_number": 18, "usage_type": "call" }, { "api_name": "tqdm.auto.tqdm", "line_number": 18, "usage_type": "name" }, { "api_name": "tqdm.auto.tqdm", ...
8934359217
""" the general training framework """ from __future__ import print_function import os import argparse import socket import time import tensorboard_logger as tb_logger import torch import torch.optim as optim import torch.nn as nn import torch.backends.cudnn as cudnn from models import model_dict from models.util ...
kimyuji/SFTN_kd
train_student_aware_teacher.py
train_student_aware_teacher.py
py
8,744
python
en
code
0
github-code
18
[ { "api_name": "socket.gethostname", "line_number": 37, "usage_type": "call" }, { "api_name": "argparse.ArgumentParser", "line_number": 39, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 95, "usage_type": "call" }, { "api_name": "os.path", ...
37712662477
import numpy as np import matplotlib.pylab as plt import os def nucleoPropuestoPrimo(f0, nHarmonics, fs, N, decayP=0.5, amplitudeLimit=0.5): return getPrimeKernel(float(f0), nHarmonics, fs, N, decayP, amplitudeLimit) def nucleoPropuestoNoPrimo(f0, nHarmonics, fs, N, decayP=0.5, amplitudeLimit=0.5): return g...
juanfonsecasolis/ARAPSUAA
src/proposedKernels/proposedKernel.py
proposedKernel.py
py
3,735
python
en
code
0
github-code
18
[ { "api_name": "numpy.zeros", "line_number": 22, "usage_type": "call" }, { "api_name": "numpy.cos", "line_number": 28, "usage_type": "call" }, { "api_name": "numpy.pi", "line_number": 28, "usage_type": "attribute" }, { "api_name": "numpy.round", "line_number": ...
22007229288
#!/usr/bin/python3 # # unilaiva-copy-audio.py3 # # Part of Unilaiva songbook system. # # Copies the .MIDI files created by Lilypond to another location and creates # audio files (mp3) from those files in the new location also. # # For audio creation, executables 'ffmpeg' and 'fluidsynth', and a sound font # file are re...
unilaiva/unilaiva-songbook
tools/unilaiva-copy-audio.py3
unilaiva-copy-audio.py3
py3
11,777
python
en
code
3
github-code
18
[ { "api_name": "unicodedata.normalize", "line_number": 48, "usage_type": "call" }, { "api_name": "re.sub", "line_number": 72, "usage_type": "call" }, { "api_name": "re.sub", "line_number": 73, "usage_type": "call" }, { "api_name": "shutil.copy2", "line_number":...
20887624308
import torch from models import MobileNet from utils import utils from torchsummary import summary import time if __name__ == "__main__": device = torch.device("cuda" if torch.cuda.is_available() else "cpu") #model = MobileNet.MobileNetV1Conv224(num_classes=30) #model = MobileNet.MobileNetV1Dw224(num_c...
nesvera/classifiers
eval_speed.py
eval_speed.py
py
1,098
python
en
code
0
github-code
18
[ { "api_name": "torch.device", "line_number": 11, "usage_type": "call" }, { "api_name": "torch.cuda.is_available", "line_number": 11, "usage_type": "call" }, { "api_name": "torch.cuda", "line_number": 11, "usage_type": "attribute" }, { "api_name": "torch.hub.load",...
26001602216
from gui.util.multiselect import Multiselect from scripts.util.util import parse_options, write_options from gui.util.script_progress import ScriptProgress from gui.util.util import bind_button from gui.util.select_directory import SelectDirectory from scripts.upload_files import upload_files from tkinter import * from...
demarcod1/librarianz-scripts
gui/screens/upload_files.py
upload_files.py
py
4,543
python
en
code
0
github-code
18
[ { "api_name": "tkinter.ttk.Frame", "line_number": 10, "usage_type": "attribute" }, { "api_name": "tkinter.ttk", "line_number": 10, "usage_type": "name" }, { "api_name": "tkinter.ttk.Frame.__init__", "line_number": 13, "usage_type": "call" }, { "api_name": "tkinter...
26953127849
from typing import Optional import click import clinica import clinica.pydra.engine_utils as pydra_utils import clinica.pydra.statistics_volume.pipeline as pydra_statistics_volume from clinica.pipelines import cli_param from clinica.pipelines.engine import clinica_pipeline pipeline_name = "pydra-statistics-volume" ...
aramis-lab/clinica
clinica/pydra/statistics_volume/statistics_volume_cli.py
statistics_volume_cli.py
py
4,926
python
en
code
196
github-code
18
[ { "api_name": "typing.Optional", "line_number": 85, "usage_type": "name" }, { "api_name": "typing.Optional", "line_number": 86, "usage_type": "name" }, { "api_name": "typing.Optional", "line_number": 88, "usage_type": "name" }, { "api_name": "typing.Optional", ...
40089403828
"""Button platform for La Marzocco espresso machines.""" import logging from homeassistant.components.button import ButtonEntity from .const import ( DOMAIN, ENTITY_FUNC, ENTITY_ICON, ENTITY_MAP, ENTITY_NAME, ENTITY_TYPE, TYPE_START_BACKFLUSH, MODEL_GS3_AV, MODEL_LM, ) from .entit...
rccoleman/lamarzocco
custom_components/lamarzocco/button.py
button.py
py
1,705
python
en
code
59
github-code
18
[ { "api_name": "logging.getLogger", "line_number": 21, "usage_type": "call" }, { "api_name": "const.ENTITY_NAME", "line_number": 25, "usage_type": "name" }, { "api_name": "const.ENTITY_MAP", "line_number": 26, "usage_type": "name" }, { "api_name": "const.ENTITY_TYP...
14318308061
from __future__ import print_function, division from keras.models import Model from keras.layers import Concatenate, Add, Average, Input, Dense, Flatten, BatchNormalization, Activation, LeakyReLU from keras.layers.convolutional import Convolution2D, MaxPooling2D, UpSampling2D, Convolution2DTranspose from keras import b...
Sanketp1997/Image-SuperResolution-Using-Deep-Leaning-Keras-Implementation-
Project Source code/models.py
models.py
py
13,589
python
en
code
2
github-code
18
[ { "api_name": "warnings.warn", "line_number": 20, "usage_type": "call" }, { "api_name": "img_utils.output_path", "line_number": 23, "usage_type": "attribute" }, { "api_name": "img_utils.validation_output_path", "line_number": 24, "usage_type": "attribute" }, { "ap...
34952467024
import gym import numpy as np from gym.envs.registration import register def make( domain_name, task_name, noise, mult_factor, idx, seed=1, visualize_reward=True, from_pixels=False, height=84, width=84, camera_id=0, frame_skip=1, episode_length=1000, environment...
capybaralet/REx_code_release
reinforcement_learning_with_spurious_correlations/dmc2gym/__init__.py
__init__.py
py
1,469
python
en
code
62
github-code
18
[ { "api_name": "gym.envs", "line_number": 30, "usage_type": "attribute" }, { "api_name": "gym.envs.registration.register", "line_number": 31, "usage_type": "call" }, { "api_name": "gym.make", "line_number": 53, "usage_type": "call" } ]
72851724201
import wikipedia from bs4 import BeautifulSoup import pandas as pd import time import urllib.parse import random teams = [ # { # "team": "Czech Republic", # "players": { # "goalkeepers": ["Ales Mandous", "Jiri Pavlenka", "Tomas Vaclik"], # "defenders": ["Jan Boril", "Jakub ...
christinabo/euro-2020-players-careers
retrieve_data.py
retrieve_data.py
py
11,410
python
en
code
0
github-code
18
[ { "api_name": "time.sleep", "line_number": 138, "usage_type": "call" }, { "api_name": "random.randint", "line_number": 138, "usage_type": "call" }, { "api_name": "wikipedia.search", "line_number": 142, "usage_type": "call" }, { "api_name": "urllib.parse.parse.quot...
69813867242
# -*- coding: utf-8 -*- import scrapy from ..items import CodeItem class JpointSpider(scrapy.Spider): name = 'jpoint' allowed_domains = ['www.javatpoint.com'] start_urls = ['https://www.javatpoint.com/operators-in-java'] def parse(self, response): # tk=response.css('.codeblock') # dess=r...
IT16029682/IRWA-Scrapy-Python-JavaTpoint
javatpoint/javatpoint/spiders/jpoint.py
jpoint.py
py
1,638
python
en
code
0
github-code
18
[ { "api_name": "scrapy.Spider", "line_number": 5, "usage_type": "attribute" }, { "api_name": "items.CodeItem", "line_number": 23, "usage_type": "call" }, { "api_name": "scrapy.Request", "line_number": 36, "usage_type": "call" } ]
36361957079
import numpy as np import os import collections import string import re EMBED_DIM = 128 def normalize_answer(s): """Lower text and remove punctuation, articles and extra whitespace.""" def remove_articles(text): regex = re.compile(r'\b(a|an|the)\b', re.UNICODE) return re.sub(regex, ' ', text)...
peters92/ssqa
src/model/ga-reader-squad/utils/Helpers.py
Helpers.py
py
9,963
python
en
code
2
github-code
18
[ { "api_name": "re.compile", "line_number": 13, "usage_type": "call" }, { "api_name": "re.UNICODE", "line_number": 13, "usage_type": "attribute" }, { "api_name": "re.sub", "line_number": 14, "usage_type": "call" }, { "api_name": "string.punctuation", "line_numb...
41421938539
#! /usr/bin/env python import sys import os import pygame from pygame.locals import * sys.path.append(os.path.join(os.path.dirname(__file__), os.path.pardir)) import game_lib ''' def load_image(image_path): from PIL import Image from PIL import ImageDraw image = Image.open(image_path) draw = ImageD...
CospanDesign/python
game/animation/animation.py
animation.py
py
1,494
python
en
code
4
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": "os.path.join", "line_number": 8, "usage_type": "call" }, { "api_name": "os.path", "line_number": ...
538568032
import numpy as np import re import time import utils from bpe import BPE bpe = BPE() bpe.load('data/words.bpe') endToken = bpe.str_to_token['\n'] numTokens = len(bpe.str_to_token) raw_data = utils.get_dataset(low_it=True) SAVE_NAME = 'data/train_data_bpe_edition.npz' DATA_TO_PROCESS = int(input('data to process, {...
okawo80085/bigBoiTalkBot
dp_bpe_edition.py
dp_bpe_edition.py
py
1,793
python
en
code
2
github-code
18
[ { "api_name": "bpe.BPE", "line_number": 7, "usage_type": "call" }, { "api_name": "bpe.load", "line_number": 8, "usage_type": "call" }, { "api_name": "bpe.str_to_token", "line_number": 9, "usage_type": "attribute" }, { "api_name": "bpe.str_to_token", "line_numb...
702953838
"""Implementation referenced from ESIPy under BSD-3-Clause License""" import hashlib import inspect import logging import pickle from email.utils import parsedate from dataclasses import dataclass from datetime import datetime, timedelta from typing import Coroutine, Union, Callable from eve_tools.data.db import ESIDB...
slashdotblake/eve_tools
eve_tools/data/cache.py
cache.py
py
7,589
python
en
code
null
github-code
18
[ { "api_name": "logging.getLogger", "line_number": 13, "usage_type": "call" }, { "api_name": "hashlib.sha256", "line_number": 18, "usage_type": "call" }, { "api_name": "pickle.dumps", "line_number": 18, "usage_type": "call" }, { "api_name": "dataclasses.dataclass",...
1699873140
from django.shortcuts import render from django.contrib.auth.decorators import login_required from django.http import HttpResponse, HttpResponseRedirect, Http404 from intranet.decorators import role_required from .models import * from django.urls import reverse from django.contrib import messages import csv fro...
tanaymitkari1/IntraNet
placement/views.py
views.py
py
4,340
python
en
code
1
github-code
18
[ { "api_name": "django.shortcuts.render", "line_number": 20, "usage_type": "call" }, { "api_name": "django.contrib.auth.decorators.login_required", "line_number": 13, "usage_type": "call" }, { "api_name": "django.http.Http404", "line_number": 28, "usage_type": "name" }, ...
41412230238
"""File containing tests specific for the djWasabi/container.py file.""" import sys import os import requests import pytest currentPath = os.path.dirname(os.path.realpath(__file__)) rootPath = os.path.join(currentPath, "..") libraryDir = os.path.join(rootPath, "lib") sys.path.append(libraryDir) from djWasabi import d...
dj-wasabi/dj-wasabi-release
tests/test_container.py
test_container.py
py
4,868
python
en
code
0
github-code
18
[ { "api_name": "os.path.dirname", "line_number": 8, "usage_type": "call" }, { "api_name": "os.path", "line_number": 8, "usage_type": "attribute" }, { "api_name": "os.path.realpath", "line_number": 8, "usage_type": "call" }, { "api_name": "os.path.join", "line_n...
70911656040
from math import pi, cos, sin, sqrt from typing import Type import bpy from bpy.props import * from bpy.types import NodeSocket import mathutils import arm.node_utils import arm.utils if arm.is_reload(__name__): arm.node_utils = arm.reload_module(arm.node_utils) arm.utils = arm.reload_module(arm.utils) else:...
armory3d/armory
blender/arm/logicnode/arm_sockets.py
arm_sockets.py
py
23,403
python
en
code
2,916
github-code
18
[ { "api_name": "arm.node_utils.is_reload", "line_number": 12, "usage_type": "call" }, { "api_name": "arm.node_utils", "line_number": 12, "usage_type": "name" }, { "api_name": "arm.node_utils.node_utils", "line_number": 13, "usage_type": "attribute" }, { "api_name":...
23990345804
import discord import sys import foods import dice import scores from game_logic import is_over, play_game MAX_RANGE = 1000 intents = discord.Intents.default() intents.message_content = True client = discord.Client(intents=intents) playing = False @client.event async def on_ready(): pri...
mhoang19/Discord-bot
bot.py
bot.py
py
2,792
python
en
code
0
github-code
18
[ { "api_name": "discord.Intents.default", "line_number": 9, "usage_type": "call" }, { "api_name": "discord.Intents", "line_number": 9, "usage_type": "attribute" }, { "api_name": "discord.Client", "line_number": 12, "usage_type": "call" }, { "api_name": "foods.load_...
73995086760
from omegaconf import OmegaConf import torch import logging from agent.polybeast.models.base import BaseNet, RandomNet, HalfCheetahAgent from nle.env.base import DUNGEON_SHAPE from envs.skills_all import HalfCheetah from agent.common.envs import tasks from agent.polybeast.models import BaseNet def create_basenet(fla...
SSHAY007/skillhack
agent/polybeast/skill_transfer/skill_transfer.py
skill_transfer.py
py
1,794
python
en
code
0
github-code
18
[ { "api_name": "logging.critical", "line_number": 14, "usage_type": "call" }, { "api_name": "agent.polybeast.models.BaseNet", "line_number": 16, "usage_type": "name" }, { "api_name": "agent.polybeast.models.base.HalfCheetahAgent", "line_number": 18, "usage_type": "name" ...
16828156072
from django.shortcuts import render, redirect from .models import tournament as t_db from .models import registration from .models import tournamentMatch from .forms import NewTournamentForm from users.models import Profile from django.contrib import messages from underscore import _ from django.core import serializers...
CSE-Courses/course-project-a4-group
GoodGames/tournament/views.py
views.py
py
4,722
python
en
code
1
github-code
18
[ { "api_name": "models.tournamentMatch.objects.get", "line_number": 15, "usage_type": "call" }, { "api_name": "models.tournamentMatch.objects", "line_number": 15, "usage_type": "attribute" }, { "api_name": "models.tournamentMatch", "line_number": 15, "usage_type": "name" ...
309815643
from collections import deque with open('input.txt', 'r') as f: n, m = map(int, f.readline().split()) b = [] for i in range(n): b.append(int(f.readline())) print(b) feed = [] i = 0 type = None add_later = deque([]) while i < n: if b[i] != type: feed.append(i) type = b[i] e...
smetanadvorak/programming_problems
yandex/entry_contest/c_social_network/main.py
main.py
py
1,874
python
en
code
0
github-code
18
[ { "api_name": "collections.deque", "line_number": 14, "usage_type": "call" } ]
40286212298
import logging import numpy as np from timeit import default_timer as timer import alphai_crocubot_oracle.crocubot.evaluate as crocubot_eval import pandas as pd from alphai_crocubot_oracle.oracle import CrocubotOracle from alphai_feature_generation.transformation import GymDataTransformation from copy import deepcopy...
alpha-i/oracle-metacrocubot-python
alphai_metacrocubot_oracle/oracle.py
oracle.py
py
6,851
python
en
code
0
github-code
18
[ { "api_name": "alphai_crocubot_oracle.oracle.CrocubotOracle", "line_number": 15, "usage_type": "name" }, { "api_name": "alphai_feature_generation.transformation.GymDataTransformation.KEY_EXCHANGE", "line_number": 19, "usage_type": "attribute" }, { "api_name": "alphai_feature_gene...
24781851307
import discord from discord.ext import commands, tasks from discord import Embed import api import database as db from util import checks, log import logging from datetime import datetime, timezone, timedelta from dateutil import parser import pytz logger = logging.getLogger('__name__') logger.setLevel(logging.INFO) ...
dlsnyder8/smmodiscord
cogs/diamond.py
diamond.py
py
4,427
python
en
code
2
github-code
18
[ { "api_name": "logging.getLogger", "line_number": 13, "usage_type": "call" }, { "api_name": "logging.INFO", "line_number": 14, "usage_type": "attribute" }, { "api_name": "logging.FileHandler", "line_number": 15, "usage_type": "call" }, { "api_name": "logging.Forma...
9347255308
import json import os from os.path import dirname, join import tempfile from pathlib import Path from shutil import copyfile, rmtree from unittest import TestCase from unittest.mock import call, Mock, patch from msm import MycroftSkillsManager, AlreadyInstalled, AlreadyRemoved from msm.exceptions import MsmException ...
MycroftAI/mycroft-skills-manager
tests/test_mycroft_skills_manager.py
test_mycroft_skills_manager.py
py
15,771
python
en
code
14
github-code
18
[ { "api_name": "unittest.TestCase", "line_number": 16, "usage_type": "name" }, { "api_name": "tempfile.mkdtemp", "line_number": 18, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_number": 19, "usage_type": "call" }, { "api_name": "shutil.copyfile", ...
3273275831
import torch from bench.core.executer import Executer def __split_heads_qkv(queries, keys, values, n_head, d_key, d_value): """ Reshape input tensors at the last dimension to split multi-heads and then transpose. Specifically, transform the input tensor with shape [bs, max_sequence_length, n_head * hi...
DeepLink-org/DLOP-Bench
bench/samples/long_tail/split_heads_qkv/torch_impl.py
torch_impl.py
py
1,490
python
en
code
38
github-code
18
[ { "api_name": "torch.reshape", "line_number": 14, "usage_type": "call" }, { "api_name": "torch.transpose", "line_number": 17, "usage_type": "call" }, { "api_name": "torch.reshape", "line_number": 20, "usage_type": "call" }, { "api_name": "torch.transpose", "li...
74819064360
from flask import Flask, render_template, request, redirect, url_for, send_file, flash from youtube_downloader import VideoDownloader, PlaylistDownloader from io import BytesIO from zipfile import ZipFile app = Flask(__name__) app.config['SECRET_KEY'] = 'Powerful Secret Key' @app.route('/', methods=['GET', 'POST']) d...
MaarkNassef/YouTubeDownloader
app.py
app.py
py
3,444
python
en
code
0
github-code
18
[ { "api_name": "flask.Flask", "line_number": 6, "usage_type": "call" }, { "api_name": "flask.request.method", "line_number": 11, "usage_type": "attribute" }, { "api_name": "flask.request", "line_number": 11, "usage_type": "name" }, { "api_name": "flask.render_templ...
29808135228
from tkinter import * from PIL import ImageTk, Image import t import callfunction #from tqdm import tqdm class MyWindow: data=[] def __init__(self, win): #replace data with values of list ima=Image.open('hevo1.png') pho=ImageTk.PhotoImage(ima) i4=Label(win...
oshivarma/Identify-Fake-Email
gui.py
gui.py
py
2,077
python
en
code
0
github-code
18
[ { "api_name": "PIL.Image.open", "line_number": 12, "usage_type": "call" }, { "api_name": "PIL.Image", "line_number": 12, "usage_type": "name" }, { "api_name": "PIL.ImageTk.PhotoImage", "line_number": 13, "usage_type": "call" }, { "api_name": "PIL.ImageTk", "li...
8225019591
import sys import submodels_module as modelbank import numpy as np import matplotlib as mpl mpl.use('Agg') import matplotlib.pyplot as plt from scipy.stats import ttest_ind_from_stats as ttest import load_format_data def main(): ''' train a model if we only had sorted into 2 gates instead of 4 ...
HackelLab-UMN/DevRep
main_paper_one/main_twogateassay.py
main_twogateassay.py
py
3,753
python
en
code
4
github-code
18
[ { "api_name": "matplotlib.use", "line_number": 5, "usage_type": "call" }, { "api_name": "sys.argv", "line_number": 16, "usage_type": "attribute" }, { "api_name": "submodels_module.twogate_assay_to_yield_model", "line_number": 33, "usage_type": "call" }, { "api_nam...
34786736124
from fastapi import status from fastapi.responses import JSONResponse from app.apis.schemas.errors_schema import ApiError # Function that wraps the error response into predefined schema def generate_api_error_response(status_code: int, detail: str) -> JSONResponse: return JSONResponse( status_code=status...
hutanmihai/FMI
Anul II/Semestrul II/MDS/ProiectMDS/calorie-tracker-backend/app/apis/utils/utils.py
utils.py
py
1,081
python
en
code
1
github-code
18
[ { "api_name": "fastapi.responses.JSONResponse", "line_number": 9, "usage_type": "call" }, { "api_name": "app.apis.schemas.errors_schema.ApiError", "line_number": 11, "usage_type": "call" }, { "api_name": "fastapi.responses.JSONResponse", "line_number": 8, "usage_type": "n...
18614036309
import sys from streamlit import cli as stcli from folium.plugins import HeatMap import folium from streamlit_folium import folium_static import tempfile import streamlit as st import pandas as pd import numpy as np from PIL import Image import time import os import json import torch import cv2 ...
sweetlhare/rescue-Kamchatka-animals
main.py
main.py
py
8,922
python
ru
code
1
github-code
18
[ { "api_name": "torch.hub.load", "line_number": 28, "usage_type": "call" }, { "api_name": "torch.hub", "line_number": 28, "usage_type": "attribute" }, { "api_name": "streamlit.cache", "line_number": 26, "usage_type": "call" }, { "api_name": "pandas.read_csv", "...
3330774416
# Задание №4 # Создать программу, которая будет производить подсчет количества слов в # каждом файле в указанной директории и выводить результаты в консоль. # Используйте потоки. import os import asyncio import aiofiles as aiofiles import aiohttp import time async def word_counter(file_path): # вариант 1 - with o...
pvs7918/StudyPyt2
StudyFlask/seminar4/lesson/task6/task6.py
task6.py
py
1,477
python
ru
code
0
github-code
18
[ { "api_name": "aiofiles.open", "line_number": 17, "usage_type": "call" }, { "api_name": "os.walk", "line_number": 25, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 27, "usage_type": "call" }, { "api_name": "os.path", "line_number": 27, ...
41067746069
from typing import Optional from datetime import datetime from uuid import UUID class User: def __init__( self, id: str, display_name: str, email: str, created_at: int, ) -> None: self.id = id self.email = email self.created_at = created_at ...
sunero4/campaigneon
backend/backend/db/models.py
models.py
py
2,573
python
en
code
0
github-code
18
[ { "api_name": "uuid.UUID", "line_number": 23, "usage_type": "name" }, { "api_name": "datetime.datetime", "line_number": 28, "usage_type": "name" }, { "api_name": "datetime.datetime", "line_number": 29, "usage_type": "name" }, { "api_name": "typing.Optional", "...
4586452965
import os import sys import time import unittest import uuid from ament_index_python.packages import get_package_share_directory from launch.launch_description_sources import PythonLaunchDescriptionSource from launch.actions import IncludeLaunchDescription import launch import launch_ros import launch_ros.actions i...
thehummingbird/ros2_boilerplate
src/perception/test/test_perception.py
test_perception.py
py
2,940
python
en
code
0
github-code
18
[ { "api_name": "os.path.dirname", "line_number": 32, "usage_type": "call" }, { "api_name": "os.path", "line_number": 32, "usage_type": "attribute" }, { "api_name": "ament_index_python.packages.get_package_share_directory", "line_number": 33, "usage_type": "call" }, { ...
14729114274
import json import logging import requests from models import User from oauth2client.crypt import AppIdentityError from oauth2client import client from app_config import config from stormpath.resources import Provider from stormpath.error import Error as StormpathError def get_auth_application(): return config.ST...
agosto-travisblanton/fork-test
lib/usr/stormpath_api.py
stormpath_api.py
py
2,265
python
en
code
0
github-code
18
[ { "api_name": "app_config.config.STORMPATH_CLIENT.applications.search", "line_number": 13, "usage_type": "call" }, { "api_name": "app_config.config.STORMPATH_CLIENT", "line_number": 13, "usage_type": "attribute" }, { "api_name": "app_config.config", "line_number": 13, "us...
10053773221
from collections import OrderedDict from typing import List import pandas as pd class TaskField: def __init__(self, name: str = None): if name is None: self.name = type(self).__name__ else: self.name = name def get(self, task_id: int): return task_id class T...
AllenMuhanChen/EStimShape
EStimShapeAnalysis/src/compile/task/task_field.py
task_field.py
py
2,300
python
en
code
0
github-code
18
[ { "api_name": "typing.List", "line_number": 18, "usage_type": "name" }, { "api_name": "pandas.DataFrame", "line_number": 34, "usage_type": "call" }, { "api_name": "pandas.DataFrame", "line_number": 24, "usage_type": "attribute" }, { "api_name": "pandas.DataFrame",...
13037886892
import pandas as pd import numpy as np import datetime def ex1(): dt_rng = pd.date_range('2015-03-02 00:00:00', '2015-03-03 23:00:00', freq='H') print(dt_rng) def ex2(): dt_rng = pd.date_range('2015-03-02 00:00:00', '2015-03-03 23:00:00', freq='H') print(dt_rng) def ex3(): dt_rng = pd.date_ran...
yizhaocs/python-jupyter-notebook
pandas_timeseries_operation.py
pandas_timeseries_operation.py
py
1,372
python
en
code
0
github-code
18
[ { "api_name": "pandas.date_range", "line_number": 7, "usage_type": "call" }, { "api_name": "pandas.date_range", "line_number": 12, "usage_type": "call" }, { "api_name": "pandas.date_range", "line_number": 17, "usage_type": "call" }, { "api_name": "pandas.date_rang...
15854529404
from models import * from flask import abort def clean_posts(): [db.session.delete(post) for post in DeletedPost.query.all() if User.query.filter_by(email=post.json_column["author_email"]).first() is None] for post in BlogPost.query.all(): try: user = User.query.filter_by(email=post.a...
ethanzrd/RESTful-blog-restructured
maintenance.py
maintenance.py
py
2,006
python
en
code
1
github-code
18
[ { "api_name": "flask.abort", "line_number": 48, "usage_type": "call" } ]
39207743053
# import pygame from pygame import Surface, Rect from pygame.event import Event # import pygame_gui from pygame_gui import UIManager, UI_BUTTON_PRESSED from pygame_gui.elements import UIButton # import parent class from IAppState import IAppState class MainMenuState(IAppState): # class inherits from IAppState ...
Asmaar56/Recordings2
menu_states/main_menu_state.py
main_menu_state.py
py
7,680
python
en
code
0
github-code
18
[ { "api_name": "IAppState.IAppState", "line_number": 13, "usage_type": "name" }, { "api_name": "pygame.Surface", "line_number": 17, "usage_type": "name" }, { "api_name": "pygame_gui.UIManager", "line_number": 19, "usage_type": "name" }, { "api_name": "pygame.Surfac...
73656068520
# @author Filip Durca # This is the main file that compiles the data # import import requests import json # Variables URL = "https://data.ontario.ca/api/3/action/datastore_search?resource_id=455fd63b-603d-4608-8216-7d8647f43350&limit=300000" request = requests.get(URL) data = request.json(); d = data.get("result") re...
fdurca/Ontario_Covid_19_Data
Main.py
Main.py
py
1,131
python
en
code
0
github-code
18
[ { "api_name": "requests.get", "line_number": 10, "usage_type": "call" } ]
12877813065
#!/usr/bin/env python # -*- coding: utf-8 -*- #-- General imports --# import json import os from datetime import datetime, timedelta from pprint import pprint from copy import deepcopy as copy from termcolor import colored import base64 #-- 3rd Party imports --# from Crypto.Cipher import AES class Chats(object): ...
VictorBusque/FIB-Chatbot
Fibot/chats.py
chats.py
py
6,433
python
en
code
12
github-code
18
[ { "api_name": "os.getenv", "line_number": 42, "usage_type": "call" }, { "api_name": "json.load", "line_number": 52, "usage_type": "call" }, { "api_name": "json.load", "line_number": 64, "usage_type": "call" }, { "api_name": "json.dump", "line_number": 73, ...
70377503400
""" This file is part of the tractor library. See LICENSE.txt for licensing, CONTRIBUTORS.txt for contributor information. Created on Jan 06, 2012. """ from StringIO import StringIO from datetime import datetime from tractor.attachment import AttachmentWrapper from tractor.attachment import Base64Converter from tract...
helixyte/tractor
tractor/tests/test_attachment.py
test_attachment.py
py
5,970
python
en
code
3
github-code
18
[ { "api_name": "tractor.tests.base.BaseTestCase", "line_number": 17, "usage_type": "name" }, { "api_name": "xmlrpclib.Binary", "line_number": 21, "usage_type": "call" }, { "api_name": "tractor.attachment.Base64Converter.encode_string", "line_number": 22, "usage_type": "cal...
31936446995
import netmiko as nk import re def Buscar(macadd,conex): macta = conex.send_command("show mac address-table | include " + macadd) mat=re.compile(r"\s*?(\d\s+[a-f0-9]{1,4}\.[a-f0-9]{1,4}\.[a-f0-9]{1,4}\s+\w+)\s+((Fa|Gi)\d{1,2}\/\d{1,2}\/?(\d{1,2})?)") checar = mat.search(macta) if checar != None:...
Mauricio-Macias-Quezada/Script-Find-MAC-Address
App Find MAC Address.py
App Find MAC Address.py
py
5,018
python
en
code
0
github-code
18
[ { "api_name": "re.compile", "line_number": 6, "usage_type": "call" }, { "api_name": "re.findall", "line_number": 14, "usage_type": "call" }, { "api_name": "re.findall", "line_number": 17, "usage_type": "call" }, { "api_name": "re.compile", "line_number": 20, ...
21047050023
from decimal import * import gmpy2 getcontext().prec = 102 sum = 0 for i in range(2, 100): if (gmpy2.is_square(i)): continue sq = Decimal(i).sqrt() st = str(sq) st = st[:-2] for s in st: if (s != '.'): sum += int(s) print(sum)
nicholas-wacks/nwacks-project-euler
Euler/Complete/Problem80.py
Problem80.py
py
288
python
en
code
0
github-code
18
[ { "api_name": "gmpy2.is_square", "line_number": 9, "usage_type": "call" } ]
9250132866
#!/usr/bin/env python3 #---------------------------------------------------- # Created By: Irsyaad Hasif (hasifirsyaad@gmail.com) # Created On: 26 Apr 2022 # Version: 1.0 #---------------------------------------------------- # This script batch downloads RefSeq complete genomes # classified under a specific taxonomic...
hasnotif/cavs-taxonomic-classification
batch_download_refseq.py
batch_download_refseq.py
py
4,423
python
en
code
0
github-code
18
[ { "api_name": "argparse.ArgumentParser", "line_number": 18, "usage_type": "call" }, { "api_name": "re.compile", "line_number": 42, "usage_type": "call" }, { "api_name": "re.compile", "line_number": 43, "usage_type": "call" }, { "api_name": "re.compile", "line_...
28647784731
# this class will have all the helper functions for the API classes # decision should be made later if we have to seperate the helpfer function by API from flask import current_app from .gdbmethods import GDBUser #from .models import EmailUserQueue from .friendlistdb import FriendListDB from .mongodbfunc import MongoDB...
4000Eyes/fte-source
app/model/classhelper.py
classhelper.py
py
6,114
python
en
code
0
github-code
18
[ { "api_name": "mongodbfunc.MongoDBFunctions", "line_number": 23, "usage_type": "call" }, { "api_name": "friendlistdb.FriendListDB", "line_number": 24, "usage_type": "call" }, { "api_name": "gdbmethods.GDBUser", "line_number": 25, "usage_type": "call" }, { "api_nam...
18257673353
# import the class that allows us to have abstract classes from abc import ABCMeta, abstractmethod # import the needed classes: # navigableMenuOption : The mother class # newsCategories : a sub option from menu.navigableMenuOption import NavigableMenuOption from newsCategories import NewsCategories import config.j...
StefanoBerlato/Joni
JoniClient/menu/features/newsFeature/newsMenu.py
newsMenu.py
py
2,783
python
en
code
0
github-code
18
[ { "api_name": "menu.navigableMenuOption.NavigableMenuOption", "line_number": 13, "usage_type": "name" }, { "api_name": "abc.ABCMeta", "line_number": 14, "usage_type": "name" }, { "api_name": "config.joniConfig.areThereNewCategories", "line_number": 46, "usage_type": "attr...
37273781004
from django.shortcuts import render from django.http import Http404 from django.views import View import random # Create your views here. ingredients = { 'meats': ['honey glazed turkey', 'beef salami', 'chicken cutlet', 'pastrami', 'ham'], 'cheeses': ['mozzarella', 'provolone', 'muenster', 'american', 'pepper ...
jerielslay/sandwich-maker
sandwich_maker/sandwichapp/views.py
views.py
py
1,970
python
en
code
0
github-code
18
[ { "api_name": "django.views.View", "line_number": 13, "usage_type": "name" }, { "api_name": "django.shortcuts.render", "line_number": 15, "usage_type": "call" }, { "api_name": "django.views.View", "line_number": 21, "usage_type": "name" }, { "api_name": "django.ht...
23576736691
import pandas as pd from matplotlib import pyplot as plt csv0 = pd.read_csv('./dataset/datasetsporvo0.csv') csv0 = pd.read_csv('./dataset/datasetsporvo0.csv') csv1 = pd.read_csv('./dataset/datasetsporco.csv') csv2 = pd.read_csv('./dataset/datasetsporco2.csv') csv3 = pd.read_csv('./dataset/datasetsporco3.csv') csv4 = ...
peppoct/SentimentAnalysisGreenpass
cumulative_graph.py
cumulative_graph.py
py
1,885
python
en
code
0
github-code
18
[ { "api_name": "pandas.read_csv", "line_number": 5, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 6, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 7, "usage_type": "call" }, { "api_name": "pandas.read_csv", "l...
40969910772
#code # Time Complexity - 0(N*N!) # Space Complexity - O(N) from itertools import permutations for _ in range(int(input())): s=str(input()) s=sorted(s) for i in permutations(s): k=''.join(map(str,i)) print (k,end=" ") print ()
BeerBytesIN/batch-nov-20
parnamondal/Week - 3/Day - 2/Permutations of a given string.py
Permutations of a given string.py
py
261
python
en
code
2
github-code
18
[ { "api_name": "itertools.permutations", "line_number": 10, "usage_type": "call" } ]
37365313540
from bs4 import BeautifulSoup from helper import Remove_Character, Get_Position_Value, Join_Value_With, Remove_Unusal_Spaces, Name_Attribute from db_configuration import db import re from helper import * #Function to Scrap Data def extractInfo(HtmlPage, collection_name, name_institute, id): soup = BeautifulSoup(H...
lalitmahato/NICHE_image_scrapping
scrapping.py
scrapping.py
py
15,855
python
en
code
0
github-code
18
[ { "api_name": "bs4.BeautifulSoup", "line_number": 10, "usage_type": "call" }, { "api_name": "db_configuration.db", "line_number": 27, "usage_type": "name" }, { "api_name": "db_configuration.db", "line_number": 34, "usage_type": "name" }, { "api_name": "bs4.Beautif...
1691397121
from django.http import HttpResponse from django.shortcuts import render, get_object_or_404 from .models import Post, Group # функция для index.html def index(request): title: str = 'Последние обновления на сайте.' # в переменную posts будет сохранена выборка из 10 объектов модели Post, # отсортированных...
Aleksey1976viktorovich/hw02_community_yatube
yatube/posts/views.py
views.py
py
1,480
python
ru
code
0
github-code
18
[ { "api_name": "models.Post.objects.order_by", "line_number": 13, "usage_type": "call" }, { "api_name": "models.Post.objects", "line_number": 13, "usage_type": "attribute" }, { "api_name": "models.Post", "line_number": 13, "usage_type": "name" }, { "api_name": "dja...
11901647199
# -*- coding:utf-8 -*- import json import sys def main(input_json, output_json): bullet_path = 'predict.label' ERROR_CASE_OUTPUT = 1 error_case_path = 'error_case.json' if ERROR_CASE_OUTPUT == 1: error_case_stream = open(error_case_path, 'w') error_case = [] error_case_num = 0 ...
safpla/zzq
demo/label_reload.py
label_reload.py
py
1,792
python
en
code
1
github-code
18
[ { "api_name": "json.load", "line_number": 18, "usage_type": "call" }, { "api_name": "json.dump", "line_number": 36, "usage_type": "call" }, { "api_name": "json.dump", "line_number": 37, "usage_type": "call" }, { "api_name": "sys.argv", "line_number": 42, "...