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
14975292313
import os import time import math import sys import argparse import numpy as np import pandas as pd import plotly.graph_objects as go import matplotlib.pyplot as plt from gcodeparser import GcodeParser from am_robot.GCodeCommands import GCodeCommands from mgen import rotation_from_angles if sys.platform == 'linux':...
alejontnu/am-robot
src/am_robot/GCodeExecutor.py
GCodeExecutor.py
py
47,667
python
en
code
2
github-code
18
[ { "api_name": "sys.platform", "line_number": 17, "usage_type": "attribute" }, { "api_name": "sys.platform", "line_number": 19, "usage_type": "attribute" }, { "api_name": "sys.platform", "line_number": 25, "usage_type": "attribute" }, { "api_name": "am_robot.GCodeC...
26517468895
from acme.adders import reverb as adders from acme.jax.losses import impala from acme.utils.tree_utils import tree_map import haiku as hk import jax import jax.numpy as jnp import numpy as np import reverb from absl.testing import absltest class ImpalaTest(absltest.TestCase): def test_shapes(self): # bat...
deepmind/acme
acme/jax/losses/impala_test.py
impala_test.py
py
2,380
python
en
code
3,100
github-code
18
[ { "api_name": "absl.testing.absltest.TestCase", "line_number": 13, "usage_type": "attribute" }, { "api_name": "absl.testing.absltest", "line_number": 13, "usage_type": "name" }, { "api_name": "haiku.LSTM", "line_number": 27, "usage_type": "call" }, { "api_name": "...
9975327276
from drf_spectacular.utils import extend_schema, extend_schema_view from rest_framework import status, viewsets from rest_framework.mixins import DestroyModelMixin from rest_framework.permissions import BasePermission, IsAuthenticated from rest_framework.response import Response from rest_framework.views import APIView...
alex2011ua/OnlineStore
OnlineStoreDjango/my_apps/shop/api_v1/admin/admin_views.py
admin_views.py
py
1,779
python
en
code
0
github-code
18
[ { "api_name": "rest_framework.mixins.DestroyModelMixin", "line_number": 13, "usage_type": "name" }, { "api_name": "rest_framework.response.Response", "line_number": 20, "usage_type": "call" }, { "api_name": "rest_framework.status.HTTP_204_NO_CONTENT", "line_number": 20, "...
2034969302
from random import randint, gauss, choice, shuffle, random from typing import List, Set from lorem import word, get_word from morelianoctua.model import OWLOntology, OWLAxiom from morelianoctua.model.axioms.assertionaxiom import OWLClassAssertionAxiom, \ OWLObjectPropertyAssertionAxiom, OWLDataPropertyAssertionAxi...
patrickwestphal/learning_scenario_generators
learningscenariogenerators/simulatedannealing/__init__.py
__init__.py
py
41,232
python
en
code
0
github-code
18
[ { "api_name": "learningscenariogenerators.LearningScenarioGenerator", "line_number": 30, "usage_type": "name" }, { "api_name": "learningscenariogenerators.exception.OntologyConstraintsViolatedException", "line_number": 116, "usage_type": "call" }, { "api_name": "learningscenariog...
39490131014
import json import multiprocessing as mp import numpy as np import pyflex import torch from scipy.spatial.transform import Rotation as R from core.util.args import get_args from core.util.util import quatFromAxisAngle, quatFromAxisAngle_batch def _worker(remote, parent_remote, env_fn_wrapper, gpu_id, gui): paren...
AdaCompNUS/Prompt
core/planning/grasp/grasp_env.py
grasp_env.py
py
15,281
python
en
code
4
github-code
18
[ { "api_name": "core.util.args.get_args", "line_number": 69, "usage_type": "call" }, { "api_name": "json.load", "line_number": 70, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 74, "usage_type": "call" }, { "api_name": "numpy.array", "line...
34315840763
import asyncio import sys async def perform_task(): await asyncio.sleep(10) async def main(num_tasks): tasks = [] for task_id in range(num_tasks): task = asyncio.create_task(perform_task()) tasks.append(task) await asyncio.gather(*tasks) if __name__ == "__main__": if len(sys.ar...
pkolaczk/async-runtimes-benchmarks
python/main.py
main.py
py
471
python
en
code
87
github-code
18
[ { "api_name": "asyncio.sleep", "line_number": 5, "usage_type": "call" }, { "api_name": "asyncio.create_task", "line_number": 12, "usage_type": "call" }, { "api_name": "asyncio.gather", "line_number": 15, "usage_type": "call" }, { "api_name": "sys.argv", "line_...
71654260200
from typing import Text import random import pygame from pygame import * import cards import the_AI import cards import wave_generatore import os import sound import textures import triggerKeyboard import ClientLeaderBoards pygame.font.init() font = pygame.font.SysFont(None, 24) tutorial = False class UI: x=0 ...
TomiYea/A_Vinganca_de_D.Sebastiao
menu.py
menu.py
py
8,945
python
en
code
2
github-code
18
[ { "api_name": "pygame.font.init", "line_number": 15, "usage_type": "call" }, { "api_name": "pygame.font", "line_number": 15, "usage_type": "attribute" }, { "api_name": "pygame.font.SysFont", "line_number": 16, "usage_type": "call" }, { "api_name": "pygame.font", ...
4949872133
import typing import mysql.connector as mariadb #from dotenv import load_dotenv import os from sqlalchemy import create_engine str_conn='mysql+pymysql://root:root@localhost:3306/ultratrailv2' cursor=create_engine(str_conn) #load_dotenv() if typing.TYPE_CHECKING: import Song class SongService: tableName =...
SergioSuarezgh/Project_Final_Spotify
src/SongService.py
SongService.py
py
1,098
python
en
code
0
github-code
18
[ { "api_name": "sqlalchemy.create_engine", "line_number": 10, "usage_type": "call" }, { "api_name": "typing.TYPE_CHECKING", "line_number": 14, "usage_type": "attribute" }, { "api_name": "sqlalchemy.create_engine", "line_number": 22, "usage_type": "call" } ]
3414753694
from fastapi import APIRouter, Path, HTTPException from typing import List from starlette.responses import JSONResponse from starlette.status import * from .model_user import UserSchema, UserDB from db import database, tbl_users from starlette.status import * # import user model and services from .model_user import Us...
arifarinto25/pgfastapi
app/routes/route_user.py
route_user.py
py
3,295
python
en
code
0
github-code
18
[ { "api_name": "model_user.UserSchema", "line_number": 12, "usage_type": "name" }, { "api_name": "db.tbl_users.insert", "line_number": 14, "usage_type": "call" }, { "api_name": "db.tbl_users", "line_number": 14, "usage_type": "name" }, { "api_name": "db.database.ex...
6094784387
import math import numpy import json import io class Point: ''' A point on the track with its distance to the center. ''' def __init__(self, pos, dist): self.pos = pos self.dist = dist def compute_distance(p0, p1): ''' Computes the distance between `p0` and `p1`, projected ont...
JBarmentlo/Self-Aware-Driving-Patate
srcs/Scorer/Score.py
Score.py
py
3,865
python
en
code
3
github-code
18
[ { "api_name": "numpy.linalg.norm", "line_number": 22, "usage_type": "call" }, { "api_name": "numpy.linalg", "line_number": 22, "usage_type": "attribute" }, { "api_name": "math.sqrt", "line_number": 25, "usage_type": "call" }, { "api_name": "numpy.linalg.norm", ...
74498967721
# importing the relevant modules to run the code import boto3 import json import csv import os # creating a loop that will go through the messages and continue the pipeline while True: # Create SQS client using boto3 module sqs = boto3.client('sqs') # The url of my sqs queue_url = "https://sqs.us-east-...
bamb4boy/sqs_s3_pipeline
Consumer/Consumer.py
Consumer.py
py
2,565
python
en
code
0
github-code
18
[ { "api_name": "boto3.client", "line_number": 10, "usage_type": "call" }, { "api_name": "json.loads", "line_number": 35, "usage_type": "call" }, { "api_name": "os.path.exists", "line_number": 44, "usage_type": "call" }, { "api_name": "os.path", "line_number": 4...
28959792621
# -*- coding: utf-8 -*- import json from ..base.simple_downloader import SimpleDownloader class VeohCom(SimpleDownloader): __name__ = "VeohCom" __type__ = "downloader" __version__ = "0.30" __status__ = "testing" __pattern__ = r"https?://(?:www\.)?veoh\.com/(?:tv/)?(?:watch|videos)/(?P<ID>v\w+)"...
pyload/pyload
src/pyload/plugins/downloaders/VeohCom.py
VeohCom.py
py
1,617
python
en
code
3,038
github-code
18
[ { "api_name": "base.simple_downloader.SimpleDownloader", "line_number": 8, "usage_type": "name" }, { "api_name": "json.loads", "line_number": 44, "usage_type": "call" } ]
12057198971
from itertools import chain from django import template from svarmeh.models import Page, Product, Chunk from django.core.cache import cache register = template.Library() @register.inclusion_tag('include/menu.html', takes_context=True) def main_menu(context): products = Product.objects.filter(status='published') ...
gearheart/svarmeh
svarmeh/templatetags/svarmeh_tags.py
svarmeh_tags.py
py
1,031
python
en
code
1
github-code
18
[ { "api_name": "django.template.Library", "line_number": 6, "usage_type": "call" }, { "api_name": "django.template", "line_number": 6, "usage_type": "name" }, { "api_name": "svarmeh.models.Product.objects.filter", "line_number": 11, "usage_type": "call" }, { "api_n...
3439407448
################################################################################################################ """ """ # Built-in/Generic Imports import math import random import sys # Libs import matplotlib.pyplot as plt # Own modules __version__ = '1.1.1' __author__ = 'Victor Guillet' __date...
vguillet/RSAI_Engine
src/Simulation/Swarm/Agent/Path_finding/update_area.py
update_area.py
py
1,832
python
en
code
2
github-code
18
[ { "api_name": "numpy.linspace", "line_number": 27, "usage_type": "call" }, { "api_name": "numpy.linspace", "line_number": 28, "usage_type": "call" }, { "api_name": "numpy.meshgrid", "line_number": 30, "usage_type": "call" }, { "api_name": "numpy.sqrt", "line_n...
11147618514
import os from twilio.rest import Client from dotenv import load_dotenv load_dotenv() SID = os.getenv('SID') AUTH = os.getenv('AUTH') PHONE = os.getenv('PHONE') ADMIN = os.getenv('ADMIN') client = Client(SID, AUTH) msg = input("Enter your text message to admin: ") message = client.messages \ .create( ...
digibeep/lulu
adminText.py
adminText.py
py
377
python
en
code
0
github-code
18
[ { "api_name": "dotenv.load_dotenv", "line_number": 6, "usage_type": "call" }, { "api_name": "os.getenv", "line_number": 7, "usage_type": "call" }, { "api_name": "os.getenv", "line_number": 8, "usage_type": "call" }, { "api_name": "os.getenv", "line_number": 9,...
5439879841
import pandas as pd import numpy as np import csv import mygene # meta data 전처리 with open("GSE127165_series_matrix.txt","r",encoding="UTF-8") as f: reader=csv.reader(f,delimiter="\t") fieldnames=[] for i in reader: try: #print(i[0]) fieldnames.append(i[0]) ...
devcs96/AsanMedicalCenter
GSE158403.py
GSE158403.py
py
1,879
python
en
code
0
github-code
18
[ { "api_name": "csv.reader", "line_number": 8, "usage_type": "call" }, { "api_name": "csv.reader", "line_number": 21, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 37, "usage_type": "call" }, { "api_name": "mygene.MyGeneInfo", "line_nu...
43551242921
from django.conf.urls import patterns, include, url from vehicles.views import VehiclesList, VehicleCreate, VehicleView, VehicleUpdate, delete_vehicle from django.contrib.auth.decorators import login_required, permission_required urlpatterns = patterns('', #List view url(r'^$', VehiclesList.as_view(), name='ve...
codeadict/IGPython
apps/vehicles/urls.py
urls.py
py
645
python
en
code
4
github-code
18
[ { "api_name": "django.conf.urls.patterns", "line_number": 5, "usage_type": "call" }, { "api_name": "django.conf.urls.url", "line_number": 7, "usage_type": "call" }, { "api_name": "vehicles.views.VehiclesList.as_view", "line_number": 7, "usage_type": "call" }, { "a...
31862135749
# -*- coding: utf-8 -*- # @Author : Lin Lan (ryan.linlan@gmail.com) from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np from collections import defaultdict from ray.rllib.evaluation.sample_batch import SampleBatch from ray.rllib.evaluation.p...
llan-ml/tesp
tesp/utils.py
utils.py
py
2,471
python
en
code
30
github-code
18
[ { "api_name": "numpy.stack", "line_number": 20, "usage_type": "call" }, { "api_name": "numpy.concatenate", "line_number": 22, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 23, "usage_type": "call" }, { "api_name": "ray.rllib.evaluation.postpr...
4955093426
import os.path import socket from common.config import logger, conf_catalog from common.error import VulnersProxyException def check_api_connectivity(settings): try: socket.setdefaulttimeout(3) socket.socket(socket.AF_INET, socket.SOCK_STREAM).connect( (settings.vulners_host, 443) ...
vulnersCom/vulners-proxy
common/api_utils.py
api_utils.py
py
2,339
python
en
code
8
github-code
18
[ { "api_name": "socket.setdefaulttimeout", "line_number": 9, "usage_type": "call" }, { "api_name": "socket.socket", "line_number": 10, "usage_type": "call" }, { "api_name": "socket.AF_INET", "line_number": 10, "usage_type": "attribute" }, { "api_name": "socket.SOCK...
71099363560
"""Classes and functions that interact w/ Nasa's Near Earth Object API""" from faker import Faker from .system import System NEO_API = "https://api.nasa.gov/neo/rest/v1/neo/browse" class NEO: # instantiates the object of a near earth object # an object object if you will heh def __init__(self, neo_reference_id,...
egoberdon/wadjet
neo.py
neo.py
py
1,790
python
en
code
0
github-code
18
[ { "api_name": "system.System", "line_number": 17, "usage_type": "call" }, { "api_name": "faker.Faker", "line_number": 18, "usage_type": "call" } ]
5100592660
import urllib2 #python classes and code needed to request info, receive, and open import json class AlbumView(object): """This class handles how the data is shown to the user""" def __init__(self): self.__wdos = [] self.__content = '''<table> <tr> <td><h3>Albums</h3></td> </tr>''' #starting table tag ...
kingmfs14/DPW1405
itunes-app/album.py
album.py
py
2,674
python
en
code
0
github-code
18
[ { "api_name": "urllib2.Request", "line_number": 64, "usage_type": "call" }, { "api_name": "urllib2.build_opener", "line_number": 66, "usage_type": "call" }, { "api_name": "json.load", "line_number": 71, "usage_type": "call" } ]
9666364806
import wx from threading import Thread import deployment class WorkItem(): def __init__(self,process,queue,workFunc): self.queue = queue self.process = process self.workFunc = workFunc class WorkerThread(Thread): """Test Worker Thread Class.""" #---------------------------------...
rosmod/rosmod
gui/worker.py
worker.py
py
2,956
python
en
code
3
github-code
18
[ { "api_name": "threading.Thread", "line_number": 12, "usage_type": "name" }, { "api_name": "threading.Thread.__init__", "line_number": 18, "usage_type": "call" }, { "api_name": "threading.Thread", "line_number": 18, "usage_type": "name" }, { "api_name": "wx.NewId"...
39376255318
import torch #f = w.x #f = 2.x x = torch.tensor([1,2,3,4], dtype=torch.float32) y = torch.tensor([2,4,6,8], dtype=torch.float32) #as we have assumed f=2*x for our this model w = torch.tensor(0.0, dtype=torch.float32, requires_grad=True) #model prediction/ forward pass def forward(x): r...
Alok-Kumar-9/pytorch.zip
05_gradPyTorch.py
05_gradPyTorch.py
py
1,146
python
en
code
0
github-code
18
[ { "api_name": "torch.tensor", "line_number": 6, "usage_type": "call" }, { "api_name": "torch.float32", "line_number": 6, "usage_type": "attribute" }, { "api_name": "torch.tensor", "line_number": 7, "usage_type": "call" }, { "api_name": "torch.float32", "line_n...
21358118764
import tkinter from PIL import Image, ImageTk import random root = tkinter.Tk() root.geometry("800x800") root.title("Dice Rolling Simulator") # Adding label into the frame Blankline = tkinter.Label(root,text="") Blankline.pack() # adding label with different font and formatting HeadingLabel = tkinter.Label(root, te...
ginjardev/python_projects
DiceRollGUI/dice_rolling_gui.py
dice_rolling_gui.py
py
1,227
python
en
code
0
github-code
18
[ { "api_name": "tkinter.Tk", "line_number": 6, "usage_type": "call" }, { "api_name": "tkinter.Label", "line_number": 11, "usage_type": "call" }, { "api_name": "tkinter.Label", "line_number": 15, "usage_type": "call" }, { "api_name": "PIL.ImageTk.PhotoImage", "l...
74812956519
# -*- coding: utf-8 -*- """ Created on Sun Jun 18 21:52:50 2023 @author: WIN """ import matplotlib.pyplot as plt import cv2 import numpy as np def makeCDF(img): img_h,img_w = img.shape histogram=np.zeros(256) for i in range(img_h): for j in range(img_w): histogram[im...
dabbrata/Image-processing
Image_processing(all .py files)/median_filter.py
median_filter.py
py
2,229
python
en
code
0
github-code
18
[ { "api_name": "numpy.zeros", "line_number": 15, "usage_type": "call" }, { "api_name": "numpy.round", "line_number": 28, "usage_type": "call" }, { "api_name": "numpy.zeros_like", "line_number": 33, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_numb...
1614511369
import argparse import torch import os import random import numpy as np class Config(object): def __init__(self): # get init config args = self.__get_config() for key in args.__dict__: setattr(self, key, args.__dict__[key]) # select device self.device = torch.d...
Wang-chengfei/BiLSTM-CRF
config.py
config.py
py
4,536
python
en
code
0
github-code
18
[ { "api_name": "torch.device", "line_number": 16, "usage_type": "call" }, { "api_name": "torch.cuda.is_available", "line_number": 16, "usage_type": "call" }, { "api_name": "torch.cuda", "line_number": 16, "usage_type": "attribute" }, { "api_name": "os.environ", ...
35263551979
from collections import deque d = deque() for i in range(int(input())): a = input().split() if a[0]=='append': d.append(a[1]) elif a[0]=='appendLeft': d.appendLeft(a[1]) elif a[0]=='pop': d.pop() elif a[0]=='popLeft': d.popLeft() print(*d)
Sulagna-Dutta-Roy/HackSolutions
Python/Deque Collections.py
Deque Collections.py
py
307
python
en
code
4
github-code
18
[ { "api_name": "collections.deque", "line_number": 2, "usage_type": "call" } ]
18532768723
#!/usr/bin/env python3 # Standard library imports from random import randint, choice as rc # Remote library imports from faker import Faker # Local imports from app import app from models import db, User, Slate, SlatedMovie, Movie, Comment if __name__ == '__main__': fake = Faker() with app.app_con...
jkworley/film-focused
server/seed.py
seed.py
py
9,186
python
en
code
0
github-code
18
[ { "api_name": "faker.Faker", "line_number": 15, "usage_type": "call" }, { "api_name": "app.app.app_context", "line_number": 17, "usage_type": "call" }, { "api_name": "app.app", "line_number": 17, "usage_type": "name" }, { "api_name": "models.User.query.delete", ...
8569382634
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Question', fields=[ ('id', models.AutoField(ver...
M0dM/DjangoI2LProject
formation/sondages/migrations/0001_initial.py
0001_initial.py
py
1,102
python
en
code
0
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.CreateModel", "line_number": 13, "usage_type": "call" }, ...
22296756601
import pandas as pd import seaborn as sns import numpy as np from functools import partial from multiprocessing import Pool from matplotlib import pyplot as plt import pybedtools as pbt atac = snakemake.input['atac_peaks'] h3k4me1 = snakemake.input['h3k4me1_peaks'] h3k4me3 = snakemake.input['h3k4me3_peaks'] h3...
SichongP/atac-seq
workflow/scripts/pyPlotROC_multi_core.py
pyPlotROC_multi_core.py
py
3,164
python
en
code
0
github-code
18
[ { "api_name": "pandas.DataFrame", "line_number": 21, "usage_type": "call" }, { "api_name": "pybedtools.bedtool.BedTool.from_dataframe", "line_number": 24, "usage_type": "call" }, { "api_name": "pybedtools.bedtool", "line_number": 24, "usage_type": "attribute" }, { ...
28926689383
import sys import argparse import pysam from math import log from math import exp parser = argparse.ArgumentParser(description=''' Assign parent of origin to heterozygous variants in a child using read-backed phasing ''') #parser.add_argument('variants', type=str, help='text file with variant positions.') parser.add_...
besenbacher/GreatApeMutationRate2018
python_scripts/add_AD2_lowQ_py3.py
add_AD2_lowQ_py3.py
py
2,253
python
en
code
1
github-code
18
[ { "api_name": "argparse.ArgumentParser", "line_number": 7, "usage_type": "call" }, { "api_name": "pysam.Samfile", "line_number": 19, "usage_type": "call" }, { "api_name": "pysam.Samfile", "line_number": 20, "usage_type": "call" }, { "api_name": "pysam.Samfile", ...
29541085390
import os import re import sys import csv import time import getopt import subprocess import collections import pandas as pd import find_invariant as fi import refine as refine from shutil import copyfile import association_rule_learning as assorule import multiprocessing import multiprocessing.dummy import multiproces...
ArabelaTso/Learning-Based-ParaVerifer
main.py
main.py
py
35,911
python
en
code
1
github-code
18
[ { "api_name": "sklearn.externals.joblib.load", "line_number": 28, "usage_type": "call" }, { "api_name": "sklearn.externals.joblib", "line_number": 28, "usage_type": "name" }, { "api_name": "sklearn.externals.joblib.dump", "line_number": 36, "usage_type": "call" }, { ...
38542247645
from mtcnn.mtcnn import MTCNN from matplotlib import pyplot import os import shutil import re def face_detection(file): # load image from file pixels = pyplot.imread(file) # detect faces in the image faces = detector.detect_faces(pixels) return len(faces) def make_newdir(dir): os.mkdir(dir + '...
maoenti/ImageSeperator
imgSeperator.py
imgSeperator.py
py
1,273
python
en
code
0
github-code
18
[ { "api_name": "matplotlib.pyplot.imread", "line_number": 9, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 9, "usage_type": "name" }, { "api_name": "os.mkdir", "line_number": 15, "usage_type": "call" }, { "api_name": "os.mkdir", "lin...
23220056133
# coding=utf-8 # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
nagyist/cloudify-docker-plugin
setup.py
setup.py
py
1,479
python
en
code
0
github-code
18
[ { "api_name": "setuptools.command.install.install", "line_number": 23, "usage_type": "name" }, { "api_name": "docker_installation.apt_get_wrapper.apt_get_wrapper.install_docker", "line_number": 25, "usage_type": "call" }, { "api_name": "docker_installation.apt_get_wrapper.apt_get...
27878272745
import os # for checking files in the directory from anytree import Node, RenderTree # module for generating dependency trees import json # module for reading .json files from graphviz import Source # module for printing the attack tree on screen from anytree.exporter import DotExporter # library for convertin...
TarekHamzaGoda/05_Module_5_ISM_AUG23
02_Assignment Part 2/generator/attacktrees.py
attacktrees.py
py
8,882
python
en
code
0
github-code
18
[ { "api_name": "os.environ", "line_number": 9, "usage_type": "attribute" }, { "api_name": "os.pathsep", "line_number": 9, "usage_type": "attribute" }, { "api_name": "anytree.Node", "line_number": 13, "usage_type": "call" }, { "api_name": "os.listdir", "line_num...
13109037394
import os import sys import time import argparse import numpy as np from sklearn.datasets import load_diabetes from sklearn.metrics import mean_squared_error from sklearn.metrics import median_absolute_error from sklearn.model_selection import train_test_split here = os.path.abspath(os.path.dirname(__file__)) sys.pat...
jjbrophy47/daw
scripts/tests/regresssion/prediction.py
prediction.py
py
4,163
python
en
code
0
github-code
18
[ { "api_name": "os.path.abspath", "line_number": 12, "usage_type": "call" }, { "api_name": "os.path", "line_number": 12, "usage_type": "attribute" }, { "api_name": "os.path.dirname", "line_number": 12, "usage_type": "call" }, { "api_name": "sys.path.insert", "l...
70561726760
#! python3 # This program encrypts every .pdf file in a folder and # tries to access all the pdfs in folder to make sure they # were encrypted import PyPDF2, os, sys try: path, key = sys.argv[1:] os.chdir(path) # Searching for PDFs: for filename in os.listdir('.'): if filename.end...
gabrielmsollero/Automate-the-boring-stuff-with-Python---Practical-projects
044 - PdfParanoia.py
044 - PdfParanoia.py
py
2,162
python
en
code
0
github-code
18
[ { "api_name": "sys.argv", "line_number": 8, "usage_type": "attribute" }, { "api_name": "os.chdir", "line_number": 9, "usage_type": "call" }, { "api_name": "os.listdir", "line_number": 12, "usage_type": "call" }, { "api_name": "PyPDF2.PdfFileReader", "line_numb...
25111801249
import pandas as pd import streamlit as st import matplotlib.pyplot as plt import geopandas as gpd import folium from folium import Choropleth from streamlit_folium import st_folium import os # ruta absoluta del script actual current_dir = os.path.dirname(os.path.abspath(__file__)) # ruta relativa de los ficheros csv...
vladiH/PDI
pages/2_Mapping.py
2_Mapping.py
py
4,896
python
es
code
0
github-code
18
[ { "api_name": "os.path.dirname", "line_number": 11, "usage_type": "call" }, { "api_name": "os.path", "line_number": 11, "usage_type": "attribute" }, { "api_name": "os.path.abspath", "line_number": 11, "usage_type": "call" }, { "api_name": "os.path.join", "line...
8338933195
from __future__ import print_function import math import datetime from time import strftime from IPython import display from matplotlib import cm from matplotlib import gridspec from matplotlib import pyplot as plt import numpy as np import pandas as pd import os import csv as csv from sklearn import metrics from skl...
sparsh-ai/recohut
docs/10-datascience/challenges/fraud-activity/code.py
code.py
py
6,035
python
en
code
91
github-code
18
[ { "api_name": "tensorflow.logging.set_verbosity", "line_number": 23, "usage_type": "call" }, { "api_name": "tensorflow.logging", "line_number": 23, "usage_type": "attribute" }, { "api_name": "pandas.options", "line_number": 24, "usage_type": "attribute" }, { "api_...
38212921869
# Cryptocurrency Portfolio import os import json from datetime import datetime from prettytable import PrettyTable from colorama import Fore, Back, Style from requests import Request, Session from requests.exceptions import ConnectionError, Timeout, TooManyRedirects from colorama import init init() convert = 'USD' ...
alexyushkin/Cryptocurrencies
cryptocurrency_portfolio.py
cryptocurrency_portfolio.py
py
3,679
python
en
code
0
github-code
18
[ { "api_name": "colorama.init", "line_number": 11, "usage_type": "call" }, { "api_name": "requests.Session", "line_number": 25, "usage_type": "call" }, { "api_name": "json.loads", "line_number": 30, "usage_type": "call" }, { "api_name": "requests.exceptions.Connect...
23524612650
import tkinter as tk from PIL import Image, ImageTk from matplotlib.pyplot import legend from lirexcel import lirexcel from random import * def nombre2hexa(n): d = {0: '0', 1 : '1', 2: '2', 3: '3', 4: '4', 5: '5', 6: '6', 7: '7', 8: '8', 9: '9', 10: 'A', 11: 'B', 12: 'C', 13: 'D', 14: 'E', 15: 'F'} a = n // ...
pcast31/Projet-avion
tk_ffichage.py
tk_ffichage.py
py
16,958
python
en
code
0
github-code
18
[ { "api_name": "tkinter.Tk", "line_number": 46, "usage_type": "call" }, { "api_name": "tkinter.Canvas", "line_number": 49, "usage_type": "call" }, { "api_name": "tkinter.Button", "line_number": 52, "usage_type": "call" }, { "api_name": "PIL.ImageTk.PhotoImage", ...
2522284152
# -*- coding: utf-8 -*- """ Implements a Habitica synchronisation task. """ # Ensure backwards compatibility with Python 2 from __future__ import ( absolute_import, division, print_function, unicode_literals) from builtins import * from datetime import datetime from tzlocal import get_localzone from .d...
DC23/scriptabit
scriptabit/habitica_task.py
habitica_task.py
py
5,778
python
en
code
8
github-code
18
[ { "api_name": "task.Task", "line_number": 18, "usage_type": "name" }, { "api_name": "task.Difficulty.default", "line_number": 42, "usage_type": "attribute" }, { "api_name": "task.Difficulty", "line_number": 42, "usage_type": "name" }, { "api_name": "task.Character...
36601009146
import pygame.font class Button: """A class to represent a button on the screen""" def __init__( self, msg, main_path, font="bpmono", pos_x=None, pos_y=None, t_size=35, t_color=(0, 0, 0), b_height=50, b_width=260, b_color...
Ezequiel92/alien_invasion
src/button.py
button.py
py
2,064
python
en
code
0
github-code
18
[ { "api_name": "pygame.font.font.Font", "line_number": 25, "usage_type": "call" }, { "api_name": "pygame.font.font", "line_number": 25, "usage_type": "attribute" }, { "api_name": "pygame.font", "line_number": 25, "usage_type": "name" }, { "api_name": "pygame.font.R...
18174283256
from django.urls import path, include from . import views urlpatterns = [ path('', views.home, name='home'), path('delivery/', views.delivery, name='delivery'), path('contact/', views.contact, name='contact'), path('api/v1/', include('base.api.urls')), ]
Salavei/clothing_store
base/urls.py
urls.py
py
273
python
en
code
0
github-code
18
[ { "api_name": "django.urls.path", "line_number": 5, "usage_type": "call" }, { "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", ...
25408110131
from typing import List class Solution: def intersect(self, nums1: List[int], nums2: List[int]) -> List[int]: len_nums = len(nums2) largest_num = nums2 smallest_num = nums1 if len(nums1) > len(nums2): len_nums = len(nums1) largest_num = nums1 sma...
TadakaSuryaTeja/LeetCode
LeetCode75/day_3/intersection_of_two_arrays_ii.py
intersection_of_two_arrays_ii.py
py
562
python
en
code
0
github-code
18
[ { "api_name": "typing.List", "line_number": 5, "usage_type": "name" } ]
42576521346
import logging def log_to_file(logfile: str): logger = logging.getLogger("magic_duckdb") logger.setLevel(logging.DEBUG) file_handler = logging.FileHandler(logfile) file_handler.setLevel(logging.DEBUG) formatter = logging.Formatter( "%(asctime)s - %(name)s - %(levelname)s - %(message)s" ...
iqmo-org/magic_duckdb
magic_duckdb/extras/logging_init.py
logging_init.py
py
402
python
en
code
18
github-code
18
[ { "api_name": "logging.getLogger", "line_number": 5, "usage_type": "call" }, { "api_name": "logging.DEBUG", "line_number": 6, "usage_type": "attribute" }, { "api_name": "logging.FileHandler", "line_number": 8, "usage_type": "call" }, { "api_name": "logging.DEBUG",...
74514928038
# Python code which will record only system sound only for 10 seconds and return the file name import pyaudio import wave import sys import time CHUNK = 1024 FORMAT = pyaudio.paInt16 CHANNELS = 2 DEVICE_INDEX=1 RATE = 44100 RECORD_SECONDS = 10 FILE_NAME="Recording-" TIMESTR = time.strftime("%Y-%m-%d--%Hh-%Mm-%Ss") WAV...
balajibalajanc/Generic-Recorder-Catalyst
src/Utilities/test_Recorder.py
test_Recorder.py
py
1,016
python
en
code
0
github-code
18
[ { "api_name": "pyaudio.paInt16", "line_number": 8, "usage_type": "attribute" }, { "api_name": "time.strftime", "line_number": 14, "usage_type": "call" }, { "api_name": "pyaudio.PyAudio", "line_number": 17, "usage_type": "call" }, { "api_name": "wave.open", "li...
24768191411
from django.conf.urls import url,include from . import views from rest_framework import routers urlpatterns = [ url(r'^$', views.index), url( r'^api/v1/users_fb/([a-zA-Z0-9]+)$', views.get_user_fb, name='get_user_fb' ), url( r'^api/v1/users_fb/$', views.post_lo...
rhuam/tinsta
api/urls.py
urls.py
py
1,231
python
en
code
0
github-code
18
[ { "api_name": "django.conf.urls.url", "line_number": 8, "usage_type": "call" }, { "api_name": "django.conf.urls.url", "line_number": 9, "usage_type": "call" }, { "api_name": "django.conf.urls.url", "line_number": 14, "usage_type": "call" }, { "api_name": "django.c...
4880722825
from django.conf import settings from django.core.management.base import BaseCommand from myuser.models import UserProfile from match_bet.models import Game, Tournament, Match, PanKou, Outcome from notice.models import Notice class Command(BaseCommand): test_user_count = 3 test_users = [] def create_tes...
sentrywang/image
image/common/management/commands/create_test_data.py
create_test_data.py
py
3,311
python
en
code
0
github-code
18
[ { "api_name": "django.core.management.base.BaseCommand", "line_number": 9, "usage_type": "name" }, { "api_name": "myuser.models.UserProfile.objects.filter", "line_number": 17, "usage_type": "call" }, { "api_name": "myuser.models.UserProfile.objects", "line_number": 17, "u...
31667492652
import pybullet as p # from time import sleep import pybullet_data import numpy as np import matplotlib.pyplot as plt import time import sys import make_body_plot as m physicsClient = p.connect(p.DIRECT) p.resetSimulation(p.RESET_USE_DEFORMABLE_WORLD) p.setAdditionalSearchPath(pybullet_data.getDataPath()) planeId = p...
jpinkenburg/ece6680
jonathan/figures/constant_force.py
constant_force.py
py
9,330
python
en
code
0
github-code
18
[ { "api_name": "pybullet.connect", "line_number": 10, "usage_type": "call" }, { "api_name": "pybullet.DIRECT", "line_number": 10, "usage_type": "attribute" }, { "api_name": "pybullet.resetSimulation", "line_number": 11, "usage_type": "call" }, { "api_name": "pybull...
22257969661
from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_bcrypt import Bcrypt from flask_login import LoginManager # Initialize SQLAlchemy and Bcrypt extensions (not yet associated with any Flask app). db = SQLAlchemy() bcrypt = Bcrypt() def create_app(config_name=None): """ Creat...
jorgegarcelan/web_apps
Recipes/__init__.py
__init__.py
py
1,405
python
en
code
1
github-code
18
[ { "api_name": "flask_sqlalchemy.SQLAlchemy", "line_number": 7, "usage_type": "call" }, { "api_name": "flask_bcrypt.Bcrypt", "line_number": 8, "usage_type": "call" }, { "api_name": "flask.Flask", "line_number": 14, "usage_type": "call" }, { "api_name": "flask_login...
37345493541
import os import pickle import numpy as np import collections def traverse_dir( root_dir, extension=('mid', 'MID'), amount=None, str_=None, is_pure=False, verbose=False, is_sort=False, is_ext=True): if verbose: print('[*] Scanning...') fi...
YatingMusic/compound-word-transformer
dataset/representations/uncond/cp/events2words.py
events2words.py
py
3,716
python
en
code
249
github-code
18
[ { "api_name": "os.walk", "line_number": 20, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 28, "usage_type": "call" }, { "api_name": "os.path", "line_number": 28, "usage_type": "attribute" }, { "api_name": "os.path.join", "line_number": 4...
29728876977
import json from tracardi.domain.resources.elastic_resource_config import ElasticResourceConfig, ElasticCredentials from tracardi.service.plugin.domain.register import Plugin, Spec, MetaData, Documentation, PortDoc, Form, FormGroup, \ FormField, FormComponent from tracardi.service.plugin.runner import ActionRunner...
Tracardi/tracardi
tracardi/process_engine/action/v1/connectors/elasticsearch/query/plugin.py
plugin.py
py
5,369
python
en
code
430
github-code
18
[ { "api_name": "model.config.Config", "line_number": 16, "usage_type": "call" }, { "api_name": "json.loads", "line_number": 20, "usage_type": "call" }, { "api_name": "json.JSONDecodeError", "line_number": 21, "usage_type": "attribute" }, { "api_name": "tracardi.ser...
37626789603
from __future__ import print_function import Pyro4 import person Pyro4.config.SERIALIZER = 'pickle' Pyro4.config.SERIALIZERS_ACCEPTED.add('pickle') Pyro4.config.REQUIRE_EXPOSE = True Pyro4.config.DETAILED_TRACEBACK = True class Warehouse(object): def __init__(self): self.contents = ["chair", "bike", "f...
anupkalburgi/cs675-assign1
warehouse.py
warehouse.py
py
963
python
en
code
0
github-code
18
[ { "api_name": "Pyro4.config", "line_number": 7, "usage_type": "attribute" }, { "api_name": "Pyro4.config.SERIALIZERS_ACCEPTED.add", "line_number": 8, "usage_type": "call" }, { "api_name": "Pyro4.config", "line_number": 8, "usage_type": "attribute" }, { "api_name":...
72089297961
import numpy as np from sklearn import svm from sklearn.metrics import accuracy_score, confusion_matrix import matplotlib.pyplot as plt import seaborn as sns def data_split(x, y, db): train_indexes = np.where(db.tr == 1)[0] test_indexs = [i for i in range(len(x)) if i not in train_indexes] x_train, y_trai...
christianderrico/Reproduction-of-Multiple-Instance-Dictionary-Learning-for-Activity-Representation-study
testing_module.py
testing_module.py
py
1,256
python
en
code
0
github-code
18
[ { "api_name": "numpy.where", "line_number": 9, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.figure", "line_number": 19, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 19, "usage_type": "name" }, { "api_name": "seaborn.heatmap...
955141434
from flask import Flask, render_template, url_for, request, redirect import json from datetime import datetime app = Flask(__name__) print(__name__) @app.route("/") def my_home(): return render_template("index.html") @app.route("/success.html") def my_success(): return render_template("success.html") def sa...
D3vYuan/ztm-complete-python-developer
flask-interview/server.py
server.py
py
1,144
python
en
code
0
github-code
18
[ { "api_name": "flask.Flask", "line_number": 5, "usage_type": "call" }, { "api_name": "flask.render_template", "line_number": 10, "usage_type": "call" }, { "api_name": "flask.render_template", "line_number": 14, "usage_type": "call" }, { "api_name": "flask.request....
29996720199
import matplotlib.pyplot as plt def small_graph(): small_graph_dict = dict(kivi={'visoki', 'viroza'}, viroza={'zarazni'}, zarazni={'niski', 'nitrati', 'niti'}, niski={'kivi'}, visoki={'kivi'}, ...
StringSuzana/kaladont_graphs
not_needed.py
not_needed.py
py
4,194
python
en
code
1
github-code
18
[ { "api_name": "matplotlib.pyplot.show", "line_number": 68, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 68, "usage_type": "name" } ]
75066280359
#!usr/bin/env python3 # coding=utf-8 # @IDE :PyCharm # @File :vtk_save.py # @Date :2019/5/8 from vtk.util.vtkImageImportFromArray import * import vtk import SimpleITK as sitk import cv2 import numpy as np def getSeg(source, mask): source = np.reshape(source,(512,512)) mask = np.reshape(mask,(512,512))...
lgdlkq/sliver_07_CT
test/vtk_save.py
vtk_save.py
py
5,396
python
en
code
5
github-code
18
[ { "api_name": "numpy.reshape", "line_number": 15, "usage_type": "call" }, { "api_name": "numpy.reshape", "line_number": 16, "usage_type": "call" }, { "api_name": "cv2.getStructuringElement", "line_number": 17, "usage_type": "call" }, { "api_name": "cv2.MORPH_RECT"...
5912889269
import setuptools with open("./README.md", "r") as file: long_description = file.read() setuptools.setup( name="httpcats", version="1.1.1", author="itsmewulf", author_email="wulf.developer@gmail.com", description="Get URLs to your favourite HTTP Cats easily!", long_description=l...
itsmewulf/httpcats
setup.py
setup.py
py
769
python
en
code
4
github-code
18
[ { "api_name": "setuptools.setup", "line_number": 6, "usage_type": "call" }, { "api_name": "setuptools.find_packages", "line_number": 16, "usage_type": "call" } ]
6233020867
from django.contrib import admin # import from apps here from app_control.models import FunctionController class FunctionControllerAdmin(admin.ModelAdmin): """ 功能开关表注册设置 """ list_display = ("func_code", "func_name", "enabled", "create_time", "func_developer") list_filter = ("func_code",) sea...
Tencent/bk-base
src/dataweb/app/app_control/admin.py
admin.py
py
433
python
en
code
85
github-code
18
[ { "api_name": "django.contrib.admin.ModelAdmin", "line_number": 7, "usage_type": "attribute" }, { "api_name": "django.contrib.admin", "line_number": 7, "usage_type": "name" }, { "api_name": "django.contrib.admin.site.register", "line_number": 17, "usage_type": "call" },...
10424651419
print('='*12 + ' DESAFIO 41 ' + '='*12) from datetime import date ano = int(input('Digite seu ano de nascimento: ')) idade = date.today().year - ano print('O atleta tem {} anos.'.format(idade)) if idade <= 9: classe = 'Mirim' elif 9 < idade <= 14: classe = 'Infantil' elif 14 < idade <= 19: classe = 'Junior'...
GabrielG-tech/Curso-em-Video
Mundo 2/Exercicios/ex41.py
ex41.py
py
452
python
pt
code
0
github-code
18
[ { "api_name": "datetime.date.today", "line_number": 4, "usage_type": "call" }, { "api_name": "datetime.date", "line_number": 4, "usage_type": "name" } ]
16560764692
from setuptools import setup, find_packages VERSION = '0.0.1' DESCRIPTION = 'A package with useful functions relating to space.' setup( name="Spacemath", version=VERSION, author="Periareion (Anton Sollman)", author_email="<periareion05@gmail.com>", description=DESCRIPTION, packages=find_packag...
Periareion/Spacemath
setup.py
setup.py
py
600
python
en
code
0
github-code
18
[ { "api_name": "setuptools.setup", "line_number": 6, "usage_type": "call" }, { "api_name": "setuptools.find_packages", "line_number": 12, "usage_type": "call" } ]
36380445358
import os import traceback from django.core.management.base import BaseCommand, CommandError, NoArgsCommand from django.conf import settings from azurepython3.blobservice import BlobService class Command(NoArgsCommand): help = """Migrate from an existing FileSystemStorage to AzureStorage. When executing the comma...
Bunkerbewohner/azurepython3
azurepython3/management/commands/azuremigrate.py
azuremigrate.py
py
2,266
python
en
code
2
github-code
18
[ { "api_name": "django.core.management.base.NoArgsCommand", "line_number": 8, "usage_type": "name" }, { "api_name": "os.path.exists", "line_number": 15, "usage_type": "call" }, { "api_name": "os.path", "line_number": 15, "usage_type": "attribute" }, { "api_name": "...
32196252578
import pandas as pd import torch import torch.nn as nn import torch.nn.functional as F import matplotlib.pyplot as plt from matplotlib import gridspec import numpy as np import random from matplotlib import rc # rc('font',**{'family':'sans-serif','sans-serif':['Helvetica']}) ## for Palatino and other serif fonts use: ...
adehad/ASPMI
Python/Q4/utilities.py
utilities.py
py
6,987
python
en
code
0
github-code
18
[ { "api_name": "matplotlib.rc", "line_number": 14, "usage_type": "call" }, { "api_name": "matplotlib.rc", "line_number": 15, "usage_type": "call" }, { "api_name": "matplotlib.rc", "line_number": 16, "usage_type": "call" }, { "api_name": "matplotlib.rc", "line_n...
10339825042
#!/usr/bin/python3 import os import sys import re import operator from pathlib import Path RECURSION_LIMIT = 9500 sys.setrecursionlimit(RECURSION_LIMIT + 10) def count(word_list, ignore_words, word_freqs): if word_list == []: return else: word = word_list[0] if word not in ignore_wo...
HoYaStudy/Python_Study
ProgrammingStyle/07-infinite-mirror/prog07.py
prog07.py
py
1,055
python
en
code
2
github-code
18
[ { "api_name": "sys.setrecursionlimit", "line_number": 11, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 36, "usage_type": "call" }, { "api_name": "os.path", "line_number": 36, "usage_type": "attribute" }, { "api_name": "pathlib.Path.cwd", ...
19701692250
from __future__ import print_function import numpy as np from PIL import Image import os import sys import glob import shutil from argparser import args train_examples_per_shape = args.n test_examples_per_shape = max(1, train_examples_per_shape / 10) image_w = 400 image_h = 400 shape_w = 50 shape_h = 50 max_x_nois...
vankov/translation_invariance
make.py
make.py
py
4,363
python
en
code
0
github-code
18
[ { "api_name": "argparser.args.n", "line_number": 12, "usage_type": "attribute" }, { "api_name": "argparser.args", "line_number": 12, "usage_type": "name" }, { "api_name": "argparser.args.noise", "line_number": 20, "usage_type": "attribute" }, { "api_name": "argpar...
14951674021
# A part of NonVisual Desktop Access (NVDA) # This file is covered by the GNU General Public License. # See the file COPYING for more details. # Copyright (C) 2019 NV Access Limited """Unit tests for the orderedWinEventLimiter module. """ import inspect import re import unittest from typing import List, Iter...
nvaccess/nvda
tests/unit/test_orderedWinEventLimiter.py
test_orderedWinEventLimiter.py
py
12,384
python
en
code
1,802
github-code
18
[ { "api_name": "typing.List", "line_number": 17, "usage_type": "name" }, { "api_name": "typing.Callable", "line_number": 17, "usage_type": "name" }, { "api_name": "winUser.EVENT_SYSTEM_FOREGROUND", "line_number": 25, "usage_type": "attribute" }, { "api_name": "winU...
71801680360
import string from copy import copy from random import sample import numpy as np import pytest import filter_functions as ff from filter_functions import numeric from tests import testutil from tests.testutil import rng from . import qutip plotting = pytest.importorskip('filter_functions.plotting', ...
qutech/filter_functions
tests/test_plotting.py
test_plotting.py
py
15,160
python
en
code
14
github-code
18
[ { "api_name": "pytest.importorskip", "line_number": 15, "usage_type": "call" }, { "api_name": "tests.testutil.rand_pulse_sequence", "line_number": 21, "usage_type": "call" }, { "api_name": "tests.testutil", "line_number": 21, "usage_type": "name" }, { "api_name": ...
4001461424
import atexit import os import re import socket import threading import uuid from tensorflow.core.framework import graph_debug_info_pb2 from tensorflow.core.framework import tensor_pb2 from tensorflow.core.protobuf import debug_event_pb2 from tensorflow.python.debug.lib import debug_events_writer from tensorflow.pytho...
tensorflow/tensorflow
tensorflow/python/debug/lib/dumping_callback.py
dumping_callback.py
py
38,755
python
en
code
178,918
github-code
18
[ { "api_name": "threading.local", "line_number": 28, "usage_type": "call" }, { "api_name": "tensorflow.python.util.compat.as_bytes", "line_number": 33, "usage_type": "call" }, { "api_name": "tensorflow.python.util.compat", "line_number": 33, "usage_type": "name" }, { ...
1341070260
# Created by matveyev at 04.08.2021 import numpy as np from PyQt5 import QtWidgets, QtCore import logging from petra_viewer.main_window import APP_NAME from petra_viewer.gui.array_selector_ui import Ui_ArraySelector logger = logging.getLogger(APP_NAME) class ArraySelector(QtWidgets.QWidget): def __init__(self,...
yamedvedya/data_viewer
petra_viewer/widgets/array_selector.py
array_selector.py
py
9,830
python
en
code
0
github-code
18
[ { "api_name": "logging.getLogger", "line_number": 9, "usage_type": "call" }, { "api_name": "petra_viewer.main_window.APP_NAME", "line_number": 9, "usage_type": "argument" }, { "api_name": "PyQt5.QtWidgets.QWidget", "line_number": 12, "usage_type": "attribute" }, { ...
9042941066
#----------------------------------------------------------------------------- # ------------------------------------------------------- wortlabyrinth.py m n # ------------------------------------------------------- erstellt: 01.02.2022 #----------------------------------------------------------------------------- ...
jtympel/wortlabyrinth
wortlabyrinth.py
wortlabyrinth.py
py
6,331
python
de
code
0
github-code
18
[ { "api_name": "os.environ", "line_number": 8, "usage_type": "attribute" }, { "api_name": "string.ascii_letters", "line_number": 12, "usage_type": "attribute" }, { "api_name": "sys.setrecursionlimit", "line_number": 14, "usage_type": "call" }, { "api_name": "sys.ar...
18031503363
from typing import Tuple import torch import torch.nn as nn import torch.nn.functional as F from torch.distributions import RelaxedOneHotCategorical class Codebook(torch.nn.Embedding): """VQ-VAE Codebook. Implements the algorithm presented in "Neural Discrete Representation Learning" [https://arxiv.org/...
maxjcohen/vqvae
vqvae/codebook.py
codebook.py
py
9,424
python
en
code
7
github-code
18
[ { "api_name": "torch.nn", "line_number": 9, "usage_type": "attribute" }, { "api_name": "torch.finfo", "line_number": 35, "usage_type": "call" }, { "api_name": "torch.float32", "line_number": 35, "usage_type": "attribute" }, { "api_name": "torch.Tensor", "line_...
35157488065
from __future__ import annotations import re import urllib.parse from functools import partial from typing import Any from bs4 import BeautifulSoup from markdownify import MarkdownConverter # type: ignore import aiohttp try: import lxml # type: ignore HTML_PARSER = "lxml" except ImportError: HTML_PARS...
rtk-rnjn/TelegramBot
rtfm/_ref.py
_ref.py
py
5,618
python
en
code
4
github-code
18
[ { "api_name": "markdownify.MarkdownConverter", "line_number": 20, "usage_type": "name" }, { "api_name": "typing.Any", "line_number": 28, "usage_type": "name" }, { "api_name": "aiohttp.ClientSession", "line_number": 33, "usage_type": "call" }, { "api_name": "bs4.Be...
25857633342
# Define here the models for your spider middleware # # See documentation in: # https://docs.scrapy.org/en/latest/topics/spider-middleware.html import random from scrapy import signals import pymysql # useful for handling different item types with a single interface from itemadapter import is_item, ItemAdapter class...
joedlut/spider
python_spider/boss_pro/boss_pro/middlewares.py
middlewares.py
py
3,897
python
en
code
0
github-code
18
[ { "api_name": "scrapy.signals.spider_opened", "line_number": 62, "usage_type": "attribute" }, { "api_name": "scrapy.signals", "line_number": 62, "usage_type": "name" }, { "api_name": "random.choice", "line_number": 68, "usage_type": "call" }, { "api_name": "random...
29565811866
from parse import convert_to_graph, get_info from rotation import randAngle, shuffleEdges, angleConvert, rotateGraph from restore import restore from plot import plot_graph_3d as plot MIN_ANGLE = 0.0001745329252 if __name__ == '__main__': name = 'Antazoline' raw = get_info(name) graph = convert_to_graph(r...
Mathless/molecule_rotation
main.py
main.py
py
1,954
python
en
code
3
github-code
18
[ { "api_name": "parse.get_info", "line_number": 10, "usage_type": "call" }, { "api_name": "parse.convert_to_graph", "line_number": 11, "usage_type": "call" }, { "api_name": "rotation.shuffleEdges", "line_number": 16, "usage_type": "call" }, { "api_name": "rotation....
13678841434
import main import matplotlib.pyplot as plt import numpy as np angles = [] dtheta = 3.14 / 100 theta = 0 F = np.zeros(int(main.T / main.dt) * 2 + 2) modules = np.zeros(int(main.T / main.dt) + 1) for i in range(0, int(main.T / main.dt)): if i<main.T/main.dt/6: F[2 * i], F[2 * i + 1] = np.cos(0), np.sin(0) ...
Ulimit-Wynn/TIPE
trajectory_graher.py
trajectory_graher.py
py
879
python
en
code
0
github-code
18
[ { "api_name": "numpy.zeros", "line_number": 7, "usage_type": "call" }, { "api_name": "main.T", "line_number": 7, "usage_type": "attribute" }, { "api_name": "main.dt", "line_number": 7, "usage_type": "attribute" }, { "api_name": "numpy.zeros", "line_number": 8,...
36669730573
import time import gobject import gtk import logging from miro import app from miro import player from miro.gtcache import gettext as _ from miro import signals from miro import util from miro import messages from miro import displaytext from miro.plat import resources from miro.plat import screensaver from miro.fron...
cool-RR/Miro
tv/lib/frontends/widgets/gtk/video.py
video.py
py
24,846
python
en
code
1
github-code
18
[ { "api_name": "miro.frontends.widgets.gtk.widgetset.Widget", "line_number": 29, "usage_type": "name" }, { "api_name": "miro.frontends.widgets.gtk.widgetset.Widget.__init__", "line_number": 34, "usage_type": "call" }, { "api_name": "miro.frontends.widgets.gtk.widgetset.Widget", ...
19918672862
from flask import Blueprint, request, jsonify from flask_cors import cross_origin from database_functions.db_connection.connection import connection from database_functions.account.token_auth_flow import refresh_token from database_functions.groups.insertion_functions import insert_into_group_table, insert_into_pending...
anurag-as/Costrajectory
backend/api/groups/add_users.py
add_users.py
py
3,833
python
en
code
0
github-code
18
[ { "api_name": "flask.Blueprint", "line_number": 14, "usage_type": "call" }, { "api_name": "flask.request.json", "line_number": 22, "usage_type": "attribute" }, { "api_name": "flask.request", "line_number": 22, "usage_type": "name" }, { "api_name": "database_functi...
1342299584
import sys sys.path.insert(0, r'D:\Projects\aaadoc') from statistics import mean, median from collections import Counter from src.utils.utils import get_files_in_from_directory from src.loaders.NvdLoader import NvdLoader from src.loaders.OsvLoader import OsvLoader from src.loaders.OmniLoader import OmniLoader import j...
NewWwest/masters-project
src/recalls/calculate_recall.py
calculate_recall.py
py
22,766
python
en
code
0
github-code
18
[ { "api_name": "sys.path.insert", "line_number": 2, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 2, "usage_type": "attribute" }, { "api_name": "dateutil.parser.parse", "line_number": 38, "usage_type": "call" }, { "api_name": "dateutil.parser", ...
33424409741
#!/usr/bin/env python3 ''' Filename: obtainMAData.py Purpose: This file is used to obtain and clean the data of new covid cases reported by the state of Massachusetts. It will output the data into a file that can be easily added to the database. How to Execute: $ python3 obtainMAData.py --output MAoutput.csv ''' ###...
tomcairns1/NortheasternCovidTesting
bin/obtainMAData.py
obtainMAData.py
py
1,998
python
en
code
0
github-code
18
[ { "api_name": "sys.stderr", "line_number": 37, "usage_type": "attribute" }, { "api_name": "sys.exit", "line_number": 38, "usage_type": "call" }, { "api_name": "pandas.read_excel", "line_number": 44, "usage_type": "call" }, { "api_name": "argparse.ArgumentParser", ...
19171431215
import ssl import socket import time,datetime import requests from requests.exceptions import ReadTimeout import json import re from json import JSONDecodeError from config import * from pyquery import PyQuery as pq class Cert_check(object): def __init__(self,domain): self.domain = domain self.sslc...
lin-zh-cn/1test
9/OPcenter-slave/check_cert.py
check_cert.py
py
6,257
python
en
code
0
github-code
18
[ { "api_name": "ssl.create_default_context", "line_number": 25, "usage_type": "call" }, { "api_name": "socket.socket", "line_number": 26, "usage_type": "call" }, { "api_name": "time.mktime", "line_number": 31, "usage_type": "call" }, { "api_name": "time.strptime", ...
40914609828
import logging from calendar import day_abbr, month_abbr, month_name from datetime import date, datetime, timedelta from typing import List, Optional, Tuple, Dict import discord from discord import app_commands import requests from dateutil.rrule import rrulestr from discord.ext import commands from icalendar import C...
UQComputingSociety/uqcsbot-discord
uqcsbot/events.py
events.py
py
12,180
python
en
code
19
github-code
18
[ { "api_name": "typing.Dict", "line_number": 24, "usage_type": "name" }, { "api_name": "calendar.month_abbr", "line_number": 25, "usage_type": "argument" }, { "api_name": "pytz.timezone", "line_number": 28, "usage_type": "call" }, { "api_name": "typing.Tuple", ...
33029305152
from matplotlib.figure import Figure from matplotlib.pyplot import imread from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas from numpy import ndarray from PyQt5.QtCore import QThread, pyqtSignal class ImgFigure(FigureCanvas): def __init__(self, dpi=100): self.fig = Figure(dp...
aeinrw/LIME
GUI/utli.py
utli.py
py
1,068
python
en
code
51
github-code
18
[ { "api_name": "matplotlib.backends.backend_qt5agg.FigureCanvasQTAgg", "line_number": 8, "usage_type": "name" }, { "api_name": "matplotlib.figure.Figure", "line_number": 10, "usage_type": "call" }, { "api_name": "PyQt5.QtCore.QThread", "line_number": 17, "usage_type": "nam...
4429798127
from django.shortcuts import render from stove.models import State from django.http import HttpResponse, JsonResponse from django.views.decorators.csrf import csrf_exempt import json # Create your views here. @csrf_exempt def index(request): return render(request, 'index.html') def getState(request): result...
rohanmanatkar/Smart-Stove
Web Server and Client/smart_stove/stove/views.py
views.py
py
1,475
python
en
code
0
github-code
18
[ { "api_name": "django.shortcuts.render", "line_number": 11, "usage_type": "call" }, { "api_name": "django.views.decorators.csrf.csrf_exempt", "line_number": 9, "usage_type": "name" }, { "api_name": "stove.models.State.get_state", "line_number": 15, "usage_type": "call" ...
41897229265
#!/usr/bin/env python import numpy as np from sklearn.model_selection import KFold from scipy import interpolate def sorted_nparray_last_argmin(arr, min_val=None): if min_val is None: min_val = arr.min() for idx in range(len(arr)): if arr[idx] > min_val: min_idx = idx - 1 ...
walkoncross/lfw-evaluation-zyf
evaluation_10folds/roc.py
roc.py
py
8,915
python
en
code
6
github-code
18
[ { "api_name": "numpy.arange", "line_number": 24, "usage_type": "call" }, { "api_name": "numpy.less", "line_number": 37, "usage_type": "call" }, { "api_name": "numpy.sum", "line_number": 39, "usage_type": "call" }, { "api_name": "numpy.logical_and", "line_numbe...
72113761001
from itertools import product import time import re import requests from bs4 import BeautifulSoup from .common import Common from domains.models import Domain, Trademark, Url from conditions.models import NG_Keyword_Condition from products.models import Product from results.models import Check_Result class NgCheck(Co...
Daisuke-lab/django_next_sample
backend/backend_module/ng_check.py
ng_check.py
py
4,027
python
en
code
0
github-code
18
[ { "api_name": "common.Common", "line_number": 13, "usage_type": "name" }, { "api_name": "results.models.Check_Result.objects.get", "line_number": 16, "usage_type": "call" }, { "api_name": "results.models.Check_Result.objects", "line_number": 16, "usage_type": "attribute" ...
70406537641
import json def input_number(): """用户输入喜欢的数字""" try: number = int(input('Please in put your favorite number: ')) except ValueError: print('Please input the number') else: filename = 'number_1.json' with open(filename, 'w') as file_object: json.dump(number,fi...
RyanLin1995/python
PythonLearning/training/10.4(存储数据)/10-11.py
10-11.py
py
779
python
en
code
0
github-code
18
[ { "api_name": "json.dump", "line_number": 13, "usage_type": "call" }, { "api_name": "json.load", "line_number": 22, "usage_type": "call" } ]
75032646759
# -*- coding:utf-8 -*- from mako import runtime, filters, cache UNDEFINED = runtime.UNDEFINED __M_dict_builtin = dict __M_locals_builtin = locals _magic_number = 10 _modified_time = 1438909689.735831 _enable_loop = True _template_filename = '/Users/mq20155490/Desktop/CEL/abstrackr_test/abstrackr/templates/reviews/show_...
GuizhiShi/Abstrackr
data/templates/reviews/show_review.mako.py
show_review.mako.py
py
4,545
python
en
code
0
github-code
18
[ { "api_name": "mako.runtime.UNDEFINED", "line_number": 3, "usage_type": "attribute" }, { "api_name": "mako.runtime", "line_number": 3, "usage_type": "name" }, { "api_name": "mako.runtime._inherit_from", "line_number": 26, "usage_type": "call" }, { "api_name": "mak...
22217100320
import json from django.http import JsonResponse from django.views import View from owners.models import Owner, Dog class OwnersView(View): # """ # 목적: Client가 보내주는 owner정보(name, age, email) 등록 요청에 맞게 owner테이블 in database 에 저장 # Input: # { # 'name' = '홍길동' # 'age' = 20 # 'email' = asd@gmail.com # } ...
jhwang0801/Django_CRUD2
owners/views.py
views.py
py
4,286
python
en
code
0
github-code
18
[ { "api_name": "django.views.View", "line_number": 10, "usage_type": "name" }, { "api_name": "json.loads", "line_number": 32, "usage_type": "call" }, { "api_name": "owners.models.Owner.objects.create", "line_number": 34, "usage_type": "call" }, { "api_name": "owner...
41696842995
from collections import defaultdict import matplotlib.pyplot as plt import numpy as np from hrv.classical import time_domain from hrv.rri import RRi __all__ = ["time_varying"] class TimeVarying: def __init__(self, rri, results, rri_segments, seg_size, overlap): self.rri = rri self.results = re...
rhenanbartels/hrv
hrv/nonstationary.py
nonstationary.py
py
2,313
python
en
code
176
github-code
18
[ { "api_name": "numpy.median", "line_number": 38, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.subplots", "line_number": 49, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 49, "usage_type": "name" }, { "api_name": "matplotlib....
14462473403
# def get_username(): # user_name = "bhandariayush_" # return user_name # # # def get_api(user_name): # return "https://www.instagram.com/{0}/?__a=1".format(user_name) import requests from insta_profile import InstaProfile #diff list_username = [ "minionish_1994", "nvnainaverma", "komaldegwekar...
ayushbhandari02/instagram-followers
insta_followers_dict.py
insta_followers_dict.py
py
4,172
python
en
code
0
github-code
18
[ { "api_name": "requests.get", "line_number": 156, "usage_type": "call" }, { "api_name": "requests.exceptions", "line_number": 157, "usage_type": "attribute" } ]
37236895720
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Trains and tests a loudness-threshold classifier for every given .pkl file. For usage information, call without any parameters. Author: Jan Schlüter """ from __future__ import print_function import sys import os from argparse import ArgumentParser import numpy as ...
f0k/ismir2018
experiments/loudness_eval.py
loudness_eval.py
py
4,037
python
en
code
11
github-code
18
[ { "api_name": "argparse.ArgumentParser", "line_number": 25, "usage_type": "call" }, { "api_name": "numpy.mean", "line_number": 47, "usage_type": "call" }, { "api_name": "numpy.load", "line_number": 58, "usage_type": "call" }, { "api_name": "numpy.concatenate", ...
72517697641
from kivy.app import App # from kivy.uix.widget import Widget from kivy.uix.label import Label from kivy.uix.button import Button from kivy.uix.boxlayout import BoxLayout from kivy.core.window import Window import logging from random import randint # Настройка уровня логирования logging.basicConfig(level=logging.WARNI...
DSGranat/Diva
main.py
main.py
py
1,455
python
ru
code
0
github-code
18
[ { "api_name": "logging.basicConfig", "line_number": 11, "usage_type": "call" }, { "api_name": "logging.WARNING", "line_number": 11, "usage_type": "attribute" }, { "api_name": "kivy.core.window.Window.size", "line_number": 21, "usage_type": "attribute" }, { "api_na...
8203303296
from flask import Flask from flask_restful import Api from flask_jwt_extended import JWTManager from user import UserRegister app = Flask(__name__) app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///data.db' app.config['PROPAGATE_EXCEPTIONS'] = True app.config['JWT_SECRET_KEY'] = 'jwt-secret-string' api = Api(app) ...
ConnorSiXiong/Flask_todo_project
login_demo/app.py
app.py
py
688
python
en
code
0
github-code
18
[ { "api_name": "flask.Flask", "line_number": 7, "usage_type": "call" }, { "api_name": "flask_restful.Api", "line_number": 12, "usage_type": "call" }, { "api_name": "flask_jwt_extended.JWTManager", "line_number": 14, "usage_type": "call" }, { "api_name": "user.UserR...
74619495398
from sqlalchemy import and_ import db from db.models.alienvault import Hids_Agents from apimethods.decorators import require_db from apimethods.utils import get_bytes_from_uuid from apimethods.utils import get_hex_string_from_uuid from apimethods.utils import get_uuid_string_from_bytes from apiexceptions.sensor imp...
jpalanco/alienvault-ossim
alienvault-api/alienvault-api-core/src/db/methods/hids.py
hids.py
py
13,307
python
en
code
114
github-code
18
[ { "api_name": "api_log.error", "line_number": 42, "usage_type": "call" }, { "api_name": "apiexceptions.asset.APICannotResolveAssetID", "line_number": 43, "usage_type": "call" }, { "api_name": "apimethods.utils.get_hex_string_from_uuid", "line_number": 47, "usage_type": "c...
3999895844
import ast import collections import textwrap import gast from tensorflow.python.autograph.pyct import anno from tensorflow.python.autograph.pyct import ast_util from tensorflow.python.autograph.pyct import loader from tensorflow.python.autograph.pyct import parser from tensorflow.python.autograph.pyct import pretty_...
tensorflow/tensorflow
tensorflow/python/autograph/pyct/ast_util_test.py
ast_util_test.py
py
8,058
python
en
code
178,918
github-code
18
[ { "api_name": "tensorflow.python.platform.test.TestCase", "line_number": 16, "usage_type": "attribute" }, { "api_name": "tensorflow.python.platform.test", "line_number": 16, "usage_type": "name" }, { "api_name": "gast.parse", "line_number": 19, "usage_type": "call" }, ...
40704101110
# __author: Administrator # __date: 2019/5/28/028 import requests from pprint import pprint class BiBi: def __init__(self, url): self.url = url def run(self): self.header = { "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome...
VonsName/secondPy
secondDay/BiBi.py
BiBi.py
py
799
python
en
code
0
github-code
18
[ { "api_name": "requests.get", "line_number": 17, "usage_type": "call" } ]
27908623842
#Read user input #Clean string #Analyze sentiment #Output result from nltk.corpus import stopwords from nltk.tokenize import word_tokenize from textblob import TextBlob def clean_my_string(a_string): a_string = word_tokenize(a_string) not_stop_words = [word for word in a_string if wor...
XrossFox/nltk_tests
nltk_analysis_test/input_nltk_test.py
input_nltk_test.py
py
1,061
python
en
code
0
github-code
18
[ { "api_name": "nltk.tokenize.word_tokenize", "line_number": 11, "usage_type": "call" }, { "api_name": "nltk.corpus.stopwords.words", "line_number": 13, "usage_type": "call" }, { "api_name": "nltk.corpus.stopwords", "line_number": 13, "usage_type": "name" }, { "api...
72272713321
import cv2 import argparse from openpose import Openpose, draw_person_pose # load model openpose = Openpose(weights_file = "C:\\Users\\root\\Desktop\\1\\models\\posenet.pth", training = False) # read image img = cv2.imread("C:\\Users\\root\\Desktop\\1\\test\\rh.jpeg") # inference poses, _ = openpose.detect(img,) # ...
kamalsairajk/Pose-Mirroring-using-Nao
pose_detect.py
pose_detect.py
py
1,940
python
en
code
0
github-code
18
[ { "api_name": "openpose.Openpose", "line_number": 6, "usage_type": "call" }, { "api_name": "cv2.imread", "line_number": 9, "usage_type": "call" }, { "api_name": "openpose.detect", "line_number": 12, "usage_type": "call" }, { "api_name": "openpose.draw_person_pose"...
73568419241
""" Build a properly encoded payload to test log ingestion without needing to invoke the lambda. """ import json import sys import gzip import base64 # Returns a json string of encoded data # File should *only* contain decoded and unzipped message payload from lambda function def get_message_from_file(filename): ...
newrelic/aws-log-ingestion
test/build-encoded-file.py
build-encoded-file.py
py
1,740
python
en
code
46
github-code
18
[ { "api_name": "json.dumps", "line_number": 22, "usage_type": "call" }, { "api_name": "sys.argv", "line_number": 26, "usage_type": "attribute" }, { "api_name": "sys.exit", "line_number": 29, "usage_type": "call" }, { "api_name": "sys.argv", "line_number": 31, ...