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
21988639916
# update.py import requests import json import tarfile url = "https://ddragon.leagueoflegends.com/api/versions.json" response = requests.get(url) obj = response.json() patch = str(obj[0]) zipUrl = "https://ddragon.leagueoflegends.com/cdn/dragontail-" + patch + ".tgz" print(zipUrl) data = requests.get(zipUrl) with...
ryanweston/lol-skills
src/assets/update.py
update.py
py
659
python
en
code
0
github-code
6
[ { "api_name": "requests.get", "line_number": 8, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 16, "usage_type": "call" }, { "api_name": "tarfile.open", "line_number": 22, "usage_type": "call" } ]
32094781612
import sys sys.stdin = open("input.txt", "r") from collections import Counter A = int(input()) B = int(input()) C = int(input()) X = str(A*B*C) for n in range(0,10): N = str(n) if N in Counter(X): print(Counter(X).get(N)) else: print(0)
doll2gom/TIL
KDT/week4/01.19/2577.py
2577.py
py
267
python
en
code
2
github-code
6
[ { "api_name": "sys.stdin", "line_number": 2, "usage_type": "attribute" }, { "api_name": "collections.Counter", "line_number": 13, "usage_type": "call" }, { "api_name": "collections.Counter", "line_number": 14, "usage_type": "call" } ]
19827881272
from flask import Flask, request import json import socket import urllib.request as urllib2 import re from functools import wraps application = Flask(__name__) CONFIG = json.load(open("config.json", "r")) API_KEYS = CONFIG["api_keys"] def requires_auth_key(func): @wraps(func) def wrapplicationed(*args, **kw...
s0lesurviv0r/graphite_http_relay
main.py
main.py
py
2,262
python
en
code
0
github-code
6
[ { "api_name": "flask.Flask", "line_number": 8, "usage_type": "call" }, { "api_name": "json.load", "line_number": 10, "usage_type": "call" }, { "api_name": "flask.request.form.get", "line_number": 17, "usage_type": "call" }, { "api_name": "flask.request.form", ...
27132126928
import logging import redis from rq import Connection, Queue from agent.agents import get_agent_info from plugins.patching.os_apps.incoming_updates import \ incoming_packages_from_agent from plugins.patching.custom_apps.custom_apps import \ add_custom_app_to_agents from plugins.patching.supported_apps.syncer...
SteelHouseLabs/vFense
tp/src/receiver/rvhandler.py
rvhandler.py
py
2,924
python
en
code
5
github-code
6
[ { "api_name": "redis.StrictRedis", "line_number": 18, "usage_type": "call" }, { "api_name": "logging.config.fileConfig", "line_number": 19, "usage_type": "call" }, { "api_name": "logging.config", "line_number": 19, "usage_type": "attribute" }, { "api_name": "loggi...
23327135383
import logging from telegram.ext import Updater, CommandHandler, MessageHandler, Filters import settings logging.basicConfig(filename='bot.log', level=logging.INFO) # Настройки прокси. Используем ради интереса PROXY = {'proxy_url': settings.PROXY_URL, 'urllib3_proxy_kwargs': {'username': settings.PROXY_USERNAME,...
SanuNak/mybot
bot.py
bot.py
py
1,646
python
ru
code
0
github-code
6
[ { "api_name": "logging.basicConfig", "line_number": 6, "usage_type": "call" }, { "api_name": "logging.INFO", "line_number": 6, "usage_type": "attribute" }, { "api_name": "settings.PROXY_URL", "line_number": 9, "usage_type": "attribute" }, { "api_name": "settings.P...
14993235685
# 引用url模块 from django.conf.urls import url #导入视图函数 from .views import * app_name="booktest" urlpatterns=[ # url('myurl/',myview) # url(r'^index/$',index), # url(r'^$',index,name="index"), # url(r'^$',indexView.as_view(),name="index"), # url(r'^$',indexTemplateView.as_view(),name="index"), ...
pan0527/chenpan
demo1/booktest/urls.py
urls.py
py
712
python
en
code
0
github-code
6
[ { "api_name": "django.conf.urls.url", "line_number": 14, "usage_type": "call" }, { "api_name": "django.conf.urls.url", "line_number": 21, "usage_type": "call" }, { "api_name": "django.conf.urls.url", "line_number": 22, "usage_type": "call" }, { "api_name": "django...
41933031591
import pyautogui import time pyautogui.moveTo(3530, 983) # Lokasi kursor kearah chat pyautogui.click() # Spam chat 100 pesan. for i in range(100): pyautogui.write("PING!!!") # Message pesan spam time.sleep(0.01) # Waktu jeda spam pyautogui.press("Enter")
arvandha121/SPAM_CHAT_WHATSAPP
spam.py
spam.py
py
268
python
en
code
0
github-code
6
[ { "api_name": "pyautogui.moveTo", "line_number": 4, "usage_type": "call" }, { "api_name": "pyautogui.click", "line_number": 5, "usage_type": "call" }, { "api_name": "pyautogui.write", "line_number": 9, "usage_type": "call" }, { "api_name": "time.sleep", "line_...
74795559226
from django.db import models from Pages.models import Page import urllib from .special_character_table import TABLE def get_report_url(post_hashtag): return "http://c8763.webutu.com?hashtag="+str(post_hashtag) # Create your models here. class Record(models.Model): submit_type=models.IntegerField(default=0) ...
austin880625/KSKGcomplain
Submissions/models.py
models.py
py
2,572
python
en
code
1
github-code
6
[ { "api_name": "django.db.models.Model", "line_number": 10, "usage_type": "attribute" }, { "api_name": "django.db.models", "line_number": 10, "usage_type": "name" }, { "api_name": "django.db.models.IntegerField", "line_number": 11, "usage_type": "call" }, { "api_na...
17688731362
import json import os import gui import wx import addonHandler import braille import config import controlTypes import languageHandler from .common import configDir addonHandler.initTranslation() CUR_LANG = languageHandler.getLanguage().split('_')[0] PATH_JSON = os.path.join(configDir, f"roleLabels-{CUR_LANG}.json"...
aaclause/BrailleExtender
addon/globalPlugins/brailleExtender/rolelabels.py
rolelabels.py
py
8,877
python
en
code
15
github-code
6
[ { "api_name": "addonHandler.initTranslation", "line_number": 14, "usage_type": "call" }, { "api_name": "languageHandler.getLanguage", "line_number": 16, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 17, "usage_type": "call" }, { "api_name": ...
26213379014
import time import numpy as np from scipy.sparse import csr_matrix from scipy.special import expit from tqdm import tqdm from hw1.base import FactorizationModel from hw1.utils import log_iter class BPRModel(FactorizationModel): def __init__(self, factors: int, lr: float, iterations: int, lambd: float = 0., ...
Sushentsev/recommendation-systems
hw1/models/bpr_model.py
bpr_model.py
py
2,367
python
en
code
0
github-code
6
[ { "api_name": "hw1.base.FactorizationModel", "line_number": 12, "usage_type": "name" }, { "api_name": "scipy.sparse.csr_matrix", "line_number": 22, "usage_type": "name" }, { "api_name": "numpy.random.choice", "line_number": 23, "usage_type": "call" }, { "api_name"...
70766850107
from fastapi import APIRouter, Depends from app.model.param import ( ListTaskParams, NewTasksListParams, StopTaskParams, ) from app.model.response import ( NewTasksResp, ListTasksResp, StopTasksResp, ) from exception import DataExistsError, APIBaseError from app.model.data import TaskModel, St...
ZSAIm/VideoCrawlerEngine
app/taskflow/routers/task.py
task.py
py
1,962
python
en
code
420
github-code
6
[ { "api_name": "fastapi.APIRouter", "line_number": 19, "usage_type": "call" }, { "api_name": "app.model.param.ListTaskParams", "line_number": 27, "usage_type": "name" }, { "api_name": "fastapi.Depends", "line_number": 27, "usage_type": "call" }, { "api_name": "help...
3516700430
#********************* BGINFO_MULTI *************************** # Desenvolvido por Frederico de Jesus Almeida # Analista de Suporte PLENO - Multi #******************* 06/06/2023 **************************** import os import re import psutil import socket import subprocess import tkinter as tk ...
Frederico02/info-sistema
main_final.py
main_final.py
py
4,077
python
pt
code
1
github-code
6
[ { "api_name": "socket.gethostbyname", "line_number": 17, "usage_type": "call" }, { "api_name": "socket.gethostname", "line_number": 17, "usage_type": "call" }, { "api_name": "psutil.net_if_addrs", "line_number": 24, "usage_type": "call" }, { "api_name": "psutil.AF...
33188473740
# -*-coding:utf-8-*- import logging from datetime import datetime class MyLogger(): def __init__(self, name): self.logger = logging.getLogger(name) self.handler = logging.FileHandler(filename='logging/%s.log' % name) self.logger.addHandler(self.handler) def warning(self, info): ...
xxxx-hhhh/spider
baojianhui_spider/my_logging.py
my_logging.py
py
546
python
en
code
0
github-code
6
[ { "api_name": "logging.getLogger", "line_number": 8, "usage_type": "call" }, { "api_name": "logging.FileHandler", "line_number": 9, "usage_type": "call" }, { "api_name": "datetime.datetime.now", "line_number": 13, "usage_type": "call" }, { "api_name": "datetime.da...
23896439023
# repeat_bot.py from bot.common import verify_user, job_name from dotenv import load_dotenv from bot.messages import account_summary from telegram import Update from telegram.ext import Application, CommandHandler, ContextTypes from data_model import BotConfig from utils import load_config load_dotenv() class Pos...
KD6-Dash-37/telegram-chat-bot
bot/repeat_bot.py
repeat_bot.py
py
4,481
python
en
code
0
github-code
6
[ { "api_name": "dotenv.load_dotenv", "line_number": 13, "usage_type": "call" }, { "api_name": "data_model.BotConfig", "line_number": 18, "usage_type": "name" }, { "api_name": "telegram.Update", "line_number": 22, "usage_type": "name" }, { "api_name": "telegram.ext....
8660192902
import nltk nltk.download('stopwords') nltk.download('punkt') from nltk.corpus import stopwords from nltk.tokenize import word_tokenize, sent_tokenize #global set of stopwords english_stopwords = set(stopwords.words('english')) def tokenizeText(content): global english_stopwords #returns a list of tokens fou...
daveA420/ics121Crawler
newParser.py
newParser.py
py
857
python
en
code
0
github-code
6
[ { "api_name": "nltk.download", "line_number": 2, "usage_type": "call" }, { "api_name": "nltk.download", "line_number": 3, "usage_type": "call" }, { "api_name": "nltk.corpus.stopwords.words", "line_number": 9, "usage_type": "call" }, { "api_name": "nltk.corpus.stop...
3439809361
# Definition for a binary tree node. # class TreeNode(object): # def __init__(self, x): # self.val = x # self.left = None # self.right = None from collections import deque class Solution(object): def widthOfBinaryTree(self, root): """ :type root: TreeNode :rtype:...
cuiy0006/Algorithms
leetcode/662. Maximum Width of Binary Tree.py
662. Maximum Width of Binary Tree.py
py
957
python
en
code
0
github-code
6
[ { "api_name": "collections.deque", "line_number": 18, "usage_type": "call" } ]
71611302909
import json import open3d as o3d import numpy as np import os import trimesh import zipfile from tqdm import tqdm import matplotlib.pyplot as plt plt.style.use('bmh') default_color = [0,0.5,1] cube = np.array([ [0,0,0], [1,0,0], [1,1,0], [0,1,0], [0,0,1], [1,0,1], [1,1,1], [0,1,1], ]) '''plt fi...
GengxinLiu/SWMP
Extern/tools/mobility_tool.py
mobility_tool.py
py
14,370
python
en
code
4
github-code
6
[ { "api_name": "matplotlib.pyplot.style.use", "line_number": 9, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.style", "line_number": 9, "usage_type": "attribute" }, { "api_name": "matplotlib.pyplot", "line_number": 9, "usage_type": "name" }, { "api_name"...
70315957309
""" bony_downloader.py module contains BonyDownloader class to provide provider specific functionality """ __author__ = 'Dattatraya Tembare<tembare.datta@gmail.com>' import datetime import itertools import lxml.html import requests from common.download_exceptions import DownloadException from download.file_...
dattatembare/file_downloader
src/download/bony_downloader.py
bony_downloader.py
py
10,730
python
en
code
0
github-code
6
[ { "api_name": "download.file_downloader.FileDownloader", "line_number": 18, "usage_type": "name" }, { "api_name": "requests.Session", "line_number": 33, "usage_type": "call" }, { "api_name": "common.download_exceptions.DownloadException", "line_number": 41, "usage_type": ...
40787879761
from time import sleep import time import datetime from datetime import timedelta from time import sleep, strftime motionTimeOutSeconds = 5 lastMotionTime = datetime.datetime.now() def motionTimedOut(): myNow = datetime.datetime.now() deltaTime = (myNow - lastMotionTime).total_seconds() if deltaTime > mot...
mrncmoose/smart_controller
pi-code/thermalPreTest.py
thermalPreTest.py
py
816
python
en
code
3
github-code
6
[ { "api_name": "datetime.datetime.now", "line_number": 8, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 8, "usage_type": "attribute" }, { "api_name": "datetime.datetime.now", "line_number": 11, "usage_type": "call" }, { "api_name": "date...
810789082
from __future__ import division import numpy as np from scipy import sparse from sklearn.metrics.pairwise import euclidean_distances import time # Produce grid points for a 2d grayscale image def get_points_2d(image, res): rows, columns = image.shape grid_x, grid_y = np.mgrid[0:columns:res, 0:rows:res] gri...
polaschwoebel/NonLinearDataAugmentation
vector_fields.py
vector_fields.py
py
3,499
python
en
code
2
github-code
6
[ { "api_name": "numpy.mgrid", "line_number": 10, "usage_type": "attribute" }, { "api_name": "numpy.array", "line_number": 11, "usage_type": "call" }, { "api_name": "numpy.mgrid", "line_number": 17, "usage_type": "attribute" }, { "api_name": "numpy.array", "line...
38075843165
import gc from collections import defaultdict import cupy as cp import pandas as pd import torch import torch.nn.functional as F from cuml.metrics import pairwise_distances from cuml.neighbors import NearestNeighbors from torch.utils.data import DataLoader, Dataset, default_collate from tqdm import tqdm from transform...
thanhhau097/lecr
dataset.py
dataset.py
py
35,343
python
en
code
0
github-code
6
[ { "api_name": "transformers.AutoTokenizer.from_pretrained", "line_number": 96, "usage_type": "call" }, { "api_name": "transformers.AutoTokenizer", "line_number": 96, "usage_type": "name" }, { "api_name": "torch.utils.data.Dataset", "line_number": 112, "usage_type": "name"...
15653063144
from aiogram import Bot, types, Dispatcher, executor import logging from config import TOKEN, html import parser as ps import time import random import os import qrcode def make_qr(text): qr = qrcode.QRCode() qr.add_data(text) img_qr = qr.make_image(fill_color='white', back_color="black") img_qr.save('...
sarenis/tg_parsing_bot
bot.py
bot.py
py
1,329
python
en
code
0
github-code
6
[ { "api_name": "qrcode.QRCode", "line_number": 11, "usage_type": "call" }, { "api_name": "aiogram.Bot", "line_number": 17, "usage_type": "call" }, { "api_name": "config.TOKEN", "line_number": 17, "usage_type": "name" }, { "api_name": "aiogram.Dispatcher", "line...
17534446407
from functools import reduce from typing import List from project.caretaker import Caretaker from project.cheetah import Cheetah from project.keeper import Keeper from project.lion import Lion from project.tiger import Tiger from project.vet import Vet from project.animal import Animal from project.worker import Wor...
emilynaydenova/SoftUni-Python-Web-Development
Python-OOP-Oct2023/Exercises/04.Encapsulation/wild_cat_zoo/project/zoo.py
zoo.py
py
4,687
python
en
code
0
github-code
6
[ { "api_name": "typing.List", "line_number": 30, "usage_type": "name" }, { "api_name": "project.animal.Animal", "line_number": 30, "usage_type": "name" }, { "api_name": "typing.List", "line_number": 31, "usage_type": "name" }, { "api_name": "project.worker.Worker",...
29214466760
from celery import shared_task, Celery from django.utils import timezone from .models import Post app = Celery() @shared_task def publish_posts_task(): posts = Post.objects.filter( status=False, published_date__lte=timezone.now() ) for post in posts: post.status = True post.save...
smz6990/DRF-Blog
core/blog/tasks.py
tasks.py
py
665
python
en
code
2
github-code
6
[ { "api_name": "celery.Celery", "line_number": 7, "usage_type": "call" }, { "api_name": "models.Post.objects.filter", "line_number": 12, "usage_type": "call" }, { "api_name": "models.Post.objects", "line_number": 12, "usage_type": "attribute" }, { "api_name": "mode...
21138667122
#!/usr/bin/python3 # -*-coding:utf-8 -*- # Reference:********************************************** # @Time    : 2019/11/1 23:30 # @Author  : Raymond Luo # @File    : train_emb.py # @User    : luoli # @Software: PyCharm # Reference:********************************************** import pickle from gensim.models impo...
RManLuo/MotifGNN
src_sjjy/train_emb.py
train_emb.py
py
2,114
python
en
code
7
github-code
6
[ { "api_name": "pandas.read_csv", "line_number": 18, "usage_type": "call" }, { "api_name": "gensim.models.Word2Vec", "line_number": 26, "usage_type": "call" }, { "api_name": "pickle.load", "line_number": 33, "usage_type": "call" }, { "api_name": "gensim.models.Keye...
18480731961
#!/usr/bin/env python # coding=utf-8 import datetime import hashlib import json class LastUpdated(): def __init__(self, file='last-updated.json'): self.file = file def read(self): with open(self.file, 'r') as f: data = json.load(f) return { 'amiibo_sha1': dat...
N3evin/AmiiboAPI
last_updated.py
last_updated.py
py
2,178
python
en
code
459
github-code
6
[ { "api_name": "json.load", "line_number": 15, "usage_type": "call" }, { "api_name": "datetime.datetime.strptime", "line_number": 20, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 20, "usage_type": "attribute" }, { "api_name": "json.dump...
4524699811
import pytest import requests from budget.enums import ExpensesCategoryEnum, IncomeCategoryEnum from common.tests_fixtures.fixtures import admin_credentials, admin_id, base_url budgets_url = f"{base_url}/budgets/" incomes_url = f"{base_url}/incomes/" expenses_url = f"{base_url}/expenses/" @pytest.fixture def create...
MaciejChalusiak/FamilyBudget
budget/tests.py
tests.py
py
3,755
python
en
code
0
github-code
6
[ { "api_name": "common.tests_fixtures.fixtures.base_url", "line_number": 7, "usage_type": "name" }, { "api_name": "common.tests_fixtures.fixtures.base_url", "line_number": 8, "usage_type": "name" }, { "api_name": "common.tests_fixtures.fixtures.base_url", "line_number": 9, ...
30170732214
import numpy as np import pandas as pd import matplotlib.pyplot as plt from PyPDF2 import PdfWriter, PdfReader import io from reportlab.pdfbase import pdfmetrics from reportlab.pdfbase.ttfonts import TTFont from reportlab.pdfgen.canvas import Canvas from reportlab.lib import pagesizes # ======== Plotting Util ======...
vexplained/JugendForscht2022
programming/python-analysis/plotting_util.py
plotting_util.py
py
4,641
python
en
code
0
github-code
6
[ { "api_name": "numpy.linspace", "line_number": 22, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.figure", "line_number": 24, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 24, "usage_type": "name" }, { "api_name": "matplotlib....
6966794859
#!/usr/bin/env python # -*- coding: utf-8 -*- import os from kazoo.client import KazooClient __name__ = "weichigong" __version__ = '1.0.3' __author__ = 'dashixiong' __author_email__ = 'dashixiong.lee@gmail.com' class zconfig: def __init__(self, zkHosts, app, env): self.app = app self.env = env ...
perfeelab/weichigong
weichigong/__init__.py
__init__.py
py
764
python
en
code
0
github-code
6
[ { "api_name": "kazoo.client.KazooClient", "line_number": 18, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 22, "usage_type": "call" }, { "api_name": "os.path", "line_number": 22, "usage_type": "attribute" } ]
31209257710
import uuid from random import randint from src.infratructure.json_parser import JsonParser from src.infratructure.serializable_object import SerializableObject class PersonModel(SerializableObject): def __init__(self, id: int, nick: str, photo: str, name: str = None): self.id = id self.nick = ni...
GDGPetropolis/backend-event-checkin
src/application/models/person_model.py
person_model.py
py
978
python
en
code
0
github-code
6
[ { "api_name": "src.infratructure.serializable_object.SerializableObject", "line_number": 7, "usage_type": "name" }, { "api_name": "random.randint", "line_number": 17, "usage_type": "call" }, { "api_name": "uuid.uuid4", "line_number": 18, "usage_type": "call" }, { ...
31569881800
import matplotlib.pyplot as plt import numpy as np import pandas as pd import seaborn as sns from corai_util.tools.src.function_file import is_empty_file from data_input.json.parameter_loader import fetch_param_json_loader_simulation, fetch_param_json_loader_itideep from root_dir import linker_path_to_result_fi...
Code-Cornelius/ITiDeEP
mse/estimation_MSE_plot.py
estimation_MSE_plot.py
py
6,145
python
en
code
0
github-code
6
[ { "api_name": "seaborn.set", "line_number": 11, "usage_type": "call" }, { "api_name": "data_input.json.parameter_loader.fetch_param_json_loader_simulation", "line_number": 16, "usage_type": "call" }, { "api_name": "data_input.json.parameter_loader.fetch_param_json_loader_itideep"...
6942571337
from otree.api import * from settings import SESSION_CONFIGS doc = """ Your app description """ class Constants(BaseConstants): name_in_url = 'Intro' players_per_group = None num_rounds = 1 max_payoff = "£2.20" money = "£3.00" total_balls = "five" no_task_balls = "three" # create a ...
LiamOFoghlu/Receiver
Intro/__init__.py
__init__.py
py
5,072
python
en
code
0
github-code
6
[ { "api_name": "random.shuffle", "line_number": 29, "usage_type": "call" }, { "api_name": "itertools.cycle", "line_number": 47, "usage_type": "call" }, { "api_name": "{'random': 'random'}.treatment_assignment", "line_number": 47, "usage_type": "attribute" }, { "api...
2441674100
from flask import Flask, render_template, request from pymysql import connections import os import boto3 from config import * from datetime import date from botocore.exceptions import ClientError app = Flask(__name__) bucket = custombucket region = customregion db_conn = connections.Connection( host=customhost, ...
Darkless123/aws-live
EmpApp.py
EmpApp.py
py
10,617
python
en
code
0
github-code
6
[ { "api_name": "flask.Flask", "line_number": 9, "usage_type": "call" }, { "api_name": "pymysql.connections.Connection", "line_number": 14, "usage_type": "call" }, { "api_name": "pymysql.connections", "line_number": 14, "usage_type": "name" }, { "api_name": "flask.r...
31969871422
from django.contrib.auth import get_user_model from django.db import transaction from django.db.models import Q from rest_framework import serializers from rest_framework.exceptions import ValidationError, NotFound from rest_framework.generics import get_object_or_404 from versatileimagefield.serializers import Vers...
seefat/harvest_hub_apis
core/rest/serializers/me.py
me.py
py
928
python
en
code
0
github-code
6
[ { "api_name": "django.contrib.auth.get_user_model", "line_number": 12, "usage_type": "call" }, { "api_name": "rest_framework.serializers.ModelSerializer", "line_number": 14, "usage_type": "attribute" }, { "api_name": "rest_framework.serializers", "line_number": 14, "usage...
73535540349
from django.urls import path from . import views app_name = 'party' urlpatterns = [ #party # Party URLs path('create/<int:tournament_pk>/', views.PartyCreateView.as_view(), name='party_create'), path('update/<int:pk>/', views.PartyUpdateView.as_view(), name='party_update'), path('details/<int:...
theAcer/wejprod
apps/party/urls.py
urls.py
py
942
python
en
code
0
github-code
6
[ { "api_name": "django.urls.path", "line_number": 10, "usage_type": "call" }, { "api_name": "django.urls.path", "line_number": 11, "usage_type": "call" }, { "api_name": "django.urls.path", "line_number": 12, "usage_type": "call" }, { "api_name": "django.urls.path",...
72340854587
import os import csv import json import tweepy import numpy as np import pandas as pd from datetime import datetime, timedelta from tweepy_auth import tweepy_auth ''' today = datetime.today() week_ago = today - timedelta(days=7) week_ago_str = week_ago.strftime('%Y-%m-%d') ''' auth = tweepy_auth() api = tweepy.API(a...
ConwayHsieh/BLM_tweets
tweepy_pandastry.py
tweepy_pandastry.py
py
1,444
python
en
code
0
github-code
6
[ { "api_name": "tweepy_auth.tweepy_auth", "line_number": 16, "usage_type": "call" }, { "api_name": "tweepy.API", "line_number": 18, "usage_type": "call" }, { "api_name": "tweepy.Cursor", "line_number": 22, "usage_type": "call" }, { "api_name": "pandas.DataFrame", ...
7573771770
import os import logging from dotenv import load_dotenv from flask import Flask, jsonify, request from flask_cors import CORS from flask_restful import Api, Resource, reqparse from models.db.postgresDB import PostgresDB from models.services.logger import get_module_logger import models.services.flask_service as flask_s...
Mariusz94/Knowledge-base
backend/app.py
app.py
py
4,372
python
en
code
0
github-code
6
[ { "api_name": "dotenv.load_dotenv", "line_number": 11, "usage_type": "call" }, { "api_name": "flask.Flask", "line_number": 13, "usage_type": "call" }, { "api_name": "flask_cors.CORS", "line_number": 15, "usage_type": "call" }, { "api_name": "flask_restful.reqparse...
7789722347
from tqdm import tqdm import numpy as np import torch import torchvision.transforms as ttr from torch.utils.data import DataLoader import argparse from aermanager import AERFolderDataset from test_spiking import test_spiking # Parameters BATCH_SIZE = 256 parser = argparse.ArgumentParser() parser.add_argument('--qua...
fgr1986/synoploss
mnist_dvs/optimization_benchmarking.py
optimization_benchmarking.py
py
2,996
python
en
code
0
github-code
6
[ { "api_name": "argparse.ArgumentParser", "line_number": 15, "usage_type": "call" }, { "api_name": "torch.device", "line_number": 20, "usage_type": "call" }, { "api_name": "torch.cuda.is_available", "line_number": 20, "usage_type": "call" }, { "api_name": "torch.cu...
3977236501
#!/usr/bin/env python3 from ddpg import Agent import numpy as np from ts_forecasting_env import ts_forecasting_env import time import matplotlib.pyplot as plt import csv import pandas as pd from sklearn.metrics import r2_score, mean_absolute_error, mean_squared_error import argparse from ray import tune from ray.tune....
tiagomateus25/time-series-forecasting-ddpg
bvg_optimization.py
bvg_optimization.py
py
4,277
python
en
code
0
github-code
6
[ { "api_name": "argparse.ArgumentParser", "line_number": 15, "usage_type": "call" }, { "api_name": "csv.reader", "line_number": 29, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 36, "usage_type": "call" }, { "api_name": "numpy.float64", "l...
10254372975
from multiprocessing import context from django.shortcuts import render, redirect from .models import * # Create your views here. def produk_list(request): template_name = "produk_list.html" group_produk = Circle_produk.objects.all() context ={ "produk" : group_produk, } return render(reque...
RenalPutra/kasir-django
produk/views.py
views.py
py
2,103
python
tr
code
0
github-code
6
[ { "api_name": "multiprocessing.context", "line_number": 9, "usage_type": "name" }, { "api_name": "django.shortcuts.render", "line_number": 12, "usage_type": "call" }, { "api_name": "multiprocessing.context", "line_number": 12, "usage_type": "argument" }, { "api_na...
31286775508
import os import sys from datetime import datetime from argparse import ArgumentParser, ArgumentTypeError from subprocess import check_output, CalledProcessError, Popen, PIPE, DEVNULL from contextlib import contextmanager class FileExistsException(Exception): def __init__(self, path): self.path = path d...
Rainymood/rainymood.github.io
main.py
main.py
py
4,987
python
en
code
8
github-code
6
[ { "api_name": "sys.argv", "line_number": 15, "usage_type": "attribute" }, { "api_name": "sys.stderr", "line_number": 20, "usage_type": "attribute" }, { "api_name": "argparse.ArgumentParser", "line_number": 36, "usage_type": "call" }, { "api_name": "os.path.isdir",...
26043166506
from __future__ import annotations import logging import os from dataclasses import dataclass from pathlib import PurePath from typing import Iterable from pants.engine.engine_aware import EngineAwareParameter from pants.engine.fs import ( AddPrefix, CreateDigest, Digest, Directory, FileContent, ...
pantsbuild/pants
src/python/pants/jvm/shading/rules.py
rules.py
py
5,649
python
en
code
2,896
github-code
6
[ { "api_name": "logging.getLogger", "line_number": 29, "usage_type": "call" }, { "api_name": "pants.engine.engine_aware.EngineAwareParameter", "line_number": 33, "usage_type": "name" }, { "api_name": "pathlib.PurePath", "line_number": 34, "usage_type": "name" }, { ...
39267295276
import sys import multiprocessing from controls import ManualControl from cam import Camera from server import get_command_keyboard, stream_frame, get_command import threading # Klavye ile hareket için mode = 1 # Sesli komut ile hareket için mode = 2 # Klavye ile hareket ve Aynı anda Raspberryden PC'ye frame aktarma i...
AbdullahTas123/pi-robot-car
raspberrypi/main.py
main.py
py
3,394
python
en
code
1
github-code
6
[ { "api_name": "cam.Camera", "line_number": 17, "usage_type": "call" }, { "api_name": "multiprocessing.Manager", "line_number": 35, "usage_type": "call" }, { "api_name": "multiprocessing.Value", "line_number": 37, "usage_type": "call" }, { "api_name": "multiprocess...
32414340113
from flask import Flask, send_file, request, abort from pathlib import Path import youtube_dl import json app = Flask(__name__) @app.route('/queuemp3', methods=['GET', 'POST']) def queuemp3(): if request.method == 'POST': try: data = request.get_json() url = data['url'] ...
BK-Modding/youtube-2-mp3
flask server/app.py
app.py
py
1,961
python
en
code
2
github-code
6
[ { "api_name": "flask.Flask", "line_number": 6, "usage_type": "call" }, { "api_name": "flask.request.method", "line_number": 10, "usage_type": "attribute" }, { "api_name": "flask.request", "line_number": 10, "usage_type": "name" }, { "api_name": "flask.request.get_...
33561633117
import typing as t import json import re from pathlib import Path from PIL import Image from torch.utils.data import Dataset from .types.marked_image \ import MarkedImage, MarkedImageTensor from .transforms import ( ToTensor ) from ..utils import coord class BdcDataSet(Dataset): def __init__(self, img_p...
daikon-oroshi/court-detection
court_detection/data/data_set.py
data_set.py
py
1,789
python
en
code
0
github-code
6
[ { "api_name": "torch.utils.data.Dataset", "line_number": 16, "usage_type": "name" }, { "api_name": "transforms.ToTensor", "line_number": 22, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_number": 27, "usage_type": "call" }, { "api_name": "re.search",...
35411640384
#!/usr/bin/python # -*- coding: utf-8 -*- """ Update map explorers -------------------- """ import logging from os.path import join from hdx.data.dataset import Dataset from hdx.data.resource import Resource from src.acled import update_lc_acled, update_ssd_acled from src.cbpf import update_cbpf from src.fts import ...
OCHA-DAP/hdx-scraper-mapexplorer
mapexplorer.py
mapexplorer.py
py
4,508
python
en
code
0
github-code
6
[ { "api_name": "logging.getLogger", "line_number": 19, "usage_type": "call" }, { "api_name": "hdx.data.resource.Resource.read_from_hdx", "line_number": 29, "usage_type": "call" }, { "api_name": "hdx.data.resource.Resource", "line_number": 29, "usage_type": "name" }, { ...
37076072504
import subprocess import time import os import stat import threading import uuid class Iperf3(object): def __init__(self, _ssh_machine1, _ssh_key1, _ssh_machine2, _ssh_key2): self.ssh_machine1 = _ssh_machine1 self.ssh_machine2 = _ssh_machine2 ...
phvalguima/iperf-testing
iperf.py
iperf.py
py
6,642
python
en
code
0
github-code
6
[ { "api_name": "os.chmod", "line_number": 30, "usage_type": "call" }, { "api_name": "os.stat", "line_number": 30, "usage_type": "call" }, { "api_name": "stat.S_IEXEC", "line_number": 30, "usage_type": "attribute" }, { "api_name": "subprocess.Popen", "line_numbe...
37564490314
import pdb import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from torch.distributions import Normal from scipy.stats import entropy, gaussian_kde, normaltest import nflows from nflows import distributions, transforms, utils, flows from nflows.transforms.normalization import BatchNor...
nwaftp23/nflows_epistemic
nflows_utils.py
nflows_utils.py
py
7,615
python
en
code
1
github-code
6
[ { "api_name": "torch.nn", "line_number": 22, "usage_type": "attribute" }, { "api_name": "nflows.distributions.ConditionalDiagonalNormal", "line_number": 27, "usage_type": "call" }, { "api_name": "nflows.distributions", "line_number": 27, "usage_type": "attribute" }, {...
2348487124
import os import sys import logging if sys.version_info >= (3, 0): from io import StringIO else: try: from cStringIO import StringIO except ImportError: from StringIO import StringIO assert StringIO from pylint import lint from pylint.__pkginfo__ import numversion class PyLinter(...
blizzrdof77/Sublime-Text-3-Packages
Anaconda/anaconda_lib/linting/anaconda_pylint.py
anaconda_pylint.py
py
3,368
python
en
code
1
github-code
6
[ { "api_name": "sys.version_info", "line_number": 5, "usage_type": "attribute" }, { "api_name": "StringIO.StringIO", "line_number": 12, "usage_type": "name" }, { "api_name": "sys.exit", "line_number": 24, "usage_type": "attribute" }, { "api_name": "sys.stdout", ...
3357675588
from numpy.lib.polynomial import RankWarning import torch as pt import numpy as np from dataset.GuidedBraTSDataset3D import GuidedBraTSDataset3D from model.PFSeg import PFSeg3D import cv2 import SimpleITK as sitk lr=0.0001 epoch=100 batch_size=1 model_path='/path/to/Saved_models' img_size=(64,96,96) model=PFSeg3D()....
Dootmaan/PFSeg-ABR
step2_generateCoraseMask.py
step2_generateCoraseMask.py
py
5,166
python
en
code
3
github-code
6
[ { "api_name": "model.PFSeg", "line_number": 16, "usage_type": "name" }, { "api_name": "model.PFSeg.PFSeg3D", "line_number": 16, "usage_type": "call" }, { "api_name": "model.PFSeg.load_state_dict", "line_number": 17, "usage_type": "call" }, { "api_name": "model.PFS...
5024929632
from django.core.management import call_command from django.core.management.base import BaseCommand, CommandError import requests, json from app_comments.models import RedditPost, Comment from annoying.functions import get_object_or_None from app_comments.lib.comments import CommentBuilder, RedditPostBuilder from bs4...
daviddennis/comments
app_comments/management/commands/get_links.py
get_links.py
py
2,264
python
en
code
0
github-code
6
[ { "api_name": "django.core.management.base.BaseCommand", "line_number": 14, "usage_type": "name" }, { "api_name": "requests.get", "line_number": 36, "usage_type": "call" }, { "api_name": "json.loads", "line_number": 43, "usage_type": "call" }, { "api_name": "app_c...
14077597352
from lk.utils.config_util import ConfigUtil from lk.utils.shell_util import run_and_confirm, run, run_and_return_output from furl import furl bitbucket = 'bitbucket' bitbucket_domain = 'bitbucket.org' github = 'github' github_domain = 'github.com' class SourceCodeRepo(object): def __init__(self, url=None, serv...
eyalev/lk
lk/classes/source_code_repo.py
source_code_repo.py
py
4,401
python
en
code
0
github-code
6
[ { "api_name": "furl.furl", "line_number": 95, "usage_type": "call" }, { "api_name": "lk.utils.shell_util.run_and_confirm", "line_number": 116, "usage_type": "call" }, { "api_name": "lk.utils.config_util.ConfigUtil", "line_number": 126, "usage_type": "call" }, { "a...
8092333942
from vector import Vector import turtle scale = 40 def print_vector(vector, color): turtle.pencolor(color) turtle.penup() turtle.home() turtle.pendown() turtle.goto(vector.elements[0]*scale,vector.elements[1]*scale) def print_system(x,y): turtle.home() for i in range(x): turtle.do...
sashokbg/python-exercises
vector/draw.py
draw.py
py
760
python
en
code
0
github-code
6
[ { "api_name": "turtle.pencolor", "line_number": 7, "usage_type": "call" }, { "api_name": "turtle.penup", "line_number": 8, "usage_type": "call" }, { "api_name": "turtle.home", "line_number": 9, "usage_type": "call" }, { "api_name": "turtle.pendown", "line_numb...
72014598908
import json import sys import argparse sys.path.append("../evaluation") from evaluate import tuple_f1, convert_opinion_to_tuple def get_args(): """ Helper function to get the gold json, predictions json and negation jsons """ parser = argparse.ArgumentParser() parser.add_argument("gold") pars...
jerbarnes/semeval22_structured_sentiment
analysis/domain_analysis.py
domain_analysis.py
py
1,950
python
en
code
71
github-code
6
[ { "api_name": "sys.path.append", "line_number": 5, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 5, "usage_type": "attribute" }, { "api_name": "argparse.ArgumentParser", "line_number": 13, "usage_type": "call" }, { "api_name": "json.load", "...
72683621307
from matplotlib import pyplot as plt from numpy import loadtxt, zeros from skimage.measure import label from os import path if __name__ == '__main__': current_dir = path.dirname(__file__) file_names = ['mat_p0.70.dat', 'mat_p0.72.dat'] for file_name in file_names: file_path = path.join(current_di...
tee-lab/patchy-ecosterics
temp_actions/CSD/plotter.py
plotter.py
py
1,513
python
en
code
2
github-code
6
[ { "api_name": "os.path.dirname", "line_number": 8, "usage_type": "call" }, { "api_name": "os.path", "line_number": 8, "usage_type": "name" }, { "api_name": "os.path.join", "line_number": 12, "usage_type": "call" }, { "api_name": "os.path", "line_number": 12, ...
810990786
'''Time Based Key-Value Store - https://leetcode.com/problems/time-based-key-value-store/ Design a time-based key-value data structure that can store multiple values for the same key at different time stamps and retrieve the key's value at a certain timestamp. Implement the TimeMap class: TimeMap() Initializes the o...
Saima-Chaity/Leetcode
Google/Time Based Key-Value Store.py
Time Based Key-Value Store.py
py
3,635
python
en
code
0
github-code
6
[ { "api_name": "collections.OrderedDict", "line_number": 41, "usage_type": "call" }, { "api_name": "collections.defaultdict", "line_number": 74, "usage_type": "call" } ]
30301888432
import os import sys import unittest from pathlib import Path import coverage from mpi4py import MPI def main(path, parallel): cov = coverage.coverage( branch=True, include=str(Path(path).parent) + '/ignis/executor/*.py', ) cov.start() import ignis.executor.core.ILog as Ilog Ilog.enable(False) tests = unit...
andreasolla/core-python
ignis_test/Main.py
Main.py
py
1,575
python
en
code
1
github-code
6
[ { "api_name": "coverage.coverage", "line_number": 11, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_number": 13, "usage_type": "call" }, { "api_name": "ignis.executor.core.ILog.enable", "line_number": 17, "usage_type": "call" }, { "api_name": "ignis....
21916878669
#!/usr/bin/env python2 import logging import os import shutil import tempfile from test_utils import TESTS_DIR, qsym, check_testcase SCHEDULE_DIR = os.path.join(TESTS_DIR, "schedule") logging.getLogger('qsym.Executor').setLevel(logging.DEBUG) def get_testcases(exe, bitmap, input_binary): output_dir = tempfile.mk...
sslab-gatech/qsym
tests/test_schedule.py
test_schedule.py
py
2,236
python
en
code
615
github-code
6
[ { "api_name": "os.path.join", "line_number": 9, "usage_type": "call" }, { "api_name": "test_utils.TESTS_DIR", "line_number": 9, "usage_type": "argument" }, { "api_name": "os.path", "line_number": 9, "usage_type": "attribute" }, { "api_name": "logging.getLogger", ...
36650794154
from pywrap.exporter import (MethodDefinition, SetterDefinition, GetterDefinition, ConstructorDefinition, FunctionDefinition, CythonDeclarationExporter) from pywrap.ast import (Param, Function, Clazz, Constructor, Method, Field, Enum, Typ...
AlexanderFabisch/cythonwrapper
pywrap/test/test_exporter.py
test_exporter.py
py
6,972
python
en
code
37
github-code
6
[ { "api_name": "pywrap.exporter.MethodDefinition", "line_number": 13, "usage_type": "call" }, { "api_name": "pywrap.parser.Includes", "line_number": 14, "usage_type": "call" }, { "api_name": "pywrap.parser.TypeInfo", "line_number": 15, "usage_type": "call" }, { "ap...
70285712189
""" SWF """ from __future__ import absolute_import from .tag import SWFTimelineContainer from .stream import SWFStream from .export import SVGExporter from six.moves import cStringIO from io import BytesIO class SWFHeaderException(Exception): """ Exception raised in case of an invalid SWFHeader """ def __init_...
timknip/pyswf
swf/movie.py
movie.py
py
5,642
python
en
code
154
github-code
6
[ { "api_name": "stream.readUI8", "line_number": 19, "usage_type": "call" }, { "api_name": "stream.readUI8", "line_number": 20, "usage_type": "call" }, { "api_name": "stream.readUI8", "line_number": 21, "usage_type": "call" }, { "api_name": "stream.readUI8", "li...
4582050726
import numpy as np import pandas as pd from matplotlib import pyplot as plt import seaborn as sns from scipy import stats import collections import time from sklearn import cluster from sklearn.metrics import adjusted_rand_score import scipy as sp from tqdm import tqdm from sklearn.manifold import MDS from run_dist_mat...
pdavar/Analysis-of-3D-Mouse-Genome-Organization
bin_resample_analysis.py
bin_resample_analysis.py
py
3,912
python
en
code
0
github-code
6
[ { "api_name": "matplotlib.pyplot.subplots", "line_number": 31, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 31, "usage_type": "name" }, { "api_name": "tqdm.tqdm", "line_number": 32, "usage_type": "call" }, { "api_name": "tqdm.tqdm", ...
27735122824
from scipy import integrate import math def func1(x): return 1 / ((3*x - 1)**0.5) def func2(x): return math.log(x**2 + 1) / x def func3(x): return 1 / (0.2*x**2 + 1)**0.5 def rectangle_method(func, a, b, n): h = (b - a)/n integral_sum = sum(func(a + i * h) for i in range(n)) result = ...
Alisa7A/Numerical-methods-of-programming
Pr11 Шамігулової Аліси.py
Pr11 Шамігулової Аліси.py
py
1,152
python
en
code
0
github-code
6
[ { "api_name": "math.log", "line_number": 6, "usage_type": "call" }, { "api_name": "scipy.integrate.simps", "line_number": 15, "usage_type": "call" }, { "api_name": "scipy.integrate", "line_number": 15, "usage_type": "name" } ]
70724549309
from django.urls import path from .views import RegiaoCreate, EmpresaCreate, AgendamentoColetaCreate, AgendamentoDescarteCreate from .views import RegiaoUpdate, EmpresaUpdate, AgendamentoColetaUpdate, AgendamentoDescarteUpdate from .views import RegiaoDelete, EmpresaDelete, AgendamentoColetaDelete, AgendamentoDescarte...
micaelhjs/PIUnivesp02
cadastros/urls.py
urls.py
py
1,948
python
pt
code
0
github-code
6
[ { "api_name": "django.urls.path", "line_number": 10, "usage_type": "call" }, { "api_name": "views.RegiaoCreate.as_view", "line_number": 10, "usage_type": "call" }, { "api_name": "views.RegiaoCreate", "line_number": 10, "usage_type": "name" }, { "api_name": "django...
7091903997
import database from datetime import datetime import db_pyMySQL conn = database.connection # Thêm tài khoản "user": User sẽ không mã hoá mkhau do xài 2 ngôn ngữ khác nhau, # nên khi mã hoá xong NodeJS sẽ ko hỗ trợ để giải mã => sẽ không đăng nhập được. # INSERT: # Thêm tài khoản khách hàng: def insert_user(name, e...
letrinhan1509/FashionShop
api_admin/model_insert.py
model_insert.py
py
8,813
python
vi
code
0
github-code
6
[ { "api_name": "database.connection", "line_number": 5, "usage_type": "attribute" }, { "api_name": "database.mysecret_key", "line_number": 16, "usage_type": "attribute" }, { "api_name": "database.mysecret_key", "line_number": 29, "usage_type": "attribute" }, { "api...
75108014908
# from unicodedata import lookup from django.urls import path, include from rest_framework.routers import SimpleRouter, DefaultRouter # This for the viewset models in the views from rest_framework_nested import routers # This is for the nested routers from store.models import Product # from pprint import pprint from...
Auracule/e_commerce_api
store/urls.py
urls.py
py
2,718
python
en
code
0
github-code
6
[ { "api_name": "rest_framework_nested.routers.DefaultRouter", "line_number": 12, "usage_type": "call" }, { "api_name": "rest_framework_nested.routers", "line_number": 12, "usage_type": "name" }, { "api_name": "rest_framework_nested.routers.NestedDefaultRouter", "line_number": ...
32188022347
from itertools import permutations def primenumber(x): if x < 2: return False for i in range(2, x): if x % i == 0: return False return True def solution(numbers): answer = 0 num = [] for i in range(1, len(numbers)+1) : num.append(list(set(map(''.join, pe...
kcw0331/python-for-coding-test
programmers-coding/소수찾기.py
소수찾기.py
py
1,183
python
en
code
0
github-code
6
[ { "api_name": "itertools.permutations", "line_number": 15, "usage_type": "call" }, { "api_name": "itertools.permutations", "line_number": 39, "usage_type": "call" } ]
10758898663
import uvicorn from fastapi import FastAPI, HTTPException app = FastAPI() @app.get("/") async def root(): return {"message": "Welcome to basic math operations api!"} @app.get("/add") async def add(a: int, b: int): return {"result": a + b} @app.get("/subtract") async def subtract(a: int, b: int): ret...
pawelcich/rest_api
web/app.py
app.py
py
722
python
en
code
0
github-code
6
[ { "api_name": "fastapi.FastAPI", "line_number": 5, "usage_type": "call" }, { "api_name": "fastapi.HTTPException", "line_number": 31, "usage_type": "call" }, { "api_name": "uvicorn.run", "line_number": 37, "usage_type": "call" } ]
19631761443
from FACE_VERIFICATION.validation import Verify from utils.encrypt import Encrypt from utils.calling import caller import pickle obj1 = Verify() obj2 = Encrypt() obj3 = caller() class RUN: def __init__(self): pass def controller(self,data): mode = data['mode'] if mode == "verify": ...
saquibquddus/Face-Unlock-Web-Application
STREAMLIT/utils/run.py
run.py
py
1,503
python
en
code
0
github-code
6
[ { "api_name": "FACE_VERIFICATION.validation.Verify", "line_number": 6, "usage_type": "call" }, { "api_name": "utils.encrypt.Encrypt", "line_number": 7, "usage_type": "call" }, { "api_name": "utils.calling.caller", "line_number": 8, "usage_type": "call" } ]
19416798117
"""Determine the fration of non-built-up land area needed to become autarkic.""" import click import pandas as pd import geopandas as gpd from src.potentials import Potential @click.command() @click.argument("path_to_demand") @click.argument("path_to_potential") @click.argument("path_to_footprint") @click.argument("...
timtroendle/possibility-for-electricity-autarky
src/necessary_land.py
necessary_land.py
py
4,031
python
en
code
10
github-code
6
[ { "api_name": "pandas.read_csv", "line_number": 28, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 29, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 30, "usage_type": "call" }, { "api_name": "pandas.read_csv", ...
70793816827
from pathlib import Path import re, pickle, os import pickle, win32net from time import sleep class Scanner: wordList = "" ignored_type = "" ignored_dir = "" # this will store all of the file dictionsaries files = [] # This is the path that will be scanned p = '' ...
thang41/OpenSourceSecurityCheck
scanner.py
scanner.py
py
9,244
python
en
code
0
github-code
6
[ { "api_name": "pathlib.Path", "line_number": 23, "usage_type": "call" }, { "api_name": "os.path.normpath", "line_number": 29, "usage_type": "call" }, { "api_name": "os.path", "line_number": 29, "usage_type": "attribute" }, { "api_name": "pathlib.Path", "line_n...
29451178686
from selenium import webdriver import time, re, urllib, requests from telethon.sync import TelegramClient from config import api_id, api_hash client = TelegramClient('name', api_id, api_hash) client.start() dlgs = client.get_dialogs() tegmo = None for dlg in dlgs: if dlg.title == "LTC Click Bot": te...
Sofron80/coin_bot
main2.py
main2.py
py
2,611
python
en
code
0
github-code
6
[ { "api_name": "telethon.sync.TelegramClient", "line_number": 8, "usage_type": "call" }, { "api_name": "config.api_id", "line_number": 8, "usage_type": "argument" }, { "api_name": "config.api_hash", "line_number": 8, "usage_type": "argument" }, { "api_name": "selen...
71817771068
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # mid2sheet.py # Midi-Files -> Sheets for Musicbox (30 notes, starting from F) # (c) 2017 Niklas Kannenberg <kannenberg@airde.net> and Gunnar J. # Released under the GPL v3 or later, see file "COPYING" # # ToDo # - Use 'pypdf' instead of external 'pdfjam' for PDF m...
flylens/mid2sheet
mid2sheet.py
mid2sheet.py
py
14,949
python
en
code
27
github-code
6
[ { "api_name": "os.getcwd", "line_number": 55, "usage_type": "call" }, { "api_name": "os.getcwd", "line_number": 56, "usage_type": "call" }, { "api_name": "mido.MidiFile", "line_number": 151, "usage_type": "call" }, { "api_name": "datetime.datetime.now", "line_...
22609873896
from django.contrib.auth.decorators import user_passes_test, login_required from django.http import HttpResponse, HttpResponseRedirect from django.http import JsonResponse from django.shortcuts import render, redirect from apps.rfid.models import GeneralAssembly from hybridjango.utils import group_test class Ballot: ...
hybrida/hybridjango
apps/ballot/views.py
views.py
py
5,402
python
en
code
4
github-code
6
[ { "api_name": "django.http.HttpResponseRedirect", "line_number": 51, "usage_type": "call" }, { "api_name": "django.shortcuts.render", "line_number": 54, "usage_type": "call" }, { "api_name": "django.contrib.auth.decorators.user_passes_test", "line_number": 38, "usage_type...
73739270588
#!/usr/bin/env python3 import argparse import os import re import subprocess import sys LOG_FILE_OPTION = 'log_file' OUTPUT_PATH_OPTION = '--output-path' ONLY_FAILED_OPTION = '--only-failed' HUMAN_READABLE_OPTION = '--human-readable' USE_RUBY_PARSER_OPTION = '--use-ruby' FIND_COREDUMPS_OPTION = "--find-coredumps" WRI...
dA505819/maxscale-buildbot
master/parser-tests/parser/parser.py
parser.py
py
4,117
python
en
code
0
github-code
6
[ { "api_name": "argparse.ArgumentParser", "line_number": 18, "usage_type": "call" }, { "api_name": "os.path.dirname", "line_number": 28, "usage_type": "call" }, { "api_name": "os.path", "line_number": 28, "usage_type": "attribute" }, { "api_name": "os.path.abspath"...
14490773282
""" create model Creator: Xiaoshui Huang Date: 2020-06-19 """ from se_math.so3 import inverse, transform import torch import numpy as np from random import sample import se_math.se3 as se3 import se_math.invmat as invmat import igl import os import sys sys.path.append('./../') sys.path.append('./../../') from loss i...
Dengzhi-USTC/A-robust-registration-loss
code/exps_deep_learning/fmr/model.py
model.py
py
36,481
python
en
code
25
github-code
6
[ { "api_name": "sys.path.append", "line_number": 18, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 18, "usage_type": "attribute" }, { "api_name": "sys.path.append", "line_number": 19, "usage_type": "call" }, { "api_name": "sys.path", "line_nu...
73503536508
from tianshou.data import Batch, ReplayBuffer, to_numpy, to_torch, to_torch_as import stable_baselines3.common.logger as L import functools import gym import numpy as np from torch.nn import functional as F from einops.layers.torch import Rearrange from encoder import * import einops class RNEncoder(nn.Module): def...
albertcity/OCARL
relation_net.py
relation_net.py
py
4,818
python
en
code
1
github-code
6
[ { "api_name": "gym.spaces.Box", "line_number": 15, "usage_type": "call" }, { "api_name": "gym.spaces", "line_number": 15, "usage_type": "attribute" }, { "api_name": "numpy.prod", "line_number": 24, "usage_type": "call" }, { "api_name": "numpy.prod", "line_numb...
9836414156
import sys from collections import deque n = int(sys.stdin.readline()); board = []; for _ in range(n): board.append(list(map(int, list(sys.stdin.readline())[:-1]))); dx = [0, 0, -1, 1]; dy = [1, -1, 0, 0]; def bfs(board, x, y): if board[x][y] == 0: return 0; area = 1; q = deque([]); board[x][y] =...
woasidh/algorithm
python/BOJ/그래프_탐색/2667.py
2667.py
py
932
python
en
code
0
github-code
6
[ { "api_name": "sys.stdin.readline", "line_number": 4, "usage_type": "call" }, { "api_name": "sys.stdin", "line_number": 4, "usage_type": "attribute" }, { "api_name": "sys.stdin.readline", "line_number": 7, "usage_type": "call" }, { "api_name": "sys.stdin", "li...
655296277
import json import os from concurrent import futures import luigi import numpy as np import nifty.tools as nt import z5py from cluster_tools.inference import InferenceLocal from cluster_tools.inference.inference_embl import InferenceEmbl OFFSETS = [ [-1, 0, 0], [0, -1, 0], [0, 0, -1], [-2, 0, 0], ...
constantinpape/torch-em
experiments/unet-segmentation/mitochondria-segmentation/mito-em/challenge/segmentation_impl.py
segmentation_impl.py
py
14,203
python
en
code
42
github-code
6
[ { "api_name": "os.path.join", "line_number": 27, "usage_type": "call" }, { "api_name": "os.path", "line_number": 27, "usage_type": "attribute" }, { "api_name": "os.path.exists", "line_number": 28, "usage_type": "call" }, { "api_name": "os.path", "line_number":...
36545155158
from django.http import Http404, JsonResponse from django.shortcuts import render from . import fsop from .models import Directory, File, NotFoundError def root(request): return index(request, '') def index(request, path): path = _split_path(path) try: directory = Directory.from_path(path) ...
joshsteiner/MyDrive
drive/views.py
views.py
py
1,606
python
en
code
0
github-code
6
[ { "api_name": "models.Directory.from_path", "line_number": 15, "usage_type": "call" }, { "api_name": "models.Directory", "line_number": 15, "usage_type": "name" }, { "api_name": "models.Directory.subdirs", "line_number": 16, "usage_type": "call" }, { "api_name": "...
72528402109
import os, csv import nltk as nlp from nltk.probability import FreqDist import pandas as pd import matplotlib.pyplot as plt hapaxList = [] with open('hapaxList.csv', 'w', newline='') as wordsCSVfile: write = csv.writer(wordsCSVfile) write.writerow(["Year", "Chart", "Hapax Count", "Hapaxes"]) # Iterate through w...
stkeller/Replication-Thesis
Code/LexicalHapax.py
LexicalHapax.py
py
1,106
python
en
code
0
github-code
6
[ { "api_name": "csv.writer", "line_number": 10, "usage_type": "call" }, { "api_name": "csv.reader", "line_number": 15, "usage_type": "call" }, { "api_name": "nltk.word_tokenize", "line_number": 20, "usage_type": "call" }, { "api_name": "nltk.probability.FreqDist", ...
70879486268
from enum import Enum class Color(Enum): WHITE = True BLACK = False class Direction(Enum): EAST = "e" SOUTH_EAST = "se" SOUTH_WEST = "sw" WEST = "w" NORTH_WEST = "nw" NORTH_EAST = "ne" class Coordinate: # Using axial coordinates # https://www.redblobgames.com/grids/hexagons...
cj81499/advent-of-code
src/aoc_cj/aoc2020/day24.py
day24.py
py
4,291
python
en
code
2
github-code
6
[ { "api_name": "enum.Enum", "line_number": 4, "usage_type": "name" }, { "api_name": "enum.Enum", "line_number": 9, "usage_type": "name" }, { "api_name": "aocd.data", "line_number": 169, "usage_type": "argument" }, { "api_name": "aocd.data", "line_number": 170, ...
13663867321
import gzip import os import json import random from tqdm import tqdm import numpy as np from more_itertools import chunked def format_str(string): for char in ['\r\n', '\r', '\n']: string = string.replace(char, ' ') return string def extract_test_data(DATA_DIR, language, target, file_name, test_b...
suda1927406040/BackdoorCodeSearch
utils/attack_code/attack/extract_data.py
extract_data.py
py
5,136
python
en
code
0
github-code
6
[ { "api_name": "os.path.join", "line_number": 19, "usage_type": "call" }, { "api_name": "os.path", "line_number": 19, "usage_type": "attribute" }, { "api_name": "json.loads", "line_number": 26, "usage_type": "call" }, { "api_name": "numpy.random.seed", "line_nu...
31026372746
import bme280 import smbus2 import time import datetime port = 1 address = 0x77 # Adafruit BME280 address. Other BME280s may be different bus = smbus2.SMBus(port) bme280.load_calibration_params(bus,address) while True: bme280_data = bme280.sample(bus,address) humidity = bme280_data.humidity pressure =...
drozden/smartCities
archive/weather1.py
weather1.py
py
643
python
en
code
0
github-code
6
[ { "api_name": "smbus2.SMBus", "line_number": 9, "usage_type": "call" }, { "api_name": "bme280.load_calibration_params", "line_number": 11, "usage_type": "call" }, { "api_name": "bme280.sample", "line_number": 14, "usage_type": "call" }, { "api_name": "datetime.dat...
13058283715
from datetime import timezone import pytest from util.file_util import FileUtil class TestFileUtil: @pytest.mark.parametrize('file', ('/etc/hosts', '/etc/profile')) def test_get_last_file_change_ts(self, file: str): ts = FileUtil.get_last_file_change_ts(file) assert ts is not None a...
mbogner/imagination
tests/util/test_file_util.py
test_file_util.py
py
644
python
en
code
0
github-code
6
[ { "api_name": "util.file_util.FileUtil.get_last_file_change_ts", "line_number": 12, "usage_type": "call" }, { "api_name": "util.file_util.FileUtil", "line_number": 12, "usage_type": "name" }, { "api_name": "datetime.timezone.utc", "line_number": 14, "usage_type": "attribu...
38269716845
import tensorflow as tf from tensorflow.keras import layers import pickle import tarfile import numpy as np import scipy as sc import cv2 from tensorflow.keras.preprocessing.image import ImageDataGenerator import math import matplotlib.pyplot as plt from sklearn.metrics import confusion_matrix def extract(...
RSpe/Keras-Tensorflow-Cifar10-Model
model.py
model.py
py
6,107
python
en
code
0
github-code
6
[ { "api_name": "tarfile.open", "line_number": 15, "usage_type": "call" }, { "api_name": "pickle.load", "line_number": 22, "usage_type": "call" }, { "api_name": "scipy.ndimage.filters.median_filter", "line_number": 38, "usage_type": "call" }, { "api_name": "scipy.nd...
39346916658
import pandas as pd import fasttext class LanguageDetector: def __init__(self): self.model = fasttext.load_model('lid.176.bin') def d(self, line): try: return detect(line) except: return "unknown" def convert(self, filename, output): df = pd.read_cs...
hackartists/social-data-aggregator
detector.py
detector.py
py
1,183
python
en
code
0
github-code
6
[ { "api_name": "fasttext.load_model", "line_number": 6, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 15, "usage_type": "call" } ]
45386300266
from __future__ import unicode_literals import importlib import os import sys from theory.apps import apps from theory.utils import datetimeSafe, six from theory.utils.six.moves import input from .loader import MIGRATIONS_MODULE_NAME class MigrationQuestioner(object): """ Gives the autodetector responses to qu...
grapemix/theory
theory/db/migrations/questioner.py
questioner.py
py
5,492
python
en
code
1
github-code
6
[ { "api_name": "theory.apps.apps.getAppConfig", "line_number": 36, "usage_type": "call" }, { "api_name": "theory.apps.apps", "line_number": 36, "usage_type": "name" }, { "api_name": "loader.MIGRATIONS_MODULE_NAME", "line_number": 39, "usage_type": "name" }, { "api_...
15710053369
from fastapi import APIRouter, Depends, Response from typing import List, Union from queries.cover import CoverIn, CoverOut, CoverRepository, Error router = APIRouter() @router.post("/covers", response_model=Union[CoverOut, Error]) def create_cover( cover: CoverIn, repo: CoverRepository = Depends() ): re...
oliviaxu0528/narrative-dojos
nd/routers/cover.py
cover.py
py
1,501
python
en
code
0
github-code
6
[ { "api_name": "fastapi.APIRouter", "line_number": 5, "usage_type": "call" }, { "api_name": "queries.cover.CoverIn", "line_number": 10, "usage_type": "name" }, { "api_name": "queries.cover.CoverRepository", "line_number": 11, "usage_type": "name" }, { "api_name": "...
72532823229
# pylint: disable=protected-access # pylint: disable=redefined-outer-name # pylint: disable=too-many-arguments # pylint: disable=unused-argument # pylint: disable=unused-variable from typing import Any from urllib.parse import parse_qs import pytest from aiohttp.test_utils import make_mocked_request from models_libr...
ITISFoundation/osparc-simcore
services/web/server/tests/unit/isolated/test_studies_dispatcher_models.py
test_studies_dispatcher_models.py
py
5,342
python
en
code
35
github-code
6
[ { "api_name": "pydantic.parse_obj_as", "line_number": 26, "usage_type": "call" }, { "api_name": "pydantic.ByteSize", "line_number": 26, "usage_type": "argument" }, { "api_name": "aiohttp.test_utils.make_mocked_request", "line_number": 56, "usage_type": "call" }, { ...
27545085038
#! /usr/bin/env python3 # -*- coding: utf-8 -*- """ Cube centring, detects bad frames, crops and bins @author: Iain """ __author__ = 'Iain Hammond' __all__ = ['calib_dataset'] from os import makedirs, system from os.path import isfile, isdir import numpy as np from pyprind import ProgBar import matplotlib from matpl...
IainHammond/NACO_pipeline
naco_pip/NACO_preproc.py
NACO_preproc.py
py
25,286
python
en
code
null
github-code
6
[ { "api_name": "matplotlib.use", "line_number": 27, "usage_type": "call" }, { "api_name": "vip_hci.fits.open_fits", "line_number": 33, "usage_type": "call" }, { "api_name": "os.path.isfile", "line_number": 45, "usage_type": "call" }, { "api_name": "vip_hci.fits.ope...
3490973159
# -*- coding: utf-8 -*- """ Created on Mon Aug 31 00:40:46 2020 @author: Rashidul hasan (student id-1512027) depertmant of naval architucture and marine engineering Bangladesh university of engineering and technology By using this moddule we can see our desiarbale design which is created by using design modu...
rashedhasan007/A-topology-and-optimisation-software-
A-topology-and-optimisation-software--main/view.py
view.py
py
954
python
en
code
0
github-code
6
[ { "api_name": "matplotlib.pyplot.ion", "line_number": 26, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 26, "usage_type": "name" }, { "api_name": "matplotlib.pyplot.subplots", "line_number": 27, "usage_type": "call" }, { "api_name": "ma...
18110173657
from django.contrib import admin from django.urls import path, include, re_path as url # 스웨거 설정 from rest_framework.permissions import AllowAny from drf_yasg.views import get_schema_view from drf_yasg import openapi from django.conf import settings from django.conf.urls.static import static # 스웨거 설정 schema_url_patte...
Kim-Link/drfLogin
drfLogin/drfLogin/urls.py
urls.py
py
1,437
python
en
code
0
github-code
6
[ { "api_name": "django.urls.path", "line_number": 14, "usage_type": "call" }, { "api_name": "django.urls.include", "line_number": 14, "usage_type": "call" }, { "api_name": "django.urls.path", "line_number": 15, "usage_type": "call" }, { "api_name": "django.urls.inc...
4769430747
#!/usr/bin/env python import sys import glob, os import argparse def insert_track_id(label_file, track_ids): labels_with_track = [] with open(label_file, 'r') as yolo_f: labels = yolo_f.readlines() for i, label in enumerate(labels): split_label = label.split() if len(split_label) < 6: ...
Salmon-Computer-Vision/salmon-computer-vision
utils/scribe_yolo_track.py
scribe_yolo_track.py
py
2,022
python
en
code
4
github-code
6
[ { "api_name": "os.path.join", "line_number": 23, "usage_type": "call" }, { "api_name": "os.path", "line_number": 23, "usage_type": "attribute" }, { "api_name": "os.path.join", "line_number": 24, "usage_type": "call" }, { "api_name": "os.path", "line_number": 2...
20825994964
import json from pandas import DataFrame import pandas as pd import requests import emails file_name = 'teste.csv' def getJson(): r = requests.get('https://api.biscoint.io/v1/ticker?base=BTC&quote=BRL') df_new = pd.DataFrame() df = pd.DataFrame(json.loads(r.text)) date = pd.Timestamp.date(pd.Timesta...
HumbertoLimaa/mysite
utils.py
utils.py
py
1,135
python
en
code
0
github-code
6
[ { "api_name": "requests.get", "line_number": 11, "usage_type": "call" }, { "api_name": "pandas.DataFrame", "line_number": 13, "usage_type": "call" }, { "api_name": "pandas.DataFrame", "line_number": 14, "usage_type": "call" }, { "api_name": "json.loads", "line...
29432109275
from collections import defaultdict, Counter class Solution: def groupAnagrams(self, strs): ana_dict = defaultdict(list) for s in strs: # ana_dict[tuple(sorted(Counter(s)))].append(s) count = [0]*26 for c in s: count[ord(c)-ord('a')] += 1 ...
mintaewon/coding_leetcode
0909/P53_hoin.py
P53_hoin.py
py
478
python
en
code
0
github-code
6
[ { "api_name": "collections.defaultdict", "line_number": 4, "usage_type": "call" } ]
25033146898
import decimal from django.contrib.auth import authenticate, login, logout from django.contrib.auth.decorators import login_required from django.db import IntegrityError from django.http import HttpResponseRedirect from django.shortcuts import render from django.urls import reverse from annoying.functions import get_o...
csloan29/HES-e-33a-web-django
commerce/auctions/views.py
views.py
py
9,574
python
en
code
0
github-code
6
[ { "api_name": "django.contrib.auth.authenticate", "line_number": 21, "usage_type": "call" }, { "api_name": "django.contrib.auth.login", "line_number": 25, "usage_type": "call" }, { "api_name": "django.http.HttpResponseRedirect", "line_number": 26, "usage_type": "call" }...
43291543351
import math import os import cv2 from ultralytics import YOLO from people import People from car import Car video = os.path.join('.', 'videos', 'Casa-Ch.mp4') video_cap = cv2.VideoCapture(video) fps = video_cap.get(cv2.CAP_PROP_FPS) pixels = int((24/fps)*15) ret, frame = video_cap.read() altura, largura, canais = fr...
serjetus/Projeto
src/main.py
main.py
py
3,473
python
en
code
0
github-code
6
[ { "api_name": "os.path.join", "line_number": 7, "usage_type": "call" }, { "api_name": "os.path", "line_number": 7, "usage_type": "attribute" }, { "api_name": "cv2.VideoCapture", "line_number": 10, "usage_type": "call" }, { "api_name": "cv2.CAP_PROP_FPS", "line...
70835853948
import csv import argparse import os import sys import numpy as np import torch import torch.cuda from PIL import Image from torch.autograd import Variable from torchvision.transforms import transforms from my.yolov3.easy.net.load_net import load_net from PIL import Image image_size = (96, 96) test_transformations...
NJUCoders/commodity-classification-hard
easy/predict.py
predict.py
py
1,931
python
en
code
0
github-code
6
[ { "api_name": "torchvision.transforms.transforms.Compose", "line_number": 19, "usage_type": "call" }, { "api_name": "torchvision.transforms.transforms", "line_number": 19, "usage_type": "name" }, { "api_name": "torchvision.transforms.transforms.ToTensor", "line_number": 20, ...
32563261250
""" HTTP endpoints for `station_store` """ from fastapi import HTTPException, status from screfinery import schema from screfinery.crud_routing import EndpointsDef, RouteDef, \ crud_router_factory from screfinery.stores import station_store from screfinery.util import is_user_authorized def authorize(user, scope...
fre-sch/sc-refinery-api
screfinery/routes/station.py
station.py
py
1,371
python
en
code
0
github-code
6
[ { "api_name": "screfinery.util.is_user_authorized", "line_number": 17, "usage_type": "call" }, { "api_name": "fastapi.HTTPException", "line_number": 18, "usage_type": "call" }, { "api_name": "fastapi.status.HTTP_403_FORBIDDEN", "line_number": 18, "usage_type": "attribute"...
27568079162
from sys import platform from pathlib import Path from clang.cindex import Config # -- Project information ----------------------------------------------------- project = 'zenoh-pico' copyright = '2017, 2022 ZettaScale Technology Inc' author = 'ZettaScale Zenoh team' release = '0.11.0.0' # -- General configuration --...
eclipse-zenoh/zenoh-pico
docs/conf.py
conf.py
py
1,328
python
en
code
63
github-code
6
[ { "api_name": "sys.platform", "line_number": 22, "usage_type": "name" }, { "api_name": "pathlib.Path", "line_number": 23, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_number": 24, "usage_type": "call" }, { "api_name": "clang.cindex.Config.set_librar...