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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
322544892 | from urllib.request import urlopen
from bs4 import BeautifulSoup
from json import dump, load
from urllib.error import HTTPError
from config import FIRST_DAY, SCHEDULE_URL
def cached_download(url):
try:
with open("schedule.html", "rb") as saved_source:
return saved_source.read()
except File... | Recursing/PyconItBot | scraper.py | scraper.py | py | 3,797 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "urllib.request.urlopen",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "urllib.request.urlopen",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "urlli... |
24291822077 | import numpy as np
import matplotlib.pyplot as plt
from dataloader import Dataloader
class Hopfield:
def __init__(self,train_data_path,input_dim1,input_dim2):
self.input_dim1 = input_dim1 + 1
self.input_dim2 = input_dim2
self.path = train_data_path[0]
self.w = []
s... | AlexPeng517/Hopfield_Network_Implementation | src/hopfield.py | hopfield.py | py | 4,306 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "numpy.array",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "numpy.random.randint",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line... |
27652232043 | from django.urls import path
from .views import (
list_salespeople,
salesperson,
list_customers,
customer,
list_sales,
sale,
)
urlpatterns = [
path("salespeople/", list_salespeople),
path("salespeople/<int:id>/", salesperson),
path("customers/", list_customers),
path("customers... | awoayan/wheeler-dealer | sales/api/sales_rest/urls.py | urls.py | py | 413 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "django.urls.path",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "views.list_salespeople",
"line_number": 13,
"usage_type": "argument"
},
{
"api_name": "django.urls.path",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "views.sa... |
4475205395 | import numpy as np
import matplotlib.pyplot as plt
import matplotlib.markers as markers
from algorithm_tax.MainlandChina import MainlandChinaTax
from algorithm_tax.Taiwan import TaiwanTax
from algorithm_tax.utility import get_newset_exchange_rate, output_csv
if __name__ == '__main__':
# 請輸入期望薪資
salary = int(in... | mosdeo/OptimalSalaryDivideBetweenMainlandChinaAndTaiwan | calc_tax_optimal_divied_two_side.py | calc_tax_optimal_divied_two_side.py | py | 6,151 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "algorithm_tax.utility.get_newset_exchange_rate",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "algorithm_tax.Taiwan.TaiwanTax.basic_salary",
"line_number": 22,
"usage_type":... |
7112952245 | from typing import List
class Solution:
def findMin(self, nums: List[int]) -> int:
start = 0
end = len(nums)-1
while start < end:
if nums[start] < nums[end]:
return nums[start]
mid = (start + end) // 2
if nums[start] < nums[mid]:
... | longkun-uestc/examination | 力扣网/寻找旋转数组的最小值.py | 寻找旋转数组的最小值.py | py | 617 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "typing.List",
"line_number": 5,
"usage_type": "name"
}
] |
71646133159 | import configparser
import json
import common.alert
import db.sqlite
import strategy.stock
def get_stock_on_hand(sql: db.sqlite) -> [str]:
transaction_histories = sql.query_transaction_histories()
stock_ids = {}
for t in transaction_histories:
if t.sid in stock_ids:
stock... | tp6vup54/myStock | vcp_stage2.py | vcp_stage2.py | py | 1,260 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "db.sqlite.sqlite",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "db.sqlite",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "configparser.ConfigParser",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "db.sqlite.sql... |
73027187880 | import json
from flask import jsonify
from core.actions import Actions
from customer_support.help_scout import util
from customer_support.help_scout.entities.help_scout_conversation import HelpscoutConversation
from customer_support.help_scout.entities.help_scout_customer import HelpscoutCustomer
class HelpscoutActio... | dipendrabaidawa/unified_api | unified/modules/main/categories/customer_support/help_scout/actions.py | actions.py | py | 5,249 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "core.actions.Actions",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "customer_support.help_scout.util.help_scout_token",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "customer_support.help_scout.util",
"line_number": 17,
"usage_type":... |
8316635688 | # print(__doc__)
# import the necessary commands and libraries
from pytracer.test.utils import trace
import os
import matplotlib.pyplot as plt
import numpy as np
import pytest
from sklearn.tree import DecisionTreeRegressor
def main():
# Create a random dataset
rng = np.random.RandomState(1)
X = np.sort... | yohanchatelain/pytracer | pytracer/test/sklearn/test_decision_tree_regression.py | test_decision_tree_regression.py | py | 1,693 | python | en | code | 5 | github-code | 18 | [
{
"api_name": "numpy.random.RandomState",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "numpy.sort",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "numpy.sin",
... |
16518179377 | # pylint: disable=unused-argument
from fastapi import APIRouter, Body, Depends
from apps.api.main_app import exceptions
from ..cases.promo import delete_promo, get_promo, update_promo
from ..depends import auth as depends
from ..depends.container import container_resolve
from ..models import promo as model
from ..ser... | pavivin/fastapi-di | src/apps/api/main_app/v1/endpoints/promo.py | promo.py | py | 1,960 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "fastapi.APIRouter",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "fastapi.Depends",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "depends.auth.access_token_payload",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name... |
36271607885 | """
@file clip_loss.py
@author Qiusheng Huang, Shanghai AI Lab
@brief CLIP guidance loss
"""
import torch
import torch.nn as nn
from nr3d_lib.fmt import log
try:
import clip
except ImportError:
log.info("clip is not installed. CLIP related model & losses are disabled.")
class CLIPLoss(nn.Module):
de... | PJLab-ADG/nr3d_lib | models/loss/clip_loss.py | clip_loss.py | py | 2,302 | python | en | code | 122 | github-code | 18 | [
{
"api_name": "nr3d_lib.fmt.log.info",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "nr3d_lib.fmt.log",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "torch.nn.Module",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "torch.nn"... |
15555350296 | import time
from zeroconf import ServiceBrowser, Zeroconf, ServiceStateChange
from resources.lib.model.mdnscomputer import MdnsComputer
class DiscoveryAgent(object):
service_type = '_nvstream._tcp.local.'
def __init__(self):
self.available_hosts = {}
self.zeroconf = None
self.browser... | wackerl91/luna | resources/lib/nvhttp/mdns/discoveryagent.py | discoveryagent.py | py | 1,009 | python | en | code | 98 | github-code | 18 | [
{
"api_name": "zeroconf.ServiceStateChange.Added",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "zeroconf.ServiceStateChange",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "zeroconf.get_service_info",
"line_number": 17,
"usage_type": "call"
... |
27865454891 | import argparse
import os
import sys
from yacs.config import CfgNode as CfgNode
# Global config object
_C = CfgNode()
# Example usage:
# from core.config import cfg
cfg = _C
_C.MODEL_NAME = ""
# ------------------------------------------------------------------------------------ #
# Model options
# ------------... | sungonce/CVNet | core/config.py | config.py | py | 3,998 | python | en | code | 148 | github-code | 18 | [
{
"api_name": "yacs.config.CfgNode",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "yacs.config.CfgNode",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "yacs.config.CfgNode",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "yacs.confi... |
27286155324 | """
Module for Process Manager class
"""
from typing import List
from random import choice
from app.request import Request
from app.process import Process
from app.election import ElectionInterface
class ProcessManager:
"""
ProcessManager class
"""
def __init__(self, election_algotithm) -> None:... | thomas-michels/BullyAlgorithm | app/process_manager/process_manager.py | process_manager.py | py | 3,430 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "app.election.ElectionInterface",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "typing.List",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "app.process.Process",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "typing... |
1788998223 | import time
import io
import re
from autom_labeling_library.knowledge_base import WikiDataNameExtraction, WikiDataExtractor
from .memory import Memory, ExtractionEntryState
from .status import Status
from .util import try_method_return_json, create_tokenizer
from flask import (
Blueprint, flash, g, redirect, rend... | uds-lsv/anea | server/knowledge_base.py | knowledge_base.py | py | 15,861 | python | en | code | 17 | github-code | 18 | [
{
"api_name": "flask.Blueprint",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "re.compile",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "re.compile",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "flask.redirect",
"line_numb... |
36049069734 | #!/usr/bin/env python3
# bwDB - CRUD library for sqlite 3
#அச்சிடு வரையறு - பின் வரும் நிரல்களில் அச்சிடு பயன்படுத்தலாம்.
def அச்சிடு(*வாதங்கள்,பிரி=" ",முடி='\n',கோப்பு=None,பறிப்பு=False):
print(*வாதங்கள், sep=பிரி,end=முடி, file=கோப்பு,flush=பறிப்பு)
# உள்ளீடு வரையறு - பின் வரும் நிரல்களில் அச்சிடு பய... | TamilNeram/python | 0018/bwDB.py | bwDB.py | py | 8,903 | python | ta | code | 2 | github-code | 18 | [
{
"api_name": "sqlite3.connect",
"line_number": 186,
"usage_type": "call"
},
{
"api_name": "sqlite3.Row",
"line_number": 187,
"usage_type": "attribute"
}
] |
32077018323 | # pyright: strict
from dataclasses import dataclass, InitVar
from ...refdata import Assumptions
from ...agri2018.a18 import A18
from .energy_change_agri import EnergyChangeAgri
@dataclass(kw_only=True)
class EnergyChangePOperationElecElcon(EnergyChangeAgri):
demand_biomass: float = 0
demand_change: float =... | GermanZero-de/localzero-generator-core | src/climatevision/generator/agri2030/energy_demand/energy_change_p_operation_elec_elcon.py | energy_change_p_operation_elec_elcon.py | py | 1,089 | python | en | code | 6 | github-code | 18 | [
{
"api_name": "energy_change_agri.EnergyChangeAgri",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "dataclasses.InitVar",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "refdata.Assumptions",
"line_number": 20,
"usage_type": "name"
},
{
"api_n... |
42543278325 | from mrjob.job import MRJob
class MRWordFrequencyCount(MRJob):
def mapper(self, _, line):
user,movie,cal,gender,date = line.split(',')
yield movie, (user ,float(cal))
def reducer(self, movie, values):
l = list(values)
pro = sum([x[1] for x in l])/len(l)
yiel... | anas122/TopicosTelematica | Laboratorio5/5-3/peliculas4.py | peliculas4.py | py | 459 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "mrjob.job.MRJob",
"line_number": 3,
"usage_type": "name"
}
] |
41926044450 | from django.conf.urls import url
from . import views
from django.contrib.auth import views as auth_views
app_name = 'shop'
urlpatterns = [
url(r'^products/$', views.product_list, name='product_list'),
url(r'^(?P<category_slug>[-\w]+)/$', views.product_list, name='product_list_by_category'),
url(r'^(?P<id>... | Mugerwa-Joseph/FarmersMarket | shop/urls.py | urls.py | py | 597 | python | en | code | 3 | github-code | 18 | [
{
"api_name": "django.conf.urls.url",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "django.conf.urls.url",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "django.conf.urls.url",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "django.c... |
26471058254 |
from channels.testing import WebsocketCommunicator
from channels.db import database_sync_to_async
from django.contrib.auth import get_user_model
from rest_framework_simplejwt.tokens import AccessToken
from dishesz.asgi import application
import pytest
TEST_CHANNEL_LAYERS = {
'default': {
'BACKEND':... | pdatta1/dishesz_backend | dishesz/notify/tests/test_websocket.py | test_websocket.py | py | 2,366 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "django.contrib.auth.get_user_model",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "rest_framework_simplejwt.tokens.AccessToken.for_user",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "rest_framework_simplejwt.tokens.AccessToken",
"line_n... |
13451385623 | import requests
from bs4 import BeautifulSoup
import csv
from selenium import webdriver
import time
# Лишняя фигня, тыкает по порядку на цифры
""" n = 2
while n > 0:
browser.find_element_by_link_text('{}'.format(n)).click()
n = n + 1 """
base_url = 'https://old.cbr.ru/press/month_archive/?'
... | askerovfuat/Central-Bank-Information-Policy | press_parser.py | press_parser.py | py | 751 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "requests.get",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 26,
"usage_type": "call"
}
] |
26777955140 | from django.db import models
from django.contrib.auth.models import User
class Security(models.Model):
ticker = models.CharField(max_length = 100)
company_name = models.CharField(max_length = 255)
def __str__(self):
return self.company_name
class Portfolio(models.Model):
portfolio_name = models.CharField(max_... | caveatemptors-2015/special-garbanzo | project/portfolioX/models.py | models.py | py | 904 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "django.db.models.Model",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "django.db.models",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "django.db.models.CharField",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "... |
41946270554 | import os
import socket
import subprocess
import sys
import time
import shlex
import netifaces
def get_hamachi_ip():
interfaces = netifaces.interfaces()
for interface in interfaces:
addresses = netifaces.ifaddresses(interface).get(netifaces.AF_INET)
if addresses:
for addr_info in... | qwertzuiii/cmd-remotecontrol | source/server/server.py | server.py | py | 3,272 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "netifaces.interfaces",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "netifaces.ifaddresses",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "netifaces.AF_INET",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "sub... |
4888322147 | from django.shortcuts import render
from django.http import HttpResponse, HttpResponseRedirect
from django.urls import reverse
from .forms import ReportForm
from .models import Event, Rsvp, User, GroupUser, Egroup, Report, ReportPhoto
def event(request, id):
context = {'login': False}
if 'username' not in request.se... | bl1861/cookzilla | event/views.py | views.py | py | 3,555 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "django.http.HttpResponseRedirect",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "django.urls.reverse",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "models.Event.objects.get",
"line_number": 15,
"usage_type": "call"
},
{
"api... |
73252423720 | import torch
import torch.nn.functional as F
import torch.optim as optim
import pickle as pkl
import os
import time
import gzip
import numpy as np
import torch.optim as optim
from dataset.reddit_user_dataset import RedditUserDataset
from argparse import ArgumentParser
import datetime
import time
from os.path import ... | caisa-lab/FACTOID-dataset | src/training_graph.py | training_graph.py | py | 13,903 | python | en | code | 13 | github-code | 18 | [
{
"api_name": "torch.bincount",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "tqdm.tqdm",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "torch.mean",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "torch.cat",
"line_number": 55... |
37649130152 | import logging
import logging.config
import sys
LOGGER_CONFIG = {
"version": 1,
"disable_existing_loggers": False,
"loggers": {
"ntpc_tad_bot.root": {"level": "INFO", "handlers": ["console"]},
"ntpc_tad_bot.error": {
"level": "INFO",
"handlers": ["error_console"],
... | DoubleChuang/New-Taipei-City-Traffic-Adjudication-Office-Bot | ntpc_tad_bot/logger.py | logger.py | py | 1,103 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "sys.stdout",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "sys.stderr",
"line_number": 26,
"usage_type": "attribute"
},
{
"api_name": "logging.config.dictConfig",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "logging.con... |
36792620606 | from typing import Set
class Node:
def __init__(self, head: int) -> None:
self.head = head
self.left = None
self.right = None
def insert(self, data: int) -> None:
if self.head > data:
if self.left:
self.left.insert(data)
else:
... | klaudiagadek/simple_tasks | tasks/get_distance.py | get_distance.py | py | 1,592 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "typing.Set",
"line_number": 23,
"usage_type": "name"
}
] |
28592403008 | import shapely
from shapely.geometry import Point, LineString, Polygon, MultiPoint, MultiLineString, MultiPolygon, GeometryCollection
from shapely import wkt
import matplotlib.pyplot as plt
# Gegebene WKT-Objekte
wkt_objects = [
"POINT(0 0)",
"LINESTRING(0 0,1 1,1 2)",
"POLYGON((0 0,4 0,4 4,0 4,0 0),(1 1, ... | jashano/uebungen | Kapitel09/uebung9.py | uebung9.py | py | 1,964 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "shapely.wkt",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "shapely.wkt.loads",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "shapely.wkt",
"line_number": 18,
"usage_type": "argument"
},
{
"api_name": "matplotlib.pyplot.figur... |
21770754168 | """
Surface plot
=============
"""
import matplotlib.pyplot as plt
import pyant
beam = pyant.models.Cassegrain(
azimuth=0,
elevation=90.0,
frequency=930e6,
I0=10**4.81,
outer_radius=40.0,
inner_radius=23.0,
degrees=True,
)
pyant.plotting.gain_surface(beam, resolution=301, min_elevation=85.... | danielk333/pyant | examples/plot_gain_surface.py | plot_gain_surface.py | py | 335 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "pyant.models.Cassegrain",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "pyant.models",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "pyant.plotting.gain_surface",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "p... |
31358027149 | import matplotlib
from matplotlib import pyplot as plt
from shannon import createDataSet
from decision_tree import createTree
zhFontPath = matplotlib.font_manager.FontProperties(fname="SourceHanSansSC-Normal.otf") # 引入中文
"""
树的字符串表达形式:
{'纹理': {0: 0, 1: {'触感': {0: 0, 1: 1}}, 2: {'根蒂': {0: 1, 1: {'色泽': {1: 1, 2: {'触感'... | RenGeJiaYou/Study-Notes-on-Data-Mining-and-Machine-Learning | decisionTree/plot_decision_tree.py | plot_decision_tree.py | py | 5,686 | python | zh | code | 0 | github-code | 18 | [
{
"api_name": "matplotlib.font_manager.FontProperties",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "matplotlib.font_manager",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "matplotlib.pyplot.figure",
"line_number": 114,
"usage_type": "call"
}... |
40490375233 | import numpy as np
import matplotlib.pyplot as plt
from sklearn.decomposition import PCA
def draw_vector(v0, v1, ax=None, color='r'):
ax1 = ax or plt.gca()
arrowprops = dict(arrowstyle='->',
linewidth=2,
shrinkA=0, shrinkB=0, color=color)
ax1.annotate(... | JooYongLee/vtk_tutorial | pca_implmentation.py | pca_implmentation.py | py | 3,541 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "matplotlib.pyplot.gca",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "matplotlib.pyplot.figure",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "matplo... |
39132519726 | #!/usr/bin/env python
import torch
import torch.nn as nn
class Model(nn.Module):
def __init__(self):
super(Model, self).__init__()
self.conv1 = nn.Sequential(
nn.Conv2d(in_channels = 1, out_channels = 16, kernel_size = 5, stride = 1, padding = 2),
nn.ReLU(),
... | WorldWideWest/MNIST | model.py | model.py | py | 795 | python | en | code | 2 | github-code | 18 | [
{
"api_name": "torch.nn.Module",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "torch.nn.Sequential",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line_... |
26079232924 | import requests, re, json, os
def GET_TUAN_ID():
m, n = 5, 5
while m:
# 基于 178 大佬的 activeId.py 改写,感谢大佬!
url = 'https://wqsd.jd.com/pingou/dream_factory/index.html'
r = requests.get(url)
if r.ok:
resp = r.text
TUAN_ACTIVEID = re.findall('((?<=.)activeId.*... | Waikkii/gd | activity/activeID.py | activeID.py | py | 3,964 | python | en | code | 5 | github-code | 18 | [
{
"api_name": "requests.get",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "re.findall",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "re.sub",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "requests.post",
"line_number": 79,
... |
22471746555 | import json
from os import name
from asgiref.sync import async_to_sync
from channels.generic.websocket import WebsocketConsumer
from datetime import datetime
from .views import *
class ChatConsumer(WebsocketConsumer):
def connect(self):
print("CONNECTED NOTIF")
self.room_name = self.scope['url_rou... | Aminos-dos/Backend-django-projet-android | message/consumers_notif.py | consumers_notif.py | py | 4,467 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "channels.generic.websocket.WebsocketConsumer",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "asgiref.sync.async_to_sync",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "asgiref.sync.async_to_sync",
"line_number": 26,
"usage_type": "cal... |
35735657663 | import pandas as pd
import numpy as np
import argparse
from pathlib import Path
import statsmodels.api as sm
from pprint import pprint
from patsy import dmatrices
from scipy import stats
from io import StringIO
from python.helper.io_helper import write_to_csv_from_list_of_dict
from python.config.config import pro_data... | zhaojuanwendy/ConceptWAS | python/conceptWAS.py | conceptWAS.py | py | 10,654 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "pandas.crosstab",
"line_number": 47,
"usage_type": "call"
},
{
"api_name": "scipy.stats.fisher_exact",
"line_number": 50,
"usage_type": "call"
},
{
"api_name": "scipy.stats",
"line_number": 50,
"usage_type": "name"
},
{
"api_name": "pandas.crosstab"... |
27343818071 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function
from past.builtins import basestring
from builtins import str
from builtins import object
import wx
import wx.lib.scrolledpanel as scrolled
import wx.lib.agw.flatnotebook as fnb
import platform
import re
import copy
... | soheilbr82/BluegrassWorkingMemory | Python_Engine/Lib/site-packages/psychopy/app/preferencesDlg.py | preferencesDlg.py | py | 22,003 | python | en | code | 5 | github-code | 18 | [
{
"api_name": "psychopy.localization._translate",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "psychopy.localization._translate",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "psychopy.localization._translate",
"line_number": 32,
"usage_type": "ca... |
26782616914 | import string
import pytest
import random
from selene import be, have
from selene.support.shared import browser
@pytest.fixture
def browser_open():
browser.open('https://google.com')
browser.driver.maximize_window()
def test_successful_search(browser_open):
browser.element('[name="q"]').should(be.blank)... | mxchgeCode/qa_guru_python_5_2 | test_google_should_find_selene.py | test_google_should_find_selene.py | py | 820 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "selene.support.shared.browser.open",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "selene.support.shared.browser",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "selene.support.shared.browser.driver.maximize_window",
"line_number": 11,
... |
39397057016 | import requests
from bs4 import BeautifulSoup
import json
from dotenv import load_dotenv
import os
import pymongo
import boto3
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.common.by import By
from seleniumwire import webdriver
from webdriver_manager.chrome import ChromeDriverManager
fro... | romallen/jse-stock-scraper | etl-sel.py | etl-sel.py | py | 7,424 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "dotenv.load_dotenv",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "boto3.resource",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "requests.Session",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "seleniumwire.webdr... |
22913845363 | import time
import argparse
import logging
from joblib import Parallel, delayed
import anonygraph.utils.runner as rutils
import anonygraph.utils.data as dutils
import anonygraph.utils.path as putils
import anonygraph.time_graph_generators as generators
import anonygraph.constants as constants
logger = logging.getLogg... | tuhoag/sequential-anonygraph | generate_raw_subgraph.py | generate_raw_subgraph.py | py | 4,841 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "logging.getLogger",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "anonygraph.utils.runner.add_data_argument",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "anonygraph.utils.runner",
"line_number": 16,
"usage_type": "name"
},
{
... |
33536421341 | """
Tests of the logic that handles the ``requires-python`` field.
"""
import pytest
from packaging.specifiers import SpecifierSet
@pytest.mark.parametrize(
"specifiers",
[
# Test common version constraints that are likely to occur in practice.
# It's definitely overkill to test all of these... | diazona/setuptools-pyproject-migration | tests/test_requires_python.py | test_requires_python.py | py | 1,541 | python | en | code | 7 | github-code | 18 | [
{
"api_name": "packaging.specifiers.SpecifierSet",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "packaging.specifiers.SpecifierSet",
"line_number": 44,
"usage_type": "call"
},
{
"api_name": "pytest.mark.parametrize",
"line_number": 10,
"usage_type": "call"
}... |
27368711325 | import pandas as pd
import torch
import torch.backends.cudnn as cudnn
import torch.utils.data
import torch.nn.functional as F
from scripts.dataset import RawDataset, AlignCollate
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
def odometer_reader(opt, model, converter):
""" model configuratio... | sumitkutty/odometer-reader | ocr.py | ocr.py | py | 2,171 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "torch.device",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "torch.cuda.is_available",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "torch.cuda",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "pandas.DataFrame",
... |
37562676241 | import json
class StockMessageDao:
GraphLocation = None
ModelConfidence = None
def __init__(self, graph_filepath, confidence):
self.ModelConfidence = confidence
self.GraphLocation = graph_filepath
def toJSON(self):
return json.dumps(self, default=lambda o: o.__dict__,
... | JSDale/COM624_Assignment | PythonBackend/src/MessageBroker/StockMessageDao.py | StockMessageDao.py | py | 366 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "json.dumps",
"line_number": 14,
"usage_type": "call"
}
] |
29474185091 | __author__ = 'marczis'
import socket
import cPickle
import time
import logging
import asynchat
from Config import Config
class Worker(asynchat.async_chat):
def __init__(self):
asynchat.async_chat.__init__(self)
self.data = []
self.logonce = True
self.scheduler = (Config.get("Networ... | marczis/Python-Website-checker | WebChecker/worker.py | worker.py | py | 1,506 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "asynchat.async_chat",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "asynchat.async_chat.__init__",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "asynchat.async_chat",
"line_number": 12,
"usage_type": "attribute"
},
{
"ap... |
38806445987 | # When a single resource needs to be shared between multiple processes, a Lock can be used
# to avoid conflicting accesses.
import multiprocessing
import sys
def worker_with(lock, stream):
with lock:
stream.write('Lock acquired via with\n')
def worker_no_with(lock, stream):
lock.acquire()
try:
... | yeboahd24/Python201 | PYTHON LIBRARY/SUB_8/multiprocessing_lock.py | multiprocessing_lock.py | py | 684 | python | en | code | 2 | github-code | 18 | [
{
"api_name": "multiprocessing.Lock",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "multiprocessing.Process",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "sys.stdout",
"line_number": 24,
"usage_type": "attribute"
},
{
"api_name": "multipro... |
16982763902 | from datetime import date
class Solution:
def dayOfTheWeek(self, day: int, month: int, year: int) -> str:
hash_t = {
0: "Monday",
1: "Tuesday",
2: "Wednesday",
3: "Thursday",
4: "Friday",
5: "Saturday",
6: "Sunday"
... | dyhliang/Leetcode | 1185-day-of-the-week/1185-day-of-the-week.py | 1185-day-of-the-week.py | py | 388 | python | en | code | 2 | github-code | 18 | [
{
"api_name": "datetime.date",
"line_number": 16,
"usage_type": "call"
}
] |
27949495775 |
# Import necessary libraries
from PIL import Image
import math
# Define function to calculate the difference between two images
def image_difference(image1, image2):
# Open images
img1 = Image.open(image1)
img2 = Image.open(image2)
# Get image sizes
width, height = img1.size
# Calculate the... | zhao50632/codes | compimg.py | compimg.py | py | 1,131 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "PIL.Image.open",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "PIL.Image",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "PIL.Image.open",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "PIL.Image",
"line_number": ... |
71900971879 | import json
from ...infrastructure.firestore import Criteria, Filter, Operator
def filters_controller(params: str):
criteria = Criteria(
filters=[Filter(field='deleted_at', operator=Operator.EQUAL, value=None)])
try:
_filters = json.loads(params["filters"])
for filter_item in _filters:... | ararcos/login-google-javascript | desk_reservation/shared/infrastructure/controllers/filters_controller.py | filters_controller.py | py | 531 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "infrastructure.firestore.Criteria",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "infrastructure.firestore.Filter",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "infrastructure.firestore.Operator.EQUAL",
"line_number": 7,
"usage_type":... |
73594840041 | import array
import itertools
import colorsys
import operator
import threading
import random
from ola.ClientWrapper import ClientWrapper
def DmxSent(state):
if not state.Succeeded():
sys.exit(1)
def SendDMXFrame():
wrapper.AddEvent(tick_interval, SendDMXFrame)
datas = []
for rng in rngs:
... | aleden/squidlights | changers/Random.py | Random.py | py | 948 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "array.array",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "random.randint",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "random.randint",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "random.randint",
"line_... |
12216589714 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('wagtailcore', '0015_add_more_verbose_names'),
('revolv_cms', '0025_auto_20151018_2331'),
]
operations = [
migrations... | calblueprint/revolv | revolv/revolv_cms/migrations/0026_sharethissettings.py | 0026_sharethissettings.py | py | 933 | python | en | code | 29 | github-code | 18 | [
{
"api_name": "django.db.migrations.Migration",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "django.db.migrations",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "django.db.migrations.CreateModel",
"line_number": 15,
"usage_type": "call"
},
... |
38805743897 | #!usr/bin/env/python3
from pprint import pprint
import logging
from pprint import pformat
#To format a data structure without writing it directly to a stream (for example, for logging),
#use pformat() to build a string representation
data = [
(1, {'a': 'A', 'b': 'B', 'c': 'C', 'd': 'D'}),
(2, {'e': 'E', '... | yeboahd24/Python201 | PYTHON LIBRARY/SUB_1/pprint_data.py | pprint_data.py | py | 740 | python | en | code | 2 | github-code | 18 | [
{
"api_name": "logging.basicConfig",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "logging.DEBUG",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "logging.debug",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "pprint.pformat",... |
1335388903 | """
Используя данные json файла, формирует новый, добавляя номер к каждому из продуктов, и скачивая картинки
по ссылкам из исходного файла. Новый json и картинки к нему сохраняем в папку products
"""
import json
import urllib.request
import os
final_data = []
with open('hobbygames_products2.json', 'r', encoding='utf-... | Schtirlitz80/hobbygames_by_scraper | picture_parser_2.py | picture_parser_2.py | py | 2,145 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "json.load",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 24,
"usage_type": "attribute"
},
{
"api_name": "os.path.exists",
"line_number... |
8104833078 | import requests
endpoint = 'http://localhost:8000/api/v1/dataProcessor/logEntry'
dataEntries = {
"safe":
{
"name": "Device1",
"salinity": 1,
"sampleDepth": 1,
"waterTemp": 3,
},
"moderate":
{
"name": "Device2",
"salinity": 1000,
"sampleDepth": 3,
"waterTemp": 120,
... | jmho/algaeattack | back-end/src/util/simulatedDeviceSender.py | simulatedDeviceSender.py | py | 564 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "requests.post",
"line_number": 30,
"usage_type": "call"
}
] |
9994447870 | import cv2
from pyzbar import pyzbar
from tkinter.messagebox import showinfo
found = set()
capture = cv2.VideoCapture(0)
PATH = "test.csv"
while True:
ret, frame = capture.read()
test = pyzbar.decode(frame)
for tests in test:
testData = tests.data.decode('utf-8')
showinfo("找到", testData)
... | james12357/untitled33 | codeTest/var1.py | var1.py | py | 424 | python | en | code | 2 | github-code | 18 | [
{
"api_name": "cv2.VideoCapture",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "pyzbar.pyzbar.decode",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "pyzbar.pyzbar",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "tkinter.messagebox.s... |
22644928855 | import sys, time, json, socket
import dht
import network
import urequests as requests
from machine import Pin, I2C
from ntptime import settime
import BME280
import onewire, ds18x20
import config
# Load the LCD modules if needed
if config.LCD:
from lcd_api import LcdApi
from i2c_lcd import I2cLcd
def star... | normcyr/maple-sap-vacuum-controller | main.py | main.py | py | 8,402 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "config.LCD",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "config.AP_SSID",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "config.AP_PWD",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "network.WLAN",... |
24758149638 | #######################################################
# Assunto: Extração dos dados do DEEZER SERVICO MUSICA
# Autor : Eduardo Alberto
# Data : 11/04/2021
#######################################################
import json, requests
import pandas as pd
from cassandra.cluster import Cluster
from tqdm import tqdm
# ... | EduardoAlberto/scripts | etl20_PipelineDeezeAlbum.py | etl20_PipelineDeezeAlbum.py | py | 816 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "cassandra.cluster.Cluster",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "tqdm.tqdm",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "pandas.json_normaliz... |
22763458322 | from collections import deque
def solution():
n = int(input())
previous = list(map(int, input().split()))
graph = [[] for i in range(n+1)]
indegree = [0] * (n+1)
for i in range(0, n):
cur_team = previous[i]
indegree[cur_team] = i
for j in range(i+1, n):
graph[p... | philhoonoh/boostcamp_coding_test_study | 7_graph_algorithms/0_acmicpc/1_최종 순위.py | 1_최종 순위.py | py | 1,633 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "collections.deque",
"line_number": 31,
"usage_type": "call"
}
] |
31532476249 | # -*- coding: utf-8 -*-
# API
# FileName: response.py
# Version: 1.0.0
# Create: 2018-10-18
# Modify: 2018-10-18
try:
from django.http import HttpResponse
except (ImportError, SyntaxError):
pass
from . import util
from . import default
class FormatType:
"""
XML: <key><![CDATA[value]]><... | imhele/django-example | act/response.py | response.py | py | 1,471 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "django.http.HttpResponse",
"line_number": 51,
"usage_type": "call"
}
] |
9152690302 | # -*-coding:utf-8 -*-
__author__ = 'Fog'
__date__ = '2019/4/29 上午10:02'
from flask import Flask, g
import json
from db import RedisClient
app = Flask(__name__)
def get_conn():
if not hasattr(g, 'redis'):
g.redis = RedisClient()
return g.redis
@app.route('/')
def index():
return '<h2>hello</... | facesun/proxies | proxies/api.py | api.py | py | 819 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "flask.Flask",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "flask.g",
"line_number": 16,
"usage_type": "argument"
},
{
"api_name": "flask.g.redis",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "flask.g",
"line_number... |
74458497001 | from flask import Blueprint, render_template, request, current_app, redirect, url_for
from app import user_manager, db
from app.startup.forms import ProfileForm, ProjectForm, ServiceCustom
from app.models import User, Gender, Project, Industry, FinancingMode, CompanyPhase, UserType, File, ServiceItem, Phase, ProjectPha... | cash2one/APL | APL2/app/startup/__init__.py | __init__.py | py | 13,520 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "flask.Blueprint",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "app.startup.forms.ProfileForm",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "app.user_manager.current_user",
"line_number": 21,
"usage_type": "attribute"
},
{
"... |
38485647518 | import os
import shutil
from rich import print
from rich.table import Table
from rich.console import Console
from rich.progress import Progress, track
import requests
import datetime
import time
from retry import retry
import threading
import json
import img2pdf
from PyPDF4 import PdfFileMerger, PdfFileReader
import ha... | Armo00/bilibili-manga-downloader | main.py | main.py | py | 12,159 | python | en | code | 70 | github-code | 18 | [
{
"api_name": "rich.console.Console",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.fromtimestamp",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_n... |
2292781495 | import os, glob
import cv2
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
def main():
target_folder = "D:/Research/ModeTransformation/Data/2019_02_19/I1060/cropped/"
file_mask = "I1060P140A*_0*" #"I0000A*P040*"
file_extension = ".tif"
results_folder = "D:/Research/M... | johnrest/mode_trans | process_images_tif.py | process_images_tif.py | py | 1,203 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "glob.glob",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "cv2.imread",
"line_number": 1... |
21580172880 | import cv2
import json
import os
import logging
from modeling.inference.model_executors.placeholder_model_executor import ArenaPHModel
# Constants used in defining log formatter
YELLOW_COLOR_STRING = '\x1b[38;5;226m'
GREEN_COLOR_STRING = '\x1b[32m'
RESET_COLOR = '\x1b[0m'
class ModelDebugger:
def __init__(self)... | amazon-science/alexa-arena | debugger/model_debugger.py | model_debugger.py | py | 2,446 | python | en | code | 75 | github-code | 18 | [
{
"api_name": "modeling.inference.model_executors.placeholder_model_executor.ArenaPHModel",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "logging.getLogger",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "logging.DEBUG",
"line_number": 19,
"usage_ty... |
19993342055 | """ Advent of Code 2019, Day 02: https://adventofcode.com/2019/day/2 """
from copy import deepcopy
from io import StringIO
from itertools import product
from typing import Iterator, TextIO
import pytest
from advent_of_code.aoc2019.intcode import IntcodeMachine
from advent_of_code.base import Solution
class AocSolut... | brad-eisenhauer/advent-of-code | src/advent_of_code/aoc2019/aoc02.py | aoc02.py | py | 2,428 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "advent_of_code.base.Solution",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "advent_of_code.aoc2019.intcode.IntcodeMachine.read_buffer",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "advent_of_code.aoc2019.intcode.IntcodeMachine",
"line_... |
43373175677 | from typing import Optional
import pymongo
import certifi
from fastapi import Body, FastAPI
from fastapi.encoders import jsonable_encoder
from model.Figurine import PyObjectId
from model.Figurine import Figurine
app = FastAPI()
client = pymongo.MongoClient("mongodb+srv://VENOCKA:Tifoznf027@cluster0.dvj0i.mongodb.net/... | VENOCKA/UnitTest | api/main.py | main.py | py | 1,337 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "fastapi.FastAPI",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "pymongo.MongoClient",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "certifi.where",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "model.Figurine.PyOb... |
43628136665 | from utils.parse import Parser
from itertools import islice, chain, repeat
def partial_sum_chain(data):
current = 0
yield current
for n in data:
current += n
yield current
def calculate_phase(suffix):
partial_chain = partial_sum_chain(reversed(suffix))
digits = [abs(v) % 10 for v... | tranzystorek-io/aoc2019-python | days/d16p2.py | d16p2.py | py | 1,068 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "utils.parse.Parser",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "itertools.chain.from_iterable",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "itertools.chain",
"line_number": 37,
"usage_type": "name"
},
{
"api_name": "iter... |
37363729220 | #!/usr/bin/python3
'''
script that deletes out-of-date archives, using the function do_clean:
'''
from fabric.api import run, env, hosts
env.hosts = ['52.23.184.231', '54.173.122.229']
env.user = 'ubuntu'
def do_clean(number=0):
'''
delete old archive files
'''
if number == 0:
number... | rayraib/AirBnB_clone_v2 | 100-clean_web_static.py | 100-clean_web_static.py | py | 607 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "fabric.api.env.hosts",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "fabric.api.env",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "fabric.api.env.user",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "fabric... |
35411892029 | from django.urls import path
from .views import *
from django.contrib.auth.decorators import login_required
urlpatterns = [
path('userlogin/', userlogin, name='userlogin'),
path('register/', register, name='register'),
path('userlogout/', userlogout, name='userlogout'),
path('dashboard/<int:pk>', logi... | Shubham276/SquareMetres | squaremetres/profiles/urls.py | urls.py | py | 465 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "django.urls.path",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
... |
16226838849 | import cv2
import numpy as np
import time
class Webcam(object):
def __init__(UserGUI):
#print ("WebCamEngine init")
UserGUI.dirname = "" #for nothing, just to make 2 inputs the same
UserGUI.cap = None
def start(UserGUI):
print("[INFO] Start webcam")
time... | ARYAJAYAN08/REAL_TIME_HEART_RATE_MONITORING_SYSTEM | webcam.py | webcam.py | py | 1,317 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "time.sleep",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "cv2.VideoCapture",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "cv2.flip",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "numpy.ones",
"line_number": ... |
32512749831 | import os
from pprint import pprint
import json
import pdb
from source.model_tf_2 import hooknet as HookNet
from train import train
from xmlpathology.batchgenerator.utils import create_data_source
from xmlpathology.batchgenerator.generators import BatchGenerator
from xmlpathology.batchgenerator.core.samplers import La... | sara-nl/parallel-hooknet | main.py | main.py | py | 4,490 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "utils.init_horovod",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "source.model_tf_2.hooknet",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "utils.get_output_size",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "pp... |
22131727870 | import requests
import bs4
import re
import pandas as pd
import numpy as np
import time
import os
class SteamScraper():
def __init__(self, ROOT_DIR):
self.ROOT_DIR = ROOT_DIR
self.all_games_url = "https://store.steampowered.com/search/?term=&ignore_preferences=1&page="
self.cpus = None
... | codencoding/steam-games | src/scraping/scraping.py | scraping.py | py | 9,968 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "requests.get",
"line_number": 81,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 84,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 85,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_nu... |
74817203880 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Apr 11 20:34:33 2017
@author: egidiomarotta
"""
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
import pylab
from Perceptron_UnitStep import Perceptron
## Use same same procedure to import ADALINE and work on it as perceptron (yo... | bodealamu/Data_Science_datasets | Guide_to_Engineering_Data_Science-master/HOMEWORK 6/HW6_irisdataset_Perceptron.py | HW6_irisdataset_Perceptron.py | py | 3,323 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "numpy.where",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.scatter",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 25,
"usage_type": "name"
},
{
"api_name": "matplotlib.py... |
12290833614 | from arduinoStream import Arduino
from datetime import datetime
from analyseStream import loopScreen, initialiseDict
import numpy as np
def initialise():
# filename = 'log.txt'
# file = open(filename, mode='w')
myArd = Arduino()
return myArd
def screen(arduino):
myArd = arduino
dictIden... | igrega348/badge-codename-shaker | readport/readPortStream.py | readPortStream.py | py | 1,105 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "arduinoStream.Arduino",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "analyseStream.initialiseDict",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.now",
"line_number": 17,
"usage_type": "call"
},
{
"api_name... |
17704848761 |
# trainer.py
# helper function to train on epochs
import torch
import torch.nn.functional as func
from utils import saveModel, loadModel, Logger, tryRestore
import time
import sys
from tqdm import tqdm
import csv
import numpy as np
from sklearn.decomposition import IncrementalPCA
class Trainer():
def __init__(s... | shpda/housingprice | code/trainer.py | trainer.py | py | 6,426 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "torch.nn.MSELoss",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line_number": 30,
"usage_type": "attribute"
},
{
"api_name": "utils.tryRestore",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "utils.Logger",
"l... |
70247866921 | import os
import sys
import time
import datetime
try:
import knockadapt
except ImportError:
# This is super hacky, will no longer be necessary after development ends
file_directory = os.path.dirname(os.path.abspath(__file__))
parent_directory = os.path.split(file_directory)[0]
knockoff_directory = parent_directory... | amspector100/adaptexper | degentestv2.py | degentestv2.py | py | 28,099 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "os.path.dirname",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "os.path.abspath",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.path.split",
"line_n... |
15346111335 | '''
author: HAK
time : 10:00 PM, 28/10/2017
'''
from watchdog.events import FileSystemEventHandler
from watchdog.observers import Observer
import time
from INFO_PROVIDER.fileInfo import FILE_INFO
from INFO_PROVIDER.directoryInfo import PATH_INFO_PROVIDER
import subprocess
from colorama import Fore
import requests
imp... | mfaizanmajeed1/SiteManagement | Watch.py | Watch.py | py | 5,173 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "watchdog.events.FileSystemEventHandler",
"line_number": 43,
"usage_type": "name"
},
{
"api_name": "INFO_PROVIDER.directoryInfo.PATH_INFO_PROVIDER",
"line_number": 56,
"usage_type": "call"
},
{
"api_name": "colorama.Fore.LIGHTCYAN_EX",
"line_number": 57,
"us... |
6892834831 | import time
import numpy
import torch
RESO_H = 768
RESO_W = RESO_H // 2
GRID_H = 16
GRID_W = RESO_W // 5
class LineModel(torch.nn.Module):
def __init__(self):
super().__init__()
self.feature_extractor = torch.nn.Sequential(
# 3 x 768 x 384
Conv(3, 12, 5, padding=2),
... | patrick22414/sroie-dev | src/model.py | model.py | py | 5,613 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "torch.nn",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "torch.nn.Sequential",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "torch.nn.Sequential",... |
628693702 | import copy
import numpy as np
from PySide6.QtCore import QItemSelectionModel, QObject, Signal
from PySide6.QtWidgets import (
QComboBox, QLineEdit, QSizePolicy, QTableWidgetItem
)
from hexrd.constants import chargestate
from hexrd.material import Material
from hexrdgui.periodic_table_dialog import PeriodicTabl... | HEXRD/hexrdgui | hexrdgui/material_site_editor.py | material_site_editor.py | py | 14,546 | python | en | code | 22 | github-code | 18 | [
{
"api_name": "hexrd.material.Material.DFLT_U",
"line_number": 28,
"usage_type": "attribute"
},
{
"api_name": "hexrd.material.Material",
"line_number": 28,
"usage_type": "name"
},
{
"api_name": "numpy.pi",
"line_number": 36,
"usage_type": "attribute"
},
{
"api_nam... |
8349962018 | from django.urls import re_path
from user.views import LoginViewSet, UserViewSet
user_detail = UserViewSet.as_view({
'post': 'post',
'get': 'list'
})
urlpatterns = [
re_path(r'^/?$', user_detail, name='user-detail'),
re_path(r'^/(?P<pk>\d+)/?$', UserViewSet.as_view({'get': 'get'}), name='get'),
... | raphaelbn/blog | user/urls.py | urls.py | py | 484 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "user.views.UserViewSet.as_view",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "user.views.UserViewSet",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "django.urls.re_path",
"line_number": 12,
"usage_type": "call"
},
{
"api_name"... |
13453249961 | import toml
import os
import streamlit as st
"""Load environment variables from .streamlit/secrets.toml to os.environ"""
def load_secrets():
if st.secrets:
os.environ.update(st.secrets)
return
try:
with open(".streamlit/secrets.toml") as f:
secrets = toml.load(f)
f... | leshchenko1979/tg_popular_posts | load_env.py | load_env.py | py | 469 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "streamlit.secrets",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "os.environ.update",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "streamlit.secre... |
12528871646 | #!/usr/bin/env python3
import json
import argparse
from jinja2 import Template
"""
make sure to install jinja2 in your python environment:
`pip install jinja2`
example:
./kctf-init.py --template ./terraform/custom_templates/lambda_function.j2 --module_dir ./terraform/modules/lambda_function --output_file ... | rapid-cloud/community | examples/aws/terraform/tools/kctf-init.py | kctf-init.py | py | 1,580 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "json.load",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "jinja2.Template",
"line_number": 35,
"usage_type": "call"
}
] |
72691709160 | # -*- coding: utf-8 -*-
import scrapy
import re
import datetime
from urllib.parse import urljoin
from NBANews.utils.common import get_md5
from NBANews.items import NewsItem, NBAnewsItemLoader
from scrapy_splash import SplashRequest
from scrapy.loader import ItemLoader
class NanewsSpider(scrapy.Spider):
name = 'n... | grubberbin/NBANews_spider | NBANews/NBANews/spiders/nbaNews.py | nbaNews.py | py | 3,447 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "scrapy.Spider",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "scrapy_splash.SplashRequest",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "urllib.parse.urljoin",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "s... |
1903167277 | from pydub import AudioSegment
# from moviepy.video.io.ffmpeg_tools import ffmpeg_extract_subclip
import argparse
import sys, subprocess, math
import time
import os
def crop(times, text, audio_path, audio_save_dir, video_path=None, video_save_dir=None):
"""
Used to crop the audio and video from the time given ... | Debjoy10/preprocess_Merkel | crop.py | crop.py | py | 3,732 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "pydub.AudioSegment.from_wav",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "pydub.AudioSegment",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "subprocess.call",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "argpar... |
11853385742 | import plotDataPoints as pdp
import drawLine as dl
import matplotlib.pyplot as plt
def plotProgresskMeans(X, centroids, previous, idx, K, i):
#PLOTPROGRESSKMEANS is a helper function that displays the progress of
#k-Means as it is running. It is intended for use only with 2D data.
# PLOTPROGRESSKMEANS(X... | arturomp/coursera-machine-learning-in-python | mlclass-ex7-004/mlclass-ex7/plotProgresskMeans.py | plotProgresskMeans.py | py | 1,003 | python | en | code | 57 | github-code | 18 | [
{
"api_name": "plotDataPoints.plotDataPoints",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.scatter",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 20,
"usage_type": "name"
},
{
"api_nam... |
19258366803 | """
.. module:: contacts.models
:synopsis: Contact models module.
Contact models module. A primary design decision was to be inspired by key
abstractions from rfc6350 "vCard Format Specification". In addition to design
reuse, the objective is to be able to import and export data in compliance
with rfc6350.
Thi... | ajaniv/django-contacts | contacts/models.py | models.py | py | 41,144 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "logging.getLogger",
"line_number": 93,
"usage_type": "call"
},
{
"api_name": "python_core_utils.core.class_name",
"line_number": 121,
"usage_type": "call"
},
{
"api_name": "inflection.humanize",
"line_number": 132,
"usage_type": "call"
},
{
"api_nam... |
29618845311 | #!/usr/bin/env python
import requests
import json
import re
from datetime import datetime
from config import dpla_api_key, data_dir
today = datetime.now()
# create request for each disaster, using pagination
def getdata(disasters):
for subject in disasters:
p = 1 # start with first page
siz... | lwrubel/disasterview | dpla.py | dpla.py | py | 1,741 | python | en | code | 10 | github-code | 18 | [
{
"api_name": "datetime.datetime.now",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "config.dpla_api_key",
"line_number": 30,
"usage_type": "name"
},
{
"api_name": "requests.ge... |
74619535398 | import unittest
from mock import MagicMock
from bounded_contexts.central_console.domain_services import control_node_repository
from bounded_contexts.central_console.domain_services import deployment_info_repository
from bounded_contexts.central_console.domain_services import license_repository
from bounded_contexts.... | jpalanco/alienvault-ossim | alienvault-api/alienvault-api-core/tests/unit_tests/test_bounded_contexts/test_central_console/test_domain_services/test_deployment_info_repository.py | test_deployment_info_repository.py | py | 1,886 | python | en | code | 114 | github-code | 18 | [
{
"api_name": "unittest.TestCase",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "mock.MagicMock",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "bounded_contexts.central_console.models.deployment_info.DeploymentInfo",
"line_number": 15,
"usage_... |
25984286611 | from django.dispatch import receiver
from .models import Response
from django.db.models.signals import post_save
from django.core.mail import EmailMultiAlternatives
@receiver(post_save, sender=Response)
def response_created(instance, created, **kwargs):
if not created:
return
email = inst... | Sham-punka/MMO | project/game/signals.py | signals.py | py | 1,761 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "django.core.mail.EmailMultiAlternatives",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "django.dispatch.receiver",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "django.db.models.signals.post_save",
"line_number": 7,
"usage_type": "arg... |
584389326 | import discord
from discord.ext import commands
class Testing(commands.Cog):
""" Testing cog for trying out experimental code. """
def __init__(self, bot):
self._bot = bot
@commands.is_owner()
@commands.command(hidden=True)
async def poke_testing(self, ctx):
""" Utility function to check testing cog is act... | usvimal/Pi-thon | cogs/testing.py | testing.py | py | 1,289 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "discord.ext.commands.Cog",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "discord.ext.commands",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "discord.ext.commands.is_owner",
"line_number": 11,
"usage_type": "call"
},
{
"ap... |
34759023643 | import pandas as pd
import glob
from pathlib import Path
from fpdf import FPDF
filepaths = glob.glob("Invoices/*.xlsx")
for filepath in filepaths:
pdf = FPDF(orientation="P", unit="mm", format="A4")
pdf.add_page()
filename = Path(filepath).stem
invoice_nr = filename.split("-")[0]
invoice_date = fi... | Pawansoni1758/Invoice_generate | main.py | main.py | py | 2,162 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "glob.glob",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "fpdf.FPDF",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "pandas.read_excel",
"line_number":... |
15761326451 | import logging
import os
import psutil
import redis
import signal
import socket
import sys
import threading
from config import REDIS_URL
class HunterAgent(threading.Thread):
def __init__(self, redis_url):
threading.Thread.__init__(self)
self.agent_hostname = socket.gethostname()
self.agen... | hreeder/stacshack17-serverstatus | agent/main.py | main.py | py | 2,477 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "threading.Thread",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "threading.Thread.__init__",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "threading.Thread",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": ... |
12598792813 | from price_stream import read_stream, get_market_hours
from datetime import date, datetime
from strategies.strategyv0 import MyStrategy
from postprocess_times import post_process_csv
import asyncio
import boto3
import csv
import secret_keys
import sys
class MarketStreamer:
def __init__(self):
filename = d... | michaelzrrr/buy-me-dinner | market_streamer.py | market_streamer.py | py | 3,494 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "datetime.date.today",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "datetime.date",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "csv.writer",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "csv.writer",
"line_n... |
26581111606 | from typing import List, Tuple
import cv2
import numpy as np
from src.util import load_yaml
cfg = load_yaml()
def four_point_transform(image, pts):
max_x, max_y = np.max(pts[:, 0]).astype(np.int32), np.max(pts[:, 1]).astype(np.int32)
dst = np.array([
[0, 0],
[image.shape[1] - 1, 0],
... | oq-Yuki-po/craft-tensorflow | src/dataset/score_genetator.py | score_genetator.py | py | 5,041 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "src.util.load_yaml",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "numpy.max",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "numpy.int32",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "numpy.array",
"line_... |
27952301376 | #!/usr/bin/env python
"""
Visualize sequence features
"""
import dnaplotlib as dpl
import matplotlib.pyplot as plt
from matplotlib import gridspec
# Required for drawing shapes
from matplotlib.patches import Polygon
from matplotlib.lines import Line2D
from matplotlib.patheffects import Stroke
import matplotlib.patch... | VoigtLab/dnaplotlib | gallery/sequence_features/sequence_features.py | sequence_features.py | py | 5,600 | python | en | code | 278 | github-code | 18 | [
{
"api_name": "matplotlib.patches.Polygon",
"line_number": 71,
"usage_type": "call"
},
{
"api_name": "matplotlib.patheffects.Stroke",
"line_number": 76,
"usage_type": "call"
},
{
"api_name": "matplotlib.patches.Polygon",
"line_number": 79,
"usage_type": "call"
},
{
... |
24883353079 | ####################################################################################
## AUTOR: CAIO FALCO (DADOS COM CAIO)
## DATA: 12/09/2022
## DESCRICAO: DAG QUE REALIZA CARGA DE ARQUIVOS CSV NO BIGQUERY, GERA UMA TABELA FILTRADA E MOVE OS ARQUIVOS FONTES.
############################################################... | CaioBFalco/dados_com_caio | v_15_gcp/gcp_dag.py | gcp_dag.py | py | 3,492 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "datetime.datetime",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "airflow.DAG",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "airflow.providers.google.cloud.transfers.gcs_to_bigquery.GCSToBigQueryOperator",
"line_number": 37,
"usage_... |
12973474838 | # -*- coding:utf8 -*-
import cv2
from pylab import *
import numpy as np
import matplotlib.pyplot as plt
import pywt
#本程序依赖matplotlib, numpy, scipy,opencv-python等python库
#给图像添加椒盐噪声及高斯噪声
def add_noise(image, method, intensity): #image为图像,method为噪音类型,intensit为噪音强度
if method == "pepper_salt":
#使用随机函数生成... | SvainZhu/Image-Noise-Estimation | noise-estimation/HH coeffient.py | HH coeffient.py | py | 3,354 | python | en | code | 9 | github-code | 18 | [
{
"api_name": "numpy.random.randint",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "numpy.where",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "numpy.random.randi... |
5593812309 | import os
import json
from aubio import source, pitch
from google.cloud import texttospeech
from google.oauth2 import service_account
import ffmpeg
import numpy as np
from scipy.cluster.hierarchy import linkage
from utils import path_in_medialib, NoteTools
class GoogleSpeaker:
FILENAME_MAX_CHARS = 40
FILENA... | nickf12/intonation_studio | is_workers/audio.py | audio.py | py | 7,145 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "os.environ.get",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "os.path.exists",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_num... |
38965379264 | import calendar
from datetime import datetime, timedelta
from telebot.types import Message, CallbackQuery
from app.models import Task
from app.services.tasks import get_tasks_by_week
from ...base import base, callback_query_base
from ...helpers import send_message_private, mark_user
from ...keyboards.inline ... | netbriler/telegram-study-bot | app/bot/handlers/users/homework.py | homework.py | py | 3,465 | python | en | code | 4 | github-code | 18 | [
{
"api_name": "telebot.types.Message",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "helpers.send_message_private",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "loader.bot.message_handler",
"line_number": 14,
"usage_type": "call"
},
{
"api... |
34489789544 | #!/usr/bin/env python
"""
This module parse arbitrary NIAK opt arguments to run a pipeline with the needed inputs
"""
__author__ = 'poquirion'
__version__ = 1.0
import argparse
import os
import re
import sys
#sys.path.append("{}/..".format(os.path.dirname(os.path.realpath(__file__))))
import pyniak.load_pipeline
OP... | bids-apps/niak | util/bin/bids_app.py | bids_app.py | py | 8,100 | python | en | code | 3 | github-code | 18 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "re.sub",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "sys.argv",
"line_number": 49,
"usage_type": "attribute"
},
{
"api_name": "argparse.ArgumentParser"... |
13642448420 | import io
import spacy
import sys
from markdown import markdown
import pytesseract
from PIL import Image
from cnocr import CnOcr
from pypdf import PdfReader
from prompts import Prompt
from core import OCR_LANG, OCR_TYPE, brain
from PyQt6.QtWidgets import QApplication, QMainWindow, QTextBrowser
class OCR():
def __in... | mylamour/IAbot | ocr.py | ocr.py | py | 2,865 | python | en | code | 3 | github-code | 18 | [
{
"api_name": "core.OCR_LANG",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "core.OCR_LANG",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "spacy.load",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "core.OCR_TYPE",
"line_numb... |
10491890741 | import requests
import time
# Telegram Bot API credentials
bot_token = 'YOUR_BOT_TOKEN'
chat_id = 'YOUR_CHAT_ID'
# List of servers to check
servers = [
{'name': 'Server 1', 'url': 'http://server1.com'},
{'name': 'Server 2', 'url': 'http://server2.com'},
{'name': 'Server 3', 'url': 'http://server3.com'}
]
... | jogi-rajeshkumar/Server_Check | server_TTIPL.py | server_TTIPL.py | py | 1,502 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "requests.post",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "requests.ConnectionError",
"line_number": 40,
"usage_type": "attribute"
},
{
"api_name": "time.sleep",... |
70861960359 | # Dictionary.py
# tony schwebach
# 11/8/2020
# notes
import json
import difflib
data = json.load(open("dictdata.json"))
def define(word):
word = word.lower()
if word in data:
return(data[word])
elif word.title() in data:
return(data[word.title()])
elif word.upper() in data:
re... | tonyschwebach/stacksource-python-tutorials | Dictionary.py | Dictionary.py | py | 809 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "json.load",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "difflib.get_close_matches",
"line_number": 22,
"usage_type": "call"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.