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
43721724450
import os import numpy as np import torch from PIL import Image from diffusers import ControlNetModel, StableDiffusionControlNetInpaintPipeline, DDIMScheduler from diffusers.pipelines.stable_diffusion import StableDiffusionPipelineOutput from diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion_controlnet i...
Zheng-Chong/FashionMatrix
models/vfm.py
vfm.py
py
5,847
python
en
code
89
github-code
18
[ { "api_name": "diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput", "line_number": 13, "usage_type": "name" }, { "api_name": "PIL.Image.Image", "line_number": 15, "usage_type": "attribute" }, { "api_name": "PIL.Image", "line_number": 15, "usage_type": "nam...
17889893693
"""The main app in the backend application""" from fastapi import FastAPI from database.db import init_db from routers.product_review import product_reviews_router app = FastAPI( title="Beanie Rules", description="Some Dummy backend which has beanie as the ODM", version="0.10" ) @app.on_event("startup") ...
KennedyMungai/FastAPI_Beanie_Another
app/main.py
main.py
py
699
python
en
code
0
github-code
18
[ { "api_name": "fastapi.FastAPI", "line_number": 6, "usage_type": "call" }, { "api_name": "database.db.init_db", "line_number": 16, "usage_type": "call" }, { "api_name": "routers.product_review.product_reviews_router", "line_number": 28, "usage_type": "argument" } ]
29317398358
import numpy as np import os from PIL import ImageFont, ImageDraw, Image from moviepy.audio.io.AudioFileClip import AudioFileClip from moviepy.video.io.VideoFileClip import VideoFileClip from moviepy.audio.AudioClip import AudioClip from moviepy.video.VideoClip import ImageClip from moviepy.editor import concatenate_vi...
yurangja99/HanjaShortsGenerator
editor/editor.py
editor.py
py
8,250
python
en
code
0
github-code
18
[ { "api_name": "PIL.ImageFont.truetype", "line_number": 38, "usage_type": "call" }, { "api_name": "PIL.ImageFont", "line_number": 38, "usage_type": "name" }, { "api_name": "moviepy.video.VideoClip.ImageClip", "line_number": 55, "usage_type": "name" }, { "api_name":...
17457809919
from django.urls import path, include from . import views from django.views.generic import TemplateView, RedirectView urlpatterns = [ path("", views.login, name="login"), path("login", RedirectView.as_view(permanent=True, url="/")), path("register", RedirectView.as_view(permanent=True, url="/")), # pat...
Kamlesh480/django_dashbaord
support_dashboard/zendesk_ticket_update/urls.py
urls.py
py
565
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.views.generic.RedirectView.as_view", "line_number": 7, "usage_type": "call" }, { "api_name...
2159206954
import psutil import pyttsx3 import warnings import speech_recognition as sr import os import webbrowser import wikipedia import random import subprocess import string import time from sys import platform import psutil as p import datetime from src.va import speak, ask # engine = pyttsx3.init() # voic...
CarbonDDR/Grp-28-Intelligent_Systems_of_Voice_Recognition
Project/ISVR/src/hash_201801012.py
hash_201801012.py
py
2,218
python
en
code
0
github-code
18
[ { "api_name": "sys.platform", "line_number": 24, "usage_type": "name" }, { "api_name": "subprocess.run", "line_number": 25, "usage_type": "call" }, { "api_name": "sys.platform", "line_number": 26, "usage_type": "name" }, { "api_name": "subprocess.run", "line_n...
29059144990
import os import uuid import concurrent import shutil import pygit2 import tornado.web from modules.Base import BaseHandler from modules.Database import User, Repo from modules.Config import * from modules.Git import * from modules.Lib import safe_markdown, admin class RepoImportHandler(BaseHandler): @tornado.web....
Nossiac/giteasy
modules/Repo.py
Repo.py
py
12,150
python
en
code
2
github-code
18
[ { "api_name": "modules.Base.BaseHandler", "line_number": 16, "usage_type": "name" }, { "api_name": "tornado.web.web", "line_number": 17, "usage_type": "attribute" }, { "api_name": "tornado.web", "line_number": 17, "usage_type": "name" }, { "api_name": "os.path.joi...
5493849142
import os import hashlib from io import open import emails import markdown from bs4 import BeautifulSoup from mdmail.helpers import sanitize_email_address, is_string def send(email, subject=None, from_email=None, to_email=None, cc=None, bcc=None, reply_to=None, smtp=None): """Send mark...
yejianye/mdmail
mdmail/api.py
api.py
py
4,544
python
en
code
57
github-code
18
[ { "api_name": "mdmail.helpers.is_string", "line_number": 35, "usage_type": "call" }, { "api_name": "mdmail.helpers.sanitize_email_address", "line_number": 38, "usage_type": "call" }, { "api_name": "mdmail.helpers.sanitize_email_address", "line_number": 39, "usage_type": "...
23693738161
from django.shortcuts import render, redirect, get_object_or_404 from django.http import HttpResponse from django.contrib.auth.forms import UserCreationForm from django.conf import settings from django.contrib.auth.models import User from .models import DogPost, Comment, CommentVoteLog from .forms import QuestionForm, ...
momentum-cohort-2020-01/django-multiple-choice-DeeMeyers
questiondog/views.py
views.py
py
3,274
python
en
code
0
github-code
18
[ { "api_name": "models.DogPost.objects.order_by", "line_number": 17, "usage_type": "call" }, { "api_name": "models.DogPost.objects", "line_number": 17, "usage_type": "attribute" }, { "api_name": "models.DogPost", "line_number": 17, "usage_type": "name" }, { "api_na...
26719985552
from turtle import Turtle from paddle import Paddle from bricks import Bricks from scoreboard import Scoreboard TRAVEL_DIST = 10 paddle = Paddle() bricks = Bricks() score = Scoreboard() class Ball(Turtle): def __init__(self): super().__init__() self.shape("circle") self.color("alice blue"...
Caroline50505/Breakout_Clone
ball.py
ball.py
py
829
python
en
code
0
github-code
18
[ { "api_name": "paddle.Paddle", "line_number": 7, "usage_type": "call" }, { "api_name": "bricks.Bricks", "line_number": 8, "usage_type": "call" }, { "api_name": "scoreboard.Scoreboard", "line_number": 9, "usage_type": "call" }, { "api_name": "turtle.Turtle", "l...
41387786128
# Patrick Komiske, Eric Metodiev, MIT, 2017 # # Contains two basic Keras models, a convolutional one with three convolutional # layers and one dense layer and a dense model with an extensible number of # layers. from keras.models import Sequential from keras.layers import Dense, Dropout, Activation, Flatten from kera...
francescorubbo/Jet_ML_Tools
python/NN_models.py
NN_models.py
py
2,731
python
en
code
2
github-code
18
[ { "api_name": "keras.backend.set_image_dim_ordering", "line_number": 14, "usage_type": "call" }, { "api_name": "keras.backend", "line_number": 14, "usage_type": "name" }, { "api_name": "keras.models.Sequential", "line_number": 27, "usage_type": "call" }, { "api_na...
28105825128
from django.test import TestCase from django.test import Client from django.contrib.auth.models import User from forward_app.core_models import Policy from forward_app.core_models import Comment from forward_app.core_models import Popularity from forward_app.core_models import Thread """ Tests for all functionality wi...
shiningsunnyday/demodraft
forward_api/forward_app/tests/test_policy.py
test_policy.py
py
3,346
python
en
code
0
github-code
18
[ { "api_name": "django.test.TestCase", "line_number": 12, "usage_type": "name" }, { "api_name": "forward_app.core_models.Policy.objects.create", "line_number": 15, "usage_type": "call" }, { "api_name": "forward_app.core_models.Policy.objects", "line_number": 15, "usage_typ...
15190279711
# -*- coding: utf-8 -*- """ # -*- coding: utf-8 -*- @author: cami_ Created on Thu Feb 27 11:02:16 2020 NOISYmputer python FILTERING ON HTZ %, MISSING DATA %, MAF @author: Chrystian Sosa @Correspondence author: Dr Mathias Lorieux """ #IMPORTING MODULES import pandas as pd import os.path from tqdm import tqdm #nthreads ...
ccsosa/NOISYmputer_Python
NOISYmputer/STEP3_FILTERING_SNP_STEP.py
STEP3_FILTERING_SNP_STEP.py
py
2,939
python
en
code
0
github-code
18
[ { "api_name": "tqdm.tqdm", "line_number": 20, "usage_type": "call" }, { "api_name": "os.path.path.isfile", "line_number": 56, "usage_type": "call" }, { "api_name": "os.path.path", "line_number": 56, "usage_type": "attribute" }, { "api_name": "os.path", "line_n...
4006373364
import os from google.protobuf import message from google.protobuf import text_format from tensorflow.core.protobuf import saved_model_pb2 from tensorflow.python.lib.io import file_io from tensorflow.python.saved_model import constants from tensorflow.python.util import compat def read_saved_model(saved_model_dir): ...
tensorflow/tensorflow
tensorflow/python/tools/saved_model_utils.py
saved_model_utils.py
py
3,940
python
en
code
178,918
github-code
18
[ { "api_name": "os.path.join", "line_number": 24, "usage_type": "call" }, { "api_name": "os.path", "line_number": 24, "usage_type": "attribute" }, { "api_name": "tensorflow.python.util.compat.as_bytes", "line_number": 25, "usage_type": "call" }, { "api_name": "tens...
21453452360
from .models import Book, Author, Seller, Genre, Format from django.contrib.auth.models import User from .fetch import isbn, author def db_loader(): data = author() for i in range(len(data)): try: d = data[i] u1 = User.objects.all()[0] s1 = Seller.objects.all()[0] try: ...
Bikash-nath/Bookaholic
backend/bookstore/load.py
load.py
py
1,521
python
en
code
2
github-code
18
[ { "api_name": "fetch.author", "line_number": 7, "usage_type": "call" }, { "api_name": "django.contrib.auth.models.User.objects.all", "line_number": 11, "usage_type": "call" }, { "api_name": "django.contrib.auth.models.User.objects", "line_number": 11, "usage_type": "attri...
16339434180
# -*- encoding: utf-8 -*- ''' @project : LeetCode @File : minimumLengthEncoding.py @Contact : 9824373@qq.com @Desc : 给定一个单词列表,我们将这个列表编码成一个索引字符串 S 与一个索引列表 A。 例如,如果这个列表是 ["time", "me", "bell"],我们就可以将其表示为 S = "time#bell#" 和 indexes = [0, 2, 5]。 对于每一个索引,我们可以通过从字...
passionzhan/LeetCode
minimumLengthEncoding.py
minimumLengthEncoding.py
py
3,097
python
en
code
1
github-code
18
[ { "api_name": "typing.List", "line_number": 42, "usage_type": "name" }, { "api_name": "typing.List", "line_number": 46, "usage_type": "name" }, { "api_name": "typing.List", "line_number": 61, "usage_type": "name" }, { "api_name": "collections.defaultdict", "li...
16397949749
import http.server import io import cgi import json import os import posixpath import re import threading import traceback import urllib.request, urllib.parse, urllib.error import urllib.parse from avnav_store import AVNStore from avnav_util import AVNUtil, AVNLog, AVNDownload from avnav_websocket import HTTPWebSocket...
wellenvogel/avnav
server/handler/httphandler.py
httphandler.py
py
24,168
python
en
code
72
github-code
18
[ { "api_name": "json.JSONEncoder", "line_number": 38, "usage_type": "attribute" }, { "api_name": "avnav_websocket.HTTPWebSocketsHandler", "line_number": 49, "usage_type": "name" }, { "api_name": "avnav_util.AVNUtil.getHttpRequestParam", "line_number": 57, "usage_type": "at...
17987110292
#!/usr/bin/python3 """ This python module returns the state id of a given state name from hbtn_0e_6_usa using sqlalchemy ORM in interacting with the database """ from sqlalchemy.orm import sessionmaker from sys import argv from model_state import Base, State from sqlalchemy import create_engine if __name__ == '__mai...
CodeStephens/alx-higher_level_programming
0x0F-python-object_relational_mapping/10-model_state_my_get.py
10-model_state_my_get.py
py
887
python
en
code
1
github-code
18
[ { "api_name": "sys.argv", "line_number": 14, "usage_type": "argument" }, { "api_name": "sqlalchemy.create_engine", "line_number": 16, "usage_type": "call" }, { "api_name": "sys.argv", "line_number": 17, "usage_type": "name" }, { "api_name": "model_state.Base.metad...
12801575776
import json from os import walk try: File = open("Data.json", "r") LastDirUsed = json.load(File) #Loads the json file into a dictionary File.close() except: LastDirUsed = {} Data = {} def DirIndexLoad(): Results = [] CurrentSet = "" dirPath = "" #input(LastDirUsed) while True: try: UserInput = input(...
RossMinor/Accessible-Flashcards
DirIndexLoad.py
DirIndexLoad.py
py
1,478
python
en
code
1
github-code
18
[ { "api_name": "json.load", "line_number": 6, "usage_type": "call" }, { "api_name": "json.dump", "line_number": 32, "usage_type": "call" }, { "api_name": "os.walk", "line_number": 36, "usage_type": "call" }, { "api_name": "json.load", "line_number": 50, "us...
10105881122
from django.db import models from django.conf import settings from notification.api import add_notification import user_profile.models import dashboard.models class StudentManager(models.Manager): # get or create the referral codes for a user def create_student(self, user, school): student = user_prof...
mek32390/mchp-dev
mchp/user_profile/managers.py
managers.py
py
3,012
python
en
code
0
github-code
18
[ { "api_name": "django.db.models.Manager", "line_number": 8, "usage_type": "attribute" }, { "api_name": "django.db.models", "line_number": 8, "usage_type": "name" }, { "api_name": "user_profile.models.models.Student", "line_number": 11, "usage_type": "call" }, { "a...
71969026919
from absl.testing import parameterized import numpy as np import tensorflow as tf from tensorflow.python.keras import keras_parameterized # pylint: disable=g-direct-tensorflow-import from official.nlp.modeling.networks import bert_encoder # This decorator runs the test in V1, V2-Eager, and V2-Functional mode. It # ...
nicknochnack/RealTimeSignLanguageDetectionwithTFJS
Tensorflow/models/official/nlp/modeling/networks/bert_encoder_test.py
bert_encoder_test.py
py
9,773
python
en
code
91
github-code
18
[ { "api_name": "tensorflow.python.keras.keras_parameterized.TestCase", "line_number": 12, "usage_type": "attribute" }, { "api_name": "tensorflow.python.keras.keras_parameterized", "line_number": 12, "usage_type": "name" }, { "api_name": "tensorflow.keras.mixed_precision.experiment...
11536872345
################################################################################################### # this class checks the quality of the calculated SST according to several tests and returns an array with quality flags # description ¦ bit ¦ value ¦ # ¦ ¦ ¦ # GROSS IR/...
odermatt/snap-musenalp
src/main/python/lswt_quality_check_idl.py
lswt_quality_check_idl.py
py
13,471
python
en
code
0
github-code
18
[ { "api_name": "numpy.reshape", "line_number": 33, "usage_type": "call" }, { "api_name": "numpy.reshape", "line_number": 34, "usage_type": "call" }, { "api_name": "numpy.reshape", "line_number": 35, "usage_type": "call" }, { "api_name": "numpy.reshape", "line_n...
71124984039
import os from typing import List from matplotlib import pyplot as plt import more_itertools import numpy as np import pandas as pd import tensorflow as tf from embedding_dataset import EmbeddingDataset from embedding_generator import EmbeddingPair from mongo_db_client import MongoDbClient, MongoDbPairDoc from runnable...
betopompolo/embedding_comparator
src/data_analysis.py
data_analysis.py
py
5,381
python
en
code
0
github-code
18
[ { "api_name": "runnable.Runnable", "line_number": 14, "usage_type": "name" }, { "api_name": "os.path.join", "line_number": 16, "usage_type": "call" }, { "api_name": "os.path", "line_number": 16, "usage_type": "attribute" }, { "api_name": "os.path.abspath", "li...
32844440356
import requests # If you are using a Jupyter notebook, uncomment the following line. # %matplotlib inline import matplotlib.pyplot as plt from matplotlib.patches import Rectangle from PIL import Image from io import BytesIO import os import sys import json import glob import time indir = sys.argv[1] outdir = sys.argv[...
sounding-spirit/ocr-evaluation
scripts/azure_ocr.py
azure_ocr.py
py
1,884
python
en
code
0
github-code
18
[ { "api_name": "sys.argv", "line_number": 14, "usage_type": "attribute" }, { "api_name": "sys.argv", "line_number": 15, "usage_type": "attribute" }, { "api_name": "glob.glob", "line_number": 18, "usage_type": "call" }, { "api_name": "os.path.join", "line_number...
18235550790
"""City.py - Contains the City object""" import os, random, datetime import pygame from Project import Project class City(object): """The cities with projects to let""" def __init__(self, date, name="sometown", xy=(0, 0)): self.name = name self.location = xy self.projects = [] ...
rcriii42/DredgeTycoon
City.py
City.py
py
2,125
python
en
code
0
github-code
18
[ { "api_name": "os.path.join", "line_number": 21, "usage_type": "call" }, { "api_name": "os.path", "line_number": 21, "usage_type": "attribute" }, { "api_name": "pygame.image.load", "line_number": 22, "usage_type": "call" }, { "api_name": "pygame.image", "line_...
37292255750
import pickle import numpy as np from util import * from os import listdir from os.path import isfile, join import bisect from collections import deque from torch import nn import torch from torch import optim from torch.autograd import Variable import pickle import json from torch.utils.data.dataset import Dataset fro...
jkhollandjr/reinforcement_learning_wf
dqn_environment_opt.py
dqn_environment_opt.py
py
19,374
python
en
code
1
github-code
18
[ { "api_name": "torch.nn.Module", "line_number": 22, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 22, "usage_type": "name" }, { "api_name": "torch.nn.Conv1d", "line_number": 33, "usage_type": "call" }, { "api_name": "torch.nn", "line_nu...
36132069583
from django.db import models from django.contrib.auth.models import User from django.core.urlresolvers import reverse class Article(models.Model): ''' Attributes of a blog post ''' title = models.CharField( max_length=100, ) text = models.TextField( help_text='The text of the ...
lukitaa/django-blog
blog/models.py
models.py
py
1,464
python
en
code
0
github-code
18
[ { "api_name": "django.db.models.Model", "line_number": 6, "usage_type": "attribute" }, { "api_name": "django.db.models", "line_number": 6, "usage_type": "name" }, { "api_name": "django.db.models.CharField", "line_number": 11, "usage_type": "call" }, { "api_name": ...
32820703895
# standard imports import logging # external imports from fastapi import APIRouter, Depends, status, Query from fastapi.encoders import jsonable_encoder from fastapi.responses import JSONResponse from sqlalchemy.exc import IntegrityError from sqlalchemy.orm import Session # local imports from api import dependencies ...
grassrootseconomics/cic-text-interface
api/api_v1/routes/country.py
country.py
py
4,655
python
en
code
0
github-code
18
[ { "api_name": "logging.getLogger", "line_number": 23, "usage_type": "call" }, { "api_name": "fastapi.APIRouter", "line_number": 24, "usage_type": "call" }, { "api_name": "sqlalchemy.orm.Session", "line_number": 28, "usage_type": "name" }, { "api_name": "fastapi.De...
42098755995
from tkinter import * import tkinter.messagebox from functools import partial import logic class Application(Frame): def __init__(self, master): super(Application, self).__init__(master) self.grid() self.game_logic = logic.ConnectFourRules() self.img = PhotoImage(file="b.png") self.img_player = [PhotoIma...
szymanmi/Connect-Four
interface.py
interface.py
py
3,971
python
en
code
2
github-code
18
[ { "api_name": "logic.ConnectFourRules", "line_number": 12, "usage_type": "call" }, { "api_name": "functools.partial", "line_number": 41, "usage_type": "call" }, { "api_name": "tkinter.messagebox.showinfo", "line_number": 62, "usage_type": "call" }, { "api_name": "...
31153829155
import numpy as np import os from god_config import * import bdpy dir_path = os.path.dirname(os.path.realpath(__file__)) #current directory #################################################### #ML part from sklearn.preprocessing import normalize from sklearn.model_selection import RepeatedStratifiedKFold, GridSearchCV,...
rohit49plus2/fMRI-554X
rohit_smote_analysis.py
rohit_smote_analysis.py
py
5,247
python
en
code
0
github-code
18
[ { "api_name": "os.path.dirname", "line_number": 5, "usage_type": "call" }, { "api_name": "os.path", "line_number": 5, "usage_type": "attribute" }, { "api_name": "os.path.realpath", "line_number": 5, "usage_type": "call" }, { "api_name": "bdpy.BData", "line_num...
6525749285
from flask import Flask,request,render_template,make_response from flask_pymongo import MongoClient,PyMongo import pdfkit app = Flask(__name__) mongodb_uri = "mongodb://facci:Uleam16@ds139278.mlab.com:39278/jornadasfacci" client = MongoClient(mongodb_uri) db = client.jornadasfacci @app.route('/registrados') def re...
diegotoala/jornadasfacci
hello.py
hello.py
py
951
python
en
code
0
github-code
18
[ { "api_name": "flask.Flask", "line_number": 6, "usage_type": "call" }, { "api_name": "flask_pymongo.MongoClient", "line_number": 9, "usage_type": "call" }, { "api_name": "flask.render_template", "line_number": 24, "usage_type": "call" }, { "api_name": "pdfkit.from...
34136049239
import sqlite3 import csv conn = sqlite3.connect('Movies.sqlite') cur = conn.cursor() conn.executescript(''' DROP TABLE IF EXISTS Movies; DROP TABLE IF EXISTS Genre; DROP TABLE IF EXISTS Director; CREATE TABLE Genre ( id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE, name TEXT UNIQUE ); ...
YanShtein/Movie_directors_d3js
movies.py
movies.py
py
1,925
python
en
code
0
github-code
18
[ { "api_name": "sqlite3.connect", "line_number": 4, "usage_type": "call" }, { "api_name": "csv.reader", "line_number": 39, "usage_type": "call" } ]
9567286725
import os import numpy as np import binvox_rw import datetime import time from sklearn.model_selection import train_test_split from tensorflow.keras import Model, initializers, activations from tensorflow.keras.layers import Input, Dense, Activation, Dropout, Flatten , GaussianNoise from tensorflow.keras.layers impor...
enesvs/DL-3DCNN
Thesis_Lib.py
Thesis_Lib.py
py
19,465
python
en
code
0
github-code
18
[ { "api_name": "time.sleep", "line_number": 21, "usage_type": "call" }, { "api_name": "os.listdir", "line_number": 38, "usage_type": "call" }, { "api_name": "os.path.isdir", "line_number": 39, "usage_type": "call" }, { "api_name": "os.path", "line_number": 39, ...
31791340331
from typing import Optional, List class ListNode: def __init__(self, val=0, next=None): self.val = val self.next = next def printList(self): elements = [] head = self while head is not None: elements.append(head.val) head = head.next ...
Bussler/LeetCode_Grind75
Leetcode_Problems_Python/Datastructures_Python/Linked_List.py
Linked_List.py
py
715
python
en
code
0
github-code
18
[ { "api_name": "typing.List", "line_number": 17, "usage_type": "name" } ]
3580960723
# -*- coding: utf8 -*- """Base API module. Design notes: - Content Negotiation: All responses are in the JSON-LD format and use the Web Annotation profile, more formats may be added in future. """ import os import json from flask import current_app from flask import abort, request, jsonify, make_response, url_for ...
alexandermendes/explicates
explicates/api/base.py
base.py
py
10,463
python
en
code
7
github-code
18
[ { "api_name": "explicates.core.repo.get_by", "line_number": 29, "usage_type": "call" }, { "api_name": "explicates.core.repo", "line_number": 29, "usage_type": "name" }, { "api_name": "flask.abort", "line_number": 31, "usage_type": "call" }, { "api_name": "flask.ab...
36216183197
#!/usr/bin/env python3 # Created by Nuo Wang. # Last modified on 8/16/2017. # Required libraries. import json import numpy as np import pickle import pandas as pd import random ### Part 1: Find and save unique doctors. # Variable to hold file names. file_list = [] # Generate the names of the BetterDoctor JSON files...
nuwapi/DoctorSnapshot
src/step02_betterdoctor_api_parse.py
step02_betterdoctor_api_parse.py
py
8,449
python
en
code
8
github-code
18
[ { "api_name": "numpy.arange", "line_number": 20, "usage_type": "call" }, { "api_name": "numpy.arange", "line_number": 21, "usage_type": "call" }, { "api_name": "json.load", "line_number": 46, "usage_type": "call" }, { "api_name": "pickle.dump", "line_number": ...
4006214654
import contextlib import warnings from google.protobuf import json_format as _json_format # exports Summary, SummaryDescription, Event, TaggedRunMetadata, SessionLog # pylint: disable=unused-import, g-importing-member from tensorflow.core.framework.summary_pb2 import Summary from tensorflow.core.framework.summary_pb2...
tensorflow/tensorflow
tensorflow/python/summary/summary.py
summary.py
py
36,923
python
en
code
178,918
github-code
18
[ { "api_name": "tensorflow.python.distribute.summary_op_util.skip_summary", "line_number": 97, "usage_type": "call" }, { "api_name": "tensorflow.python.distribute.summary_op_util", "line_number": 97, "usage_type": "name" }, { "api_name": "tensorflow.python.framework.constant_op.co...
39893359400
import statistics as st x_list = [] y_list = [] rang = int(input("How many coordinates are in your list? ")) # sets the range and therefore the amount of repetitions asking for a new number for i in range(rang): # rang is the number of integers you want to sort x_coord = float(input("Please enter x: ")) y_co...
lukewh12/Simple-py-Stats
regline_calc.py
regline_calc.py
py
471
python
en
code
0
github-code
18
[ { "api_name": "statistics.mean", "line_number": 13, "usage_type": "call" }, { "api_name": "statistics.mean", "line_number": 14, "usage_type": "call" } ]
75373212519
# -*- coding: utf-8 -*- """ Created on Tue Nov 24 22:27:13 2020 Keras for Beginners: Building Your First Neural Network A beginner-friendly guide on using Keras to implement a simple Neural Network in Python The Problem: MNIST digit classification https://victorzhou.com/blog/keras-neural-network-tutorial/ ...
hugohvf/SistemasInteligentes
Prova 2/Keras/mlp_mnist_classification_keras.py
mlp_mnist_classification_keras.py
py
5,183
python
pt
code
0
github-code
18
[ { "api_name": "mnist.train_images", "line_number": 32, "usage_type": "call" }, { "api_name": "mnist.train_labels", "line_number": 33, "usage_type": "call" }, { "api_name": "mnist.test_images", "line_number": 34, "usage_type": "call" }, { "api_name": "mnist.test_la...
3532847384
#!/usr/local/bin/python3 import sys import sqlite3 as lite from datetime import datetime, timedelta import argparse def get_next_saturday(date): d = datetime.strptime(date, '%Y-%m-%d') t = timedelta((12 - d.weekday()) % 7) saturday = (d + t).strftime('%Y-%m-%d') return(saturday) def main(args): entered_date = ...
jakeh524/Wrong-Generation
wrong-generation-utilities/wrong_generation.py
wrong_generation.py
py
1,258
python
en
code
0
github-code
18
[ { "api_name": "datetime.datetime.strptime", "line_number": 9, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 9, "usage_type": "name" }, { "api_name": "datetime.timedelta", "line_number": 10, "usage_type": "call" }, { "api_name": "sqlite3...
13922488010
from rest_framework import serializers from rest_framework.fields import CharField from poll_api.models import Poll, Participant class PollListSerializer(serializers.ModelSerializer): """ /poll serializer """ pseudo = CharField(write_only=True, allow_null=True) class Meta: model = Poll ...
ACroisille/buzzytrip-back
poll_api/serializers/poll_serializers.py
poll_serializers.py
py
1,599
python
en
code
0
github-code
18
[ { "api_name": "rest_framework.serializers.ModelSerializer", "line_number": 7, "usage_type": "attribute" }, { "api_name": "rest_framework.serializers", "line_number": 7, "usage_type": "name" }, { "api_name": "rest_framework.fields.CharField", "line_number": 11, "usage_type...
73440678119
# -*- coding: utf-8 -*- from modules import imageResizeWX, compressionTools from wx import BITMAP_TYPE_PNG, BITMAP_TYPE_JPEG, BITMAP_TYPE_BMP def image_add(self, image, size, parent, category, format=BITMAP_TYPE_PNG, quality=None, compression=compressionTools.COMPRESSION_FMT.LZMA): if self.templates...
Danixu/components-manager
plugins/database/common/image.py
image.py
py
2,786
python
en
code
0
github-code
18
[ { "api_name": "wx.BITMAP_TYPE_PNG", "line_number": 6, "usage_type": "name" }, { "api_name": "modules.compressionTools.COMPRESSION_FMT", "line_number": 7, "usage_type": "attribute" }, { "api_name": "modules.compressionTools", "line_number": 7, "usage_type": "name" }, {...
13109293020
from hmac import new from hashlib import sha256 from time import time from requests import get from requests.auth import AuthBase # https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-key-authentication # GET https://api.coinbase.com/v2/accounts api_url = "https://api.coinbase.com/v2/accounts" api = '...
NullCharacter0/CoinBase-API-Authorization-Example-Python
Authorization-V2-Example.py
Authorization-V2-Example.py
py
1,193
python
en
code
0
github-code
18
[ { "api_name": "requests.auth.AuthBase", "line_number": 20, "usage_type": "name" }, { "api_name": "time.time", "line_number": 26, "usage_type": "call" }, { "api_name": "hmac.new", "line_number": 28, "usage_type": "call" }, { "api_name": "hashlib.sha256", "line_...
37144983805
from flask import render_template from flask import redirect from flask import request from flask import Flask from bs4 import BeautifulSoup from house import House import requests import time headers = {} for ln in open('headers.txt','r').read().split('\n'): headers[ln.split(':')[0]] = ':'.join(ln.split(':')[1:])...
wa1ker38552/Hoogle
index.py
index.py
py
4,194
python
en
code
0
github-code
18
[ { "api_name": "flask.request", "line_number": 17, "usage_type": "name" }, { "api_name": "requests.get", "line_number": 17, "usage_type": "call" }, { "api_name": "house.House", "line_number": 21, "usage_type": "call" }, { "api_name": "flask.request.json", "line...
35760265858
from squadron import commit from squadron.fileio.dirio import makedirsp import pytest import jsonschema from helper import are_dir_trees_equal, get_test_path import os import shutil import json from squadron.fileio.dirio import makedirsp def checkfile(filename, compare): with open(filename) as ofile: asse...
gosquadron/squadron
tests/test_apply.py
test_apply.py
py
5,551
python
en
code
51
github-code
18
[ { "api_name": "os.path.join", "line_number": 16, "usage_type": "call" }, { "api_name": "os.path", "line_number": 16, "usage_type": "attribute" }, { "api_name": "helper.get_test_path", "line_number": 16, "usage_type": "call" }, { "api_name": "os.path.join", "li...
19017805483
import PyPDF2 import pyttsx3 pdfReader = PyPDF2.PdfReader(open('osama.pdf.pdf', 'rb')) speaker = pyttsx3.init("PDF") for page_num in range(pdfReader.numPages): text = pdfReader.getPage(page_num).extract_text() speaker.say(text) speaker.runAndWait() speaker.stop() speaker.save_to_file(text, 'audio.mp3')...
semo4/boycott
aduio_book.py
aduio_book.py
py
342
python
en
code
0
github-code
18
[ { "api_name": "PyPDF2.PdfReader", "line_number": 5, "usage_type": "call" }, { "api_name": "pyttsx3.init", "line_number": 7, "usage_type": "call" } ]
71201302760
from random import random import cv2 import time from datetime import datetime import os import Switcher import random import HandTrackingModule as htm wCam , hCam = 648, 468 cap = cv2.VideoCapture(0) cap.set(3, wCam) cap.set(4, hCam) pTime = 0 checkFinger = Switcher.PythonSwitch() detector = htm.handDetector() tipIds ...
davidoodugama/Advance-security-login-system
handdetection.py
handdetection.py
py
2,608
python
en
code
0
github-code
18
[ { "api_name": "cv2.VideoCapture", "line_number": 10, "usage_type": "call" }, { "api_name": "Switcher.PythonSwitch", "line_number": 14, "usage_type": "call" }, { "api_name": "HandTrackingModule.handDetector", "line_number": 15, "usage_type": "call" }, { "api_name":...
32724245868
# -*- coding: utf-8 -*- from rgc import RGC from data import get_separated_data import numpy as np def rgc_acc(alpha, beta, mu, train_ratio, random_state, dataset): x_train, x_test, y_train, y_test, num_class = get_separated_data(dataset, train_ratio, random_state) # load model model = RGC(k=5, alpha=al...
Lucius-lsr/RGC
semi_classification.py
semi_classification.py
py
655
python
en
code
0
github-code
18
[ { "api_name": "data.get_separated_data", "line_number": 9, "usage_type": "call" }, { "api_name": "rgc.RGC", "line_number": 12, "usage_type": "call" }, { "api_name": "numpy.mean", "line_number": 16, "usage_type": "call" } ]
74572423721
from sklearn.metrics.pairwise import cosine_similarity import operator import pandas as pd def similar_users(customer_id, matrix, k=3): """ Find most similar users using cosine similarity :param customer_id: choosen user :param matrix: user-user matrix :param k: number of similar users :retur...
anandharajakalya/recommendation_system
colloborative_filtering_user_based/core/algorithm.py
algorithm.py
py
2,835
python
en
code
0
github-code
18
[ { "api_name": "sklearn.metrics.pairwise.cosine_similarity", "line_number": 22, "usage_type": "call" }, { "api_name": "operator.itemgetter", "line_number": 31, "usage_type": "call" }, { "api_name": "pandas.DataFrame", "line_number": 49, "usage_type": "call" } ]
71886028840
import itertools, copy def possibilities(param): pre_perms_list = list() question_mark_indexes = list() clone = list(copy.deepcopy(param)) solution = list() for index, char in enumerate(param): if char == "?": pre_perms_list.append([1, 0]) question_mark_indexes.appe...
SeansC12/codewars
ones_zeroes_wildcards.py
ones_zeroes_wildcards.py
py
687
python
en
code
0
github-code
18
[ { "api_name": "copy.deepcopy", "line_number": 6, "usage_type": "call" }, { "api_name": "itertools.product", "line_number": 14, "usage_type": "call" } ]
11546400331
import http.server import logging import threading import urllib.parse logging.basicConfig(level=logging.DEBUG, format='%(levelname)s: %(message)s [%(asctime)s]') SERVER_ADDRESS = ('localhost', 20456) def run(target): class RequestHandler(http.server.BaseHTTPRequestHandler): def d...
avamsi/Flash
server.py
server.py
py
890
python
en
code
12
github-code
18
[ { "api_name": "logging.basicConfig", "line_number": 6, "usage_type": "call" }, { "api_name": "logging.DEBUG", "line_number": 6, "usage_type": "attribute" }, { "api_name": "http.server.server", "line_number": 15, "usage_type": "attribute" }, { "api_name": "http.ser...
25097818706
from jina import Document, DocumentArray, DocumentArrayMemmap from finetuner.tuner.dataset import InstanceDataset def test_empty_docarray(): ds = InstanceDataset(DocumentArray()) assert len(ds) == 0 def test_empty_list(): ds = InstanceDataset([]) assert len(ds) == 0 def test_da_input(): data ...
ajjurcom/finetuner
tests/unit/tuner/dataset/test_instance_dataset.py
test_instance_dataset.py
py
2,366
python
en
code
null
github-code
18
[ { "api_name": "finetuner.tuner.dataset.InstanceDataset", "line_number": 7, "usage_type": "call" }, { "api_name": "jina.DocumentArray", "line_number": 7, "usage_type": "call" }, { "api_name": "finetuner.tuner.dataset.InstanceDataset", "line_number": 12, "usage_type": "call...
11691888977
import discord import pandas # 處理要送出的訊息 # 會用到的指令:推播、!today def today(query_result, today_date): # 前面是tuple 後面是日期 # title : 今天 (日期) 生日的玩家有: # description : ID_1(osu profile link) # ID_2(osu profile link) # 或者沒有人 embedded_msg_title = "今天 (" + today_date + ") 生日的玩家有:\...
Flask3/flask3Bot
msg_wrapper.py
msg_wrapper.py
py
4,528
python
en
code
1
github-code
18
[ { "api_name": "discord.Embed", "line_number": 24, "usage_type": "call" }, { "api_name": "discord.Embed", "line_number": 50, "usage_type": "call" }, { "api_name": "discord.Embed", "line_number": 138, "usage_type": "call" } ]
12886547490
from django.urls import path from . import views urlpatterns = [ path('', views.home,name="home"), path('bokking/', views.booking,name="booking"), path('form/', views.formview, name="form"), path('checkout/',views.checkout,name='check'), ]
shafip/play-sport
playsport/turf/urls.py
urls.py
py
257
python
en
code
0
github-code
18
[ { "api_name": "django.urls.path", "line_number": 4, "usage_type": "call" }, { "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", ...
39684203924
import torch.utils.data as data import numpy as np import sys sys.path.append("../..") # adds higher directory to python modules path sys.path.append("..") # adds higher directory to python modules path from MGFNmain.utils.utils import process_feat import torch torch.set_default_tensor_type('torch.cuda.FloatTensor') ...
marctimjen/Weakly-supervised-anomaly-detection
MGFNmain/datasets/dataset.py
dataset.py
py
6,281
python
en
code
6
github-code
18
[ { "api_name": "sys.path.append", "line_number": 4, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 4, "usage_type": "attribute" }, { "api_name": "sys.path.append", "line_number": 5, "usage_type": "call" }, { "api_name": "sys.path", "line_numbe...
31167185004
# 203. Remove Linked List Elements # https://leetcode.com/problems/remove-linked-list-elements/ from typing import Optional # Definition for singly-linked list. class ListNode: def __init__(self, val=0, next=None): self.val = val self.next = next class Solution: def removeElements(self, he...
sgrade/pytest
leetcode/remove-linked-list-elements.py
remove-linked-list-elements.py
py
704
python
en
code
0
github-code
18
[ { "api_name": "typing.Optional", "line_number": 16, "usage_type": "name" } ]
28108418210
#!/usr/bin/env python3 import gmpy from Cryptodome.Util import number from itertools import combinations def load_output(): ret = {'n':[], 'c':[]} with open("output_0ef6d6343784e59e2f44f61d2d29896f.txt", 'rb') as fd: while True: line = fd.readline() if not line: break ...
onealmond/hacking-lab
cryptohack/endless-emails/decrypt.py
decrypt.py
py
1,056
python
en
code
72
github-code
18
[ { "api_name": "itertools.combinations", "line_number": 25, "usage_type": "call" }, { "api_name": "Cryptodome.Util.number.inverse", "line_number": 31, "usage_type": "call" }, { "api_name": "Cryptodome.Util.number", "line_number": 31, "usage_type": "name" }, { "api_...
41628971700
import time import json import logging import requests import redis from datetime import datetime, timezone def main(): redis_client = redis.StrictRedis("redis", decode_responses=True) while True: all_broadcasters = redis_client.zrangebyscore("BROADCASTERS", min='-inf', max="+inf", withscores=False...
VilksJanis/dcsa_multimodal
lock_app/src/main.py
main.py
py
2,480
python
en
code
1
github-code
18
[ { "api_name": "redis.StrictRedis", "line_number": 12, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 25, "usage_type": "call" }, { "api_name": "logging.warning", "line_number": 28, "usage_type": "call" }, { "api_name": "datetime.datetime.from...
24430870796
import requests url = "http://10.5.0.219/light/test_bulb/turn_on" headers = { 'authorization': "Digest username=\"admin\", realm=\"asyncesp\", nonce=\"\", uri=\"/light/test_bulb/turn_on?r=255&g=0&b=0&brightness=255\", qop=auth, nc=, cnonce=\"\", response=\"2858d15a99bb1659a04056065b7c7c3f\", opaque=\"\"", 'co...
kleberbaum/smart-home
main.py
main.py
py
636
python
en
code
0
github-code
18
[ { "api_name": "requests.request", "line_number": 14, "usage_type": "call" } ]
3089591870
import pandas as pd import pyarrow from prefect import flow, task from prefect_gcp import GcpCredentials @task(retries=3) def fetch(dataset_url: str) -> pd.DataFrame: """Read taxi data from web into pandas DataFrame""" df = pd.read_parquet(dataset_url) return df @task() def write_bq(df: pd.DataFrame, co...
raviteja147/Data-Engineering
prefect/code/etl_web_to_bq.py
etl_web_to_bq.py
py
1,133
python
en
code
0
github-code
18
[ { "api_name": "pandas.read_parquet", "line_number": 10, "usage_type": "call" }, { "api_name": "prefect.task", "line_number": 7, "usage_type": "call" }, { "api_name": "pandas.DataFrame", "line_number": 8, "usage_type": "attribute" }, { "api_name": "pandas.DataFrame...
17841713269
# # import numpy as np # import matplotlib.pyplot as plt # from matplotlib.widgets import Slider # # # # from scipy.fft import dct, idct # import matplotlib.pyplot as plt # N = 100 # t = np.linspace(0,20,N, endpoint=False) # x = np.exp(-t/3)*np.cos(2*t) # y = dct(x, norm='ortho') # window = np.zeros(N) # ...
11jolek11/DataStreamsList1
main.py
main.py
py
2,357
python
en
code
0
github-code
18
[ { "api_name": "numpy.exp", "line_number": 36, "usage_type": "call" }, { "api_name": "numpy.linspace", "line_number": 38, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.subplots", "line_number": 45, "usage_type": "call" }, { "api_name": "matplotlib.pyplot...
30049301634
import glob import os import sys from lxml import etree if len(sys.argv) != 2: sys.exit('Usage: ' + sys.argv[0] + ' <ROM hack name>') for filename in glob.glob(os.path.join('xml', 'moves', '*.xml')): tree = etree.parse(filename) move_name = filename.split('/')[-1].split('.')[0].lower().replace('_', '') ...
EverOddish/Westwood
showdown/moves_to_showdown.py
moves_to_showdown.py
py
1,170
python
en
code
3
github-code
18
[ { "api_name": "sys.argv", "line_number": 7, "usage_type": "attribute" }, { "api_name": "sys.exit", "line_number": 8, "usage_type": "call" }, { "api_name": "sys.argv", "line_number": 8, "usage_type": "attribute" }, { "api_name": "glob.glob", "line_number": 10, ...
71337196839
import numpy as np import matplotlib.pyplot as plt import tkinter as Tk import gui_stuff as gui import media as media gui.set_rcParams() title = "Reflection and Transmission of a Stack vs. Wavelength" root = Tk.Tk() root.title(title) def m(kfz,z): return np.array([[np.cos(kfz*z),np.sin(kfz*z)/kfz],[-np.sin(kfz*z)...
sskupin/theo_opt
stack_lambda.py
stack_lambda.py
py
8,888
python
en
code
0
github-code
18
[ { "api_name": "gui_stuff.set_rcParams", "line_number": 7, "usage_type": "call" }, { "api_name": "tkinter.Tk", "line_number": 9, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 13, "usage_type": "call" }, { "api_name": "numpy.cos", "line_num...
23613898962
#!/usr/bin/python # coding=utf-8 import requests import unittest import json from common.public import * from common.login import * import os # from requests_toolbelt import MultipartEncoder class ICEM_Interface(unittest.TestCase): @classmethod def setUpClass(self): self.headers = headers_fileUpload ...
EmmySmith/autoInterfaceTest
test_interface/CEM/loyaltyManagement/couponManagement/fileUpload.py
fileUpload.py
py
1,381
python
en
code
0
github-code
18
[ { "api_name": "unittest.TestCase", "line_number": 11, "usage_type": "attribute" }, { "api_name": "os.path.dirname", "line_number": 25, "usage_type": "call" }, { "api_name": "os.path", "line_number": 25, "usage_type": "attribute" }, { "api_name": "os.path.realpath"...
35729909302
import os from fastapi import FastAPI host = os.popen('hostname') hostname = host.read() app = FastAPI() @app.get("/grettings") async def gretting(): return {"message":"Hello World from"+hostname} @app.get("/square/{numero}") async def square(numero: int): return {"number":numero , "square": numero*numero}
Jenevta/everischallenge
Task1/backend/app/main.py
main.py
py
319
python
en
code
0
github-code
18
[ { "api_name": "os.popen", "line_number": 5, "usage_type": "call" }, { "api_name": "fastapi.FastAPI", "line_number": 8, "usage_type": "call" } ]
3987503014
from absl.testing import parameterized import numpy as np from tensorflow.dtensor.python import layout as layout_lib from tensorflow.dtensor.python import numpy_util from tensorflow.dtensor.python.tests import test_util from tensorflow.python.eager.polymorphic_function import polymorphic_function from tensorflow.pytho...
tensorflow/tensorflow
tensorflow/dtensor/python/tests/sparse_test.py
sparse_test.py
py
4,121
python
en
code
178,918
github-code
18
[ { "api_name": "tensorflow.dtensor.python.layout.Layout", "line_number": 19, "usage_type": "attribute" }, { "api_name": "tensorflow.dtensor.python.layout", "line_number": 19, "usage_type": "name" }, { "api_name": "tensorflow.dtensor.python.layout.Mesh", "line_number": 20, ...
21580506440
import argparse import sys sys.path.append('/mnt/efs/project/') import random from datetime import datetime import torch import torch.nn as nn import torch.optim as optim from torch.optim.lr_scheduler import ReduceLROnPlateau #BartBase from transformers import BartTokenizer, BartForConditionalGeneration #Dataloader...
amazon-science/aws-dialogue-qa-pair-generation
coverage/VARIANCE.py
VARIANCE.py
py
5,184
python
en
code
4
github-code
18
[ { "api_name": "sys.path.append", "line_number": 3, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 3, "usage_type": "attribute" }, { "api_name": "torch.cuda.is_available", "line_number": 17, "usage_type": "call" }, { "api_name": "torch.cuda", ...
42062448969
# https://flask.palletsprojects.com/en/2.2.x/patterns/fileuploads/ # Need to launch the server first from flask import Flask, g from flask_cors import CORS from routes.auth import auth from routes.scans import scans from routes.global_data import global_data app = Flask(__name__) app.register_blueprint(scans, url_pre...
u-Bocu/Trashinator3000
trashinator-flask-api/app.py
app.py
py
770
python
en
code
0
github-code
18
[ { "api_name": "flask.Flask", "line_number": 10, "usage_type": "call" }, { "api_name": "routes.scans.scans", "line_number": 11, "usage_type": "argument" }, { "api_name": "routes.auth.auth", "line_number": 12, "usage_type": "argument" }, { "api_name": "routes.global...
5312691262
# -*- coding: utf-8 -*- """ Created on Wed May 31 20:42:20 2017 @author: byung """ import urllib.request from urllib.parse import quote_plus from bs4 import BeautifulSoup import pandas as pd import re import numpy as np import time from selenium import webdriver import requests import json def searchNaverNews(search...
byungjun0689/DataScience
4. KMU/Third Semester/03. Text Mining (2017)/Project(Marketing Support Tools)/Naver.py
Naver.py
py
10,090
python
en
code
7
github-code
18
[ { "api_name": "pandas.to_datetime", "line_number": 20, "usage_type": "call" }, { "api_name": "urllib.parse.quote_plus", "line_number": 29, "usage_type": "call" }, { "api_name": "re.compile", "line_number": 30, "usage_type": "call" }, { "api_name": "urllib.request....
10758746810
from functions import load_settings_params as lsp import pickle from os import path as op from matplotlib import pyplot as plt import numpy as np print('Load settings and parameters') settings = lsp.settings() params = lsp.params() vector_types = ['hidden', 'cell', 'word_vectors', 'bow_vectors'] vector_types = ['hidd...
FAIRNS/sentence-processing-MEG-LSTM
Code/MEG/PCA_analyze_weight.py
PCA_analyze_weight.py
py
2,135
python
en
code
0
github-code
18
[ { "api_name": "functions.load_settings_params.settings", "line_number": 8, "usage_type": "call" }, { "api_name": "functions.load_settings_params", "line_number": 8, "usage_type": "name" }, { "api_name": "functions.load_settings_params.params", "line_number": 9, "usage_typ...
27920637457
import json import uuid import types from twisted.internet import defer, task, reactor from kademlia.network import Server from kademlia.protocol import KademliaProtocol from kademlia.crawling import NodeSpiderCrawl, ValueSpiderCrawl, RPCFindResponse from kademlia.utils import digest from kademlia.storage import Forge...
EricssonResearch/calvin-base
calvin/runtime/south/storage/twistedimpl/dht/append_server.py
append_server.py
py
20,827
python
en
code
282
github-code
18
[ { "api_name": "calvin.utilities.calvinlogger.get_logger", "line_number": 19, "usage_type": "call" }, { "api_name": "calvin.utilities.calvinlogger", "line_number": 19, "usage_type": "name" }, { "api_name": "twisted.python.log.startLogging", "line_number": 22, "usage_type":...
6781598045
import datetime class Bugzilla: """ Default class for a Red Hat's Bugzilla listing. Attributes ------------ description: :class:`str` Description of the bug in Red Hat's Bugzilla. id: :class:`str` ID of the bug in Red Hat's Bugzilla. url: :class:`str` URL of the bug in Red Hat's Bugzilla. """ def __ini...
CapnS/RedHatCVE
redhat/cve.py
cve.py
py
8,367
python
en
code
0
github-code
18
[ { "api_name": "datetime.datetime.strptime", "line_number": 190, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 190, "usage_type": "attribute" }, { "api_name": "datetime.datetime.strptime", "line_number": 191, "usage_type": "call" }, { "a...
21135884412
import json from typing import Optional from bs4 import BeautifulSoup import requests import re import argparse class ObjectScrapper: def __init__(self) -> None: pass def __checkurl(self, asset: str): r = requests.get(f"https://statusinvest.com.br/fundos-imobiliarios/{asset}", headers={'User-Agent...
Reverendyz/assetScrapper
scrapper/main.py
main.py
py
3,123
python
en
code
0
github-code
18
[ { "api_name": "requests.get", "line_number": 14, "usage_type": "call" }, { "api_name": "re.findall", "line_number": 16, "usage_type": "call" }, { "api_name": "typing.Optional", "line_number": 22, "usage_type": "name" }, { "api_name": "requests.get", "line_numb...
1590061964
""" A module that can help to get max performance of your laptop. Of course, if user's machine is a desktop it's pretty useless. """ import os from sys import exit from modules.logger import logger class PerformanceHandler: """ A class of machine performance handler. Attributes ...
doopath/doondler
modules/performance_handler.py
performance_handler.py
py
1,379
python
en
code
2
github-code
18
[ { "api_name": "modules.logger.logger.log", "line_number": 32, "usage_type": "call" }, { "api_name": "modules.logger.logger", "line_number": 32, "usage_type": "name" }, { "api_name": "os.system", "line_number": 36, "usage_type": "call" }, { "api_name": "sys.exit", ...
26095345952
import os import numpy as np import scipy as sp import scipy.signal as signal import scipy.fftpack as fft import scipy.io as io import scipy.io.wavfile import matplotlib.pyplot as plt import rtmidi from rtmidi import midiconstants import pyaudio midiout = rtmidi.MidiOut() midiout.open_virtual_port('TICS-MIDI') # Defi...
lukeshimanuki/tics
audio2midi.py
audio2midi.py
py
1,918
python
en
code
0
github-code
18
[ { "api_name": "rtmidi.MidiOut", "line_number": 13, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_number": 19, "usage_type": "call" }, { "api_name": "numpy.abs", "line_number": 25, "usage_type": "call" }, { "api_name": "scipy.signal.hanning", "line...
37814341878
import extra_keras_metrics from keras.layers import Layer, Dense from keras.models import Model from typing import Tuple, List def head(layer: Layer)->Layer: return Dense(1, activation="sigmoid")(layer) def model(inputs: Tuple[Layer, Layer], output: Layer, metrics:List=None)->Model: model = Model( i...
LucaCappelletti94/arrp
arrp/model.py
model.py
py
555
python
en
code
0
github-code
18
[ { "api_name": "keras.layers.Layer", "line_number": 7, "usage_type": "name" }, { "api_name": "keras.layers.Dense", "line_number": 8, "usage_type": "call" }, { "api_name": "typing.Tuple", "line_number": 11, "usage_type": "name" }, { "api_name": "keras.layers.Layer",...
23694251951
from django.contrib.auth.models import User from django.db import models from django.utils.text import slugify Categories = ( ('HTML', 'HTML'), ('CSS', 'CSS'), ('JavaScript', 'JavaScript'), ('JSON', 'JSON'), ('AJAX', 'AJAX'), ('Python', 'Python'), ('Django', 'Django') ) class Book(models....
momentum-cohort-2020-01/django-freeshelf-team-dingo
core/models.py
models.py
py
1,764
python
en
code
0
github-code
18
[ { "api_name": "django.db.models.Model", "line_number": 16, "usage_type": "attribute" }, { "api_name": "django.db.models", "line_number": 16, "usage_type": "name" }, { "api_name": "django.db.models.DateTimeField", "line_number": 17, "usage_type": "call" }, { "api_n...
73100778601
import os from selenium import webdriver from selenium.webdriver.chrome.options import Options from common.config_utils import read_config from common.log_utils import log_pri current_path = os.path.dirname(__file__) driver_path = os.path.join(current_path, '..', read_config.driver_path) class Browser: def __ini...
yuchengyu1994/PO_UI_Test_Framework
common/browser.py
browser.py
py
2,021
python
en
code
0
github-code
18
[ { "api_name": "os.path.dirname", "line_number": 7, "usage_type": "call" }, { "api_name": "os.path", "line_number": 7, "usage_type": "attribute" }, { "api_name": "os.path.join", "line_number": 8, "usage_type": "call" }, { "api_name": "os.path", "line_number": 8...
72992363881
from ipinfo import trysites import rich def main(): finaldata = trysites.trysites() if not finaldata: print("None of the IP sites could return even a valid IP.", "Perhaps check your network connection?") else: rich.print(finaldata) if __name__ == "__main__": main()
ClaireSoftware/IPinfo
src/ipinfo/__main__.py
__main__.py
py
316
python
en
code
0
github-code
18
[ { "api_name": "ipinfo.trysites.trysites", "line_number": 6, "usage_type": "call" }, { "api_name": "ipinfo.trysites", "line_number": 6, "usage_type": "name" }, { "api_name": "rich.print", "line_number": 11, "usage_type": "call" } ]
2903166633
from data.dataset.utility import Indexer from data.dataset.abstract_dataset import AbstractDataset class MultilexnormDataset(AbstractDataset): def __init__(self, args, inputs, outputs): super().__init__(args, inputs, outputs) self.inputs = inputs self.outputs = outputs valid_indic...
ufal/multilexnorm2021
data/dataset/multilexnorm.py
multilexnorm.py
py
901
python
en
code
13
github-code
18
[ { "api_name": "data.dataset.abstract_dataset.AbstractDataset", "line_number": 5, "usage_type": "name" }, { "api_name": "data.dataset.utility.Indexer", "line_number": 12, "usage_type": "call" } ]
27493043054
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.shortcuts import render, get_object_or_404 from django.shortcuts import render from django.views.generic import RedirectView, TemplateView from django.conf import settings from django.core.urlresolvers import reverse from django.core.mail import send_mail from d...
secnot/tutorial-tienda-django-paypal-1
tiendalibros/pagos/views.py
views.py
py
4,876
python
es
code
1
github-code
18
[ { "api_name": "django.views.generic.RedirectView", "line_number": 19, "usage_type": "name" }, { "api_name": "django.conf.settings.SITE_URL", "line_number": 42, "usage_type": "attribute" }, { "api_name": "django.conf.settings", "line_number": 42, "usage_type": "name" }, ...
30626852776
# -*- coding: utf-8 -*- import scrapy from scrapy import Request from VideoSpider.items import TvItem class CctvNewsSpider(scrapy.Spider): name = 'CCTV_news' allowed_domains = ['news.cctv.com'] start_urls = ['http://news.cctv.com/'] def parse(self, response): common = response.css('div.top_nav...
guanshilong/Scrapy-spiders
VideoSpider/spiders/CCTV_news.py
CCTV_news.py
py
2,536
python
en
code
3
github-code
18
[ { "api_name": "scrapy.Spider", "line_number": 6, "usage_type": "attribute" }, { "api_name": "scrapy.Request", "line_number": 19, "usage_type": "call" }, { "api_name": "scrapy.Request", "line_number": 35, "usage_type": "call" }, { "api_name": "VideoSpider.items.TvI...
35526991747
from django.core.urlresolvers import reverse from drop.giftcard.models import GiftCardProduct, Credit from drop.models import Order, Product from drop.payment.api import PaymentAPI from drop.test_utils import DropTestCase, print_order from decimal import Decimal class GiftCardTestCase(DropTestCase): def test_giftc...
chriscauley/django-drop
drop/giftcard/tests.py
tests.py
py
2,902
python
en
code
1
github-code
18
[ { "api_name": "drop.test_utils.DropTestCase", "line_number": 10, "usage_type": "name" }, { "api_name": "drop.giftcard.models.GiftCardProduct.objects.create", "line_number": 12, "usage_type": "call" }, { "api_name": "drop.giftcard.models.GiftCardProduct.objects", "line_number"...
20013796639
# Usage: python patches_store.py -mm="ram" --debug=1 -pl 32 -po 0 \ # -ts 0 -tnl 10000 -bs=5000 --batch_size=128 --filters=256 \ # -m="smcnn_semantic" --phase="repeat" -sc=False --class_n=12 \ # --log_dir="../data/summaries/" --path="../cv_data/" --im_h=8492 \ # --im_w=7995 --band_n=2 --t_len=7 --id_first=8 -tof=False ...
DiMorten/wildfire_fcn
src/patch_extract/main.py
main.py
py
12,850
python
en
code
0
github-code
18
[ { "api_name": "argparse.ArgumentParser", "line_number": 30, "usage_type": "call" }, { "api_name": "numpy.set_printoptions", "line_number": 79, "usage_type": "call" }, { "api_name": "os.system", "line_number": 80, "usage_type": "call" }, { "api_name": "deb.prints",...
2432069793
#!/usr/bin/env python3 import os import sys #runPath = os.getcwd() #radni direktorij runPath = os.path.dirname(os.path.realpath(__file__)) sys.path.append(os.path.join(runPath, "..")) #dodaj parent dir u PATH varijablu from lib.Config import Configuration from lib.Toolkit import pad import lib.DatabaseLayer as db ...
CERT-hr/modified_cve-search
sbin/ncert_redis.py
ncert_redis.py
py
2,728
python
en
code
0
github-code
18
[ { "api_name": "os.path.dirname", "line_number": 7, "usage_type": "call" }, { "api_name": "os.path", "line_number": 7, "usage_type": "attribute" }, { "api_name": "os.path.realpath", "line_number": 7, "usage_type": "call" }, { "api_name": "sys.path.append", "lin...
34897050162
import sys from setuptools import setup dependencies = [ 'netaddr', 'netifaces', ] if sys.version_info[:2] < (2, 7): dependencies.append('argparse') setup( name='cidrchk', version='1.0.0', author='Joseph Hunkeler', author_email='jhunkeler@gmail.com', description=('A simple "Is my comp...
jhunkeler/cidrchk
setup.py
setup.py
py
695
python
en
code
0
github-code
18
[ { "api_name": "sys.version_info", "line_number": 9, "usage_type": "attribute" }, { "api_name": "setuptools.setup", "line_number": 12, "usage_type": "call" } ]
5179156972
#### __author__ = 'AM7' ## dataset https://www.kaggle.com/c/challenges-in-representation-learning-facial-expression-recognition-challenge #### import os import cv2 import numpy as np from random import shuffle from tqdm import tqdm import random from sklearn import prepro...
7AM7/Deep-Learning
Tensorflow/Facial Expression Recognition/train_model.py
train_model.py
py
2,638
python
en
code
16
github-code
18
[ { "api_name": "imutils.paths.list_images", "line_number": 37, "usage_type": "call" }, { "api_name": "imutils.paths", "line_number": 37, "usage_type": "name" }, { "api_name": "random.seed", "line_number": 38, "usage_type": "call" }, { "api_name": "random.shuffle", ...
6408672582
import os from pathlib import Path import sys sys.setrecursionlimit(3000) # Default Directory Paths home_dir = str(Path.home()) PROJECT_DIR = os.path.join(home_dir, ".project03") CACHE_PATH = os.path.join(PROJECT_DIR, "cache") LOG_DIR = os.path.join(PROJECT_DIR, "logs") os.makedirs(CACHE_PATH, exist_ok=True) os.ma...
Mirindi95/PrIDcon
pridcon/startup.py
startup.py
py
351
python
en
code
0
github-code
18
[ { "api_name": "sys.setrecursionlimit", "line_number": 5, "usage_type": "call" }, { "api_name": "pathlib.Path.home", "line_number": 8, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_number": 8, "usage_type": "name" }, { "api_name": "os.path.join", ...
21761992838
import time import find_remove_find5 import sort_then_find3 import walk_through7 from typing import Callable, List, Any def time_find_two_smallest(find_func: Callable[[List[float]], Any], lst: List[float]) -> float: """find_func(lst)를 실행하는 데 몇 초가 걸렸는지 반환한다. """ t1 = time.perf_c...
gilbutITbook/007016
chap12/time_find_remove_find.py
time_find_remove_find.py
py
1,357
python
en
code
6
github-code
18
[ { "api_name": "typing.Callable", "line_number": 8, "usage_type": "name" }, { "api_name": "typing.List", "line_number": 8, "usage_type": "name" }, { "api_name": "typing.Any", "line_number": 8, "usage_type": "name" }, { "api_name": "typing.List", "line_number": ...
35449751089
from collections import Counter import time class TimingCtx: def __init__(self, init=None, init_ns=None, first_tic=None): self.timings = init if init is not None else Counter() self.ns = init_ns if init_ns is not None else Counter() self.arg = None self.last_clear = time.time() ...
facebookresearch/diplomacy_searchbot
fairdiplomacy/utils/timing_ctx.py
timing_ctx.py
py
3,747
python
en
code
39
github-code
18
[ { "api_name": "collections.Counter", "line_number": 7, "usage_type": "call" }, { "api_name": "collections.Counter", "line_number": 8, "usage_type": "call" }, { "api_name": "time.time", "line_number": 10, "usage_type": "call" }, { "api_name": "time.time", "line...
15934016212
import datetime from django.contrib import messages from django.shortcuts import render, redirect from django.views.decorators.http import require_GET from MyApp.models.models import Category # Create your views here. pathFolder="pages/categorys/" def index(request): if 'search' in request.GET: search = ...
MengDeva/MyProject_Pluto
MyApp/controllers/category_views.py
category_views.py
py
1,981
python
en
code
0
github-code
18
[ { "api_name": "MyApp.models.models.Category.objects.filter", "line_number": 14, "usage_type": "call" }, { "api_name": "MyApp.models.models.Category.objects", "line_number": 14, "usage_type": "attribute" }, { "api_name": "MyApp.models.models.Category", "line_number": 14, "...
41213651748
# -*- coding: utf-8 -*- # Resource object code # # Created by: The Resource Compiler for PyQt5 (Qt v5.15.2) # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore qt_resource_data = b"\ \x00\x00\xb3\xe5\ \xff\ \xd8\xff\xe0\x00\x10\x4a\x46\x49\x46\x00\x01\x01\x01\x00\x6a\x00\ \x6a\x00\x00\x...
OsamaM0/System_Administration
MainApplication/res_rc.py
res_rc.py
py
1,566,235
python
ja
code
0
github-code
18
[ { "api_name": "PyQt5.QtCore.qVersion", "line_number": 26071, "usage_type": "call" }, { "api_name": "PyQt5.QtCore", "line_number": 26071, "usage_type": "name" }, { "api_name": "PyQt5.QtCore.qRegisterResourceData", "line_number": 26080, "usage_type": "call" }, { "ap...
73413266920
import open3d from open3d import pipelines import numpy as np import os import argparse import yaml import sys parser = argparse.ArgumentParser(description='Run 3D reconstruction on a sequence of RGB-D images.') parser.add_argument('-c', '--camera', type=str, required=True, help='path to the camera intrinsics yaml fil...
paulie17/Photoneo-RGBD-Data-Collection
Development/Collect-Photoneo-RGBD/tsdf_fusion.py
tsdf_fusion.py
py
4,088
python
en
code
0
github-code
18
[ { "api_name": "argparse.ArgumentParser", "line_number": 9, "usage_type": "call" }, { "api_name": "os.path.exists", "line_number": 21, "usage_type": "call" }, { "api_name": "os.path", "line_number": 21, "usage_type": "attribute" }, { "api_name": "sys.exit", "li...
19239646925
import datetime import random import string from daddypunmaster3000.models import GameSession def create_session(): while True: random_id = ''.join( random.choice(string.ascii_lowercase + string.digits) for _ in range(4) ) try: GameSession.objects.get(...
bjarniegill/DaddyPunMaster3000
daddypunmaster3000/utils.py
utils.py
py
844
python
en
code
0
github-code
18
[ { "api_name": "random.choice", "line_number": 12, "usage_type": "call" }, { "api_name": "string.ascii_lowercase", "line_number": 12, "usage_type": "attribute" }, { "api_name": "string.digits", "line_number": 12, "usage_type": "attribute" }, { "api_name": "daddypun...
30050154435
from django.shortcuts import render,HttpResponse from django.views.generic.list import ListView import sys sys.path.append("..") from ZpModel.models import Zp,CV,CV2Zp,Com from django.db.models import Q import re from functools import reduce import operator from django.contrib.auth.models import User def page_not_foun...
mainfxyz/Recruitment-website
zpWeb/view.py
view.py
py
7,468
python
en
code
1
github-code
18
[ { "api_name": "sys.path.append", "line_number": 4, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 4, "usage_type": "attribute" }, { "api_name": "django.shortcuts.render", "line_number": 13, "usage_type": "call" }, { "api_name": "django.contrib.au...
3275121078
# Selenium Web Scraping from selenium.webdriver.common.by import By from selenium.webdriver.common.keys import Keys import time import logging def load_more_items(driver): status = True while status: driver.find_element(By.XPATH, '//body').send_keys(Keys.END) time.sleep(4) try: ...
Joanna-Khek/food-explorer
src/pipeline_utils/extract.py
extract.py
py
6,148
python
en
code
0
github-code
18
[ { "api_name": "selenium.webdriver.common.by.By.XPATH", "line_number": 11, "usage_type": "attribute" }, { "api_name": "selenium.webdriver.common.by.By", "line_number": 11, "usage_type": "name" }, { "api_name": "selenium.webdriver.common.keys.Keys.END", "line_number": 11, "...
34238333889
import folium from app.tools import convert_adress_to_coordinates def create_bars_map(current_location, bars_geo, path='app/templates/_map.html'): current_coordinates = convert_adress_to_coordinates(current_location) map = folium.Map( location=current_coordinates, zoom_start=12, ) fol...
Ollub/FindFiveBars
app/map.py
map.py
py
651
python
en
code
0
github-code
18
[ { "api_name": "app.tools.convert_adress_to_coordinates", "line_number": 6, "usage_type": "call" }, { "api_name": "folium.Map", "line_number": 8, "usage_type": "call" }, { "api_name": "folium.Marker", "line_number": 12, "usage_type": "call" }, { "api_name": "folium...
39829396500
import nsetools from pprint import pprint from dotenv import load_dotenv import os import requests from twilio.rest import Client load_dotenv("./.env") API_KEY = os.environ.get("NEWS_API_KEY") ACCOUNT_SID = "AC6f06d4b0637f1dc296d7bd49c759ae6e" AUTH_TOKEN = os.environ.get("TWILIO_AUTH_KEY") FROM=os.environ.get("FROM")...
RipperAce/stock_news
main.py
main.py
py
2,621
python
en
code
0
github-code
18
[ { "api_name": "dotenv.load_dotenv", "line_number": 8, "usage_type": "call" }, { "api_name": "os.environ.get", "line_number": 10, "usage_type": "call" }, { "api_name": "os.environ", "line_number": 10, "usage_type": "attribute" }, { "api_name": "os.environ.get", ...
39448640523
from ytmusicapi import YTMusic import csv import time ytmusic = YTMusic('./src/headers_auth.json') playlists = ytmusic.get_library_playlists() lib_playlists = {} playlist_ids = [] for i in playlists: playlist_ids.append(i['playlistId']) lib_playlists[i['title']] = i # print(playlist_ids) playlist = ytmusic.g...
ShivangDave/YoutubeMusicAPIWrapper
script.py
script.py
py
1,642
python
en
code
1
github-code
18
[ { "api_name": "ytmusicapi.YTMusic", "line_number": 5, "usage_type": "call" }, { "api_name": "csv.reader", "line_number": 25, "usage_type": "call" } ]
70921950441
import socket import selectors import argparse def recv_data(conn): data = conn.recv(1024) if data: print(data.decode()) else: e_poll.unregister(conn) conn.close() def acc_conn(p_server): conn, addr = p_server.accept() print("[*] Acception connection from %s:%d" % (addr[0...
chonlon/Small-Test-Projects
python/network/TCP/EchoServer.py
EchoServer.py
py
1,179
python
en
code
3
github-code
18
[ { "api_name": "selectors.EVENT_READ", "line_number": 18, "usage_type": "attribute" }, { "api_name": "argparse.ArgumentParser", "line_number": 22, "usage_type": "call" }, { "api_name": "socket.socket", "line_number": 26, "usage_type": "call" }, { "api_name": "selec...
40950378685
import math import torch import torch.nn as nn import torch.nn.functional as F class SingleDirectGNN(nn.Module): def __init__(self, hidden_size, pos_emb, step=1): super(SingleDirectGNN, self).__init__() self.pos_emb = pos_emb self.step = step self.hidden_size = hidden_size ...
xuguangning1218/IntGNN_ICASSP2023
pytorch_code/models/singleDirectGNN.py
singleDirectGNN.py
py
3,053
python
en
code
4
github-code
18
[ { "api_name": "torch.nn.Module", "line_number": 8, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 8, "usage_type": "name" }, { "api_name": "torch.nn.Parameter", "line_number": 15, "usage_type": "call" }, { "api_name": "torch.nn", "line_n...