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
7759594347
import os import sys from PyQt5.QtWidgets import QFrame, QSizePolicy def isFloat(s: str): try: float(s) except ValueError: return False return True def isInt(s: str): try: int(s) except ValueError: return False return True def returnFloat(s: str): try: ...
timhenning1997/Serial-Port-Monitor
UsefulFunctions.py
UsefulFunctions.py
py
2,539
python
en
code
2
github-code
6
[ { "api_name": "sys._MEIPASS", "line_number": 96, "usage_type": "attribute" }, { "api_name": "os.path.abspath", "line_number": 98, "usage_type": "call" }, { "api_name": "os.path", "line_number": 98, "usage_type": "attribute" }, { "api_name": "os.path.join", "li...
72699109627
# -*- coding: UTF-8 –*- import random from datetime import datetime """This is a random address function""" def address(): # 小区名,可自行添加 area_address_name = ['蓝湾上林院', '绿城金华御园(别墅)', '紫金湾', '玫瑰星城', '绿城兰园', '龙庭一品', '江山风华', '中梁首府', '中梁首府', '都市豪园', '光明湖海城市花园', '金色海塘...
zzyy8678/stady_python
create_address.py
create_address.py
py
17,836
python
zh
code
0
github-code
6
[ { "api_name": "random.choice", "line_number": 134, "usage_type": "call" }, { "api_name": "random.choice", "line_number": 136, "usage_type": "call" }, { "api_name": "random.choice", "line_number": 140, "usage_type": "call" }, { "api_name": "random.choice", "lin...
34180911472
# -*- coding: utf-8 -*- """ Created on Sun Mar 29 18:27:58 2020 @author: Kollarlab """ # import comtypes import os import time #import subprocess #import re import scipy import pylab #import tarfile #import struct #import glob import numpy import time #import pickle #import datetime #import itertools import sys ...
MRitter95/Kollar-Lab
Old_scripts_delete_20220804/Control/Acqiris_development/CdriverPythonWrapper/Acqiris_testScript_Averagertiming.py
Acqiris_testScript_Averagertiming.py
py
2,844
python
en
code
2
github-code
6
[ { "api_name": "numpy.mod", "line_number": 34, "usage_type": "call" }, { "api_name": "sys.path.append", "line_number": 40, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 40, "usage_type": "attribute" }, { "api_name": "numpy.zeros", "line_numbe...
35910630002
from typing import Dict from fastapi import FastAPI from fastapi.staticfiles import StaticFiles from app.routers import visualize app = FastAPI() app = FastAPI( title="Model Visualizer", description="", version="0.10.0", ) app.mount("/home/lirakr/repos/rnd-mermaid/app/static", StaticFiles(directory="/...
LirakR/rnd-mermaid
app/main.py
main.py
py
684
python
en
code
0
github-code
6
[ { "api_name": "app.routers", "line_number": 6, "usage_type": "name" }, { "api_name": "fastapi.FastAPI", "line_number": 6, "usage_type": "call" }, { "api_name": "app.routers", "line_number": 9, "usage_type": "name" }, { "api_name": "fastapi.FastAPI", "line_numb...
29214768086
from django.shortcuts import render from utils import Word def home(request): context = {} if request.method == "POST": text = request.POST['text'] context['results'] = Word(text).result() context['text'] = text return render(request, 'home.html', context)
dest81/test-jerry
words_stats/views.py
views.py
py
296
python
en
code
0
github-code
6
[ { "api_name": "utils.Word", "line_number": 9, "usage_type": "call" }, { "api_name": "django.shortcuts.render", "line_number": 12, "usage_type": "call" } ]
19025440782
import os import sys import json import torch import traceback # def returnFalse(): # return False # torch.cuda.is_available = returnFalse from scipy.io import wavfile # from python.speaker_diarization.pipeline.speaker_diarization import SpeakerDiarization class Diarization(object): def __init__(self, logge...
DanRuta/xva-trainer
python/speaker_diarization/model.py
model.py
py
16,869
python
en
code
78
github-code
6
[ { "api_name": "json.dumps", "line_number": 52, "usage_type": "call" }, { "api_name": "scipy.io.wavfile.read", "line_number": 61, "usage_type": "call" }, { "api_name": "scipy.io.wavfile", "line_number": 61, "usage_type": "name" }, { "api_name": "json.dumps", "l...
3648010096
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="waterstructureCreator", version="0.0.1", author="Nicolas G. Hoermann", author_email="hoermann@fhi.mpg.de", description= "Creation of water structures on substrates", long_descripti...
computationalelectrochemistrygroup/WaterStructureCreator
setup.py
setup.py
py
868
python
en
code
3
github-code
6
[ { "api_name": "setuptools.setup", "line_number": 6, "usage_type": "call" }, { "api_name": "setuptools.find_packages", "line_number": 16, "usage_type": "call" } ]
32741409083
import math import numba import numpy as np def main(): starts, ends, rdf = np.loadtxt("rdf.dat").T density = 1200 / 1.0**3 n_bins = len(rdf) bin_width = ends[0] - starts[0] corrector = np.zeros(n_bins) kernel = compute_kernel(rdf, bin_width) for step in range(100): corrector = ...
snsinfu/bit5
test418-ornstein_zernike/oz.py
oz.py
py
1,377
python
en
code
0
github-code
6
[ { "api_name": "numpy.loadtxt", "line_number": 7, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_number": 13, "usage_type": "call" }, { "api_name": "numpy.exp", "line_number": 19, "usage_type": "call" }, { "api_name": "numpy.log", "line_number": 19,...
6701762608
import discord from discord.ext import commands class HostPlugin(commands.Cog): def __init__(self, bot): self.bot = bot @commands.command() async def host(self, ctx): await ctx.send("What is the time of the flight?") flight_time = await self.bot.wait_for('message', check=lambda m: ...
MayyCookie/swissannc
flighta 2.py
flighta 2.py
py
822
python
en
code
0
github-code
6
[ { "api_name": "discord.ext.commands.Cog", "line_number": 4, "usage_type": "attribute" }, { "api_name": "discord.ext.commands", "line_number": 4, "usage_type": "name" }, { "api_name": "discord.ext.commands.command", "line_number": 8, "usage_type": "call" }, { "api_...
17516466448
import torch from torch import nn __all__ = [ '_CONV_DICT', '_CONV_TRANS_DICT', '_AVG_POOL_DICT', '_MAX_POOL_DICT', '_NORM_DICT', '_REFLECTION_PAD_DICT', '_CENTER_CROP_DICT', '_ACTIVATION_DICT', 'activation_from_str' ] def center_crop_1d(layer: torch.Tensor, target: torch.Tensor) -...
broadinstitute/CellMincer
cellmincer/models/components/functions.py
functions.py
py
2,557
python
en
code
1
github-code
6
[ { "api_name": "torch.Tensor", "line_number": 16, "usage_type": "attribute" }, { "api_name": "torch.Tensor", "line_number": 25, "usage_type": "attribute" }, { "api_name": "torch.Tensor", "line_number": 37, "usage_type": "attribute" }, { "api_name": "torch.nn.Conv1d...
36021786185
import matplotlib.pyplot as plt; import numpy as np; data = np.loadtxt('jV_steady.dat', skiprows=1); ref = np.loadtxt('G0610_cell3/1suns.dat', skiprows=3); V_steady = data[:,0]; J_steady = data[:,1]; V_ref = ref[:,0]; J_ref = ref[:,1]*(-10); V_steady += 0.0; J_steady += 0; # Plot all results plt.figure(num=None, f...
dglowienka/drift-diffusion_mini-modules
Spatial/JV_with_ref.py
JV_with_ref.py
py
563
python
en
code
0
github-code
6
[ { "api_name": "numpy.loadtxt", "line_number": 5, "usage_type": "call" }, { "api_name": "numpy.loadtxt", "line_number": 6, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.figure", "line_number": 17, "usage_type": "call" }, { "api_name": "matplotlib.pyplot"...
27247441921
revision = '4160ccb58402' down_revision = None branch_labels = None depends_on = None import json import os from alembic import op import sqlalchemy as sa from sqlalchemy.sql import table, column sections = { 'update_authorized_keys': 'local', 'authorized_keys_file': 'local', 'githome_executable': 'loca...
mbr/githome
alembic/versions/4160ccb58402_update_from_previous_version.py
4160ccb58402_update_from_previous_version.py
py
2,292
python
en
code
2
github-code
6
[ { "api_name": "alembic.op.get_bind", "line_number": 23, "usage_type": "call" }, { "api_name": "alembic.op", "line_number": 23, "usage_type": "name" }, { "api_name": "sqlalchemy.sql.table", "line_number": 25, "usage_type": "call" }, { "api_name": "sqlalchemy.sql.co...
34832286900
import cv2 vid = cv2.VideoCapture("my_video.mp4") while(1): ret, frame = vid.read() if ret: frame = cv2.resize(frame, (0, 0), fx = 1.2, fy = 1.2) cv2.imshow("video", frame) else: break if cv2.waitKey(10000) == ord("q"): break
jim2832/Image-Recognition
video2.py
video2.py
py
277
python
en
code
0
github-code
6
[ { "api_name": "cv2.VideoCapture", "line_number": 3, "usage_type": "call" }, { "api_name": "cv2.resize", "line_number": 9, "usage_type": "call" }, { "api_name": "cv2.imshow", "line_number": 10, "usage_type": "call" }, { "api_name": "cv2.waitKey", "line_number":...
13000612743
import os import time import numpy as np import torch import cv2 import subprocess import argparse from PIL import Image, ImageDraw from facenet_pytorch import MTCNN from optical_flow import OpticalFlowTracker parser = argparse.ArgumentParser(description='Face tracking using Optical Flow.') parser.add_argument('--inpu...
nishadi930313/Labmate
face_tracking.py
face_tracking.py
py
5,042
python
en
code
0
github-code
6
[ { "api_name": "argparse.ArgumentParser", "line_number": 12, "usage_type": "call" }, { "api_name": "subprocess.run", "line_number": 18, "usage_type": "call" }, { "api_name": "subprocess.PIPE", "line_number": 21, "usage_type": "attribute" }, { "api_name": "subproces...
75070674748
#! /usr/bin/env python3 import json def find_if (pred, collection): try: return next(filter(pred, collection)) except StopIteration: return None class Transition: def __init__ (self, initial_state_name): self.initial = initial_state_name self.states = [] self.current = self.initial def regist_state (s...
SPNSPN/state-json
py/transition.py
transition.py
py
4,337
python
en
code
0
github-code
6
[ { "api_name": "json.dumps", "line_number": 82, "usage_type": "call" }, { "api_name": "json.loads", "line_number": 85, "usage_type": "call" } ]
30061421331
from bs4 import BeautifulSoup import requests import json HEADING_ORDER = [ "defensePhysical", "defensePhysicalStrike", "defensePhysicalSlash", "defensePhysicalPierce", "defenseMagic", "defenseFire", "defenseLightning", "defenseHoly", "immunity", "robustness", "focus", "...
lewisc64/Elden-Ring-Poise-Optimizer
data/sources/wiki/scrape_wiki.py
scrape_wiki.py
py
2,230
python
en
code
0
github-code
6
[ { "api_name": "bs4.BeautifulSoup", "line_number": 24, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 62, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 64, "usage_type": "call" }, { "api_name": "requests.get", "line_...
71066784189
from collections import defaultdict from copy import copy, deepcopy from dataclasses import dataclass from datetime import datetime, timedelta from enum import Enum, auto, IntEnum from typing import List, Tuple, Dict, Optional, Any from dictdiffer import diff from blaseball_mike.chronicler import get_entities from Ch...
beiju/blaseball-player-changes
v1/Players.py
Players.py
py
9,476
python
en
code
0
github-code
6
[ { "api_name": "enum.Enum", "line_number": 15, "usage_type": "name" }, { "api_name": "enum.auto", "line_number": 16, "usage_type": "call" }, { "api_name": "enum.auto", "line_number": 17, "usage_type": "call" }, { "api_name": "enum.auto", "line_number": 18, ...
70264770749
import subprocess as sp import pymysql import pymysql.cursors import datetime def search(): try: # letter = input(First letter) query = "select H.sport_name from equipment as H where H.quantity in (select max(quantity) from equipment); " print(query) cur.execute(query) con.c...
VanshMarda/Data-and-Application
Project_Phase_4/MiniWorld.py
MiniWorld.py
py
11,599
python
en
code
0
github-code
6
[ { "api_name": "datetime.date", "line_number": 289, "usage_type": "call" }, { "api_name": "datetime.date.today", "line_number": 290, "usage_type": "call" }, { "api_name": "datetime.date", "line_number": 290, "usage_type": "attribute" }, { "api_name": "datetime.date...
13933582750
from django import forms from .models import TodoList class TodoListForm(forms.ModelForm): class Meta: model = TodoList fields = ['task_title', 'task_description', 'task_status'] def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.fields['task_title'].wi...
priyanka-infobeans/infoToDoList
infobeans_todolist/todolist_app/forms.py
forms.py
py
451
python
en
code
0
github-code
6
[ { "api_name": "django.forms.ModelForm", "line_number": 4, "usage_type": "attribute" }, { "api_name": "django.forms", "line_number": 4, "usage_type": "name" }, { "api_name": "models.TodoList", "line_number": 6, "usage_type": "name" } ]
20160930177
from django.urls import path from web import views app_name ="web" urlpatterns = [ path('',views.index,name="index"), path("create/",views.create_product,name="create_product"), path('deleted/<int:id>/',views.deleted_product,name="deleted_product"), path('edit/<int:id>/',views.edit_product,name="ed...
Aswathy-G/advanceddjango-project
web/urls.py
urls.py
py
389
python
en
code
0
github-code
6
[ { "api_name": "django.urls.path", "line_number": 8, "usage_type": "call" }, { "api_name": "web.views.index", "line_number": 8, "usage_type": "attribute" }, { "api_name": "web.views", "line_number": 8, "usage_type": "name" }, { "api_name": "django.urls.path", "...
11068770479
from django.http import * from forms import UploadForm from django import template from django.template.loader import get_template from django.template import Context, RequestContext from django.utils.decorators import method_decorator from django.shortcuts import render_to_response from django.contrib.auth import auth...
hughsons/saltwaterfish
admin/views.py
views.py
py
28,274
python
en
code
1
github-code
6
[ { "api_name": "google.appengine.api.files.gs", "line_number": 25, "usage_type": "attribute" }, { "api_name": "google.appengine.api.files", "line_number": 25, "usage_type": "name" }, { "api_name": "google.appengine.api.files.gs", "line_number": 28, "usage_type": "attribute...
7306633247
import torch from tqdm import tqdm import torch.nn as nn import torch.optim as optim import torchvision.transforms as transforms from torch.utils.tensorboard import SummaryWriter from data_loader import get_loader from CNNtoRNN import CNNtoRNN def train(): transform = transforms.Compose( [ tra...
KarstenKu-Hub/ImageCaptioning
train.py
train.py
py
2,050
python
en
code
0
github-code
6
[ { "api_name": "torchvision.transforms.Compose", "line_number": 12, "usage_type": "call" }, { "api_name": "torchvision.transforms", "line_number": 12, "usage_type": "name" }, { "api_name": "torchvision.transforms.Resize", "line_number": 14, "usage_type": "call" }, { ...
42631511615
#!/usr/bin/env python3 # Program to implement tweet classification import nltk import re import sys from collections import Counter import pandas as pd nltk.download('punkt') # Read files train_file = sys.argv[1] test_file = sys.argv[2] output_file = sys.argv[3] train = open(train_file, 'r', errors='ignore').read()...
tanvi5/Games-and-Bayes
part2/geolocate.py
geolocate.py
py
5,766
python
en
code
0
github-code
6
[ { "api_name": "nltk.download", "line_number": 8, "usage_type": "call" }, { "api_name": "sys.argv", "line_number": 11, "usage_type": "attribute" }, { "api_name": "sys.argv", "line_number": 12, "usage_type": "attribute" }, { "api_name": "sys.argv", "line_number"...
7259480306
import torch from torch.autograd import Variable import torch.nn as nn import torch.nn.functional as F import cv2 import sys class Net(nn.Module): def __init__(self): super(Net, self).__init__() self.fc1 = nn.Linear(6,200) self.fc2 = nn.Linear(200,100) self.fc3 = nn.Linear(100,50) ...
asbudhkar/Hand-Detector-with-Pose-Estimation
train.py
train.py
py
2,462
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.nn.Linear", "line_number": 11, "usage_type": "call" }, { "api_name": "torch.nn", "line_numb...
5962356858
from aoc_helpers.perf_helpers import * from aoc_helpers.input_helpers import * from collections import defaultdict from collections import Counter import string import time import numpy as np import matplotlib.pyplot as plt from scipy.spatial import Voronoi, voronoi_plot_2d from scipy.spatial import cKDTree def Poly...
colejd/AdventOfCode2018
day_06/day6part1_borked.py
day6part1_borked.py
py
3,325
python
en
code
0
github-code
6
[ { "api_name": "numpy.array", "line_number": 45, "usage_type": "call" }, { "api_name": "scipy.spatial.Voronoi", "line_number": 46, "usage_type": "call" }, { "api_name": "numpy.where", "line_number": 81, "usage_type": "call" }, { "api_name": "scipy.spatial.cKDTree",...
75163131066
import pprint, random, datetime class Cliente(): _nomes = ['ERIC RUIZ', 'ROBERTA DE LIMA', 'DEIVIDI SCALZAVARA', 'ADOLFO NETO', 'JOSE MONESTEL', 'WAGNER CORREIA', 'JACEGUAY ZUKOSKI', 'MICHEL SOUZA', 'MAYRA RODRIGUES', 'MICHEL DUARTE', 'MARCIO FOSSA', 'MARCEL BORNANCIN', 'ELOISA PERIN', 'TIAGO WIPPEL', 'LUCAS FISCH...
e-ruiz/big-data
01-NoSQL/atividade-03/big_data_atividade_3.py
big_data_atividade_3.py
py
7,003
python
pt
code
1
github-code
6
[ { "api_name": "random.choice", "line_number": 10, "usage_type": "call" }, { "api_name": "random.choice", "line_number": 13, "usage_type": "call" }, { "api_name": "random.choice", "line_number": 14, "usage_type": "call" }, { "api_name": "random.choice", "line_n...
14755463895
import torch import torch.nn as nn import torch.nn.functional as F from torch.nn import init # ==========================Core Module================================ class conv_block(nn.Module): def __init__(self, ch_in, ch_out): super(conv_block, self).__init__() self.conv = nn.Sequential( ...
ikkbic/My-Repositories
segmentionn_models_trans/UNet-1.py
UNet-1.py
py
3,430
python
en
code
0
github-code
6
[ { "api_name": "torch.nn.Module", "line_number": 7, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 7, "usage_type": "name" }, { "api_name": "torch.nn.Sequential", "line_number": 10, "usage_type": "call" }, { "api_name": "torch.nn", "line_...
36643660386
# -*- coding: utf-8 -*- """ @author: QgZhan @contact: zhanqg@foxmail.com @file: cifar.py @time: 2022/4/19 11:19 """ import os from torch.utils.data import Dataset from dataloader.dataloader_utils import * from torchvision import datasets, transforms from spikingjelly.datasets import cifar10_dvs from torch...
rtao499/SAANet
dataloader/cifar.py
cifar.py
py
10,609
python
en
code
2
github-code
6
[ { "api_name": "torchvision.transforms.Compose", "line_number": 29, "usage_type": "call" }, { "api_name": "torchvision.transforms", "line_number": 29, "usage_type": "name" }, { "api_name": "torchvision.transforms.Resize", "line_number": 29, "usage_type": "call" }, { ...
43381026267
import boto3 def lambda_handler(event, context): sns = boto3.client('sns') message = event.get('message', 'Default message') params = { 'Message': message, 'TopicArn': 'arn:aws:sns:us-east-1:896553604990:LiveScore' } try: response = sns.publish(**params) message_i...
bayarbayasgalanj/cloud_computing
Project/lambda_function.py
lambda_function.py
py
512
python
en
code
0
github-code
6
[ { "api_name": "boto3.client", "line_number": 4, "usage_type": "call" } ]
71969293949
import argparse import logging from common import _utils def main(argv=None): parser = argparse.ArgumentParser(description='ML Trainer') parser.add_argument('--project', type=str, help='Google Cloud project ID to use.') parser.add_argument('--region', type=str, help='Which zone to run the analyzer.') parser....
kubeflow/kfp-tekton-backend
components/deprecated/dataproc/train/src/train.py
train.py
py
1,939
python
en
code
8
github-code
6
[ { "api_name": "argparse.ArgumentParser", "line_number": 8, "usage_type": "call" }, { "api_name": "logging.getLogger", "line_number": 24, "usage_type": "call" }, { "api_name": "logging.INFO", "line_number": 24, "usage_type": "attribute" }, { "api_name": "common._ut...
4630502954
import tkinter as Tk from math import floor import numpy as np from PIL import Image,ImageTk ## ---------------------- ## ##| CLASSES |## ## ---------------------- ## class Texture: def __init__(self,path): self._img = Tk.PhotoImage(file=path) def getImg(self): return self._img class Textu...
MaximePerriquet/PyCraft
rendering.py
rendering.py
py
10,623
python
en
code
0
github-code
6
[ { "api_name": "tkinter.PhotoImage", "line_number": 11, "usage_type": "call" }, { "api_name": "math.floor", "line_number": 38, "usage_type": "call" }, { "api_name": "tkinter.PhotoImage", "line_number": 142, "usage_type": "call" }, { "api_name": "tkinter.PhotoImage"...
36185365035
''' Ahmad Abu Hanifah A1C020026 Teknik Otomasi Pertanaian ''' import numpy as np import matplotlib.pyplot as plt dOsp = 6.5 vmin = 0 # kecepatan aliran udara (L/s) vmax = 2 # kecepatan aliran udara (L/s) V = 1000000 #Volume sistem (L) kLa = 0.045 # per menit n = 4 # Jumlah aerator # a = 0.4 # Luas permukaan antarmuka...
AbuHanifah1878/Teknik_Otomasi_Pertanian
KontrolDOOnOff.py
KontrolDOOnOff.py
py
1,349
python
en
code
0
github-code
6
[ { "api_name": "numpy.linspace", "line_number": 23, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_number": 24, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_number": 25, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.title", ...
27089285988
import sys import json unique = {} start = ['a','f','l','q','u'] end = ['e','k','p','t','z'] if(len(sys.argv) != 4): print("========================================================================================================") print("SORRY!! Please provide the path to the INPUT json file, the OUTPUT file...
STEELISI/Venmo
Fan_in.py
Fan_in.py
py
2,106
python
en
code
0
github-code
6
[ { "api_name": "sys.argv", "line_number": 9, "usage_type": "attribute" }, { "api_name": "sys.exit", "line_number": 15, "usage_type": "call" }, { "api_name": "sys.argv", "line_number": 17, "usage_type": "attribute" }, { "api_name": "sys.argv", "line_number": 18,...
10233665355
from __future__ import annotations import datetime from typing import Optional, Union, TYPE_CHECKING, List, Dict from . import enums from .utils import parse_timestamp from .user import BitLeaderboardUser, PartialUser, User if TYPE_CHECKING: from .http import TwitchHTTP __all__ = ( "BitsLeaderboard", "Cli...
PythonistaGuild/TwitchIO
twitchio/models.py
models.py
py
69,250
python
en
code
714
github-code
6
[ { "api_name": "typing.TYPE_CHECKING", "line_number": 9, "usage_type": "name" }, { "api_name": "utils.parse_timestamp", "line_number": 85, "usage_type": "call" }, { "api_name": "utils.parse_timestamp", "line_number": 87, "usage_type": "call" }, { "api_name": "user....
11728318125
import numpy as np from tabulate import tabulate from clustering.external_evaluation import calculate_purity from clustering.k_means import KMeans from data_preparation.inverted_index import InvertedIndex from data_preparation.pre_processing import parse_corpus, pre_process_corpus corpus, y_true, titles = parse_corpu...
nzabdelke/News-Clustering
main.py
main.py
py
3,536
python
en
code
0
github-code
6
[ { "api_name": "data_preparation.pre_processing.parse_corpus", "line_number": 9, "usage_type": "call" }, { "api_name": "data_preparation.pre_processing.pre_process_corpus", "line_number": 10, "usage_type": "call" }, { "api_name": "data_preparation.inverted_index.InvertedIndex", ...
72497450429
from bs4 import BeautifulSoup import requests, os #Configuration Variables search_refs = True build_path = "API" API_URL = "https://pythonapi.upbge.org/" #Further addons headers = {"bge" + os.sep + "types.py" : """ import mathutils inf = 0 class CListValue: def __init__(self, ctype): self.__ret__ = ctype...
elmeunick9/UPBGE-CommunityAddon
documentation/BGEMockGen/make.py
make.py
py
14,473
python
en
code
6
github-code
6
[ { "api_name": "os.sep", "line_number": 10, "usage_type": "attribute" }, { "api_name": "os.sep", "line_number": 35, "usage_type": "attribute" }, { "api_name": "os.sep", "line_number": 42, "usage_type": "attribute" }, { "api_name": "os.path.normpath", "line_numb...
6757308419
# exclude from patching DONT_PATCH_MY_STAR_IMPORTS = True from mods.RiftOptimizer.Patcher import * import threading import queue import Level import LevelGen import inspect import logging import SteamAdapter import Game import os import pygame import dill as pickle import mods.RiftOptimizer.RiftOptimizer as RiftOptim...
anotak/RiftOptimizer
ThreadedIO.py
ThreadedIO.py
py
9,785
python
en
code
1
github-code
6
[ { "api_name": "inspect.stack", "line_number": 27, "usage_type": "call" }, { "api_name": "inspect.getmodule", "line_number": 29, "usage_type": "call" }, { "api_name": "inspect.getmodule", "line_number": 31, "usage_type": "call" }, { "api_name": "sys.argv", "lin...
3919530622
# standard python import base64 import bz2 import datetime import json import multiprocessing import optparse import os import re import socket import sys import time import urllib.parse import urllib.request # custom browser driver from webxray.ChromeDriver import ChromeDriver class Client: def __init__(self, serve...
thezedwards/webXray
webxray/Client.py
Client.py
py
4,988
python
en
code
1
github-code
6
[ { "api_name": "multiprocessing.cpu_count", "line_number": 31, "usage_type": "call" }, { "api_name": "socket.gethostname", "line_number": 51, "usage_type": "call" }, { "api_name": "urllib.parse.request.Request", "line_number": 60, "usage_type": "call" }, { "api_nam...
73734292027
import json import os from account import Account home_path = os.getenv("HOME") config = json.load(open(os.path.join(home_path, ".config", "revChatGPT", "config.json"))) cache = json.load(open(os.path.join(home_path, ".cache", "revChatGPT", "config.json"))) # 从配置读取 token session_token = config['accounts'][0]['sessio...
fkxxyz/rev-chatgpt-web
test.py
test.py
py
662
python
en
code
0
github-code
6
[ { "api_name": "os.getenv", "line_number": 6, "usage_type": "call" }, { "api_name": "json.load", "line_number": 7, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 7, "usage_type": "call" }, { "api_name": "os.path", "line_number": 7, "us...
2965742594
from odoo import http from odoo.http import request from odoo.addons.web.controllers.main import ensure_db import werkzeug import logging _logger = logging.getLogger(__name__) class SimpleUrlController(http.Controller): @http.route('/redir', type='http', auth="user") def redirect(self, **args): ens...
Tawasta/server-tools
base_simple_urls/controllers/simple_urls.py
simple_urls.py
py
2,344
python
en
code
3
github-code
6
[ { "api_name": "logging.getLogger", "line_number": 7, "usage_type": "call" }, { "api_name": "odoo.http.Controller", "line_number": 10, "usage_type": "attribute" }, { "api_name": "odoo.http", "line_number": 10, "usage_type": "name" }, { "api_name": "odoo.addons.web....
13895462756
######################################################################################## # Module with functions for parametric estimation of GC ######################################################################################## import numpy as np import scipy.linalg from .tools import * def YuleWalker(X, m, ma...
ViniciusLima94/pyGC
pygc/parametric.py
parametric.py
py
1,814
python
en
code
30
github-code
6
[ { "api_name": "numpy.zeros", "line_number": 27, "usage_type": "call" }, { "api_name": "numpy.arange", "line_number": 30, "usage_type": "call" }, { "api_name": "numpy.matmul", "line_number": 35, "usage_type": "call" }, { "api_name": "numpy.matmul", "line_number...
18307501302
import warnings from copy import deepcopy from typing import Union, List, Tuple, Dict import numpy as np from aequilibrae.matrix import AequilibraeMatrix from aequilibrae.paths.graph import Graph from aequilibrae.paths.results import AssignmentResults class TrafficClass: """Traffic class for equilibrium traffic...
AequilibraE/aequilibrae
aequilibrae/paths/traffic_class.py
traffic_class.py
py
7,635
python
en
code
140
github-code
6
[ { "api_name": "aequilibrae.paths.graph.Graph", "line_number": 39, "usage_type": "name" }, { "api_name": "aequilibrae.matrix.AequilibraeMatrix", "line_number": 39, "usage_type": "name" }, { "api_name": "numpy.array_equal", "line_number": 50, "usage_type": "call" }, { ...
30729211140
import threading from random import randint import pika import time from src.klein_queue.errors import KleinQueueError from src.klein_queue.rabbitmq.publisher import Publisher from src.klein_queue.rabbitmq.consumer import Consumer from klein_config.config import EnvironmentAwareConfig test_config = { "rabbitmq": {...
mdcatapult/py-queue
tests/rabbitmq/test_consumer.py
test_consumer.py
py
17,024
python
en
code
0
github-code
6
[ { "api_name": "threading.Event", "line_number": 23, "usage_type": "call" }, { "api_name": "klein_config.config.EnvironmentAwareConfig", "line_number": 34, "usage_type": "call" }, { "api_name": "src.klein_queue.rabbitmq.consumer.Consumer", "line_number": 46, "usage_type": ...
29431482505
import os import numpy as np import cv2 import glob srcw, srch = 1920, 1080 x, y, w, h = 6, 599, 517, 421 app_name = 'gpu_math.exe' app_dir = 'D:\\Code\\gpu_tracking\\gpu-object-tracking\\build\\bin' yuv_file = '%s\\test.yuv'%app_dir roi_file = '%s\\dump.gpu-roi.0000.517x421.yuv'%app_dir aff_file = '%s\\dump.gpu-affin...
mintaka33/gpu-object-tracking
run.py
run.py
py
3,904
python
en
code
1
github-code
6
[ { "api_name": "os.system", "line_number": 19, "usage_type": "call" }, { "api_name": "numpy.savetxt", "line_number": 23, "usage_type": "call" }, { "api_name": "numpy.fromfile", "line_number": 29, "usage_type": "call" }, { "api_name": "numpy.uint8", "line_number...
73474178748
from fastapi import APIRouter, Depends, FastAPI from src.dependencies.auth import firebase_authentication from src.routes.audios import views as audios_views from src.routes.auth import views as auth_views from src.routes.users import views as users_views api_router = APIRouter() api_router.include_router(auth_views....
CrowdsourcingApps/Crowdsourcing-Ayat
src/routes/__init__.py
__init__.py
py
846
python
en
code
2
github-code
6
[ { "api_name": "fastapi.APIRouter", "line_number": 8, "usage_type": "call" }, { "api_name": "src.routes.auth.views.router", "line_number": 9, "usage_type": "attribute" }, { "api_name": "src.routes.auth.views", "line_number": 9, "usage_type": "name" }, { "api_name":...
8463884764
from django.utils import timezone from rest_framework import status from rest_framework.generics import CreateAPIView, RetrieveUpdateDestroyAPIView from rest_framework.response import Response from rest_framework.views import APIView from logistics.models import Logistic, LogisticRate from receivers.models import Rece...
Duade10/ditosell-api
orders/views.py
views.py
py
4,947
python
en
code
0
github-code
6
[ { "api_name": "rest_framework.views.APIView", "line_number": 16, "usage_type": "name" }, { "api_name": "users.authentications.CustomTokenAuthentication", "line_number": 17, "usage_type": "name" }, { "api_name": "users.permissions.CustomPermission", "line_number": 18, "usa...
24486961270
from airflow import DAG from airflow.providers.http.operators.http import SimpleHttpOperator from airflow.hooks.base import BaseHook from airflow.operators.python import PythonOperator import datetime import requests import json dag = DAG( dag_id='533_api_generate_report', schedule_interval='0 0 * * *', start_date...
Artem-ne-Artem/Data-engineering-by-Yandex-Practicum
s3-lessons/Theme_5/Task_5.3.3.py
Task_5.3.3.py
py
1,229
python
en
code
0
github-code
6
[ { "api_name": "airflow.DAG", "line_number": 10, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 13, "usage_type": "call" }, { "api_name": "datetime.timedelta", "line_number": 15, "usage_type": "call" }, { "api_name": "requests.post", ...
19594690506
import tkinter import mysql.connector from tkinter import * from tkinter import ttk from tkinter.ttk import Treeview from tkinter import messagebox from PIL import Image, ImageTk db = mysql.connector.connect( host="localhost", user="root", password="1234", database="bmh204" ) mycursor ...
arslncanm/Kulup_otomasyon_Python_tkinter
MAYKOD/main.py
main.py
py
24,326
python
en
code
0
github-code
6
[ { "api_name": "mysql.connector.connector.connect", "line_number": 10, "usage_type": "call" }, { "api_name": "mysql.connector.connector", "line_number": 10, "usage_type": "attribute" }, { "api_name": "mysql.connector", "line_number": 10, "usage_type": "name" }, { "...
42812438276
from __future__ import print_function import numpy as np from skimage import io from tqdm import tqdm import argparse import os from config import palette, invert_palette def convert_to_color(arr_2d, palette=palette): """ grayscale labels to RGB-color encoding """ arr_3d = np.zeros((arr_2d.shape[0], arr_2d.sh...
nshaud/DeepNetsForEO
legacy/notebooks/convert_gt.py
convert_gt.py
py
2,413
python
en
code
468
github-code
6
[ { "api_name": "config.palette", "line_number": 10, "usage_type": "name" }, { "api_name": "numpy.zeros", "line_number": 12, "usage_type": "call" }, { "api_name": "numpy.uint8", "line_number": 12, "usage_type": "attribute" }, { "api_name": "config.palette.items", ...
23361190894
import os import numpy as np from numpy import array, zeros, diag, diagflat, dot import numpy from flask import Flask, render_template, request, redirect, url_for from werkzeug.utils import secure_filename import copy from os.path import join, dirname, realpath UPLOAD_FOLDER = './uploads/' ALLOWED_EXTENSIONS = set([...
konstantinkonstantinovich/Numerical-Methods-Sprint01-
Sprint01/app.py
app.py
py
9,328
python
en
code
0
github-code
6
[ { "api_name": "os.path.join", "line_number": 15, "usage_type": "call" }, { "api_name": "os.path.dirname", "line_number": 15, "usage_type": "call" }, { "api_name": "os.path.realpath", "line_number": 15, "usage_type": "call" }, { "api_name": "flask.Flask", "line...
855878754
#!/usr/bin/env python # This example shows how to extract portions of an unstructured grid # using vtkExtractUnstructuredGrid. vtkConnectivityFilter is also used # to extract connected components. # # The data found here represents a blow molding process. Blow molding # requires a mold and parison (hot, viscous plasti...
VisTrails/VisTrails
examples/vtk_examples/VisualizationAlgorithms/ExtractUGrid.py
ExtractUGrid.py
py
3,366
python
en
code
100
github-code
6
[ { "api_name": "vtk.util.misc.vtkGetDataRoot", "line_number": 14, "usage_type": "call" }, { "api_name": "vtk.vtkDataSetReader", "line_number": 20, "usage_type": "call" }, { "api_name": "vtk.vtkCastToConcrete", "line_number": 24, "usage_type": "call" }, { "api_name"...
71608494589
# coding=utf-8 import logging from datetime import datetime import markupsafe from playhouse.shortcuts import dict_to_model, model_to_dict from app import components from app.notes.model import Note, TaggedNote from app.tags import tagService from app.categories import categoryService class NoteService(components....
caiwan/cai-notepad
backend/app/notes/__init__.py
__init__.py
py
3,356
python
en
code
6
github-code
6
[ { "api_name": "app.components.Service", "line_number": 15, "usage_type": "attribute" }, { "api_name": "app.components", "line_number": 15, "usage_type": "name" }, { "api_name": "app.notes.model.Note", "line_number": 17, "usage_type": "name" }, { "api_name": "app.c...
30727489542
from pydantic import BaseModel, Field, validator class Address(BaseModel): region: str city: str street_type: str street: str house_type: str house: str value: str lat: float lng: float class Salary(BaseModel): from_: int = Field(alias='from') to: int currency: str ...
SayKonstantin/data_validation
models.py
models.py
py
1,625
python
en
code
0
github-code
6
[ { "api_name": "pydantic.BaseModel", "line_number": 4, "usage_type": "name" }, { "api_name": "pydantic.BaseModel", "line_number": 16, "usage_type": "name" }, { "api_name": "pydantic.Field", "line_number": 17, "usage_type": "call" }, { "api_name": "pydantic.BaseMode...
10565146032
from matplotlib import pyplot import matplotlib.pyplot as plt import random, operator, math from collections import defaultdict def import_data(filename): with open (filename, "r") as f: dataPoints = [(float(line.split()[1]), float(line.split()[2])) \ for line in f if '#' not ...
steffervescency/compling
exercise8/coli_ex_8.py
coli_ex_8.py
py
4,401
python
en
code
0
github-code
6
[ { "api_name": "math.sqrt", "line_number": 29, "usage_type": "call" }, { "api_name": "random.sample", "line_number": 50, "usage_type": "call" }, { "api_name": "collections.defaultdict", "line_number": 53, "usage_type": "call" }, { "api_name": "operator.itemgetter",...
73727858748
#!/usr/bin/env python3 import argparse import boutvecma import easyvvuq as uq import chaospy import os import numpy as np import time import matplotlib.pyplot as plt CAMPAIGN_NAME = "Conduction." def refine_sampling_plan(campaign, analysis, number_of_refinements): """ Refine the sampling plan. Paramet...
boutproject/VECMA-hackathon
workflows/sc_adaptive_restartable/example_restartable_sc_adaptive.py
example_restartable_sc_adaptive.py
py
8,019
python
en
code
2
github-code
6
[ { "api_name": "matplotlib.pyplot.figure", "line_number": 48, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 48, "usage_type": "name" }, { "api_name": "matplotlib.pyplot.subplots", "line_number": 61, "usage_type": "call" }, { "api_name": ...
3476194370
from collections.abc import MutableMapping from collections.abc import MutableSequence from dpath import options from dpath.exceptions import InvalidKeyName import dpath.segments _DEFAULT_SENTINAL = object() MERGE_REPLACE = (1 << 1) MERGE_ADDITIVE = (1 << 2) MERGE_TYPESAFE = (1 << 3) def __safe_path__(path, separato...
gshanko125298/Prompt-Engineering-In-context-learning-with-GPT-3-and-LLMs
myenve/Lib/site-packages/dpath/util.py
util.py
py
12,695
python
en
code
3
github-code
6
[ { "api_name": "dpath.segments.leaf", "line_number": 23, "usage_type": "call" }, { "api_name": "dpath.segments", "line_number": 23, "usage_type": "attribute" }, { "api_name": "dpath.exceptions.InvalidKeyName", "line_number": 32, "usage_type": "call" }, { "api_name"...
33126999128
from sklearn.model_selection import train_test_split from src.config import config from mindspore import Tensor import mindspore class ModelDataProcessor: def __init__(self): self.get_dict() def get_dict(self): self.word_dict = {} with open(config.vocab_file, 'r') as f: c...
Xie-Minghui/DPCNN_MS0
src/data_loader.py
data_loader.py
py
3,040
python
en
code
1
github-code
6
[ { "api_name": "src.config.config.vocab_file", "line_number": 14, "usage_type": "attribute" }, { "api_name": "src.config.config", "line_number": 14, "usage_type": "name" }, { "api_name": "sklearn.model_selection.train_test_split", "line_number": 42, "usage_type": "call" ...
26253976434
import re from bowler import Query from fissix.pytree import Node, Leaf from fissix.fixer_util import FromImport, Name, Comma, is_import from bowler.types import Capture, Filename def update_regex_to_path(regex: str) -> str: match = re.findall(r"\(\?P<(\w+)>([^\)]+)\)", regex) if match: for name, exp...
aalekseev/healthy-projects
src/django_patches/url_2_path/patch.py
patch.py
py
1,835
python
en
code
0
github-code
6
[ { "api_name": "re.findall", "line_number": 10, "usage_type": "call" }, { "api_name": "re.sub", "line_number": 18, "usage_type": "call" }, { "api_name": "re.sub", "line_number": 20, "usage_type": "call" }, { "api_name": "fissix.pytree.Node", "line_number": 24, ...
42493210531
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Nov 13 13:15:49 2018 @author: michal """ import networkx as nx from copy import deepcopy #import numpy as np from solution import Solution from random import sample class PublicationMatcher: def primitiveMaxPointsOfRest(self, publications): ...
chemiczny/pubMatch
pubMatch/publicationMatcher.py
publicationMatcher.py
py
13,317
python
en
code
0
github-code
6
[ { "api_name": "networkx.DiGraph", "line_number": 34, "usage_type": "call" }, { "api_name": "networkx.maximum_flow", "line_number": 63, "usage_type": "call" }, { "api_name": "networkx.network_simplex", "line_number": 71, "usage_type": "call" }, { "api_name": "solut...
40189093783
__author__ = 'eladron' import folium #variables lat = 32.12830 long = 34.79269 loc = [lat,long] zs = 18 tls = 'Stamen Terrain' map_path = 'App2-Leaflet_Webmaps/map_test.html' map = folium.Map(location=loc, zoom_start = zs) map.simple_marker(location=loc, popup='My address' , marker_color='purple') map.create_...
Elad73/PythonTutorials
python/Udemy/Mega_Course/App2-Leaflet_Webmaps/map.py
map.py
py
334
python
en
code
0
github-code
6
[ { "api_name": "folium.Map", "line_number": 15, "usage_type": "call" } ]
74150991549
import numpy as np import pygame as pyg from math import cos, sin from src.objects.point import Point class Cube(Point): def __init__(self, x: int, y: int, z: int, side:int, rotation: str = 'xyz', static: bool = False) -> None: super().__init__(x, y, z, rotation, static) self.center =...
FukuInTheCode/pythonMath
src/objects/cube.py
cube.py
py
1,309
python
en
code
1
github-code
6
[ { "api_name": "src.objects.point.Point", "line_number": 6, "usage_type": "name" }, { "api_name": "src.objects.point.Point", "line_number": 13, "usage_type": "call" }, { "api_name": "pygame.Surface", "line_number": 37, "usage_type": "attribute" } ]
27937808825
import logging import time import sys from selenium import webdriver from selenium.webdriver.edge.options import Options from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.by import By from selenium.webdriver.common.ke...
Zyniel/DansePlanningManager
src/app/whatsapp_bot.py
whatsapp_bot.py
py
3,082
python
en
code
0
github-code
6
[ { "api_name": "selenium.webdriver.edge.options.Options", "line_number": 21, "usage_type": "call" }, { "api_name": "selenium.webdriver.Edge", "line_number": 29, "usage_type": "call" }, { "api_name": "selenium.webdriver", "line_number": 29, "usage_type": "name" }, { ...
40883369274
import sys from kubernetes import client, config pods_templates = [ "authservice-", "cluster-local-", "istio-citadel-", "istio-galley-", "istio-ingressgateway-", "istio-nodeagent-", "istio-pilot-", "istio-policy-", "istio-security-post-install-", "istio-sidecar-injector-", "...
dzhyrov/private-manifests-1.3
private-manifests/utils/pods-validator.py
pods-validator.py
py
1,763
python
en
code
0
github-code
6
[ { "api_name": "kubernetes.config.load_kube_config", "line_number": 46, "usage_type": "call" }, { "api_name": "kubernetes.config", "line_number": 46, "usage_type": "name" }, { "api_name": "kubernetes.client.CoreV1Api", "line_number": 47, "usage_type": "call" }, { "...
37123499778
import nltk from Model.Model import Model from View.View import View from docx import Document from datetime import datetime from classes.Document import MyDocument import os import string import pymorphy2 from tkinter import filedialog from tkinter import messagebox import tkinter as tk from matplotlib.figure import F...
F1linnn/info-search-system
Controller/Controller.py
Controller.py
py
14,983
python
en
code
0
github-code
6
[ { "api_name": "Model.Model.Model", "line_number": 24, "usage_type": "call" }, { "api_name": "View.View.View", "line_number": 25, "usage_type": "call" }, { "api_name": "string.punctuation", "line_number": 28, "usage_type": "attribute" }, { "api_name": "pymorphy2.Mo...
39434532575
from collections import Counter import zarr from fastai.tabular.all import * from fastai.data.all import * from fastai.vision.gan import * from fastai import * from tsai.all import * from torch import nn import numpy as np import seaborn as sns import matplotlib.colors as mcolors import matplotlib.pyplot as plt import...
numediart/xAAEnet
main.py
main.py
py
9,638
python
en
code
1
github-code
6
[ { "api_name": "torch.device", "line_number": 25, "usage_type": "call" }, { "api_name": "torch.cuda.set_device", "line_number": 26, "usage_type": "call" }, { "api_name": "torch.cuda", "line_number": 26, "usage_type": "attribute" }, { "api_name": "torch.Tensor", ...
41550408574
import time from enum import IntEnum from .. util import log from .. project import attributes, load DEFAULT_FPS = 24 class STATE(IntEnum): ready = 0 running = 1 complete = 2 canceled = 3 max_steps = 4 timeout = 5 class Runner(object): def __init__(self, *, amt=1, fps=0, sleep_time=0, ...
ManiacalLabs/BiblioPixel
bibliopixel/animation/runner.py
runner.py
py
2,884
python
en
code
263
github-code
6
[ { "api_name": "enum.IntEnum", "line_number": 9, "usage_type": "name" }, { "api_name": "project.attributes.check", "line_number": 24, "usage_type": "call" }, { "api_name": "project.attributes", "line_number": 24, "usage_type": "name" }, { "api_name": "util.log.erro...
17634455157
#!/usr/bin/python # -*- coding: utf-8 -*- from re import I from flask import Flask from flask import request import chromadb from chromadb.config import Settings app = Flask(__name__) client = chromadb.Client(Settings(chroma_api_impl='rest', chroma_server_host='localhost', ...
aravindcz/mygpt-chromadbwrapper
controller/controller.py
controller.py
py
2,166
python
en
code
0
github-code
6
[ { "api_name": "flask.Flask", "line_number": 9, "usage_type": "call" }, { "api_name": "chromadb.Client", "line_number": 11, "usage_type": "call" }, { "api_name": "chromadb.config.Settings", "line_number": 11, "usage_type": "call" }, { "api_name": "flask.request.arg...
2116138484
""" Tests for QCFractals CLI """ import os import time import tempfile import pytest from qcfractal import testing from qcfractal.cli.cli_utils import read_config_file import yaml # def _run_tests() _options = {"coverage": True, "dump_stdout": True} _pwd = os.path.dirname(os.path.abspath(__file__)) @pytest.fixture...
yudongqiu/QCFractal
qcfractal/cli/tests/test_cli.py
test_cli.py
py
6,785
python
en
code
null
github-code
6
[ { "api_name": "os.path.dirname", "line_number": 16, "usage_type": "call" }, { "api_name": "os.path", "line_number": 16, "usage_type": "attribute" }, { "api_name": "os.path.abspath", "line_number": 16, "usage_type": "call" }, { "api_name": "tempfile.TemporaryDirect...
15251411062
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('nearsight', '0003_auto_20170718_1326'), ] operations = [ migrations.AlterField( model_name='layer', ...
venicegeo/nearsight
nearsight/migrations/0004_auto_20170718_1327.py
0004_auto_20170718_1327.py
py
426
python
en
code
0
github-code
6
[ { "api_name": "django.db.migrations.Migration", "line_number": 7, "usage_type": "attribute" }, { "api_name": "django.db.migrations", "line_number": 7, "usage_type": "name" }, { "api_name": "django.db.migrations.AlterField", "line_number": 14, "usage_type": "call" }, {...
72064206267
# -*- coding: utf-8 -*- # @Time : 2022/7/24 15:46 # @Author : 4v1d # @File : 中国招标网.py # @Software: PyCharm import httpx url = 'https://www.baidu.com' res = httpx.get(url) print(res.text)
daweiTech/Spider
爬虫/01-网络爬虫通讯原理/demo1.py
demo1.py
py
217
python
en
code
0
github-code
6
[ { "api_name": "httpx.get", "line_number": 11, "usage_type": "call" } ]
4970677598
# Importing Modules import matplotlib.pyplot as plt #%matplotlib inline # Graph Rev 7 x_values = range(1, 1001) y_values = [x**2 for x in x_values] plt.style.use('seaborn') #fig, ax = plt.subplots() fig, ax = plt.subplots(figsize=(5,3)) # Using Colormap # Colormap references: ax.scatter(x_values, y_values, c = y_v...
RaulMaya/Data-Visualization
python_programs/generating data/scatter_squares.py
scatter_squares.py
py
791
python
en
code
0
github-code
6
[ { "api_name": "matplotlib.pyplot.style.use", "line_number": 10, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.style", "line_number": 10, "usage_type": "attribute" }, { "api_name": "matplotlib.pyplot", "line_number": 10, "usage_type": "name" }, { "api_na...
33093309616
import torch import torch.nn as nn import torch.nn.functional as F from torch.distributions.categorical import Categorical device = torch.device("cuda" if torch.cuda.is_available() else "cpu") class Decoder(nn.Module): ''' This class contains the implementation of Decoder Module. Args: embedding_dim:...
facebookresearch/UNLU
codes/rnn.py
rnn.py
py
8,608
python
en
code
34
github-code
6
[ { "api_name": "torch.device", "line_number": 6, "usage_type": "call" }, { "api_name": "torch.cuda.is_available", "line_number": 6, "usage_type": "call" }, { "api_name": "torch.cuda", "line_number": 6, "usage_type": "attribute" }, { "api_name": "torch.nn.Module", ...
1688662512
from selenium import webdriver import time import csv # driver = webdriver.Chrome(r'path\to\the\chromedriver.exe') driver = webdriver.Chrome() # Go to the page that we want to scrape driver.get("https://blog.feedspot.com/usa_news_websites/") #close the pop up time.sleep(2) close_button = driver.find_element_by_xpath...
skyyaya28/NYCDSA-Webscraping
feedspot_seleium.py
feedspot_seleium.py
py
2,100
python
en
code
0
github-code
6
[ { "api_name": "selenium.webdriver.Chrome", "line_number": 6, "usage_type": "call" }, { "api_name": "selenium.webdriver", "line_number": 6, "usage_type": "name" }, { "api_name": "time.sleep", "line_number": 11, "usage_type": "call" }, { "api_name": "time.sleep", ...
15837575627
# -*- coding: utf-8 -*- # @Time : 2022/6/17 15:05 # @Author : renyumeng # @Email : 2035328756@qq.com # @File : Solve.py # @Project : ProbabilityTheoryAndMathematicalStatisticsExperiments import numpy as np import scipy.stats as sts class Solve: def __init__(self, N) -> None: self.n: int = N self._...
renyumeng1/ProbabilityTheoryAndMathematicalStatisticsExperiments
firstExper/第三题/Solve.py
Solve.py
py
1,551
python
en
code
1
github-code
6
[ { "api_name": "numpy.ndarray", "line_number": 14, "usage_type": "attribute" }, { "api_name": "numpy.array", "line_number": 25, "usage_type": "attribute" }, { "api_name": "scipy.stats.norm.rvs", "line_number": 25, "usage_type": "call" }, { "api_name": "scipy.stats....
37974301119
''' Time calculations Author: Howard Webb Date: 2/9/2023 ''' from datetime import datetime import time import math from MARSFarm_Util import * def get_day(start_date): # calculate number of days since start_date (as timestamp) now = datetime.now().timestamp() dif = now - start_date days = math.ceil(di...
webbhm/MARSFarm-VX
Time_Util.py
Time_Util.py
py
1,423
python
en
code
0
github-code
6
[ { "api_name": "datetime.datetime.now", "line_number": 14, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 14, "usage_type": "name" }, { "api_name": "math.ceil", "line_number": 16, "usage_type": "call" }, { "api_name": "math.ceil", "li...
23364168677
"""Module for parse svg file and return the position of different elements""" # Global variables ------------------------------------------------------------ GRAPH_PATH = "../ressources/graphes/" # Imports --------------------------------------------------------------------- import os import random import xml.etree...
Remyb98/chomp-sur-graphes
src/entity/parser.py
parser.py
py
4,631
python
en
code
0
github-code
6
[ { "api_name": "xml.etree.ElementTree.parse", "line_number": 22, "usage_type": "call" }, { "api_name": "xml.etree.ElementTree", "line_number": 22, "usage_type": "name" }, { "api_name": "node.Node", "line_number": 44, "usage_type": "call" }, { "api_name": "node.Arro...
35605543653
import numpy as np import init_lattice as lat import MH_algorithm as MH import Wolff_algorithm as W import autocorrelation_functions as acf import importlib importlib.reload(MH) importlib.reload(W) importlib.reload(lat) importlib.reload(acf) # Produces data of internal energy autocorrelation against sweeps and the auto...
Part-II-Computational-Physics/cluster-algorithms-for-monte-carlo-jbd29
figure_12_E.py
figure_12_E.py
py
2,040
python
en
code
0
github-code
6
[ { "api_name": "importlib.reload", "line_number": 7, "usage_type": "call" }, { "api_name": "importlib.reload", "line_number": 8, "usage_type": "call" }, { "api_name": "importlib.reload", "line_number": 9, "usage_type": "call" }, { "api_name": "importlib.reload", ...
22042359096
#Developed By: Tonumoy Mukherjee import os from scipy.io import wavfile import scipy import pandas as pd import matplotlib.pyplot as plt from matplotlib import cm import numpy as np from keras.layers import Conv2D, MaxPool2D, Flatten, LSTM from keras.layers import Dropout, Dense, TimeDistributed from keras.models imp...
Tonumoy/MFCCNet-A-Network-for-Earthquake-Early-Warning-Applications-using-Speech-Recognition-Techniques
model.py
model.py
py
13,362
python
en
code
0
github-code
6
[ { "api_name": "os.path.isfile", "line_number": 30, "usage_type": "call" }, { "api_name": "os.path", "line_number": 30, "usage_type": "attribute" }, { "api_name": "pickle.load", "line_number": 33, "usage_type": "call" }, { "api_name": "tqdm.tqdm", "line_number"...
38903193024
import argparse import csv class MergeDataset: def __call__(self, positive_handle, negative_handle, out_handle, delimiter=",", quote_character='"'): csv_writer = csv.writer(out_handle, delimiter=delimiter, quotechar=quote_character) # Write positive for r in positive_handle: ...
elangovana/sentimentanalysis-chainer-sagemaker
custom_chainer/datasetmovies/MergeDataset.py
MergeDataset.py
py
1,092
python
en
code
0
github-code
6
[ { "api_name": "csv.writer", "line_number": 8, "usage_type": "call" }, { "api_name": "argparse.ArgumentParser", "line_number": 20, "usage_type": "call" } ]
72779091069
from typing import List import hikari async def alert(event: hikari.GuildMessageCreateEvent, command: str, config, *args) -> None: guild: hikari.GatewayGuild = event.get_guild() roles: List[hikari.Role] = guild.get_roles().values() for role in roles: if role.mention == args[0] and role.name not i...
Angry-Maid/DiscordAlertBot
commands/alert.py
alert.py
py
514
python
en
code
1
github-code
6
[ { "api_name": "hikari.GuildMessageCreateEvent", "line_number": 6, "usage_type": "attribute" }, { "api_name": "hikari.GatewayGuild", "line_number": 7, "usage_type": "attribute" }, { "api_name": "typing.List", "line_number": 8, "usage_type": "name" }, { "api_name": ...
37377572966
import os import gym import joblib import cv2 import numpy as np import tensorflow as tf from collections import deque from argparse import ArgumentParser from gym import spaces from tensorflow.python.training.moving_averages import assign_moving_average cv2.ocl.setUseOpenCL(False) try: import const except: ...
fangchuan/carla-DRL
utils/common.py
common.py
py
16,371
python
en
code
0
github-code
6
[ { "api_name": "cv2.ocl.setUseOpenCL", "line_number": 13, "usage_type": "call" }, { "api_name": "cv2.ocl", "line_number": 13, "usage_type": "attribute" }, { "api_name": "const.DEBUG", "line_number": 20, "usage_type": "attribute" }, { "api_name": "const.DEBUG", ...
7326203114
import hls4ml import os import pandas as pd import seaborn as sns import matplotlib.pyplot as plt import tarfile import shutil PARSE = False data = [] data_path = 'data_pickles/data6.pkl' saved_dir = os.getcwd() if PARSE: df = pd.read_pickle(data_path) os.chdir('/eos/home-n/nghielme/') ids = df['ID'].tolis...
nicologhielmetti/enet-script
analyze_results.py
analyze_results.py
py
5,105
python
en
code
0
github-code
6
[ { "api_name": "os.getcwd", "line_number": 12, "usage_type": "call" }, { "api_name": "pandas.read_pickle", "line_number": 14, "usage_type": "call" }, { "api_name": "os.chdir", "line_number": 15, "usage_type": "call" }, { "api_name": "os.listdir", "line_number":...
33902526132
import asyncio import ssl from itertools import zip_longest import click from aiohttp import TCPConnector from aiohttp.http import HeadersParser from hls_get.downloader import HLSDownloader async def download(links, path, names, coros, headers, timeout, clean_up, verify): headers_parser = HeadersParser() he...
SoulMelody/hls-get
hls_get/cli.py
cli.py
py
2,929
python
en
code
39
github-code
6
[ { "api_name": "aiohttp.http.HeadersParser", "line_number": 13, "usage_type": "call" }, { "api_name": "aiohttp.TCPConnector", "line_number": 18, "usage_type": "call" }, { "api_name": "itertools.zip_longest", "line_number": 19, "usage_type": "call" }, { "api_name": ...
3795696476
# -*- coding: utf_8 -*- import sys import time import json import re import datetime from bs4 import BeautifulSoup from selenium import webdriver from selenium.common.exceptions import TimeoutException from selenium.common.exceptions import NoSuchElementException from selenium.webdriver.support.ui import WebD...
1neoneo3/scrape
scraping1.py
scraping1.py
py
2,819
python
en
code
0
github-code
6
[ { "api_name": "selenium.webdriver.chrome.options.Options", "line_number": 18, "usage_type": "call" }, { "api_name": "selenium.webdriver.Chrome", "line_number": 43, "usage_type": "call" }, { "api_name": "selenium.webdriver", "line_number": 43, "usage_type": "name" }, {...
31569984020
# normal libraries from inspect import signature # used in the method eval of the class import numpy as np import scipy.stats # functions of statistics # other files from corai_error import Error_type_setter from scipy.integrate import simps # my libraries np.random.seed(124) # section ############...
Code-Cornelius/ITiDeEP
src/hawkes/kernel.py
kernel.py
py
7,949
python
en
code
0
github-code
6
[ { "api_name": "numpy.random.seed", "line_number": 12, "usage_type": "call" }, { "api_name": "numpy.random", "line_number": 12, "usage_type": "attribute" }, { "api_name": "inspect.signature", "line_number": 70, "usage_type": "call" }, { "api_name": "numpy.linspace"...
75163153466
import werkzeug def test_CVE_2019_14806(): """ CVE-2019-14806 high severity Vulnerable versions: < 0.15.3 Patched version: 0.15.3 https://github.com/advisories/GHSA-gq9m-qvpx-68hc Pallets Werkzeug before 0.15.3, when used with Docker, has insufficient debugger PIN randomness because ...
e-ruiz/big-data
01-NoSQL/atividade-04/src/tests/test_security.py
test_security.py
py
533
python
en
code
1
github-code
6
[ { "api_name": "werkzeug.__version__.split", "line_number": 15, "usage_type": "call" }, { "api_name": "werkzeug.__version__", "line_number": 15, "usage_type": "attribute" } ]
17007174174
from scrapy import Spider from scrapy.selector import Selector from stack.items import StackItem with open(r'C:\Users\amarciniak\AppData\Local\Programs\Python\Python35-32\Scripts\stack\stack\spiders\links.txt') as f: linkList = f.read().splitlines() class StackSpider(Spider): name = "sta...
AdamMarciniak/SuperCrawler2
stack/stack/spiders/stack_spider.py
stack_spider.py
py
973
python
en
code
0
github-code
6
[ { "api_name": "scrapy.Spider", "line_number": 13, "usage_type": "name" }, { "api_name": "scrapy.selector.Selector", "line_number": 20, "usage_type": "call" }, { "api_name": "scrapy.selector.Selector", "line_number": 21, "usage_type": "call" }, { "api_name": "stack...
72031135549
#!/usr/bin/env python # _*_ coding: utf-8 _*_ # @Time : 2021/1/3 21:23 # @Author : mafei0728 # @Version:V 0.1 # @File : bar.py # @desc : # 1)准备数据 import matplotlib.pyplot as plt plt.rcParams['font.sans-serif'] = ['SimHei'] plt.rcParams['axes.unicode_minus'] = False movie_name = ['雷神3:诸神黄昏', '正义联盟', '寻梦环游记'] first_d...
mafei0728/pythonProject
mateplotlibDemo/day03/bar.py
bar.py
py
810
python
en
code
0
github-code
6
[ { "api_name": "matplotlib.pyplot.rcParams", "line_number": 11, "usage_type": "attribute" }, { "api_name": "matplotlib.pyplot", "line_number": 11, "usage_type": "name" }, { "api_name": "matplotlib.pyplot.rcParams", "line_number": 12, "usage_type": "attribute" }, { ...
35292064506
import pandas as pd import datetime import pickle import numpy as np from sklearn.linear_model import SGDRegressor from sklearn.preprocessing import OneHotEncoder from sklearn.preprocessing import StandardScaler from sklearn.externals import joblib import random # Codes des compagnies aériennes et l'équivalent du cod...
makboulhoussen/flightdelay
web-interface/webdelay/delayapi/flightDelayPred.py
flightDelayPred.py
py
7,291
python
en
code
0
github-code
6
[ { "api_name": "pandas.DataFrame", "line_number": 16, "usage_type": "call" }, { "api_name": "pandas.DataFrame", "line_number": 19, "usage_type": "call" }, { "api_name": "datetime.date", "line_number": 24, "usage_type": "call" }, { "api_name": "datetime.date", "...
14159077384
# coding: utf-8 from __future__ import unicode_literals from django.db import models from .utils import get_models_from_file class DynamicModelManager(models.Manager): def __init__(self, model, instance=None): super(DynamicModelManager, self).__init__() self.model = model self.instance = i...
ToxicWar/travail-de-tests
testtask/models.py
models.py
py
2,767
python
en
code
0
github-code
6
[ { "api_name": "django.db.models.Manager", "line_number": 7, "usage_type": "attribute" }, { "api_name": "django.db.models", "line_number": 7, "usage_type": "name" }, { "api_name": "django.db.models.signals.class_prepared.connect", "line_number": 36, "usage_type": "call" ...
44501822840
from flask_wtf import FlaskForm from wtforms import StringField, TextAreaField, FloatField, IntegerField, FileField, validators class DishForm(FlaskForm): name = StringField('Name', [ validators.DataRequired(), validators.Length(min=2, max=100) ]) description = TextAreaField('Description', ...
stroud91/DietCrusherProject
app/forms/dishes.py
dishes.py
py
668
python
en
code
0
github-code
6
[ { "api_name": "flask_wtf.FlaskForm", "line_number": 4, "usage_type": "name" }, { "api_name": "wtforms.StringField", "line_number": 5, "usage_type": "call" }, { "api_name": "wtforms.validators.DataRequired", "line_number": 6, "usage_type": "call" }, { "api_name": "...
9185141020
import os from absl import flags FLAGS = flags.FLAGS def get_executable_path(py_binary_name): """Returns the executable path of a py_binary. This returns the executable path of a py_binary that is in another Bazel target's data dependencies. On Linux/macOS, the path and __file__ has the same root director...
bazelbuild/bazel
third_party/py/abseil/absl/testing/_bazelize_command.py
_bazelize_command.py
py
1,658
python
en
code
21,632
github-code
6
[ { "api_name": "absl.flags.FLAGS", "line_number": 5, "usage_type": "attribute" }, { "api_name": "absl.flags", "line_number": 5, "usage_type": "name" }, { "api_name": "os.name", "line_number": 26, "usage_type": "attribute" }, { "api_name": "os.path.join", "line_...
70911317947
# -*- coding: utf-8 -*- import scrapy class AmazonBooksSpiderSpider(scrapy.Spider): name = 'amazon_books_spider' # allowed_domains = ['amazon.com'] start_urls = ['https://www.amazon.com/s?i=stripbooks&bbn=283155&rh=n%3A283155%2Cp_n_publication_date%3A1250226011%2Cp_n_feature_browse-bin%3A618073011&s=revie...
ArRosid/Scrapy-Project
scrapy_project/spiders/amazon_books_spider.py
amazon_books_spider.py
py
1,322
python
en
code
1
github-code
6
[ { "api_name": "scrapy.Spider", "line_number": 5, "usage_type": "attribute" } ]
16474430323
from rest_framework import serializers from .models import Quizzes, Question, Answer,Score class QuizSerializer(serializers.ModelSerializer): class Meta: model = Quizzes fields = [ 'title','id' ] class ScoreSerializer(serializers.ModelSerializer): user = serializers.ReadOn...
Rinz-Code/Fasalu-Rahman-Portfolio
server/quiz/serializers.py
serializers.py
py
2,218
python
en
code
1
github-code
6
[ { "api_name": "rest_framework.serializers.ModelSerializer", "line_number": 5, "usage_type": "attribute" }, { "api_name": "rest_framework.serializers", "line_number": 5, "usage_type": "name" }, { "api_name": "models.Quizzes", "line_number": 8, "usage_type": "name" }, {...
29497895962
from utils.flask.app import app from utils.db import Book from flask import request, jsonify import json @app.route('/updatespitslot', methods=['GET', 'POST']) def upload_spitslotinfo(): data = json.loads(request.get_data(as_text=True)) if data['key'] != 'updatespitslot' or 'stu_uuid' not in data.keys() or 'i...
Emanual20/StuinfoDisplayProject
server/utils/router/spitslot.py
spitslot.py
py
1,062
python
en
code
0
github-code
6
[ { "api_name": "json.loads", "line_number": 9, "usage_type": "call" }, { "api_name": "flask.request.get_data", "line_number": 9, "usage_type": "call" }, { "api_name": "flask.request", "line_number": 9, "usage_type": "name" }, { "api_name": "flask.jsonify", "lin...
43899986443
import os import test import shutil import unittest from xml.dom import minidom from xmp import XMP class XMPTestCase(unittest.TestCase): """Tests for `xmp.py`.""" def test_decode_tag_size(self): """decode_tag_size - Read section size from byte pair""" self.assertEqual(XMP.decode_tag_size(b'\...
ntieman/blender-facebook-360
test/test_xmp.py
test_xmp.py
py
3,506
python
en
code
1
github-code
6
[ { "api_name": "unittest.TestCase", "line_number": 9, "usage_type": "attribute" }, { "api_name": "xmp.XMP.decode_tag_size", "line_number": 14, "usage_type": "call" }, { "api_name": "xmp.XMP", "line_number": 14, "usage_type": "name" }, { "api_name": "xmp.XMP.decode_...
24577754108
import random from time import sleep from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.firefox.options import Options from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.firefox....
david-ajax/LGSpider-HydroOJ
main.py
main.py
py
3,329
python
en
code
1
github-code
6
[ { "api_name": "selenium.webdriver.firefox.options.Options", "line_number": 12, "usage_type": "call" }, { "api_name": "selenium.webdriver.firefox.firefox_profile.FirefoxProfile", "line_number": 15, "usage_type": "call" }, { "api_name": "selenium.webdriver.Firefox", "line_numbe...
41385226539
#!/usr/bin/env python # coding: utf-8 # # Design of a Multi-Zone VAV System (the Shorter Way) # --- # In this notebook the example from the previous notebook **Design of a Multi-Zone VAV System (the Long Way)** is repeated, but now the `VAVSystem` class will be used, which automates the design procedure of a multi-zo...
TomLXXVI/Air-Conditioning
_build/jupyter_execute/vav_multizone_design_p2.py
vav_multizone_design_p2.py
py
11,004
python
en
code
2
github-code
6
[ { "api_name": "deps.load_packages", "line_number": 13, "usage_type": "call" }, { "api_name": "jupyter_addons.set_css", "line_number": 20, "usage_type": "call" }, { "api_name": "hvac.Quantity", "line_number": 35, "usage_type": "name" }, { "api_name": "hvac.air_cond...
40014308279
from collections import deque class Cell: def __init__(self, x: int, y: int): self.x = x self.y = y class Node: def __init__(self, pt: Cell, dist: int): self.pt = pt self.dist = dist def is_valid(r, c, tr, tc): return (r >= 0) and (r < tr) and (c >= 0) and (c < tc) de...
asmitak11/sample-project
main.py
main.py
py
1,391
python
en
code
0
github-code
6
[ { "api_name": "collections.deque", "line_number": 26, "usage_type": "call" } ]
4086714077
import random import typing as t import pandas as pd import plotly.express as px import plotly.graph_objects as go from langchain.embeddings import HuggingFaceInstructEmbeddings from sklearn.metrics.pairwise import cosine_similarity from sklearn.preprocessing import MinMaxScaler from bunkatopics.datamodel import Bour...
charlesdedampierre/BunkaTopics
bunkatopics/visualisation/bourdieu.py
bourdieu.py
py
20,127
python
en
code
35
github-code
6
[ { "api_name": "pandas.options", "line_number": 18, "usage_type": "attribute" }, { "api_name": "langchain.embeddings.HuggingFaceInstructEmbeddings", "line_number": 22, "usage_type": "name" }, { "api_name": "typing.List", "line_number": 23, "usage_type": "attribute" }, ...