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
8407358533
from loguru import logger from sqlite3 import Connection class Repo: def __init__(self, db: Connection): self.db = db def create_schema(self): with open('database/init.sql') as f: script = f.read() self.db.executescript(script) def...
hermanguilliman/boorubot
repo.py
repo.py
py
3,078
python
ru
code
0
github-code
1
[ { "api_name": "sqlite3.Connection", "line_number": 6, "usage_type": "name" }, { "api_name": "loguru.logger.info", "line_number": 27, "usage_type": "call" }, { "api_name": "loguru.logger", "line_number": 27, "usage_type": "name" }, { "api_name": "loguru.logger.debu...
38782292285
import logging import itertools import pytz from parsedatetime import Calendar from tzlocal import get_localzone from .dbmanager import get_lastest_problem_id, Submission from .utils import WebsiteSession LOGGER = logging.getLogger(__name__) class ScraperMeta(type): name = 'Scraper' loaded = {} register...
yehzhang/Show-My-Solutions
show_my_solutions/scrapers.py
scrapers.py
py
5,946
python
en
code
0
github-code
1
[ { "api_name": "logging.getLogger", "line_number": 9, "usage_type": "call" }, { "api_name": "parsedatetime.Calendar", "line_number": 42, "usage_type": "call" }, { "api_name": "utils.WebsiteSession", "line_number": 51, "usage_type": "call" }, { "api_name": "tzlocal....
71721970275
import torch import torch.nn as nn import numpy as np import sys import os sys.path.append(os.path.join(os.getcwd(), "lib")) # HACK add the lib folder from models.backbone_module import Pointnet2Backbone from models.voting_module import VotingModule from models.proposal_module import ProposalModule from models.graph_m...
daveredrum/Scan2Cap
models/capnet.py
capnet.py
py
4,977
python
en
code
89
github-code
1
[ { "api_name": "sys.path.append", "line_number": 7, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 7, "usage_type": "attribute" }, { "api_name": "os.path.join", "line_number": 7, "usage_type": "call" }, { "api_name": "os.path", "line_number": ...
31037849632
from setuptools import setup install_requires = [ # NOTE: Apache Beam tests depend on this library and cannot # currently upgrade their httplib2 version. # Please see https://github.com/googleapis/google-api-python-client/pull/84 "httplib2>=0.9.2,<1dev", "google-auth>=1.16.0", "google-auth-http...
edwinnab/vm-network-migration
setup.py
setup.py
py
724
python
en
code
null
github-code
1
[ { "api_name": "setuptools.setup", "line_number": 18, "usage_type": "call" } ]
72143448995
import datetime from typing import Any, Dict, List, Type, TypeVar, Union import attr from dateutil.parser import isoparse from ..types import UNSET, Unset T = TypeVar("T", bound="PatchedPipelineInvocation") @attr.s(auto_attribs=True) class PatchedPipelineInvocation: """Dynamically removes fields from serialize...
caltechads/brigid-api-client
brigid_api_client/models/patched_pipeline_invocation.py
patched_pipeline_invocation.py
py
2,948
python
en
code
0
github-code
1
[ { "api_name": "typing.TypeVar", "line_number": 9, "usage_type": "call" }, { "api_name": "typing.Union", "line_number": 17, "usage_type": "name" }, { "api_name": "types.Unset", "line_number": 17, "usage_type": "name" }, { "api_name": "types.UNSET", "line_number...
4474715554
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sat Jan 2 13:44:25 2021 @author: Scott T. Small This module demonstrates documentation as specified by the `NumPy Documentation HOWTO`_. Docstrings may extend over multiple lines. Sections are created with a section header followed by an underline of equal...
stsmall/abc_scripts2
project/stat_modules/popstats.py
popstats.py
py
6,127
python
en
code
3
github-code
1
[ { "api_name": "numpy.float", "line_number": 37, "usage_type": "call" }, { "api_name": "numpy.sum", "line_number": 38, "usage_type": "call" }, { "api_name": "numpy.sum", "line_number": 39, "usage_type": "call" }, { "api_name": "numpy.float", "line_number": 43, ...
24858642559
# -*- coding: utf-8 -*- import datetime from django.core.paginator import Paginator from django.shortcuts import render, get_object_or_404 from blogs.models import Post def index(request): posts = Post.objects.filter(visible=True).order_by('-created') try: page = int(request.GET.get('page')) ex...
wd5/abakron
abakron/apps/blogs/views.py
views.py
py
681
python
en
code
0
github-code
1
[ { "api_name": "blogs.models.Post.objects.filter", "line_number": 11, "usage_type": "call" }, { "api_name": "blogs.models.Post.objects", "line_number": 11, "usage_type": "attribute" }, { "api_name": "blogs.models.Post", "line_number": 11, "usage_type": "name" }, { ...
71602513635
# -*- coding: utf-8 -*- """ Converts the Microsoft Band GPS data to the open GPX format. WORK IN PROGRESS """ import json from pprint import pprint import re import matplotlib.pyplot as plt import seaborn as sea import datetime as dt import matplotlib.dates as dates import argparse import isodate import itertools as...
cryptogramber/Microsoft-Band-Utils
Band-Data-Analysis/ConvertBandGPX.py
ConvertBandGPX.py
py
9,152
python
en
code
1
github-code
1
[ { "api_name": "re.search", "line_number": 26, "usage_type": "call" }, { "api_name": "re.search", "line_number": 27, "usage_type": "call" }, { "api_name": "re.search", "line_number": 28, "usage_type": "call" }, { "api_name": "re.sub", "line_number": 41, "us...
73498023712
import setuptools from ast import literal_eval name = 'asterion' with open(f'{name}/version.py') as file: # Assuming version.py follows format __version__ = '<version_string>' line = file.readline().strip() version = literal_eval(line.split(' = ')[1]) description = 'Fits the asteroseismic helium-II ionis...
alexlyttle/asterion
setup.py
setup.py
py
1,415
python
en
code
0
github-code
1
[ { "api_name": "ast.literal_eval", "line_number": 9, "usage_type": "call" }, { "api_name": "setuptools.find_packages", "line_number": 14, "usage_type": "call" }, { "api_name": "setuptools.setup", "line_number": 35, "usage_type": "call" } ]
16819999895
from requests import Session from requests.structures import CaseInsensitiveDict class BaseSession(Session): def __init__(self, driver_cookie: dict): super().__init__() self.verify = False self.headers = CaseInsensitiveDict( {'Content-Type': 'application/x-www-form-urlencoded'...
fonbeauty/developer_portal
common/sessions.py
sessions.py
py
408
python
en
code
0
github-code
1
[ { "api_name": "requests.Session", "line_number": 5, "usage_type": "name" }, { "api_name": "requests.structures.CaseInsensitiveDict", "line_number": 10, "usage_type": "call" } ]
26554305585
"""Module containing the classes Contingency and ContingencyType.""" from enum import unique, Enum from copy import deepcopy from collections import defaultdict import logging from typing import Any, Callable, Set as TgSet, Dict, List, Optional from rxncon.core.effector import Effector, StructEquivalences, QualSpec,...
rxncon/rxncon
rxncon/core/contingency.py
contingency.py
py
9,032
python
en
code
9
github-code
1
[ { "api_name": "logging.getLogger", "line_number": 17, "usage_type": "call" }, { "api_name": "enum.Enum", "line_number": 21, "usage_type": "name" }, { "api_name": "enum.unique", "line_number": 20, "usage_type": "name" }, { "api_name": "rxncon.core.reaction.Reaction...
29876622273
#!/usr/bin/env python import os import sys import re try: from setuptools import setup setup except ImportError: from distutils.core import setup setup if sys.argv[-1] == "publish": os.system("python setup.py sdist upload") sys.exit() # Handle encoding major, minor1, minor2, release, serial =...
jpdeleon/exoplanet_class
simfit_master/setup.py
setup.py
py
1,456
python
en
code
0
github-code
1
[ { "api_name": "setuptools.setup", "line_number": 8, "usage_type": "name" }, { "api_name": "distutils.core.setup", "line_number": 11, "usage_type": "name" }, { "api_name": "sys.argv", "line_number": 13, "usage_type": "attribute" }, { "api_name": "os.system", "l...
413504280
# pylint: disable=W0621,C0114,C0116,W0212,W0613 import pathlib from typing import Optional import pytest from dae.testing.foobar_import import foobar_gpf from dae.studies.study import GenotypeData from dae.testing import setup_pedigree, setup_vcf, vcf_study from dae.utils.regions import Region from dae.genotype_stora...
iossifovlab/gpf
dae/tests/integration/study_query_variants/test_allele_frequency.py
test_allele_frequency.py
py
4,279
python
en
code
1
github-code
1
[ { "api_name": "pytest.TempPathFactory", "line_number": 16, "usage_type": "attribute" }, { "api_name": "dae.testing.setup_vcf", "line_number": 19, "usage_type": "call" }, { "api_name": "dae.testing.setup_pedigree", "line_number": 41, "usage_type": "call" }, { "api_...
33499385148
import os import subprocess import sys import uuid import dmake.common as common from dmake.common import DMakeException, SharedVolumeNotFoundException, append_command from dmake.deepobuild import DMakeFile tag_push_error_msg = "Unauthorized to push the current state of deployment to git server. If the repository bel...
Deepomatic/dmake
dmake/core.py
core.py
py
58,937
python
en
code
37
github-code
1
[ { "api_name": "dmake.common.run_shell_command", "line_number": 16, "usage_type": "call" }, { "api_name": "dmake.common", "line_number": 16, "usage_type": "name" }, { "api_name": "os.path.normpath", "line_number": 20, "usage_type": "call" }, { "api_name": "os.path"...
27847975086
from PyQt5.QtWidgets import QWidget, QApplication, QLabel, QSlider, QPushButton, QLineEdit, QGridLayout from PyQt5.QtCore import Qt import sys import serial #The following line is for serial over GPIO port = 'COM3' ard = serial.Serial(port,9600,timeout=5) class Slider_Control(QWidget): def __init__(self...
zlby/Robotic-Arm
control_UI.py
control_UI.py
py
7,319
python
en
code
0
github-code
1
[ { "api_name": "serial.Serial", "line_number": 8, "usage_type": "call" }, { "api_name": "PyQt5.QtWidgets.QWidget", "line_number": 10, "usage_type": "name" }, { "api_name": "PyQt5.QtWidgets.QLabel", "line_number": 15, "usage_type": "call" }, { "api_name": "PyQt5.QtW...
36317609380
# coding=utf-8 """Resources API feature tests.""" __copyright__ = 'Copyright (c) 2020, Utrecht University' __license__ = 'GPLv3, see LICENSE' from pytest_bdd import ( given, parsers, scenarios, then, ) from conftest import api_request scenarios('../../features/api/api_resources.feature') @given(...
peer35/irods-ruleset-uu
tests/step_defs/api/test_api_resources.py
test_api_resources.py
py
6,600
python
en
code
null
github-code
1
[ { "api_name": "pytest_bdd.scenarios", "line_number": 16, "usage_type": "call" }, { "api_name": "conftest.api_request", "line_number": 21, "usage_type": "call" }, { "api_name": "pytest_bdd.given", "line_number": 19, "usage_type": "call" }, { "api_name": "pytest_bdd...
3804617895
import sys sys.path.insert(0, 'src/vendor') from imdb import IMDb from imdb import helpers ia = IMDb() h = helpers() def multipleMovies(title, allMoviesWithName, movie): if(len(allMoviesWithName) == 1): movie = ia.get_movie(allMoviesWithName[0].movieID) else: filterBy = input(f'Multiple items named "{title}" ...
allisontharp/laughtrack
backend/datapull/imdbFuncs.py
imdbFuncs.py
py
2,816
python
en
code
0
github-code
1
[ { "api_name": "sys.path.insert", "line_number": 2, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 2, "usage_type": "attribute" }, { "api_name": "imdb.IMDb", "line_number": 6, "usage_type": "call" }, { "api_name": "imdb.helpers", "line_number"...
22129992552
import discord, asyncio, requests, datetime # -- INIT -- POST_TIME_H = 6 POST_TIME_M = 0 POST_TIME_S = 0 BOT_EMAIL = '' BOT_PASS = '' KEY = '' CHAN_ID = '' # Connect to client client = discord.Client() def apiGet(url): response = requests.get(url) return response.json() def randomWord(): url = "ht...
resloved/word-of-the-day-discord
wotd.py
wotd.py
py
2,554
python
en
code
0
github-code
1
[ { "api_name": "discord.Client", "line_number": 17, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 21, "usage_type": "call" }, { "api_name": "discord.Object", "line_number": 64, "usage_type": "call" }, { "api_name": "datetime.datetime.now", ...
8556892866
# coding:utf8 __author__ = 'Marcelo Ferreira da Costa Gomes' # Apply filters of interest in a dataframe containing SINAN-SRAG data import pandas as pd import numpy as np import argparse import logging import re from argparse import RawDescriptionHelpFormatter from .insert_epiweek import insert_epiweek from .delay_tabl...
FluVigilanciaBR/seasonality
methods/data_filter/sinan_filter_of_interest.py
sinan_filter_of_interest.py
py
47,482
python
en
code
1
github-code
1
[ { "api_name": "logging.getLogger", "line_number": 14, "usage_type": "call" }, { "api_name": "pandas.Series", "line_number": 256, "usage_type": "attribute" }, { "api_name": "pandas.notna", "line_number": 257, "usage_type": "call" }, { "api_name": "pandas.Series", ...
42557553956
from fastapi import FastAPI, HTTPException from pydantic import BaseModel class Line(BaseModel): matter: str teacher: str coef: float ects: float cc1: float cc2: float exam: float app = FastAPI() @app.get("/grades") def grades(): with open("exportFIles/note.txt", "r", encoding="utf...
Alex061998/ScrapperPython
api.py
api.py
py
2,717
python
en
code
0
github-code
1
[ { "api_name": "pydantic.BaseModel", "line_number": 5, "usage_type": "name" }, { "api_name": "fastapi.FastAPI", "line_number": 15, "usage_type": "call" }, { "api_name": "fastapi.HTTPException", "line_number": 31, "usage_type": "call" }, { "api_name": "fastapi.HTTPE...
42896814245
from tokenizers import BertWordPieceTokenizer import numpy as np import argparse import torch parser = argparse.ArgumentParser(description="Numerize text into numpy format") parser.add_argument('--vocab', default='path/to/vocab.txt', help="path to vocabulary file") parser.add_argument('--merge', de...
alexa/ramen
code/utils/numerize.py
numerize.py
py
3,426
python
en
code
17
github-code
1
[ { "api_name": "argparse.ArgumentParser", "line_number": 6, "usage_type": "call" }, { "api_name": "tokenizers.BertWordPieceTokenizer", "line_number": 36, "usage_type": "call" }, { "api_name": "numpy.uint16", "line_number": 63, "usage_type": "call" }, { "api_name": ...
30840715674
import random import string import cv2 import os import argparse BASE_DIR = os.getcwd() def cut_img(image, column_num, row_num, prefix_name): """ image: 이미지 경로 column_num: 가로로 자를 갯수 row_num: 세로로 자를 갯수 prefix_name: 고정된 이름 """ if os.path.isdir(os.path.join(BASE_DIR, 'cuted_img')): f...
yyeseull/Assignment
image_cut_merge/cut_image.py
cut_image.py
py
2,100
python
en
code
0
github-code
1
[ { "api_name": "os.getcwd", "line_number": 7, "usage_type": "call" }, { "api_name": "os.path.isdir", "line_number": 16, "usage_type": "call" }, { "api_name": "os.path", "line_number": 16, "usage_type": "attribute" }, { "api_name": "os.path.join", "line_number":...
39721890455
# -*- coding: utf-8 -*- """ Created on Tue Jul 14 20:21:07 2020 @author: gabriel bustamante """ import pandas as pd import numpy as np import seaborn as sns import matplotlib.pyplot as plt def get_attributes_list(information_level, attributes_description): attributes_list = list(attributes_descri...
gabrielbfs/ArvatoProject_workbook
arvato_project.py
arvato_project.py
py
2,654
python
en
code
0
github-code
1
[ { "api_name": "matplotlib.pyplot.figure", "line_number": 53, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 53, "usage_type": "name" }, { "api_name": "seaborn.heatmap", "line_number": 54, "usage_type": "call" }, { "api_name": "matplotlib...
31511216914
from pathlib import Path from itertools import zip_longest f = open(Path(__file__).resolve().parent / 'input.txt') # eval would have been easier ... def read_packet(s): def read(s,p): if s[p] == '[': return read_list(s,p) return read_number(s,p) def read_number(s,p): e = p while s[e].isdigit...
andiwand/adventofcode
2022/day13/solution.py
solution.py
py
1,641
python
en
code
1
github-code
1
[ { "api_name": "pathlib.Path", "line_number": 4, "usage_type": "call" }, { "api_name": "itertools.zip_longest", "line_number": 53, "usage_type": "call" }, { "api_name": "functools.cmp_to_key", "line_number": 83, "usage_type": "call" } ]
43655547493
from django import views from django.contrib.auth.mixins import LoginRequiredMixin from django.shortcuts import render from .forms import ProfileChangeForm class ProfileView(LoginRequiredMixin, views.View): template_name = "LK.html" form_class = ProfileChangeForm def get(self, request, *args, **kwargs):...
Rimasko/touristik_site
ekvatour/users/views.py
views.py
py
1,177
python
en
code
1
github-code
1
[ { "api_name": "django.contrib.auth.mixins.LoginRequiredMixin", "line_number": 8, "usage_type": "name" }, { "api_name": "django.views.View", "line_number": 8, "usage_type": "attribute" }, { "api_name": "django.views", "line_number": 8, "usage_type": "name" }, { "ap...
17441169318
from bs4 import BeautifulSoup import sqlite3 import urllib.request import urllib.error import re import xlwt def main(): baseurl = 'https://www.liepin.com/zhaopin/?sfrom=click-pc_homepage-centre_searchbox-search_new&dqs=010&key=JAVA' datalist = getdata(baseurl) savepath = ".\\职位信息" print(datalist) #...
waji785/py-spide
main/website crawl.py
website crawl.py
py
3,302
python
en
code
0
github-code
1
[ { "api_name": "urllib.request.request.Request", "line_number": 25, "usage_type": "call" }, { "api_name": "urllib.request.request", "line_number": 25, "usage_type": "attribute" }, { "api_name": "urllib.request", "line_number": 25, "usage_type": "name" }, { "api_nam...
4685574067
import numpy as np import pandas as pd from sklearn.base import BaseEstimator, TransformerMixin from sklearn.pipeline import make_pipeline from sklearn.linear_model import LinearRegression from plots import plot_series from sunspots import error, get_data, sklearn_formatting class GaussianFeatures(BaseEstimator, Tr...
rkhood/forecasting
linear.py
linear.py
py
1,507
python
en
code
0
github-code
1
[ { "api_name": "sklearn.base.BaseEstimator", "line_number": 12, "usage_type": "name" }, { "api_name": "sklearn.base.TransformerMixin", "line_number": 12, "usage_type": "name" }, { "api_name": "numpy.exp", "line_number": 20, "usage_type": "call" }, { "api_name": "nu...
32918003515
import glob import io import logging import re import textwrap import traceback from contextlib import redirect_stdout import discord from discord.ext import commands from discord.ext.commands import Cog, Bot, Context from cogs.commands import settings from utils import embeds from utils.record import record_usage #...
richtan/chiya
cogs/commands/moderation/administration.py
administration.py
py
13,552
python
en
code
null
github-code
1
[ { "api_name": "logging.getLogger", "line_number": 18, "usage_type": "call" }, { "api_name": "discord.ext.commands.Cog", "line_number": 21, "usage_type": "name" }, { "api_name": "discord.ext.commands.before_invoke", "line_number": 37, "usage_type": "call" }, { "api...
18684839781
#==== MOVIE ADMIN VIEWS ==== from django.shortcuts import render, get_object_or_404 from django.urls import reverse from django.http import HttpResponseRedirect from django.contrib.auth import authenticate from movies.models import * from Metflix.settings import MEDIA_ROOT, MEDIA_URL import os # Create your views ...
nall3n/Metflix
Metflix/movie_admin/views.py
views.py
py
2,226
python
en
code
0
github-code
1
[ { "api_name": "Metflix.settings.MEDIA_ROOT", "line_number": 17, "usage_type": "name" }, { "api_name": "Metflix.settings.MEDIA_ROOT", "line_number": 18, "usage_type": "name" }, { "api_name": "movies.models", "line_number": 19, "usage_type": "name" }, { "api_name": ...
34366092564
# -*- coding: utf-8 -*- from builtins import object from PyQt5 import QtCore, QtGui, QtWidgets try: _fromUtf8 = QtCore.QString.fromUtf8 except AttributeError: _fromUtf8 = lambda s: s class Ui_qgsnewhttpconnectionbase(object): def setupUi(self, qgsnewhttpconnectionbase): qgsnewhttpconnectionbase.s...
kalxas/rasdaman
applications/qgis-wcps/qgis3/QgsWcpsClient1/qgsnewhttpconnectionbase.py
qgsnewhttpconnectionbase.py
py
2,617
python
en
code
4
github-code
1
[ { "api_name": "PyQt5.QtCore.QString", "line_number": 7, "usage_type": "attribute" }, { "api_name": "PyQt5.QtCore", "line_number": 7, "usage_type": "name" }, { "api_name": "builtins.object", "line_number": 11, "usage_type": "name" }, { "api_name": "PyQt5.QtWidgets....
12195682849
"""Point cloud generation functions to test benchmarks of rotation invariant functions """ from dataclasses import dataclass from functools import lru_cache import numpy as np import torch from numpy.linalg import norm from scipy.spatial.transform import Rotation from scipy.spatial.transform import Rotation as R def...
ymentha14/se3_molecule_generation
src/ri_distances/pnt_cloud_generation.py
pnt_cloud_generation.py
py
7,508
python
en
code
2
github-code
1
[ { "api_name": "torch.tensor", "line_number": 18, "usage_type": "call" }, { "api_name": "torch.float32", "line_number": 18, "usage_type": "attribute" }, { "api_name": "numpy.random.permutation", "line_number": 34, "usage_type": "call" }, { "api_name": "numpy.random...
5282218579
from django.urls import path from .views import ( PdfextListView, PdfextDetailView, PdfextCreateView, PdfextUpdateView, PdfextDeleteView, UserPdfextListView, PdfextConvertView, ) from . import views urlpatterns = [ path('', PdfextListView.as_view(), name='pdfext-home'), path('user/<...
perpertuallearner/all_about_pdfs
pdfext/urls.py
urls.py
py
1,070
python
en
code
0
github-code
1
[ { "api_name": "django.urls.path", "line_number": 14, "usage_type": "call" }, { "api_name": "views.PdfextListView.as_view", "line_number": 14, "usage_type": "call" }, { "api_name": "views.PdfextListView", "line_number": 14, "usage_type": "name" }, { "api_name": "dj...
9618399050
from itertools import groupby lis = [1, 2, 2, 3, 4, 4, 4, 4] print(list(groupby(lis))) things = [("animal", "bear"), ("animal", "duck"), ("plant", "cactus"), ("vehicle", "speed boat"), ("vehicle", "school bus")] for key, group in groupby(things, lambda x: x[0]): for thing in group: print("A %s is a %s." %...
hemantkgupta/Python3
itertools/groupby.py
groupby.py
py
518
python
en
code
0
github-code
1
[ { "api_name": "itertools.groupby", "line_number": 3, "usage_type": "call" }, { "api_name": "itertools.groupby", "line_number": 7, "usage_type": "call" }, { "api_name": "itertools.groupby", "line_number": 12, "usage_type": "call" } ]
32068119633
from selenium import webdriver import time import math try: browser = webdriver.Chrome() link = "http://suninjuly.github.io/redirect_accept.html" browser.get(link) browser.find_element_by_tag_name("button").click() #confirm = browser.switch_to.alert #confirm.accept() windows = browser.wind...
EkS2018/stepik-selenium
21.py
21.py
py
961
python
en
code
0
github-code
1
[ { "api_name": "selenium.webdriver.Chrome", "line_number": 6, "usage_type": "call" }, { "api_name": "selenium.webdriver", "line_number": 6, "usage_type": "name" }, { "api_name": "math.log", "line_number": 26, "usage_type": "call" }, { "api_name": "math.sin", "l...
22078780419
import ast import inspect class Unpacking(ast.AST): _attributes = () _fields = ("value",) def __init__(self, value, counter, starred=False): self.value = value self.counter = counter self.starred = starred class ForTargetPlaceholder(ast.AST): _attributes = () _fields = (...
percevalw/pygetsource
pygetsource/ast_utils.py
ast_utils.py
py
8,107
python
en
code
2
github-code
1
[ { "api_name": "ast.AST", "line_number": 5, "usage_type": "attribute" }, { "api_name": "ast.AST", "line_number": 15, "usage_type": "attribute" }, { "api_name": "ast.AST", "line_number": 20, "usage_type": "attribute" }, { "api_name": "ast.AST", "line_number": 28...
43792968736
# -*- coding:utf-8 -*- __all__=['getDataGenerator'] import keras from keras.preprocessing.image import ImageDataGenerator,array_to_img from keras.datasets import cifar10 import numpy as np import os import pickle import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt def getDataGenerator(train_phase...
Kexiii/DenseNet-Cifar10
data_input/data_input.py
data_input.py
py
2,951
python
en
code
40
github-code
1
[ { "api_name": "matplotlib.use", "line_number": 11, "usage_type": "call" }, { "api_name": "keras.preprocessing.image.ImageDataGenerator", "line_number": 28, "usage_type": "call" }, { "api_name": "keras.preprocessing.image.ImageDataGenerator", "line_number": 42, "usage_type...
31130560486
""" @Filename: core/testcase/test_login.py @Author: 小蔡 @Time: 2022/09/28 20:30 @Describe: ... """ import json import requests # def img2code(file): # url = "http://47.106.70.21:5516/auth/login" # # data = { # "user": "pengjiangchun", # "pass2": "3eb5f9a3a31fb000969e696d7c3cc71f", # ...
15946859495/UI_frame
core/until/funcs.py
funcs.py
py
1,602
python
en
code
0
github-code
1
[ { "api_name": "json.dumps", "line_number": 39, "usage_type": "call" }, { "api_name": "json.loads", "line_number": 48, "usage_type": "call" } ]
8926189595
from django import forms from django.contrib.auth.models import User from django.contrib.auth import authenticate, login from django.core.urlresolvers import reverse from django.shortcuts import render, get_object_or_404 from django.contrib import messages from django.http import HttpResponseRedirect from users.models ...
austin15140/mysite
users/forms.py
forms.py
py
6,567
python
en
code
0
github-code
1
[ { "api_name": "django.forms.ModelForm", "line_number": 15, "usage_type": "attribute" }, { "api_name": "django.forms", "line_number": 15, "usage_type": "name" }, { "api_name": "django.forms.CharField", "line_number": 16, "usage_type": "call" }, { "api_name": "djang...
36766820641
""" HTTP client tool for Svom Retries requests with power law delays and a max tries limit @author: henri.louvin@cea.fr """ import threading import time import requests import asyncio import aiohttp import signal # Log import logging log = logging.getLogger('http_client') class HttpClient(threading.Thread): ...
HSF/Crest
crestdb-client/python/cli/crest/io/httpio.py
httpio.py
py
9,021
python
en
code
3
github-code
1
[ { "api_name": "logging.getLogger", "line_number": 21, "usage_type": "call" }, { "api_name": "threading.Thread", "line_number": 23, "usage_type": "attribute" }, { "api_name": "threading.Thread.__init__", "line_number": 29, "usage_type": "call" }, { "api_name": "thr...
3733088103
# -*- coding: cp936 -*- import matplotlib.pyplot as plt import numpy as np x = np.linspace(0, 2*np.pi, 50) plt.subplot(3, 1, 1) # (行,列,活跃区) plt.plot(x, np.sin(x), 'r') plt.subplot(3, 1, 2) plt.plot(x, np.cos(x), 'g') plt.subplot(3, 1, 3) plt.plot(x, np.tan(x), 'b') plt.show() # -*- coding: cp936 -*- imp...
wsgan001/python-2
数据图形/图表.py
图表.py
py
3,281
python
en
code
0
github-code
1
[ { "api_name": "numpy.linspace", "line_number": 4, "usage_type": "call" }, { "api_name": "numpy.pi", "line_number": 4, "usage_type": "attribute" }, { "api_name": "matplotlib.pyplot.subplot", "line_number": 5, "usage_type": "call" }, { "api_name": "matplotlib.pyplot...
72869151394
# This script will create all you need for a hunt group and tie it all together # This creates a Line Group, Hunt List, and Pilot # There's also logic to specify if you want calls to rona to a VM box # If you want calls to rona to another number other than a VM box you will need to tweak the code a bit from lxml impor...
jfletcher76/CiscoDEVUC
CUCM/addRequests/addHuntGroup.py
addHuntGroup.py
py
7,503
python
en
code
1
github-code
1
[ { "api_name": "dotenv.load_dotenv", "line_number": 19, "usage_type": "call" }, { "api_name": "zeep.Plugin", "line_number": 30, "usage_type": "name" }, { "api_name": "lxml.etree.tostring", "line_number": 35, "usage_type": "call" }, { "api_name": "lxml.etree", "...
72387942114
""" Script to install Souma on OsX, Windows, and Unix Usage: python package.py py2app python package.py py2exe """ import ez_setup import numpy # important for py2exe to work ez_setup.use_setuptools() import sys import os from esky.bdist_esky import Executable from setuptools import setup if sys.platform ==...
cafca/souma
package.py
package.py
py
7,972
python
en
code
5
github-code
1
[ { "api_name": "ez_setup.use_setuptools", "line_number": 10, "usage_type": "call" }, { "api_name": "sys.platform", "line_number": 17, "usage_type": "attribute" }, { "api_name": "os.walk", "line_number": 32, "usage_type": "call" }, { "api_name": "os.path.join", ...
71928968673
import os from pdfRecognition import pdfRecognition import fitz class pdfToPic(): def __init__(self,filepath,folderPath): self.filepath = filepath self.folderPath = folderPath def pdfToPic(self): pdfDoc = fitz.open(self.filepath) for pg in range(pdfDoc.page_count): ...
Guanguanka/pdfTool
pdfToPic.py
pdfToPic.py
py
979
python
en
code
0
github-code
1
[ { "api_name": "fitz.open", "line_number": 11, "usage_type": "call" }, { "api_name": "fitz.Matrix", "line_number": 17, "usage_type": "call" }, { "api_name": "os.path.exists", "line_number": 20, "usage_type": "call" }, { "api_name": "os.path", "line_number": 20,...
71730197474
import shutil import os import glob2 from tqdm import tqdm train_path = '../data/train/' test_path = '../data/test/' if not os.path.exists(train_path): os.makedirs(train_path) if not os.path.exists(test_path): os.makedirs(test_path) test_num = 0 for filename in tqdm(glob2.glob('../data/dicom-images-test/**/...
kshannon/pneumothorax-segmentation
eda/move_data.py
move_data.py
py
757
python
en
code
1
github-code
1
[ { "api_name": "os.path.exists", "line_number": 9, "usage_type": "call" }, { "api_name": "os.path", "line_number": 9, "usage_type": "attribute" }, { "api_name": "os.makedirs", "line_number": 10, "usage_type": "call" }, { "api_name": "os.path.exists", "line_numb...
36997759739
import sqlite3 from contextlib import closing from typing import List, Dict, Union table_name = "bot" DBEntry = Dict[str, Union[str, int]] def add_to_database(db_name: str, data: List[DBEntry]) -> int: connection = sqlite3.connect(db_name) with closing(connection): cursor = connection.cursor() ...
quietsato/TwitterBotPy
botkun/lib/database.py
database.py
py
3,521
python
en
code
0
github-code
1
[ { "api_name": "typing.Dict", "line_number": 7, "usage_type": "name" }, { "api_name": "typing.Union", "line_number": 7, "usage_type": "name" }, { "api_name": "typing.List", "line_number": 10, "usage_type": "name" }, { "api_name": "sqlite3.connect", "line_number...
29550588888
import video import funkcijos import plotly.graph_objects as go import math dataList = list() eUploader = 0 eAge = 0 eCategory = 0 eLength = 0 eViews = 0 eRate = 0 eRatings = 0 eComments = 0 atributeNames = list() missingValues = list() avarages = list() medians = list() mins = list() maxs = list() cardinalities = l...
winVIP/KTU-stuff
KTU semestras 6/Intelektika/Lab1/mainas.py
mainas.py
py
20,500
python
en
code
0
github-code
1
[ { "api_name": "video.Video", "line_number": 66, "usage_type": "call" }, { "api_name": "funkcijos.Funkcijos.Vidurkis", "line_number": 94, "usage_type": "call" }, { "api_name": "funkcijos.Funkcijos", "line_number": 94, "usage_type": "attribute" }, { "api_name": "fun...
6331063126
import numpy as np from sklearn.datasets import make_moons import matplotlib.pyplot as plt import neural_network as nn def plot_decision_boundary(pred_func, X, y): x_min, x_max = X[:, 0].min() - 0.5, X[:, 0].max() + 0.5 y_min, y_max = X[:, 1].min() - 0.5, X[:, 1].max() + 0.5 h = 0.01 xx, yy = np.meshgr...
blackz54/cs491project3
driver.py
driver.py
py
1,364
python
en
code
0
github-code
1
[ { "api_name": "numpy.meshgrid", "line_number": 10, "usage_type": "call" }, { "api_name": "numpy.arange", "line_number": 10, "usage_type": "call" }, { "api_name": "numpy.c_", "line_number": 11, "usage_type": "attribute" }, { "api_name": "matplotlib.pyplot.contourf"...
4457682469
import subprocess as sp import sys import ctypes import os import random import json import base64 import pathlib import tempfile import functools import operator import time import numpy import pylibsort import libff.invoke # ol-install: numpy # from memory_profiler import profile import cProfile import pstats impor...
NathanTP/fakefaas
examples/sort/worker.py
worker.py
py
4,313
python
en
code
1
github-code
1
[ { "api_name": "pathlib.Path", "line_number": 27, "usage_type": "call" }, { "api_name": "io.StringIO", "line_number": 29, "usage_type": "call" }, { "api_name": "pstats.Stats", "line_number": 31, "usage_type": "call" }, { "api_name": "pstats.SortKey", "line_numb...
7053890236
import sys, os sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), "../datasets/")) from mass_spring import get_dataset import torch import torch.nn as nn import pytorch_lightning as pl import numpy as np import torch.utils.data as data from TorchSnippet.energy import HNN from Torc...
yantijin/TorchSnippet
example/energy/hnn_test.py
hnn_test.py
py
2,156
python
en
code
0
github-code
1
[ { "api_name": "sys.path.append", "line_number": 3, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 3, "usage_type": "attribute" }, { "api_name": "os.path.join", "line_number": 3, "usage_type": "call" }, { "api_name": "os.path", "line_number": ...
39000943657
import torch import numpy as np from torchvision import transforms from torch.utils.data import DataLoader from torch.utils.data._utils.collate import default_collate from .datasets import IuxrayMultiImageDataset, MimiccxrSingleImageDataset, KnowledgeDataset class ToPILImage(object): def __init__(self): s...
LX-doctorAI1/GSKET
modules/dataloaders.py
dataloaders.py
py
4,467
python
en
code
20
github-code
1
[ { "api_name": "torchvision.transforms.ToPILImage", "line_number": 11, "usage_type": "call" }, { "api_name": "torchvision.transforms", "line_number": 11, "usage_type": "name" }, { "api_name": "torch.utils.data.DataLoader", "line_number": 17, "usage_type": "name" }, { ...
29499134745
import os import secrets from PIL import Image from flask import render_template, url_for, flash, redirect, request, abort, jsonify, make_response from app import app, db, bcrypt, mail from forms import * from models import * from flask_login import login_user, current_user, logout_user, login_required from datetime i...
alankhoangfr/NilStock_Inventory
routes/notificationRoutes.py
notificationRoutes.py
py
5,177
python
en
code
0
github-code
1
[ { "api_name": "flask.request.args.get", "line_number": 17, "usage_type": "call" }, { "api_name": "flask.request.args", "line_number": 17, "usage_type": "attribute" }, { "api_name": "flask.request", "line_number": 17, "usage_type": "name" }, { "api_name": "datetime...
20248498954
import os, time, socket, threading, json import paho.mqtt.client as mqtt import h3.api.numpy_int as h3 import numpy as np from scipy import stats from geodata_toolbox import H3Grids import matplotlib.pyplot as plt class Indicator: def __init__(self, H3, Table=None): self.H3 = H3 self.h3_features = ...
csl-hcmc/SaiGon-Peninsula
Software/L3_SZ_CityScope-main/backend/indicator_toolbox.py
indicator_toolbox.py
py
13,392
python
en
code
2
github-code
1
[ { "api_name": "h3.api.numpy_int.edge_length", "line_number": 22, "usage_type": "call" }, { "api_name": "h3.api.numpy_int", "line_number": 22, "usage_type": "name" }, { "api_name": "h3.api.numpy_int.point_dist", "line_number": 28, "usage_type": "call" }, { "api_nam...
20047483491
import subprocess from sys import exit from itertools import combinations, permutations from math import floor, ceil # Facer lista de nxn coas reglas, para obter as filas e as columnas das regras # Logo, con esto facemos as permutacions de 4 para a segunda regra def filasColumnas(lista): """ :param lista: Lis...
AlejandroFernandezLuces/practicas-SAT
binairo.py
binairo.py
py
8,893
python
en
code
0
github-code
1
[ { "api_name": "math.floor", "line_number": 65, "usage_type": "call" }, { "api_name": "itertools.combinations", "line_number": 172, "usage_type": "call" }, { "api_name": "itertools.combinations", "line_number": 184, "usage_type": "call" }, { "api_name": "subprocess...
23533446347
from typing import List class UnionFind: """ 유니온 파인드 : 두 노드가 같은 그룹 인지 체크 """ def __init__(self): super().__init__() self.parent: List[int] = [] def union(self, node_count: int, edge_list: List[List[int]]): """ 유니온 연산 : 두 노드의 대표 노드끼리 연결 Args: no...
jinyul80/algorithm_study
python/graph/union_find.py
union_find.py
py
2,253
python
ko
code
0
github-code
1
[ { "api_name": "typing.List", "line_number": 11, "usage_type": "name" }, { "api_name": "typing.List", "line_number": 13, "usage_type": "name" } ]
41291806836
import boto3 from botocore.exceptions import ClientError import json from botocore.vendored import requests dynamodb = boto3.resource('dynamodb', region_name='us-east-1', endpoint_url="https://dynamodb.us-east-1.amazonaws.com") subscriptions_table = dynamodb.Table('test') AWS_REGION = "us-east-1" SUBJECT = "newsApp -...
allexg/newsApp
email-newsletter-Lambda/lambda_function.py
lambda_function.py
py
2,691
python
en
code
0
github-code
1
[ { "api_name": "boto3.resource", "line_number": 6, "usage_type": "call" }, { "api_name": "boto3.client", "line_number": 29, "usage_type": "call" }, { "api_name": "botocore.exceptions.ClientError", "line_number": 55, "usage_type": "name" }, { "api_name": "botocore.v...
32534904655
# main source file import os from .utils import update_poe_env, check_config import poe class Poe: def __init__(self, bot: str = "capybara"): self.poe_token = check_config() self.poe_proxy = os.getenv('POE_PROXY') self.poe_client = poe.Client(self.poe_token, proxy=self.poe_proxy)...
Mushrr/poe_terminal_chat
poe_terminal_chat/poeterminal.py
poeterminal.py
py
1,322
python
en
code
3
github-code
1
[ { "api_name": "utils.check_config", "line_number": 9, "usage_type": "call" }, { "api_name": "os.getenv", "line_number": 10, "usage_type": "call" }, { "api_name": "poe.Client", "line_number": 11, "usage_type": "call" } ]
14240741723
import gym import gymnasium def gym_space_migration(gym_space: gym.Space) -> gymnasium.Space: if isinstance(gym_space, gym.spaces.Discrete): return gymnasium.spaces.Discrete(gym_space.n) elif isinstance(gym_space, gym.spaces.Box): return gymnasium.spaces.Box( low=gym_space.low, ...
DevSlem/recommender-system-rl-tutorial
recsim_env/utils.py
utils.py
py
1,103
python
en
code
0
github-code
1
[ { "api_name": "gym.Space", "line_number": 4, "usage_type": "attribute" }, { "api_name": "gym.spaces", "line_number": 5, "usage_type": "attribute" }, { "api_name": "gymnasium.spaces.Discrete", "line_number": 6, "usage_type": "call" }, { "api_name": "gymnasium.space...
16565983104
import keras import numpy as np import matplotlib.pyplot as plt from keras.models import Sequential # Dense 全连接层,Activation 激活函数 from keras.layers import Dense, Activation # 优化器 from keras.optimizers import SGD def replace_char(string, char, index): string = list(string) string[index] = char return ''.joi...
1060807523/GitRepositories
code/Mask_RCNN-master/samples/drive/Nonlinear_regression.py
Nonlinear_regression.py
py
2,013
python
zh
code
0
github-code
1
[ { "api_name": "numpy.linspace", "line_number": 18, "usage_type": "call" }, { "api_name": "numpy.random.normal", "line_number": 19, "usage_type": "call" }, { "api_name": "numpy.random", "line_number": 19, "usage_type": "attribute" }, { "api_name": "numpy.square", ...
74095797154
import sys import os import re import numpy as np import pandas as pd from stock.utils.symbol_util import get_stock_symbols, get_archived_trading_dates, exsymbol_to_symbol from stock.marketdata.storefactory import get_store from stock.lib.finance import get_lrb_data from sklearn import linear_model import matplotlib.py...
shenzhongqiang/cnstock_py
stock/quant/pe.py
pe.py
py
4,429
python
en
code
0
github-code
1
[ { "api_name": "sklearn.linear_model.LinearRegression", "line_number": 16, "usage_type": "call" }, { "api_name": "sklearn.linear_model", "line_number": 16, "usage_type": "name" }, { "api_name": "numpy.array", "line_number": 17, "usage_type": "call" }, { "api_name":...
21130305160
from db import DB from crawl import Crawl from goods import Goods from mail import Mail import time import sched class Monitor: def __init__(self, email='1656704949@qq.com', rate=60, note=60 * 60): self.scheduler = sched.scheduler(time.time, time.sleep) self.goods_dict = {} self.db = DB() ...
zhangbincheng1997/mall-monitor
web/monitor.py
monitor.py
py
3,752
python
en
code
10
github-code
1
[ { "api_name": "sched.scheduler", "line_number": 11, "usage_type": "call" }, { "api_name": "time.time", "line_number": 11, "usage_type": "attribute" }, { "api_name": "time.sleep", "line_number": 11, "usage_type": "attribute" }, { "api_name": "db.DB", "line_numb...
5170271632
from os import name from django.shortcuts import render from django.http import HttpResponse from django.core.files.storage import FileSystemStorage from subprocess import run, PIPE import sys ,os import detect from webs.controller import count,data_label from webs.controller import banana_ripe_or_raw,guava_rip...
LoneWolf1999-Th/Fruit_Detect
webs/views.py
views.py
py
2,801
python
en
code
0
github-code
1
[ { "api_name": "django.shortcuts.render", "line_number": 14, "usage_type": "call" }, { "api_name": "django.shortcuts.render", "line_number": 17, "usage_type": "call" }, { "api_name": "django.shortcuts.render", "line_number": 20, "usage_type": "call" }, { "api_name"...
290347917
import requests import re import pymysql from lxml import etree header = { "User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36"} reques = requests.get('http://www.open.com.cn/encrollregulation-3333.html', headers=header) reques.encoding = 'u...
zhouf1234/untitled9pachon
测试10.py
测试10.py
py
2,910
python
es
code
1
github-code
1
[ { "api_name": "requests.get", "line_number": 8, "usage_type": "call" }, { "api_name": "re.compile", "line_number": 12, "usage_type": "call" }, { "api_name": "re.S", "line_number": 12, "usage_type": "attribute" }, { "api_name": "re.findall", "line_number": 13, ...
24390060708
from flask import Flask, make_response from bson.json_util import dumps from models import note import json import pymongo import UserDAO import PlacesDAO import Place import WeatherHour import AlertInfo import WeatherCamLink app = Flask(__name__) app.debug = True connection_string = "mongodb://localhost" connection ...
theNerd247/twcHackathon
app.py
app.py
py
1,188
python
en
code
0
github-code
1
[ { "api_name": "flask.Flask", "line_number": 13, "usage_type": "call" }, { "api_name": "pymongo.MongoClient", "line_number": 17, "usage_type": "call" }, { "api_name": "UserDAO.UserDAO", "line_number": 20, "usage_type": "call" }, { "api_name": "PlacesDAO.PlacesDAO",...
25142521036
from typing import Any, Dict import argparse import torch import torch.nn as nn import torch.nn.functional as F CONV_DIM = 64 FC_DIM = 128 IMAGE_SIZE = 28 class ConvBlock(nn.Module): """ Simple 3x3 conv with padding size 1 (to leave the input size unchanged), followed by a ReLU. """ def __init__(s...
cluePrints/fsdl-text-recognizer-2021-labs
lab2/text_recognizer/models/cnn.py
cnn.py
py
4,320
python
en
code
null
github-code
1
[ { "api_name": "torch.nn.Module", "line_number": 14, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 14, "usage_type": "name" }, { "api_name": "torch.nn.Conv2d", "line_number": 21, "usage_type": "call" }, { "api_name": "torch.nn", "line_nu...
73062309793
# -*- coding: utf-8 -*- from mrjob.job import MRJob from mrjob.protocol import JSONProtocol, RawValueProtocol from mrjob.step import MRStep import numpy as np ######################## Helper Methods and Classes ########################## def cholesky_solution_linear_regression(x_t_x,x_t_y): ''' Finds par...
AmazaspShumik/MapReduce-Machine-Learning
Linear Regression MapReduce/LinearRegressionTS.py
LinearRegressionTS.py
py
6,517
python
en
code
22
github-code
1
[ { "api_name": "numpy.linalg.cholesky", "line_number": 30, "usage_type": "call" }, { "api_name": "numpy.linalg", "line_number": 30, "usage_type": "attribute" }, { "api_name": "numpy.linalg.solve", "line_number": 32, "usage_type": "call" }, { "api_name": "numpy.lina...
13271941086
from __future__ import annotations import json from pathlib import Path from typing import TYPE_CHECKING import pytest from pyk.kore.parser import KoreParser from pyk.kore.syntax import And, App, Kore, Or, Pattern, SortVar, kore_term if TYPE_CHECKING: from collections.abc import Mapping from typing import A...
runtimeverification/pyk
src/tests/unit/kore/test_parser.py
test_parser.py
py
4,551
python
en
code
12
github-code
1
[ { "api_name": "typing.TYPE_CHECKING", "line_number": 12, "usage_type": "name" }, { "api_name": "typing.Final", "line_number": 16, "usage_type": "name" }, { "api_name": "pathlib.Path", "line_number": 16, "usage_type": "call" }, { "api_name": "typing.Final", "li...
25348338231
# encoding: utf-8 import sys import os import io from managermentFileForqiniu import managerfile import logging import datetime ##log logging.basicConfig(level=logging.DEBUG,format='%(asctime)s %(filename)s[line:%(lineno)d] %(levelname)s %(message)s',datefmt='%Y %m %d %H:%M:%S',filename='SyncOperation_main.log',file...
weixlkevin/SmartHomekit
SyncOperation.py
SyncOperation.py
py
1,213
python
en
code
0
github-code
1
[ { "api_name": "logging.basicConfig", "line_number": 10, "usage_type": "call" }, { "api_name": "logging.DEBUG", "line_number": 10, "usage_type": "attribute" }, { "api_name": "logging.info", "line_number": 11, "usage_type": "call" }, { "api_name": "datetime.datetime...
44401912202
import serial import numpy as np import csv device=serial.Serial("/dev/ttyUSB0",230400) distance0=1 distance1=7.5 ##mm arange=np.arange(distance0,distance1,0.1) f= open("data/trail9-5.4mm.csv","w") writer=csv.writer(f) for i in arange: print("Move Slit to: ",str(i)) input("Press enter to continue") ...
cwru-robin/Phys301
Photon Counting/take_data.py
take_data.py
py
532
python
en
code
0
github-code
1
[ { "api_name": "serial.Serial", "line_number": 5, "usage_type": "call" }, { "api_name": "numpy.arange", "line_number": 12, "usage_type": "call" }, { "api_name": "csv.writer", "line_number": 14, "usage_type": "call" } ]
22623785092
import logging import time import socket import config import json import sys if config.API_ENABLED: if sys.version_info >= (3, 0): # If using python 3, use urllib.parse and urllib.request instead of urllib and urllib2 from urllib.parse import urlencode from urllib.request import Request, u...
ZuopanYao/TravelNetwork
shadowsocks-py-mu/shadowsocks/dbtransfer.py
dbtransfer.py
py
12,012
python
en
code
0
github-code
1
[ { "api_name": "config.API_ENABLED", "line_number": 8, "usage_type": "attribute" }, { "api_name": "sys.version_info", "line_number": 9, "usage_type": "attribute" }, { "api_name": "socket.socket", "line_number": 25, "usage_type": "call" }, { "api_name": "socket.AF_I...
365934322
import sys from hypothesis.version import __version__ message = """ Hypothesis {} requires Python 3.6 or later. This can only happen if your packaging toolchain is older than python_requires. See https://packaging.python.org/guides/distributing-packages-using-setuptools/ """ if sys.version_info[:3] < (3, 6): # pra...
webanck/GigaVoxels
lib/python3.8/site-packages/hypothesis/_error_if_old.py
_error_if_old.py
py
383
python
en
code
23
github-code
1
[ { "api_name": "sys.version_info", "line_number": 12, "usage_type": "attribute" }, { "api_name": "hypothesis.version.__version__", "line_number": 13, "usage_type": "argument" } ]
36189820928
#!/usr/bin/env python3 import os from setuptools import setup def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() setup( name="har2requests", version="0.2.2", author="Louis Abraham", license="MIT", author_email="louis.abraham@yahoo.fr", description="Gener...
louisabraham/har2requests
setup.py
setup.py
py
909
python
en
code
93
github-code
1
[ { "api_name": "os.path.join", "line_number": 8, "usage_type": "call" }, { "api_name": "os.path", "line_number": 8, "usage_type": "attribute" }, { "api_name": "os.path.dirname", "line_number": 8, "usage_type": "call" }, { "api_name": "setuptools.setup", "line_n...
36415915522
import copy import mmcv import re import torch import torch.nn as nn import warnings from mmcv.cnn import (build_conv_layer, build_norm_layer, constant_init, kaiming_init) from mmcv.cnn.bricks.registry import NORM_LAYERS from mmcv.runner import load_checkpoint from numpy.random import rand from op...
wyzelabs-inc/AdaptiveDistillation
adaptivedistillation/models/classifiers/kd_image.py
kd_image.py
py
12,381
python
en
code
3
github-code
1
[ { "api_name": "mmcls.models.classifiers.base.BaseClassifier", "line_number": 26, "usage_type": "name" }, { "api_name": "warnings.warn", "line_number": 60, "usage_type": "call" }, { "api_name": "mmcls.models.builder.build_backbone", "line_number": 64, "usage_type": "call" ...
21640719384
""" This file """ from textblob import TextBlob import sys user_input = sys.argv if len(user_input) != 2: print("Need a txt file to read") exit() with open(user_input[1], 'r') as f: text = f.read() blob = TextBlob(text) sentiment = blob.sentiment.polarity print(sentiment)
mkPuzon/NLP-Tone-Checker
textAnalysis.py
textAnalysis.py
py
288
python
en
code
0
github-code
1
[ { "api_name": "sys.argv", "line_number": 7, "usage_type": "attribute" }, { "api_name": "textblob.TextBlob", "line_number": 15, "usage_type": "call" } ]
38793762624
#!/usr/bin/env python # Create status info of ISC DHCPd leases in JSON format. # # Depends on python module netaddr. # Install with pip install netaddr. # Depends on iscconf for parsing dhcpd.conf. # Install with pip install iscconf # Depends on python 2.7 for argparse. # # This was written because dhcpstatus kept...
stemid/devops
tools/dhcpstatus.py
dhcpstatus.py
py
5,321
python
en
code
9
github-code
1
[ { "api_name": "netaddr.IPNetwork", "line_number": 71, "usage_type": "call" }, { "api_name": "argparse.ArgumentParser", "line_number": 75, "usage_type": "call" }, { "api_name": "argparse.FileType", "line_number": 93, "usage_type": "call" }, { "api_name": "argparse....
41337878373
import pandas as pd from sodapy import Socrata from math import ceil soil_variables = ['ph_agua_suelo_2_5_1_0', 'potasio_k_intercambiable_cmol_kg', 'f_sforo_p_bray_ii_mg_kg'] def create_client(): client = Socrata("www.datos.gov.co", None) return client def get_data(dataset_identifier, **kwargs)...
Juanes7222/Parcial1
API/api.py
api.py
py
2,044
python
en
code
0
github-code
1
[ { "api_name": "sodapy.Socrata", "line_number": 9, "usage_type": "call" }, { "api_name": "pandas.DataFrame.from_records", "line_number": 20, "usage_type": "call" }, { "api_name": "pandas.DataFrame", "line_number": 20, "usage_type": "attribute" }, { "api_name": "mat...
30647054410
# -*- coding: utf-8 -*- """ Created on Tue Oct 24 09:27:21 2017 @author: Admin """ import pandas as pd ### READ IN DATA SOURCE ### READ DIFFRENT SECTIONS FOR TRAIN, TEST, PREDICT df_train = pd.read_csv('LMPD_STOPS_DATA_CLEAN_V1_HEADERS.csv', nrows=100000, skipinitialspace=True) # SAve Headers for the next selections...
arkingsolver/SciKit_Learn_LMPD
scikit_linear_citation.py
scikit_linear_citation.py
py
2,314
python
en
code
0
github-code
1
[ { "api_name": "pandas.read_csv", "line_number": 12, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 16, "usage_type": "call" }, { "api_name": "sklearn.linear_model.LinearRegression", "line_number": 51, "usage_type": "call" }, { "api_name": ...
74130368032
import yaml import os import random import numpy as np import pandas as pd from tqdm import tqdm import torch import torchvision from torch.utils.tensorboard import SummaryWriter from utils import get_root from transforms import Resize, ToTensor, BatchRicianNoise, BatchRandomErasing from dataset import DenoisingDa...
cviaai/ADAIR
denoising/train_denoising.py
train_denoising.py
py
9,811
python
en
code
0
github-code
1
[ { "api_name": "torch.set_printoptions", "line_number": 25, "usage_type": "call" }, { "api_name": "random.seed", "line_number": 30, "usage_type": "call" }, { "api_name": "numpy.random.seed", "line_number": 31, "usage_type": "call" }, { "api_name": "numpy.random", ...
72152597793
from fastapi import APIRouter, Depends, HTTPException, status, Response from requests import session from controllers.controllers import ReservationController from controllers.exceptions import ReservationException from dependencies import get_token_header from models import models from schemas import schemas from db.d...
Landris18/PamREST
Backend/routers/reservations.py
reservations.py
py
2,557
python
en
code
4
github-code
1
[ { "api_name": "models.models.Base.metadata.create_all", "line_number": 12, "usage_type": "call" }, { "api_name": "models.models.Base", "line_number": 12, "usage_type": "attribute" }, { "api_name": "models.models", "line_number": 12, "usage_type": "name" }, { "api_...
26198111833
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # PYTHON_ARGCOMPLETE_OK """ SVG Templating System (C) Max Gaukler and other members of the FAU FabLab 2013-2022 unlimited usage allowed, see LICENSE file """ from lxml import etree from copy import deepcopy import inspect from io import BytesIO import re import locale im...
fau-fablab/etiketten
svgtemplate.py
svgtemplate.py
py
15,188
python
en
code
2
github-code
1
[ { "api_name": "argparse.ArgumentParser", "line_number": 32, "usage_type": "call" }, { "api_name": "argcomplete.autocomplete", "line_number": 47, "usage_type": "call" }, { "api_name": "io.BytesIO", "line_number": 72, "usage_type": "call" }, { "api_name": "lxml.etre...
16168565185
from datetime import datetime from json import loads from random import choice from shutil import disk_usage def main(): """Main function that returns the values to the shell script that runs this.""" time = datetime.now() time = time.strftime("%m/%d/%Y, %H:%M:%S") print(f"{check_session()} / {get_dis...
pasenidis/ricing
bar/main.py
main.py
py
1,569
python
en
code
0
github-code
1
[ { "api_name": "datetime.datetime.now", "line_number": 9, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 9, "usage_type": "name" }, { "api_name": "json.loads", "line_number": 16, "usage_type": "call" }, { "api_name": "random.choice", ...
72212308833
import numpy as np import torch import torch.nn as nn import torch.optim as optim from torch.autograd import Variable from . import MNISTAttack class MNIST_LBFGS(MNISTAttack): def __init__(self, model_class, weights_file, regularization="l2"): super().__init__(model_class, weights_file) assert reg...
FoConrad/NN-Hashing
attacks/mnist_lbfgs.py
mnist_lbfgs.py
py
1,664
python
en
code
0
github-code
1
[ { "api_name": "torch.autograd.Variable", "line_number": 17, "usage_type": "call" }, { "api_name": "torch.FloatTensor", "line_number": 17, "usage_type": "call" }, { "api_name": "torch.autograd.Variable", "line_number": 18, "usage_type": "call" }, { "api_name": "tor...
16348260053
import inspect import traceback import uuid import warnings from dataclasses import dataclass, field from datetime import datetime from typing import Any import pyttman from pyttman.core.containers import MessageMixin, Reply from pyttman.core.decorators import LifecycleHookRepository from pyttman.core.mixins import Pr...
Hashmap-Software-Agency/Pyttman
pyttman/core/internals.py
internals.py
py
4,999
python
en
code
7
github-code
1
[ { "api_name": "warnings.warn", "line_number": 33, "usage_type": "call" }, { "api_name": "inspect.ismodule", "line_number": 64, "usage_type": "call" }, { "api_name": "inspect.isfunction", "line_number": 65, "usage_type": "call" }, { "api_name": "pyttman.core.contai...
11548748606
from flask import Blueprint, views, current_app, session, request, redirect, render_template, jsonify from Formclasses.admin_classes import DiaryandAdminPost, AinforClass, UserManage, EmployeeinforClass, PostClass import datetime from .Manager import toNormal import re import random import os Adminbp = Blueprint("admi...
spidereyes/Oracle-
Blueprints/Admin.py
Admin.py
py
28,518
python
en
code
0
github-code
1
[ { "api_name": "flask.Blueprint", "line_number": 9, "usage_type": "call" }, { "api_name": "flask.views.View", "line_number": 12, "usage_type": "attribute" }, { "api_name": "flask.views", "line_number": 12, "usage_type": "name" }, { "api_name": "flask.current_app.co...
28558110791
from django.http import HttpResponse import json from .models import MailingList, MailingListGroup def listinfo(request): resp = HttpResponse(content_type='application/json') groupdata = [{ 'id': g.id, 'name': g.groupname, 'sort': g.sortkey, } for g in MailingListGroup.objects.al...
postgres/pgweb
pgweb/lists/views.py
views.py
py
642
python
en
code
66
github-code
1
[ { "api_name": "django.http.HttpResponse", "line_number": 9, "usage_type": "call" }, { "api_name": "models.MailingListGroup.objects.all", "line_number": 14, "usage_type": "call" }, { "api_name": "models.MailingListGroup.objects", "line_number": 14, "usage_type": "attribute...
22239787685
import numpy as np import codecs import sys import logging from nns import RecurrentNN from utils import Timer from dataproviders import TwitterApiDataProvider, TwitterTrainingDataProvider, DatasetBuilder logging.basicConfig(stream=sys.stderr) logger = logging.getLogger("root") logger.setLevel(logging.DEBUG) timer = T...
mishadev/stuff
tensorflow_tests/scripts/main.py
main.py
py
2,247
python
en
code
0
github-code
1
[ { "api_name": "logging.basicConfig", "line_number": 8, "usage_type": "call" }, { "api_name": "sys.stderr", "line_number": 8, "usage_type": "attribute" }, { "api_name": "logging.getLogger", "line_number": 9, "usage_type": "call" }, { "api_name": "logging.DEBUG", ...
264626137
from django.urls import path from . import views urlpatterns = [ path('school_list/', views.schList, name='schList'), #院校列表展示 path('edit_sch/', views.editSch, name='editSch'), #编辑院校信息 path('update_sch/', views.updateSch, name='updateSch'), path('detail_sch/', views.detailSch, name='detailSch'),...
zhouf1234/django_obj
school/urls.py
urls.py
py
2,415
python
kn
code
0
github-code
1
[ { "api_name": "django.urls.path", "line_number": 5, "usage_type": "call" }, { "api_name": "django.urls.path", "line_number": 7, "usage_type": "call" }, { "api_name": "django.urls.path", "line_number": 8, "usage_type": "call" }, { "api_name": "django.urls.path", ...
33810970716
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Mar 9 17:19:35 2020 Class Message - Access to elements of a message dict in ReDial - Methods: - @author: nicholas """ import json from nltk.tokenize import word_tokenize from nltk.stem.porter import PorterStemmer imp...
Vachonni/ReDial
Objects/Message.py
Message.py
py
4,340
python
en
code
0
github-code
1
[ { "api_name": "re.compile", "line_number": 36, "usage_type": "call" }, { "api_name": "json.load", "line_number": 40, "usage_type": "call" }, { "api_name": "nltk.stem.porter.PorterStemmer", "line_number": 114, "usage_type": "call" }, { "api_name": "Settings.genres"...
73506504353
from django.shortcuts import redirect, render from django.http import HttpResponse from apps.Habitacion.models import Habitacion from apps.Habitacion.form import HabitacionForm # Create your views here. def home(request): return render(request, 'base/base.html') def index(request): habitacion = Habit...
Daniel-Vega-Rojas/Actividad08_base
apps/Habitacion/views.py
views.py
py
1,899
python
es
code
1
github-code
1
[ { "api_name": "django.shortcuts.render", "line_number": 13, "usage_type": "call" }, { "api_name": "apps.Habitacion.models.Habitacion.objects.all", "line_number": 16, "usage_type": "call" }, { "api_name": "apps.Habitacion.models.Habitacion.objects", "line_number": 16, "usa...
9670033772
from ab5 import hgratient from typing import Optional import colorama import sys from pystyle import Center, Colorate, Colors, Write import tls_client import os def setTitle(title: Optional[any] = None): os.system("title "+title) setTitle("BitBoost V2 | Server Booster") def clear(): if sys.platform in ["linux...
BitStore-dev/BitBoost
BitBoost.py
BitBoost.py
py
4,595
python
en
code
84
github-code
1
[ { "api_name": "typing.Optional", "line_number": 10, "usage_type": "name" }, { "api_name": "os.system", "line_number": 11, "usage_type": "call" }, { "api_name": "sys.platform", "line_number": 18, "usage_type": "attribute" }, { "api_name": "os.system", "line_num...
34660031378
# -*- coding: utf-8 -*- import logging import os import unittest from linkml.generators.pythongen import PythonGenerator from linkml_runtime import SchemaView from linkml_owl.util.loader_wrapper import load_structured_file from linkml_owl.dumpers.owl_dumper import OWLDumper from funowl.converters.functional_converter ...
linkml/linkml-owl
tests/test_examples/test_rpg.py
test_rpg.py
py
1,849
python
en
code
9
github-code
1
[ { "api_name": "os.path.join", "line_number": 16, "usage_type": "call" }, { "api_name": "tests.INPUT_DIR", "line_number": 16, "usage_type": "argument" }, { "api_name": "os.path", "line_number": 16, "usage_type": "attribute" }, { "api_name": "os.path.join", "lin...
19209564635
from tkinter import * import matplotlib.pyplot as plt from PIL import ImageFilter,Image import numpy as np #import cv2 from IPython import get_ipython import pyperclip def input_emnist(st): #opening the input image to be predicted im_open = Image.open(st) im = Image.open(st).convert('LA') #conversi...
sg1498/EMNIST
final_PROJECT_KERAS.py
final_PROJECT_KERAS.py
py
6,648
python
en
code
1
github-code
1
[ { "api_name": "PIL.Image.open", "line_number": 11, "usage_type": "call" }, { "api_name": "PIL.Image", "line_number": 11, "usage_type": "name" }, { "api_name": "PIL.Image.open", "line_number": 12, "usage_type": "call" }, { "api_name": "PIL.Image", "line_number"...
11698126912
from cgi import test import torch import dataset import model import numpy as np import os import argparse device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu") parser = argparse.ArgumentParser() parser.add_argument("--dataset_name", default='PeMSD8', help='Dataset Name', type=str) args = parser.pars...
gortwwh/GMTSCLR
pretrain_vae.py
pretrain_vae.py
py
1,271
python
en
code
0
github-code
1
[ { "api_name": "torch.device", "line_number": 9, "usage_type": "call" }, { "api_name": "torch.cuda.is_available", "line_number": 9, "usage_type": "call" }, { "api_name": "torch.cuda", "line_number": 9, "usage_type": "attribute" }, { "api_name": "argparse.ArgumentPa...
16555099455
from copy import deepcopy from functools import reduce import numpy as np class Chromosome: def crossover(self, other): pass def mutate(self, step=None): pass def evaluate(self): pass class FloatChromosome(Chromosome): def __init__(self, ll, ul, degree, pm, b, crossover_fu...
hrkec/APR
Lab4/chromosome.py
chromosome.py
py
2,957
python
en
code
0
github-code
1
[ { "api_name": "numpy.random.uniform", "line_number": 23, "usage_type": "call" }, { "api_name": "numpy.random", "line_number": 23, "usage_type": "attribute" }, { "api_name": "copy.deepcopy", "line_number": 35, "usage_type": "call" }, { "api_name": "numpy.random.uni...
18084590411
import datetime,requests import pickle from pathlib import Path import requests import streamlit as st from streamlit_lottie import st_lottie import json import ssl,os,urllib import altair as alt import pandas as pd import numpy as np from matplotlib import pyplot as plt from PIL import Image from io import BytesIO # ...
williamc1998/ml-test
azuredash.py
azuredash.py
py
4,844
python
en
code
0
github-code
1
[ { "api_name": "streamlit.set_page_config", "line_number": 21, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 24, "usage_type": "call" }, { "api_name": "streamlit.container", "line_number": 32, "usage_type": "call" }, { "api_name": "streamlit....
40316461163
from tkinter import * import tkinter as tk from tkinter import ttk from tkinter import filedialog from tkinter import scrolledtext import time, datetime import threading import logging import soundfile as sf import numpy as np import os window = Tk() window.geometry('450x520') window.title('INotepad.cloud - Phần mềm ...
truyentdm/Apps
MergeAudio/MergeAudio.py
MergeAudio.py
py
4,725
python
en
code
1
github-code
1
[ { "api_name": "logging.basicConfig", "line_number": 31, "usage_type": "call" }, { "api_name": "logging.DEBUG", "line_number": 31, "usage_type": "attribute" }, { "api_name": "tkinter.filedialog.askdirectory", "line_number": 43, "usage_type": "call" }, { "api_name":...
9122061868
import numpy as np import pandas as pd import matplotlib.pyplot as plt import time import argparse import os import datetime from algorithms.kmeans import KMeans from algorithms.kmeanspp import KPlusPlus from algorithms.kmeansgraph import KMeansGraph from algorithms.kmeans_sa import KMeans_SA if __name__ == '__main__...
alepmaros/k-means
main.py
main.py
py
6,439
python
en
code
0
github-code
1
[ { "api_name": "argparse.ArgumentParser", "line_number": 16, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 37, "usage_type": "call" }, { "api_name": "os.path.split", "line_number": 38, "usage_type": "call" }, { "api_name": "os.path", "...
15866997363
import base64 import os import json def encode64_file(file_path): with open(file_path, "rb") as content_file: content = content_file.read() # print(content) encoded = base64.b64encode(content) return encoded.decode() def read_allfile(file_path): with open(file_path, "r") as c...
quydx/acme-client-restapi
apiserver/djangorest/rest/filelib.py
filelib.py
py
645
python
en
code
0
github-code
1
[ { "api_name": "base64.b64encode", "line_number": 10, "usage_type": "call" }, { "api_name": "json.loads", "line_number": 24, "usage_type": "call" } ]
42865082927
from flask import Flask, request, render_template import numpy as np import pandas as pd #import xgboost as xgb import joblib model = joblib.load('xgb_model.sav') app = Flask(__name__) @app.route('/') def home(): return render_template('home.html') @app.route('/prediction', methods=[ 'POST']) def prediction(): ...
riyag25/Customer-Churn-Prediction
app.py
app.py
py
2,912
python
en
code
0
github-code
1
[ { "api_name": "joblib.load", "line_number": 7, "usage_type": "call" }, { "api_name": "flask.Flask", "line_number": 9, "usage_type": "call" }, { "api_name": "flask.render_template", "line_number": 13, "usage_type": "call" }, { "api_name": "flask.request.values", ...
7518399441
import sys from collections import namedtuple, OrderedDict import atexit import logging from absl import flags import gin import numpy as np from pysc2.lib.features import parse_agent_interface_format, SCREEN_FEATURES, MINIMAP_FEATURES, Features, FeatureType from pysc2.env.environment import StepType from pysc2.lib.act...
sati290/sc2ai
sc2ai/environments/sc2env.py
sc2env.py
py
6,301
python
en
code
0
github-code
1
[ { "api_name": "collections.namedtuple", "line_number": 13, "usage_type": "call" }, { "api_name": "collections.namedtuple", "line_number": 14, "usage_type": "call" }, { "api_name": "collections.namedtuple", "line_number": 15, "usage_type": "call" }, { "api_name": "...
71217212195
import keyboard import time each_line = input("What to spam") amount = int(input("How many times")) print("you have 5 seconds to open whatever you want to spam") time.sleep(5) for i in range (1, amount): keyboard.write(each_line) keyboard.press('enter') print("Done")
GnomeyDev/PythonScripts
UniSpammer1.py
UniSpammer1.py
py
296
python
en
code
0
github-code
1
[ { "api_name": "time.sleep", "line_number": 8, "usage_type": "call" }, { "api_name": "keyboard.write", "line_number": 11, "usage_type": "call" }, { "api_name": "keyboard.press", "line_number": 12, "usage_type": "call" } ]