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
70754529959
import os import pickle import string import time from collections import Counter import classla import numpy as np import pandas as pd from keras.layers import Dense from keras.models import Sequential, load_model from nltk.tokenize import word_tokenize from sklearn.feature_extraction.text import TfidfVectorizer from...
azagsam/cerif_classification
cerif_train.py
cerif_train.py
py
13,752
python
en
code
0
github-code
18
[ { "api_name": "tqdm.tqdm.pandas", "line_number": 24, "usage_type": "call" }, { "api_name": "tqdm.tqdm", "line_number": 24, "usage_type": "name" }, { "api_name": "collections.Counter", "line_number": 56, "usage_type": "call" }, { "api_name": "sklearn.preprocessing....
17859892202
import datetime as dt from typing import List from django.utils import timezone from pets.models import Pet, PetOwnership from users.models import User class CreatePet: def run( self, *, name: str, official_name: str = "", date_of_birth: dt.date = None, image: str...
Aperyon/kitty_nurse_backend
src/pets/use_cases/create_pet.py
create_pet.py
py
1,377
python
en
code
0
github-code
18
[ { "api_name": "datetime.date", "line_number": 16, "usage_type": "attribute" }, { "api_name": "typing.List", "line_number": 24, "usage_type": "name" }, { "api_name": "users.models.User", "line_number": 24, "usage_type": "name" }, { "api_name": "pets.models.Pet", ...
40706995721
import json from channels.generic.websocket import AsyncWebsocketConsumer # The class we're using from asgiref.sync import sync_to_async from .models import Message from django.template import Context, Template class ChatConsumer(AsyncWebsocketConsumer): async def connect(self): self.room_group_name = 'ch...
warhunt/wolly_social_network
main/consumers.py
consumers.py
py
1,749
python
en
code
0
github-code
18
[ { "api_name": "channels.generic.websocket.AsyncWebsocketConsumer", "line_number": 8, "usage_type": "name" }, { "api_name": "json.loads", "line_number": 27, "usage_type": "call" }, { "api_name": "django.template.Template", "line_number": 39, "usage_type": "call" }, { ...
25285005043
from django.db import models class Category(models.Model): name = models.CharField(max_length=100) parent = models.ForeignKey('self', on_delete=models.CASCADE, related_name='subcategories', null=True, blank=True) created_at = models.DateTimeField(auto_now_add=True) updated_at = models.DateTimeField(...
UmirovJobir/Imodels
shop/models/category.py
category.py
py
701
python
en
code
0
github-code
18
[ { "api_name": "django.db.models.Model", "line_number": 4, "usage_type": "attribute" }, { "api_name": "django.db.models", "line_number": 4, "usage_type": "name" }, { "api_name": "django.db.models.CharField", "line_number": 5, "usage_type": "call" }, { "api_name": "...
74343087719
from uuid import uuid4 from .group import Group class Family: def __init__(self, download_type=None, family_id=None, headers=None, metadata=None, base_url=""): self.download_type = download_type if not family_id: self.family_id = str(uuid4()) else: self.family_id...
xtracthub/xtract-sdk
xtract_sdk/packagers/family.py
family.py
py
2,586
python
en
code
3
github-code
18
[ { "api_name": "uuid.uuid4", "line_number": 12, "usage_type": "call" }, { "api_name": "uuid.uuid4", "line_number": 30, "usage_type": "call" }, { "api_name": "uuid.uuid4", "line_number": 36, "usage_type": "call" }, { "api_name": "group.Group", "line_number": 39,...
72877223719
import get_growth import datetime def test_indexname_to_point_valid(): """ Confirm that indexname_to_point() returns a valid point if given a valid filename with a date """ ten_days_ago = datetime.date.today() - datetime.timedelta(10) assert get_growth.index_name_to_point(ten_days_ago.strftime('so...
lhelman/elasticsearch_growth
tests/test_get_growth.py
test_get_growth.py
py
2,789
python
en
code
0
github-code
18
[ { "api_name": "datetime.date.today", "line_number": 9, "usage_type": "call" }, { "api_name": "datetime.date", "line_number": 9, "usage_type": "attribute" }, { "api_name": "datetime.timedelta", "line_number": 9, "usage_type": "call" }, { "api_name": "get_growth.ind...
28417235663
import requests, json, openpyxl from datetime import datetime,timedelta #scrap.py Program to get rate and availability data from booking engine print("Program to fetch rate and availability") todayDate = datetime.now() #getting and validating input for start date while True: print("Please enter the ...
haditedi/hotel---apartments-api
hotel-api.py
hotel-api.py
py
5,205
python
en
code
0
github-code
18
[ { "api_name": "datetime.datetime.now", "line_number": 10, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 10, "usage_type": "name" }, { "api_name": "datetime.datetime.strptime", "line_number": 17, "usage_type": "call" }, { "api_name": "da...
3441823165
from socket import* import json import os import struct # 服务器端文件夹位置 FILEPATH = "E:/Pythonproject/" # 创建sever服务器 sever = socket(AF_INET, SOCK_STREAM) ip_port = ('192.168.31.190',5354) buffSize = 1024 # 监听 sever.bind(ip_port) sever.listen(5) while True: # 连接客户端 print("waiting for connection......\n") clie...
DoubleZeroWater/LocalChat
Transfer_File/receive.py
receive.py
py
2,230
python
zh
code
0
github-code
18
[ { "api_name": "struct.unpack", "line_number": 32, "usage_type": "call" }, { "api_name": "json.loads", "line_number": 38, "usage_type": "call" } ]
39803007680
import numpy as np import cv2 import math import matplotlib.pyplot as plt from collections import namedtuple def cutImage(image): # borderGrey = cv2.adaptiveThreshold(cv2.cvtColor(image, cv2.COLOR_RGB2GRAY),255,cv2.ADAPTIVE_THRESH_GAUSSIAN_C,\ # cv2.THRESH_BINARY,11,2) borderGrey = cv2.cvtColo...
bhruszka/Bachelor-Thesis-App
PracaInzWebApp/Segmentation/ImageTranformation.py
ImageTranformation.py
py
2,813
python
en
code
0
github-code
18
[ { "api_name": "cv2.cvtColor", "line_number": 15, "usage_type": "call" }, { "api_name": "cv2.COLOR_RGB2GRAY", "line_number": 15, "usage_type": "attribute" }, { "api_name": "numpy.array", "line_number": 23, "usage_type": "call" }, { "api_name": "cv2.cvtColor", "...
9715987140
import torch import matplotlib matplotlib.use("WebAgg") import matplotlib.pyplot as plt from utils.polynomials import Legendre, Chebyshev from utils.tools import MSE from src.geometries.data import get_htc2022_train_phantoms from geometries import HTC2022_GEOMETRY as geometry, enforce_moment_constraints, get_moment_m...
EricOldgren/KEX---CT-reconstruction
src/training/sinos_playing.py
sinos_playing.py
py
2,056
python
en
code
0
github-code
18
[ { "api_name": "matplotlib.use", "line_number": 4, "usage_type": "call" }, { "api_name": "src.geometries.data.get_htc2022_train_phantoms", "line_number": 14, "usage_type": "call" }, { "api_name": "geometries.HTC2022_GEOMETRY.project_forward", "line_number": 15, "usage_type...
7727154563
from tkinter import * from typing import Tuple from PIL import Image, ImageTk from cv2 import add # from matplotlib.pyplot import fill from numpy import angle from pyparsing import col from deepfaceT.deepface.DeepFace import stream from auth import * from tkinter.ttk import Progressbar from tkcalendar import * import d...
Muhd-Faiq/Emotect-Desktop
home.py
home.py
py
18,335
python
en
code
0
github-code
18
[ { "api_name": "EmotionObj.EmotionObj", "line_number": 42, "usage_type": "call" }, { "api_name": "tkinter.font.Font", "line_number": 48, "usage_type": "call" }, { "api_name": "tkinter.font", "line_number": 48, "usage_type": "name" }, { "api_name": "json.loads", ...
38053676389
import requests from requests.exceptions import MissingSchema from bs4 import BeautifulSoup as soup import re import sys import time agent = requests.utils.default_headers() agent.update({ "User-Agent":'Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36',...
meghu2791/EntityMatching
Stage2/CODE/stage2_1.py
stage2_1.py
py
2,992
python
en
code
0
github-code
18
[ { "api_name": "requests.utils.default_headers", "line_number": 9, "usage_type": "call" }, { "api_name": "requests.utils", "line_number": 9, "usage_type": "attribute" }, { "api_name": "requests.get", "line_number": 16, "usage_type": "call" }, { "api_name": "bs4.Bea...
71210648359
import json import logging from cpc.network.com.input import Input from cpc.network.com.server_connection import ServerConnection from cpc.network.server_request import ServerRequest from cpc.util import json_serializer from cpc.util.conf.server_conf import ServerConf log=logging.getLogger(__name__) class DirectServer...
gromacs/copernicus
cpc/server/message/direct_message.py
direct_message.py
py
4,260
python
en
code
17
github-code
18
[ { "api_name": "logging.getLogger", "line_number": 9, "usage_type": "call" }, { "api_name": "cpc.network.com.server_connection.ServerConnection", "line_number": 10, "usage_type": "name" }, { "api_name": "cpc.network.com.input.Input", "line_number": 22, "usage_type": "call"...
28713590200
from flask import Blueprint,request,redirect,url_for from flask import render_template,request import os from flask import current_app from cse_a import app from cse_a.models import Message,db,Attendance,Cse_Gallery,Technical from PIL import Image from cse_a.forms import Gallery import datetime import boto3 import req...
maheshdrago/cse-a
cse_a/views.py
views.py
py
7,188
python
en
code
1
github-code
18
[ { "api_name": "flask.Blueprint", "line_number": 15, "usage_type": "call" }, { "api_name": "boto3.client", "line_number": 16, "usage_type": "call" }, { "api_name": "flask.render_template", "line_number": 22, "usage_type": "call" }, { "api_name": "flask.render_templ...
27000646793
# Advent of Code 2022 Day 08 # Author: Erik Båvenstrand # URL: https://adventofcode.com/2022/day/8 from typing import Union import numpy as np def get_visible_range(height: int, view): blockers = np.where(view >= height) return len(view) if len(blockers[0]) == 0 else blockers[0][0] + 1 def part_a(data: li...
ErikBavenstrand/Advent-of-Code
2022/08/code.py
code.py
py
2,123
python
en
code
0
github-code
18
[ { "api_name": "numpy.where", "line_number": 11, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_number": 24, "usage_type": "call" }, { "api_name": "numpy.max", "line_number": 33, "usage_type": "call" }, { "api_name": "numpy.max", "line_number": 34, ...
11183097001
import collections def left_of_expandable(index, list, placeholder=None): new_index = index - 1 while new_index < 0: list.insert(0, placeholder) new_index += 1 return new_index def left_of_unexpandable(index, list, placeholder=None): new_index = index - 1 if new_index < 0: ...
mjutzi/TikzTuringSimulator
core/tape_expansion.py
tape_expansion.py
py
1,269
python
en
code
1
github-code
18
[ { "api_name": "collections.namedtuple", "line_number": 32, "usage_type": "call" } ]
35079179377
import os import pickle from sklearn.feature_extraction.text import TfidfVectorizer # 主要配置两个路径即可,第一个是读取的jieba分完词后的dir # 第二个是保存fit_params 的路径 resultdir = "D:/AAA/nlpdata/testJiebaClassFile" tfidftransformer_path = 'D:/AAA/nlpdata/tfidftransformer.pkl' list_file = os.listdir(resultdir) # 用于存放所有的文档字符串 fitlist = [] for...
Anlysqx/newTextClassification
save_fit_params.py
save_fit_params.py
py
765
python
en
code
0
github-code
18
[ { "api_name": "os.listdir", "line_number": 10, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 16, "usage_type": "call" }, { "api_name": "os.path", "line_number": 16, "usage_type": "attribute" }, { "api_name": "sklearn.feature_extraction.text....
25313010560
#!/usr/bin/env python3.7 # -*- coding: utf-8 -*- from collections import namedtuple from distutils.version import LooseVersion from importlib import import_module from subprocess import PIPE, call from sys import executable InstallStatus = namedtuple('InstallStatus', ('status', 'package', 'version')) InstallStatus.__s...
vikasmunshi/python-scripts
scripts/install_package.py
install_package.py
py
1,354
python
en
code
0
github-code
18
[ { "api_name": "collections.namedtuple", "line_number": 9, "usage_type": "call" }, { "api_name": "distutils.version.LooseVersion", "line_number": 15, "usage_type": "call" }, { "api_name": "subprocess.call", "line_number": 18, "usage_type": "call" }, { "api_name": "...
38360401030
import uvicorn from typing import Optional from fastapi import FastAPI from pydantic import BaseModel app = FastAPI() m = [] @app.get("/") def Root(): return "Hello World" @app.get("/api/products") # список товаров def watch_all_products(): global m if not m: return "Товары отсутствуют" retur...
MaxonPy/task_2
main.py
main.py
py
1,725
python
en
code
0
github-code
18
[ { "api_name": "fastapi.FastAPI", "line_number": 6, "usage_type": "call" }, { "api_name": "uvicorn.run", "line_number": 61, "usage_type": "call" } ]
23058201451
class ZigZagConversion(object): def zigZagConversion(self, string, numberOfRows): if numberOfRows == 1: return string self.rows = [[] for counter in range(numberOfRows)] currentRow = 0 direction = 1 for _, character in enumerate(string): self.rows[currentRow].append(character) ...
Shamanyu/DataStructuresAndAlgorithms
LeetCode/ZigZagConversion/zig_zag_conversion/zig_zag_conversion.py
zig_zag_conversion.py
py
1,221
python
en
code
0
github-code
18
[ { "api_name": "nose.tools.assert_equals", "line_number": 30, "usage_type": "call" }, { "api_name": "nose.tools.assert_equals", "line_number": 32, "usage_type": "call" } ]
5778674492
from datetime import datetime from playsound import playsound from gtts import gTTS import os text="Wake up it's Time To go" output=gTTS(text=text,lang='en',slow=False) output.save('output.mp3') alarm_time=input("Enter the time for the alarm :HH:MM:SS\n") alarm_hour=alarm_time[0:2] alarm_minute=alarm_time[3:...
Kumar-prog-cyber/alarm_clock
AlarmClock.py
AlarmClock.py
py
925
python
en
code
0
github-code
18
[ { "api_name": "gtts.gTTS", "line_number": 6, "usage_type": "call" }, { "api_name": "datetime.datetime.now", "line_number": 16, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 16, "usage_type": "name" }, { "api_name": "playsound.playsound"...
10549594019
""" This modules does XXX """ import pickle from io import BufferedWriter from typing import Any, Union import pandas as pd from astropy.io import fits from numpy import str_ from . import pickle_protocol_version def open_pickle(filename): if filename.split(".")[-1] == "p": a = pd.read_pickle(filename)...
denisrosset/yarara
src/yarara/io.py
io.py
py
979
python
en
code
0
github-code
18
[ { "api_name": "pandas.read_pickle", "line_number": 18, "usage_type": "call" }, { "api_name": "astropy.io.fits.getdata", "line_number": 21, "usage_type": "call" }, { "api_name": "astropy.io.fits", "line_number": 21, "usage_type": "name" }, { "api_name": "astropy.io...
8727761840
import pandas as pd from sqlalchemy import create_engine, schema as saschema engine = create_engine('postgresql://postgres:mypasswd@pg-host:5432/') schema_name = 'feast' table_name1 = 'data_df1' table_name2 = 'data_df2' table_name3 = 'data_df3' table_name4 = 'data_df4' table_target = 'target_df' if not engine.dialect...
Paulo-A/Feast-Example
breast_cancer/create_dataset.py
create_dataset.py
py
3,552
python
en
code
0
github-code
18
[ { "api_name": "sqlalchemy.create_engine", "line_number": 4, "usage_type": "call" }, { "api_name": "sqlalchemy.schema.CreateSchema", "line_number": 13, "usage_type": "call" }, { "api_name": "sqlalchemy.schema", "line_number": 13, "usage_type": "name" }, { "api_name...
28335058782
""" ELR Scorer ========== Scorer for MRF based models. Supports FSDM and ELR-based models. :Author: Faegheh Hasibi """ from __future__ import division import argparse import json import math from collections import defaultdict from pprint import pprint from nordlys.core.ml.instance import Instance from nordlys.cor...
iai-group/nordlys
nordlys/logic/elr/scorer_elr.py
scorer_elr.py
py
7,773
python
en
code
32
github-code
18
[ { "api_name": "nordlys.core.retrieval.scorer.ScorerPRMS", "line_number": 59, "usage_type": "call" }, { "api_name": "math.log", "line_number": 124, "usage_type": "call" }, { "api_name": "collections.defaultdict", "line_number": 144, "usage_type": "call" }, { "api_n...
4820585182
""" 2419. Longest Subarray With Maximum Bitwise AND You are given an integer array nums of size n. Consider a non-empty subarray from nums that has the maximum possible bitwise AND. - In other words, let k be the maximum value of the bitwise AND of any subarray of nums. Then, only subarrays with a bitwise AND equal to ...
tkwang0530/LeetCode
2419.py
2419.py
py
1,941
python
en
code
4
github-code
18
[ { "api_name": "typing.List", "line_number": 42, "usage_type": "name" }, { "api_name": "unittest.TestCase", "line_number": 61, "usage_type": "attribute" }, { "api_name": "unittest.main", "line_number": 74, "usage_type": "call" } ]
74518804198
from rest_framework.views import APIView from rest_framework.response import Response from . import models, serializers from space_manager.rooms import models as rooms_models from space_manager.membership import models as membership_models from space_manager.branches import models as branch_models from space_manager.us...
yoojat/Space-Manager
space_manager/seats/views.py
views.py
py
23,087
python
ko
code
0
github-code
18
[ { "api_name": "rest_framework.views.APIView", "line_number": 14, "usage_type": "name" }, { "api_name": "rest_framework.response.Response", "line_number": 26, "usage_type": "call" }, { "api_name": "rest_framework.status.HTTP_404_NOT_FOUND", "line_number": 26, "usage_type":...
24950153846
import controller import time import datetime start_time = time.time() ####define com ports for controller and baudrate (keep at 115200) port = "COM5" baud_rate = 115200 setup = controller.Setup(port, baud_rate) setup.connect() #################### Fluidics parameters ########################### wait = 10 move = co...
jrlLAB/ElectroLab
src/electrolab/a_initialization.py
a_initialization.py
py
2,733
python
en
code
1
github-code
18
[ { "api_name": "time.time", "line_number": 5, "usage_type": "call" }, { "api_name": "controller.Setup", "line_number": 11, "usage_type": "call" }, { "api_name": "controller.Motor", "line_number": 16, "usage_type": "call" }, { "api_name": "controller.MainPower", ...
32187693095
import time import traceback import aiohttp import feedparser import requests from app.models.rss_post_model import RSSPostModel from app.schemas.rss_post_schema import RSSPostCreate from app.schemas.rss_source_schema import RSSSource class Parser: def __init__(self) -> None: pass def _strip_feed(s...
vertexofvortex/vk-rss-backend
app/utils/parser/parser.py
parser.py
py
4,265
python
en
code
0
github-code
18
[ { "api_name": "app.schemas.rss_source_schema.RSSSource", "line_number": 17, "usage_type": "name" }, { "api_name": "app.schemas.rss_post_schema.RSSPostCreate", "line_number": 22, "usage_type": "call" }, { "api_name": "time.mktime", "line_number": 38, "usage_type": "call" ...
35515099256
import subprocess import pytest def git_is_not_installed(): try: subprocess.check_output(['which', 'git']) return False except Exception: return True pytestmark = pytest.mark.skipif( git_is_not_installed(), reason='git is not installed', ) def test_git(flamingo_env, run)...
pengutronix/flamingo
tests/test_plugin_Git.py
test_plugin_Git.py
py
2,110
python
en
code
18
github-code
18
[ { "api_name": "subprocess.check_output", "line_number": 8, "usage_type": "call" }, { "api_name": "pytest.mark.skipif", "line_number": 16, "usage_type": "call" }, { "api_name": "pytest.mark", "line_number": 16, "usage_type": "attribute" }, { "api_name": "logging.ER...
70165317801
#!/usr/bin/env python # -*- encoding: utf-8 -*- # python main.py --model resnet --model_depth 34 --n_classes 3 import torch import torch.utils.data as Data import torch.nn as nn import os import torchvision.transforms as transforms import torchvision.transforms.functional as TF from matplotlib import pyplot as plt fr...
bx-h/3d-cnn-mri
main.py
main.py
py
8,432
python
en
code
1
github-code
18
[ { "api_name": "os.system", "line_number": 35, "usage_type": "call" }, { "api_name": "logger.tensorboard_dir", "line_number": 35, "usage_type": "argument" }, { "api_name": "torch.device", "line_number": 40, "usage_type": "call" }, { "api_name": "logger.log.logger.i...
30523441202
from collections import deque from bisect import bisect_left x = int(input()) num = set(range(1, 100)) d = deque() for i in range(10, 100): d.append(i) while d: y = d.popleft() if y <= 10**18: diff = y//10%10 - y%10 if 0 <= y%10 + diff <= 9: ny = y*10 + (y%10 + diff) ...
chikati3/Atcoder
abc234/E.py
E.py
py
722
python
en
code
0
github-code
18
[ { "api_name": "collections.deque", "line_number": 8, "usage_type": "call" }, { "api_name": "bisect.bisect_left", "line_number": 30, "usage_type": "call" } ]
8188962834
#!/usr/bin/env python3 '''convert gninatypes file to xyz file''' import struct, sys, argparse from functools import partial import molgrid names = molgrid.GninaIndexTyper().get_type_names() def elem(t): '''convert type index into element string''' name = names[t] if 'Hydrogen' in name: return 'H'...
gnina/scripts
types2xyz.py
types2xyz.py
py
1,727
python
en
code
19
github-code
18
[ { "api_name": "molgrid.GninaIndexTyper", "line_number": 8, "usage_type": "call" }, { "api_name": "argparse.ArgumentParser", "line_number": 49, "usage_type": "call" }, { "api_name": "argparse.FileType", "line_number": 51, "usage_type": "call" }, { "api_name": "stru...
28708385132
from matplotlib import colors, pyplot as plt plt.style.use("fivethirtyeight") slice = [120,80,30,20] labels = ['forty','sixty','extra1','extra2'] colors=['blue','red','yello','green'] explode= [0,0.1,0.2,0] plt.pie(slice, labels = labels, explode = explode, startangle=90,autopct='%1.1f%%', shadow = True, wedgeprops =...
yashvachhani/python
matplotlib/pie_chart.py
pie_chart.py
py
412
python
en
code
0
github-code
18
[ { "api_name": "matplotlib.pyplot.style.use", "line_number": 3, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.style", "line_number": 3, "usage_type": "attribute" }, { "api_name": "matplotlib.pyplot", "line_number": 3, "usage_type": "name" }, { "api_name"...
39309368559
import logging import logging.config import time from pyspark.sql import SparkSession from lightautoml.spark.utils import logging_config, VERBOSE_LOGGING_FORMAT from .utils import DummyTabularAutoML from .. import spark as spark_sess spark = spark_sess logging.config.dictConfig(logging_config(level=logging.DEBUG, l...
Qwinpin/LightAutoML_Spark
tests/spark/unit/test_auto_ml/test_auto_ml_preset.py
test_auto_ml_preset.py
py
1,697
python
en
code
null
github-code
18
[ { "api_name": "logging.config.dictConfig", "line_number": 13, "usage_type": "call" }, { "api_name": "logging.config", "line_number": 13, "usage_type": "attribute" }, { "api_name": "lightautoml.spark.utils.logging_config", "line_number": 13, "usage_type": "call" }, { ...
73811697320
import fcntl import json import logging import multiprocessing import os import signal import subprocess import sys import tempfile import zipfile from typing import Any, Dict, List, Optional, Tuple, Union from urllib.parse import urldefrag from celery.exceptions import SoftTimeLimitExceeded # type: ignore import to...
DataBiosphere/toil
src/toil/server/wes/tasks.py
tasks.py
py
23,808
python
en
code
856
github-code
18
[ { "api_name": "logging.getLogger", "line_number": 28, "usage_type": "call" }, { "api_name": "typing.Dict", "line_number": 44, "usage_type": "name" }, { "api_name": "typing.Any", "line_number": 44, "usage_type": "name" }, { "api_name": "typing.List", "line_numb...
10760221024
from __future__ import annotations from typing import Callable, List from ndspy.rom import NintendoDSRom from skytemple_files.common.i18n_util import _, get_locales from skytemple_files.common.ppmdu_config.data import ( GAME_REGION_EU, GAME_REGION_JP, GAME_REGION_US, GAME_VERSION_EOS, Pmd2Data, )...
SkyTemple/skytemple-files
skytemple_files/patch/handler/skip_quiz.py
skip_quiz.py
py
3,810
python
en
code
16
github-code
18
[ { "api_name": "skytemple_files.common.i18n_util._", "line_number": 31, "usage_type": "call" }, { "api_name": "skytemple_files.patch.handler.abstract.AbstractPatchHandler", "line_number": 34, "usage_type": "name" }, { "api_name": "skytemple_files.patch.handler.abstract.DependantPa...
21127109705
#!/usr/local/bin/python3 import psycopg2 import argparse import time import csv from subprocess import call from yaml import load, load_all try: from yaml import CLoader as Loader except ImportError: from yaml import Loader # Returns the timestamp,usercount pair which is closest to the specified timestamp def...
pacohope/usercount
diasporacount.py
diasporacount.py
py
4,943
python
en
code
null
github-code
18
[ { "api_name": "yaml.load", "line_number": 36, "usage_type": "call" }, { "api_name": "yaml.Loader", "line_number": 36, "usage_type": "name" }, { "api_name": "psycopg2.connect", "line_number": 45, "usage_type": "call" }, { "api_name": "psycopg2.DatabaseError", "...
71970836199
from pyDolarVenezuela import network from bs4 import BeautifulSoup def _get_price_and_symbol_in_simple(strong_tag: BeautifulSoup): price = str(strong_tag.find_next('strong').text).split('Bs.')[-1][:-1].strip() symbol = str(strong_tag.find_next('strong').text).split('Bs.')[-1][-1] return price, symbol def...
fcoagz/pydolarvenezuela
pyDolarVenezuela/provider/ivenezuela.py
ivenezuela.py
py
3,387
python
en
code
19
github-code
18
[ { "api_name": "bs4.BeautifulSoup", "line_number": 4, "usage_type": "name" }, { "api_name": "pyDolarVenezuela.network.get", "line_number": 11, "usage_type": "call" }, { "api_name": "pyDolarVenezuela.network", "line_number": 11, "usage_type": "name" }, { "api_name":...
28466863481
from typing import List import pytest from aws_lambda_powertools.utilities.parser import ( ValidationError, envelopes, event_parser, ) from aws_lambda_powertools.utilities.parser.models import ( KinesisFirehoseModel, KinesisFirehoseRecord, KinesisFirehoseRecordMetadata, ) from aws_lambda_power...
heitorlessa/aws-lambda-powertools-test
tests/functional/parser/test_kinesis_firehose.py
test_kinesis_firehose.py
py
4,896
python
en
code
0
github-code
18
[ { "api_name": "typing.List", "line_number": 21, "usage_type": "name" }, { "api_name": "tests.functional.parser.schemas.MyKinesisFirehoseBusiness", "line_number": 21, "usage_type": "name" }, { "api_name": "aws_lambda_powertools.utilities.typing.LambdaContext", "line_number": 2...
5610275037
import matplotlib.pyplot as plt try: from csc_486b_assignments.solution.assignment1 import utils except ModuleNotFoundError: import utils if __name__ == "__main__": img = utils.read_image("input.jpg") img_inv = utils.invert_image(img) utils.save_image_to_h5(img_inv, "output.h5") plt.figure(...
nomis1125/SchoolPortfolio
CSc 486b/A1/submission-package/submission-package/solution_3_2.py
solution_3_2.py
py
398
python
en
code
0
github-code
18
[ { "api_name": "utils.read_image", "line_number": 11, "usage_type": "call" }, { "api_name": "utils.invert_image", "line_number": 12, "usage_type": "call" }, { "api_name": "utils.save_image_to_h5", "line_number": 13, "usage_type": "call" }, { "api_name": "matplotlib...
42179896979
#! /usr/bin/env python3 # -*- coding: utf-8 -*- import sys import frida import time def on_message(message, data): if message['type'] == 'error': print('[!] ' + message['stack']) elif message['type'] == 'send': print('[i] ' + message['payload']) else: print(message) def main(target_process, addr, size): se...
physics-sec/frida-scripts
misc/frida-read-memory.py
frida-read-memory.py
py
991
python
en
code
9
github-code
18
[ { "api_name": "frida.attach", "line_number": 17, "usage_type": "call" }, { "api_name": "time.sleep", "line_number": 30, "usage_type": "call" }, { "api_name": "sys.argv", "line_number": 34, "usage_type": "attribute" }, { "api_name": "sys.exit", "line_number": 3...
13842412261
#!/usr/bin/env python3 import math from tkinter import * from tkinter import ttk import matplotlib.pyplot as plt import numpy as np #Things that happen when you press the button #Do math, show results, draw figure def plot_figure(*args): #Simulation deltas pulled from nowhere #1/100 of a seconds delta = 8 #0.08*10...
Hirmuolio/Shield-regen-calc
regen.py
regen.py
py
6,082
python
en
code
0
github-code
18
[ { "api_name": "math.sqrt", "line_number": 67, "usage_type": "call" }, { "api_name": "math.ceil", "line_number": 82, "usage_type": "call" }, { "api_name": "math.floor", "line_number": 82, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 96, ...
15815898388
from unicodedata import category from django.shortcuts import get_object_or_404, render from django.views.decorators.clickjacking import xframe_options_exempt from .models import Content, Category @xframe_options_exempt def index(request): categories = Category.objects.all() context = { 'categori...
jovian34/j34web_django
j34main/views.py
views.py
py
1,113
python
en
code
0
github-code
18
[ { "api_name": "models.Category.objects.all", "line_number": 10, "usage_type": "call" }, { "api_name": "models.Category.objects", "line_number": 10, "usage_type": "attribute" }, { "api_name": "models.Category", "line_number": 10, "usage_type": "name" }, { "api_name...
7365368299
#!/usr/bin/env python # -*- coding: utf-8 -*- # https://github.com/shenwei356/bio_scripts from __future__ import print_function import argparse import gzip import logging import os import re import sys from Bio import SeqIO from Bio.Seq import Seq from Bio.SeqRecord import SeqRecord from Bio.SeqUtils import MeltingTe...
shenwei356/bio_scripts
sequence/fastx_tm.py
fastx_tm.py
py
2,424
python
en
code
92
github-code
18
[ { "api_name": "argparse.ArgumentParser", "line_number": 20, "usage_type": "call" }, { "api_name": "sys.stderr.write", "line_number": 31, "usage_type": "call" }, { "api_name": "sys.stderr", "line_number": 31, "usage_type": "attribute" }, { "api_name": "sys.exit", ...
20756866270
import pygame import time import random pygame.init() white = (255,255,255) black = (0,0,0) red = (255,0,0) green = (0, 155, 0) display_width = 800 display_height = 600 gameDisplay = pygame.display.set_mode((display_width,display_height)) pygame.display.set_caption('Andrew\'s Snake Game') pygame.display.update() ...
andrewnvu/Snake-Game
snake.py
snake.py
py
4,651
python
en
code
0
github-code
18
[ { "api_name": "pygame.init", "line_number": 5, "usage_type": "call" }, { "api_name": "pygame.display.set_mode", "line_number": 14, "usage_type": "call" }, { "api_name": "pygame.display", "line_number": 14, "usage_type": "attribute" }, { "api_name": "pygame.display...
72895971239
from django.contrib import admin from django.urls import path from . import views from django.contrib.auth import views as auth_views #define route path to redirect one to another pages urlpatterns = [ path('', views.Home,name="Home"), path('login/', views.login,name="login"), path('loged/', vi...
sainisachin602060/asterisc-internship-project
Blog-Creator-web-Application/DecodeProject/DecodeApp/urls.py
urls.py
py
703
python
en
code
0
github-code
18
[ { "api_name": "django.urls.path", "line_number": 10, "usage_type": "call" }, { "api_name": "django.urls.path", "line_number": 12, "usage_type": "call" }, { "api_name": "django.urls.path", "line_number": 14, "usage_type": "call" }, { "api_name": "django.urls.path",...
22545038302
from typing import * from kaia.eaglesong.core import Return, Routine, Subroutine from kaia.eaglesong.drivers.telegram import TgCommand, TgContext import telegram as tg import logging from abc import ABC, abstractmethod logger = logging.getLogger('group_chat') class AdminReplySkillLogic(ABC): @abstractmethod d...
okulovsky/kaia
zoo/group_chatbot/skills/admin_reply/admin_reply.py
admin_reply.py
py
1,801
python
en
code
4
github-code
18
[ { "api_name": "logging.getLogger", "line_number": 8, "usage_type": "call" }, { "api_name": "abc.ABC", "line_number": 10, "usage_type": "name" }, { "api_name": "kaia.eaglesong.drivers.telegram.TgContext", "line_number": 12, "usage_type": "name" }, { "api_name": "te...
41136518778
import folium def gen_map(): """ マップの基本部分を生成 Returns: m(folium.Map) """ copyright_st = '&copy;' \ 'Map tiles by <a href="http://stamen.com">Stamen Design</a>,' \ ' under <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>.' \ ...
yH3PO4/HighwayOrderedDS
src/plot.py
plot.py
py
1,749
python
en
code
0
github-code
18
[ { "api_name": "folium.Map", "line_number": 16, "usage_type": "call" }, { "api_name": "folium.Marker", "line_number": 31, "usage_type": "call" }, { "api_name": "folium.Marker", "line_number": 45, "usage_type": "call" }, { "api_name": "folium.PolyLine", "line_nu...
9878237175
import json import uuid import urllib from uuid import getnode as getmac from pyportify import gpsoauth SJ_DOMAIN = "mclients.googleapis.com" SJ_URL = "/sj/v2.5" FULL_SJ_URL = "https://{0}{1}".format(SJ_DOMAIN, SJ_URL) def encode(values): return urllib.parse.urlencode(values) class Mobileclient(object): ...
rckclmbr/pyportify
pyportify/google.py
google.py
py
6,077
python
en
code
782
github-code
18
[ { "api_name": "urllib.parse.urlencode", "line_number": 15, "usage_type": "call" }, { "api_name": "urllib.parse", "line_number": 15, "usage_type": "attribute" }, { "api_name": "pyportify.gpsoauth.perform_master_login", "line_number": 26, "usage_type": "call" }, { "...
21484287834
# Filename: hello.py """Simple Hello World example with PyQt5.""" from PyQt5 import QtWidgets, uic, QtGui, QtCore from PyQt5.QtWidgets import QFileDialog from PyQt5.QtGui import QImage,QPixmap import sys import os import cv2 import numpy as np from matplotlib.figure import Figure from matplotlib.backends.backend_qt5ag...
andre002wp/Face-Drooping-detection
Test gui PYQT.py
Test gui PYQT.py
py
30,935
python
en
code
2
github-code
18
[ { "api_name": "PyQt5.QtWidgets.QMainWindow", "line_number": 17, "usage_type": "attribute" }, { "api_name": "PyQt5.QtWidgets", "line_number": 17, "usage_type": "name" }, { "api_name": "PyQt5.uic.loadUi", "line_number": 22, "usage_type": "call" }, { "api_name": "PyQ...
7589770886
from databasescreen import DataBaseApp from kivy.config import Config import os Config.set("kivy", "desktop", 1) Config.set("kivy", "exit_on_escape", 1) Config.set("graphics", "resizable", 1) Config.set("graphics", "window_state", "maximized") Config.set("graphics", "borderless", 0) Config.set("graphics", "fullscreen"...
SagarKishore-PFM/flash-card-app-py
main.py
main.py
py
584
python
en
code
0
github-code
18
[ { "api_name": "kivy.config.Config.set", "line_number": 5, "usage_type": "call" }, { "api_name": "kivy.config.Config", "line_number": 5, "usage_type": "name" }, { "api_name": "kivy.config.Config.set", "line_number": 6, "usage_type": "call" }, { "api_name": "kivy.co...
2033212558
import logging from collections import OrderedDict import requests from apscheduler.schedulers.background import BackgroundScheduler from rpidisplay import configuration from rpidisplay.weather_providers import OpenWeatherMap, DarkSky class Data: def __init__(self): self.weather = None self.exch...
aklimko/rpi-display
rpidisplay/data.py
data.py
py
3,352
python
en
code
0
github-code
18
[ { "api_name": "rpidisplay.configuration.ModesCfg", "line_number": 16, "usage_type": "call" }, { "api_name": "rpidisplay.configuration", "line_number": 16, "usage_type": "name" }, { "api_name": "apscheduler.schedulers.background.BackgroundScheduler", "line_number": 18, "us...
27857365892
#!/usr/bin/env python # -*- coding: utf8 -*- import json from collections import defaultdict tweets = defaultdict(list) class ReadFile: def __init__(self,filePath): self.filePath = filePath def openFile(self,filePath): file = open(self.filePath, 'r') with open(self.filePath) as json_...
elena-shirokova/named_entity_tweets
readFile.py
readFile.py
py
843
python
en
code
0
github-code
18
[ { "api_name": "collections.defaultdict", "line_number": 6, "usage_type": "call" }, { "api_name": "json.load", "line_number": 16, "usage_type": "call" } ]
37099560296
from astar import AStar import numpy as np import matplotlib.pyplot as plt import pdb start_state = np.array([0, 0]) goal_state = np.array([10, 10]) def heuristic(state1, state2): return np.linalg.norm(state1 - state2) def valid_edge_function(state, primitive): if state[1] == 3 and state[0] < 8: retu...
nthatte/ACRLHW5
src/test_astar.py
test_astar.py
py
1,440
python
en
code
0
github-code
18
[ { "api_name": "numpy.array", "line_number": 6, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 7, "usage_type": "call" }, { "api_name": "numpy.linalg.norm", "line_number": 10, "usage_type": "call" }, { "api_name": "numpy.linalg", "line_numb...
14540671536
import configparser import os import sys class Config: mapper = { 'common': ['server_addr', 'server_port', 'token'], 'mc': ['local_port', 'remote_port'] } def __init__(self, path=os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), "mc.ini")): self.path = path self...
todest/MC-ONLINE
utils/config.py
config.py
py
1,343
python
en
code
1
github-code
18
[ { "api_name": "os.path.join", "line_number": 12, "usage_type": "call" }, { "api_name": "os.path", "line_number": 12, "usage_type": "attribute" }, { "api_name": "os.path.dirname", "line_number": 12, "usage_type": "call" }, { "api_name": "os.path.realpath", "lin...
71426862120
import numpy as np import pandas as pd import matplotlib.pyplot as plt def get_days(assigned_days, n_people): days = np.zeros(assigned_days.max(), int) for i, r in enumerate(assigned_days): days[r-1] += n_people[i] return days def dataset_plot(dataset): desired = dataset.values[:,1:1...
aorursy/new-nb-3
golubev_benchmark-mip-solvers-draft.py
golubev_benchmark-mip-solvers-draft.py
py
7,752
python
en
code
0
github-code
18
[ { "api_name": "numpy.zeros", "line_number": 12, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.rcParams", "line_number": 28, "usage_type": "attribute" }, { "api_name": "matplotlib.pyplot", "line_number": 28, "usage_type": "name" }, { "api_name": "matplot...
75262816040
# This code is written at BigVision LLC. It is based on the OpenCV project. It is subject to the license terms in the LICENSE file found in this distribution and at http://opencv.org/license.html # Usage example: python3 object_detection_yolo.py --video=run.mp4 --device 'cpu' # python3 object_detectio...
aus10powell/MIT-Fishery-Counter
code/archived/inference.py
inference.py
py
6,103
python
en
code
3
github-code
18
[ { "api_name": "matplotlib.use", "line_number": 20, "usage_type": "call" }, { "api_name": "centroidtracker.CentroidTracker", "line_number": 60, "usage_type": "call" }, { "api_name": "cv2.VideoCapture", "line_number": 64, "usage_type": "attribute" }, { "api_name": "...
23502333979
"Convenience script to display and modify some BIOS settings via Redfish API" import os import sys import logging import argparse import time import redfish_api # pylint: disable=import-error # create root logger for this script logger = logging.getLogger() def parse_args(): "Parse command-line arguments" ...
IntelSmartEdge/open-developer-experience-kits
scripts/deploy_esp/redfishapi/redfish_bios.py
redfish_bios.py
py
7,765
python
en
code
18
github-code
18
[ { "api_name": "logging.getLogger", "line_number": 12, "usage_type": "call" }, { "api_name": "argparse.ArgumentParser", "line_number": 18, "usage_type": "call" }, { "api_name": "argparse.RawDescriptionHelpFormatter", "line_number": 21, "usage_type": "attribute" }, { ...
6499634766
#!/usr/bin/env python3 import logging from typing import List from urllib.error import HTTPError from helpermodules.cli import run_using_positional_cli_args from modules.common.component_state import CounterState from modules.common.powerwall import powerwall_update, PowerwallHttpClient from modules.common.store impo...
Bucky2k/openWB
modules/bezug_powerwall/powerwall.py
powerwall.py
py
2,038
python
en
code
null
github-code
18
[ { "api_name": "logging.getLogger", "line_number": 12, "usage_type": "call" }, { "api_name": "modules.common.powerwall.PowerwallHttpClient", "line_number": 15, "usage_type": "name" }, { "api_name": "modules.common.component_state.CounterState", "line_number": 24, "usage_ty...
21133414994
# -*- coding: utf-8 -*- """ Created on Wed Aug 15 21:48:18 2018 @author: wuwangchuxin """ import numpy as np import pandas as pd import statsmodels.api as sm import math #import matplotlib.pyplot as plt import os os.chdir('D:/multiple_factors_models/') #import date_process_class as dpc from scipy import stats as ss im...
wuwangchuxinybf/multiple_factors_models
single_factors_test.py
single_factors_test.py
py
29,765
python
en
code
6
github-code
18
[ { "api_name": "os.chdir", "line_number": 13, "usage_type": "call" }, { "api_name": "sys.path.append", "line_number": 20, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 20, "usage_type": "attribute" }, { "api_name": "pylab.mpl.rcParams", "line...
30211021816
#coding:utf-8 from sklearn.feature_extraction.text import CountVectorizer from sklearn.feature_extraction.text import TfidfTransformer import numpy as np # corpus = ['This is the first document.', # 'This is the second second document.'] # # vectorizer = CountVectorizer() # X = vectorizer.fit_transform(corpus...
zkywsg/python_nlp
Emotional_classification/input_process.py
input_process.py
py
2,955
python
en
code
0
github-code
18
[ { "api_name": "sklearn.feature_extraction.text.CountVectorizer", "line_number": 55, "usage_type": "call" }, { "api_name": "sklearn.feature_extraction.text.TfidfTransformer", "line_number": 60, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 62, "usage_...
31531416390
from PIL import Image import numpy as np from numpy.typing import NDArray import pandas as pd import matplotlib import matplotlib.pyplot as plt import texfig def white_background_highlight( ax: matplotlib.axes.Axes, x: NDArray, y: NDArray ) -> None: ax.plot(x, y, alpha=0.1, linewidth=6, color="white") ax....
rfmiotto/pressure_distribution_infer
figures/figure_cp_distribution_single_model.py
figure_cp_distribution_single_model.py
py
6,077
python
en
code
0
github-code
18
[ { "api_name": "matplotlib.axes", "line_number": 11, "usage_type": "attribute" }, { "api_name": "numpy.typing.NDArray", "line_number": 11, "usage_type": "name" }, { "api_name": "numpy.typing.NDArray", "line_number": 21, "usage_type": "name" }, { "api_name": "numpy....
14158740027
import os import shutil from PySub import utils as _utils from PySub import memory as _memory import matplotlib.pyplot as plt class ProjectFolder(object): """Class for managing a project folder """ def __init__(self, folder, subfolders = []): """Initialize the ProjectFolder object. Also c...
TNO/PySub
PySub/ProjectFolder.py
ProjectFolder.py
py
6,656
python
en
code
0
github-code
18
[ { "api_name": "PySub.utils.make_folder", "line_number": 30, "usage_type": "call" }, { "api_name": "PySub.utils", "line_number": 30, "usage_type": "name" }, { "api_name": "os.path.isfile", "line_number": 75, "usage_type": "call" }, { "api_name": "os.path", "lin...
25622559700
import config from fastapi import FastAPI, HTTPException from fastapi.middleware.cors import CORSMiddleware from routes.questionares import router as QRouter from routes.records import router as RRouter app = FastAPI() origins = [ config.Settings().GATE ] app.add_middleware( CORSMiddleware, allow_origins...
snabila/ta-full
service-questionare/main.py
main.py
py
651
python
en
code
0
github-code
18
[ { "api_name": "fastapi.FastAPI", "line_number": 7, "usage_type": "call" }, { "api_name": "config.Settings", "line_number": 10, "usage_type": "call" }, { "api_name": "fastapi.middleware.cors.CORSMiddleware", "line_number": 14, "usage_type": "argument" }, { "api_nam...
7784134044
from PyQt5.QtWidgets import* from main_python import Ui_MainWindow from liste import ListelePage import sqlite3 #connection = sqlite3.connect("Ariza.db") class ArizaPage(QMainWindow): baglanti = sqlite3.connect("Ariza.db") islem = baglanti.cursor() table = islem.execute("create table if not ex...
Agony04/teknik-servis-otomasyonu
Teknik Servis Otomasyonu/arizaBilgi.py
arizaBilgi.py
py
992
python
en
code
0
github-code
18
[ { "api_name": "sqlite3.connect", "line_number": 10, "usage_type": "call" }, { "api_name": "main_python.Ui_MainWindow", "line_number": 16, "usage_type": "call" }, { "api_name": "liste.ListelePage", "line_number": 18, "usage_type": "call" } ]
24914438716
from fractions import Fraction from math import ceil from typing import Any, Dict from pytorchvideo.data.clip_sampling import ClipInfo, ClipSampler class MinimumFullCoverageClipSampler(ClipSampler): """Find the minmimum number of clips to cover the full video. Args: clip_duration: Duration of a clip...
juliendenize/eztorch
eztorch/datasets/clip_samplers/minimum_full_coverage_clip_sampler.py
minimum_full_coverage_clip_sampler.py
py
2,465
python
en
code
25
github-code
18
[ { "api_name": "pytorchvideo.data.clip_sampling.ClipSampler", "line_number": 8, "usage_type": "name" }, { "api_name": "typing.Dict", "line_number": 21, "usage_type": "name" }, { "api_name": "typing.Any", "line_number": 21, "usage_type": "name" }, { "api_name": "fra...
19650644120
""" Filename: wcsmatching.py Author(s): Peter Quigley Contact: pquigley@uwo.ca Created: June 19, 2023 Updated: June 20, 2023 Usage: python wcsmatching.py <obs_date> *This script is intended to run only on BLUEBIRD """ # Module Imports import os,sys import argparse import re import itertools imp...
ColibriKBO/ColibriPipeline
wcsmatching.py
wcsmatching.py
py
13,932
python
en
code
3
github-code
18
[ { "api_name": "pathlib.Path", "line_number": 36, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_number": 64, "usage_type": "call" }, { "api_name": "numpy.load", "line_number": 112, "usage_type": "call" }, { "api_name": "coordsfinder.getTransform", ...
11830787223
# coding: utf-8 """ Apache NiFi Registry REST API The REST API provides an interface to a registry with operations for saving, versioning, reading NiFi flows and components. OpenAPI spec version: 1.19.0 Contact: dev@nifi.apache.org Generated by: https://github.com/swagger-api/swagger-codegen.git ...
Chaffelson/nipyapi
nipyapi/registry/models/versioned_flow_snapshot.py
versioned_flow_snapshot.py
py
11,752
python
en
code
228
github-code
18
[ { "api_name": "six.iteritems", "line_number": 304, "usage_type": "call" }, { "api_name": "pprint.pformat", "line_number": 328, "usage_type": "call" } ]
1657193602
import argparse import os import shutil import tempfile import unittest from contextlib import contextmanager from pathlib import Path from typing import Generator from unittest.mock import MagicMock, patch from torchx.cli.cmd_run import CmdBuiltins, CmdRun, _parse_run_config @contextmanager def cwd(path: str) -> Ge...
SirLegolot/torchx
torchx/cli/test/cmd_run_test.py
cmd_run_test.py
py
3,328
python
en
code
null
github-code
18
[ { "api_name": "os.getcwd", "line_number": 16, "usage_type": "call" }, { "api_name": "os.chdir", "line_number": 17, "usage_type": "call" }, { "api_name": "os.chdir", "line_number": 21, "usage_type": "call" }, { "api_name": "contextlib.contextmanager", "line_num...
34782319140
import requests from bs4 import BeautifulSoup import smtplib import text_to_speech as speech import time URL = "https://www.rokomari.com/book/202772/hate-kolome-javascript" headers ={"User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.75 Safari/537.36" } def...
Fahimkhan9/Price-Tracker
script.py
script.py
py
745
python
en
code
0
github-code
18
[ { "api_name": "requests.get", "line_number": 12, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_number": 14, "usage_type": "call" }, { "api_name": "text_to_speech.speak", "line_number": 23, "usage_type": "call" }, { "api_name": "time.sleep", ...
23346989169
from django.urls import reverse_lazy from django.views.generic import ListView, CreateView, UpdateView from score.forms import CreateRestaurantForm, CreateMenuForm, CreateEmployeeForm, VoteMenuForm from score.models import Restaurant, Employee, Menu, Scores class RestaurantListView(ListView): model = Restaurant ...
VolodymyrSubach/Python_Task
django/Python_Task/score/views.py
views.py
py
2,409
python
en
code
0
github-code
18
[ { "api_name": "django.views.generic.ListView", "line_number": 8, "usage_type": "name" }, { "api_name": "score.models.Restaurant", "line_number": 9, "usage_type": "name" }, { "api_name": "django.views.generic.ListView", "line_number": 13, "usage_type": "name" }, { ...
7315272352
from PyQt5 import QtWidgets, QtCore, QtGui class SearchParameterWidget(QtWidgets.QWidget): removeSelfRequest = QtCore.pyqtSignal(QtCore.QVariant) searchParamFieldUpdate = QtCore.pyqtSignal((str, str, QtCore.QVariant)) def __init__(self, parent=None): super(SearchParameterWidget, self).__init__(pa...
TheRealBanana/movie_organizer
src/dialogs/widgets/searchParameterWidget.py
searchParameterWidget.py
py
5,844
python
en
code
0
github-code
18
[ { "api_name": "PyQt5.QtWidgets.QWidget", "line_number": 4, "usage_type": "attribute" }, { "api_name": "PyQt5.QtWidgets", "line_number": 4, "usage_type": "name" }, { "api_name": "PyQt5.QtCore.pyqtSignal", "line_number": 5, "usage_type": "call" }, { "api_name": "PyQ...
11668921851
from django.urls import path from . import views from .views import MapView urlpatterns = [ path('', views.home, name = "HOME"), #path('newPage/', views.users, name = "USER"), #path('editPage/<int:user_id>/', views.edit, name = "EDIT"), #path('delete/<int:user_id>/', views.delete_user, name='DELETE'), ...
Ehsanul-karim/CIS-System-Project
myapp/urls.py
urls.py
py
2,123
python
en
code
0
github-code
18
[ { "api_name": "django.urls.path", "line_number": 6, "usage_type": "call" }, { "api_name": "views.home", "line_number": 6, "usage_type": "attribute" }, { "api_name": "django.urls.path", "line_number": 10, "usage_type": "call" }, { "api_name": "views.myregister", ...
13882105905
import numpy as np import cv2 as cv from matplotlib import pyplot as plt from argparse import ArgumentParser def parse_args_for_settings_file(): """Parse the single argument (the settings JSON file) for scripts that require it. """ parser = ArgumentParser(description="Script with JSON Settings File")...
dcharatan/dcr-reimplementation
source/utilities.py
utilities.py
py
4,201
python
en
code
1
github-code
18
[ { "api_name": "argparse.ArgumentParser", "line_number": 12, "usage_type": "call" }, { "api_name": "numpy.ndarray", "line_number": 20, "usage_type": "attribute" }, { "api_name": "cv2.SIFT_create", "line_number": 23, "usage_type": "call" }, { "api_name": "cv2.FlannB...
72091923559
import apache_beam as beam with beam.Pipeline() as p: icon_pairs = p | 'Create icons' >> beam.Create([ ('Apple', '🍎'), ('Apple', '🍏'), ('Eggplant', '🍆'), ('Tomato', '🍅'), ]) duration_pairs = p | 'Create durations' >> beam.Create([ ('Apple', 'perennial'), ('Carrot', 'bienn...
jparadae/pipelines_with_beam
cogroupbyKey.py
cogroupbyKey.py
py
809
python
en
code
2
github-code
18
[ { "api_name": "apache_beam.Pipeline", "line_number": 3, "usage_type": "call" }, { "api_name": "apache_beam.Create", "line_number": 4, "usage_type": "call" }, { "api_name": "apache_beam.Create", "line_number": 11, "usage_type": "call" }, { "api_name": "apache_beam....
72509863400
import utils from starlette.applications import Starlette from starlette.responses import JSONResponse from starlette.routing import Route from starlette.requests import Request async def homepage(request): return JSONResponse({"hello": "Hello welcome"}) async def readsheet(request: Request): try: dat...
chidibede/google_sheets_reader_microservices
gsheet/server.py
server.py
py
662
python
en
code
0
github-code
18
[ { "api_name": "starlette.responses.JSONResponse", "line_number": 9, "usage_type": "call" }, { "api_name": "starlette.requests.Request", "line_number": 11, "usage_type": "name" }, { "api_name": "utils.read_gsheet", "line_number": 14, "usage_type": "call" }, { "api_...
29826868391
import logging import os import re import yaml from PIL import Image from pelican import signals from jinja2 import Template logger = logging.getLogger(__name__) pswipe_regex = re.compile(r'(\[pswipe:([^,]+),([^.,]+)(\.[^,]+),([^\]]+)\])') pswipe_template = """<img src='/images/{{album}}/{{image_root}}_thumbnail_tal...
fritzm/blog.fritzm.org
plugins-local/photoswipe/photoswipe.py
photoswipe.py
py
2,496
python
en
code
0
github-code
18
[ { "api_name": "logging.getLogger", "line_number": 10, "usage_type": "call" }, { "api_name": "re.compile", "line_number": 12, "usage_type": "call" }, { "api_name": "pelican.settings", "line_number": 16, "usage_type": "attribute" }, { "api_name": "jinja2.Template", ...
43023994772
# -*- coding: utf-8 -*- import logging import libmc from MySQLdb import connect, IntegrityError # noqa from ORZ import setup, OrzField, OrzBase # noqa from douban.mc import create_decorators from douban.sqlstore import store_from_config from redis2beansdb import Beansdb from vilya.config import ( MEMCACHED_HOST...
douban/code
vilya/libs/store.py
store.py
py
2,629
python
en
code
1,812
github-code
18
[ { "api_name": "logging.getLogger", "line_number": 17, "usage_type": "call" }, { "api_name": "logging.DEBUG", "line_number": 17, "usage_type": "attribute" }, { "api_name": "libmc.Client", "line_number": 48, "usage_type": "call" }, { "api_name": "vilya.config.MEMCAC...
39271377688
import json import torch import torch.nn as nn import numpy as np from tqdm import tqdm from sklearn.metrics import roc_auc_score from arguments import get_args from utils import StatsTracker from utils import load_model from train_base import train_model from graph import MolGraph from models import GCN import pdb ...
benatorc/OTGNN
train_gcn.py
train_gcn.py
py
6,210
python
en
code
48
github-code
18
[ { "api_name": "arguments.get_args", "line_number": 20, "usage_type": "call" }, { "api_name": "train_base.train_model", "line_number": 22, "usage_type": "call" }, { "api_name": "models.GCN", "line_number": 23, "usage_type": "name" }, { "api_name": "utils.StatsTrack...
34743811624
from flask_restful import Resource, reqparse from flask_jwt import jwt_required, current_identity from models.pages import PageModel from models.site import SiteModel from models.rank import RankModel from datetime import datetime class Pages(Resource): @jwt_required() def get(self, id=None, name=None): ...
nesterd/SpaceBrainsProject
WebServerREST/resources/stats.py
stats.py
py
4,975
python
en
code
2
github-code
18
[ { "api_name": "flask_restful.Resource", "line_number": 9, "usage_type": "name" }, { "api_name": "models.pages.PageModel.find_by_id", "line_number": 13, "usage_type": "call" }, { "api_name": "models.pages.PageModel", "line_number": 13, "usage_type": "name" }, { "ap...
4380232350
from ptp2 import ParltrackSubRecord from ptp2.dossier.doc import Doc from ptp2.utils import make_date from datetime import date, datetime class Event(ParltrackSubRecord): def __init__(self, record): super().__init__(record) # date parsing if isinstance(self.date, str): self.d...
ghxm/ptp2
ptp2/dossier/event.py
event.py
py
747
python
en
code
0
github-code
18
[ { "api_name": "ptp2.ParltrackSubRecord", "line_number": 6, "usage_type": "name" }, { "api_name": "datetime.date", "line_number": 15, "usage_type": "name" }, { "api_name": "datetime.datetime", "line_number": 15, "usage_type": "name" }, { "api_name": "ptp2.utils.mak...
12358271919
import json import sqlite3 from models import Employee, Location EMPLOYEES = [ { "id": 1, "name": "Jenna Solis" } ] def get_all_employees(): """sql get all employees""" with sqlite3.connect("./kennel.sqlite3") as conn: conn.row_factory = sqlite3.Row db_cursor = conn.cur...
sbyardnss/kennels-server
views/employee_requests.py
employee_requests.py
py
4,264
python
en
code
0
github-code
18
[ { "api_name": "sqlite3.connect", "line_number": 14, "usage_type": "call" }, { "api_name": "sqlite3.Row", "line_number": 15, "usage_type": "attribute" }, { "api_name": "models.Employee", "line_number": 32, "usage_type": "call" }, { "api_name": "models.Location", ...
23719750540
import asyncio import re from bs4 import BeautifulSoup from requests import Response, Session, HTTPError from config import debug_mode from database.cache_manager import cache_manager from utils.requests import session android_app_key = 'android_app_package' def parsing_http_page(url: str, params=None) -> Beautifu...
DUpdateSystem/Server
server/getter/hubs/hub_script_utils.py
hub_script_utils.py
py
4,571
python
en
code
8
github-code
18
[ { "api_name": "bs4.BeautifulSoup", "line_number": 26, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_number": 14, "usage_type": "name" }, { "api_name": "utils.requests.session.get", "line_number": 39, "usage_type": "call" }, { "api_name": "utils....
34589661340
import urllib.request, urllib.parse, urllib.error from bs4 import BeautifulSoup url = input('Enter - ') html = urllib.request.urlopen(url).read() soup = BeautifulSoup(html, 'html.parser') # Retrive all of the anchor tags tags = soup('a') for tag in tags: print(tag.get('href', None)) # Python for Web Service...
Ryann-W/python
BeautifulSoup.py
BeautifulSoup.py
py
458
python
en
code
0
github-code
18
[ { "api_name": "urllib.request.request.urlopen", "line_number": 9, "usage_type": "call" }, { "api_name": "urllib.request.request", "line_number": 9, "usage_type": "attribute" }, { "api_name": "urllib.request", "line_number": 9, "usage_type": "name" }, { "api_name":...
43114502509
import argparse from selenium import webdriver from scrapfile import LICLIENT import time def parse_command_line_args(): parser = argparse.ArgumentParser(description=""" parse LinkedIn search parameters """) parser.add_argument('--username', type=str, required=True, help=...
WaelTissaoui/resume-Screening-linkedin-job-scrapper
linkedin scrapper/main.py
main.py
py
1,744
python
en
code
0
github-code
18
[ { "api_name": "argparse.ArgumentParser", "line_number": 9, "usage_type": "call" }, { "api_name": "selenium.webdriver.Chrome", "line_number": 42, "usage_type": "call" }, { "api_name": "selenium.webdriver", "line_number": 42, "usage_type": "name" }, { "api_name": "t...
37900580418
from __future__ import division import itertools import numpy as np def batch(iterable, n): it = iter(iterable) while True: chunk = tuple(itertools.islice(it, n)) if not chunk: return yield chunk def build_grid(shape): r""" """ shape = np.asarray(shape) ha...
sergeytulyakov/menpofit
menpofit/base.py
base.py
py
566
python
en
code
null
github-code
18
[ { "api_name": "itertools.islice", "line_number": 9, "usage_type": "call" }, { "api_name": "numpy.asarray", "line_number": 18, "usage_type": "call" }, { "api_name": "numpy.floor", "line_number": 19, "usage_type": "call" }, { "api_name": "numpy.require", "line_n...
14939316157
import docker client = docker.from_env() class NetworkBuilder: NETWORK = None _DEFAULT_NETWORK = None def __init__(self, name='dockeranon_net', range='192.168.5.0/24', gw='192.168.5.254'): self.network = NetworkBuilder.NETWORK if self.network is not None: return # Che...
resilience-jychp/dockeranon
libs/builder/network.py
network.py
py
1,941
python
en
code
7
github-code
18
[ { "api_name": "docker.from_env", "line_number": 3, "usage_type": "call" }, { "api_name": "docker.types.IPAMPool", "line_number": 22, "usage_type": "call" }, { "api_name": "docker.types", "line_number": 22, "usage_type": "attribute" }, { "api_name": "docker.types.I...
72415197159
from typing import final import numpy as np import matplotlib.pyplot as plt initial_epsilon = 1 middle_epsilon = 0.25 final_epsilon = 0.07 epsilon = initial_epsilon epsilons = [] decay = np.power(middle_epsilon/initial_epsilon, 1/1e6) decay2 = np.power(final_epsilon/middle_epsilon, 1/3e6) print(decay) for i in range(i...
kimminss0/traffic-ddqn
test.py
test.py
py
506
python
en
code
0
github-code
18
[ { "api_name": "numpy.power", "line_number": 10, "usage_type": "call" }, { "api_name": "numpy.power", "line_number": 11, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.plot", "line_number": 19, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", ...
34975678940
import networkx as nx import random import functools import operator import numpy as np import ast from scipy import stats from sklearn.neighbors import KernelDensity as KDE from scipy import interpolate import itertools import pickle def add_marriage_edges(all_fam, all_unions, D, marriage_probs, p, ncp, n, infdis): ...
js-808/FamilyNetworksResearch
Model/family_network_model.py
family_network_model.py
py
15,744
python
en
code
0
github-code
18
[ { "api_name": "random.choice", "line_number": 46, "usage_type": "call" }, { "api_name": "itertools.combinations", "line_number": 54, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 82, "usage_type": "call" }, { "api_name": "random.choices", ...
30511597035
import re import numpy as np import pandas as pd from scipy.stats import chisquare from sklearn.utils import resample from sklearn.linear_model import LogisticRegression ## Load data din = '/share/fsmresfiles/breast_cancer_medication/data/02_statistics_input' dout = '/share/fsmresfiles/breast_cancer_medication/data/0...
sayadennis/breastcancer-medication
statistics/prelim_stats_metformin.py
prelim_stats_metformin.py
py
4,404
python
en
code
0
github-code
18
[ { "api_name": "pandas.read_csv", "line_number": 12, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 18, "usage_type": "call" }, { "api_name": "sklearn.utils.resample", "line_number": 30, "usage_type": "call" }, { "api_name": "numpy.all", ...
14471016674
""" General utilities for QFTs in Qiskit. """ from datetime import datetime from qiskit.quantum_info import DensityMatrix def reverse_bit_order(nr_bits, value): """ Reverse the bits in a value. Parameters ---------- nr_bits: The number of bits for the value (we need to specify this because the v...
mvsg2/quantum-internet-hackathon-2022
qiskit/utils.py
utils.py
py
3,518
python
en
code
null
github-code
18
[ { "api_name": "qiskit.quantum_info.DensityMatrix", "line_number": 57, "usage_type": "call" }, { "api_name": "datetime.datetime.now", "line_number": 99, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 99, "usage_type": "name" } ]
18921124195
from airflow.hooks.postgres_hook import PostgresHook from airflow.models import BaseOperator from airflow.utils.decorators import apply_defaults class DataQualityOperator(BaseOperator): ui_color = '#89DA59' @apply_defaults def __init__(self, redshift_conn_id, table, ...
jao6693/ud-de-project5
plugins/operators/data_quality.py
data_quality.py
py
1,937
python
en
code
0
github-code
18
[ { "api_name": "airflow.models.BaseOperator", "line_number": 6, "usage_type": "name" }, { "api_name": "airflow.utils.decorators.apply_defaults", "line_number": 10, "usage_type": "name" }, { "api_name": "airflow.hooks.postgres_hook.PostgresHook", "line_number": 30, "usage_t...
36864761025
import pytest from pathlib import Path from corpy.phonetics import cs from corpy.morphodita import Tagger SCRIPT_DIR = Path(__file__).parent TAGGER = Tagger(SCRIPT_DIR.parent / "czech-morfflex-pdt.tagger") def test_voicing_assimilation_over_word_boundaries(): assert cs.transcribe("máš hlad") == [("m", "a:", "Z"...
dlukes/corpy
tests/test_phonetics.py
test_phonetics.py
py
9,834
python
en
code
3
github-code
18
[ { "api_name": "pathlib.Path", "line_number": 7, "usage_type": "call" }, { "api_name": "corpy.morphodita.Tagger", "line_number": 8, "usage_type": "call" }, { "api_name": "corpy.phonetics.cs.transcribe", "line_number": 12, "usage_type": "call" }, { "api_name": "corp...
4950366921
# -*- coding: utf-8 -*- import logging import json import pika from pika.adapters.tornado_connection import TornadoConnection import tornado.httpserver import tornado.ioloop import tornado.web from server.tweetclassifier import Classifier class PikaClient(object): def __init__(self, config, app=None): ...
frankfarrell/ireland-sentiment
server/client.py
client.py
py
7,071
python
en
code
0
github-code
18
[ { "api_name": "server.tweetclassifier.Classifier", "line_number": 17, "usage_type": "call" }, { "api_name": "pika.PlainCredentials", "line_number": 52, "usage_type": "call" }, { "api_name": "pika.ConnectionParameters", "line_number": 54, "usage_type": "call" }, { ...
13034640142
from datetime import datetime from random import randint from string import printable import pytest from data_controller.postgres import Postgres from scripts.helpers import random_word from tests import * pytestmark = pytest.mark.asyncio @pytest.fixture(scope='function') async def postgres(): pool = await _ge...
MaT1g3R/Hifumi-bot
tests/test_postgres.py
test_postgres.py
py
3,677
python
en
code
2
github-code
18
[ { "api_name": "pytest.mark", "line_number": 11, "usage_type": "attribute" }, { "api_name": "data_controller.postgres.Postgres", "line_number": 17, "usage_type": "call" }, { "api_name": "pytest.fixture", "line_number": 14, "usage_type": "call" }, { "api_name": "dat...
5304406062
# Import built-in module import argparse import warnings import math warnings.filterwarnings(action='ignore') import torch.nn as nn import torch.optim as optim import torch.distributed as dist # from torch.utils.tensorboard import SummaryWriter from tensorboardX import SummaryWriter # Import Custom Utils from utils...
ByungKwanLee/Causal-Adversarial-Instruments
fast_train_causal.py
fast_train_causal.py
py
13,955
python
en
code
37
github-code
18
[ { "api_name": "warnings.filterwarnings", "line_number": 7, "usage_type": "call" }, { "api_name": "torch.nn.backends", "line_number": 26, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 26, "usage_type": "name" }, { "api_name": "torch.nn.autog...
33942094952
import os import requests import pickle import html5lib from bs4 import BeautifulSoup import pandas as pd import urllib.request BASE_URL = 'https://pokemondb.net' file_name = 'scraped_pokemon_page.pickle' gameList = ['FireRed', 'LeafGreen', 'Omega Ruby', 'Alpha Sapphire', "Let's Go Pikachu", "Let's Go Ee...
Maanuj-Vora/Many-Api
data/scripts/pokemon.py
pokemon.py
py
5,411
python
en
code
1
github-code
18
[ { "api_name": "os.path.exists", "line_number": 19, "usage_type": "call" }, { "api_name": "os.path", "line_number": 19, "usage_type": "attribute" }, { "api_name": "requests.get", "line_number": 20, "usage_type": "call" }, { "api_name": "pickle.dump", "line_numb...
10370765339
import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from conv_tasnet import ConvTasNet L = 50 CHUNK = 400 JUMP = int(CHUNK / L) class CachedModel(nn.Module): def __init__(self, path, input_channels=2, R=2, X=7, N=128, use_cuda=True): super(CachedModel, self).__init__() ...
vivjay30/clearbuds
clearbuds_waveform/src/cached_model.py
cached_model.py
py
5,616
python
en
code
34
github-code
18
[ { "api_name": "torch.nn.Module", "line_number": 13, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 13, "usage_type": "name" }, { "api_name": "conv_tasnet.ConvTasNet.load_model", "line_number": 16, "usage_type": "call" }, { "api_name": "conv_...
26850595904
import logging log = logging.getLogger('zen.AWS') import hashlib import hmac import base64 import urllib import datetime from urlparse import urlunparse from twisted.internet.error import ConnectionRefusedError, TimeoutError from twisted.web import http from zope.event import notify from Products.AdvancedQuery impo...
ssvsergeyev/ZenPacks.zenoss.AWS
ZenPacks/zenoss/AWS/utils.py
utils.py
py
9,301
python
en
code
null
github-code
18
[ { "api_name": "logging.getLogger", "line_number": 2, "usage_type": "call" }, { "api_name": "site.addsitedir", "line_number": 29, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 29, "usage_type": "call" }, { "api_name": "os.path", "line_num...
11917442709
#!/usr/bin/env python # coding: utf-8 # In[14]: import boto3 import pandas as pd from os import environ # In[16]: aws_access_key_id = environ.get('aws_access_key_id') aws_secret_access_key = environ.get('aws_secret_access_key') # In[23]: def create_df_all_brands_tweets_from_s3(aws_credentials,bucket,brands):...
yasminaber/mosef2-data-architecture
data_integration_scripts/A-source_twitter/3-silver-to-gold_tweets-aggregation.py
3-silver-to-gold_tweets-aggregation.py
py
2,001
python
en
code
0
github-code
18
[ { "api_name": "os.environ.get", "line_number": 15, "usage_type": "call" }, { "api_name": "os.environ", "line_number": 15, "usage_type": "name" }, { "api_name": "os.environ.get", "line_number": 16, "usage_type": "call" }, { "api_name": "os.environ", "line_numbe...