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
27242958157
# Functional test for uart module import cocotb from cocotb.clock import Clock from cocotb.triggers import Timer,RisingEdge,FallingEdge,ClockCycles,ReadWrite from cocotb.result import TestFailure import random from cocotb_coverage.coverage import CoverPoint,coverage_db covered_valued = [] g_sys_clk = int(cocotb.top.g...
npatsiatzis/uart
uart_16450/testbench.py
testbench.py
py
2,431
python
en
code
1
github-code
71
[ { "api_name": "cocotb.top", "line_number": 11, "usage_type": "attribute" }, { "api_name": "cocotb.top", "line_number": 13, "usage_type": "attribute" }, { "api_name": "cocotb.triggers.RisingEdge", "line_number": 23, "usage_type": "call" }, { "api_name": "cocotb_cov...
20603379019
from selenium import webdriver from selenium.webdriver.chrome.service import Service from webdriver_manager.chrome import ChromeDriverManager from selenium.webdriver.common.by import By import time driver = webdriver.Chrome(service=Service(ChromeDriverManager().install())) try: driver.get(url='https://www.youtub...
Quastrado/selenium
walk.py
walk.py
py
1,194
python
en
code
0
github-code
71
[ { "api_name": "selenium.webdriver.Chrome", "line_number": 8, "usage_type": "call" }, { "api_name": "selenium.webdriver", "line_number": 8, "usage_type": "name" }, { "api_name": "selenium.webdriver.chrome.service.Service", "line_number": 8, "usage_type": "call" }, { ...
75019495268
import rospy import rospkg import os import sys import traceback import json from stable_baselines3 import PPO from stable_baselines3.common.utils import get_device from rosnav.srv import GetAction, GetActionResponse from rosnav.rosnav_space_manager.rosnav_space_manager import RosnavSpaceManager from rosnav import *...
jsntjyz/graduation_code
PPO/src/planners/ppo/scripts/rosnav_node.py
rosnav_node.py
py
2,897
python
en
code
0
github-code
71
[ { "api_name": "sys.modules", "line_number": 15, "usage_type": "attribute" }, { "api_name": "sys.modules", "line_number": 16, "usage_type": "attribute" }, { "api_name": "rospy.get_param", "line_number": 22, "usage_type": "call" }, { "api_name": "os.path.isdir", ...
26106118249
import dataset if __name__ == "__main__": print("DataSet version: ", dataset.__version__) db = dataset.connect('sqlite:///:memory:') # use 'sqlite:///sensors.db' to persist ... sensor_table = db['sensors'] sensor_table.insert(dict(name='SHT711', type="spi", bus_no=3, cs_num=6, alias="RHT-1A")) ...
mortela4/dataset_ex
dataset_ex1.py
dataset_ex1.py
py
830
python
en
code
0
github-code
71
[ { "api_name": "dataset.__version__", "line_number": 5, "usage_type": "attribute" }, { "api_name": "dataset.connect", "line_number": 6, "usage_type": "call" } ]
19448760983
from selenium import webdriver import platform class BrowserInt(): def test(self): baseUrl = "https://learn.letskodeit.com/p/practice" os_platform = platform.system() if os_platform == 'Linux': driver_path = webdriver.Firefox(executable_path='./geckodriver') elif os_pla...
JamesonWelch/projects
selenium_prac/broswer_tests.py
broswer_tests.py
py
1,273
python
en
code
0
github-code
71
[ { "api_name": "platform.system", "line_number": 8, "usage_type": "call" }, { "api_name": "selenium.webdriver.Firefox", "line_number": 10, "usage_type": "call" }, { "api_name": "selenium.webdriver", "line_number": 10, "usage_type": "name" }, { "api_name": "selenium...
36181698948
from collections import namedtuple import torch from torch import nn import lpips import torch.nn.functional as F def make_image_processor(config): type = config.get("type", "RGB").lower() if type == "rgb": ip = RGBProcessor() elif type == "perceptual": ip = PerceptualProcessor(config.get...
Brummi/BehindTheScenes
models/bts/model/image_processor.py
image_processor.py
py
3,230
python
en
code
207
github-code
71
[ { "api_name": "torch.nn.Module", "line_number": 22, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 22, "usage_type": "name" }, { "api_name": "torch.nn.Module", "line_number": 32, "usage_type": "attribute" }, { "api_name": "torch.nn", "li...
42713527355
import pytest _ = pytest.importorskip("duckdb.experimental.spark") from duckdb.experimental.spark.sql.types import ( LongType, StructType, BooleanType, StructField, StringType, IntegerType, LongType, Row, ArrayType, MapType, ) from duckdb.experimental.spark.sql.functions import...
duckdb/duckdb
tools/pythonpkg/tests/fast/spark/test_spark_filter.py
test_spark_filter.py
py
5,568
python
en
code
13,067
github-code
71
[ { "api_name": "pytest.importorskip", "line_number": 3, "usage_type": "call" }, { "api_name": "duckdb.experimental.spark.sql.types.StructType", "line_number": 33, "usage_type": "call" }, { "api_name": "duckdb.experimental.spark.sql.types.StructField", "line_number": 35, "u...
41162543387
# got from https://gist.github.com/enigmaticape/4254054 #!/usr/bin/env python import sys import collections # Bag em # cipher_file = open( sys.argv[ 1 ], 'rb') def get_IC(c_text): cipher_text = c_text # remove all non alpha and whitespace and force uppercase # SOTHATCIPHERTEXTLOOKSLIKETHIS cipher...
Vinecnt/VigenereCipher
ic.py
ic.py
py
899
python
en
code
0
github-code
71
[ { "api_name": "collections.Counter", "line_number": 23, "usage_type": "call" } ]
35747264041
from flask import Flask, render_template, request from os import listdir from os.path import isfile, join app = Flask(__name__) @app.route('/') def index(): deck_themes = get_img_dirs() return render_template('index.html', deck_themes=deck_themes) def get_files(deck_theme): my_path = f'static/images/{d...
miralodi/Quicon
server.py
server.py
py
1,857
python
en
code
0
github-code
71
[ { "api_name": "flask.Flask", "line_number": 5, "usage_type": "call" }, { "api_name": "flask.render_template", "line_number": 11, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 16, "usage_type": "call" }, { "api_name": "os.listdir", "line_...
20755794512
import sys import time import string import random import requests import html.parser from bs4 import BeautifulSoup class IndeedSalaryFinder(object): ''' Scrapes Indeed to find the Salary associated with the job in question. ''' def __init__(self, query): ''' query - a query to find th...
NeverForged/IndeedSalaryFinder
Source/salary_grid_search.py
salary_grid_search.py
py
2,757
python
en
code
0
github-code
71
[ { "api_name": "time.sleep", "line_number": 32, "usage_type": "call" }, { "api_name": "random.randint", "line_number": 32, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 67, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_...
27107147947
#!/usr/bin/env python # -*- coding: utf-8 -*- """MergeResults.py: Gather all the information from the json files obtained in the tests and create a table in a csv file """ __author__ = "Jorge de la Peña García" __version__ = "1.0" __maintainer__ = "Jorge" __email__ = "jpena@ucam.edu" __status__ = "Production" impo...
bio-hpc/sibila
Common/Analysis/MergeResults.py
MergeResults.py
py
2,994
python
en
code
5
github-code
71
[ { "api_name": "os.path.splitext", "line_number": 30, "usage_type": "call" }, { "api_name": "os.path.basename", "line_number": 30, "usage_type": "call" }, { "api_name": "glob.glob", "line_number": 41, "usage_type": "call" }, { "api_name": "os.path.join", "line_...
1283239406
import math import time import _pyinstaller_hooks_contrib import pygame import os import sys import json pygame.font.init() pygame.mixer.init() def getResourcePath(relative_path): try: # PyInstaller creates a temp folder and stores path in _MEIPASS base_path = sys._MEIPASS base_path = os.p...
DEVENILLA/basic-mario-2
main.py
main.py
py
25,699
python
en
code
0
github-code
71
[ { "api_name": "pygame.font.init", "line_number": 8, "usage_type": "call" }, { "api_name": "pygame.font", "line_number": 8, "usage_type": "attribute" }, { "api_name": "pygame.mixer.init", "line_number": 9, "usage_type": "call" }, { "api_name": "pygame.mixer", "...
35776789391
"""Redact it yaml module. This module contains the core logic to redact data from yaml files. """ import glob from typing import Any from redact_it.redact_it import RedactIt class RedactItYaml(RedactIt): """Redact it yaml class.""" def __init__(self, config_file: str, file_path: str, dry_run: bool) -> None...
ryankwilliams/redact-it
redact_it/redact_yaml.py
redact_yaml.py
py
2,185
python
en
code
0
github-code
71
[ { "api_name": "redact_it.redact_it.RedactIt", "line_number": 11, "usage_type": "name" }, { "api_name": "glob.glob", "line_number": 29, "usage_type": "call" }, { "api_name": "typing.Any", "line_number": 35, "usage_type": "name" } ]
39250308376
import spacy from spacy.matcher import Matcher from spacy.lang.en import English from lib.custom_nlp.patterns import cse_pattern, tsx_pattern, stock_phrases import re from spacytextblob.spacytextblob import SpacyTextBlob try: from lib.custom_nlp.curr_tickers import stocks as stock_names except ImportError as e: ...
dli-invest/ytube_nlp
lib/custom_nlp/text_processing.py
text_processing.py
py
4,346
python
en
code
1
github-code
71
[ { "api_name": "lib.custom_nlp.curr_tickers.stocks", "line_number": 11, "usage_type": "name" }, { "api_name": "spacy.load", "line_number": 17, "usage_type": "call" }, { "api_name": "spacy.matcher.Matcher", "line_number": 40, "usage_type": "call" }, { "api_name": "l...
35033693032
# -*- coding: utf-8 -*- # Define your item pipelines here # # Don't forget to add your pipeline to the ITEM_PIPELINES setting # See: https://doc.scrapy.org/en/latest/topics/item-pipeline.html from scrapy.exceptions import DropItem from scrapy import Request from scrapy.pipelines.images import ImagesPipeline class B(Im...
guancgsuccess/python_spider
unit47 - scrapy/myspiders/myspiders/a.py
a.py
py
2,165
python
en
code
1
github-code
71
[ { "api_name": "scrapy.pipelines.images.ImagesPipeline", "line_number": 10, "usage_type": "name" }, { "api_name": "scrapy.Request", "line_number": 30, "usage_type": "call" }, { "api_name": "scrapy.exceptions.DropItem", "line_number": 56, "usage_type": "call" } ]
86284862166
# Licensed under a 3-clause BSD style license - see LICENSE.rst from astropy import units import numpy as np import pytest from sofia_redux.scan.filters.filter import Filter from sofia_redux.scan.filters.kill_filter import KillFilter class NoFilter(Filter): # pragma: no cover def __init__(self, integration=No...
SOFIA-USRA/sofia_redux
sofia_redux/scan/filters/tests/test_filter.py
test_filter.py
py
16,812
python
en
code
9
github-code
71
[ { "api_name": "sofia_redux.scan.filters.filter.Filter", "line_number": 11, "usage_type": "name" }, { "api_name": "numpy.ones_like", "line_number": 25, "usage_type": "call" }, { "api_name": "numpy.ones", "line_number": 27, "usage_type": "call" }, { "api_name": "num...
16670674334
from sklearn.model_selection import train_test_split from sklearn.datasets import load_iris import numpy as np iris = load_iris() atributos = iris.data classes = iris.target atributos_do_conjunto = atributos[classes != 0] classes_conjunto = classes[classes != 0] classes_conjunto = np.where(classes_conjunto == 1, ...
thiagovb46/PerceptronGenetico
perceptron_genetico.py
perceptron_genetico.py
py
4,201
python
pt
code
0
github-code
71
[ { "api_name": "sklearn.datasets.load_iris", "line_number": 5, "usage_type": "call" }, { "api_name": "numpy.where", "line_number": 11, "usage_type": "call" }, { "api_name": "numpy.random.uniform", "line_number": 17, "usage_type": "call" }, { "api_name": "numpy.rand...
34392050108
import serial import RPi.GPIO as GPIO import os, time textnumber = '8327978415' textmessage = 'Please return to your car immediately!' GPIO.setmode(GPIO.BOARD) GSMpower = 11 GPIO.setup(GSMpower,GPIO.OUT) GPIO.output(GSMpower,1) #Turn on GSM # Enable Serial Communication print("Begin SMS procedure") port = ...
TLeigh315/ForgetMeNot
404/GSM/GSMfunc.py
GSMfunc.py
py
1,461
python
en
code
0
github-code
71
[ { "api_name": "RPi.GPIO.setmode", "line_number": 7, "usage_type": "call" }, { "api_name": "RPi.GPIO", "line_number": 7, "usage_type": "name" }, { "api_name": "RPi.GPIO.BOARD", "line_number": 7, "usage_type": "attribute" }, { "api_name": "RPi.GPIO.setup", "line...
20670378851
import os, sys import codecs, re from nltk import sent_tokenize # import pandas as pd from collections import Counter from base64 import b64decode, b64encode # from flask import Flask, Blueprint, render_template, request, redirect, jsonify from logging import getLogger import requests from flask_mysqldb import MySQL im...
hseling/hseling-repo-cat-and-kittens
hseling-web-cat-and-kittens/hseling_web_cat_and_kittens/main.py
main.py
py
23,079
python
en
code
0
github-code
71
[ { "api_name": "os.environ.get", "line_number": 43, "usage_type": "call" }, { "api_name": "os.environ", "line_number": 43, "usage_type": "attribute" }, { "api_name": "os.environ.get", "line_number": 47, "usage_type": "call" }, { "api_name": "os.environ", "line_...
19784093844
#딥지안봄 import sys from collections import deque N=int(sys.stdin.readline()) #보드의 크기 board=[[0]*(N+2) for _ in range(N+2)] #보드 가장자리 벽처리(2) board[0]=[2]*(N+2) board[N+1]=[2]*(N+2) for i in range(N+2): board[i][0]=2 board[i][N+1]=2 K=int(sys.stdin.readline()) #사과의 개수 for _ in range(K): x,y=map(int,sys.stdin...
yeoneed/Algorithm_study
이코테/구현/Part3_5_뱀/Jieon.py
Jieon.py
py
1,574
python
ko
code
0
github-code
70
[ { "api_name": "sys.stdin.readline", "line_number": 5, "usage_type": "call" }, { "api_name": "sys.stdin", "line_number": 5, "usage_type": "attribute" }, { "api_name": "sys.stdin.readline", "line_number": 15, "usage_type": "call" }, { "api_name": "sys.stdin", "l...
74947716390
import numpy as np import os import re from keras.preprocessing import sequence def token(sentence, remove_vowels=False, remove_repeat=False, minchars=2): tokens = [] # for t in re.findall("[A-Z]{2,}(?![a-z])|[A-Z][a-z]+(?=[A-Z])|[\w]+",sentence.lower()): for t in re.findall("[a-zA-Z]+",sentence.lower())...
krishhrana/Sentiment_analysis
twitter_sentiment.py
twitter_sentiment.py
py
3,982
python
en
code
0
github-code
71
[ { "api_name": "re.findall", "line_number": 12, "usage_type": "call" }, { "api_name": "re.sub", "line_number": 25, "usage_type": "call" }, { "api_name": "numpy.asarray", "line_number": 68, "usage_type": "call" }, { "api_name": "keras.preprocessing.sequence.pad_sequ...
7556903142
from flask import Flask, escape, request from flask_cors import CORS import json from parsers.parse_reports import parse_report from .measures.jira import jira_issues app = Flask(__name__) CORS(app) projects = [ {'key': 'charli-app-mobile'}, {'key': 'charli-app-service'} ] @app.route('/') def hello(): na...
sophia-sherman/hackathon-2019
server/api/api.py
api.py
py
3,108
python
en
code
0
github-code
71
[ { "api_name": "flask.Flask", "line_number": 7, "usage_type": "call" }, { "api_name": "flask_cors.CORS", "line_number": 8, "usage_type": "call" }, { "api_name": "flask.request.args.get", "line_number": 17, "usage_type": "call" }, { "api_name": "flask.request.args",...
9638677997
#!/usr/bin/env python3 # daemon.py """ originally from the Python Cookbook (version 3) 11.8. Implementing Remote Procedure Calls 12.2. Determining If a Thread Has Started 12.14. Launching a Daemon Process on Unix (perhaps more) """ import os import sys import atexit import signal import json from datetime ...
buffalotheory/critter_list
pyplayer/pyplayerd.py
pyplayerd.py
py
7,138
python
en
code
1
github-code
71
[ { "api_name": "datetime.datetime.now", "line_number": 32, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 32, "usage_type": "name" }, { "api_name": "sys.stderr", "line_number": 33, "usage_type": "attribute" }, { "api_name": "pyplayer.MPla...
2363363364
import numpy as np import pandas as pd import os import cv2 import matplotlib.pyplot as plt import matplotlib.image as mpimg import math from tensorflow.keras.preprocessing import image from tensorflow.keras.applications.vgg16 import VGG16 from tensorflow.keras.applications.vgg16 import preprocess_input as preprocess_i...
gupta-pulkit/video-captioning
preprocess_videos.py
preprocess_videos.py
py
8,288
python
en
code
0
github-code
71
[ { "api_name": "pandas.read_csv", "line_number": 23, "usage_type": "call" }, { "api_name": "os.listdir", "line_number": 46, "usage_type": "call" }, { "api_name": "cv2.VideoCapture", "line_number": 69, "usage_type": "call" }, { "api_name": "os.mkdir", "line_numb...
40307464924
import torch import heat as ht class Laplacian: def __init__( self, similarity, weighted=True, definition="norm_sym", mode="fully_connected", threshold_key="upper", threshold_value=1.0, neighbours=10, ): """ Graph Laplacians from ...
coquelin77/icml-repo
heat/graph/laplacian.py
laplacian.py
py
3,946
python
en
code
0
github-code
71
[ { "api_name": "heat.sum", "line_number": 69, "usage_type": "call" }, { "api_name": "torch.ones", "line_number": 72, "usage_type": "call" }, { "api_name": "torch.where", "line_number": 75, "usage_type": "call" }, { "api_name": "heat.sqrt", "line_number": 76, ...
10742845136
from netCDF4 import Dataset import numpy as np def read_netcdf(filename): with Dataset(filename) as nc: # Grab lat, long lats = nc.variables['latitude'][:] lons = nc.variables['longitude'][:] # Grab speed + direction sar_wind = nc.variables['sar_wind'][:] input_d...
gonzodeveloper/UHABS
utils/file_io.py
file_io.py
py
571
python
en
code
1
github-code
70
[ { "api_name": "netCDF4.Dataset", "line_number": 7, "usage_type": "call" }, { "api_name": "numpy.sin", "line_number": 18, "usage_type": "call" }, { "api_name": "numpy.cos", "line_number": 19, "usage_type": "call" }, { "api_name": "numpy.dstack", "line_number": ...
73698849506
"""XML tools for reading the RADS's configuration files.""" import os import re from itertools import chain, dropwhile, takewhile, tee from typing import Any, Callable, Optional, Sequence, cast from ..typing import PathLike, PathLikeOrFile from ..utility import ensure_open, filestring, isio try: from ..xml impor...
ccarocean/pyrads
rads/xml/utility.py
utility.py
py
8,715
python
en
code
2
github-code
70
[ { "api_name": "typing.PathLikeOrFile", "line_number": 32, "usage_type": "name" }, { "api_name": "utility.isio", "line_number": 33, "usage_type": "call" }, { "api_name": "os.fspath", "line_number": 35, "usage_type": "call" }, { "api_name": "typing.cast", "line_...
31536267994
# -*- coding: utf-8 -*- """ Created on Mon Oct 8 12:44:21 2018 @author: moreaua2 """ import numpy as np import matplotlib.pyplot as plt from scipy.integrate import solve_ivp def DampedOscillator(t, y, params): x, v = y b, omega_0 = params dxdt = v dvdt = -b*v-(omega_0**2)*x dyd...
Bedshaped/Runge-Kutta-Method
rk_dho.py
rk_dho.py
py
1,345
python
en
code
0
github-code
70
[ { "api_name": "numpy.array", "line_number": 18, "usage_type": "call" }, { "api_name": "numpy.pi", "line_number": 24, "usage_type": "attribute" }, { "api_name": "numpy.pi", "line_number": 25, "usage_type": "attribute" }, { "api_name": "scipy.integrate.solve_ivp", ...
36804293970
import json import urllib.parse import urllib.request import schedule import sys import configparser import emoji # loading config status = "" config = configparser.ConfigParser() config.sections() config.read('config.ini') status_dump = config['python']['status_dump'] json_dump = config['python']['json_dump'] headp...
Venomen/headphones-on
headphones-on.py
headphones-on.py
py
2,570
python
en
code
0
github-code
70
[ { "api_name": "configparser.ConfigParser", "line_number": 12, "usage_type": "call" }, { "api_name": "json.loads", "line_number": 30, "usage_type": "call" }, { "api_name": "urllib.parse.parse.urlencode", "line_number": 51, "usage_type": "call" }, { "api_name": "url...
19028841302
from datetime import datetime from django.db import models from django.contrib.auth.models import AbstractBaseUser, BaseUserManager, PermissionsMixin from django.contrib.auth.validators import UnicodeUsernameValidator from django.core.mail import send_mail from django.utils import timezone from django.utils.trans...
dorayakin/summer-vacation
summervacation/diaryapp/models.py
models.py
py
5,146
python
en
code
0
github-code
70
[ { "api_name": "django.contrib.auth.models.BaseUserManager", "line_number": 12, "usage_type": "name" }, { "api_name": "django.contrib.auth.models.AbstractBaseUser", "line_number": 46, "usage_type": "name" }, { "api_name": "django.contrib.auth.models.PermissionsMixin", "line_nu...
17060253497
import os, tqdm, random, pickle import torch import torchvision from torch.autograd import Variable from torchvision.transforms import CenterCrop, ToTensor, Compose, Lambda, Resize from torchvision.datasets import coco from torch.nn.functional import binary_cross_entropy, relu, nll_loss from torch.nn import Embedding...
pbloem/bimodal
train.py
train.py
py
12,089
python
en
code
0
github-code
71
[ { "api_name": "enum.Enum", "line_number": 29, "usage_type": "name" }, { "api_name": "tensorboardX.SummaryWriter", "line_number": 39, "usage_type": "call" }, { "api_name": "torchvision.transforms.Compose", "line_number": 41, "usage_type": "call" }, { "api_name": "t...
40126422449
"""Subtask 1 SemEval Calllange Autors: Rosina Baumann & Sabrina ...""" import sys import os import loaddata import pandas as pd from tqdm import tqdm import os from sklearn.feature_extraction.text import CountVectorizer from sklearn.pipeline import Pipeline from sklearn import svm from sklearn.metrics import classific...
cicl-iscl/FramingDetection
Subtask1/main.py
main.py
py
5,282
python
en
code
1
github-code
70
[ { "api_name": "tqdm.tqdm", "line_number": 23, "usage_type": "call" }, { "api_name": "os.listdir", "line_number": 23, "usage_type": "call" }, { "api_name": "pandas.DataFrame", "line_number": 27, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_num...
33034439351
# -*- codeing: utf-8 -*- ''' Create on 2020/2/11 @author: shengzhixu @email:sz.xu@hotmial.com ''' import numpy as np import scipy as sp import matplotlib.pyplot as plt from mpl_toolkits.axes_grid1.inset_locator import zoomed_inset_axes from mpl_toolkits.axes_grid1.inset_locator import inset_axes from mpl_toolkits.axe...
xushengzhi/pmcw
PyMat/aircraft_fmcw.py
aircraft_fmcw.py
py
3,762
python
en
code
1
github-code
70
[ { "api_name": "DataReform.data_reform", "line_number": 37, "usage_type": "call" }, { "api_name": "numpy.fft.fftshift", "line_number": 94, "usage_type": "call" }, { "api_name": "numpy.fft.fft2", "line_number": 94, "usage_type": "call" }, { "api_name": "scipy.consta...
36865763313
import math import sys import rules def getValues(): n = int(input("Please enter how many slices you want to take (N): ")) a = float(input("Please enter the lower integration bound (a): ")) b = float(input("Please enter the upper integration bound (a): ")) # pls don't hack me string = input("Please enter a math...
NeonWizard/MATH1220-Approximate-Integration
main.py
main.py
py
1,831
python
en
code
0
github-code
70
[ { "api_name": "rules.left_endpoint", "line_number": 48, "usage_type": "call" }, { "api_name": "rules.right_endpoint", "line_number": 50, "usage_type": "call" }, { "api_name": "rules.midpoint", "line_number": 52, "usage_type": "call" }, { "api_name": "rules.trapezo...
29194897368
#!/usr/bin/env python # -*- coding: utf-8 -*- # Created by jacob.mendt@pikobytes.de on 09.09.21 # # This file is subject to the terms and conditions defined in file # 'LICENSE', which is part of this source code package import json from datetime import datetime from georeference.models.raw_maps import RawMap from geor...
slub/kartenforum_georeference
georeference/views/map_view_test.py
map_view_test.py
py
3,703
python
en
code
1
github-code
70
[ { "api_name": "georeference.models.map_view.MapView", "line_number": 21, "usage_type": "call" }, { "api_name": "datetime.datetime.now", "line_number": 23, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 23, "usage_type": "name" }, { "api_...
23460810054
from flask import Flask, render_template, request, redirect from flask_sqlalchemy import SQLAlchemy from send_mail import send_mail app = Flask(__name__) ENV = 'dev' if ENV == 'dev': app.debug = True app.config['SQLALCHEMY_DATABASE_URI'] = 'postgresql://postgres:Dutyfirst!@localhost/mywebsite' else: app....
yaqoobHajizada/MYWebsite
app.py
app.py
py
1,168
python
en
code
0
github-code
70
[ { "api_name": "flask.Flask", "line_number": 5, "usage_type": "call" }, { "api_name": "flask_sqlalchemy.SQLAlchemy", "line_number": 18, "usage_type": "call" }, { "api_name": "flask.render_template", "line_number": 32, "usage_type": "call" }, { "api_name": "flask.re...
26241823511
import qi import sys import pytest def test_module(): mod = qi.module("moduletest") cat = mod.createObject("Cat", "truc") assert cat.meow(3) == 'meow' mouse = mod.createObject("Mouse") assert mouse.squeak() == 18 session = qi.Session() session.listenStandalone('tcp://localhost:0') ca...
cristianrubioa/pynaoqi-installation-for-mac
pynaoqi/lib/python2.7/site-packages/qi/test/test_module.py
test_module.py
py
827
python
en
code
6
github-code
70
[ { "api_name": "qi.module", "line_number": 6, "usage_type": "call" }, { "api_name": "qi.Session", "line_number": 14, "usage_type": "call" }, { "api_name": "qi.module", "line_number": 24, "usage_type": "call" }, { "api_name": "pytest.raises", "line_number": 26, ...
3241336207
from classes.collabrative_filtering import collabrativefiltering_recommender from classes.demographic_recommender import demographic_recommender_system from classes.helper import get_reviews import streamlit as st reviews = get_reviews() def recommend(): st.title("Hybrid Recommender System") # app name with ...
rubaramanan/Hybrid-recomendation-system
scripts/recommender.py
recommender.py
py
1,880
python
en
code
0
github-code
70
[ { "api_name": "classes.helper.get_reviews", "line_number": 6, "usage_type": "call" }, { "api_name": "streamlit.title", "line_number": 9, "usage_type": "call" }, { "api_name": "streamlit.form", "line_number": 10, "usage_type": "call" }, { "api_name": "streamlit.tex...
29918308314
# -*- coding: utf-8 -*- #!/usr/bin/env python import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "seahub.settings") import django django.setup() from seaserv import ccnet_api from keeper.utils import is_in_mpg_domain_list def get_user_stats(): """get KEEPER user stats """ try: users = ccn...
MPDL/KEEPER
seafile_keeper_ext/scripts/monitoring/users_stats.py
users_stats.py
py
1,013
python
en
code
6
github-code
70
[ { "api_name": "os.environ.setdefault", "line_number": 5, "usage_type": "call" }, { "api_name": "os.environ", "line_number": 5, "usage_type": "attribute" }, { "api_name": "django.setup", "line_number": 7, "usage_type": "call" }, { "api_name": "seaserv.ccnet_api.get...
70169189347
import logging from typing import Dict import bpy from . import copy_as_mmd_settings from .copy_as_mmd_settings import CopyAsMMDSettings log = logging.getLogger(__name__) # Keep all lowercase VISEMES = { "ah": "あ", "ch": "い", "u": "う", "e": "え", "oh": "お", } MMD_SHAPEKEYS = { "blink happy":...
ShyWolf42/Copy-to-MMD-Visemes
src/mmd_shapekeys/mmd_shapekeys_op.py
mmd_shapekeys_op.py
py
2,849
python
en
code
4
github-code
70
[ { "api_name": "logging.getLogger", "line_number": 9, "usage_type": "call" }, { "api_name": "bpy.types", "line_number": 41, "usage_type": "attribute" }, { "api_name": "bpy.ops.object.shape_key_add", "line_number": 48, "usage_type": "call" }, { "api_name": "bpy.ops"...
14662930954
#!/usr/bin/env python3 import re import sys import requests ip = sys.argv[1] data = requests.get(f'http://{ip}:9171/_debug_toolbar/sse') data = eval(data.text.split('\n')[2][5:]) print(data) ids = list(map(lambda x: x[0], data)) print(ids) for each in ids: r = requests.get(f'http://{ip}:9171/_debug_toolbar/{ea...
C4T-BuT-S4D/innoctf-teazer-01-03-2020
sploits/passman/debugger.py
debugger.py
py
385
python
en
code
2
github-code
70
[ { "api_name": "sys.argv", "line_number": 8, "usage_type": "attribute" }, { "api_name": "requests.get", "line_number": 10, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 17, "usage_type": "call" }, { "api_name": "re.findall", "line_number"...
5391426386
import sys import numpy as np import networkx as nx from sklearn.preprocessing import normalize # convergence criterion - when vector L1 norm drops below 10^(-6) # (this is the same as the original RWR paper) CONV_THRESHOLD = 0.000001 class RandomWalkWithRestartCore: def __init__(self, personalization_...
LeoM93/BiologicalRandomWalks
biological_random_walks/core/core.py
core.py
py
3,241
python
en
code
3
github-code
70
[ { "api_name": "numpy.copy", "line_number": 31, "usage_type": "call" }, { "api_name": "numpy.linalg.norm", "line_number": 39, "usage_type": "call" }, { "api_name": "numpy.linalg", "line_number": 39, "usage_type": "attribute" }, { "api_name": "numpy.subtract", "...
26461472619
import torch import torch.nn as nn import numpy as np from tqdm import tqdm from embedder import embedder from evaluate import evaluate from layers import GCN, InterDiscriminator class HDI(embedder): def __init__(self, args): embedder.__init__(self, args) self.args = args self.coef_l = se...
baoyujing/HDMI
models/hdi.py
hdi.py
py
3,674
python
en
code
22
github-code
70
[ { "api_name": "embedder.embedder", "line_number": 11, "usage_type": "name" }, { "api_name": "embedder.embedder.__init__", "line_number": 13, "usage_type": "call" }, { "api_name": "embedder.embedder", "line_number": 13, "usage_type": "name" }, { "api_name": "torch....
22342232662
import io import requests def grower_export(conn, date, organization_id, ckan_config): """Prints a message with the current time""" print("capture_export...") # check yearMonth (yyyy-mm) format with regex import re if not re.match(r'^\d{4}-\d{2}-\d{2}$', date): msg = f'date format error {dat...
Greenstand/treetracker-airflow-dags
lib/grower_export.py
grower_export.py
py
4,257
python
en
code
5
github-code
70
[ { "api_name": "re.match", "line_number": 10, "usage_type": "call" }, { "api_name": "datetime.datetime.now", "line_number": 22, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 22, "usage_type": "attribute" }, { "api_name": "requests.get", ...
27229704491
import gym from gym import spaces import pandas as pd from IPython.display import display from IPython.display import clear_output import numpy as np from loc import Location class HunterWorldEnv(gym.Env): def __init__(self, agent, target, size=10, n_border=20, agent_locs=[]): self.size = size ...
av-ilin/RUDN
TAutomata/Lab04/enviroment.py
enviroment.py
py
4,892
python
en
code
0
github-code
70
[ { "api_name": "gym.Env", "line_number": 10, "usage_type": "attribute" }, { "api_name": "gym.spaces.Dict", "line_number": 16, "usage_type": "call" }, { "api_name": "gym.spaces", "line_number": 16, "usage_type": "name" }, { "api_name": "gym.spaces.Box", "line_nu...
15012259804
from random import uniform import numpy as np import numba """ REFs: M. Hopfensitz et al., "Multiscale Binarization of Gene Expression Data for Reconstructing Boolean Networks," in IEEE/ACM Transactions on Computational Biology and Bioinformatics, vol. 9, no. 2, pp. 487-498, March-April 2012, doi:...
aertslab/scenicplus
src/scenicplus/BASCA.py
BASCA.py
py
7,184
python
en
code
118
github-code
70
[ { "api_name": "numpy.mean", "line_number": 30, "usage_type": "call" }, { "api_name": "numpy.sum", "line_number": 32, "usage_type": "call" }, { "api_name": "numba.jit", "line_number": 25, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_number": 37, ...
14068672306
import math from astropy import units as u from speclite.filters import load_filter import galcheat SPECLITE_SURVEY_PREFIXES = { "DES": "decam2014", "Euclid_VIS": "Euclid", "HSC": "hsc2017", "LSST": "lsst2016", } def compute_zeropoint_mag(band_name, effective_area, exposure_time=1 * u.s): """Co...
aboucaud/galcheat
scripts/check_zeropoints.py
check_zeropoints.py
py
2,071
python
en
code
15
github-code
71
[ { "api_name": "astropy.units.s", "line_number": 16, "usage_type": "attribute" }, { "api_name": "astropy.units", "line_number": 16, "usage_type": "name" }, { "api_name": "speclite.filters.load_filter", "line_number": 18, "usage_type": "call" }, { "api_name": "math....
569587780
from neural_network import create_model_cnn from neural_network import predict from neural_network import cluster_data from neural_network import create_scatter_plot from spectrogram_creation import load_audio from spectrogram_creation import get_spectrogram import numpy as np import sys import os import joblib import...
SvadilfariYT/SoundCloud_3
cnn.py
cnn.py
py
4,081
python
en
code
0
github-code
70
[ { "api_name": "sys.stdout", "line_number": 18, "usage_type": "attribute" }, { "api_name": "joblib.dump", "line_number": 19, "usage_type": "call" }, { "api_name": "sys.stdout", "line_number": 20, "usage_type": "attribute" }, { "api_name": "sys.__stdout__", "lin...
33974957503
import os, builtins from io import BytesIO from typing import BinaryIO from PIL import Image, CurImagePlugin from PIL._binary import o8 from PIL._binary import o16le as o16 from PIL._binary import o32le as o32 _MAGIC_CUR = b"\0\0\2\0" def _save_cur(im, fp, filename): fp.write(_MAGIC_CUR) # (2+2) width, heig...
TechGuard/Custom-Mouse-Cursor
svg_to_cur/CurImagePlugin.py
CurImagePlugin.py
py
3,978
python
en
code
0
github-code
70
[ { "api_name": "PIL.Image.Resampling", "line_number": 37, "usage_type": "attribute" }, { "api_name": "PIL.Image", "line_number": 37, "usage_type": "name" }, { "api_name": "PIL._binary.o16le", "line_number": 39, "usage_type": "call" }, { "api_name": "PIL._binary.o8"...
28993553483
import tweepy from textblob import TextBlob import pandas as pd import numpy as np import re import matplotlib.pyplot as plt import sys plt.style.use('fivethirtyeight') api_key = "" api_secret_key = "" access_token = "" access_token_secret = "" auth_handler = tweepy.OAuthHandler(consumer_key = api_key, ...
FiazBinSayeed/Twitter-Sentiment-Analysis
Twitter_Sentiment_Analysis.py
Twitter_Sentiment_Analysis.py
py
1,011
python
en
code
0
github-code
71
[ { "api_name": "matplotlib.pyplot.style.use", "line_number": 8, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.style", "line_number": 8, "usage_type": "attribute" }, { "api_name": "matplotlib.pyplot", "line_number": 8, "usage_type": "name" }, { "api_name"...
24584570953
from typing import List class Solution: def rankTeams(self, votes: List[str]) -> str: count = { v: [0] * len(votes[0]) + [v] for v in votes[0] } for vote in votes: for i, v in enumerate(vote): count[v][i] -= 1 return ''.join(sorted(votes[0], key=count.get)) ...
brandoneng000/LeetCode
medium/1366.py
1366.py
py
1,449
python
en
code
0
github-code
71
[ { "api_name": "typing.List", "line_number": 4, "usage_type": "name" } ]
38088290160
# https://www.hackerrank.com/challenges/itertools-product/problem from itertools import product a = list(input().split()) # [int(x) for x in input().split()] num1 = [int(i) for i in a] # b = list(input().split()) num2 = [int(i) for i in b] c=list(product(num1,num2)) print(*c)
Niconjp/Python
HackerRank/itertools-product.py
itertools-product.py
py
281
python
en
code
0
github-code
71
[ { "api_name": "itertools.product", "line_number": 9, "usage_type": "call" } ]
31621914828
# @Time : 2022-10-02 10:53 # @Author : Phalange # @File : 6193. 沙漏的最大总和.py # @Software: PyCharm # C'est la vie,enjoy it! :D from typing import List class Solution: def maxSum(self, grid: List[List[int]]) -> int: ans = 0 m = len(grid) n = len(grid[0]) for i in range(0,m-2): ...
enternityFan/LeetCodePythonVersion
20221002周赛313/6193. 沙漏的最大总和.py
6193. 沙漏的最大总和.py
py
599
python
en
code
0
github-code
71
[ { "api_name": "typing.List", "line_number": 10, "usage_type": "name" } ]
24338304033
import errno import json import os import cv2 import matplotlib.pyplot as plt import numpy as np import pandas as pd import scipy.misc from scipy.ndimage import rotate from scipy.stats import bernoulli # Some useful constants DRIVING_LOG_FILE = './ex_data/driving_log.csv' IMG_PATH = './ex_data/' STEERING_COEFFICIENT ...
T800GHB/Udacity_Self_Driving_Project
CarND-Behavioral-Cloning-P3/assist.py
assist.py
py
4,101
python
en
code
0
github-code
70
[ { "api_name": "numpy.ceil", "line_number": 23, "usage_type": "call" }, { "api_name": "numpy.ceil", "line_number": 24, "usage_type": "call" }, { "api_name": "scipy.misc.misc.imresize", "line_number": 30, "usage_type": "call" }, { "api_name": "scipy.misc.misc", ...
18837985720
# ライブラリのインポート import streamlit as st from PIL import Image #サイドバーに表示させる st.sidebar.header('画像から文字起こし') # ファイルアップロード upload_file = st.sidebar.file_uploader('↓ファイルをアップロードしてください',type=['png', 'jpg', 'gif', 'jpeg']) # メイン画面 if upload_file is not None: image = Image.open(upload_file).convert('RGB') # st.write(ima...
umi12345/ocr_streamlit
main.py
main.py
py
2,098
python
ja
code
0
github-code
70
[ { "api_name": "streamlit.sidebar.header", "line_number": 6, "usage_type": "call" }, { "api_name": "streamlit.sidebar", "line_number": 6, "usage_type": "attribute" }, { "api_name": "streamlit.sidebar.file_uploader", "line_number": 8, "usage_type": "call" }, { "api_...
7929850302
from tencentcloud.ess.v20201111.models import CreateFlowSignReviewRequest, UserInfo from api.common import get_client_instance from config import Config def create_flow_sign_review(operator_user_id, flow_id, review_type, review_message): # 构造客户端调用实例 client = get_client_instance( Config.secret_id, ...
tencentess/ess-python-kit
api/flow_management/create_flow_sign_review.py
create_flow_sign_review.py
py
1,219
python
en
code
0
github-code
71
[ { "api_name": "api.common.get_client_instance", "line_number": 10, "usage_type": "call" }, { "api_name": "config.Config.secret_id", "line_number": 11, "usage_type": "attribute" }, { "api_name": "config.Config", "line_number": 11, "usage_type": "name" }, { "api_nam...
33592154312
# Nome: Pedro Victor Rodrigues de Carvalho # Matrícula: 17/0113043 # Universidade de Brasília, 2º semestre de 2018 # Curso: Engenharia de Computação # Matéria: Introdução ao Processamento de Imagens # Professor: Alexandre Zaghetto # Segunda parte do Assignment 1: Rotulação de componentes conectado...
pedrovrc/IPI_Assignments
Assignment 1/labeling.py
labeling.py
py
4,859
python
en
code
0
github-code
71
[ { "api_name": "cv2.copyMakeBorder", "line_number": 64, "usage_type": "call" }, { "api_name": "cv2.BORDER_CONSTANT", "line_number": 64, "usage_type": "attribute" }, { "api_name": "numpy.zeros", "line_number": 65, "usage_type": "call" }, { "api_name": "cv2.imread", ...
17911598327
from django.shortcuts import render, get_object_or_404 from django.http import Http404 from .models import Player, Volume, Gig def index(request): players = Player.objects.order_by('name') volumes = Volume.objects.order_by('name') return render(request, 'music/index.html', {'players': players, 'volumes': volumes}) ...
jeremiecoullon/LDC
music/views.py
views.py
py
1,106
python
en
code
0
github-code
71
[ { "api_name": "models.Player.objects.order_by", "line_number": 6, "usage_type": "call" }, { "api_name": "models.Player.objects", "line_number": 6, "usage_type": "attribute" }, { "api_name": "models.Player", "line_number": 6, "usage_type": "name" }, { "api_name": "...
28451230753
from django.shortcuts import render, redirect, HttpResponse from django.contrib.auth.decorators import login_required from crm import models from crm.forms import CustomerForm, StudentEnrollmentForm from django.db.utils import IntegrityError import json, os from django.views.decorators.csrf import csrf_exempt from djan...
FengJun1206/PerfectCRM
crm/views.py
views.py
py
5,581
python
en
code
0
github-code
71
[ { "api_name": "django.shortcuts.render", "line_number": 15, "usage_type": "call" }, { "api_name": "django.contrib.auth.decorators.login_required", "line_number": 12, "usage_type": "name" }, { "api_name": "crm.models.CustomerInfo.objects.all", "line_number": 21, "usage_typ...
27327703829
import collections from typing import Union, Optional, Set, List, Dict, Tuple from blspy import AugSchemeMPL from chiabip158 import PyBIP158 from clvm.casts import int_from_bytes from src.consensus.block_rewards import ( calculate_pool_reward, calculate_base_farmer_reward, ) from src.consensus.blockchain_inte...
LeastAuthority/Chia-Network-chia-blockchain
src/consensus/block_body_validation.py
block_body_validation.py
py
17,926
python
en
code
2
github-code
71
[ { "api_name": "logging.getLogger", "line_number": 39, "usage_type": "call" }, { "api_name": "src.consensus.constants.ConsensusConstants", "line_number": 43, "usage_type": "name" }, { "api_name": "src.consensus.blockchain_interface.BlockchainInterface", "line_number": 44, ...
12986791968
import os import sys import types import weakref import logging import datetime import warnings import traceback import functools from . import _registered_callbacks from .vendor import six def inrange(number, base, offset=0.5): r"""Evaluate whether `number` is within `base` +- `offset` Lower bound is *incl...
mottosso/pyblish-base
pyblish/lib.py
lib.py
py
12,186
python
en
code
null
github-code
71
[ { "api_name": "logging.Handler", "line_number": 47, "usage_type": "attribute" }, { "api_name": "logging.Handler.__init__", "line_number": 50, "usage_type": "call" }, { "api_name": "logging.Handler", "line_number": 50, "usage_type": "attribute" }, { "api_name": "sy...
34982378497
### # Programmers: David Landsman, Aaron Nahum # File name: SQLWrapper.py # Description: Contains methods for easily working with the database. ### import sqlite3 import Course import Student class SQLWrapper: def __init__(self): '''Initialize SQLWrapper.''' # Create a database file self.c...
S-Kantor/Time-table-creator
src/SQLWrapper.py
SQLWrapper.py
py
5,414
python
en
code
0
github-code
71
[ { "api_name": "sqlite3.connect", "line_number": 15, "usage_type": "call" }, { "api_name": "Student.Student", "line_number": 162, "usage_type": "call" }, { "api_name": "Course.Course", "line_number": 165, "usage_type": "call" } ]
8478989496
# import imageio # # imageio.plugins.ffmpeg.download() # # import win_unicode_console # # win_unicode_console.enable() import sys, os from PyQt5.QtCore import * from PyQt5.QtWidgets import (QWidget, QPushButton, QLineEdit, QLabel,QTextEdit, QApplication, QFileDialog,QProgressBar) from movie...
kulohen/video4in1
RecycleBin/cut-fromWeb3.py
cut-fromWeb3.py
py
4,937
python
en
code
0
github-code
71
[ { "api_name": "PyQt5.QtWidgets.QApplication.processEvents", "line_number": 25, "usage_type": "call" }, { "api_name": "PyQt5.QtWidgets.QApplication", "line_number": 25, "usage_type": "name" }, { "api_name": "PyQt5.QtWidgets.QWidget", "line_number": 27, "usage_type": "name"...
32915404199
''' date: 2022-09-15 Author: Michael Bedard intro: This code was created to simulate single quantum dots of diffrent types of atoms. it is rather basic ''' import set import numpy as np import matplotlib.pyplot as plt from scipy import constants as cst import warnings import scipy.linalg as linalg # build simulati...
physLab88/DotSimulator
impurtie_simulator.py
impurtie_simulator.py
py
4,164
python
en
code
0
github-code
71
[ { "api_name": "set.SET", "line_number": 27, "usage_type": "call" }, { "api_name": "set.SET", "line_number": 50, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 89, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.title", "line_numbe...
32092159293
import csv import pandas as pd from gensim.models.ldamodel import LdaModel year = 20 num = 1 file_name = f"topics_{year}_{num}.csv" model_name = f"lda_model_{year}_{num}" # CSV 파일 불러오기 topics = pd.read_csv(file_name, header=None, encoding='cp949') # 저장된 모델 불러오기 loaded_model = LdaModel.load(f"{model_...
DH-an/TopicModeling_COVID19-Infomation
3.TopicModeling/topic3.py
topic3.py
py
1,072
python
en
code
0
github-code
71
[ { "api_name": "pandas.read_csv", "line_number": 13, "usage_type": "call" }, { "api_name": "gensim.models.ldamodel.LdaModel.load", "line_number": 16, "usage_type": "call" }, { "api_name": "gensim.models.ldamodel.LdaModel", "line_number": 16, "usage_type": "name" }, { ...
25923163458
import tensorflow as tf import winsound import matplotlib.pyplot as plt import datetime import os.path import glob from Feature_ARPES_CNN_utils import load_data_ARPES, get_compiled_model '''This code creates and trains a CNN model for extracting bare bands from ARPES spectra. It is similar to what was report...
fjoucken/trARPES-extraction
CNN_model/Feature_ARPES_CNN_main.py
Feature_ARPES_CNN_main.py
py
5,599
python
en
code
1
github-code
71
[ { "api_name": "tensorflow.config.experimental.list_physical_devices", "line_number": 15, "usage_type": "call" }, { "api_name": "tensorflow.config", "line_number": 15, "usage_type": "attribute" }, { "api_name": "tensorflow.config.experimental.set_memory_growth", "line_number":...
411816688
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import os import wx import filectrl import autoSortListCtrl class ShowCategoryDialog(wx.Frame): """ Dialog that shows filepaths to music files ordered in categories. """ def __init__(self, parent, musicDict): """Initialization....
xmarcux/CatPlay
ui/showCategoryDialog.py
showCategoryDialog.py
py
3,270
python
en
code
0
github-code
71
[ { "api_name": "wx.Frame", "line_number": 10, "usage_type": "attribute" }, { "api_name": "wx.Frame.__init__", "line_number": 20, "usage_type": "call" }, { "api_name": "wx.Frame", "line_number": 20, "usage_type": "attribute" }, { "api_name": "wx.Image", "line_nu...
34200973939
from __future__ import absolute_import, unicode_literals from celery import shared_task from celery import Celery from django.core.mail import EmailMessage @shared_task def send_email_task(by, to): email_to = to email_subject = 'Thanks for using considereing me' email_body = 'Hi sir!,\nThanks for consider...
jha-shubham01/fast-test
backend/fast/tasks.py
tasks.py
py
645
python
en
code
0
github-code
71
[ { "api_name": "django.core.mail.EmailMessage", "line_number": 12, "usage_type": "call" }, { "api_name": "celery.shared_task", "line_number": 7, "usage_type": "name" } ]
23750323942
import matplotlib.pyplot as plt import os import numpy as np from scipy import spatial from tqdm import tqdm from dataset_extend import DE def plot_cosine_similarity(data,vid_label,point_label,instance_label,vid_name,dataset): save_path='/mnt/data1/zhx/Weakly_TAL/baseline/tools/figs/cos_similarity_{}'.format(data...
pipixin321/TAL_APP
tal_alg/CoRL/tools/feature_simlarity_analysis.py
feature_simlarity_analysis.py
py
2,216
python
en
code
0
github-code
71
[ { "api_name": "os.path.exists", "line_number": 10, "usage_type": "call" }, { "api_name": "os.path", "line_number": 10, "usage_type": "attribute" }, { "api_name": "os.makedirs", "line_number": 11, "usage_type": "call" }, { "api_name": "os.path.join", "line_numb...
33355342937
from django.shortcuts import render from django.http import HttpResponse, HttpResponseRedirect from .models import ListPC from django.template import loader from django.urls import reverse def index(request): context = {'segment': 'listpc'} template = loader.get_template('listpc/indexpc.html') return Http...
Eidith15/DeviceInventory-Py
apps/listpc/views.py
views.py
py
1,328
python
en
code
0
github-code
71
[ { "api_name": "django.template.loader.get_template", "line_number": 10, "usage_type": "call" }, { "api_name": "django.template.loader", "line_number": 10, "usage_type": "name" }, { "api_name": "django.http.HttpResponse", "line_number": 11, "usage_type": "call" }, { ...
6347306974
from crawlers.scraper import * from crawlers import functions import uuid import json class SokCrawler(object): def get_innerHTML(self, url, page=None): if page is not None: url = url.format(page) scraper = Scraper() scraper.headers = { "store-id": "235...
emrefkrlr/dataRaaccons
app/crawlers/sok_market/sok_crawler.py
sok_crawler.py
py
2,762
python
en
code
0
github-code
71
[ { "api_name": "json.loads", "line_number": 54, "usage_type": "call" }, { "api_name": "uuid.uuid4", "line_number": 74, "usage_type": "call" } ]
71617174627
import os from ml import datasets_path, MNISTDownloader, Trainer from sklearn.neighbors import KNeighborsClassifier data_path = os.path.join(datasets_path, 'mnist') mnist = MNISTDownloader(data_path) dataset = mnist.fetch() trainer = Trainer(dataset) trainer.train_test_split() knn_clf = KNeighborsClassifier() traine...
edmundsj/ml
ml/examples/mnist.py
mnist.py
py
379
python
en
code
0
github-code
70
[ { "api_name": "os.path.join", "line_number": 6, "usage_type": "call" }, { "api_name": "ml.datasets_path", "line_number": 6, "usage_type": "argument" }, { "api_name": "os.path", "line_number": 6, "usage_type": "attribute" }, { "api_name": "ml.MNISTDownloader", ...
38858986007
from typing import Any import cv2 from cv2 import UMat import time from runner import run import numpy as np from my_timer import MyTimer class FilterRotation2: def __init__(self) -> None: self.image_white = None self.image_white_transformed = None self.image_black_transformed = None self.image_bef...
novogrammer/jpeg-filter-prototype
jpeg_filter_prototype/filter_rotation2.py
filter_rotation2.py
py
1,826
python
en
code
0
github-code
71
[ { "api_name": "cv2.UMat", "line_number": 18, "usage_type": "name" }, { "api_name": "numpy.zeros", "line_number": 20, "usage_type": "call" }, { "api_name": "numpy.uint8", "line_number": 20, "usage_type": "attribute" }, { "api_name": "cv2.UMat", "line_number": 2...
6710034832
import pandas as pd import matplotlib.pyplot as plt import matplotlib.ticker as ticker import matplotlib.animation as animation from IPython.display import HTML #可现实中文的设置 plt.rcParams['font.sans-serif']=['fangsong'] plt.rcParams['axes.unicode_minus']=False df = pd.read_excel(r'E:\pyNote\调用资料/62classNew.xlsx', 'Sheet1'...
ycallenchina/PythonStudy_Git
其他学习_少量/Matplotlib学习/指数变化_动态图.py
指数变化_动态图.py
py
1,148
python
zh
code
0
github-code
71
[ { "api_name": "matplotlib.pyplot.rcParams", "line_number": 7, "usage_type": "attribute" }, { "api_name": "matplotlib.pyplot", "line_number": 7, "usage_type": "name" }, { "api_name": "matplotlib.pyplot.rcParams", "line_number": 8, "usage_type": "attribute" }, { "ap...
29964651561
import hashlib, logging, requests from typing import Dict, List, Literal, Tuple from pathlib import Path import pendulum from oauthlib.oauth2 import BackendApplicationClient from pyspark.sql import SparkSession from requests_oauthlib import OAuth2Session from requests.exceptions import RequestException from shared.fu...
pennfoster/databricks-pipelines
data_sources/marketo/classes.py
classes.py
py
7,071
python
en
code
0
github-code
71
[ { "api_name": "pyspark.sql.SparkSession.builder.getOrCreate", "line_number": 18, "usage_type": "call" }, { "api_name": "pyspark.sql.SparkSession.builder", "line_number": 18, "usage_type": "attribute" }, { "api_name": "pyspark.sql.SparkSession", "line_number": 18, "usage_t...
14450004001
#Content of this file is copied from https://github.com/abisee/pointer-generator/blob/master/ import os import csv import pyrouge import logging import tensorflow as tf import config from config import * from TeluguTokenizer.tokenizer import * from rouge_score import rouge_scorer def print_results(article, abstract, ...
ashokurlana/TeSum
baselines/Pointer_Generator/utils.py
utils.py
py
5,981
python
en
code
1
github-code
70
[ { "api_name": "rouge_score.rouge_scorer.RougeScorer", "line_number": 38, "usage_type": "call" }, { "api_name": "rouge_score.rouge_scorer", "line_number": 38, "usage_type": "name" }, { "api_name": "os.listdir", "line_number": 39, "usage_type": "call" }, { "api_name...
23316209045
from yt_dlp import YoutubeDL import sys def download(list, outputPath): opts = { 'outtmpl': outputPath+'%(title)s-%(id)s.%(ext)s', 'format': 'bestaudio/best', 'postprocessors': [{ 'key': 'FFmpegExtractAudio', 'preferredcodec': 'mp3', 'preferredquality': ...
markchen8717/youtube-dl
main.py
main.py
py
1,054
python
en
code
0
github-code
71
[ { "api_name": "yt_dlp.YoutubeDL", "line_number": 16, "usage_type": "call" }, { "api_name": "sys.argv", "line_number": 22, "usage_type": "attribute" }, { "api_name": "sys.argv", "line_number": 23, "usage_type": "attribute" }, { "api_name": "sys.argv", "line_num...
34405424700
import os from flask import ( Flask, render_template, request, flash, redirect, url_for, jsonify ) from flask.views import MethodView from werkzeug.utils import secure_filename from .forms import ( UploadForm, ImageForm, UserCreationForm, LoginForm, ImageCaptureForm...
Byenkya/image_text_extractor
text_extractor/routes.py
routes.py
py
8,887
python
en
code
0
github-code
71
[ { "api_name": "flask.views.MethodView", "line_number": 34, "usage_type": "name" }, { "api_name": "forms.LoginForm", "line_number": 36, "usage_type": "call" }, { "api_name": "flask.render_template", "line_number": 37, "usage_type": "call" }, { "api_name": "forms.Lo...
71743890790
try: import sys import os sys.path.append( os.path.abspath( os.path.join( os.path.dirname(__file__), '..' ) ) ) except Exception: pass import unittest import requests from jsonpath import jsonpath from faker import Faker from ...
elcidon/company_hero
tests/test_companies.py
test_companies.py
py
5,614
python
en
code
0
github-code
71
[ { "api_name": "sys.path.append", "line_number": 5, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 5, "usage_type": "attribute" }, { "api_name": "os.path.abspath", "line_number": 6, "usage_type": "call" }, { "api_name": "os.path", "line_number...
17205446235
import json import csv import os import numpy as np import voltagebudget from scipy.optimize import least_squares from pyswarm import pso from voltagebudget.neurons import adex from voltagebudget.neurons import shadow_adex from voltagebudget.util import poisson_impulse from voltagebudget.util import read_results fr...
parenthetical-e/voltagebudget
voltagebudget/exp/autotune.py
autotune.py
py
9,874
python
en
code
0
github-code
70
[ { "api_name": "numpy.random.seed", "line_number": 48, "usage_type": "call" }, { "api_name": "numpy.random", "line_number": 48, "usage_type": "attribute" }, { "api_name": "voltagebudget.util.read_modes", "line_number": 58, "usage_type": "call" }, { "api_name": "vol...
12830255576
import numpy as np import pandas as pd import datetime from .data import get_vested_amount FIL_BASE = 2_000_000_000.0 PL_AMOUNT = 0.15 * FIL_BASE FOUNDATION_AMOUNT = 0.05 * FIL_BASE STORAGE_MINING = 0.55 * FIL_BASE MINING_RESERVE = 0.15 * FIL_BASE def compute_vesting_trajectory_df( start_date: datetime.date, en...
protocol/filecoin-mecha-twin
mechafil/vesting.py
vesting.py
py
3,013
python
en
code
15
github-code
71
[ { "api_name": "datetime.date", "line_number": 15, "usage_type": "attribute" }, { "api_name": "datetime.date", "line_number": 36, "usage_type": "call" }, { "api_name": "pandas.DataFrame", "line_number": 39, "usage_type": "call" }, { "api_name": "pandas.date_range",...
496331106
import yaml class Config(dict): def __init__(self, filename): super().__init__() try: with open(filename, 'r') as f: cfg_dict = yaml.load(f, Loader=yaml.SafeLoader) except EnvironmentError: print('Please check the file with name of "%s"', filename) ...
Y-P-Zhang/PolypSegmentation
config.py
config.py
py
390
python
en
code
1
github-code
71
[ { "api_name": "yaml.load", "line_number": 9, "usage_type": "call" }, { "api_name": "yaml.SafeLoader", "line_number": 9, "usage_type": "attribute" } ]
33637739030
#! /usr/bin/env python3 """ Using the requests and BeautifulSoup Python libraries, print to the screen the full text of the article on this website: http://www.vanityfair.com/society/2014/06/monica-lewinsky-humiliation-culture. """ import requests from bs4 import BeautifulSoup def main(): url = ( "htt...
johnjtorres/devasc
webpage_decode/vanityfair.py
vanityfair.py
py
634
python
en
code
0
github-code
70
[ { "api_name": "requests.get", "line_number": 17, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_number": 18, "usage_type": "call" } ]
5293773849
#!python from twisted.internet.protocol import DatagramProtocol from twisted.internet import task, stdio from common import unpack_datagramm_args from prompt import ColoredPrompt import socket class BaseServer(DatagramProtocol, object): def __init__(self, prompt=None): self.clients = {} self.promp...
yanlobkarev/p2p
base.py
base.py
py
2,678
python
en
code
0
github-code
70
[ { "api_name": "twisted.internet.protocol.DatagramProtocol", "line_number": 9, "usage_type": "name" }, { "api_name": "prompt.ColoredPrompt", "line_number": 12, "usage_type": "call" }, { "api_name": "twisted.internet.task.LoopingCall", "line_number": 15, "usage_type": "call...
72009954471
#!/usr/bin/env python from django.urls import path, include from . import views app_name = "web" urlpatterns = [ path('register/', views.register, name='signup'), path('login/', views.login_web, name="login"), path('index/', views.index, name='index'), path('myprofile/', views.profile_web, name='profi...
yang-ze-kang/django_Mrdu
web/urls.py
urls.py
py
1,197
python
en
code
0
github-code
71
[ { "api_name": "django.urls.path", "line_number": 8, "usage_type": "call" }, { "api_name": "django.urls.path", "line_number": 9, "usage_type": "call" }, { "api_name": "django.urls.path", "line_number": 10, "usage_type": "call" }, { "api_name": "django.urls.path", ...
31155207991
import asyncio import uuid import pytest from ..exc import NoNode @pytest.fixture async def data_watcher(zk, path): await zk.create(path) watcher = zk.recipes.DataWatcher() watcher.set_client(zk) yield watcher await zk.delete(path) @pytest.mark.asyncio async def test_data_watch(zk, path, data_...
hire-us/aiozk-backup
aiozk/test/test_watchers.py
test_watchers.py
py
4,002
python
en
code
0
github-code
71
[ { "api_name": "pytest.fixture", "line_number": 9, "usage_type": "attribute" }, { "api_name": "asyncio.Event", "line_number": 21, "usage_type": "call" }, { "api_name": "asyncio.wait_for", "line_number": 31, "usage_type": "call" }, { "api_name": "pytest.mark", "...
5678193783
__problem__ = \ """ No prepared statement used in backend. """ __attack__ = \ """ Used Ambigous expression in input field. """ __mitigation__ = \ """ Use prepared statement """ import logging import requests from __base__ import setup_log, extract_user_info log = logging.getLogger(__name__) ...
leahgill/hackinglab
001sqlinjection.py
001sqlinjection.py
py
1,211
python
en
code
0
github-code
71
[ { "api_name": "logging.getLogger", "line_number": 22, "usage_type": "call" }, { "api_name": "requests.session", "line_number": 26, "usage_type": "call" }, { "api_name": "__base__.extract_user_info", "line_number": 37, "usage_type": "call" }, { "api_name": "__base_...
19926553589
from sympy import Symbol from sympy.matrices import Matrix, eye, BlockMatrix, zeros from sympy.tensor.array import Array from sympy.physics.mechanics import dynamicsymbols, msubs from sympy.core.function import Derivative from nlcontrol.systems.controllers import ControllerBase from simupy.systems.symbolic import Dyn...
jjuch/nlcontrol
nlcontrol/systems/controllers/eulaC.py
eulaC.py
py
27,175
python
en
code
4
github-code
71
[ { "api_name": "nlcontrol.systems.controllers.ControllerBase", "line_number": 14, "usage_type": "name" }, { "api_name": "sympy.tensor.array.Array", "line_number": 85, "usage_type": "call" }, { "api_name": "numpy.isscalar", "line_number": 163, "usage_type": "call" }, { ...
32736290517
import cv2 from Tho.Main_lib.distance_calc_lib import CircleBasedObjectDistance import time # Canny_low = 200, Canny_high = 5000, step_size = 1, hough_param =22, # slope = 867.7887424687945, intercept = -0.18242145320198588 # Circle_based_estimate_1 = CircleDistance(0, 50000, 1, 50, 867.7887424687945, -0.182421453201...
Tran-Minh-Quan/Line_Inspector
Tho/Main_lib/Example_usage.py
Example_usage.py
py
1,936
python
en
code
0
github-code
70
[ { "api_name": "time.time", "line_number": 9, "usage_type": "call" }, { "api_name": "Tho.Main_lib.distance_calc_lib.CircleBasedObjectDistance", "line_number": 11, "usage_type": "call" }, { "api_name": "cv2.imread", "line_number": 12, "usage_type": "call" }, { "api_...
25884155588
import sys import praw import sqlite3 if len(sys.argv) > 1: # Parse Parameters DB_NAME = sys.argv[1] POST_COUNT = int(sys.argv[2]) TIME_FILTER = sys.argv[3] TYPE = sys.argv[4] SUBREDDITS = [] for i in range(5, len(sys.argv)): SUBREDDITS.append(sys.argv[i]) else: DB_NAME = "test_data.db" POST_CO...
wpower12/CIS5524-FinalProject
data_collection/fetch_posts.py
fetch_posts.py
py
1,074
python
en
code
0
github-code
71
[ { "api_name": "sys.argv", "line_number": 5, "usage_type": "attribute" }, { "api_name": "sys.argv", "line_number": 7, "usage_type": "attribute" }, { "api_name": "sys.argv", "line_number": 8, "usage_type": "attribute" }, { "api_name": "sys.argv", "line_number": ...
36157943561
""" Functions for system-related tasks (currently just registering/deregistering the executor manifest). """ import json import logging import os import sys import typing from .interpreter import Interpreter LOGGER = logging.getLogger(__name__) LOGGER.addHandler(logging.NullHandler()) MANIFEST_FILE_NAME = "pyla.jso...
stencila/pyla
stencila/pyla/system.py
system.py
py
3,521
python
en
code
2
github-code
71
[ { "api_name": "logging.getLogger", "line_number": 13, "usage_type": "call" }, { "api_name": "logging.NullHandler", "line_number": 14, "usage_type": "call" }, { "api_name": "sys.platform.lower", "line_number": 30, "usage_type": "call" }, { "api_name": "sys.platform...
1532548612
from fluidreleaser import ANDROID_VERSIONS, DEFAULT_VARIANT import hashlib from pathlib import Path class Artifact: """ A class representing an artifact """ def __init__(self, artifact: Path): self.path = artifact self.filename = self.path.name filename_split = self.filename[:-4].split("-") if len(filename...
Project-Fluid/fluidreleaser
fluidreleaser/utils/artifact.py
artifact.py
py
667
python
en
code
0
github-code
71
[ { "api_name": "pathlib.Path", "line_number": 9, "usage_type": "name" }, { "api_name": "fluidreleaser.DEFAULT_VARIANT", "line_number": 14, "usage_type": "argument" }, { "api_name": "fluidreleaser.ANDROID_VERSIONS", "line_number": 26, "usage_type": "name" }, { "api_...
72954467750
import pathlib def main(): current_directory = str(pathlib.Path(__file__).parent.resolve()) with open(current_directory + "/input", 'r') as fd: line = fd.readline().strip() start_of_packet_position = find_start_of_packet_position(line) print("Start of packet :", start_of_packet_position) ...
aymericq/advent22
d06/main.py
main.py
py
1,070
python
en
code
0
github-code
71
[ { "api_name": "pathlib.Path", "line_number": 5, "usage_type": "call" } ]
38512102439
from gi.repository import Gtk class DtoolSearchResultsRow(Gtk.ListBoxRow): __gtype_name__ = 'DtoolSearchResultsRow' _margin = 3 def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self._task = None self._search_results = None hbox = Gtk.Box(orientatio...
livMatS/dtool-lookup-gui
dtool_lookup_gui/widgets/search_results_row.py
search_results_row.py
py
1,810
python
en
code
8
github-code
71
[ { "api_name": "gi.repository.Gtk.ListBoxRow", "line_number": 4, "usage_type": "attribute" }, { "api_name": "gi.repository.Gtk", "line_number": 4, "usage_type": "name" }, { "api_name": "gi.repository.Gtk.Box", "line_number": 15, "usage_type": "call" }, { "api_name"...
33839658427
import datetime import time from django.contrib.auth import get_user_model from django.db.models.signals import post_save from django.dispatch import receiver from mailing.models import Mailing, NewsLetter from user.models import Profile from registration.models import Ticket @receiver(post_save, sender=Mailing) de...
pythonkr/pyconkr-2020
mailing/signal.py
signal.py
py
1,768
python
en
code
10
github-code
71
[ { "api_name": "datetime.timezone", "line_number": 15, "usage_type": "call" }, { "api_name": "datetime.timedelta", "line_number": 15, "usage_type": "call" }, { "api_name": "datetime.datetime.now", "line_number": 16, "usage_type": "call" }, { "api_name": "datetime.d...
1424682392
from django.db.models.signals import post_save from django.dispatch import receiver from apps.boards.models import Board from apps.columns.models import Column from apps.goals.models import Goal from apps.projects.models import Project from hackachieve.utils import START_UP_BOARD_LIST GOAL_STATUS = { 'standby': 1...
jonit-dev/hackachieve-backend
apps/projects/utils.py
utils.py
py
2,009
python
en
code
6
github-code
71
[ { "api_name": "apps.boards.models.Board.objects.filter", "line_number": 20, "usage_type": "call" }, { "api_name": "apps.boards.models.Board.objects", "line_number": 20, "usage_type": "attribute" }, { "api_name": "apps.boards.models.Board", "line_number": 20, "usage_type":...
30409827730
import collections import os import platform from time import time import traceback import sublime # type: ignore import sublime_plugin # type: ignore SETTING_PWD = 'current_working_directory' CONTEXT_ACTION_ERROR = 'Error' CONTEXT_ACTION_FOLDER_ADD = 'Add Folder' CONTEXT_ACTION_FOLDER_REVEAL = 'Reveal' CONTEXT_AC...
jongiddy/sublime-gidopen
gidopen.py
gidopen.py
py
44,387
python
en
code
0
github-code
71
[ { "api_name": "platform.system", "line_number": 21, "usage_type": "call" }, { "api_name": "os.environ", "line_number": 36, "usage_type": "attribute" }, { "api_name": "os.path.expanduser", "line_number": 50, "usage_type": "call" }, { "api_name": "os.path", "lin...
6693251730
from datasets import load_dataset, DatasetDict import os dataset_folder = "disk/dataset" token = "" ds = DatasetDict() for file in os.listdir(dataset_folder): if file.endswith(".json"): file_name = file.split(".")[0] #make it aplhanmueric only file_name = "".join([i for i in file_name if i.isalp...
C23-DF01-Dicoding-Indonesia/semantic-search-train
prepare-dataset/upload_to_hub.py
upload_to_hub.py
py
1,118
python
en
code
0
github-code
70
[ { "api_name": "datasets.DatasetDict", "line_number": 6, "usage_type": "call" }, { "api_name": "os.listdir", "line_number": 8, "usage_type": "call" }, { "api_name": "datasets.load_dataset", "line_number": 13, "usage_type": "call" }, { "api_name": "datasets.load_dat...
10644245820
import logging import azure.functions as func from datetime import datetime, timedelta, timezone from pypika import Query, Table, Order from google.oauth2 import service_account from google.cloud import bigquery from pathlib import Path from pandas import to_datetime from typing import List def main(req:...
morninng/azure-function-test
HttpTrigger1/__init__.py
__init__.py
py
2,083
python
en
code
0
github-code
71
[ { "api_name": "azure.functions.HttpRequest", "line_number": 13, "usage_type": "attribute" }, { "api_name": "azure.functions", "line_number": 13, "usage_type": "name" }, { "api_name": "logging.info", "line_number": 16, "usage_type": "call" }, { "api_name": "pathlib...
29566658131
''' Given a string, check if it can be rearranged to form a palindrome. ''' from collections import defaultdict class Solution: def checkForPalindrome(self, s: str) -> bool: # Basically counnting all of the characters. We must have an all even count, or an all even count with one odd h = defaultdi...
AWAlexWeber/python-practice
Other/CoderPro/CheckPalindrome.py
CheckPalindrome.py
py
666
python
en
code
1
github-code
70
[ { "api_name": "collections.defaultdict", "line_number": 10, "usage_type": "call" } ]