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
2932175669
import tensorflow as tf import numpy as np from baselines.common.mpi_adam_optimizer import MpiAdamOptimizer from baselines.common.tf_util import get_session, save_variables, load_variables from mpi4py import MPI from baselines.common.tf_util import initialize from baselines.common.mpi_util import sync_from_root # Hel...
simoninithomas/Baselines_icm
baselines/common/ICM.py
ICM.py
py
7,255
python
en
code
7
github-code
18
[ { "api_name": "tensorflow.layers.conv2d", "line_number": 12, "usage_type": "call" }, { "api_name": "tensorflow.layers", "line_number": 12, "usage_type": "attribute" }, { "api_name": "baselines.common.tf_util.get_session", "line_number": 22, "usage_type": "call" }, { ...
4987096258
import pygame import random import time import WindowControl #VARIABLES ======================================= # Enemy Values enemy_WIDTH = 65 enemy_HEIGHT = 65 enemy_IMAGES = ['Assets/enemy_mouse_brown.png', 'Assets/enemy_mouse_grey.png', 'Assets/enemy_mouse_white.png'] enemy_minSpeed = 0.5 enemy_maxSpeed = 1.2 ene...
MJeffery0/kitty-cat-blast-attack
KittyCatBlastAttack/Enemy.py
Enemy.py
py
2,200
python
en
code
0
github-code
18
[ { "api_name": "pygame.sprite", "line_number": 22, "usage_type": "attribute" }, { "api_name": "pygame.image.load", "line_number": 25, "usage_type": "call" }, { "api_name": "pygame.image", "line_number": 25, "usage_type": "attribute" }, { "api_name": "random.choice"...
12149958314
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf import tensorflow_transform as tft from tfx.components.trainer.fn_args_utils import FnArgs from tfx.examples.mnist import mnist_utils_native_keras_base as base def _get_serve_tf_examp...
srilalithaveerubhotla/TensorflowExtended
MNIST_DATASET/mnist_utils_native_keras.py
mnist_utils_native_keras.py
py
2,570
python
en
code
0
github-code
18
[ { "api_name": "tfx.examples.mnist.mnist_utils_native_keras_base.LABEL_KEY", "line_number": 21, "usage_type": "attribute" }, { "api_name": "tfx.examples.mnist.mnist_utils_native_keras_base", "line_number": 21, "usage_type": "name" }, { "api_name": "tensorflow.io.parse_example", ...
20489921263
# Importing Libraries import cv2 import numpy as np from pyzbar.pyzbar import decode # Reading Image img = cv2.imread('1.png') # Reading the file with authorized person's name with open('myDataFile.txt') as f: myDataList = f.read().splitlines() # Reading the QR-Code for barcode in decode(img): myData = barco...
Rubal0990/Computer-Vision-Advance
QR-Code_BarCode/QR-Code_Image.py
QR-Code_Image.py
py
709
python
en
code
0
github-code
18
[ { "api_name": "cv2.imread", "line_number": 7, "usage_type": "call" }, { "api_name": "pyzbar.pyzbar.decode", "line_number": 14, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 18, "usage_type": "call" }, { "api_name": "numpy.int32", "line_nu...
13601799741
import errno import json import math import multiprocessing import os import re import subprocess import time import traceback import uuid import zipfile from pprint import pprint from pathos.multiprocessing import ProcessingPool as Pool import kb_cufflinks.core.contig_id_mapping as c_mapping from AssemblyUtil.Assemb...
kbaseapps/kb_cufflinks
lib/kb_cufflinks/core/cufflinks_utils.py
cufflinks_utils.py
py
40,691
python
en
code
0
github-code
18
[ { "api_name": "time.time", "line_number": 29, "usage_type": "call" }, { "api_name": "DataFileUtil.DataFileUtilClient.DataFileUtil", "line_number": 51, "usage_type": "call" }, { "api_name": "GenomeFileUtil.GenomeFileUtilClient.GenomeFileUtil", "line_number": 52, "usage_typ...
1973725902
import morepath from munch import Munch from pytest import fixture from ekklesia_portal.identity_policy import EkklesiaPortalIdentityPolicy @fixture def identity_policy(): return EkklesiaPortalIdentityPolicy() @fixture def identity(): user = Munch(id=1) return morepath.Identity(userid=user.id, user=use...
edemocracy/ekklesia-portal
tests/test_identity_policy.py
test_identity_policy.py
py
1,272
python
en
code
16
github-code
18
[ { "api_name": "ekklesia_portal.identity_policy.EkklesiaPortalIdentityPolicy", "line_number": 10, "usage_type": "call" }, { "api_name": "pytest.fixture", "line_number": 8, "usage_type": "name" }, { "api_name": "munch.Munch", "line_number": 15, "usage_type": "call" }, {...
25802020280
"""Creating a Cartesian Communicator""" import sys from mpi4py import MPI def main(parent): """Create a 2-d Cartesian communicator from parent communicator""" dims = MPI.Compute_dims(parent.size, 2) comm = parent.Create_cart(dims, periods = [True, False]) rank = comm.Get_rank() coords = comm.Get...
EPCCed/PythonHPC
notebooks/mpi4py/example6.py
example6.py
py
650
python
en
code
10
github-code
18
[ { "api_name": "mpi4py.MPI.Compute_dims", "line_number": 9, "usage_type": "call" }, { "api_name": "mpi4py.MPI", "line_number": 9, "usage_type": "name" }, { "api_name": "sys.stdout.write", "line_number": 19, "usage_type": "call" }, { "api_name": "sys.stdout", "l...
23960335990
import sys from collections import deque sys.stdin = open('input.txt') def BFS(): while queue: x, y, breaking = queue.popleft() if x == N - 1 and y == M - 1: print(visited[x][y][breaking]) return for k in range(4): nx, ny = x + dx[k], y + dy[k] ...
RosaDamascena/Algorithm_python
Baekjoon/Graph_Traversal/14442_Breaking_Walls_and_Moving/14442_Breaking_Walls_and_Moving_2.py
14442_Breaking_Walls_and_Moving_2.py
py
1,069
python
en
code
0
github-code
18
[ { "api_name": "sys.stdin", "line_number": 3, "usage_type": "attribute" }, { "api_name": "collections.deque", "line_number": 30, "usage_type": "call" } ]
11172361301
""" Surely a fragile parser, but gets things started and will evolve over time I guess. It seems that a lot of the json data does not have any securityData data So these are just skipped, since there is nothing much to do with them here """ import json from dojo.models import Finding class SonatypeParser(object): ...
DefectDojo/django-DefectDojo
dojo/tools/sonatype/parser.py
parser.py
py
5,940
python
en
code
3,128
github-code
18
[ { "api_name": "json.load", "line_number": 23, "usage_type": "call" }, { "api_name": "dojo.models.Finding", "line_number": 131, "usage_type": "call" } ]
27936099500
import gym import numpy as np from actor_critic_agent import ActorCriticAgent from ploting import plot_agent_learning if __name__ == '__main__': load_agent = False testing_agent = False plot_data = True render_walker = True if render_walker: env = gym.make("BipedalWalker-v3", render_mode='...
Paul513607/bipedal-walker
DDPG/main.py
main.py
py
2,005
python
en
code
0
github-code
18
[ { "api_name": "gym.make", "line_number": 13, "usage_type": "call" }, { "api_name": "gym.make", "line_number": 15, "usage_type": "call" }, { "api_name": "actor_critic_agent.ActorCriticAgent", "line_number": 16, "usage_type": "call" }, { "api_name": "numpy.mean", ...
27738511004
import json import os import random import time from pathlib import Path import numpy as np import torch import torchvision from torch import nn from torch.utils.tensorboard import SummaryWriter from tqdm.auto import tqdm class Logger: def __init__(self, logdir: Path, step: int): self._logdir = Path(logd...
shivakanthsujit/reducible-loss
Rainbow/logger.py
logger.py
py
3,584
python
en
code
6
github-code
18
[ { "api_name": "pathlib.Path", "line_number": 16, "usage_type": "name" }, { "api_name": "pathlib.Path", "line_number": 17, "usage_type": "call" }, { "api_name": "torch.utils.tensorboard.SummaryWriter", "line_number": 18, "usage_type": "call" }, { "api_name": "torch...
19500660312
""" Week 1 - Coding Assignment Specification : Print out table name and their row count Author : Antara Saha """ # Import Libraries import duckdb conn = duckdb.connect(database='main_DB_95797') # Connect To DuckDB Database # To fetch table name result = conn.execute("SHOW TABLES;").fetchall() table_list = [row[0] for...
Antara-Saha/95797-Template
scripts/dump_raw_counts.py
dump_raw_counts.py
py
614
python
en
code
1
github-code
18
[ { "api_name": "duckdb.connect", "line_number": 9, "usage_type": "call" } ]
11739195240
#Setup # To support both python 2 and python 3 from __future__ import division, print_function, unicode_literals # Common imports import numpy as np import os # to make this notebook's output stable across runs def reset_graph(seed=42): tf.reset_default_graph() tf.set_random_seed(seed) np.rand...
MurDoDePar/TestTensorflowJava
TestTensorflowJava/src/org/murdodepar/ageron/ch10/chapitre_10_01.py
chapitre_10_01.py
py
5,647
python
en
code
0
github-code
18
[ { "api_name": "numpy.random.seed", "line_number": 13, "usage_type": "call" }, { "api_name": "numpy.random", "line_number": 13, "usage_type": "attribute" }, { "api_name": "matplotlib.pyplot.rcParams", "line_number": 19, "usage_type": "attribute" }, { "api_name": "m...
12832933181
#!/usr/bin/env python3 """ Unit tests """ import unittest from stl import STL class TestSTL(unittest.TestCase): """ Unit tests """ def test_load_stl(self): """ loading test """ stl = STL() stl.load("models/Tux_printable.stl") self.assertEqual(len(stl.tri...
XAMEUS/bpi_cutter
test.py
test.py
py
493
python
en
code
0
github-code
18
[ { "api_name": "unittest.TestCase", "line_number": 9, "usage_type": "attribute" }, { "api_name": "stl.STL", "line_number": 17, "usage_type": "call" }, { "api_name": "stl.load", "line_number": 18, "usage_type": "call" }, { "api_name": "stl.triangles", "line_numb...
41142017049
from django.urls import path from django.conf import settings from . import views urlpatterns = [ path('main/', views.main, name='main'), path('signup/', views.signup, name='signup'), path('login/', views.login, name='login'), path('add/', views.add, name='add'), path('addstudent/', views....
marc2002-8-0169/Ams-Django-App
amsapps/urls.py
urls.py
py
597
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", ...
36241837655
import logging import asyncio from amqtt.client import MQTTClient, ConnectException from amqtt.mqtt.constants import QOS_1, QOS_2 # # This sample shows how to publish messages to broker using different QOS # Debug outputs shows the message flows # logger = logging.getLogger(__name__) config = { "will": { ...
Yakifo/amqtt
samples/client_publish.py
client_publish.py
py
1,779
python
en
code
103
github-code
18
[ { "api_name": "logging.getLogger", "line_number": 13, "usage_type": "call" }, { "api_name": "amqtt.client.MQTTClient", "line_number": 26, "usage_type": "call" }, { "api_name": "asyncio.ensure_future", "line_number": 29, "usage_type": "call" }, { "api_name": "async...
12633149660
import pytesseract from PIL import Image from selenium.webdriver import Chrome from selenium.webdriver.common.by import By from selenium.webdriver.support.relative_locator import with_tag_name from selenium.webdriver.chrome.options import Options from selenium.webdriver.common.action_chains import ActionChains from tab...
JADcooler/sunscreen
chec.py
chec.py
py
2,328
python
en
code
1
github-code
18
[ { "api_name": "pytesseract.image_to_string", "line_number": 11, "usage_type": "call" }, { "api_name": "PIL.Image.open", "line_number": 11, "usage_type": "call" }, { "api_name": "PIL.Image", "line_number": 11, "usage_type": "name" }, { "api_name": "selenium.webdriv...
30354791486
import os from sqlalchemy import Column, String, Integer, Date, ForeignKey from sqlalchemy.orm import relationship from flask_sqlalchemy import SQLAlchemy from flask import jsonify import json DATABASE_NAME = "capstone_fsnd" DATABASE_PATH = os.environ['DATABASE_URL'] db = SQLAlchemy() ''' setup_db(app) binds a f...
JuliaFC/FSND-Capstone
models.py
models.py
py
3,746
python
en
code
0
github-code
18
[ { "api_name": "os.environ", "line_number": 10, "usage_type": "attribute" }, { "api_name": "flask_sqlalchemy.SQLAlchemy", "line_number": 11, "usage_type": "call" }, { "api_name": "sqlalchemy.Column", "line_number": 47, "usage_type": "call" }, { "api_name": "sqlalch...
70686180841
from dcim.choices import DeviceStatusChoices from dcim.models import Device from virtualization.choices import VirtualMachineStatusChoices from virtualization.models import VirtualMachine from ipam.choices import IPAddressStatusChoices from extras.reports import Report # CheckPrimaryAddress reports forked from https:/...
netbox-community/customizations
reports/ipam-reports/ip-primary-find.py
ip-primary-find.py
py
4,070
python
en
code
163
github-code
18
[ { "api_name": "extras.reports.Report", "line_number": 9, "usage_type": "name" }, { "api_name": "dcim.models.Device.objects.filter", "line_number": 13, "usage_type": "call" }, { "api_name": "dcim.models.Device.objects", "line_number": 13, "usage_type": "attribute" }, {...
26166090264
from model import MLP from optimizer import SGD import argparse from tqdm import tqdm from dataset import MNIST_Dataset import cfg import random import numpy as np from utils import AverageMeter,compute_acc,Accuracy_averagemeter from tensor import Tensor import logging import os import matplotlib.pyplot as plt import p...
HustQBW/torch-like_numpy_MLP
train.py
train.py
py
5,535
python
en
code
0
github-code
18
[ { "api_name": "random.seed", "line_number": 17, "usage_type": "call" }, { "api_name": "numpy.random.seed", "line_number": 18, "usage_type": "call" }, { "api_name": "numpy.random", "line_number": 18, "usage_type": "attribute" }, { "api_name": "argparse.ArgumentPars...
29392581248
import json, os, logging, re, requests, urllib.parse as urlparse # import json, os, logging, requests, datetime logger = logging.getLogger() logger.setLevel(logging.INFO) session_requests = requests.session(); ### Handler ### def lambda_handler(event, context): global session_requests logger.info("## EV...
dnishiyama/convertkit_wrapper
lambdas/convertKitElementorFormSubmission/lambda_function.py
lambda_function.py
py
9,763
python
en
code
0
github-code
18
[ { "api_name": "logging.getLogger", "line_number": 4, "usage_type": "call" }, { "api_name": "logging.INFO", "line_number": 5, "usage_type": "attribute" }, { "api_name": "requests.session", "line_number": 7, "usage_type": "call" }, { "api_name": "urllib.parse.parse_...
8187322106
from pydantic import BaseModel from distances.entities import Address from .interactor import ComputeDistanceUCI class AddressM(BaseModel): street: str house_number: int city: str country: str class ComputeDistanceReqM(BaseModel): origin: AddressM destination: AddressM def compute_distance_...
gomesmf/geodapi
distances/usecases/ComputeDistance/controller.py
controller.py
py
908
python
en
code
0
github-code
18
[ { "api_name": "pydantic.BaseModel", "line_number": 7, "usage_type": "name" }, { "api_name": "pydantic.BaseModel", "line_number": 13, "usage_type": "name" }, { "api_name": "interactor.ComputeDistanceUCI", "line_number": 18, "usage_type": "call" }, { "api_name": "di...
37847786650
import numpy as np import typing from defenses.detection.fourier.FourierPeakMatrixCollector import FourierPeakMatrixCollector from defenses.detection.DetectionDefense import DetectionDefense from scaling.ScalingApproach import ScalingApproach from utils.SimilarityMeasurementTool import SimilarityMeasurementTool from u...
EQuiw/2023-detection-scalingattacks
scaleatt/defenses/detection/filtering/PrevBasedFilteringDetectionDefense.py
PrevBasedFilteringDetectionDefense.py
py
3,053
python
en
code
0
github-code
18
[ { "api_name": "defenses.detection.DetectionDefense.DetectionDefense", "line_number": 14, "usage_type": "name" }, { "api_name": "scaling.ScalingApproach.ScalingApproach", "line_number": 24, "usage_type": "name" }, { "api_name": "defenses.prevention.PreventionDefenseType.Prevention...
17008620271
"""Wrapper around mongosym to download everything required.""" import argparse import logging import os import shutil import subprocess import sys import structlog from buildscripts import mongosymb from buildscripts.resmokelib.plugin import PluginInterface, Subcommand from buildscripts.resmokelib.setup_multiversion....
2663667310/mongo
buildscripts/resmokelib/symbolizer/__init__.py
__init__.py
py
9,282
python
en
code
null
github-code
18
[ { "api_name": "structlog.getLogger", "line_number": 16, "usage_type": "call" }, { "api_name": "logging.DEBUG", "line_number": 31, "usage_type": "attribute" }, { "api_name": "logging.INFO", "line_number": 31, "usage_type": "attribute" }, { "api_name": "logging.basi...
39327894417
# coding: utf-8 # In[13]: import numpy as np import pandas as pd import matplotlib.pyplot as plt from sklearn.feature_selection import SelectKBest, chi2, mutual_info_classif from sklearn.preprocessing import MinMaxScaler from sklearn.ensemble import RandomForestClassifier from sklearn import svm from sklearn.deco...
Nisarg9795/Anomaly-Detection-APS-failures-in-Scania-trucks
3_PCA_SVM _ RF.py
3_PCA_SVM _ RF.py
py
5,298
python
en
code
1
github-code
18
[ { "api_name": "numpy.concatenate", "line_number": 27, "usage_type": "call" }, { "api_name": "sklearn.preprocessing.MinMaxScaler", "line_number": 38, "usage_type": "call" }, { "api_name": "pandas.DataFrame", "line_number": 39, "usage_type": "call" }, { "api_name": ...
37059565369
from PyQt6.QtWidgets import QWidget, QVBoxLayout, QPushButton, QGroupBox, QHBoxLayout from src.service import ModService class MainView(QWidget): def __init__(self, service: ModService): super().__init__() self.service = service self.list_view = None self.canvas = None sel...
coasldry/GenshinVoiceManager
src/gui/view/main.py
main.py
py
1,066
python
en
code
null
github-code
18
[ { "api_name": "PyQt6.QtWidgets.QWidget", "line_number": 5, "usage_type": "name" }, { "api_name": "src.service.ModService", "line_number": 6, "usage_type": "name" }, { "api_name": "PyQt6.QtWidgets.QVBoxLayout", "line_number": 16, "usage_type": "call" }, { "api_name...
21975167099
from django.urls import path from django.conf import settings from django.conf.urls.static import static from .views import ClienteList,ClienteCreate,ClienteUpdate,ClienteDelete from .views import EnderecoList,EnderecoCreate,EnderecoUpdate,EnderecoDelete from cadastros.api.viewsets import EnderecoAPIView,ListarEnderec...
GiovanaThais/cbv
cadastros/urls.py
urls.py
py
1,528
python
en
code
1
github-code
18
[ { "api_name": "django.urls.path", "line_number": 9, "usage_type": "call" }, { "api_name": "views.ClienteList.as_view", "line_number": 9, "usage_type": "call" }, { "api_name": "views.ClienteList", "line_number": 9, "usage_type": "name" }, { "api_name": "django.urls...
29967533778
import wx ######################################################################## ######################################################################## class PanelTwo(wx.Panel): """""" #---------------------------------------------------------------------- def __init__(self, parent): """Con...
Kriandir/guiprog
panelswitcher.py
panelswitcher.py
py
2,660
python
en
code
0
github-code
18
[ { "api_name": "wx.Panel", "line_number": 8, "usage_type": "attribute" }, { "api_name": "wx.Panel.__init__", "line_number": 14, "usage_type": "call" }, { "api_name": "wx.Panel", "line_number": 14, "usage_type": "attribute" }, { "api_name": "wx.GridBagSizer", "l...
2257149681
#!/usr/bin/env python import csv import os import sys from scripts.commons import commons # parameters from ENV from dotenv import load_dotenv load_dotenv('../.env') CKAN_URL = os.getenv('CKAN_URL') FILE_PATH = os.getenv('VOCABULARY_LIST_PATH') # parameters VOCABULARY_NAME = "schemaorg" def edit_vocabulary(name:...
wake-ua/ckan-scripts
init_vocabularies/init_vocabularies.py
init_vocabularies.py
py
1,998
python
en
code
0
github-code
18
[ { "api_name": "dotenv.load_dotenv", "line_number": 11, "usage_type": "call" }, { "api_name": "os.getenv", "line_number": 13, "usage_type": "call" }, { "api_name": "os.getenv", "line_number": 14, "usage_type": "call" }, { "api_name": "scripts.commons.commons.LANGS"...
73480670760
from json import JSONDecodeError from logging import getLogger import colander from pyramid.decorator import reify from pyramid.traversal import find_root from kedja.core.mutator import Mutator from kedja.permissions import VIEW from kedja.utils import init_schema from kedja.utils import get_permission_name from kedj...
kedjaproject/kedja_server
src/kedja/views/api/base.py
base.py
py
6,570
python
en
code
0
github-code
18
[ { "api_name": "logging.getLogger", "line_number": 15, "usage_type": "call" }, { "api_name": "pyramid.traversal.find_root", "line_number": 33, "usage_type": "call" }, { "api_name": "pyramid.decorator.reify", "line_number": 31, "usage_type": "name" }, { "api_name": ...
14746461991
from os import P_NOWAIT, name from sys import argv, exit import logging from typing import TYPE_CHECKING logging.basicConfig( level=logging.DEBUG, filename="log/log-parser.txt", filemode="w", format="%(filename)10s:%(lineno)4d:%(message)s" ) log = logging.getLogger() # Importando o YACC import ply.ya...
tuchinski/compiladores-semantica
sintatica.py
sintatica.py
py
25,464
python
pt
code
0
github-code
18
[ { "api_name": "logging.basicConfig", "line_number": 7, "usage_type": "call" }, { "api_name": "logging.DEBUG", "line_number": 8, "usage_type": "attribute" }, { "api_name": "logging.getLogger", "line_number": 13, "usage_type": "call" }, { "api_name": "mytree.MyNode"...
40283226475
import os import os.path import random from pathlib import Path import pickle from PIL import Image from validate import validate_heatmap from main import config #ad_class = ['bottle', 'cable', 'capsule', 'carpet', 'grid', 'hazelnut', 'leather', 'metal_nut', 'pill', 'screw', 'tile', 'toothbrush', 'transistor', ...
FieldTien/MvtecAD_DFR
plot_heatmap.py
plot_heatmap.py
py
1,417
python
en
code
0
github-code
18
[ { "api_name": "main.config", "line_number": 11, "usage_type": "call" }, { "api_name": "os.path.exists", "line_number": 15, "usage_type": "call" }, { "api_name": "os.path", "line_number": 15, "usage_type": "attribute" }, { "api_name": "os.makedirs", "line_numbe...
3272737831
import jax.numpy as jnp from jax import jit, device_put from bench.core.executer import Executer def gen_base_anchors(base_size, ratios, scales): w = base_size h = base_size x_ctr = 0.5 * (w - 1) y_ctr = 0.5 * (h - 1) h_ratios = jnp.sqrt(ratios) w_ratios = 1 / h_ratios ws = (w * w_ratios[:...
DeepLink-org/DLOP-Bench
bench/samples/long_tail/gen_base_anchors/jax_impl.py
jax_impl.py
py
888
python
en
code
38
github-code
18
[ { "api_name": "jax.numpy.sqrt", "line_number": 11, "usage_type": "call" }, { "api_name": "jax.numpy", "line_number": 11, "usage_type": "name" }, { "api_name": "jax.numpy.stack", "line_number": 16, "usage_type": "call" }, { "api_name": "jax.numpy", "line_number...
6671138404
from math import dist, pi import random from time import sleep import numpy as np import pygame from typing import List, Tuple from Laser import Laser from Maps import check_continue, check_movements, draw_robot, scatter_robots from Robot import Robot from Odometry import Linear, Angular def simulation(Map: pygame.Su...
nikhil-kamath/particle-filter-localization
Simulation.py
Simulation.py
py
7,785
python
en
code
1
github-code
18
[ { "api_name": "pygame.Surface", "line_number": 13, "usage_type": "attribute" }, { "api_name": "typing.Tuple", "line_number": 14, "usage_type": "name" }, { "api_name": "Robot.Robot", "line_number": 15, "usage_type": "name" }, { "api_name": "typing.Tuple", "line...
41591478308
from tkinter.filedialog import askopenfilename from calendar import c from tkinter import messagebox from pytube import YouTube import PySimpleGUI as psg from PySimpleGUI import * import moviepy.editor psg.theme('DarkGray2') layout = [ [psg.Image(source="d1.png")], [psg.Text('Coloque o link do vid...
Nexusviwer/Youtube-Video-downloader-and-mp3-converter
GUI.py
GUI.py
py
996
python
en
code
6
github-code
18
[ { "api_name": "PySimpleGUI.theme", "line_number": 10, "usage_type": "call" }, { "api_name": "PySimpleGUI.Image", "line_number": 12, "usage_type": "call" }, { "api_name": "PySimpleGUI.Text", "line_number": 13, "usage_type": "call" }, { "api_name": "PySimpleGUI.Inpu...
41847924085
from dataclasses import asdict, is_dataclass from typing import List from uuid import UUID import pymongo.errors from eventsourcing.application import Application from eventsourcing.persistence import Transcoder, InfrastructureFactory from src.const import IN_PRODUCTION from src.data_access.query_table_dao import Quer...
byt3-m3/boe
src/applications/boe_app.py
boe_app.py
py
9,873
python
en
code
1
github-code
18
[ { "api_name": "src.data_access.query_table_dao.QueryTableDAO", "line_number": 40, "usage_type": "call" }, { "api_name": "eventsourcing.application.Application", "line_number": 43, "usage_type": "name" }, { "api_name": "src.enums.PermissionsEnum.ADMIN", "line_number": 51, ...
32908787849
from fastapi import APIRouter from crud.users import CRUDUser from schemas import UserSchema, UserInDBSchema router = APIRouter() #limit: int = 10, skip: int = 100 @router.get("/") async def read_users(): return await CRUDUser.get_all() @router.post("/", response_model=UserSchema) async def add(user: UserSche...
Vladvlad9/FastAppi.github.io
endpoints/users.py
users.py
py
496
python
en
code
0
github-code
18
[ { "api_name": "fastapi.APIRouter", "line_number": 6, "usage_type": "call" }, { "api_name": "crud.users.CRUDUser.get_all", "line_number": 12, "usage_type": "call" }, { "api_name": "crud.users.CRUDUser", "line_number": 12, "usage_type": "name" }, { "api_name": "sche...
38432089618
import argparse import os.path as osp import yaml import cv2 import _init_path from lib.torch_utils import select_device from lib.general import check_img_size from lib.datasets import LoadImages from lib.yolo import Model from lib.experimental import load_weights from lib.general import scale_coords from tools.val i...
sjzyzz/kapao_reproduce
tools/image.py
image.py
py
5,856
python
en
code
0
github-code
18
[ { "api_name": "argparse.ArgumentParser", "line_number": 17, "usage_type": "call" }, { "api_name": "yaml.safe_load", "line_number": 64, "usage_type": "call" }, { "api_name": "lib.torch_utils.select_device", "line_number": 76, "usage_type": "call" }, { "api_name": "...
37649993642
#!/usr/bin/env python3 import subprocess import os import threading import logging import yaml import time from datetime import datetime import queue import station class QMFNetOp: SETTTINGS_FILE='settings.yml' """ QMF network operation """ def querySn(self, sn): """ paramet...
doublechiang/QMFRacklog
qmfnetop.py
qmfnetop.py
py
7,757
python
en
code
0
github-code
18
[ { "api_name": "queue.Queue", "line_number": 26, "usage_type": "call" }, { "api_name": "threading.Thread", "line_number": 33, "usage_type": "call" }, { "api_name": "subprocess.CalledProcessError", "line_number": 42, "usage_type": "attribute" }, { "api_name": "datet...
13124948911
from typing import Tuple import pandas as pd from sklearn.preprocessing import StandardScaler from sklearn.decomposition import PCA # Separate S&P500 and SPX returns def get_spx_df( fold_train : pd.DataFrame, fold_test : pd.DataFrame) -> Tuple[pd.DataFrame]: ''' Returns 4 dataframes: (fold_train_50...
FelTelb/financial_stocks_941
financial_stocks_941/ml_logic/pseudo_alpha.py
pseudo_alpha.py
py
5,839
python
en
code
0
github-code
18
[ { "api_name": "pandas.DataFrame", "line_number": 8, "usage_type": "attribute" }, { "api_name": "pandas.DataFrame", "line_number": 9, "usage_type": "attribute" }, { "api_name": "typing.Tuple", "line_number": 9, "usage_type": "name" }, { "api_name": "pandas.DataFram...
12121070330
from collections import namedtuple import random from typing import List from aiogram import types from aiogram.dispatcher import FSMContext from aiogram.types import ReplyKeyboardMarkup, KeyboardButton, InlineKeyboardMarkup, InlineKeyboardButton, \ ReplyKeyboardRemove from aiogram.utils.callback_data import Callb...
VlaSerega/quiz-bot
async_bot/dialog_branches/utils.py
utils.py
py
3,916
python
en
code
0
github-code
18
[ { "api_name": "collections.namedtuple", "line_number": 13, "usage_type": "call" }, { "api_name": "aiogram.utils.callback_data.CallbackData", "line_number": 15, "usage_type": "call" }, { "api_name": "aiogram.utils.callback_data.CallbackData", "line_number": 16, "usage_type...
70966009000
import json import datetime from django.contrib.auth.decorators import login_required from django.contrib.auth.models import User from django.core import serializers from django.http import JsonResponse from django.shortcuts import render from django.utils import timezone from django.views.decorators.clickjacking impor...
cuiliang0302/myblog
management/views.py
views.py
py
38,599
python
en
code
6
github-code
18
[ { "api_name": "django.shortcuts.render", "line_number": 22, "usage_type": "call" }, { "api_name": "django.contrib.auth.decorators.login_required", "line_number": 18, "usage_type": "call" }, { "api_name": "management.tools.BaiduApi", "line_number": 30, "usage_type": "call"...
24253043034
import time from flask import Flask, Response from degiro_operator import attempt_trade_degiro, get_stocks_info, place_buy_orders, update_trailing_order_data, \ update_current_PL_degiro import ftx_operator from threading import Thread # from memory_profiler import profile from interactive_broker_operator import tri...
andresduarte94/auto-trading-stocks
main.py
main.py
py
2,579
python
en
code
0
github-code
18
[ { "api_name": "flask.Flask", "line_number": 10, "usage_type": "call" }, { "api_name": "flask.Response", "line_number": 25, "usage_type": "call" }, { "api_name": "degiro_operator.get_stocks_info", "line_number": 37, "usage_type": "call" }, { "api_name": "degiro_ope...
27274023331
from django.shortcuts import render, HttpResponse ''' Docs: EClient: https://interactivebrokers.github.io/tws-api/classIBApi_1_1EClient.html Ewrapper: https://interactivebrokers.github.io/tws-api/interfaceIBApi_1_1EWrapper.html Market Data: https://interactivebrokers.github.io/tws-api/top_data.html Cancel MKT data: ht...
ashaffir/stocks_management
ib_api/archive/views_bak3.py
views_bak3.py
py
4,092
python
en
code
0
github-code
18
[ { "api_name": "django.shortcuts.render", "line_number": 52, "usage_type": "call" }, { "api_name": "django.shortcuts.render", "line_number": 62, "usage_type": "call" }, { "api_name": "ibapi.client.EClient", "line_number": 64, "usage_type": "name" }, { "api_name": "...
16421664796
from django.urls import path from projects import views # name our app_name the same as our app that we are app_name = 'projects' # We create this one so that it know when it gets redirected to '', push forward to projects views.py # this path adds another path. so now we need website/projects/test for it to w...
drewbeno1/django-portfolio
projects/urls.py
urls.py
py
1,010
python
en
code
0
github-code
18
[ { "api_name": "django.urls.path", "line_number": 11, "usage_type": "call" }, { "api_name": "projects.views.all_projects", "line_number": 11, "usage_type": "attribute" }, { "api_name": "projects.views", "line_number": 11, "usage_type": "name" }, { "api_name": "djan...
108727460
import json import os from creature_formatter import format_monster if __name__ == "__main__": dirpath = os.path.dirname(os.path.realpath(__file__)) output_folder = f'{dirpath}/../output' crawler_repo = '../../spanish-srd5.1-crawl/output/monsters.json' with open(f'{dirpath}/{crawler_repo}', 'r') as f...
spanish-dnd5/improved-initiative
src/main.py
main.py
py
705
python
en
code
0
github-code
18
[ { "api_name": "os.path.dirname", "line_number": 8, "usage_type": "call" }, { "api_name": "os.path", "line_number": 8, "usage_type": "attribute" }, { "api_name": "os.path.realpath", "line_number": 8, "usage_type": "call" }, { "api_name": "json.load", "line_numb...
32365975437
import logging import requests from odoo.exceptions import UserError from odoo.tests import Form, common logger = logging.getLogger(__name__) class TestBaseLocation(common.TransactionCase): def setUp(self): super().setUp() self.thailand = self.env.ref("base.th") self.belgium = self.env....
OCA/l10n-thailand
l10n_th_base_location/tests/test_base_location.py
test_base_location.py
py
4,541
python
en
code
47
github-code
18
[ { "api_name": "logging.getLogger", "line_number": 8, "usage_type": "call" }, { "api_name": "odoo.tests.common.TransactionCase", "line_number": 11, "usage_type": "attribute" }, { "api_name": "odoo.tests.common", "line_number": 11, "usage_type": "name" }, { "api_nam...
34023163308
import os from typing import Any, Optional, Literal from asgiref.sync import sync_to_async from langchain.tools import Tool from metaphor_python import Metaphor from ix.chains.loaders.tools import extract_tool_kwargs METAPHOR_METHODS = Literal["search", "get_contents", "find_similar"] def get_metaphor_tool( m...
kreneskyp/ix
ix/tools/metaphor.py
metaphor.py
py
1,904
python
en
code
809
github-code
18
[ { "api_name": "typing.Literal", "line_number": 11, "usage_type": "name" }, { "api_name": "typing.Optional", "line_number": 17, "usage_type": "name" }, { "api_name": "typing.Any", "line_number": 18, "usage_type": "name" }, { "api_name": "ix.chains.loaders.tools.ext...
17051479950
from matplotlib import pyplot import numpy def matplotlib_function(x_ingredients_embedded1_arg, x_ingredients_embedded2_arg, words_arg, colors, sizes, title, labels): # Retrieve all of the vectors from a trained model as follows fig_matplotlib, (ax1, ax2) = pyplot.subplots(nrows=1, ncols=2, figsize=(24, 12),...
luisdrita/HyperFoods
algorithms/view/matplotlib_designed.py
matplotlib_designed.py
py
1,144
python
en
code
59
github-code
18
[ { "api_name": "matplotlib.pyplot.subplots", "line_number": 8, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 8, "usage_type": "name" }, { "api_name": "numpy.array", "line_number": 13, "usage_type": "call" }, { "api_name": "numpy.array", ...
6237354457
import inspect import logging from os import path from urllib.parse import quote from metadata.util.os import dir_create from metadata.vendor.simple_json_log_formatter import SimpleJsonFormatter from metadata_biz.db_models.bkdata import basic as basic_models from metadata_contents.config.by_environment.default_conf im...
Tencent/bk-base
support-files/datamgr/metadata/templates/metadata#metadata_contents#config#by_environment#templated_conf.py
metadata#metadata_contents#config#by_environment#templated_conf.py
py
10,613
python
en
code
85
github-code
18
[ { "api_name": "socket.gethostname", "line_number": 25, "usage_type": "call" }, { "api_name": "logging.LogRecord", "line_number": 30, "usage_type": "attribute" }, { "api_name": "logging.LogRecord", "line_number": 37, "usage_type": "attribute" }, { "api_name": "meta...
72580959400
# -*- coding:UTF-8 -*- import tushare as ts import numpy as np import pandas as pd import os import time import datetime import sys import math import preprocess sys.path.append("..") from common import base_common from common import np_common def DecayTest(): label_days = 6 show_data_1 = np.zeros((label_day...
Isaaclin007/tensorflow
regression/stockv2/test.py
test.py
py
869
python
en
code
0
github-code
18
[ { "api_name": "sys.path.append", "line_number": 13, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 13, "usage_type": "attribute" }, { "api_name": "numpy.zeros", "line_number": 19, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_num...
73413916520
import numpy as np # to work with arrays import matplotlib.pyplot as plt # to plot import streamlit as st # to build UI import tensorflow as tf from PIL import Image # to work with images # let's load the model model = tf.keras.models.load_model('cifar10_model.h5') def main(): st.title("Image Classifier") ...
paulaji/image-classifier
main.py
main.py
py
3,111
python
en
code
0
github-code
18
[ { "api_name": "tensorflow.keras.models.load_model", "line_number": 8, "usage_type": "call" }, { "api_name": "tensorflow.keras", "line_number": 8, "usage_type": "attribute" }, { "api_name": "streamlit.title", "line_number": 12, "usage_type": "call" }, { "api_name":...
72655119399
from pytest import fixture, mark from shorter.database import CRUDMixin from shorter.start.extensions import DB # pylint: disable=no-member PAYLOAD = "omg wtf bbq" LAYPOAD = "napfkuchen!" class CRUDMixinPhony(CRUDMixin, DB.Model): prime = DB.Column(DB.Integer(), primary_key=True) value = DB.Column(DB.Strin...
spookey/shorter
tests/test_database_crudmixin.py
test_database_crudmixin.py
py
2,292
python
en
code
1
github-code
18
[ { "api_name": "shorter.database.CRUDMixin", "line_number": 12, "usage_type": "name" }, { "api_name": "shorter.start.extensions.DB.Model", "line_number": 12, "usage_type": "attribute" }, { "api_name": "shorter.start.extensions.DB", "line_number": 12, "usage_type": "name" ...
1918750372
#! /usr/bin/env python # -*- coding: utf-8 -*- # """ Module is containing all necessary global variables for the package. Module also has the ability to read user-defined data from two paths: - ``$HOME/_SETTINGS_PATH`` - ``/etc/_SETTINGS_PATH`` See :attr:`_SETTINGS_PATH` for details. Note: If the first path is ...
edeposit/edeposit.amqp.rest
src/edeposit/amqp/rest/settings.py
settings.py
py
4,658
python
en
code
1
github-code
18
[ { "api_name": "os.path.exists", "line_number": 110, "usage_type": "call" }, { "api_name": "os.path", "line_number": 110, "usage_type": "attribute" }, { "api_name": "os.access", "line_number": 110, "usage_type": "call" }, { "api_name": "os.W_OK", "line_number":...
37024146137
from django.urls import path from . import views urlpatterns = [ path('images/', views.images), path('timeline/', views.timeline), path('timeline/more_scene/', views.more_scenes), path('timeline/group/', views.timeline_group), path('timeline/info/', views.detailed_info), path('more/', views.mo...
allie-tran/lsc2020-backend
project/images/urls.py
urls.py
py
575
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", ...
13563596353
from django.conf import settings from django.utils.translation import gettext_lazy as _ from django.utils.timezone import make_naive from easy_thumbnails.templatetags.thumbnail import thumbnail_url from rest_framework import serializers from apps.autenticacion.models import Ciudad from apps.empresa.models import Prod...
silaves/OdinApi_v03
apps/ecommerce/serializers.py
serializers.py
py
10,128
python
es
code
0
github-code
18
[ { "api_name": "rest_framework.serializers.ModelSerializer", "line_number": 15, "usage_type": "attribute" }, { "api_name": "rest_framework.serializers", "line_number": 15, "usage_type": "name" }, { "api_name": "rest_framework.serializers.JSONField", "line_number": 16, "usa...
28827242871
import numpy as np from edt import edt from numba import njit, prange from porespy.filters import trim_disconnected_blobs, pc_to_satn from porespy import settings from porespy.tools import get_tqdm, Results tqdm = get_tqdm() __all__ = [ 'drainage', 'elevation_map', ] def elevation_map(im_or_shape, voxel_siz...
PMEAL/porespy
porespy/beta/_drainage2.py
_drainage2.py
py
7,696
python
en
code
240
github-code
18
[ { "api_name": "porespy.tools.get_tqdm", "line_number": 7, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_number": 42, "usage_type": "call" }, { "api_name": "numpy.swapaxes", "line_number": 45, "usage_type": "call" }, { "api_name": "numpy.arange", "...
3564920155
#!/usr/bin/python import sys import json import networkx as nx exp = """ Usage: ./make_kanji_graph.py input_json output_graphml - The input_json is a file with a JSON dictionary having a special formatting. The dictionary has three fields: - 'kanji' - Is a list of Kanjis. They contain their 'chinese', 'english', 'ku...
pabloem/hanja-graph
bin/make_kanji_graph.py
make_kanji_graph.py
py
1,095
python
en
code
4
github-code
18
[ { "api_name": "sys.argv", "line_number": 12, "usage_type": "attribute" }, { "api_name": "sys.exit", "line_number": 14, "usage_type": "call" }, { "api_name": "sys.argv", "line_number": 16, "usage_type": "attribute" }, { "api_name": "sys.argv", "line_number": 17...
22369072039
# -*- coding: utf-8 -*- """ Created on Wed Jul 24 15:33:27 2019 @author: Administrator """ import matplotlib matplotlib.use("Agg") #import matplotlib.pyplot as plt import numpy as np from keras.models import load_model #from keras.layers import Conv2D,MaxPooling2D,UpSampling2D,BatchNormalization,Reshape,Permute,Act...
Y-Q-Zhao/remote-sensing-segment
unet_1_3_predict.py
unet_1_3_predict.py
py
6,203
python
en
code
1
github-code
18
[ { "api_name": "matplotlib.use", "line_number": 10, "usage_type": "call" }, { "api_name": "sklearn.preprocessing.LabelEncoder", "line_number": 47, "usage_type": "call" }, { "api_name": "libtiff.TIFF.open", "line_number": 56, "usage_type": "call" }, { "api_name": "l...
72858571881
from vendor.models import Vendor from accounts.models import UserProfile from django.conf import settings def get_vendor(request): try: vendor = Vendor.objects.get(user=request.user) except: vendor = None data = { "vendor": vendor, } return data def get_userprofile(reque...
roshangrg364/Foodify_Multi_Vendor_Food_System_Django
accounts/context_processors.py
context_processors.py
py
610
python
en
code
0
github-code
18
[ { "api_name": "vendor.models", "line_number": 8, "usage_type": "name" }, { "api_name": "vendor.models.Vendor.objects.get", "line_number": 8, "usage_type": "call" }, { "api_name": "vendor.models.Vendor.objects", "line_number": 8, "usage_type": "attribute" }, { "api...
11700895020
from azure.storage import CloudStorageAccount from azure.storage.blob import BlockBlobService, PublicAccess, AppendBlobService from pathlib import Path from utils.setting import setting as s import json, csv, datetime, os, pyodbc, datetime class log(): def __init__(self, meterInfo): self.MeterInfo...
esabook/sparkmeter-reset-protect
utils/log.py
log.py
py
5,296
python
en
code
0
github-code
18
[ { "api_name": "os.remove", "line_number": 21, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_number": 37, "usage_type": "call" }, { "api_name": "csv.DictWriter", "line_number": 39, "usage_type": "call" }, { "api_name": "csv.QUOTE_MINIMAL", "line_n...
41450568211
""" URL configuration for hsauth project. The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/4.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'...
Hongshiits/hsauth
hsauth/hsauth/urls.py
urls.py
py
1,298
python
en
code
0
github-code
18
[ { "api_name": "django.urls.path", "line_number": 23, "usage_type": "call" }, { "api_name": "auth.views.views", "line_number": 23, "usage_type": "attribute" }, { "api_name": "auth.views", "line_number": 23, "usage_type": "name" }, { "api_name": "django.urls.path", ...
72450815400
import requests import json import os token=os.environ["token"] url_base="https://soccer.sportmonks.com/api/v2.0/" payload={'api_token':token} print("BÚSQUEDA DE JUGADORES\n") jugador=input("Introduce el nombre de un jugador: ") url=url_base+"players/search/"+jugador r=requests.get(url,params=payload) if r.status_...
alfonsora6/Proyecto-Final-LM_Parte-1
programa3.py
programa3.py
py
1,817
python
es
code
0
github-code
18
[ { "api_name": "os.environ", "line_number": 5, "usage_type": "attribute" }, { "api_name": "requests.get", "line_number": 15, "usage_type": "call" } ]
15503422705
import datetime import os from nonebot import on_command from nonebot.adapters import Bot, Event from nonebot.typing import T_State from nonebot.adapters.cqhttp import Message from sqlalchemy import Column, Integer, String, BigInteger, Text, DateTime from alchemical import Alchemical db = Alchemical('sqlite:///ergo....
corgiclub/ErGo
bot/src/plugins/note/__init__.py
__init__.py
py
1,655
python
en
code
9
github-code
18
[ { "api_name": "alchemical.Alchemical", "line_number": 12, "usage_type": "call" }, { "api_name": "sqlalchemy.Column", "line_number": 16, "usage_type": "call" }, { "api_name": "sqlalchemy.Integer", "line_number": 16, "usage_type": "argument" }, { "api_name": "sqlalc...
14138035100
import os import requests import itertools from twilio.rest import Client STOCK = "TSLA" COMPANY_NAME = "Tesla Inc" twilio_account_sid = os.environ.get('ACCOUNT_SID') twilio_auth_token = os.environ.get('AUTH_TOKEN') twilio_phone_number = os.environ.get('TWILIO_PHONE_NUMBER') PERSONAL_PHONE_NUMBER = os.environ.get('P...
KlayClarke/stock-trading-alert-sms
main.py
main.py
py
2,716
python
en
code
0
github-code
18
[ { "api_name": "os.environ.get", "line_number": 9, "usage_type": "call" }, { "api_name": "os.environ", "line_number": 9, "usage_type": "attribute" }, { "api_name": "os.environ.get", "line_number": 10, "usage_type": "call" }, { "api_name": "os.environ", "line_nu...
420479720
import tensorflow as tf import scipy.io as sio import numpy as np from PIL import Image img_H = 64 img_W = 64 img_C = 3 GAN_type = "SNGAN" # DCGAN, WGAN, WGAN-GP, SNGAN, LSGAN, RSGAN, RaSGAN batchsize = 128 epsilon = 1e-14#if epsilon is too big, training of DCGAN is failure. def deconv(inputs, shape, str...
MingtaoGuo/DCGAN_WGAN_WGAN-GP_LSGAN_SNGAN_RSGAN_BEGAN_ACGAN_PGGAN_TensorFlow
GANs.py
GANs.py
py
13,356
python
en
code
213
github-code
18
[ { "api_name": "tensorflow.get_variable", "line_number": 14, "usage_type": "call" }, { "api_name": "tensorflow.random_normal_initializer", "line_number": 14, "usage_type": "call" }, { "api_name": "tensorflow.get_variable", "line_number": 15, "usage_type": "call" }, { ...
28431164580
import argparse import catboost import loguru import pandas as pd from sklearn import metrics from src import utils def _configure_parser() -> argparse.ArgumentParser: argparser = argparse.ArgumentParser() argparser.add_argument( "--model", type=str, default="experiments/latest/model...
borisshapa/wine-quality
scripts/eval.py
eval.py
py
1,224
python
en
code
0
github-code
18
[ { "api_name": "argparse.ArgumentParser", "line_number": 12, "usage_type": "call" }, { "api_name": "argparse.ArgumentParser", "line_number": 11, "usage_type": "attribute" }, { "api_name": "catboost.CatBoostClassifier", "line_number": 29, "usage_type": "call" }, { "...
26889592742
from django.shortcuts import render, redirect from django.contrib.postgres.search import SearchQuery, SearchRank, SearchVector from django_slack import slack_message from django.http import HttpResponse from django.views.decorators.csrf import csrf_exempt from .models import Article, Topic, Stub from .forms import Art...
ygreif/everything3
articles/views.py
views.py
py
4,217
python
en
code
0
github-code
18
[ { "api_name": "models.Topic.objects.all", "line_number": 12, "usage_type": "call" }, { "api_name": "models.Topic.objects", "line_number": 12, "usage_type": "attribute" }, { "api_name": "models.Topic", "line_number": 12, "usage_type": "name" }, { "api_name": "model...
36609154463
import requests from datetime import datetime, timedelta from sendgrid import SendGridAPIClient from sendgrid.helpers.mail import Mail, From, To import firebase_admin from firebase_admin import firestore count = 0 firestore_client = 0 # todoist api token = '** REMOVED FOR PRIVACY **' url = 'https://api.todoist.com/re...
EthanTalreja/TodoistProductivityEmail
Todoist Script.py
Todoist Script.py
py
11,164
python
en
code
0
github-code
18
[ { "api_name": "firebase_admin.credentials.Certificate", "line_number": 33, "usage_type": "call" }, { "api_name": "firebase_admin.credentials", "line_number": 33, "usage_type": "attribute" }, { "api_name": "firebase_admin.initialize_app", "line_number": 34, "usage_type": "...
20190795950
from django.test import TestCase from django.forms.models import model_to_dict from datetime import datetime, timedelta, time from timetable.models import * from timetable.forms import * from timetable.tests.base_test import BaseTestCase class StageTestCase(BaseTestCase): def setUp(self): super(StageTest...
DHZ-calendar/SchoolCalendar
SchoolCalendar/timetable/tests/test_stage.py
test_stage.py
py
4,007
python
en
code
4
github-code
18
[ { "api_name": "timetable.tests.base_test.BaseTestCase", "line_number": 10, "usage_type": "name" }, { "api_name": "datetime.datetime", "line_number": 13, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 28, "usage_type": "call" }, { "api_na...
27917584303
#!/usr/bin/env python # -*- coding: utf-8 -*- import logging import numpy as np import pandas as pd import _pickle as cPickle import scipy.optimize as opt from datetime import datetime from scipy.stats import uniform, randint from sklearn.preprocessing import OneHotEncoder from sklearn.model_selection import cross_val...
IntelligentSensor/Sensor-PHM
Prognostics/ml-models.py
ml-models.py
py
17,599
python
en
code
15
github-code
18
[ { "api_name": "_pickle.load", "line_number": 30, "usage_type": "call" }, { "api_name": "_pickle.load", "line_number": 31, "usage_type": "call" }, { "api_name": "_pickle.load", "line_number": 32, "usage_type": "call" }, { "api_name": "_pickle.load", "line_numbe...
30512732215
import numpy as np import pandas as pd import matplotlib.pyplot as plt din = '/projects/b1122/saya/04_cleaned_cnv' dout = '/projects/b1122/saya/05_data_summary' # candidate_cytos = ['19q13.33', '7q22.1', '1p36.33', '1q21.1', '1q21.3'] # '4p15.33', '9p21.1' # This is from Zexian's papers candidate_cytos = [ # these ar...
sayadennis/bbcar
02_data_summary/cnv/visualize_cn_lasso_cytobands.py
visualize_cn_lasso_cytobands.py
py
2,535
python
en
code
0
github-code
18
[ { "api_name": "pandas.read_csv", "line_number": 14, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 15, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 16, "usage_type": "call" }, { "api_name": "pandas.DataFrame", ...
16014041101
import logging import sys from logging.config import dictConfig from logging.handlers import QueueHandler, QueueListener from pathlib import Path from typing import Optional from PyQt5 import QtCore from gridplayer.utils.qt import is_qt_log_ignored DISABLED = logging.CRITICAL + 1 class QueueListenerRoot(QueueListe...
vzhd1701/gridplayer
gridplayer/utils/log_config.py
log_config.py
py
3,776
python
en
code
858
github-code
18
[ { "api_name": "logging.CRITICAL", "line_number": 12, "usage_type": "attribute" }, { "api_name": "logging.handlers.QueueListener", "line_number": 15, "usage_type": "name" }, { "api_name": "logging.root", "line_number": 17, "usage_type": "attribute" }, { "api_name":...
70029222759
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('varer', '0016_auto_20141227_0243'), ] operations = [ migrations.AddField( model_name='salgsvare', na...
cybernetisk/internsystem
varer/migrations/0017_salgsvare_kassenavn.py
0017_salgsvare_kassenavn.py
py
502
python
en
code
4
github-code
18
[ { "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.AddField", "line_number": 14, "usage_type": "call" }, { ...
11266686057
from typing import Any, List, Callable import cv2 import threading import numpy as np import onnxruntime import onnx import ogi.globals from ogi.typing import Face, Frame, FaceSet from ogi.utilities import resolve_relative_path # THREAD_LOCK = threading.Lock() class Enhance_CodeFormer(): model_codeformer = No...
ogimedia/ogi-ai
ogi/processors/Enhance_CodeFormer.py
Enhance_CodeFormer.py
py
2,589
python
en
code
0
github-code
18
[ { "api_name": "ogi.utilities.resolve_relative_path", "line_number": 29, "usage_type": "call" }, { "api_name": "onnxruntime.InferenceSession", "line_number": 30, "usage_type": "call" }, { "api_name": "ogi.globals.globals", "line_number": 30, "usage_type": "attribute" }, ...
34212453229
import io from re import X import sys _INPUT = """\ ooo???xxxx """ sys.stdin = io.StringIO(_INPUT) S = list(input()) O = [] X = [] # Sの文字列の中で、条件に合致するのか確認 def judge(s): # 値の中に必ず含まれていないといけないもの for i in O: if i not in s: return False # 値の中に含まれていたらダメなもの for i in X: if i in s...
kkchart9/atcoder
ABC/201_c.py
201_c.py
py
719
python
ja
code
0
github-code
18
[ { "api_name": "sys.stdin", "line_number": 8, "usage_type": "attribute" }, { "api_name": "io.StringIO", "line_number": 8, "usage_type": "call" }, { "api_name": "re.X", "line_number": 12, "usage_type": "name" }, { "api_name": "re.X", "line_number": 23, "usag...
3789320052
# * MotorBridge.py # * This is a library for BBG/BBB motor bridge cape # * Copyright (c) 2015 seeed technology inc. # * Author : Jiankai Li # * Create Time: Nov 2015 # * Change Log : Jan. 2023 by Seth w/ help from #beagle on IRC and vsx-examples for gpiod in python3... # * # * The MIT License (MIT) # * ...
silver2row/bbg
src/MotorBridge.py
MotorBridge.py
py
11,663
python
en
code
3
github-code
18
[ { "api_name": "gpiod.Chip", "line_number": 39, "usage_type": "call" }, { "api_name": "gpiod.LINE_REQ_DIR_OUT", "line_number": 42, "usage_type": "attribute" }, { "api_name": "smbus2.SMBus", "line_number": 46, "usage_type": "call" }, { "api_name": "time.sleep", ...
15211592581
import numpy as np print(np.__version__) import torch print(torch.__version__) import torch.nn as nn import torch.nn.functional as F torch.manual_seed(0) import random import math class ConnectFour: def __init__(self): self.row_count = 6 self.column_count = 7 self.action_size = self.c...
TaveConnectX/DeepLearning
alphazero_new.py
alphazero_new.py
py
20,301
python
en
code
1
github-code
18
[ { "api_name": "numpy.__version__", "line_number": 2, "usage_type": "attribute" }, { "api_name": "torch.__version__", "line_number": 6, "usage_type": "attribute" }, { "api_name": "torch.manual_seed", "line_number": 11, "usage_type": "call" }, { "api_name": "numpy.z...
42289388129
from selenium import webdriver from selenium.common import exceptions browser = webdriver.Chrome() try: browser.get("http://suninjuly.github.io/cats.html") button = browser.find_element_by_id("button") if button: assert "successful" except exceptions.NoSuchElementException: print("This elem...
srgkun/stepik_autotests_course
lesson4_step6.py
lesson4_step6.py
py
751
python
ru
code
0
github-code
18
[ { "api_name": "selenium.webdriver.Chrome", "line_number": 5, "usage_type": "call" }, { "api_name": "selenium.webdriver", "line_number": 5, "usage_type": "name" }, { "api_name": "selenium.common.exceptions.NoSuchElementException", "line_number": 14, "usage_type": "attribut...
10942159003
# # Class for varying active material volume fraction # import pybamm from .base_active_material import BaseModel class VaryingUniform(BaseModel): """Submodel for varying active material volume fraction, with variations uniform across each electrode Parameters ---------- param : parameter class ...
Feitumtum/PyBaMM
pybamm/models/submodels/active_material/varying_active_material_uniform.py
varying_active_material_uniform.py
py
2,641
python
en
code
null
github-code
18
[ { "api_name": "base_active_material.BaseModel", "line_number": 9, "usage_type": "name" }, { "api_name": "pybamm.Variable", "line_number": 27, "usage_type": "call" }, { "api_name": "pybamm.PrimaryBroadcast", "line_number": 31, "usage_type": "call" }, { "api_name": ...
13780197775
from models import AutoEncoder, SimpleNet, ComplexNet import torch import torch.nn as nn import json import os from torch.utils.data import DataLoader from data_load import Dspites, train_val_split import copy with open("config.json") as json_file: conf = json.load(json_file) dataset_path = os.path.join...
BearSubj13/metrlearn_dsprites
downstream_classification.py
downstream_classification.py
py
4,353
python
en
code
0
github-code
18
[ { "api_name": "json.load", "line_number": 11, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 12, "usage_type": "call" }, { "api_name": "os.path", "line_number": 12, "usage_type": "attribute" }, { "api_name": "os.path.join", "line_number":...
20694686754
import argparse,os,sys sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))) import metadata import numpy as np import matplotlib.pyplot as plt def process(log_dir): for f in os.listdir(log_dir): if (os.path.isfile(os.path.join(log_dir,f)) and f.startswith('t')): pro...
doc-vu/edgent
scripts/experiment/src/plots/extra/per_subscriber_plot.py
per_subscriber_plot.py
py
2,722
python
en
code
2
github-code
18
[ { "api_name": "sys.path.append", "line_number": 2, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 2, "usage_type": "attribute" }, { "api_name": "os.path.dirname", "line_number": 2, "usage_type": "call" }, { "api_name": "os.path", "line_number...
15724293055
import quandl import pandas as pd import numpy as np import datetime import matplotlib.pyplot as plt from sklearn.linear_model import LinearRegression from sklearn.model_selection import train_test_split from sklearn import preprocessing def linearReg(ticker, days): quandl.ApiConfig.api_key = 'ekUM3Ut18s6GyHRFqxV...
brianfdo/stock-market-LRM
lrm.py
lrm.py
py
1,346
python
en
code
0
github-code
18
[ { "api_name": "quandl.ApiConfig", "line_number": 12, "usage_type": "attribute" }, { "api_name": "quandl.get", "line_number": 14, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 19, "usage_type": "call" }, { "api_name": "sklearn.preprocessing.sc...
3797153242
import os import argparse import tfp.config.config as config import torch from torch.utils.data import DataLoader from tfp.utils.data_loader import PoseDataset from tfp.models.transformer import TransformerModel from tqdm import tqdm, trange parser = argparse.ArgumentParser(description="Training Information") # parse...
Atharv24/DanceGeneration
train.py
train.py
py
3,119
python
en
code
1
github-code
18
[ { "api_name": "argparse.ArgumentParser", "line_number": 11, "usage_type": "call" }, { "api_name": "tfp.utils.data_loader.PoseDataset", "line_number": 35, "usage_type": "call" }, { "api_name": "torch.utils.data.DataLoader", "line_number": 36, "usage_type": "call" }, { ...
73987926119
''' this section import iris data and visualize it ''' import torch import numpy as np from sklearn import datasets import matplotlib.pyplot as plt import torch.nn as nn # unused but required import for doing 3d projections with matplotlib < 3.2 import mpl_toolkits.mplot3d # noqa: F401 import pandas as pd import tor...
yanf12/NNPDE_casestudy
iris_nn_version.py
iris_nn_version.py
py
3,479
python
en
code
0
github-code
18
[ { "api_name": "sklearn.datasets.load_iris", "line_number": 17, "usage_type": "call" }, { "api_name": "sklearn.datasets", "line_number": 17, "usage_type": "name" }, { "api_name": "pandas.DataFrame", "line_number": 18, "usage_type": "call" }, { "api_name": "numpy.ar...
71807284839
# import multiprocessing import torch from sklearn.neighbors import KDTree import numpy as np from configs import Config # def chamfer_batch(predictions, meshes): # # ground_truth = torch.zeros([1, 8192, 3], device=Config.General.device) # for i, mesh in enumerate(meshes): # ground_truth[i] = torch.t...
andrearosasco/confidence_shape_completion
utils/metrics.py
metrics.py
py
4,301
python
en
code
3
github-code
18
[ { "api_name": "extensions.chamfer_dist.ChamferDistanceL1", "line_number": 32, "usage_type": "call" }, { "api_name": "torch.Tensor", "line_number": 57, "usage_type": "attribute" }, { "api_name": "torch.LongTensor", "line_number": 65, "usage_type": "call" }, { "api_...
31370554480
# use ShotChartDetail class to obtain import json import time from nba_api.stats.endpoints import shotchartdetail from nba_api.stats.static.teams import teams, find_team_by_abbreviation, get_teams from nba_api.stats.static.players import players, get_players from pprint import pprint import csv # shot_data = ...
dcfernandez1023/cs360-data-viz-proj
data_processing/team_shotlog.py
team_shotlog.py
py
5,664
python
en
code
0
github-code
18
[ { "api_name": "csv.reader", "line_number": 37, "usage_type": "call" }, { "api_name": "nba_api.stats.endpoints.shotchartdetail.ShotChartDetail", "line_number": 58, "usage_type": "call" }, { "api_name": "nba_api.stats.endpoints.shotchartdetail", "line_number": 58, "usage_ty...
71427125160
import sys sys.path # This Python 3 environment comes with many helpful analytics libraries installed # It is defined by the kaggle/python docker image: https://github.com/kaggle/docker-python # For example, here's several helpful packages to load in import numpy as np # linear algebra import pandas as pd # dat...
aorursy/new-nb-3
hermetist_notebookxxaa.py
hermetist_notebookxxaa.py
py
10,317
python
en
code
0
github-code
18
[ { "api_name": "sys.path", "line_number": 3, "usage_type": "attribute" }, { "api_name": "subprocess.check_output", "line_number": 24, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 38, "usage_type": "call" }, { "api_name": "pandas.read_csv"...
31228974235
#!/usr/bin/env python # -*- coding: utf-8 # Compute distance between PMJ and C2-C3 disc along centerline # # For usage, type: python get_distance_pmj_dics -h # Authors: Sandrine Bédard import argparse import csv from operator import sub import numpy as np import nibabel as nib import os NEAR_ZERO_THRESHOLD = 1e-6 ...
sct-pipeline/ukbiobank-spinalcord-csa
get_distance_pmj_disc.py
get_distance_pmj_disc.py
py
3,504
python
en
code
3
github-code
18
[ { "api_name": "argparse.ArgumentParser", "line_number": 20, "usage_type": "call" }, { "api_name": "nibabel.Nifti1Header", "line_number": 34, "usage_type": "call" }, { "api_name": "nibabel.Nifti1Image", "line_number": 35, "usage_type": "call" }, { "api_name": "niba...
10058464492
import string import random import boto3 import pytest import zsec_aws_tools.dynamodb as zaws_dynamodb import logging @pytest.fixture def my_table(): session = boto3.Session(profile_name='test', region_name='us-east-1') random_str = ''.join(random.choice(string.ascii_lowercase + string.digits) for _ in range...
zuoralabs/zsec-aws-tools
testing/test_dynamodb.py
test_dynamodb.py
py
2,394
python
en
code
1
github-code
18
[ { "api_name": "boto3.Session", "line_number": 11, "usage_type": "call" }, { "api_name": "random.choice", "line_number": 13, "usage_type": "call" }, { "api_name": "string.ascii_lowercase", "line_number": 13, "usage_type": "attribute" }, { "api_name": "string.digits...
450327797
import argparse from pathlib import Path import numpy as np import pandas as pd import seaborn as sns from matplotlib import pyplot as plt from models.hmm import HMM_DECODER from pose import BOXES, KEYPOINTS from utils.array_manipulation import find_subject_video from utils.media import get_session_from_cngt_file, ge...
Casvanrijbroek/Sign-Language-Thesis
models/hmm/facial_movement.py
facial_movement.py
py
5,387
python
en
code
0
github-code
18
[ { "api_name": "pandas.read_csv", "line_number": 16, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_number": 22, "usage_type": "call" }, { "api_name": "utils.media.get_session_from_cngt_file", "line_number": 23, "usage_type": "call" }, { "api_name": "u...
12552592134
import allure from selenium.webdriver import Keys from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions from test_user.ByteDance.base.base_page import BasePage class MessageList(BasePage): __MESSAGE_BUTTON = (By.CSS_SELECTOR, 'section>section:nth-child(5)>div>svg'...
wanglong913/test_user
ByteDance/page/message_list_page.py
message_list_page.py
py
3,977
python
en
code
0
github-code
18
[ { "api_name": "test_user.ByteDance.base.base_page.BasePage", "line_number": 9, "usage_type": "name" }, { "api_name": "selenium.webdriver.common.by.By.CSS_SELECTOR", "line_number": 10, "usage_type": "attribute" }, { "api_name": "selenium.webdriver.common.by.By", "line_number":...
10806004731
import os from unipath import Path import django_smtp_ssl BASE_DIR = Path(__file__).ancestor(2) DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@example.com'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'N...
aaronlelevier/flapsta_project
flapsta/flapsta/settings.py
settings.py
py
7,309
python
en
code
1
github-code
18
[ { "api_name": "unipath.Path", "line_number": 7, "usage_type": "call" }, { "api_name": "os.environ", "line_number": 22, "usage_type": "attribute" }, { "api_name": "os.environ", "line_number": 23, "usage_type": "attribute" }, { "api_name": "os.environ", "line_nu...
450376217
import re import time from glob import glob from pathlib import Path import cv2 import mediapipe as mp import numpy as np from pympi.Elan import Eaf from pose.mp_detector import MediaPipePoseDetector from utils.config import Config from utils.exceptions import EAFParsingError EAF_DIR = Path(r'E:\CorpusNGT\EAF_export...
Casvanrijbroek/Sign-Language-Thesis
pose/pose_face_detection_old.py
pose_face_detection_old.py
py
6,840
python
en
code
0
github-code
18
[ { "api_name": "pathlib.Path", "line_number": 15, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_number": 16, "usage_type": "call" }, { "api_name": "mediapipe.solutions", "line_number": 68, "usage_type": "attribute" }, { "api_name": "mediapipe.solution...
8011888275
#!/usr/bin/env python3.7 import numpy as np import cv2 as cv import pickle import sys capture = None #### PREPORCESSING FUNCTION def preProcessing(img): img = cv.cvtColor(img, cv.COLOR_BGR2GRAY) img = cv.equalizeHist(img) img = img / 255 return img def checkArgumentsForCamera(): global captur...
Luisrosario2604/Shop-That-Thing
src/checkMultiSquare.py
checkMultiSquare.py
py
5,065
python
en
code
15
github-code
18
[ { "api_name": "cv2.cvtColor", "line_number": 14, "usage_type": "call" }, { "api_name": "cv2.COLOR_BGR2GRAY", "line_number": 14, "usage_type": "attribute" }, { "api_name": "cv2.equalizeHist", "line_number": 15, "usage_type": "call" }, { "api_name": "sys.argv", ...
37747917543
from .config import SUPERSET_URL, SUPERSET_API_USER, SUPERSET_API_PASSWORD from .logging import logger import requests import sys import time # ---------------------------------------------------------- # Get a new access token # ---------------------------------------------------------- def get_access_token() -> str...
TheHassi/superset-pdf-report
supersetpdfreport/security.py
security.py
py
1,637
python
en
code
16
github-code
18
[ { "api_name": "config.SUPERSET_API_PASSWORD", "line_number": 15, "usage_type": "name" }, { "api_name": "config.SUPERSET_API_USER", "line_number": 17, "usage_type": "name" }, { "api_name": "config.SUPERSET_URL", "line_number": 22, "usage_type": "argument" }, { "api...
24848966904
from django.db.models import Q from blog.utils import addSubscribers from django.shortcuts import redirect, render, get_object_or_404 from . models import Post, Category, Comment from django.core.mail import send_mail from .forms import MailForm # from .forms import CommentForm # Create your views here. def detail(r...
SeunFashina002/cypher-blog
blog/views.py
views.py
py
2,142
python
en
code
1
github-code
18
[ { "api_name": "django.shortcuts.get_object_or_404", "line_number": 13, "usage_type": "call" }, { "api_name": "models.Post", "line_number": 13, "usage_type": "argument" }, { "api_name": "models.Comment", "line_number": 19, "usage_type": "call" }, { "api_name": "dja...
5448436563
from django.conf import settings from django.core.paginator import Paginator from users.models import Coins from users.upgrades_cfg import (BACKGROUND_COLOR_CODE, BACKGROUND_COLOR_PRICE, BORDER_CODE, BORDER_PRICE) def paginator(obj_list, request): """Реализует паджинацию для перед...
aogridasov/survey_service
survey_service/surveys/utils.py
utils.py
py
2,114
python
ru
code
0
github-code
18
[ { "api_name": "django.core.paginator.Paginator", "line_number": 11, "usage_type": "call" }, { "api_name": "django.conf.settings.SURVEYS_PER_PAGE", "line_number": 11, "usage_type": "attribute" }, { "api_name": "django.conf.settings", "line_number": 11, "usage_type": "name"...
24743163648
from day09 import intcode from toolz import take from typing import List, Generator from collections import defaultdict N, S, E, W = (0, -1), (0, 1), (1, 0), (-1, 0) L = {N: W, E: N, S: E, W: S} R = {N: E, E: S, S: W, W: N} def print_grid(grid): pts = list(zip(*grid)) xmax, xmin = max(pts[0]) + 1, min(pts[0])...
neal-o-r/aoc2019
day11.py
day11.py
py
1,115
python
en
code
0
github-code
18
[ { "api_name": "day09.intcode", "line_number": 29, "usage_type": "call" }, { "api_name": "collections.defaultdict", "line_number": 30, "usage_type": "call" } ]
33245430509
import logging from telegram import Update from telegram.ext import Updater, CommandHandler, MessageHandler, Filters, CallbackContext import os PORT = int(os.environ.get('PORT', 5000)) # Enable logging logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', level=logging....
nuruszama/CustomerBot
main.py
main.py
py
3,562
python
en
code
0
github-code
18
[ { "api_name": "os.environ.get", "line_number": 5, "usage_type": "call" }, { "api_name": "os.environ", "line_number": 5, "usage_type": "attribute" }, { "api_name": "logging.basicConfig", "line_number": 8, "usage_type": "call" }, { "api_name": "logging.INFO", "l...