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
41154579351
from django.contrib import admin from django.urls import path from . import views urlpatterns = [ path("", views.getHomepage), path("news", views.getNewspage), path("introduceFood", views.getIntroduceFoodpage), path("menu", views.getMenupage), path("store", views.getStorepage), path("cart", vie...
huyheo2002/CleanFood
app/urls.py
urls.py
py
429
python
en
code
0
github-code
18
[ { "api_name": "django.urls.path", "line_number": 6, "usage_type": "call" }, { "api_name": "django.urls.path", "line_number": 7, "usage_type": "call" }, { "api_name": "django.urls.path", "line_number": 8, "usage_type": "call" }, { "api_name": "django.urls.path", ...
21035916112
from io import BytesIO import numpy as np import soundfile as sf import speech_recognition as sr import whisper class SpeechRecognizer: def __init__(self, model_name="base"): self.model = whisper.load_model(model_name) self.recognizer = sr.Recognizer() def recognize(self): with sr.Micr...
Ar-Ray-code/ChatIO_trial
speech_recognizer.py
speech_recognizer.py
py
933
python
en
code
2
github-code
18
[ { "api_name": "whisper.load_model", "line_number": 9, "usage_type": "call" }, { "api_name": "speech_recognition.Recognizer", "line_number": 10, "usage_type": "call" }, { "api_name": "speech_recognition.Microphone", "line_number": 13, "usage_type": "call" }, { "api...
582312646
# !/usr/bin/python # -*-coding:utf-8 -*- from tqdm import tqdm from webdriver_manager import chrome from webdriver_manager.chrome import ChromeDriverManager from selenium import webdriver from selenium.webdriver.chrome.options import Options from selenium.webdriver.support.ui import Select from bs4 import BeautifulSoup...
UT0903/NTU-Course-Widget-Demo
backend/utils/not_use_for_craw/nol.py
nol.py
py
2,963
python
en
code
0
github-code
18
[ { "api_name": "webdriver_manager.chrome.get", "line_number": 15, "usage_type": "call" }, { "api_name": "webdriver_manager.chrome", "line_number": 15, "usage_type": "name" }, { "api_name": "bs4.BeautifulSoup", "line_number": 16, "usage_type": "call" }, { "api_name"...
27925153967
import subprocess import json from utils.util import read_config, get_logger import numpy as np import argparse def args_parser(): parser = argparse.ArgumentParser() parser.add_argument( '--filename', default=[], help='configuration filename', action="append") parser.add_argument(...
EricssonResearch/fl-moe
iterator_lr.py
iterator_lr.py
py
2,084
python
en
code
3
github-code
18
[ { "api_name": "argparse.ArgumentParser", "line_number": 9, "usage_type": "call" }, { "api_name": "utils.util.get_logger", "line_number": 22, "usage_type": "call" }, { "api_name": "utils.util.read_config", "line_number": 28, "usage_type": "call" }, { "api_name": "n...
71426561960
import numpy as np # linear algebra import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv) import os print(os.listdir("../input")) import torch import torch.nn as nn import torch.nn.functional as F import numpy as np # check if CUDA is available train_on_gpu = torch.cuda.is_available() if n...
aorursy/new-nb-3
fabiendaniel_cnn-on-1jhn-2d-images.py
fabiendaniel_cnn-on-1jhn-2d-images.py
py
9,154
python
en
code
0
github-code
18
[ { "api_name": "os.listdir", "line_number": 7, "usage_type": "call" }, { "api_name": "torch.cuda.is_available", "line_number": 20, "usage_type": "call" }, { "api_name": "torch.cuda", "line_number": 20, "usage_type": "attribute" }, { "api_name": "torch.manual_seed",...
36762567854
from http import server from torch.utils import data from torchvision import transforms as T from torchvision.datasets import ImageFolder from PIL import Image import torch import os import random import numpy as np import cv2 import math import torchvision.transforms as transforms # for test IMG_EXTENSIONS = [ '...
TABLAB-HKUST/MulHiST
data_loader.py
data_loader.py
py
6,004
python
en
code
2
github-code
18
[ { "api_name": "os.path.isdir", "line_number": 26, "usage_type": "call" }, { "api_name": "os.path", "line_number": 26, "usage_type": "attribute" }, { "api_name": "os.walk", "line_number": 27, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": ...
74211854441
from django.contrib.auth.models import User from django.shortcuts import render,redirect from django.contrib import messages from django.contrib.auth import authenticate,login,logout from .models import * from .forms import CustomerForm,CreateUserForm from .filters import CustomerFilter def homepage(request): cusDa...
ciagit/ciagit
CRUD/crudEnv/src/CRUD/dashboard/views.py
views.py
py
2,656
python
en
code
0
github-code
18
[ { "api_name": "filters.CustomerFilter", "line_number": 10, "usage_type": "call" }, { "api_name": "django.shortcuts.render", "line_number": 13, "usage_type": "call" }, { "api_name": "django.shortcuts.render", "line_number": 17, "usage_type": "call" }, { "api_name":...
41148193213
import configparser from telethon import TelegramClient config = configparser.ConfigParser() config.read('config.ini') api_id = int(config['TELEGRAM']['api_id']) api_hash = config['TELEGRAM']['api_hash'] client = TelegramClient('account_telethon', api_id, api_hash) list_to_del = [] async def dry_run(): print(f'...
sonyxmee/tg-client
deleteChats.py
deleteChats.py
py
1,250
python
en
code
0
github-code
18
[ { "api_name": "configparser.ConfigParser", "line_number": 4, "usage_type": "call" }, { "api_name": "telethon.TelegramClient", "line_number": 8, "usage_type": "call" } ]
73573588519
from nltk.stem import WordNetLemmatizer from nltk.stem.porter import PorterStemmer import nltk from nltk.corpus import wordnet import os def get_wordnet_pos(treebank_tag): if treebank_tag.startswith('J'): return wordnet.ADJ elif treebank_tag.startswith('V'): return wordnet.VERB ...
zhaoxh16-ir-homework/homework-2
code/main.py
main.py
py
3,213
python
en
code
1
github-code
18
[ { "api_name": "nltk.corpus.wordnet.ADJ", "line_number": 10, "usage_type": "attribute" }, { "api_name": "nltk.corpus.wordnet", "line_number": 10, "usage_type": "name" }, { "api_name": "nltk.corpus.wordnet.VERB", "line_number": 12, "usage_type": "attribute" }, { "ap...
20024675078
from http.server import HTTPServer, SimpleHTTPRequestHandler, BaseHTTPRequestHandler import ssl from io import BytesIO class MyHttpRequestHandler(BaseHTTPRequestHandler): def do_GET(self): if self.path == "/": self.send_response(200) self.send_header("Content-type", "text/html") ...
mateuszkochanek/computer-security-course
lista4/phishing/server.py
server.py
py
1,711
python
en
code
0
github-code
18
[ { "api_name": "http.server.BaseHTTPRequestHandler", "line_number": 6, "usage_type": "name" }, { "api_name": "http.server.HTTPServer", "line_number": 30, "usage_type": "call" }, { "api_name": "ssl.SSLContext", "line_number": 32, "usage_type": "call" } ]
19531910121
import os import warnings import numpy as np import cv2 import matplotlib.pyplot as plt import itertools from sklearn.metrics import confusion_matrix from src.metrics import get_metrics import pickle import json from sklearn.metrics import classification_report from collections import defaultdict, Counter import pandas...
tungnkhust/Image-Classification-With-Bag-of-Visual-Model
src/utils.py
utils.py
py
9,442
python
en
code
2
github-code
18
[ { "api_name": "cv2.SIFT_create", "line_number": 25, "usage_type": "call" }, { "api_name": "cv2.ORB_create", "line_number": 27, "usage_type": "call" }, { "api_name": "sklearn.cluster.KMeans", "line_number": 42, "usage_type": "call" }, { "api_name": "sklearn.cluster...
43925400397
from datetime import datetime from sqlalchemy.orm import backref from models.db import db class Order(db.Model): __tablename__ = 'orders' id = db.Column(db.Integer, primary_key=True) user_id = db.Column(db.Integer, db.ForeignKey('users.id'), nullable=False) created_at = db.Column( db.DateTime,...
MistermindX/BetterBuy
models/order.py
order.py
py
1,364
python
en
code
0
github-code
18
[ { "api_name": "models.db.db.Model", "line_number": 6, "usage_type": "attribute" }, { "api_name": "models.db.db", "line_number": 6, "usage_type": "name" }, { "api_name": "models.db.db.Column", "line_number": 8, "usage_type": "call" }, { "api_name": "models.db.db", ...
24728333678
from utils import read_file from collections import defaultdict from itertools import product import re def parse_line(line): regex = ( r"Valve ([A-Z]{2}) has flow rate=(\d+); tunnel[s]? lead[s]? to valve[s]? (.+)" ) loc, rate, others = re.findall(regex, line)[0] return loc, int(rate), others....
neal-o-r/aoc22
aoc16.py
aoc16.py
py
2,165
python
en
code
0
github-code
18
[ { "api_name": "re.findall", "line_number": 11, "usage_type": "call" }, { "api_name": "collections.defaultdict", "line_number": 17, "usage_type": "call" }, { "api_name": "itertools.product", "line_number": 23, "usage_type": "call" }, { "api_name": "utils.read_file"...
16308924199
#!/usr/bin/env python from __future__ import print_function from setuptools import setup, find_packages from setuptools.command.test import test as TestCommand import io import os here = os.path.abspath(os.path.dirname(__file__)) def read_version(version_filepath): import re verstrline = open(version_filepa...
vergl4s/instarecon
setup.py
setup.py
py
1,647
python
en
code
188
github-code
18
[ { "api_name": "os.path.abspath", "line_number": 8, "usage_type": "call" }, { "api_name": "os.path", "line_number": 8, "usage_type": "attribute" }, { "api_name": "os.path.dirname", "line_number": 8, "usage_type": "call" }, { "api_name": "re.search", "line_numbe...
109754967
from collections import deque cardeck = deque() n = int(input()) for i in range(1,n+1): cardeck.append(i) while True: if len(cardeck) == 1: break cardeck.popleft() k = cardeck.popleft() cardeck.append(k) print(cardeck[0])
ta09472/algo
boj_2164.py
boj_2164.py
py
252
python
en
code
0
github-code
18
[ { "api_name": "collections.deque", "line_number": 2, "usage_type": "call" } ]
12478832266
import pandas as pd import numpy as np import random from sklearn import svm from PIL import Image # download present points of species present = pd.read_csv('data/present_points.csv') present = pd.DataFrame(present) present_array = np.array([present['latitude'],present['longitude']]) y_array = np.array(...
KhondamirRustamov/SDM-DL-ML-Tulipa-uz
preprocessing/pa_generating.py
pa_generating.py
py
5,061
python
en
code
0
github-code
18
[ { "api_name": "pandas.read_csv", "line_number": 9, "usage_type": "call" }, { "api_name": "pandas.DataFrame", "line_number": 10, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 11, "usage_type": "call" }, { "api_name": "numpy.array", "line_n...
10196652402
#!/usr/bin/env python import time import serial import random import binascii import pickle tty="/dev/ttyAMA0" baud=57600 config = [] config.append("sys reset") #change these to values given config.append("mac set devaddr 260114C8") config.append("mac set deveui 006117063BA98093") config.append("mac set appeui 70B3...
suitedlibrarian/piface
sample.py
sample.py
py
1,224
python
en
code
1
github-code
18
[ { "api_name": "time.sleep", "line_number": 32, "usage_type": "call" }, { "api_name": "serial.Serial", "line_number": 37, "usage_type": "call" }, { "api_name": "time.sleep", "line_number": 39, "usage_type": "call" }, { "api_name": "binascii.hexlify", "line_numb...
17437782874
import argparse import glob import os import cv2 import h5py import numpy as np import tqdm import math from functools import partial import matplotlib.pyplot as plt def readyuv420(filename, bitdepth, W, H, startframe, totalframe, show=False): # 从第startframe(含)开始读(0-based),共读totalframe帧 uv_H...
Chengyi-Zou/intra-chroma-attentionCNN-refinement
data/create_database_down.py
create_database_down.py
py
10,502
python
en
code
5
github-code
18
[ { "api_name": "numpy.zeros", "line_number": 23, "usage_type": "call" }, { "api_name": "numpy.uint8", "line_number": 23, "usage_type": "attribute" }, { "api_name": "numpy.zeros", "line_number": 24, "usage_type": "call" }, { "api_name": "numpy.uint8", "line_numb...
11880027671
import csv from io import StringIO from typing import Dict, Iterator, List, Tuple, Union DEFAULT_HASH_MAP_SIZE: int = 64 class HashMap: _size: int = None _map: List[List[Tuple[str, str]]] = None _length: int = None @property def size(self) -> int: return self._size def __init__(se...
Bylothink/hashmaps-webserver
src/hashmaps/models/hashmap.py
hashmap.py
py
4,589
python
en
code
1
github-code
18
[ { "api_name": "typing.List", "line_number": 12, "usage_type": "name" }, { "api_name": "typing.Tuple", "line_number": 12, "usage_type": "name" }, { "api_name": "typing.Union", "line_number": 30, "usage_type": "name" }, { "api_name": "typing.Iterator", "line_num...
73594832041
import array import itertools import numpy as np import math import threading from ola.ClientWrapper import ClientWrapper # globals for timing, script state storage TICK_INTERVAL = 33 # in ms - so display at approximately 30 fps TIME_ELAPSED = 0.0 # time in ms since we last displaed begclr # when...
aleden/squidlights
changers/Color Cycle 1.py
Color Cycle 1.py
py
2,205
python
en
code
0
github-code
18
[ { "api_name": "numpy.array", "line_number": 26, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 29, "usage_type": "call" }, { "api_name": "array.array", "line_number": 38, "usage_type": "call" }, { "api_name": "itertools.izip", "line_number...
74777071718
# -*- coding: utf-8 -*- """ Created on Thu Dec 6 02:42:08 2018 @author: AYSE """ #1.Kutuphaneler import numpy as np import matplotlib.pyplot as plt import pandas as pd from sklearn.metrics import r2_score # Veri yukleme veriler= pd.read_csv("maaslar.csv") #eğitimseviyes=x, maaslar=y olarak bölü...
kubraaysesosun/machine-learning
6/rassalagac.py
rassalagac.py
py
3,857
python
en
code
0
github-code
18
[ { "api_name": "pandas.read_csv", "line_number": 16, "usage_type": "call" }, { "api_name": "sklearn.linear_model.LinearRegression", "line_number": 29, "usage_type": "call" }, { "api_name": "sklearn.preprocessing.PolynomialFeatures", "line_number": 38, "usage_type": "call" ...
8713787291
# coding: utf-8 """ Perform inference with a CD UNet/UNet++ model for for Sentinel-2 datasets @Author: Tony Di Pilato Created on Wed Feb 19, 2020 """ import os import numpy as np from tensorflow import keras as K import cdUtils import cdModels from osgeo import gdal import argparse parser = argparse.ArgumentParse...
tonydp03/RemoteSensing_ChangeDetection
src/inference.py
inference.py
py
3,598
python
en
code
2
github-code
18
[ { "api_name": "argparse.ArgumentParser", "line_number": 20, "usage_type": "call" }, { "api_name": "tensorflow.keras.models.load_model", "line_number": 49, "usage_type": "call" }, { "api_name": "tensorflow.keras.models", "line_number": 49, "usage_type": "attribute" }, ...
3224476541
# coding: utf-8 import os.path from github import Github from DataModule import * from SmartThreshold import * logging.basicConfig() logger = logging.getLogger(__name__) logger.setLevel(logging.INFO) # Log等级总开关 rq = time.strftime('%Y%m%d%H%M', time.localtime(time.time())) log_path = os.path.dirname(os.path.realpath...
tain198127/GithubHawkEye
main.py
main.py
py
6,311
python
en
code
3
github-code
18
[ { "api_name": "os.path.path.dirname", "line_number": 13, "usage_type": "call" }, { "api_name": "os.path.path", "line_number": 13, "usage_type": "attribute" }, { "api_name": "os.path", "line_number": 13, "usage_type": "name" }, { "api_name": "os.path.path.realpath"...
31967807115
from typing import List import math from config import ModelParameters class Utilities: """This class contains utility functions that are used in the project.""" @staticmethod def get_output_sizes( res: int = ModelParameters.RESOLUTION, conv_kernel_size: int = ModelParameters.CONV_KERNEL...
Wyndegarde/Masters-Project
utils/utils.py
utils.py
py
3,858
python
en
code
0
github-code
18
[ { "api_name": "config.ModelParameters.RESOLUTION", "line_number": 12, "usage_type": "attribute" }, { "api_name": "config.ModelParameters", "line_number": 12, "usage_type": "name" }, { "api_name": "config.ModelParameters.CONV_KERNEL_SIZE", "line_number": 13, "usage_type": ...
73198669479
import torch import argparse from torch.utils.data import DataLoader from data_utils import ChoiceDataset from models import TasteNetChoice from train import train from evaluation import summarize, printSummary, predictTastes, RMSE, ABSE, RE, RMSE_vector, ABSE_vector, RE_vector from simulate import error_of_vot, error_...
deborahmit/TasteNet-MNL
synthetic/model_runs.py
model_runs.py
py
6,590
python
en
code
5
github-code
18
[ { "api_name": "models.TasteNetChoice", "line_number": 37, "usage_type": "call" }, { "api_name": "train.train", "line_number": 38, "usage_type": "call" }, { "api_name": "evaluation.summarize", "line_number": 50, "usage_type": "call" }, { "api_name": "evaluation.pri...
102860571
from django.urls import include, path from rest_framework.routers import SimpleRouter from .views import AuthViewset, UsersViewset app_name = 'api' router_v1 = SimpleRouter() router_v1.register('auth', AuthViewset, 'auth') router_v1.register('users', UsersViewset, 'users') urlpatterns = [ path('', include(route...
rosh-penin/hs-test-work
testapp/api/urls.py
urls.py
py
334
python
en
code
0
github-code
18
[ { "api_name": "rest_framework.routers.SimpleRouter", "line_number": 8, "usage_type": "call" }, { "api_name": "views.AuthViewset", "line_number": 9, "usage_type": "argument" }, { "api_name": "views.UsersViewset", "line_number": 10, "usage_type": "argument" }, { "ap...
717248590
import Preprocessing from sklearn.neighbors import KNeighborsClassifier from sklearn.metrics import accuracy_score #Train model with KNN X_train,X_test,y_train,y_test = Preprocessing.X_train,Preprocessing.X_test,Preprocessing.y_train,Preprocessing.y_test #Find k in range value def Knn(x,y,left,right): kn...
LTPhat/StrokePrediction
KNN.py
KNN.py
py
989
python
en
code
1
github-code
18
[ { "api_name": "Preprocessing.X_train", "line_number": 6, "usage_type": "attribute" }, { "api_name": "Preprocessing.X_test", "line_number": 6, "usage_type": "attribute" }, { "api_name": "Preprocessing.y_train", "line_number": 6, "usage_type": "attribute" }, { "api_...
32922151769
#!/usr/bin/env python3 # REQUIRES PYTHON >= 3.8 """ This is a partial solution for the doors with the tiles, located near where the bodies in barrels were found. This door leads to the tunnels below the manor house. The game is a rotational tile game. Tiles are grouped into sets of 4 around a central button. When th...
kamni/puzzle-solvers
enigmatis2/tunnel_doors.py
tunnel_doors.py
py
10,314
python
en
code
0
github-code
18
[ { "api_name": "typing.TypedDict", "line_number": 88, "usage_type": "name" }, { "api_name": "typing.List", "line_number": 93, "usage_type": "name" }, { "api_name": "typing.Dict", "line_number": 94, "usage_type": "name" }, { "api_name": "typing.Dict", "line_numb...
9364710726
"""This module will serve the api request.""" from config import client, ObjectId from app import app from bson.json_util import dumps from flask import request, jsonify, send_file, make_response import json import ast import imp import time import codecs # Import the helpers module helper_module = imp.load_source('...
cristid95/incident_reporting
app/usersData.py
usersData.py
py
7,278
python
en
code
0
github-code
18
[ { "api_name": "imp.load_source", "line_number": 15, "usage_type": "call" }, { "api_name": "config.client.incidents", "line_number": 18, "usage_type": "attribute" }, { "api_name": "config.client", "line_number": 18, "usage_type": "name" }, { "api_name": "flask.json...
17096623449
import torch import torch.nn as nn import torch.nn.functional as F import numpy as np from scipy.stats import truncnorm def get_truncated_noise(n_samples, z_dim, truncation): """Function for creating truncated noise vectors: Given dimensions (n_samples, z_dim) and truncation value, cretes a tensor of t...
JuanPabloArbelaez/StyleGanComponents
stylegan.py
stylegan.py
py
7,850
python
en
code
0
github-code
18
[ { "api_name": "scipy.stats.truncnorm.rvs", "line_number": 20, "usage_type": "call" }, { "api_name": "scipy.stats.truncnorm", "line_number": 20, "usage_type": "name" }, { "api_name": "torch.Tensor", "line_number": 21, "usage_type": "call" }, { "api_name": "torch.nn...
35004561463
import requests from bs4 import BeautifulSoup import json import re import collections HOST = "https://www.cfcunderwriting.com" def get_privacy_policy_location(all_urls): for _, url in enumerate(all_urls): if "privacy-policy" in url: return url def get_external_resources(all_urls): extern...
marwiz108/cfc-scraper
scraper.py
scraper.py
py
1,948
python
en
code
1
github-code
18
[ { "api_name": "json.dump", "line_number": 33, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 37, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_number": 38, "usage_type": "call" }, { "api_name": "re.sub", "line_number": ...
3849869092
from maya import cmds from ngSkinTools import selectionState from ngSkinTools.doclink import SkinToolsDocs from ngSkinTools.influenceMapping import InfluenceMapping from ngSkinTools.log import getLogger from ngSkinTools.mllInterface import MllInterface from ngSkinTools.ui.basetab import CommandLayout from ngSkinTools.u...
DangoWang/OCTToolkits
DCC_TOOLS/RIG/ngskintools/ui/editMirrorInfluencesWindow.py
editMirrorInfluencesWindow.py
py
3,969
python
en
code
1
github-code
18
[ { "api_name": "ngSkinTools.log.getLogger", "line_number": 14, "usage_type": "call" }, { "api_name": "ngSkinTools.ui.basetoolwindow.BaseToolWindow", "line_number": 16, "usage_type": "name" }, { "api_name": "ngSkinTools.ui.basetoolwindow.BaseToolWindow.__init__", "line_number":...
73890036841
"""inventario URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.2/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-ba...
SamirDiegoChavezCaceres/BD_TIENDA
inventario/urls.py
urls.py
py
6,290
python
en
code
0
github-code
18
[ { "api_name": "django.urls.path", "line_number": 38, "usage_type": "call" }, { "api_name": "menuAndWelcome.views.inicioView", "line_number": 38, "usage_type": "argument" }, { "api_name": "django.urls.path", "line_number": 39, "usage_type": "call" }, { "api_name": ...
30666637969
from django.db import models, transaction from django.conf import settings from management.models import Organization from alerts.models import Channel, AlertStats from django.core.signing import TimestampSigner from django.shortcuts import get_object_or_404, reverse from django.template.loader import render_to_string ...
news-catalyst/openalerts
openalerts/subscriptions/models/subscription.py
subscription.py
py
5,853
python
en
code
3
github-code
18
[ { "api_name": "django.db.models.Model", "line_number": 49, "usage_type": "attribute" }, { "api_name": "django.db.models", "line_number": 49, "usage_type": "name" }, { "api_name": "django.db.models.EmailField", "line_number": 50, "usage_type": "call" }, { "api_name...
29263950749
#!/usr/bin/env python import numpy as np # Dataset n_samples, n_features = 100, 2 mean0, mean1 = np.array([0, 0]), np.array([0, 2]) Cov = np.array([[1, .8],[.8, 1]]) np.random.seed(42) X0 = np.random.multivariate_normal(mean0, Cov, n_samples) X1 = np.random.multivariate_normal(mean1, Cov, n_samples) X = np.vstack([X0,...
sednabcn/Python-ML-Algorithms
SVM/svmlinear.py
svmlinear.py
py
1,758
python
en
code
0
github-code
18
[ { "api_name": "numpy.array", "line_number": 6, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 7, "usage_type": "call" }, { "api_name": "numpy.random.seed", "line_number": 8, "usage_type": "call" }, { "api_name": "numpy.random", "line_numbe...
27000614513
# Advent of Code 2022 Day 02 # Author: Erik Båvenstrand # URL: https://adventofcode.com/2022/day/2 from typing import Union def part_a(data: list[str]) -> Union[int, str, None]: """Solution to part A. Args: data (list[str]): Advent of Code challenge input. Returns: Union[int, str, None]...
ErikBavenstrand/Advent-of-Code
2022/02/code.py
code.py
py
1,292
python
en
code
0
github-code
18
[ { "api_name": "typing.Union", "line_number": 8, "usage_type": "name" }, { "api_name": "typing.Union", "line_number": 30, "usage_type": "name" } ]
29278414885
#! coding=utf8 from scipy.stats import linregress import numpy as np import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import glob import sys import sys sys.path.insert(0,'/home/dominik.zuercher/Documents/RSP_Pro/toolbox') import tools def lin_func(x, coeff): return np.add(np.multiply(x, coe...
DZuercher/Splashback
depth_analysis/single_cell_analysis.py
single_cell_analysis.py
py
3,952
python
en
code
1
github-code
18
[ { "api_name": "matplotlib.use", "line_number": 5, "usage_type": "call" }, { "api_name": "sys.path.insert", "line_number": 10, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 10, "usage_type": "attribute" }, { "api_name": "numpy.add", "line_num...
35136756141
import math from typing import List from collections import deque class Solution: def removeKdigits(self, num: str, k: int) -> str: if k >= len(num): return "0" stack = deque() removed_counter = 0 for digit in num: # import pdb; pdb.set_trace() ...
gtcooke94/snippets
leetcode/may2020/13/soln.py
soln.py
py
1,625
python
en
code
0
github-code
18
[ { "api_name": "collections.deque", "line_number": 10, "usage_type": "call" } ]
15925289926
# -*- coding:utf-8 -*- from __future__ import division from __future__ import absolute_import from __future__ import print_function import os import time import torch import argparse import numpy as np from torch.autograd import Variable import cv2 from data.config import cfg from PIL import Image from...
k914/contrastive-alternative-learning
code/test_en.py
test_en.py
py
3,231
python
en
code
4
github-code
18
[ { "api_name": "argparse.ArgumentParser", "line_number": 19, "usage_type": "call" }, { "api_name": "os.path.exists", "line_number": 25, "usage_type": "call" }, { "api_name": "os.path", "line_number": 25, "usage_type": "attribute" }, { "api_name": "os.makedirs", ...
10931840158
#!/usr/bin/env python3 from __future__ import annotations import argparse import os from datetime import date from pathlib import Path from typing import Sequence import requests from dotenv import load_dotenv load_dotenv() def download_input(year: str, day: int): session_token = os.getenv("session") if s...
falkben/advent-of-code
create_day.py
create_day.py
py
1,591
python
en
code
0
github-code
18
[ { "api_name": "dotenv.load_dotenv", "line_number": 14, "usage_type": "call" }, { "api_name": "os.getenv", "line_number": 18, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 21, "usage_type": "call" }, { "api_name": "typing.Sequence", "line...
10998791652
"""Functions for creating HIT qualification requirements""" import pandas as pd import boto3 import logging logger = logging.getLogger(__name__) logging.basicConfig(level=logging.INFO) MTURK_QUAL_TYPE_IDS = { 'NumberHITsApproved' : '00000000000000000040', 'PercentAssignmentsApproved' : '000000000000000000L0'...
tomerwolgithub/Break
annotation_pipeline/mturk_backend/qualifications.py
qualifications.py
py
5,701
python
en
code
43
github-code
18
[ { "api_name": "logging.getLogger", "line_number": 7, "usage_type": "call" }, { "api_name": "logging.basicConfig", "line_number": 8, "usage_type": "call" }, { "api_name": "logging.INFO", "line_number": 8, "usage_type": "attribute" } ]
6986713136
import requests from bs4 import BeautifulSoup def current_ce_stock(ce_id): stock = [] url = "[your-url]" try: response = requests.get(url) #here we have the html data, we need to grab the custom data using Beautiful soup lib. soup = BeautifulSoup(response.tex...
EmiHaag/stock-control
ce_stock.py
ce_stock.py
py
1,361
python
en
code
0
github-code
18
[ { "api_name": "requests.get", "line_number": 10, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_number": 14, "usage_type": "call" }, { "api_name": "requests.exceptions", "line_number": 34, "usage_type": "attribute" } ]
35081670318
# -*- coding: utf-8 -*- """ Created on Wed Jun 30 14:53:43 2021 """ import argparse import os import pickle import torch from torch.utils.data import DataLoader from tqdm import tqdm from transformers import AutoModelForMaskedLM from transformers import BertTokenizer from transformers import DataCollatorForWholeWord...
zeno17/LessIsMore
run_measure_loss.py
run_measure_loss.py
py
4,419
python
en
code
0
github-code
18
[ { "api_name": "torch.cuda.is_available", "line_number": 24, "usage_type": "call" }, { "api_name": "torch.cuda", "line_number": 24, "usage_type": "attribute" }, { "api_name": "torch.device", "line_number": 24, "usage_type": "call" }, { "api_name": "tqdm.tqdm", ...
13799019700
import tkinter as tk import cx_Oracle from tkinter import Menu from tkinter import PhotoImage from tkinter import Entry from tkinter import Button from tkinter import Label class Interface: def __init__(self, root): self.connection = cx_Oracle.connect('rm89162/280400@oracle.fiap.com.br:1521/orcl') ...
MuriloNogr/Sprint4-CTT
App.py
App.py
py
4,261
python
en
code
0
github-code
18
[ { "api_name": "cx_Oracle.connect", "line_number": 11, "usage_type": "call" }, { "api_name": "tkinter.Text", "line_number": 17, "usage_type": "call" }, { "api_name": "tkinter.Button", "line_number": 20, "usage_type": "call" }, { "api_name": "tkinter.Label", "li...
75172462120
# # Imports # from my_vay import app, db # General imports for Flask from flask import render_template, abort, url_for, redirect, flash, request, session, Response # Imports for forms from my_vay.forms import AddSideeffects, ImpfnachweisForm, PatientLoginForm, AddVaccination, PatientRegistrationForm, IssuerRegistra...
ValentinFFM/my.vay
my_vay/routes.py
routes.py
py
34,182
python
en
code
0
github-code
18
[ { "api_name": "pyzbar.pyzbar.decode", "line_number": 40, "usage_type": "call" }, { "api_name": "pyzbar.pyzbar", "line_number": 40, "usage_type": "name" }, { "api_name": "ast.literal_eval", "line_number": 51, "usage_type": "call" }, { "api_name": "cv2.VideoCapture"...
73811790120
import logging import socket from toil.lib.ec2nodes import updateStaticEC2Instances logger = logging.getLogger(__name__) def internet_connection() -> bool: """Returns True if there is an internet connection present, and False otherwise.""" try: socket.create_connection(("www.stackoverflow.com", 80))...
DataBiosphere/toil
src/toil/utils/toilUpdateEC2Instances.py
toilUpdateEC2Instances.py
py
603
python
en
code
856
github-code
18
[ { "api_name": "logging.getLogger", "line_number": 6, "usage_type": "call" }, { "api_name": "socket.create_connection", "line_number": 12, "usage_type": "call" }, { "api_name": "toil.lib.ec2nodes.updateStaticEC2Instances", "line_number": 21, "usage_type": "call" } ]
71870058280
from geopy.geocoders import Nominatim import requests import pandas as pd locationGeo = input("Digite sua Cidade<Ex. Fortaleza-CE> : ") geolocator = Nominatim(user_agent="geoCoders") location = geolocator.geocode(locationGeo) lat = location.latitude lon = location.longitude API_key = 'f4b18aed5a17c8d04bedd4d6d985006...
WilliamRodri/climate_and_weather
main.py
main.py
py
1,350
python
en
code
0
github-code
18
[ { "api_name": "geopy.geocoders.Nominatim", "line_number": 7, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 18, "usage_type": "call" }, { "api_name": "requests.json", "line_number": 21, "usage_type": "call" }, { "api_name": "pandas.DataFrame"...
24218374411
"""discourz URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.1/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-base...
khuranadhruv18/discourz
src/discourz_app/urls.py
urls.py
py
1,991
python
en
code
0
github-code
18
[ { "api_name": "django.urls.path", "line_number": 25, "usage_type": "call" }, { "api_name": "discourz_app.views.index", "line_number": 25, "usage_type": "attribute" }, { "api_name": "discourz_app.views", "line_number": 25, "usage_type": "name" }, { "api_name": "dja...
35098549989
# -*- coding: utf-8 -*- """ Created on Wed Jun 2 15:57:01 2021 @author: floor """ import pandas as pd import numpy as np import csv import matplotlib.pyplot as plt import pylab import statistics import math #STEP III: #compare our fitness values to cellmap data #get data from step II and put it in a dataframe datafr...
SATAY-LL/SATAY-DOWNSTREAM-ANALYSIS
src/copareWT1_WT2.py
copareWT1_WT2.py
py
5,917
python
en
code
0
github-code
18
[ { "api_name": "pandas.read_csv", "line_number": 18, "usage_type": "call" }, { "api_name": "csv.reader", "line_number": 37, "usage_type": "call" }, { "api_name": "csv.QUOTE_NONNUMERIC", "line_number": 37, "usage_type": "attribute" }, { "api_name": "csv.reader", ...
74643216680
import unittest from common.simulator import Configuration from common.player import Player class ConfigurationTest(unittest.TestCase): def test_slots(self): """ test we can make a config and add slots """ slots = ['QB', 'RB1', 'RB2', 'WR1', 'WR2', 'TE', 'FLEX', 'K', 'D'] config = Configuration(slots, ...
haydenth/genetic_football
tests/ConfigurationTest.py
ConfigurationTest.py
py
1,349
python
en
code
0
github-code
18
[ { "api_name": "unittest.TestCase", "line_number": 6, "usage_type": "attribute" }, { "api_name": "common.simulator.Configuration", "line_number": 11, "usage_type": "call" }, { "api_name": "common.simulator.Configuration", "line_number": 17, "usage_type": "call" }, { ...
22575967918
#coding: utf-8 import zmq from locust import HttpLocust, TaskSet, task from httprunner import LocustRunner import os class WebPageTasks(TaskSet): def on_start(self): self.test_runner = LocustRunner(self.client) self.file_path = self.locust.file_path @task def test_specified_scenario(self):...
JoyMobileDevelopmentTeam/Joy_QA_Platform
Joy_QA_Platform/slave/QAPlatform/locustfile.py
locustfile.py
py
565
python
en
code
113
github-code
18
[ { "api_name": "locust.TaskSet", "line_number": 7, "usage_type": "name" }, { "api_name": "httprunner.LocustRunner", "line_number": 9, "usage_type": "call" }, { "api_name": "locust.task", "line_number": 12, "usage_type": "name" }, { "api_name": "locust.HttpLocust", ...
29874018712
from collections import deque ''' 첫 항목을 마지막으로 이동시키는 작업이 필요함으로 deque 사용 ''' def solution(priorities, location): answer = 0 q = deque(priorities) # 최초 순서를 기준으로 출력 순서 확인을 위한 check 배열 정의 check = deque(list(range(len(priorities)))) while q: # 우선순위가 가장 높은 문서와 현재 문서가 일치하는 경우 출력 실행 if q[0]...
essk13/Algorithm
01_problem/python/2022/Programmers/Programmers_42587/42587_Programmers.py
42587_Programmers.py
py
856
python
ko
code
0
github-code
18
[ { "api_name": "collections.deque", "line_number": 9, "usage_type": "call" }, { "api_name": "collections.deque", "line_number": 11, "usage_type": "call" } ]
74329935719
#Juston ELlis #Case Study 3 #Movie html parser import requests from bs4 import BeautifulSoup import matplotlib.pyplot as plt import csv # GET request to the website url = "https://www.timeout.com/film/best-movies-of-all-time" response = requests.get(url).text # bsoup parses the html for elements soup = BeautifulSou...
justonslc/MachineLearning
venv/CaseStudy3.py
CaseStudy3.py
py
2,017
python
en
code
0
github-code
18
[ { "api_name": "requests.get", "line_number": 12, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_number": 15, "usage_type": "call" }, { "api_name": "csv.writer", "line_number": 44, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.bar", ...
31427824416
#!/usr/bin/env python # -*- coding: utf-8 -*- import wx_version import wx class MainBar(wx.ScrolledWindow): def __init__(self, parent, plot): #wx.Panel.__init__(self, parent, style=wx.HSCROLL) wx.ScrolledWindow.__init__(self, parent) self.SetScrollRate(1,0) self.myparent...
victorsndvg/opennum
code/v_vtk/MainBar.py
MainBar.py
py
901
python
en
code
2
github-code
18
[ { "api_name": "wx.ScrolledWindow", "line_number": 11, "usage_type": "attribute" }, { "api_name": "wx.ScrolledWindow.__init__", "line_number": 16, "usage_type": "call" }, { "api_name": "wx.ScrolledWindow", "line_number": 16, "usage_type": "attribute" }, { "api_name...
21158736038
from logging import getLogger import torch from libcity.model.abstract_traffic_state_model import AbstractTrafficStateModel import torch.nn as nn import torch.nn.functional as F from torch.nn import BatchNorm2d, Conv2d, Parameter, BatchNorm1d from libcity.model import loss import numpy as np import scipy.sparse as sp f...
LibCity/Bigscity-LibCity
libcity/model/traffic_speed_prediction/HGCN.py
HGCN.py
py
16,833
python
en
code
644
github-code
18
[ { "api_name": "scipy.sparse.coo_matrix", "line_number": 15, "usage_type": "call" }, { "api_name": "scipy.sparse", "line_number": 15, "usage_type": "name" }, { "api_name": "numpy.array", "line_number": 16, "usage_type": "call" }, { "api_name": "numpy.power", "l...
43861730708
# encoding: utf-8 """Criação de arquivos.""" import sys import os import os.path import yaml import optparse import models parser = optparse.OptionParser(usage="%prog -[ [s] --[save] ]", version="%prog 1.0") # # -p, --stdout # parser.add_option( '-p', '--stdout', dest = "stdout", default = False,...
lopesivan/template-code
w-ezored-linux/w/v/app.py
app.py
py
4,096
python
en
code
0
github-code
18
[ { "api_name": "optparse.OptionParser", "line_number": 12, "usage_type": "call" }, { "api_name": "os.path.isfile", "line_number": 49, "usage_type": "call" }, { "api_name": "os.path", "line_number": 49, "usage_type": "attribute" }, { "api_name": "os.access", "li...
29135043333
import os import sys import argparse def gotox(offset, time): os.system("gotox -d " + str(offset) + " -t " + str(time) + " && gotox -d " + str(offset) + " -t " + str(time)) parser = argparse.ArgumentParser(description='Searches for satellites.') parser.add_argument("satellite") parser.add_argument("-s", "--start", h...
peckrob/satsearch
satsearch.py
satsearch.py
py
1,108
python
en
code
0
github-code
18
[ { "api_name": "os.system", "line_number": 6, "usage_type": "call" }, { "api_name": "argparse.ArgumentParser", "line_number": 8, "usage_type": "call" }, { "api_name": "os.system", "line_number": 26, "usage_type": "call" }, { "api_name": "sys.exit", "line_number...
13112079860
import cartopy import cartopy.crs as ccrs import matplotlib import pandas def plot_patches(ax,obs,**kwargs): """Plot observations as points. Args: ax (:obj:`cartopy.mpl.geoaxes.GeoAxes`): Axes on which to draw. obs (:obj:`pandas.DataFrame`): Data frame containing obs positions. Keyword Ar...
philip-brohan/Meteorographica
Meteorographica/observations/plot.py
plot.py
py
3,762
python
en
code
5
github-code
18
[ { "api_name": "cartopy.crs.PlateCarree", "line_number": 29, "usage_type": "call" }, { "api_name": "cartopy.crs", "line_number": 29, "usage_type": "name" }, { "api_name": "matplotlib.patches.Circle", "line_number": 48, "usage_type": "call" }, { "api_name": "matplot...
69796825641
#-*- coding: UTF-8 -*- import os import json import time from core.keyboardinterceptor import KeyboardInterceptor from queue import Queue from core.keyhandler import KeyHandler DEFAULT_CONFIG = { "buffCoef1": 0.3, "buffCoef2": 0.6, "buffCoef3": 4.0, "buffCoef4": 8.0, "buffCoef5": 12.0, "shiftBu...
firemakergk/vimouse
src/controller/appcontroller.py
appcontroller.py
py
2,004
python
en
code
55
github-code
18
[ { "api_name": "queue.Queue", "line_number": 30, "usage_type": "call" }, { "api_name": "core.keyboardinterceptor.KeyboardInterceptor", "line_number": 31, "usage_type": "call" }, { "api_name": "core.keyhandler.KeyHandler", "line_number": 33, "usage_type": "call" }, { ...
36985176184
import re from collections import OrderedDict import math class Army(list): armies = [] def __init__(self, name): super().__init__() self.name = name self.__class__.armies.append(self) @property def units(self): return sum([g.units for g in self]) def append(self...
blitzmann/adventofcode
2018/day24/solve.py
solve.py
py
7,094
python
en
code
0
github-code
18
[ { "api_name": "re.match", "line_number": 36, "usage_type": "call" }, { "api_name": "math.ceil", "line_number": 95, "usage_type": "call" }, { "api_name": "collections.OrderedDict", "line_number": 124, "usage_type": "call" } ]
22494444875
import _io from io import BytesIO import numpy as np import streamlit as st import plyfile as ply from numpy.lib import recfunctions as rfn def parse_npz(byte_obj: _io.BytesIO) -> np.ndarray: """ Parse point cloud saved as a compressed numpy array. :param byte_obj: input object to be parsed. :type b...
jkarolczak/ligand-classification
src/deploy/parsing.py
parsing.py
py
4,267
python
en
code
2
github-code
18
[ { "api_name": "_io.BytesIO", "line_number": 10, "usage_type": "attribute" }, { "api_name": "numpy.load", "line_number": 19, "usage_type": "call" }, { "api_name": "numpy.ndarray", "line_number": 10, "usage_type": "attribute" }, { "api_name": "_io.BytesIO", "lin...
34854023611
from pathlib import Path from typing import Dict, Iterable, List, Optional from playhouse.sqlite_ext import SqliteExtDatabase import json import click from ainar.database import proxy from ainar.database.coco import Annotation, Category, Image from ainar.datasets.coco import Coco, load_dataset from ainar.filters impo...
xaiinc/ainar
ainar/__main__.py
__main__.py
py
2,801
python
en
code
0
github-code
18
[ { "api_name": "playhouse.sqlite_ext.SqliteExtDatabase", "line_number": 28, "usage_type": "call" }, { "api_name": "ainar.database.proxy.initialize", "line_number": 29, "usage_type": "call" }, { "api_name": "ainar.database.proxy", "line_number": 29, "usage_type": "name" }...
36933329222
import bpy from bpy.props import BoolProperty, IntProperty #法線をアクティブにする、既にチェック済み場合は無視。 def oSm(b): for o in bpy.context.selected_objects: if o.type == 'MESH': bpy.ops.object.shade_smooth() if o.data.use_auto_smooth == False: o.data.use_auto_smooth = True ...
land-Y/SItoB
si_Subdiv.py
si_Subdiv.py
py
5,251
python
ja
code
7
github-code
18
[ { "api_name": "bpy.context", "line_number": 6, "usage_type": "attribute" }, { "api_name": "bpy.ops.object.shade_smooth", "line_number": 8, "usage_type": "call" }, { "api_name": "bpy.ops", "line_number": 8, "usage_type": "attribute" }, { "api_name": "bpy.context", ...
38323077203
import requests,bs4 from twilio.rest import Client accountSID='**********************************' #I have obtained the accountsid,authtoken and twilio no but will not be showing as it can be misused authToken='********************************' twilioCli=Client(accountSID,authToken) mytwiliono='************' ...
akshaya9999/pythonautomate
Chapter18/umbrellaremaider.py
umbrellaremaider.py
py
971
python
en
code
0
github-code
18
[ { "api_name": "twilio.rest.Client", "line_number": 7, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 10, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_number": 12, "usage_type": "call" } ]
7629878684
import requests from bs4 import BeautifulSoup import re import sys sys.path.append('/home/nandagopal/eagle') from data_collection.config import * f_ratios_list = list(open(f_ratios_file, 'r').readlines()) def find_data_for_all_stock(sector=None): """ method to be called from airflow loops through all ur...
NandaCj/eagle
data_collection/get_f_ratios.py
get_f_ratios.py
py
1,791
python
en
code
0
github-code
18
[ { "api_name": "sys.path.append", "line_number": 5, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 5, "usage_type": "attribute" }, { "api_name": "requests.get", "line_number": 40, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "lin...
41948210145
import itertools amt = int(input().rstrip()) for i in range(amt): line = input().rstrip().split(" ") ooga = list(line[1]) ooga.sort() all_perms = list(itertools.permutations(ooga)) #print(all_perms) print("{} {}".format(''.join(all_perms[ int(line[0]) ]) , ''.join(all_perms[len(all_perms)-int(line[0]) -1 ]))) #...
Nate8888/programming-contest-practice
programming-team/First Semester/Sixth/permpairs.py
permpairs.py
py
343
python
en
code
0
github-code
18
[ { "api_name": "itertools.permutations", "line_number": 8, "usage_type": "call" } ]
12763348350
import collections #FUNCTIONS THAT INVOLVE BUILDING AND MODIFYING BASIC GRAPHS #takes an int specifying the number of vertices or an iterable containing the vertex names, and #a list of the edges [(0, 1), (1, 2), (0, 2), (2, 4, 1)] (the third parameter, if given, is the order of a directed edge) #with that, it clears...
youkaicountry/YoukaiTools
src/YoukaiTools/GraphEngine/GraphTools/Builders.py
Builders.py
py
4,302
python
en
code
3
github-code
18
[ { "api_name": "collections.Iterable", "line_number": 18, "usage_type": "attribute" }, { "api_name": "collections.Iterable", "line_number": 62, "usage_type": "attribute" } ]
2832379286
""" Plot helpers """ import matplotlib.pyplot as plt import numpy as np __all__ = ['plot_pressure', 'plot_filltime', 'show_flowfront', 'show_kmaps'] def plot_pressure(pr, showlegend=True): """ Plot pressure for all the rows Parameters ---------- pr : np.ndarray Pressure values sho...
fcayci/flowfront
flowfront/common/plots.py
plots.py
py
2,783
python
en
code
0
github-code
18
[ { "api_name": "matplotlib.pyplot.plot", "line_number": 29, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 29, "usage_type": "name" }, { "api_name": "numpy.transpose", "line_number": 29, "usage_type": "call" }, { "api_name": "matplotlib.p...
74496852200
import requests def getHTMLText(url,kv): try: hd = {'user_agent':'Mozilla/5.0'} r = requests.get(url,headers = hd,params = kv) r.raise_for_status() #如果不是200,引发HTTPError异常 r.encoding = r.apparent_encoding return r.text except: return "异常" if __name__ == "__main__"...
yqzs/Python-Crawler-and-Information-Extraction
第1单元/2实例3:百度360搜索关键词提交.py
2实例3:百度360搜索关键词提交.py
py
659
python
en
code
0
github-code
18
[ { "api_name": "requests.get", "line_number": 5, "usage_type": "call" } ]
40114119625
from django.urls import path from .views import ( SiteSettingsView, PageListView, PageDetailView, NewsListView, NewsByCategoryListView, NewsByDateListView, NewsDetailView, ContactDetailsView, ContactDetailsMessageView, ) urlpatterns = [ path("site-settings/", Sit...
sebherrerabe/doctor_website
dev/api/urls.py
urls.py
py
1,002
python
en
code
1
github-code
18
[ { "api_name": "django.urls.path", "line_number": 16, "usage_type": "call" }, { "api_name": "views.SiteSettingsView.as_view", "line_number": 16, "usage_type": "call" }, { "api_name": "views.SiteSettingsView", "line_number": 16, "usage_type": "name" }, { "api_name":...
73032597479
import random import logging import time import argparse import ConfigParser from datetime import datetime parser = argparse.ArgumentParser(description='Random Log Generator.') parser.add_argument('-i', '--iterations', type=int, help='Number of iterations', required=True) parser.add_argument('-f', '--framework', type...
balajiommudali1/logGenerator
generator.py
generator.py
py
914
python
en
code
0
github-code
18
[ { "api_name": "argparse.ArgumentParser", "line_number": 8, "usage_type": "call" }, { "api_name": "ConfigParser.ConfigParser", "line_number": 14, "usage_type": "call" }, { "api_name": "logging.basicConfig", "line_number": 18, "usage_type": "call" }, { "api_name": "...
7058823966
"""Creates an interactive website displaying characteristics of electric vehicles""" # Import Libraries import pandas as pd import numpy as np import streamlit as st import plotly_express as px import plotly.figure_factory as ff ## READ AND CLEAN DATA # Set Application Name st.set_page_config(page_title='Electric Ve...
kellyshreeve/web-app-of-electric-vehicle-data-visualizations
app.py
app.py
py
8,139
python
en
code
0
github-code
18
[ { "api_name": "streamlit.set_page_config", "line_number": 12, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 16, "usage_type": "call" }, { "api_name": "numpy.NaN", "line_number": 38, "usage_type": "attribute" }, { "api_name": "pandas.to_nu...
74279708519
import os from pyglet.gl import * from .player import Player from .platform import Platform class mainMenu(): def __init__(self, main_window): self.main_window = main_window self.main_batch = pyglet.graphics.Batch() depressed = pyglet.image.load(f'{os.getcwd()}/resources/play_game_button.png') pressed = pyg...
Hacking-With-Friends/GE_Jam_3
dualdo/lib/scenes.py
scenes.py
py
1,100
python
en
code
0
github-code
18
[ { "api_name": "pyglet.gl.graphics.Batch", "line_number": 11, "usage_type": "call" }, { "api_name": "pyglet.gl.graphics", "line_number": 11, "usage_type": "attribute" }, { "api_name": "pyglet.gl", "line_number": 11, "usage_type": "name" }, { "api_name": "pyglet.gl....
11232711450
import gi gi.require_version('Gtk', '3.0') from gi.repository import Gtk from matplotlib.figure import Figure from matplotlib.backends.backend_gtk3cairo import FigureCanvasGTK3Cairo as FigureGTKCanvas from matplotlib.backends.backend_gtk3 import NavigationToolbar2GTK3 as NavigationToolbar from matplotlib.patches import...
gravures/gravure
src/gravure/tools/ui/mpl_widgets.py
mpl_widgets.py
py
3,724
python
en
code
0
github-code
18
[ { "api_name": "gi.require_version", "line_number": 2, "usage_type": "call" }, { "api_name": "gi.repository.Gtk.Window", "line_number": 12, "usage_type": "attribute" }, { "api_name": "gi.repository.Gtk", "line_number": 12, "usage_type": "name" }, { "api_name": "gi....
74059551721
import torch.nn as nn import torch.nn.functional as F import torch class DEQCpResidualBlockAdjacentBlock(nn.Module): def __init__(self, dilations, in_channels, out_channels, kernel_size, block_id): super(DEQCpResidualBlockAdjacentBlock, self).__init__() self.kernel_size = kernel_size self....
dsamourkasidis/UoG_MScProject2020
deq_modules/deq_residual_block.py
deq_residual_block.py
py
2,825
python
en
code
2
github-code
18
[ { "api_name": "torch.nn.Module", "line_number": 6, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 6, "usage_type": "name" }, { "api_name": "torch.nn.Conv2d", "line_number": 14, "usage_type": "call" }, { "api_name": "torch.nn", "line_numb...
30722581731
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # test-train-shakeel/format_data.py # # format time series data for training # import os import re import pandas as pd import datetime as dt import pandas as pd import numpy as np import scipy #import matlab.engine from sklearn.preprocessing import minmax_scale #linux...
slp600kun/Multivariate
training/preprocess_data.py
preprocess_data.py
py
11,928
python
en
code
0
github-code
18
[ { "api_name": "re.split", "line_number": 61, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 68, "usage_type": "call" }, { "api_name": "datetime.timedelta", "line_number": 72, "usage_type": "call" }, { "api_name": "re.split", "line_nu...
71991337641
import json import unittest from graph import Graph class GraphTests(unittest.TestCase): def setUp(self): # create graph from JSON file self.g = Graph('model/data/data.json') # read JSON file into Python dictionary with open('model/data/data.json') as f: self.json_data = json.load(f) # test that Graph c...
lstrait2/Wikipedia-Scraper
model/graph/test_graph.py
test_graph.py
py
7,879
python
en
code
0
github-code
18
[ { "api_name": "unittest.TestCase", "line_number": 5, "usage_type": "attribute" }, { "api_name": "graph.Graph", "line_number": 9, "usage_type": "call" }, { "api_name": "json.load", "line_number": 12, "usage_type": "call" }, { "api_name": "unittest.main", "line_...
71426778600
import pandas as pd import numpy as np import os import sys import random import torch import matplotlib.pyplot as plt from pathlib import Path import math import plotly import plotly_express as px import seaborn as sns import itertools from functools import partial import tqdm.notebook as tqdm from scip...
aorursy/new-nb-3
gautham11_quantile-regression-pytorch-lightning-training.py
gautham11_quantile-regression-pytorch-lightning-training.py
py
39,625
python
en
code
0
github-code
18
[ { "api_name": "warnings.filterwarnings", "line_number": 58, "usage_type": "call" }, { "api_name": "sys.path.append", "line_number": 69, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 69, "usage_type": "attribute" }, { "api_name": "skimage.segment...
70982900201
#!/usr/bin/env python __author__ = 'Sergei F. Kliver' import bz2 import gzip import sys import argparse from pandas import read_csv if sys.version_info[0] == 3: from io import TextIOWrapper as file def metaopen(filename, flags, buffering=None): if not isinstance(filename, str): # or isinstance(filename, g...
mahajrod/AVAVpipe
workflow/scripts/fai2intervals.py
fai2intervals.py
py
1,771
python
en
code
1
github-code
18
[ { "api_name": "sys.version_info", "line_number": 11, "usage_type": "attribute" }, { "api_name": "io.TextIOWrapper", "line_number": 17, "usage_type": "argument" }, { "api_name": "gzip.open", "line_number": 22, "usage_type": "call" }, { "api_name": "bz2.open", "...
30867618629
from django.urls import path, include from django.contrib import admin from main import views from django.contrib.auth.views import LogoutView,LoginView urlpatterns = [ path('admin/', admin.site.urls), path('partner/', include('partner.urls')), path('user/', include('user.urls')), path('',...
Wander-web/podberunchick
podberun/urls.py
urls.py
py
2,073
python
en
code
0
github-code
18
[ { "api_name": "django.urls.path", "line_number": 8, "usage_type": "call" }, { "api_name": "django.contrib.admin.site", "line_number": 8, "usage_type": "attribute" }, { "api_name": "django.contrib.admin", "line_number": 8, "usage_type": "name" }, { "api_name": "dja...
5504668490
import os from iplstats.models import Match, Delivery from django.core.management.base import BaseCommand class Command(BaseCommand): def handle(self, *args, **kwargs): basedir = os.path.abspath(os.path.dirname('matches.csv')) matches_csv = os.path.join(basedir, 'matches.csv') deliveries...
sreebhargava143/djangoipl
iplstats/management/commands/importcsv.py
importcsv.py
py
720
python
en
code
0
github-code
18
[ { "api_name": "django.core.management.base.BaseCommand", "line_number": 7, "usage_type": "name" }, { "api_name": "os.path.abspath", "line_number": 10, "usage_type": "call" }, { "api_name": "os.path", "line_number": 10, "usage_type": "attribute" }, { "api_name": "o...
73634659561
from typing import Union from django.core.exceptions import ValidationError from django.db import IntegrityError from . import models from .selectors import product_get def stock_update( product: Union[models.Product, str], quantity: int = 0, validate: bool = True, replace: bool = False, ): """ ...
juanpsenn/ecommerce
ecommerce/products/services.py
services.py
py
1,316
python
en
code
0
github-code
18
[ { "api_name": "typing.Union", "line_number": 11, "usage_type": "name" }, { "api_name": "selectors.product_get", "line_number": 26, "usage_type": "call" }, { "api_name": "django.core.exceptions.ValidationError", "line_number": 34, "usage_type": "call" }, { "api_nam...
16763813964
from django.db import models from django.contrib.auth.models import AbstractUser from phonenumber_field.modelfields import PhoneNumberField from courses.models import Course # Create your models here. class User(AbstractUser): STUDENT = 1 TUTOR = 2 STAFF = 3 ROLE_CHOICES = ( (STUDENT, 'student...
mayant-solutions/StudentPortal
studentportal/users/models.py
models.py
py
953
python
en
code
0
github-code
18
[ { "api_name": "django.contrib.auth.models.AbstractUser", "line_number": 8, "usage_type": "name" }, { "api_name": "django.db.models.DateField", "line_number": 17, "usage_type": "call" }, { "api_name": "django.db.models", "line_number": 17, "usage_type": "name" }, { ...
40797430733
# ============================================ # Implementando a interface via Streamlit # ============================================ import streamlit as st import numpy as np import matrix_operations import check_forms st.title("Calculadora de Matrizes") # ================================================= # Import...
almir-martins/calculadora_matrizes
python_scripts/my_app/pages/Matriz_e_escalar.py
Matriz_e_escalar.py
py
7,738
python
pt
code
0
github-code
18
[ { "api_name": "streamlit.title", "line_number": 9, "usage_type": "call" }, { "api_name": "matrix_operations.Calculadora_Matriz", "line_number": 14, "usage_type": "call" }, { "api_name": "check_forms.Forms", "line_number": 15, "usage_type": "call" }, { "api_name": ...
42877594291
from flask import render_template, redirect, url_for, request, jsonify from app import app from app.forms import MainForm from imdb import IMDb import collections @app.route('/', methods=['GET']) @app.route('/search', methods=['GET']) def search(): matching_tv_series = list() ia = IMDb() query = request.ar...
nithintsk/imdb-ratings
app/routes.py
routes.py
py
2,685
python
en
code
1
github-code
18
[ { "api_name": "imdb.IMDb", "line_number": 11, "usage_type": "call" }, { "api_name": "flask.request.args.get", "line_number": 12, "usage_type": "call" }, { "api_name": "flask.request.args", "line_number": 12, "usage_type": "attribute" }, { "api_name": "flask.reques...
7660076556
import torch import torch.nn as nn import numpy as np from torch.optim import Adam from torch.utils.data import DataLoader from torch.utils.data import Dataset from torch.utils.data import TensorDataset from torchvision.datasets import MNIST from torchvision.transforms import ToTensor from tqdm import tqdm class LeNe...
seyeon-shijuan/sesac-machine-learning
chap3_deep_learning/dl_22_lenet.py
dl_22_lenet.py
py
2,941
python
en
code
0
github-code
18
[ { "api_name": "torch.nn.Module", "line_number": 13, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 13, "usage_type": "name" }, { "api_name": "torch.nn.Conv2d", "line_number": 16, "usage_type": "call" }, { "api_name": "torch.nn", "line_nu...
32873895781
import torch from fastai import * from fastai.vision import * from torch.autograd import Variable import torch.nn as nn import torch.nn.functional as F import torch.optim as optim import numpy as np class Network(nn.Module): def __init__(self): super(Network, self).__init__() self.lin1 = nn.Linea...
jkleiber/ECE-ComputerVision
HW5/torch_mnist.py
torch_mnist.py
py
4,049
python
en
code
0
github-code
18
[ { "api_name": "torch.nn.Module", "line_number": 12, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 12, "usage_type": "name" }, { "api_name": "torch.nn.Linear", "line_number": 15, "usage_type": "call" }, { "api_name": "torch.nn", "line_nu...
428748614
import os import glob import pandas as pd import cv2 import sys import tqdm sys.path.append('../') import Config class GetTrainTestCSV: """ img txt img abspath txt abspath or None """ def __init__(self, dataset_path=Config.READ_PATH_DATASET, csv_name=Config.CSV_NAME): ...
KyanChen/RefineDet
tools/GetTrainTestCSV.py
GetTrainTestCSV.py
py
2,013
python
en
code
1
github-code
18
[ { "api_name": "sys.path.append", "line_number": 7, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 7, "usage_type": "attribute" }, { "api_name": "Config.READ_PATH_DATASET", "line_number": 17, "usage_type": "attribute" }, { "api_name": "Config.CSV_...
13312511754
import argparse import base64 import hashlib import json import time from datetime import datetime from flask import request, jsonify, Blueprint from config import Config from predict import predict from flask import Flask app = Flask(__name__) app.secret_key = '1234567' api = Blueprint('changhai', __name__) @api...
Bureaux-Tao/discontinuous-ner
main.py
main.py
py
4,953
python
en
code
2
github-code
18
[ { "api_name": "flask.Flask", "line_number": 14, "usage_type": "call" }, { "api_name": "flask.Blueprint", "line_number": 17, "usage_type": "call" }, { "api_name": "flask.request.method", "line_number": 27, "usage_type": "attribute" }, { "api_name": "flask.request",...
8485957738
from mock import patch, MagicMock from nose.tools import assert_raises import json from pybossa.s3_client import S3Client, NoSuchBucket, PrivateBucket class TestS3Client(object): def make_response(self, text, status_code=200): fake_response = MagicMock() fake_response.text = text fake_resp...
Scifabric/pybossa
test/test_s3_client.py
test_s3_client.py
py
4,816
python
en
code
730
github-code
18
[ { "api_name": "mock.MagicMock", "line_number": 9, "usage_type": "call" }, { "api_name": "pybossa.s3_client.S3Client", "line_number": 94, "usage_type": "call" }, { "api_name": "mock.patch", "line_number": 89, "usage_type": "call" }, { "api_name": "pybossa.s3_client...
72140981800
import json import random import urllib.request import urllib.parse from app.db.base_class import Base from app.db.session import db1, db2 from sqlalchemy.orm import Session from app import crud, schemas from app.db.models.relationship import Relationship from app.core.config import settings def generate_base_url(s...
biesiadm/movieweb
services/relationships/app/app/db/init_db.py
init_db.py
py
1,446
python
en
code
1
github-code
18
[ { "api_name": "sqlalchemy.orm.Session", "line_number": 19, "usage_type": "name" }, { "api_name": "app.db.session.db1", "line_number": 20, "usage_type": "name" }, { "api_name": "app.db.session.db2", "line_number": 20, "usage_type": "name" }, { "api_name": "app.db.b...
70368880360
import sys, os, argparse from rawkit.raw import Raw import numpy as np from PIL import Image def raw_to_jpg(file): try: with Raw(file) as raw_image: buffered_image = np.array(raw_image.to_buffer()) im = Image.frombuffer('RGB', (raw_image.metadata.width, raw_image.metadata.height), buffered_image, 'raw', 'RGB'...
ebrock/raw-to-jpg
raw-to-jpg.py
raw-to-jpg.py
py
952
python
en
code
2
github-code
18
[ { "api_name": "rawkit.raw.Raw", "line_number": 8, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 9, "usage_type": "call" }, { "api_name": "PIL.Image.frombuffer", "line_number": 10, "usage_type": "call" }, { "api_name": "PIL.Image", "line_n...
19274842958
import numpy as np import glob import cv2 import os import matplotlib.pyplot as plt import argparse import yaml, json import math import pandas as pd import seaborn as sns def deg2rad(deg): return deg * math.pi / 180 def rad2deg(rad): return rad * 180 / math.pi def mse(v1, v2): v = v1 - v2 return np....
Jhuangsp/cameraPose
eval.py
eval.py
py
12,072
python
en
code
1
github-code
18
[ { "api_name": "math.pi", "line_number": 13, "usage_type": "attribute" }, { "api_name": "math.pi", "line_number": 16, "usage_type": "attribute" }, { "api_name": "numpy.linalg.norm", "line_number": 20, "usage_type": "call" }, { "api_name": "numpy.linalg", "line_...
2654078184
# Generic from datetime import datetime from baking.main import db class Genre(db.Model): id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(90)) def __init__(self, name): self.name = name def __repr__(self): return '<Genre %r>' % self.name class Artist(db.Mod...
arukavina/baking-lyrics
baking/main/database/models.py
models.py
py
3,785
python
en
code
14
github-code
18
[ { "api_name": "baking.main.db.Model", "line_number": 7, "usage_type": "attribute" }, { "api_name": "baking.main.db", "line_number": 7, "usage_type": "name" }, { "api_name": "baking.main.db.Column", "line_number": 8, "usage_type": "call" }, { "api_name": "baking.ma...
71547881319
import yaml from datetime import datetime, timedelta from . import directories from . import ingredients from . import recipes import os from typing import List PARTY_MAX_DURATION = timedelta(days=1) PARTY_MIN_ORDER_COUNT = 5 STATISTICS_MAX_DISTANCE = timedelta(weeks=52) class Party: def __init__(self, start: dat...
Robert2611/BarBot4
raspberry/python/barbot/orders.py
orders.py
py
3,660
python
en
code
0
github-code
18
[ { "api_name": "datetime.timedelta", "line_number": 10, "usage_type": "call" }, { "api_name": "datetime.timedelta", "line_number": 12, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 14, "usage_type": "name" }, { "api_name": "datetime.date...
30178268473
import tkinter from tkinter import * from tkinter import ttk from tkinter import filedialog from pytube import YouTube from pytube import Playlist from urllib.request import urlopen from PIL import Image, ImageTk label1 = '' visualizar_descricao = '' mais = [] INPUT = '' def atualizar(): return root.update() def...
samuelllegal/YoutuBR
YoutuBR.py
YoutuBR.py
py
3,759
python
en
code
0
github-code
18
[ { "api_name": "PIL.Image.open", "line_number": 30, "usage_type": "call" }, { "api_name": "PIL.Image", "line_number": 30, "usage_type": "name" }, { "api_name": "urllib.request.urlopen", "line_number": 30, "usage_type": "call" }, { "api_name": "pytube.Playlist", ...
28757512602
# This file is part of tblite. # SPDX-Identifier: LGPL-3.0-or-later # # tblite is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. #...
tblite/tblite
python/tblite/interface.py
interface.py
py
21,671
python
en
code
54
github-code
18
[ { "api_name": "numpy.ndarray", "line_number": 63, "usage_type": "attribute" }, { "api_name": "numpy.ndarray", "line_number": 64, "usage_type": "attribute" }, { "api_name": "typing.Optional", "line_number": 65, "usage_type": "name" }, { "api_name": "typing.Optional...
23398916931
# -*- coding: utf-8 -*- from django.core.management.base import BaseCommand from main.models import TournamentGroup, TournamentRound, Venue, Team, Game, Extra, ExtraChoice class Command(BaseCommand): help = 'Creates the real WWC 2023 data' TOURNAMENT_START = '2023-07-20 19:00:00+12' def handle(self, *...
mloeks/rtg
main/management/commands/wwc2023_create_tournament_data.py
wwc2023_create_tournament_data.py
py
11,331
python
en
code
0
github-code
18
[ { "api_name": "django.core.management.base.BaseCommand", "line_number": 8, "usage_type": "name" }, { "api_name": "main.models.Game.objects.all", "line_number": 23, "usage_type": "call" }, { "api_name": "main.models.Game.objects", "line_number": 23, "usage_type": "attribut...
34988561442
# Imports import sys if sys.version_info.major < 3 or sys.version_info.minor < 4: raise RuntimeError('At least Python 3.4 is required') import keyboard import pygame import requests HOST = '10.148.131.75' PORT = '8000' # BASE_URL is variant use to save the format of host and port BASE_URL = 'http://' + HOST + ':...
ct-studio-buildboard/ST19-18
scripts/control_keyboard.py
control_keyboard.py
py
5,535
python
en
code
1
github-code
18
[ { "api_name": "sys.version_info", "line_number": 3, "usage_type": "attribute" }, { "api_name": "requests.get", "line_number": 19, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 84, "usage_type": "call" }, { "api_name": "pygame.time.Clock", ...
14597764088
######################################################################## # # File: cnn_mine.py # Author: Matt Zucker # Date: March 2020 # # Written for ENGR 27 - Computer Vision # ######################################################################## # # attempt to improve on keras tutorial with deeper network th...
mzucker/e27_keras_examples
cnn_mine.py
cnn_mine.py
py
2,494
python
en
code
0
github-code
18
[ { "api_name": "mnist_preprocess.load_datasets", "line_number": 26, "usage_type": "call" }, { "api_name": "keras.models.Sequential", "line_number": 32, "usage_type": "call" }, { "api_name": "keras.models", "line_number": 32, "usage_type": "attribute" }, { "api_name...