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
19052868018
''' 오늘 날짜를 의미하는 문자열 today, 약관의 유효기간을 담은 1차원 문자열 배열 terms와 수집된 개인정보의 정보를 담은 1차원 문자열 배열 privacies가 매개변수로 주어집니다. 이때 파기해야 할 개인정보의 번호를 오름차순으로 1차원 정수 배열에 담아 return 하도록 solution 함수를 완성해 주세요. ''' import datetime from dateutil.relativedelta import relativedelta def solution(today, terms, privacies): answer = [] return a...
parkjunga/algorithm
프로그래머스_lev01/개인정보 수집 유효기간.py
개인정보 수집 유효기간.py
py
1,260
python
ko
code
0
github-code
6
[ { "api_name": "dateutil.relativedelta.relativedelta", "line_number": 33, "usage_type": "call" } ]
17940254471
from keras.layers import Dense, LSTM from keras.models import Sequential import numpy as np def LSTM_model(train_feature_dir, train_label_dir, test_feature_dir, test_label_dir): """read data""" train_feature = np.load(train_feature_dir) train_label = np.load(train_label_dir) test_feature = np.load(tes...
jingmouren/antifraud
antifraud/methods/LSTM_seq.py
LSTM_seq.py
py
1,506
python
en
code
0
github-code
6
[ { "api_name": "numpy.load", "line_number": 8, "usage_type": "call" }, { "api_name": "numpy.load", "line_number": 9, "usage_type": "call" }, { "api_name": "numpy.load", "line_number": 10, "usage_type": "call" }, { "api_name": "numpy.load", "line_number": 11, ...
37710207674
import math import matplotlib as mpl import matplotlib.pyplot as plt import numpy as np def func(x, k): return c[k] * X ** a[k] x = [1, 10] Fe = [5.836e7, 6.494e8] Fe_er = [6.87e6, 1.043e8] P = [8.504e7, 6.965e8] P_er = [1.439e7, 2.056e8] a = np.zeros(2) b = np.zeros(2) c = np.zeros(2) var_list = [Fe, P] for ...
ktrshi/ExtendedAirShower_MSU_cosmophys
additional.py
additional.py
py
1,137
python
en
code
0
github-code
6
[ { "api_name": "numpy.zeros", "line_number": 18, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_number": 19, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_number": 20, "usage_type": "call" }, { "api_name": "numpy.log", "line_number": 23...
7379994933
import pandas as pd import numpy as np from keras.callbacks import CSVLogger from keras.models import Model from keras.layers import Input, Conv2D, MaxPooling2D, Flatten, Dense, concatenate from keras.optimizers import Adam from keras.preprocessing.image import ImageDataGenerator from sklearn.preprocessing impor...
Viliusps/NTM
NeuralModelImages.py
NeuralModelImages.py
py
2,716
python
en
code
0
github-code
6
[ { "api_name": "pandas.concat", "line_number": 13, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 13, "usage_type": "attribute" }, { "api_name": "sklearn.preprocessing.LabelEncoder", "line_number": 26, "usage_type": "call" }, { "api_name": ...
18847707094
import json import requests import subprocess import socket import time from .config import NbsConfigurator from cloud.storage.core.tools.common.python.core_pattern import core_pattern from cloud.storage.core.tools.common.python.daemon import Daemon import yatest.common as yatest_common from contrib.ydb.public.api....
ydb-platform/nbs
cloud/blockstore/tests/python/lib/daemon.py
daemon.py
py
6,991
python
en
code
32
github-code
6
[ { "api_name": "json.dumps", "line_number": 56, "usage_type": "call" }, { "api_name": "json.dumps", "line_number": 59, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 64, "usage_type": "call" }, { "api_name": "cloud.storage.core.tools.common.py...
21138858155
from django.conf.urls import url from .views import LandPage, ArticleList, autocompleteModelSearch, NewSearchContent, autocompleteModelSearchCountry, NewSearchCountryContent, ArticleDetail, check_credit, create_commit, check_credit_article, TerminosYCondiciones urlpatterns = [ url(r'^$', LandPage.as_vie...
Tsoftdev/litigiosos
paymentintegration/land/urls.py
urls.py
py
1,259
python
en
code
0
github-code
6
[ { "api_name": "django.conf.urls.url", "line_number": 5, "usage_type": "call" }, { "api_name": "views.LandPage.as_view", "line_number": 5, "usage_type": "call" }, { "api_name": "views.LandPage", "line_number": 5, "usage_type": "name" }, { "api_name": "django.conf.u...
17435564629
import pytest from collections import defaultdict class Solution: def carPooling(self, trips: List[List[int]], capacity: int) -> bool: locations = defaultdict(dict) for t in trips: num, pickup, drop = t[0], t[1], t[2] locations[pickup]["up"] = locations[pickup].setdefault("...
naubull2/codingtests
leetcode/solved/1184_Car_Pooling/solution.py
solution.py
py
926
python
en
code
0
github-code
6
[ { "api_name": "collections.defaultdict", "line_number": 7, "usage_type": "call" }, { "api_name": "pytest.mark.parametrize", "line_number": 24, "usage_type": "call" }, { "api_name": "pytest.mark", "line_number": 24, "usage_type": "attribute" }, { "api_name": "pytes...
72696988669
import pytest from selene import have from selene.support.shared import browser @pytest.fixture(params=['Desktop', 'Mobile'], scope='function') def open_browser(request): if request.param == 'Desktop': browser.config.window_width = 1600 browser.config.window_height = 1000 browser.open('htt...
Oljaja/qa_guru_python_3_11-main
tests/test_parametrize.py
test_parametrize.py
py
1,075
python
en
code
0
github-code
6
[ { "api_name": "selene.support.shared.browser.config", "line_number": 9, "usage_type": "attribute" }, { "api_name": "selene.support.shared.browser", "line_number": 9, "usage_type": "name" }, { "api_name": "selene.support.shared.browser.config", "line_number": 10, "usage_ty...
41843882260
import torch import albumentations as A from albumentations.pytorch import ToTensorV2 from PIL import Image # All config DEVICE = torch.device('cuda:0' if torch.cuda.is_available() else 'cpu') # DEVICE = 'cpu' BATCH_SIZE = 64 LEARNING_RATE = 1e-4 SCALE = 4. LOAD_MODEL = True SAVE_MODEL = True EPOCHS = 100 HIGH_RES = 9...
gmortuza/machine-learning-scratch
machine_learning/neural_network/generative/srgan/config.py
config.py
py
659
python
en
code
6
github-code
6
[ { "api_name": "torch.device", "line_number": 7, "usage_type": "call" }, { "api_name": "torch.cuda.is_available", "line_number": 7, "usage_type": "call" }, { "api_name": "torch.cuda", "line_number": 7, "usage_type": "attribute" }, { "api_name": "albumentations.Comp...
71634338747
import datetime import time import requests ProjectStart = time.perf_counter() error = False i=0 INTRODUCTION = ''' \U0001FA99 Stock Raccoon\U0001FA99 \U0001F4C8--------------------------------------------------------------------\U0001F4C8 Welcome to Stock Raccoon. We'll give you roughly 5...
JubinJ0110/StockRaccoonJJJ
StockRaccoonJJJ.py
StockRaccoonJJJ.py
py
4,205
python
en
code
0
github-code
6
[ { "api_name": "time.perf_counter", "line_number": 4, "usage_type": "call" }, { "api_name": "time.perf_counter", "line_number": 20, "usage_type": "call" }, { "api_name": "requests.request", "line_number": 32, "usage_type": "call" }, { "api_name": "time.perf_counter...
45386477806
from __future__ import unicode_literals import json import os import sys try: from collections import UserList except ImportError: # Python 2 from UserList import UserList from theory.conf import settings from theory.utils.encoding import forceText, python2UnicodeCompatible from theory.utils.html import formatH...
grapemix/theory
theory/gui/util.py
util.py
py
5,337
python
en
code
1
github-code
6
[ { "api_name": "theory.utils.html.formatHtmlJoin", "line_number": 42, "usage_type": "call" }, { "api_name": "theory.utils.html.formatHtmlJoin", "line_number": 43, "usage_type": "call" }, { "api_name": "json.dumps", "line_number": 58, "usage_type": "call" }, { "api_...
11779791280
from scripts.util import read_supertopics, SuperTopic, get_spottopics, DateFormat, read_temp_dist, smooth import numpy as np from plotly.subplots import make_subplots import plotly.graph_objects as go BOOST = ['raw', # 0 'retweets', # 1 'replies', # 2 'likes', # 3 'retweets_lik...
TimRepke/twitter-climate
code/figures/supertopics/stacked_area_charts_interactive.py
stacked_area_charts_interactive.py
py
4,349
python
en
code
1
github-code
6
[ { "api_name": "scripts.util.read_supertopics", "line_number": 27, "usage_type": "call" }, { "api_name": "scripts.util.read_temp_dist", "line_number": 29, "usage_type": "call" }, { "api_name": "scripts.util.SuperTopic", "line_number": 33, "usage_type": "name" }, { ...
27101226899
from jax import lax, random, numpy as jnp from typing import Tuple from nioc.control import lqr, LQGSpec from nioc.belief import kf def solve(spec: LQGSpec, Sigma0: jnp.ndarray, eps: float = 1e-8) -> Tuple[jnp.ndarray, lqr.Gains]: K = kf.forward(spec=spec, Sigma0=Sigma0) control_gains = lqr.backward(spec=lqr...
RothkopfLab/nioc-neurips
nioc/control/lqg.py
lqg.py
py
2,362
python
en
code
0
github-code
6
[ { "api_name": "nioc.control.LQGSpec", "line_number": 8, "usage_type": "name" }, { "api_name": "jax.numpy.ndarray", "line_number": 8, "usage_type": "attribute" }, { "api_name": "jax.numpy", "line_number": 8, "usage_type": "name" }, { "api_name": "nioc.belief.kf.for...
72429392829
import os import random import numpy as np import torch from PIL import Image from torch.utils.data import Dataset class MalwareData(Dataset): def __init__(self, images, labels): self.images = images self.labels = labels def __getitem__(self, index): # Load image as a gray scale image...
641217688tly/Adversarial-Attacks-Against-Malware-Detection
detector/dataset.py
dataset.py
py
1,662
python
en
code
1
github-code
6
[ { "api_name": "torch.utils.data.Dataset", "line_number": 9, "usage_type": "name" }, { "api_name": "PIL.Image.open", "line_number": 17, "usage_type": "call" }, { "api_name": "PIL.Image", "line_number": 17, "usage_type": "name" }, { "api_name": "numpy.array", "l...
19694408739
import functools from typing import List from test_framework import generic_test from test_framework.test_utils import enable_executor_hook # Returns the number of valid entries after deletion. def delete_duplicates_slow(A: List[int]) -> int: start = 1 i = 1 length = len(A) while i < len(A): ...
aashima-arora239/Python
EPI/sorted_array_remove_dups.py
sorted_array_remove_dups.py
py
1,326
python
en
code
0
github-code
6
[ { "api_name": "typing.List", "line_number": 9, "usage_type": "name" }, { "api_name": "typing.List", "line_number": 30, "usage_type": "name" }, { "api_name": "functools.partial", "line_number": 42, "usage_type": "call" }, { "api_name": "test_framework.test_utils.en...
27634922968
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Author : Stanl # @Time : 2023/5/12 13:26 # @File : preprocess.py # @Project : lab import os import random import matplotlib as mpl import numpy as np import torch import torchvision import torchvision.transforms as T from torch.utils.data import DataLoader, ...
lumeilevel/NNDL_project2
utils/preprocess.py
preprocess.py
py
3,119
python
en
code
0
github-code
6
[ { "api_name": "torch.utils.data.Dataset", "line_number": 19, "usage_type": "name" }, { "api_name": "random.seed", "line_number": 32, "usage_type": "call" }, { "api_name": "numpy.random.seed", "line_number": 33, "usage_type": "call" }, { "api_name": "numpy.random",...
20826296293
import requests import whois import builtwith import sys import os import datetime from bs4 import BeautifulSoup #class with the information extracted from details url class DetailedFlight: company = "" flight = "" terminal = "" status = "" date = "" arrival = "" real_arrival_time = "" ...
laurivsan/webscraping_prac1
code/laurivsan_prac1.py
laurivsan_prac1.py
py
5,749
python
en
code
0
github-code
6
[ { "api_name": "sys.stdout", "line_number": 29, "usage_type": "attribute" }, { "api_name": "requests.get", "line_number": 126, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_number": 127, "usage_type": "call" }, { "api_name": "datetime.datetime.no...
4488696846
import unittest import numpy.testing as testing import numpy as np import hpgeom as hpg from numpy import random import healsparse class ValidAreaTestCase(unittest.TestCase): def test_valid_area(self): """ Test getting the valid area of a map """ random.seed(seed=12345) n...
LSSTDESC/healsparse
tests/test_validarea.py
test_validarea.py
py
1,185
python
en
code
10
github-code
6
[ { "api_name": "unittest.TestCase", "line_number": 10, "usage_type": "attribute" }, { "api_name": "numpy.random.seed", "line_number": 15, "usage_type": "call" }, { "api_name": "numpy.random", "line_number": 15, "usage_type": "name" }, { "api_name": "numpy.random.ch...
38736794995
import logging from datetime import datetime, timedelta from bitstring import BitArray from npi import get_correct_utc_time from npi.crc24q import crc24q _log = logging.getLogger(__name__) class RTCM3: @staticmethod def skip_to_frame(s): b = None while b != b'\xd3': b = s.re...
GeoscienceAustralia/ginan
scripts/backup_old/main/python/npi/rtcm.py
rtcm.py
py
6,789
python
en
code
165
github-code
6
[ { "api_name": "logging.getLogger", "line_number": 9, "usage_type": "call" }, { "api_name": "bitstring.BitArray", "line_number": 56, "usage_type": "call" }, { "api_name": "npi.crc24q.crc24q", "line_number": 122, "usage_type": "call" }, { "api_name": "bitstring.BitA...
33995538254
""" Streaming the first-generaton HAPI ".data" file format storing transitions with "extended" (non-standard) sets of parameters. """ import os import re import json from hapi2.format.streamer import AbstractStreamer from ..hitran.lbl import HITRAN_DotparParser def parse_hapi_line_(line,HAPI_HEADER,TYP...
hitranonline/hapi2
hapi2/format/streamers/dotpar.py
dotpar.py
py
5,588
python
en
code
10
github-code
6
[ { "api_name": "re.search", "line_number": 41, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 70, "usage_type": "call" }, { "api_name": "os.path", "line_number": 70, "usage_type": "attribute" }, { "api_name": "os.path.join", "line_number":...
24970580118
from pathlib import Path import ruamel.yaml from ruamel.yaml.scalarstring import SingleQuotedScalarString S = ruamel.yaml.scalarstring.DoubleQuotedScalarString yaml = ruamel.yaml.YAML() yaml.preserve_quotes = True from config import * class DockerServicesManager: def __init__(self,deep_structure,registry_address,...
crs4/deep_framework
initialize/services.py
services.py
py
19,632
python
en
code
5
github-code
6
[ { "api_name": "ruamel.yaml.yaml", "line_number": 4, "usage_type": "attribute" }, { "api_name": "ruamel.yaml", "line_number": 4, "usage_type": "name" }, { "api_name": "ruamel.yaml.yaml.YAML", "line_number": 5, "usage_type": "call" }, { "api_name": "ruamel.yaml.yaml...
18656727789
""" The package contains all the functions used to evaluate the segmentation """ import json import os import sys sys.path.append(os.path.abspath('..')) sys.path.append(os.path.abspath('../..')) from performance_tool.performance_polygons import CorrectPolygon, ToEvaluatePolygon def claster_on_label(data: dict, correc...
sank96/segmentation-evaluation
performance_tool/evaluate_segmentation.py
evaluate_segmentation.py
py
5,979
python
en
code
5
github-code
6
[ { "api_name": "sys.path.append", "line_number": 7, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 7, "usage_type": "attribute" }, { "api_name": "os.path.abspath", "line_number": 7, "usage_type": "call" }, { "api_name": "os.path", "line_number...
35033189664
#importing the module import os # import subprocess from pytube import YouTube #GLOBALS SAVE_PATH = "C:/Users/blins/dev/projects/youtube_converter/" link="https://www.youtube.com/watch?v=xWOoBJUqlbI" #link of the video to be downloaded output_name = 'test' full_path_mp4 = '{}{}'.format(SAVE_PATH, output_name) d...
linsera1809/youtube_converter
doc/convert-test2.py
convert-test2.py
py
1,928
python
en
code
1
github-code
6
[ { "api_name": "pytube.YouTube", "line_number": 17, "usage_type": "call" }, { "api_name": "os.system", "line_number": 37, "usage_type": "call" } ]
34337345731
from django.contrib.auth.models import User from tastypie.authorization import DjangoAuthorization from tastypie.resources import ModelResource,Resource from myBillWeb_app.models import Category, Company, Record from tastypie.resources import ModelResource,ALL, ALL_WITH_RELATIONS from tastypie import fields from tastyp...
nickapos/myBillWeb
myBillWeb_Django/myBillWeb_app/api/resources.py
resources.py
py
2,778
python
en
code
0
github-code
6
[ { "api_name": "tastypie.resources.ModelResource", "line_number": 11, "usage_type": "name" }, { "api_name": "django.contrib.auth.models.User.objects.all", "line_number": 13, "usage_type": "call" }, { "api_name": "django.contrib.auth.models.User.objects", "line_number": 13, ...
32520950128
#Import the libraries import torch.nn as nn from torch import device from torch import cuda # Define the U-Net architecture class UNet(nn.Module): def __init__(self): super(UNet, self).__init__() self.device = device("cuda:0" if cuda.is_available() else "cpu") # Contraction Path (Encoder)...
MrMras/CNN
model_structure.py
model_structure.py
py
2,829
python
en
code
0
github-code
6
[ { "api_name": "torch.nn.Module", "line_number": 8, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 8, "usage_type": "name" }, { "api_name": "torch.device", "line_number": 11, "usage_type": "call" }, { "api_name": "torch.cuda.is_available", ...
15178259196
import json,task,task8#task5,task8 from pprint import pprint def movies_byDirector_language(movie_detailsLst): mainDic={} for dic in movie_detailsLst: subdic={} for direc in dic["director"]: if direc not in mainDic: mainDic[direc]=subdic.copy() for dic in movie_detailsLst: for director in dic[...
Rajkumar-coderm/Imdb_scraper
task10.py
task10.py
py
743
python
en
code
1
github-code
6
[ { "api_name": "task.top250movies", "line_number": 21, "usage_type": "call" }, { "api_name": "task8.movie_detailsLst", "line_number": 22, "usage_type": "call" }, { "api_name": "json.dumps", "line_number": 25, "usage_type": "call" } ]
31426690473
import json import logging import os import chainer import numpy from PyQt5 import QtCore from PyQt5 import QtGui from PyQt5 import QtWidgets from PyQt5.QtCore import Qt from chainer_wing import util from chainer_wing.gui_main.mainwindow import Ui_MainWindow from chainer_wing.subwindows.data_config import DataDialog ...
fukatani/ChainerWing
chainer_wing/gui_main/painter.py
painter.py
py
49,257
python
en
code
26
github-code
6
[ { "api_name": "logging.getLogger", "line_number": 21, "usage_type": "call" }, { "api_name": "PyQt5.QtWidgets.QWidget", "line_number": 27, "usage_type": "attribute" }, { "api_name": "PyQt5.QtWidgets", "line_number": 27, "usage_type": "name" }, { "api_name": "chaine...
37679937103
from selenium import webdriver from selenium.webdriver.chrome.service import Service from up import username, password import time from time import sleep import datetime from datetime import date import csv import discordwebhooks from selenium.webdriver.chrome.options import Options ser = Service("C:/geckodrive/chrome...
PavvanPradeep/teams-autologin-bot
main.py
main.py
py
5,103
python
en
code
0
github-code
6
[ { "api_name": "selenium.webdriver.chrome.service.Service", "line_number": 12, "usage_type": "call" }, { "api_name": "selenium.webdriver.chrome.options.Options", "line_number": 13, "usage_type": "call" }, { "api_name": "selenium.webdriver.ChromeOptions", "line_number": 14, ...
3326998947
import os import sys import string import shutil sys.path.append( '../pymod' ) import gdaltest import ogrtest from osgeo import gdal from osgeo import ogr from osgeo import osr ############################################################################### # Test if driver is available def ogr_fgdb_init(): ogr...
dioptre/gdal
autotest/ogr/ogr_fgdb.py
ogr_fgdb.py
py
14,119
python
en
code
1
github-code
6
[ { "api_name": "sys.path.append", "line_number": 6, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 6, "usage_type": "attribute" }, { "api_name": "ogrtest.fgdb_drv", "line_number": 19, "usage_type": "attribute" }, { "api_name": "ogrtest.fgdb_drv", ...
16205790782
from dataclasses import dataclass, field from xdsl.frontend.exception import FrontendProgramException from xdsl.ir import Block, Operation, Region, SSAValue @dataclass class OpInserter: """ Class responsible for inserting operations at the right place in the generated IR. """ insertion_point: Bl...
xdslproject/xdsl
xdsl/frontend/op_inserter.py
op_inserter.py
py
2,369
python
en
code
133
github-code
6
[ { "api_name": "xdsl.ir.Block", "line_number": 14, "usage_type": "name" }, { "api_name": "xdsl.ir.SSAValue", "line_number": 20, "usage_type": "name" }, { "api_name": "dataclasses.field", "line_number": 20, "usage_type": "call" }, { "api_name": "xdsl.frontend.except...
72248536507
import logging from bioCanon.constants import LOG_FORMAT from Bio import SeqIO def init_console_logger(lvl): """ Parameters ---------- lvl [int] : Integer of level of logging desired 0,1,2,3 Returns ------- logging object """ logging_levels = [logging.ERROR, logging.WARN, loggin...
phac-nml/bioCanon
bioCanon/utils/__init__.py
__init__.py
py
1,532
python
en
code
1
github-code
6
[ { "api_name": "logging.ERROR", "line_number": 18, "usage_type": "attribute" }, { "api_name": "logging.WARN", "line_number": 18, "usage_type": "attribute" }, { "api_name": "logging.INFO", "line_number": 18, "usage_type": "attribute" }, { "api_name": "logging.DEBUG"...
38196863693
import numpy as np import pickle import matplotlib.pyplot as plt from scipy import signal from scipy import stats from sklearn import preprocessing import random def data_filter(path, channel_rm): with open(path, 'rb') as f: u = pickle._Unpickler(f) u.encoding = 'latin1' p =u.load() ...
KBhandari11/EEG_Emotion_Classification
graph_oneChannel.py
graph_oneChannel.py
py
3,117
python
en
code
0
github-code
6
[ { "api_name": "pickle._Unpickler", "line_number": 11, "usage_type": "call" }, { "api_name": "numpy.delete", "line_number": 17, "usage_type": "call" }, { "api_name": "numpy.delete", "line_number": 18, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.subplot...
40195391014
import os import codecs import string import wordcloud as wc import matplotlib.pyplot as plt from collections import Counter def create_dictionary(clean_list, stop_words): word_count = dict() for word in clean_list: if word not in stop_words: if word in word_count: word_co...
mfhorita/WordCloud
WordCloud.py
WordCloud.py
py
2,174
python
en
code
0
github-code
6
[ { "api_name": "collections.Counter", "line_number": 19, "usage_type": "call" }, { "api_name": "os.path.dirname", "line_number": 26, "usage_type": "call" }, { "api_name": "os.path", "line_number": 26, "usage_type": "attribute" }, { "api_name": "os.path.realpath", ...
43987860606
""" Notes about program """ # import modules import pandas as pd import numpy as np import matplotlib.pyplot as plt # read PIV data into DataFrame file = '/Users/mackenzie/Desktop/BPE-ICEO/06.11.21 - BPE-ICEO 500 um/chip2 - 500 nm pink/results/piv-data/PIV_data_E20.0Vmm_f500.0Hz_seq2.csv' df = pd.read_csv(filepath...
sean-mackenzie/curlypiv
curlypiv/statistical_analysis/piv_data_processing.py
piv_data_processing.py
py
584
python
en
code
0
github-code
6
[ { "api_name": "pandas.read_csv", "line_number": 15, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.subplots", "line_number": 21, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 21, "usage_type": "name" }, { "api_name": "matplotl...
45661513
import xml.etree.ElementTree as ET import os.path import fnmatch def get_content(filename): file_w = "{}.txt".format(filename) content = open(file_w, "w") tree = ET.parse(filename) root = tree.getroot() for sent in root.iter('s'): for item in sent.itertext(): content.writ...
shuai-dong31/read-bnc_baby_news
read.py
read.py
py
493
python
en
code
1
github-code
6
[ { "api_name": "xml.etree.ElementTree.parse", "line_number": 14, "usage_type": "call" }, { "api_name": "xml.etree.ElementTree", "line_number": 14, "usage_type": "name" }, { "api_name": "os.path.listdir", "line_number": 23, "usage_type": "call" }, { "api_name": "os....
40176994095
from simulatorTradingApi.seleniumUtil.HeadlessClient import HeadlessClient from selenium.webdriver.common.by import By from selenium.webdriver.common.keys import Keys from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.support....
mchigit/investopedia-simulator-api
simulatorTradingApi/trader/Trader.py
Trader.py
py
8,005
python
en
code
0
github-code
6
[ { "api_name": "logging.basicConfig", "line_number": 16, "usage_type": "call" }, { "api_name": "logging.INFO", "line_number": 16, "usage_type": "attribute" }, { "api_name": "selenium.webdriver.support.ui.WebDriverWait", "line_number": 41, "usage_type": "call" }, { ...
42337416601
from functools import cached_property from typing import Optional from pygame.locals import * import pygame from src.common.constants import VEC, Color, TILE_SIZE, TILE_MARGIN, BONUS_LOCATIONS, BONUS_FONT, AXIS_FONT, BOARD_SIZE, NUM_TILES from src.game.elements.container import Container from src.management.element im...
DaNubCoding/pygame-scrabble-client
src/game/board.py
board.py
py
2,647
python
en
code
0
github-code
6
[ { "api_name": "src.game.elements.container.Container", "line_number": 13, "usage_type": "name" }, { "api_name": "src.management.scene.Scene", "line_number": 14, "usage_type": "name" }, { "api_name": "src.common.constants.BOARD_SIZE", "line_number": 15, "usage_type": "name...
33796749880
from torch import nn class QFunc(nn.Module): """ """ def __init__(self, action_space=4, observation_space=8, hidden_space_1=512, hidden_space_2=512): """ """ super(QFunc, self).__init__() self.ffn =...
LemuelPuglisi/Lunar-Lander-DQN
src/aicourse/dqn.py
dqn.py
py
826
python
en
code
5
github-code
6
[ { "api_name": "torch.nn.Module", "line_number": 4, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 4, "usage_type": "name" }, { "api_name": "torch.nn.Sequential", "line_number": 16, "usage_type": "call" }, { "api_name": "torch.nn", "line_...
40696441173
import base64 from cryptography import x509 from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import hashes, serialization from cryptography.x509.oid import NameOID from magma.common.serialization_utils import write_to_file_atomically def load_key(key_file): """Load a p...
magma/magma
orc8r/gateway/python/magma/common/cert_utils.py
cert_utils.py
py
4,363
python
en
code
1,605
github-code
6
[ { "api_name": "cryptography.hazmat.primitives.serialization.load_pem_private_key", "line_number": 26, "usage_type": "call" }, { "api_name": "cryptography.hazmat.primitives.serialization", "line_number": 26, "usage_type": "name" }, { "api_name": "cryptography.hazmat.backends.defau...
21716984883
import sys import os sys.path.append(os.getcwd()) import config from src.model.modules import * from src.model.loss import * from src.dataset.uv_face import mean_shape_map_np import torch import time from src.model.hrnet import get_hrnet from src.model.unet import UNet from src.model.pointnet import PointNet from src...
lhyfst/DSFNet
src/model/DSFNet.py
DSFNet.py
py
3,915
python
en
code
39
github-code
6
[ { "api_name": "sys.path.append", "line_number": 3, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 3, "usage_type": "attribute" }, { "api_name": "os.getcwd", "line_number": 3, "usage_type": "call" }, { "api_name": "src.model.hrnet.get_hrnet", ...
1416135920
import requests import time import pandas as pd import numpy as np import re import json from bs4 import BeautifulSoup import pickle import pdb import os def create_yarn_list(input_weight): id_dict = pickle.load( open( "ravrec/yarn_id_dict.p", "rb" ) ) input_weight = input_weight.lower() yarn_list = [inpu...
ananari/ravelry-rec-backend
ravrec/similar_patterns.py
similar_patterns.py
py
4,288
python
en
code
0
github-code
6
[ { "api_name": "pickle.load", "line_number": 13, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 35, "usage_type": "call" }, { "api_name": "os.environ", "line_number": 36, "usage_type": "attribute" } ]
21413391433
from django.conf.urls import patterns, include, url # Uncomment the next two lines to enable the admin: from django.contrib import admin from onewire.views import SensorCreate admin.autodiscover() urlpatterns = patterns('', # Examples: url(r'^$', 'onewire.views.index'), url(r'^api/last_scan.*$', 'onewire...
tobias-reese/onewiregraph
onewiregraph/urls.py
urls.py
py
856
python
en
code
0
github-code
6
[ { "api_name": "django.contrib.admin.autodiscover", "line_number": 7, "usage_type": "call" }, { "api_name": "django.contrib.admin", "line_number": 7, "usage_type": "name" }, { "api_name": "django.conf.urls.patterns", "line_number": 9, "usage_type": "call" }, { "api...
6995244341
from operator import le from click import option from selenium import webdriver from selenium.webdriver.chrome.webdriver import WebDriver from selenium.webdriver.common.keys import Keys from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium...
BharathG03/Twitter-Data-Retriever
functions.py
functions.py
py
3,252
python
en
code
0
github-code
6
[ { "api_name": "selenium.webdriver.chrome.options.Options", "line_number": 15, "usage_type": "call" }, { "api_name": "selenium.webdriver.chrome.service.Service", "line_number": 17, "usage_type": "call" }, { "api_name": "selenium.webdriver.Chrome", "line_number": 19, "usage...
74473913146
import math import requests API_KEY = "29ff3b1e" # argaghulamahmad@gmail.com ombd account """ Fungsi untuk mendapatkan data json menggunakan api ombd """ def search_movie(judul, tahun): print("METHOD SEARCH MOVIE") # Generate url untuk mendapatkan data get_tahun = "" if not tahun == "-": ...
argaghulamahmad/ppw-lab-arga
lab_10/omdb_api.py
omdb_api.py
py
2,252
python
en
code
0
github-code
6
[ { "api_name": "requests.get", "line_number": 21, "usage_type": "call" }, { "api_name": "math.ceil", "line_number": 39, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 55, "usage_type": "call" }, { "api_name": "requests.get", "line_number":...
8089633135
import datetime from os import path from brains.config import RACERS, START, END, racers_type from brains.utils import calculate_critical_threshold from datetime import datetime class RacerInfo: def __init__(self, place=None, name=None, team=None, lap_time=None): self.place = place self.name = nam...
FedXL/Monaco-Monaco
src/awesome_monaco_FEDORKURUTS/brains/build_data.py
build_data.py
py
3,767
python
en
code
0
github-code
6
[ { "api_name": "datetime.datetime.strptime", "line_number": 16, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 16, "usage_type": "name" }, { "api_name": "datetime.datetime.strptime", "line_number": 17, "usage_type": "call" }, { "api_name"...
29577253540
# -*- coding: utf-8 -*- """ 1. Classification (k-NN) 2. Applicability Domain (k-NN) 3. Double Cross Validation Created on Thu Jul 26 15:08:34 2018 @author: Akitaka """ import pandas as pd import numpy as np # import matplotlib.pyplot as plt from time import time from sklearn.dataset...
nakanishi-akitaka/python2018_backup
0726/test4_kNN_AD_DCV_clf.py
test4_kNN_AD_DCV_clf.py
py
3,768
python
en
code
5
github-code
6
[ { "api_name": "time.time", "line_number": 50, "usage_type": "call" }, { "api_name": "sklearn.datasets.make_classification", "line_number": 53, "usage_type": "call" }, { "api_name": "sklearn.preprocessing.MinMaxScaler", "line_number": 55, "usage_type": "call" }, { ...
16885096549
''' Лабораторная работа номер 6 Многострочный комментарий ''' # Импорт библиотеки, отвечающей за связь с SQL import psycopg2 from psycopg2 import OperationalError # Соединение с базой данных def create_connection(db_name, db_user, db_password, db_host, db_port): connection = None try: con...
DekkoBraze/PIS-Labs
Lab6/lab6.py
lab6.py
py
8,577
python
ru
code
0
github-code
6
[ { "api_name": "psycopg2.connect", "line_number": 14, "usage_type": "call" }, { "api_name": "psycopg2.OperationalError", "line_number": 29, "usage_type": "name" }, { "api_name": "psycopg2.OperationalError", "line_number": 42, "usage_type": "name" }, { "api_name": "...
14186961986
import numpy as np import random import math import matplotlib.pyplot as plt sigma_a = 0.03 H = 100 h = 1 D = 1 L = (1 / sigma_a) ** (1 / 2) Q = 1 q = Q * h a = - D / h c = - D / h N = int(H / h) b = np.zeros(N) b[0] = sigma_a * h - c b[N - 1] = sigma_a * h - a + 0.5 b[1:N - 1] = sigma_a * h - c - a A = np.zeros(N) ...
DanilaKholod/Neutron-physics-calculation
Autumn/Lab 7.py
Lab 7.py
py
960
python
en
code
0
github-code
6
[ { "api_name": "numpy.zeros", "line_number": 17, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_number": 22, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_number": 25, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_number": ...
1821849748
import argparse import enum import json import os from os.path import join import shutil import warnings import numpy as np import pandas as pd import models import data_processing as dp import utils def get_id_from_fname(f): return f.split('.')[0].split('_')[1] def get_ftype_from_fname(f): return f.split('...
adragnar/causal_discovery
aggregate.py
aggregate.py
py
11,300
python
en
code
0
github-code
6
[ { "api_name": "json.load", "line_number": 24, "usage_type": "call" }, { "api_name": "pandas.DataFrame.from_dict", "line_number": 28, "usage_type": "call" }, { "api_name": "pandas.DataFrame", "line_number": 28, "usage_type": "attribute" }, { "api_name": "enum.Enum"...
5087770676
""" Q this is the main file for Q lang. this file holds the class for Q , links to the parsers and SQL Like operators queue supports further to the bottom """ from __future__ import annotations import csv import logging from copy import copy from dataclasses import dataclass from json import JSONEncoder, dumps from mu...
CancerDataAggregator/cda-python
cdapython/Q.py
Q.py
py
28,941
python
en
code
7
github-code
6
[ { "api_name": "typing.TYPE_CHECKING", "line_number": 62, "usage_type": "name" }, { "api_name": "logging.captureWarnings", "line_number": 65, "usage_type": "call" }, { "api_name": "typing_extensions.Literal", "line_number": 67, "usage_type": "name" }, { "api_name":...
9915828409
from django.conf.urls import url from habito_app import views urlpatterns = [ url(r'^$', views.index, name='index'), url(r'^user', views.show_user, name='user'), url(r'^habit/(?P<habit_title_slug>[\w\-]+)/$', views.show_habit, name='habit'), url(r'^add_habit/$', views.add_habit, name='add_habit'), ...
oldaukse/Habit-O
habito_app/urls.py
urls.py
py
487
python
en
code
0
github-code
6
[ { "api_name": "django.conf.urls.url", "line_number": 5, "usage_type": "call" }, { "api_name": "habito_app.views.index", "line_number": 5, "usage_type": "attribute" }, { "api_name": "habito_app.views", "line_number": 5, "usage_type": "name" }, { "api_name": "django...
1772004048
import asyncio import sys import os import msg import yaml async def exec(program: str, args: list[str]) -> None: log_error = "" proc = await asyncio.create_subprocess_exec( program, *args, stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.PIPE ) while True: ...
regularenthropy/server
modules/searx.py
searx.py
py
2,294
python
en
code
0
github-code
6
[ { "api_name": "asyncio.create_subprocess_exec", "line_number": 9, "usage_type": "call" }, { "api_name": "asyncio.subprocess", "line_number": 12, "usage_type": "attribute" }, { "api_name": "asyncio.subprocess", "line_number": 13, "usage_type": "attribute" }, { "api...
73993755389
import functools import io import os import stat import subprocess import threading import dulwich import dulwich.patch from dulwich.errors import NotTreeError from dulwich.object_store import tree_lookup_path from dulwich.objects import S_ISGITLINK, Blob try: from dulwich.refs import SymrefLoop except ImportErro...
jonashaag/klaus
klaus/repo.py
repo.py
py
15,016
python
en
code
659
github-code
6
[ { "api_name": "dulwich.refs.SymrefLoop", "line_number": 19, "usage_type": "name" }, { "api_name": "threading.RLock", "line_number": 42, "usage_type": "call" }, { "api_name": "functools.wraps", "line_number": 43, "usage_type": "call" }, { "api_name": "dulwich.repo....
36130416410
# -*- coding: utf-8 -*- """ Created on Thu Aug 30 16:15:20 2018 @author: Christopher Barnhouse """ import time import csv import wordcloud import matplotlib.pyplot as pyplot import folium import os import geopy from selenium import webdriver from selenium.webdriver.common.keys import Keys from selenium.webdriver.c...
cbarnhouse/Twitter-scraper
twitterScraper.py
twitterScraper.py
py
13,443
python
en
code
0
github-code
6
[ { "api_name": "selenium.webdriver.Chrome", "line_number": 23, "usage_type": "call" }, { "api_name": "selenium.webdriver", "line_number": 23, "usage_type": "name" }, { "api_name": "time.sleep", "line_number": 35, "usage_type": "call" }, { "api_name": "selenium.webd...
16969672768
from rest_framework.serializers import ModelSerializer, HyperlinkedIdentityField, SerializerMethodField from notes.models import Note post_detail_url = HyperlinkedIdentityField( view_name='notes_api:detail', # lookup_field='slug' ) post_delete_url = HyperlinkedIdentityField( view_name='notes_api:delete', ...
rohitnahata/NotesDjango
notes/api/serializers.py
serializers.py
py
1,437
python
en
code
1
github-code
6
[ { "api_name": "rest_framework.serializers.HyperlinkedIdentityField", "line_number": 5, "usage_type": "call" }, { "api_name": "rest_framework.serializers.HyperlinkedIdentityField", "line_number": 9, "usage_type": "call" }, { "api_name": "rest_framework.serializers.ModelSerializer"...
32558206702
from astropy.io import fits import os from EXOSIMS.util.radialfun import ( radial_average, genwindow, resample_image, circ_aperture, com, fitgaussian, ) from scipy.ndimage import shift import numpy as np import warnings import json import astropy.units as u def process_opticalsys_package( ...
Rickr96/ExoSims_Rick-Branch
EXOSIMS/util/process_opticalsys_package.py
process_opticalsys_package.py
py
15,128
python
en
code
0
github-code
6
[ { "api_name": "numpy.sqrt", "line_number": 29, "usage_type": "call" }, { "api_name": "astropy.io.fits.open", "line_number": 117, "usage_type": "call" }, { "api_name": "astropy.io.fits", "line_number": 117, "usage_type": "name" }, { "api_name": "os.path.join", ...
70369205308
from xml.dom.minidom import parse, parseString import cv2 import glob import json def read_data(dataset_path, output_data): data=[] for filename_xml in glob.glob(dataset_path+'*.xml'): docs = parse(filename_xml) # parse an XML file by name Coords = docs.getElementsByTagName("Coords") filename_img...
avlisrede09/acl_doc
load_bbox.py
load_bbox.py
py
3,522
python
en
code
0
github-code
6
[ { "api_name": "glob.glob", "line_number": 10, "usage_type": "call" }, { "api_name": "xml.dom.minidom.parse", "line_number": 11, "usage_type": "call" }, { "api_name": "json.dumps", "line_number": 96, "usage_type": "call" }, { "api_name": "argparse.ArgumentParser", ...
5665709038
import requests from bs4 import BeautifulSoup import re def get_content(url): """ gets the content of the html page cleans the text so that we essentially get the body of the html page and other relevant content :param url: string that represents the url of the site we want to scrap :return: clean...
shivanipatel16/information-extraction-Iterative-set-expansion
textprocessing.py
textprocessing.py
py
1,357
python
en
code
0
github-code
6
[ { "api_name": "requests.get", "line_number": 15, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_number": 16, "usage_type": "call" }, { "api_name": "re.sub", "line_number": 25, "usage_type": "call" } ]
927368302
import requests import json from threading import Thread class GetIdCityByName: def __init__(self, name): self.name = name self.url = 'https://api.dobrf.ru/open-api/v1/regions/?search={}'.format(name) def execute(self): response = requests.get(self.url) response_data = json.lo...
Hosstell/prodobro
backend/events/services/map_services.py
map_services.py
py
3,289
python
en
code
0
github-code
6
[ { "api_name": "requests.get", "line_number": 12, "usage_type": "call" }, { "api_name": "json.loads", "line_number": 13, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 26, "usage_type": "call" }, { "api_name": "json.loads", "line_number": ...
40948771304
from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from models import Leagues, Matches, Players, Stages, Teams, Tournaments, create_table import dateparser import json class DBUtility: """This class is used to store league data to database. """ def __init__(self, user: str, ...
DrArtemi/riot-api
unoffical_api_wrapper/database.py
database.py
py
6,690
python
en
code
0
github-code
6
[ { "api_name": "sqlalchemy.create_engine", "line_number": 13, "usage_type": "call" }, { "api_name": "models.create_table", "line_number": 14, "usage_type": "call" }, { "api_name": "sqlalchemy.orm.sessionmaker", "line_number": 15, "usage_type": "call" }, { "api_name...
29870060106
import torch import numpy as np from torchvision.ops import nms as torch_nms def nms(result_boxes, det_thres=None, iou_thres = 0.5): for filekey in result_boxes.keys(): arr = np.array(result_boxes[filekey]) arr = result_boxes[filekey] if arr is not None and isinstance(arr, np.ndarray) ...
Karnsira/CMVDET
lib/nms_WSI.py
nms_WSI.py
py
931
python
en
code
0
github-code
6
[ { "api_name": "numpy.array", "line_number": 8, "usage_type": "call" }, { "api_name": "numpy.ndarray", "line_number": 10, "usage_type": "attribute" }, { "api_name": "torchvision.ops.nms", "line_number": 25, "usage_type": "call" }, { "api_name": "torch.tensor", ...
25010911405
from collections import deque import copy dict_16 = { 'A': 10, 'B': 11, 'C': 12, 'D': 13, 'E': 14, 'F': 15 } x = list(input('Введите первое шестнадцатеричное чисело: ')) y = list(input('Введите второе шестнадцатеричное чисело: ')) #Подставляю нули в списки, чтобы удобнее было считать if len(x...
the-nans/py2-repo_gb
lesson_6/sandbox.py
sandbox.py
py
1,543
python
ru
code
0
github-code
6
[ { "api_name": "collections.deque", "line_number": 28, "usage_type": "call" }, { "api_name": "copy.copy", "line_number": 29, "usage_type": "call" }, { "api_name": "collections.deque", "line_number": 30, "usage_type": "call" }, { "api_name": "copy.copy", "line_n...
25255287095
from mptt.models import MPTTModel from mptt.fields import TreeForeignKey from django.db import models from ckeditor_uploader.fields import RichTextUploadingField from django.contrib.auth.models import User from learning_logs.models import Sharer from company.models import Xinw from django.urls import reverse # Create y...
blhjkkj/company
comment/models.py
models.py
py
1,345
python
en
code
0
github-code
6
[ { "api_name": "mptt.models.MPTTModel", "line_number": 10, "usage_type": "name" }, { "api_name": "django.db.models.ForeignKey", "line_number": 11, "usage_type": "call" }, { "api_name": "django.contrib.auth.models.User", "line_number": 11, "usage_type": "argument" }, { ...
23066735421
import bpy import bmesh import random from bpy.props import ( BoolProperty, BoolVectorProperty, FloatProperty, FloatVectorProperty, IntProperty, ) class AddTerrainDiamondSquare(bpy.types.Operator): """Add a simple box mesh""" bl_idname = "mesh.te...
lnugentgibson/Blender-Addons
FractalTerrain/DiamondSquare/operator_terrain_diamond_square_add.py
operator_terrain_diamond_square_add.py
py
6,248
python
en
code
0
github-code
6
[ { "api_name": "bpy.types", "line_number": 14, "usage_type": "attribute" }, { "api_name": "bpy.props.FloatProperty", "line_number": 20, "usage_type": "call" }, { "api_name": "bpy.props.FloatProperty", "line_number": 26, "usage_type": "call" }, { "api_name": "bpy.pr...
2528265270
from unittest import TestCase from character_mappings import CONSONANT_CHAR_CLASS, kn_iast_mappings, kn_iast_classes from transliterate import transliterate_kn_iast class TestTransliteration(TestCase): def test_single_chars(self): # test a collection of single characters for original, expected_tr...
gsireesh/kannada-transliterate
tests/test_transliteration.py
test_transliteration.py
py
931
python
en
code
0
github-code
6
[ { "api_name": "unittest.TestCase", "line_number": 7, "usage_type": "name" }, { "api_name": "character_mappings.kn_iast_mappings.items", "line_number": 10, "usage_type": "call" }, { "api_name": "character_mappings.kn_iast_mappings", "line_number": 10, "usage_type": "name" ...
43079361644
from typing import List class Solution: def search(self, nums: List[int], target: int) -> int: low = 0 high = len(nums) - 1 mid = 0 while low <= high: mid = (low + high) // 2 if nums[mid] == target: return mid elif nums[mid] > ta...
devKhush/DSALeetCodeProblems_Python
SearchInsertPosition/SearchInsertPosition.py
SearchInsertPosition.py
py
653
python
en
code
0
github-code
6
[ { "api_name": "typing.List", "line_number": 6, "usage_type": "name" }, { "api_name": "typing.List", "line_number": 21, "usage_type": "name" } ]
1407662423
import json from os import path from tempfile import TemporaryDirectory from todo_list.persistent_list import persistent_list def test_persistent_list_should_be_created_as_empty_list_when_file_does_not_exist(): with TemporaryDirectory() as temp: # when with persistent_list(f'{temp}/list.json') a...
tanayseven/python_workshop
test/test_persistent_list.py
test_persistent_list.py
py
875
python
en
code
0
github-code
6
[ { "api_name": "tempfile.TemporaryDirectory", "line_number": 9, "usage_type": "call" }, { "api_name": "todo_list.persistent_list.persistent_list", "line_number": 12, "usage_type": "call" }, { "api_name": "os.path.exists", "line_number": 16, "usage_type": "call" }, { ...
15110355597
import streamlit as st import pickle st.set_page_config(page_title="Spam or Ham Predictor", page_icon=":email:", layout="centered") # Title and Header st.title("Spam or Ham Predictor") st.write("Enter a message and click on the 'Predict' button to check if it's spam or ham.") # Text Input input_text = st.t...
oceanslayer/sd_deploy1
app.py
app.py
py
1,237
python
en
code
0
github-code
6
[ { "api_name": "streamlit.set_page_config", "line_number": 4, "usage_type": "call" }, { "api_name": "streamlit.title", "line_number": 7, "usage_type": "call" }, { "api_name": "streamlit.write", "line_number": 8, "usage_type": "call" }, { "api_name": "streamlit.text...
20298986310
import cv2 capture = cv2.VideoCapture(0) if capture.isOpened() == False : raise Exception("카메라 연결 안됨") fps=29.97 delay = round(1000/fps) size = (1280,720) fourcc = cv2.VideoWriter_fourcc('M','J','P','G') print("width height :", size) print("video writer fourcc : %s"%fourcc) print("delay : %2d ms"%delay) print("fps :...
chaeheejo/computer_vision
openCV_practice/video_writer.py
video_writer.py
py
869
python
en
code
1
github-code
6
[ { "api_name": "cv2.VideoCapture", "line_number": 3, "usage_type": "call" }, { "api_name": "cv2.VideoWriter_fourcc", "line_number": 9, "usage_type": "call" }, { "api_name": "cv2.CAP_PROP_ZOOM", "line_number": 16, "usage_type": "attribute" }, { "api_name": "cv2.CAP_...
7789490943
from flask import Markup, render_template, request from werkzeug.exceptions import HTTPException, default_exceptions def errorHandler(error): if isinstance(error, HTTPException): msg = Markup(error.get_description(request.environ)) code = error.code name = error.name else: msg ...
DanGonite57/CrPyto
views/errors.py
errors.py
py
775
python
en
code
0
github-code
6
[ { "api_name": "werkzeug.exceptions.HTTPException", "line_number": 6, "usage_type": "argument" }, { "api_name": "flask.Markup", "line_number": 7, "usage_type": "call" }, { "api_name": "flask.request.environ", "line_number": 7, "usage_type": "attribute" }, { "api_na...
33762148477
import sys import pandas as pd import matplotlib.pyplot as plt from wkf.CHUBBINT.Const import File, Column from sklearn.model_selection import train_test_split class InfoPrinter: def __init__(self, df): self.df = df self.df_to_plot = df.groupby(Column.category)[Column.desc_tagged].count().sort_v...
las1982/DataAnalysis
wkf/CHUBBINT/Analysis.py
Analysis.py
py
3,256
python
en
code
0
github-code
6
[ { "api_name": "wkf.CHUBBINT.Const.Column.category", "line_number": 13, "usage_type": "attribute" }, { "api_name": "wkf.CHUBBINT.Const.Column", "line_number": 13, "usage_type": "name" }, { "api_name": "wkf.CHUBBINT.Const.Column.desc_tagged", "line_number": 13, "usage_type"...
7165782164
import importlib.resources import os import pathlib from logging import getLogger from typing import Any, Optional import yaml from competitive_verifier import git, github from .. import config as conf from .type import SiteRenderConfig _RESOURCE_PACKAGE = "competitive_verifier_resources" _CONFIG_YML_PATH = "_confi...
competitive-verifier/competitive-verifier
src/competitive_verifier/documents/render.py
render.py
py
3,240
python
en
code
8
github-code
6
[ { "api_name": "logging.getLogger", "line_number": 19, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_number": 24, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_number": 22, "usage_type": "attribute" }, { "api_name": "pathlib.Path", "...
14627906723
import pytest import asyncio import sqlite3 import aiosqlite from unittest.mock import patch, ANY from pymongo import MongoClient from rollbot.cogs.profile_cog import ProfileCog from rollbot.profile.profile import Profile # DISCORD MOCK class MockDiscord(): def __init__(self): self.author = "Owner#1" ...
guardianroleplay/rollbotexe
rollbot/tests/profile_test.py
profile_test.py
py
5,433
python
en
code
0
github-code
6
[ { "api_name": "aiosqlite.connect", "line_number": 46, "usage_type": "call" }, { "api_name": "rollbot.cogs.profile_cog.ProfileCog", "line_number": 49, "usage_type": "call" }, { "api_name": "rollbot.profile.profile.Profile", "line_number": 49, "usage_type": "call" }, { ...
71895892987
import pandas as pd import numpy as np import openpyxl from sklearn.neighbors import BallTree from sklearn.base import BaseEstimator from sklearn.pipeline import make_pipeline from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.decomposition import TruncatedSVD from aiogram import Bot, Disp...
flofeyka/botadolfAI
main.py
main.py
py
4,733
python
en
code
0
github-code
6
[ { "api_name": "pandas.read_excel", "line_number": 15, "usage_type": "call" }, { "api_name": "openpyxl.load_workbook", "line_number": 16, "usage_type": "call" }, { "api_name": "sklearn.feature_extraction.text.TfidfVectorizer", "line_number": 19, "usage_type": "call" }, ...
33695883060
import pandas as pd import numpy as np from sklearn import linear_model from sklearn.model_selection import train_test_split from sklearn.utils import shuffle data = pd.read_csv("student-mat.csv",sep=";") data = data[["G1","G2","G3","studytime","failures","absences"]] # cut ra nhung column co ten nhu nay predict = "G3...
Quanghuy99/ML
linear_regression/Regression_working_with_tim.py
Regression_working_with_tim.py
py
801
python
en
code
2
github-code
6
[ { "api_name": "pandas.read_csv", "line_number": 7, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 10, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 11, "usage_type": "call" }, { "api_name": "sklearn.model_selection.train_...
29431065555
import matplotlib.pyplot as plt import torch import numpy as np import analytics.plotAnalytics from analytics import analytic_funcs as AF def plotLosses(G_losses, D_losses): #plt.figure() plt.title("Generator and Discriminator Loss During Training") plt.plot(G_losses, label="G") plt.plot(D_losses, la...
Mintas/diving-deep-learning
plots/painters.py
painters.py
py
3,444
python
en
code
2
github-code
6
[ { "api_name": "matplotlib.pyplot.title", "line_number": 11, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 11, "usage_type": "name" }, { "api_name": "matplotlib.pyplot.plot", "line_number": 12, "usage_type": "call" }, { "api_name": "matp...
32904027646
import json, random, math from asgiref.sync import async_to_sync from channels.generic.websocket import WebsocketConsumer from django.forms.models import model_to_dict from .models import Game, Player class GameConsumer(WebsocketConsumer): def connect(self): self.room_name = self.scope['url_route']['kwargs...
sigmachirality/gofungyourself
backend/game/consumers.py
consumers.py
py
7,005
python
en
code
0
github-code
6
[ { "api_name": "channels.generic.websocket.WebsocketConsumer", "line_number": 7, "usage_type": "name" }, { "api_name": "models.Game.objects.filter", "line_number": 14, "usage_type": "call" }, { "api_name": "models.Game.objects", "line_number": 14, "usage_type": "attribute"...
5949665505
import matplotlib.pyplot as plt import numpy as np import pickle import os import csv from constants import DIC_DATA, DATA_FILENAME, CSV_FILENAME, CSV_HEADER class Statistics: """Static class which handles data operations.""" @staticmethod def save(**data_arguments): """ - Saves the consi...
JeremyRozier/SawImageProject
stats/statistics.py
statistics.py
py
5,043
python
en
code
0
github-code
6
[ { "api_name": "constants.DIC_DATA", "line_number": 42, "usage_type": "name" }, { "api_name": "numpy.sum", "line_number": 44, "usage_type": "call" }, { "api_name": "numpy.size", "line_number": 44, "usage_type": "call" }, { "api_name": "pickle.dump", "line_numbe...
19798353101
"""Initial Tenant Tables Revision ID: 43de4e824162 Revises: d6ba8c13303e Create Date: 2022-07-18 16:18:40.239282 """ import sqlalchemy as sa from alembic import op # revision identifiers, used by Alembic. revision = "43de4e824162" down_revision = "d6ba8c13303e" branch_labels = None depends_on = None def upgrade() ...
mgurg/fastapi-multitenant-example-app
migrations/versions/2022_07_18_1618-43de4e824162_initial_tenant_tables.py
2022_07_18_1618-43de4e824162_initial_tenant_tables.py
py
668
python
en
code
11
github-code
6
[ { "api_name": "alembic.op.create_table", "line_number": 19, "usage_type": "call" }, { "api_name": "alembic.op", "line_number": 19, "usage_type": "name" }, { "api_name": "sqlalchemy.Column", "line_number": 21, "usage_type": "call" }, { "api_name": "sqlalchemy.Integ...
73967852669
from decimal import Decimal from dateutil.relativedelta import relativedelta from django.conf import settings from django.db.models import Sum from metering_billing.payment_providers import PAYMENT_PROVIDER_MAP from metering_billing.utils import ( calculate_end_date, convert_to_datetime, convert_to_decimal...
orgTestCodacy11KRepos110MB/repo-4660-lotus
backend/metering_billing/invoice.py
invoice.py
py
21,735
python
en
code
0
github-code
6
[ { "api_name": "django.conf.settings.POSTHOG_PERSON", "line_number": 25, "usage_type": "attribute" }, { "api_name": "django.conf.settings", "line_number": 25, "usage_type": "name" }, { "api_name": "django.conf.settings.META", "line_number": 26, "usage_type": "attribute" ...
19763065722
import torch import torch.nn as nn class MyModel(nn.Module): def __init__(self): super(MyModel, self).__init__() self.neuralnetwork = nn.Sequential( nn.Linear(40, 128, bias= True), #stacking previous distances along with action nn.ReLU(), nn.Linear(128, 3), ...
praveenVnktsh/CarRacing-v0-Genetic-Evolution
temp.py
temp.py
py
700
python
en
code
0
github-code
6
[ { "api_name": "torch.nn.Module", "line_number": 4, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 4, "usage_type": "name" }, { "api_name": "torch.nn.Sequential", "line_number": 7, "usage_type": "call" }, { "api_name": "torch.nn", "line_n...
35392148532
import re import requests import urllib3 from Model.news import News from Utils.Util import get_connect urllib3.disable_warnings() class Toutiao(): def __init__(self): self.index_url = 'https://www.toutiao.com/' self.session = requests.Session() self.news_list = [] self.nodejs_s...
wangshen520/CrawlerAndDataAnalysis
Crawler/toutiao_news.py
toutiao_news.py
py
4,674
python
en
code
0
github-code
6
[ { "api_name": "urllib3.disable_warnings", "line_number": 9, "usage_type": "call" }, { "api_name": "requests.Session", "line_number": 15, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 45, "usage_type": "call" }, { "api_name": "re.findall", ...
39523060484
import re import requests from bs4 import BeautifulSoup def scrape_page(URL): find_id = re.search('\/(\d{1,9})\/', URL) print(URL) if find_id: found_id = find_id.group(1) page = requests.get(URL) soup = BeautifulSoup(page.content, "html.parser") results = soup.find(id="b...
Shybuia/web-scrape-home-project
scraping.py
scraping.py
py
1,386
python
en
code
0
github-code
6
[ { "api_name": "re.search", "line_number": 6, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 10, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_number": 11, "usage_type": "call" }, { "api_name": "re.search", "line_number"...
72433952187
''' Created on Apr 4, 2018 @author: cclausen ''' import json def openJson(path): with open(path) as f: parsed = json.load(f) return parsed def writeJson(path, data, pretty = True): with open(path, "w") as f: f.truncate() if pretty: f.write(json.dumps(data, sort_keys=Tr...
ColaColin/nmcts2
src/core/misc.py
misc.py
py
387
python
en
code
0
github-code
6
[ { "api_name": "json.load", "line_number": 10, "usage_type": "call" }, { "api_name": "json.dumps", "line_number": 17, "usage_type": "call" }, { "api_name": "json.dumps", "line_number": 19, "usage_type": "call" } ]
75264641466
import os import django import io import datetime import requests from django.http import HttpResponse from django.template.loader import get_template os.environ['DJANGO_SETTINGS_MODULE'] = 'Azondrop.settings' django.setup() from scout.Miner import excel from scout.models import Job, Product, Proxy, User, File, Mess...
happyxiaoxu/zonmine
scout/db_handler.py
db_handler.py
py
9,384
python
en
code
1
github-code
6
[ { "api_name": "os.environ", "line_number": 10, "usage_type": "attribute" }, { "api_name": "django.setup", "line_number": 11, "usage_type": "call" }, { "api_name": "io.BytesIO", "line_number": 24, "usage_type": "call" }, { "api_name": "scout.Miner.excel.init_excel"...
36802214249
import ipfn import pandas as pd import numpy as np import sklearn.linear_model import statsmodels.api as sm import plotly.graph_objects as go import plotly.express as px import plotly.io as pio pd.set_option('display.max_columns', None) path='C:/Users/mayij/Desktop/DOC/DCP2021/TRAVEL DEMAND MODEL/' pio.renderers.defau...
NYCPlanning/td-tdm
od.py
od.py
py
46,506
python
en
code
0
github-code
6
[ { "api_name": "pandas.set_option", "line_number": 10, "usage_type": "call" }, { "api_name": "plotly.io.renderers", "line_number": 12, "usage_type": "attribute" }, { "api_name": "plotly.io", "line_number": 12, "usage_type": "name" }, { "api_name": "pandas.read_csv"...
35220900555
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Construct a CSV file with the raw imagenet images and their label data. This file expects the following files to exist in the project which will need to be downloaded independently: data/val/ILSVRC2012_val_*.JPEG -> Validation set images data/I...
theBraindonor/adversarial-filters
preprocess/create_imagenet_labels.py
create_imagenet_labels.py
py
2,707
python
en
code
0
github-code
6
[ { "api_name": "utility.use_project_path", "line_number": 33, "usage_type": "call" }, { "api_name": "numpy.rot90", "line_number": 36, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 36, "usage_type": "call" }, { "api_name": "glob.iglob", "li...
10323452181
""" Module that contains salt utilities All functions here should return dictionaries or object no IO """ from __future__ import absolute_import, unicode_literals import os import subprocess import yaml from datasciencebox.core.logger import getLogger logger = getLogger() def get_pillar(project, filename, pillar=N...
danielfrg/datasciencebox
datasciencebox/core/salt.py
salt.py
py
3,821
python
en
code
20
github-code
6
[ { "api_name": "datasciencebox.core.logger.getLogger", "line_number": 13, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 17, "usage_type": "call" }, { "api_name": "os.path", "line_number": 17, "usage_type": "attribute" }, { "api_name": "yaml.l...
4386810477
import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim import numpy as np import matplotlib.pyplot as plt class Model(nn.Module): def __init__(self): super(Model, self).__init__() # 인풋(앞 레이어의 노드)=1개, 아웃풋(뒤 레이어의 노드)=128개 -> 128*1 w 필요 self.fc1 = nn.Lin...
seoyun-dev/TIL
ML/RL/RLfrombasics/ch7_CosineFitting.py
ch7_CosineFitting.py
py
2,705
python
ko
code
0
github-code
6
[ { "api_name": "torch.nn.Module", "line_number": 8, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 8, "usage_type": "name" }, { "api_name": "torch.nn.Linear", "line_number": 12, "usage_type": "call" }, { "api_name": "torch.nn", "line_numb...
18798533943
from vle.modules.functional import epsilon import lpips import torch.nn.functional as F import torch.nn as nn import torch def normalize_token_along_batch(t): return (t - torch.mean(t, dim=0)) / (torch.std(t, dim=0) + epsilon) def get_cross_correlation_loss(t1, t2, lambd=1e-3): (b, c, h, w) = t1.shape ...
johnathanchiu/variable-length-embedding
vle/modules/loss.py
loss.py
py
3,427
python
en
code
0
github-code
6
[ { "api_name": "torch.mean", "line_number": 10, "usage_type": "call" }, { "api_name": "torch.std", "line_number": 10, "usage_type": "call" }, { "api_name": "vle.modules.functional.epsilon", "line_number": 10, "usage_type": "name" }, { "api_name": "torch.abs", "...
2535754227
from twisted.internet import reactor from twisted.python import log from twisted.internet.error import AlreadyCalled, AlreadyCancelled from utils import get_uid do_log = False from functools import wraps from twisteddicom import __version__, pdu, sockhandler def debugrecv(f, msg=None): @wraps(f) def wrapper(...
rickardholmberg/twisteddicom
twisteddicom/upper_layer.py
upper_layer.py
py
19,425
python
en
code
8
github-code
6
[ { "api_name": "twisted.python.log.msg", "line_number": 14, "usage_type": "call" }, { "api_name": "twisted.python.log", "line_number": 14, "usage_type": "name" }, { "api_name": "functools.wraps", "line_number": 12, "usage_type": "call" }, { "api_name": "twisted.pyt...
72965010109
from urlparse import urlparse import urllib2 from bs4 import BeautifulSoup import mmap #html = ''' <tr class=""> <td class="lp-race"><a href="/epolls/2016/president/fl/florida_trump_vs_clinton_vs_johnson_vs_stein-5963.html">Florida: Trump vs. Clinton vs. Johnson vs. Stein</a></td> <td class="lp-po...
jackbandy/hw6-election
rcp_poll_list/rcp_poll_url_crawler_state.py
rcp_poll_url_crawler_state.py
py
3,853
python
en
code
0
github-code
6
[ { "api_name": "urllib2.Request", "line_number": 29, "usage_type": "call" }, { "api_name": "urllib2.urlopen", "line_number": 30, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_number": 32, "usage_type": "call" }, { "api_name": "mmap.mmap", "li...
34435447403
#pip install requests from flask import Flask, render_template, request from bs4 import BeautifulSoup import requests app = Flask(__name__) app.config['SECRET_KEY'] = '%' app.config['NOME_SITE'] = 'Contador de Tags HTML' @app.route('/') def indice(): return render_template('indice.html', nome_site = ap...
Gabriel-Angelo-Silva/contador-de-tags
app.py
app.py
py
1,179
python
pt
code
0
github-code
6
[ { "api_name": "flask.Flask", "line_number": 6, "usage_type": "call" }, { "api_name": "flask.render_template", "line_number": 12, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 16, "usage_type": "call" }, { "api_name": "flask.request.form", ...
8520759440
#!/usr/local/bin/python # -*- coding: utf-8 -*- import requests import json import io import os import time import datetime import pyodbc import concurrent.futures import openpyxl import pandas from time import sleep from bs4 import BeautifulSoup from selenium import webdriver from selenium.webdriver.support.u...
WayneTzeng/GetMakeupData
DATA/Upcollections.py
Upcollections.py
py
2,655
python
en
code
0
github-code
6
[ { "api_name": "selenium.webdriver.chrome.options.Options", "line_number": 47, "usage_type": "call" }, { "api_name": "time.time", "line_number": 49, "usage_type": "call" }, { "api_name": "time.strftime", "line_number": 50, "usage_type": "call" }, { "api_name": "tim...
73814857146
#!/usr/bin/env python # -*- coding:utf-8 -*- """ 脚本名: Created on 2018-08-01 @author:David Yisun @group:data """ import sys sys.path.append('../') import codecs import json import re with codecs.open('../data/train_data/chongzu/mark_in_content/mark_in_content.csv', 'r', 'utf8') as f: data = f.read() data =...
davidyisun/announcement_extract
scripts/temp2.py
temp2.py
py
781
python
en
code
0
github-code
6
[ { "api_name": "sys.path.append", "line_number": 10, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 10, "usage_type": "attribute" }, { "api_name": "codecs.open", "line_number": 16, "usage_type": "call" }, { "api_name": "re.sub", "line_number":...
5508362980
import torch import os import numpy as np from datetime import datetime import train.torch_model import torch.optim as optim import torch.nn as nn def run(): ''' ''' max_epochs = 200 batch_size = 32 TRAIN_FOLDER_PATH = 'storage/processed/train/' VAL_FOLDER_PATH = 'storage/processed/validation...
R-Stefano/betse-ml
train/__init__.py
__init__.py
py
3,399
python
en
code
0
github-code
6
[ { "api_name": "torch.utils.data.DataLoader", "line_number": 24, "usage_type": "call" }, { "api_name": "torch.utils", "line_number": 24, "usage_type": "attribute" }, { "api_name": "torch.utils.data.DataLoader", "line_number": 27, "usage_type": "call" }, { "api_name...
22677928201
from django.test import TestCase from django.core.management import call_command from django.test.client import Client from .models import CsvData from .forms import MastForm class Mast_app_Test(TestCase): """Testing that we get the correct data back from templates""" fixtures = ["mast_app.json"] def test_index(s...
taiChantarungsee/masts
mast_app/tests.py
tests.py
py
2,578
python
en
code
0
github-code
6
[ { "api_name": "django.test.TestCase", "line_number": 7, "usage_type": "name" }, { "api_name": "django.test.client.Client", "line_number": 13, "usage_type": "call" }, { "api_name": "django.test.TestCase", "line_number": 18, "usage_type": "name" }, { "api_name": "mo...
29478250891
from pyvows import Vows, expect from thumbor.handlers import BaseHandler from thumbor.context import Context from thumbor.config import Config from thumbor.app import ThumborServiceApp from mock import MagicMock @Vows.batch class BaseHandlerVows(Vows.Context): class ShouldStoreHeaderOnContext(Vows.Context): ...
ryanio/thumbor
vows/base_handler_vows.py
base_handler_vows.py
py
1,053
python
en
code
null
github-code
6
[ { "api_name": "pyvows.Vows.Context", "line_number": 11, "usage_type": "attribute" }, { "api_name": "pyvows.Vows", "line_number": 11, "usage_type": "name" }, { "api_name": "pyvows.Vows.Context", "line_number": 13, "usage_type": "attribute" }, { "api_name": "pyvows....
15627091146
import os import os.path import urllib.request import unidecode import utils import numpy as np import json def get_cards(cube_name, root = "https://cubecobra.com"): url = root + "/cube/api/cubelist/" + cube_name fp = urllib.request.urlopen(url) mybytes = fp.read() mystr = mybytes.decode("utf8") fp...
RyanSaxe/CubeCobraRecommender
src/non_ml/update_data.py
update_data.py
py
1,499
python
en
code
5
github-code
6
[ { "api_name": "urllib.request.request.urlopen", "line_number": 11, "usage_type": "call" }, { "api_name": "urllib.request.request", "line_number": 11, "usage_type": "attribute" }, { "api_name": "urllib.request", "line_number": 11, "usage_type": "name" }, { "api_nam...
26932152395
import json from Common import aes_crypt class Params(object): def __init__(self): self.commn_params = { 'gimiPid': 'EHFAJEF79TAU', 'gimiDevice': 'aosp_synsepalum_YN', 'xgimiDeviceName': 'synsepalum_Y', 'deviceMac': '80-0B-52-02-44-26', 'systemVersion': 'v1.6.23', 'launcherVersion...
UncleLiketao/API_AutoTest_Framework_Python
Common/params.py
params.py
py
1,064
python
en
code
0
github-code
6
[ { "api_name": "json.dumps", "line_number": 18, "usage_type": "call" }, { "api_name": "Common.aes_crypt.AesCrypt", "line_number": 19, "usage_type": "call" }, { "api_name": "Common.aes_crypt", "line_number": 19, "usage_type": "name" }, { "api_name": "json.dumps", ...