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
5682365879
# -*- coding: utf-8 -*- """ Created on Tue Apr 30 13:22:48 2019 @author: markn """ import urllib import ssl from bs4 import BeautifulSoup import mysql import mysql.connector connection = mysql.connector.connect(host='localhost', database='fantasylol', user='root', password='Marknazzaro13245') cursor = connection.c...
mnazzaro/FantasyLoLServer
GameScraper.py
GameScraper.py
py
2,835
python
en
code
0
github-code
71
[ { "api_name": "mysql.connector.connect", "line_number": 15, "usage_type": "call" }, { "api_name": "mysql.connector", "line_number": 15, "usage_type": "attribute" }, { "api_name": "ssl.create_default_context", "line_number": 53, "usage_type": "call" }, { "api_name"...
40798505510
from __future__ import division import matplotlib matplotlib.use('Qt5Agg') from PyQt5 import QtGui, QtCore, QtWidgets from PyQt5.QtCore import Qt import pyqtgraph as pg import pyqtgraph.exporters import pandas as pd import numpy as np from scipy.optimize import curve_fit from scipy.sparse import vstack #from scipy.misc...
nanoMFG/nanodiam
src/ndraman/ndraman.py
ndraman.py
py
16,461
python
en
code
0
github-code
71
[ { "api_name": "matplotlib.use", "line_number": 3, "usage_type": "call" }, { "api_name": "pyqtgraph.setConfigOption", "line_number": 36, "usage_type": "call" }, { "api_name": "pyqtgraph.setConfigOption", "line_number": 37, "usage_type": "call" }, { "api_name": "pyq...
28933488390
import logging import os from pathlib import Path import typer from ..TemplateLoader import TemplateLoader from ..TemplateOptions import TemplateOptions def validate( template_path: Path = typer.Argument( ..., help=("Local folder containing the Curvenote compatible template to validate"), ...
curvenote/jtex
jtex/cli/validate.py
validate.py
py
572
python
en
code
21
github-code
69
[ { "api_name": "pathlib.Path", "line_number": 12, "usage_type": "name" }, { "api_name": "typer.Argument", "line_number": 12, "usage_type": "call" }, { "api_name": "TemplateLoader.TemplateLoader.validate", "line_number": 22, "usage_type": "call" }, { "api_name": "Te...
73922312868
from __future__ import unicode_literals from contextlib import contextmanager import time from django import forms from django.conf import settings from django.contrib.admin import site from django.contrib.admin.tests import AdminSeleniumWebDriverTestCase from django.contrib.auth.models import User from django.core.u...
charettes/django-admin-enhancer
tests/tests.py
tests.py
py
4,871
python
en
code
59
github-code
71
[ { "api_name": "django.contrib.admin.tests.AdminSeleniumWebDriverTestCase", "line_number": 19, "usage_type": "name" }, { "api_name": "django.conf.settings.INSTALLED_APPS", "line_number": 20, "usage_type": "attribute" }, { "api_name": "django.conf.settings", "line_number": 20, ...
15320915618
from functools import wraps from django.http import HttpResponseRedirect import functools from django.core.exceptions import PermissionDenied def view_authorized(permissions=None): def has_permissions(request): perms = [] if permissions is not None: perms = permissions exist =...
ezrankayamba/twiga_pmt
users/decorators.py
decorators.py
py
840
python
en
code
0
github-code
69
[ { "api_name": "functools.reduce", "line_number": 16, "usage_type": "call" }, { "api_name": "django.core.exceptions.PermissionDenied", "line_number": 24, "usage_type": "call" } ]
2673754300
"""initial_empty Revision ID: fde77a68e3dd Revises: Create Date: 2022-12-05 17:14:59.972979 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'fde77a68e3dd' down_revision = None branch_labels = None depends_on = None def upgrade() -> None: # ### commands a...
czech-rep/warsaw-connector
alembic/versions/2022_12_05_1714-fde77a68e3dd_initial_empty.py
2022_12_05_1714-fde77a68e3dd_initial_empty.py
py
3,088
python
en
code
0
github-code
71
[ { "api_name": "alembic.op.create_table", "line_number": 21, "usage_type": "call" }, { "api_name": "alembic.op", "line_number": 21, "usage_type": "name" }, { "api_name": "sqlalchemy.Column", "line_number": 22, "usage_type": "call" }, { "api_name": "sqlalchemy.Integ...
25121346887
from fastapi import APIRouter, Depends, Body from fastapi.responses import JSONResponse from fastapi.encoders import jsonable_encoder from sqlalchemy.orm import Session import crud import schemas from api.deps import get_current_user, get_db from models import User, Order, OrderElement router = APIRouter( prefix=...
bloczito/ecommerce-shop-server-fastapi
api/orders.py
orders.py
py
1,679
python
en
code
1
github-code
69
[ { "api_name": "fastapi.APIRouter", "line_number": 11, "usage_type": "call" }, { "api_name": "fastapi.Depends", "line_number": 14, "usage_type": "call" }, { "api_name": "api.deps.get_current_user", "line_number": 14, "usage_type": "argument" }, { "api_name": "model...
9378253753
# Импортируем необходимые модули import os from sqlalchemy import Column, DateTime, ForeignKey, Integer, String, Float, create_engine from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import relationship, sessionmaker, Session from sqlalchemy.sql import func from dotenv import load_doten...
AIk1r/FastAPI_project
models.py
models.py
py
2,257
python
ru
code
0
github-code
69
[ { "api_name": "sqlalchemy.ext.declarative.declarative_base", "line_number": 10, "usage_type": "call" }, { "api_name": "dotenv.load_dotenv", "line_number": 13, "usage_type": "call" }, { "api_name": "os.getenv", "line_number": 16, "usage_type": "call" }, { "api_name...
33270642705
import json import os max_words = 1500 def readjson(input_path): with open(input_path, 'r', encoding="utf-8") as file: str = file.read() data = json.loads(str) return data def writejson(dataset, output_path): with open(output_path, 'w', encoding="utf-8") as file: for data in datase...
china-ai-law-challenge/CAIL2023
ssrd/baseline/dataproc/gendata_ev3.py
gendata_ev3.py
py
1,991
python
en
code
19
github-code
69
[ { "api_name": "json.loads", "line_number": 8, "usage_type": "call" }, { "api_name": "json.dumps", "line_number": 14, "usage_type": "call" }, { "api_name": "os.listdir", "line_number": 52, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 55,...
33171470475
from aiogram.types import InputFile from create_bot import bot from text import texts import keyboard async def send_message_start(message): await bot.send_video(message.from_user.id, video=InputFile(path_or_bytesio="Video.mp4"), caption=f"{texts['start']}", reply_markup=keyboard.kb_mark_main,) asyn...
OreoLand123/Your-Clinic
handlers.py
handlers.py
py
3,425
python
en
code
0
github-code
69
[ { "api_name": "create_bot.bot.send_video", "line_number": 10, "usage_type": "call" }, { "api_name": "create_bot.bot", "line_number": 10, "usage_type": "name" }, { "api_name": "aiogram.types.InputFile", "line_number": 10, "usage_type": "call" }, { "api_name": "text...
43094065464
#!/usr/bin/env python2 from pyspeedtest import SpeedTest from pyspeedtestconfig import credentials, timezone, logfilename import twitter import sys import arrow if __name__ == '__main__': api = twitter.Api(**credentials) st = SpeedTest() munits = "Mb/s" time = arrow.utcnow().to(timezone).format('YYYY/M...
poopgiggle/PySpeedTestTweeter
speedtester.py
speedtester.py
py
1,085
python
en
code
0
github-code
69
[ { "api_name": "twitter.Api", "line_number": 9, "usage_type": "call" }, { "api_name": "pyspeedtestconfig.credentials", "line_number": 9, "usage_type": "name" }, { "api_name": "pyspeedtest.SpeedTest", "line_number": 10, "usage_type": "call" }, { "api_name": "pyspeed...
8827896037
"""This module defines classes directly related HTTP request processing.""" import abc import datetime import sys import str_generator from database import MySQLDatabase from models import Session def status_description(status_code): """Return description of a specified HTTP status code.""" # Use attribute ...
lichuanzju/ngavatar
src/scripts/libs/ng/http.py
http.py
py
12,064
python
en
code
0
github-code
71
[ { "api_name": "datetime.timedelta", "line_number": 92, "usage_type": "call" }, { "api_name": "sys.stdout", "line_number": 202, "usage_type": "attribute" }, { "api_name": "abc.ABCMeta", "line_number": 241, "usage_type": "attribute" }, { "api_name": "abc.abstractmet...
72354529819
""" AVM SmartHome Actor ~~~~~~~~~~~~~~~~~~~ """ import logging logger = logging.getLogger(__name__) class Actor(object): """ Represents a single SmartHome actor. You usally don't create that class yourself, use FritzBox.get_actors instead. """ def __init__(self, fritzbox, device): ...
DerMitch/fritzbox-smarthome
fritzhome/actor.py
actor.py
py
5,649
python
en
code
49
github-code
69
[ { "api_name": "logging.getLogger", "line_number": 7, "usage_type": "call" } ]
22605029486
from selenium import webdriver import time import os # div 模块定位 # 如果页面有多个div,需要定位的元素在某一个div里,可以优先定位这个div,在此基础上再定位该元素 driver = webdriver.Firefox() file_path = 'file:///'+os.path.abspath("E:\\课件\\测试工具等\\selenium2html\\modal.html") driver.get(file_path) driver.maximize_window() time.sleep(3) # 点击主页的 click driver.find_e...
matilda-art/Software-test
selenium测试/operation/div.py
div.py
py
806
python
zh
code
0
github-code
69
[ { "api_name": "selenium.webdriver.Firefox", "line_number": 8, "usage_type": "call" }, { "api_name": "selenium.webdriver", "line_number": 8, "usage_type": "name" }, { "api_name": "os.path.abspath", "line_number": 9, "usage_type": "call" }, { "api_name": "os.path", ...
22846771585
import pokepy import asyncio your_window_name = "mGBA - 0.10.1" #replace 0.10.1 with your version game = pokepy.Game("mGBA - 0.10.1") #simple code that prompts you when it's your turn to play @game.event async def on_combat(): print(game.json_info) user_input = await asyncio.wait_for(asyncio.get_event_loop()...
NoodlesXNoodles/Pokepy-Controller
example.py
example.py
py
548
python
en
code
0
github-code
69
[ { "api_name": "pokepy.Game", "line_number": 6, "usage_type": "call" }, { "api_name": "asyncio.wait_for", "line_number": 12, "usage_type": "call" }, { "api_name": "asyncio.get_event_loop", "line_number": 12, "usage_type": "call" } ]
72838640869
""" WELCOME TO GROUP'S E SUPERVISED PCA This file contains the function PCAfunction that performs PCA on a data frame Inputs: - df: DATA FRAME subject of the PCA analysis - colstodiscard: LIST of columns of df excluded from PCA analysis - accuracy: NUMERIC value to indicate the selected accuracy of ...
iyadaqel/ManoelGadiFA
ManoelGadiFA/supervisedPCA.py
supervisedPCA.py
py
2,871
python
en
code
0
github-code
71
[ { "api_name": "sklearn.preprocessing.scale", "line_number": 50, "usage_type": "call" }, { "api_name": "sklearn.decomposition.PCA", "line_number": 53, "usage_type": "call" }, { "api_name": "numpy.cumsum", "line_number": 55, "usage_type": "call" }, { "api_name": "nu...
18294834287
from sklearn.metrics import pairwise_distances import numpy as np class MDS: def __init__(self, n_components=2, max_iter=300, eps=0.001): self.__n_components = n_components self.__max_iter = max_iter self.__eps = eps self.embedding_ = None self.stress_ = None def fit(self, X): X_distances ...
SnkhchyanV/Dimensional_Reduction_Algorithm
MDS.py
MDS.py
py
1,084
python
en
code
0
github-code
69
[ { "api_name": "sklearn.metrics.pairwise_distances", "line_number": 13, "usage_type": "call" }, { "api_name": "numpy.random.uniform", "line_number": 15, "usage_type": "call" }, { "api_name": "numpy.random", "line_number": 15, "usage_type": "attribute" }, { "api_nam...
17195326500
import os import server import unittest from unittest.mock import patch from server import checksum import tempfile import logging from lxml.etree import fromstring, tostring from formencode.doctest_xml_compare import xml_compare logging.basicConfig(level=logging.WARN) class MenuSystemTestCase(unittest.TestCase): ...
Mause/menu_system
test.py
test.py
py
6,098
python
en
code
0
github-code
69
[ { "api_name": "logging.basicConfig", "line_number": 11, "usage_type": "call" }, { "api_name": "logging.WARN", "line_number": 11, "usage_type": "attribute" }, { "api_name": "unittest.TestCase", "line_number": 14, "usage_type": "attribute" }, { "api_name": "server.a...
9064766531
import discord from discord.ext import commands import datetime class STREAM_INFO(commands.Cog): def __init__(self, bot): self.bot = bot @commands.command(name='twitch', help='Get the Twitch channel link.') async def twitch_link(self, ctx): twitch_url = "https://www.twitch.tv/lgodhatesmel"...
lGodHatesMel/RandomResources
Scripts/Bots/GHM_DiscordBot/cogs/streams.py
streams.py
py
1,153
python
en
code
0
github-code
69
[ { "api_name": "discord.ext.commands.Cog", "line_number": 5, "usage_type": "attribute" }, { "api_name": "discord.ext.commands", "line_number": 5, "usage_type": "name" }, { "api_name": "datetime.datetime.now", "line_number": 14, "usage_type": "call" }, { "api_name":...
11474912437
from sklearn.metrics import classification_report import torch import json import numpy as np from phobert_finetuned import PhoBERT_finetuned from transformers import AutoModel,AutoTokenizer import random device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') # Load train and validation dataset with op...
hkm15022001/Control_Smart_Home
predict_using_phobert_finetuned.py
predict_using_phobert_finetuned.py
py
1,631
python
en
code
0
github-code
71
[ { "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": "json.load", "li...
73360892060
import discord import os from discord import client from discord import channel from discord import message #import json #import requests #from keep_alive import keep_alive #COMMAND_PREFIX = "&" client = discord.Client() @client.event async def on_ready(): print("Bot is awake") @client.event async def on_message(m...
jeevesh2002/KodexBot
bot.py
bot.py
py
780
python
en
code
0
github-code
69
[ { "api_name": "discord.client", "line_number": 10, "usage_type": "name" }, { "api_name": "discord.Client", "line_number": 10, "usage_type": "call" }, { "api_name": "discord.client.event", "line_number": 12, "usage_type": "attribute" }, { "api_name": "discord.clien...
1265262116
import urllib.request import datetime import json from connection import * from functions import * import logging logging.basicConfig(filename='yttracker.log', level=logging.DEBUG, format='%(asctime)s %(levelname)s %(name)s %(message)s') logger = logging.getLogger(__name__) # establish db connect...
Abdullah-Al-Faysal/yt_trending_videos_crawler
channels.py
channels.py
py
2,608
python
en
code
0
github-code
69
[ { "api_name": "logging.basicConfig", "line_number": 9, "usage_type": "call" }, { "api_name": "logging.DEBUG", "line_number": 9, "usage_type": "attribute" }, { "api_name": "logging.getLogger", "line_number": 11, "usage_type": "call" }, { "api_name": "urllib.request...
41884428955
from django.urls import path, include from . import views app_name = 'core' urlpatterns = [ path('', views.homepage, name="home_page"), path('search/', views.AssessmentSearchView.as_view(), name="search"), path('answer/<int:id_>', views.viewAnswers, name='view_answers'), path('upload/', views.upload_p...
salahdin/otpss
otpss/core/urls.py
urls.py
py
925
python
en
code
0
github-code
69
[ { "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", ...
42580202775
import numpy as np import pandas as pd import sqlite3 from werkzeug.security import safe_str_cmp from flask_restful import Resource, reqparse from models.user import UserModel from flask_restplus import abort class CollegeData(Resource): parser = reqparse.RequestParser() parser.add_argument('caste', t...
RaviMrk/rest-api-flask
resources/clg.py
clg.py
py
3,377
python
en
code
0
github-code
69
[ { "api_name": "flask_restful.Resource", "line_number": 9, "usage_type": "name" }, { "api_name": "flask_restful.reqparse.RequestParser", "line_number": 10, "usage_type": "call" }, { "api_name": "flask_restful.reqparse", "line_number": 10, "usage_type": "name" }, { ...
10492400645
#!/usr/bin/env python from Adafruit_GPIO import I2C import logging import time # Register Addresses VL53L0X_REG_SYSRANGE_START = 0x00 VL53L0X_REG_SYSTEM_THRESH_HIGH = 0x0C VL53L0X_REG_SYSTEM_THRESH_LOW = 0x0E VL53L0X_REG_SYSTEM_SEQUENCE_CONFIG = 0x01 VL53L0X_REG_SYSTEM_RANGE_CONFIG = 0x09 VL53L0X_REG_SYSTEM_INTERMEA...
tyrm/Rover-A
rover_a/vl53l0x.py
vl53l0x.py
py
17,466
python
en
code
0
github-code
69
[ { "api_name": "logging.getLogger", "line_number": 116, "usage_type": "call" }, { "api_name": "Adafruit_GPIO.I2C", "line_number": 121, "usage_type": "name" }, { "api_name": "time.sleep", "line_number": 380, "usage_type": "call" }, { "api_name": "logging.warn", ...
25878130020
import logging logger = logging.getLogger(__name__) from book import book def manual_entry() -> book: ''' The user manually creates a new entry to be stored in the database. ''' title = input("Please enter the title of the book (leave blank if not " "known): ") title = title if le...
GNY-001F2/toshokan
manual_entry.py
manual_entry.py
py
2,852
python
en
code
0
github-code
69
[ { "api_name": "logging.getLogger", "line_number": 2, "usage_type": "call" }, { "api_name": "book.book", "line_number": 64, "usage_type": "call" }, { "api_name": "book.book", "line_number": 5, "usage_type": "name" } ]
16014984036
import numpy as np from keras.models import Sequential from keras.layers import Dense, Flatten, Conv2D, MaxPooling2D, Dropout from keras.datasets import fashion_mnist # 1. 데이터 (x_train, y_train), (x_test, y_test) = fashion_mnist.load_data() print(x_train.shape, y_train.shape) # (60000, 28, 28) (60000,) print(x_test.s...
bibibigg/bitcamp-AIstudy
cnn_study/tf01_cnn_fashionMnist.py
tf01_cnn_fashionMnist.py
py
1,454
python
en
code
0
github-code
69
[ { "api_name": "keras.datasets.fashion_mnist.load_data", "line_number": 7, "usage_type": "call" }, { "api_name": "keras.datasets.fashion_mnist", "line_number": 7, "usage_type": "name" }, { "api_name": "keras.models.Sequential", "line_number": 23, "usage_type": "call" }, ...
73189103908
import pygame class Menu(): down = pygame.transform.scale(pygame.image.load("Assets/base.png"), (300, 100)) flag = pygame.transform.scale(pygame.image.load("Assets/pngegg.png"), (600, 200)) flag_movement = (500, 100) game_over = pygame.transform.scale(pygame.image.load("Assets/gameover.png"), (...
mustafaozturkmen/Python
Simple Projects/flappy_bird/menu.py
menu.py
py
5,365
python
en
code
1
github-code
71
[ { "api_name": "pygame.transform.scale", "line_number": 5, "usage_type": "call" }, { "api_name": "pygame.transform", "line_number": 5, "usage_type": "attribute" }, { "api_name": "pygame.image.load", "line_number": 5, "usage_type": "call" }, { "api_name": "pygame.im...
72702152859
import os import coverage import unittest from flask.cli import FlaskGroup from api import create_app, db dir_path = os.path.dirname(os.path.realpath(__file__)) data_path = os.path.join(dir_path, "data") COV = coverage.coverage( branch=True, include='api/*', omit=[ 'tests/*', ...
ishiland/geonames-api
backend/manage.py
manage.py
py
6,219
python
en
code
1
github-code
69
[ { "api_name": "os.path.dirname", "line_number": 8, "usage_type": "call" }, { "api_name": "os.path", "line_number": 8, "usage_type": "attribute" }, { "api_name": "os.path.realpath", "line_number": 8, "usage_type": "call" }, { "api_name": "os.path.join", "line_n...
23045153982
from string import ascii_lowercase as letters import secrets class Cipher: def __init__(self, key = None): if key and (key.islower() and key.isalpha()): self.key = key else: self.key = "".join((secrets.choice(letters) for _ in range(100))) self.key_len = len(se...
kielbmich/Exercism
simple-cipher/simple_cipher.py
simple_cipher.py
py
1,028
python
en
code
0
github-code
71
[ { "api_name": "secrets.choice", "line_number": 11, "usage_type": "call" }, { "api_name": "string.ascii_lowercase", "line_number": 11, "usage_type": "argument" }, { "api_name": "string.ascii_lowercase.index", "line_number": 17, "usage_type": "call" }, { "api_name":...
2301116579
from django.conf.urls import url from django.urls import path from . import views app_name = 'app01' urlpatterns = [ path('sudoku', views.app_sudoku, name='sudoku'), path('sudoku_solve', views.app_sudoku_solve, name='sudoku_solve'), path('user', views.app_user, name='user'), path('icons', views.app_...
khosoi/sudoku
app01/urls.py
urls.py
py
727
python
en
code
0
github-code
71
[ { "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", "line_number": 10, "usage_type": "call" }, { "api_name": "django.urls.path", ...
24133716100
import logging import json from datetime import date from django.contrib.auth import authenticate, login, logout from django.contrib.auth.decorators import login_required, permission_required from django.contrib.auth.mixins import LoginRequiredMixin, PermissionRequiredMixin from django.http import HttpResponse, Http40...
zwj12/accounting
cash/views.py
views.py
py
3,334
python
en
code
0
github-code
71
[ { "api_name": "logging.getLogger", "line_number": 18, "usage_type": "call" }, { "api_name": "django.contrib.auth.mixins.PermissionRequiredMixin", "line_number": 21, "usage_type": "name" }, { "api_name": "django.views.generic.ListView", "line_number": 21, "usage_type": "at...
30192357462
import sys _module = sys.modules[__name__] del sys infer_pair = _module lib = _module data = _module loss = _module network = _module operation = _module trainer = _module util = _module general = _module global_norm = _module motion = _module visualization = _module render_interpolate = _module scripts = _module compu...
eladhoffer/pytorch-jit-paritybench
generated/test_yzhq97_transmomo_pytorch.py
test_yzhq97_transmomo_pytorch.py
py
29,525
python
en
code
null
github-code
71
[ { "api_name": "sys.modules", "line_number": 2, "usage_type": "attribute" }, { "api_name": "_paritybench_helpers.patch_functional", "line_number": 31, "usage_type": "call" }, { "api_name": "unittest.mock.mock_open", "line_number": 32, "usage_type": "call" }, { "api...
21325660248
import logging class logger: def __init__(self): self.logger = logging.getLogger(__name__) self.logger.setLevel(logging.DEBUG) formatter = '%(asctime)s:%(name)s:%(levelname)s:%(message)s' file_handler = logging.FileHandler('appLog.log') file_handler.setFormatter(formatte...
krishph/Python
logging/logger.py
logger.py
py
369
python
en
code
0
github-code
71
[ { "api_name": "logging.getLogger", "line_number": 8, "usage_type": "call" }, { "api_name": "logging.DEBUG", "line_number": 9, "usage_type": "attribute" }, { "api_name": "logging.FileHandler", "line_number": 12, "usage_type": "call" } ]
5415157508
import logging import sys from logging.config import dictConfig FORMAT = "%(message)s" dictConfig({ 'version': 1, 'formatters': { 'default': { 'format': FORMAT, }}, 'handlers': { 'wsgi': { 'class': 'logging.StreamHandler', 'stream': sys.stdout, ...
Alea4jacta6est/typical_ner
model_app/app/utils/logger.py
logger.py
py
477
python
ru
code
0
github-code
71
[ { "api_name": "logging.config.dictConfig", "line_number": 7, "usage_type": "call" }, { "api_name": "sys.stdout", "line_number": 16, "usage_type": "attribute" }, { "api_name": "logging.getLogger", "line_number": 25, "usage_type": "call" } ]
28797522424
#!/usr/bin/env python # -*- coding: utf-8 -*- """Tests del modulo pydatajson.""" from __future__ import print_function from __future__ import unicode_literals from __future__ import with_statement import os.path import unittest import nose import openpyxl as pyxl from pydatajson.helpers import fields_to_uppercase ...
datosgobar/pydatajson
tests/test_helpers.py
test_helpers.py
py
9,212
python
es
code
13
github-code
71
[ { "api_name": "unittest.TestCase", "line_number": 20, "usage_type": "attribute" }, { "api_name": "os.path.path.join", "line_number": 22, "usage_type": "call" }, { "api_name": "os.path.path", "line_number": 22, "usage_type": "attribute" }, { "api_name": "os.path", ...
36433265057
import cv2 import mediapipe as mp # Video capture settings cap = cv2.VideoCapture(0) cap.set(3, 640) cap.set(4, 480) # Pose definitions mpPose = mp.solutions.pose pose = mpPose.Pose() mpDraw = mp.solutions.drawing_utils while cap.read(): # Reading frame success, img = cap.read() # It's optional, we ...
turgay2317/opencv-python-examples
Example 10 - Pose Estimation (Hug yourself)/example.py
example.py
py
1,717
python
en
code
4
github-code
71
[ { "api_name": "cv2.VideoCapture", "line_number": 5, "usage_type": "call" }, { "api_name": "mediapipe.solutions", "line_number": 10, "usage_type": "attribute" }, { "api_name": "mediapipe.solutions", "line_number": 12, "usage_type": "attribute" }, { "api_name": "cv2...
270973666
import cv2 frame = cv2.imread("../img/papas.jpg") kernel_size = (7,7) blur = cv2.GaussianBlur(frame, kernel_size, 0) ############################# #TO-DO apply multiple filters ############################# cv2.imshow("Frame", frame) cv2.imshow("Blur", blur) cv2.waitKey(0) cv2.destroyAllWindows()
LuisFonti/ComputerVisionCourse
code/filter.py
filter.py
py
305
python
de
code
null
github-code
71
[ { "api_name": "cv2.imread", "line_number": 3, "usage_type": "call" }, { "api_name": "cv2.GaussianBlur", "line_number": 6, "usage_type": "call" }, { "api_name": "cv2.imshow", "line_number": 15, "usage_type": "call" }, { "api_name": "cv2.imshow", "line_number": ...
9055838391
import progressbar import torch import youtokentome as yttm from morpho_common import SimpleKBVocab, build_kinlp_morpho_lib, RichParsedToken, parse_raw_text_lines from kinyabert_utils import read_lines,time_now def parse_documents_corpus(home_path, in_file_path, out_file_path): print(time_now(),'Processing', in_...
anzeyimana/kinyabert-acl2022
code/process_parsed_only_corpus.py
process_parsed_only_corpus.py
py
3,985
python
en
code
14
github-code
71
[ { "api_name": "kinyabert_utils.time_now", "line_number": 10, "usage_type": "call" }, { "api_name": "youtokentome.BPE", "line_number": 13, "usage_type": "call" }, { "api_name": "morpho_common.SimpleKBVocab", "line_number": 15, "usage_type": "call" }, { "api_name": ...
31622587328
# @Time : 2022-08-20 21:28 # @Author : Phalange # @File : 1475. 商品折扣后的最终价格.py # @Software: PyCharm # C'est la vie,enjoy it! :D from typing import List class Solution: def finalPrices(self, prices: List[int]) -> List[int]: n = len(prices) ans = [0] *n stack = [] for i in range(n): ...
enternityFan/LeetCodePythonVersion
单调栈/1475. 商品折扣后的最终价格.py
1475. 商品折扣后的最终价格.py
py
663
python
en
code
0
github-code
71
[ { "api_name": "typing.List", "line_number": 10, "usage_type": "name" } ]
13592101237
def limpar(): arquivo = open('txtRegistro.txt','w') print('\n Processo de limpeza realizado com sucesso!') arquivo.close() def dia(): import time dia = time.ctime() if 'Sun' in dia: return 'DOM' elif 'Mon' in dia: return 'SEG' elif 'Tue' in dia: return...
jmurilojm/estudos_Python
txtRegistro.py
txtRegistro.py
py
2,349
python
en
code
0
github-code
71
[ { "api_name": "time.ctime", "line_number": 10, "usage_type": "call" }, { "api_name": "datetime.datetime.now", "line_number": 31, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 31, "usage_type": "name" }, { "api_name": "datetime.datetime....
20616624581
from django.urls import path from . import views from .views import ProductListView, ProductDetailView app_name = 'inventory' urlpatterns = [ path("employee/", views.employee, name="employee"), path("category/", views.category, name="category"), path("products/", ProductListView.as_view(), name="product_l...
FX2One/fx-django-ecommerce-app
fxecommerce/inventory/urls.py
urls.py
py
420
python
en
code
0
github-code
71
[ { "api_name": "django.urls.path", "line_number": 8, "usage_type": "call" }, { "api_name": "views.employee", "line_number": 8, "usage_type": "attribute" }, { "api_name": "django.urls.path", "line_number": 9, "usage_type": "call" }, { "api_name": "views.category", ...
18591514661
import numpy as np from sklearn.base import BaseEstimator, TransformerMixin import matplotlib.pyplot as plt import seaborn as sns; sns.set() class GaussianFeatures(BaseEstimator, TransformerMixin): """Uniformly spaced Gaussian features for one-dimensional input""" def __init__(self, N, width_factor=2.0): ...
sundeshgupta/Machine-Learning-Toolkit
cgi-bin/utils.py
utils.py
py
1,768
python
en
code
0
github-code
71
[ { "api_name": "seaborn.set", "line_number": 4, "usage_type": "call" }, { "api_name": "sklearn.base.BaseEstimator", "line_number": 6, "usage_type": "name" }, { "api_name": "sklearn.base.TransformerMixin", "line_number": 6, "usage_type": "name" }, { "api_name": "num...
11499773423
from django.shortcuts import render from datetime import datetime , timedelta # Create your views here. def seting(request): # there the request came response = render(request , 'set.html') # response.set_cookie('name' , 'ritik' ,max_age=60) # response.set_cookie('iname' , 'ritik' ,expires=datetime.utcn...
ritiksharmaaa/learn_django
learn/cookies/demo/views.py
views.py
py
1,248
python
en
code
0
github-code
71
[ { "api_name": "django.shortcuts.render", "line_number": 8, "usage_type": "call" }, { "api_name": "datetime.datetime.utcnow", "line_number": 11, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 11, "usage_type": "name" }, { "api_name": "dat...
7957078476
import collections import os class IsoCreator(object): def __init__(self, source_dir, target_file, executor=None): self.source_dir = source_dir self.target_file = target_file self.executor = executor def create(self): self.executor([ 'mkisofs', '-r', ...
lakat/unattended-iso
uiso/iso.py
iso.py
py
3,256
python
en
code
1
github-code
71
[ { "api_name": "collections.namedtuple", "line_number": 87, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 95, "usage_type": "call" }, { "api_name": "os.path", "line_number": 95, "usage_type": "attribute" }, { "api_name": "os.path.dirname", ...
40246641337
import json import random import uuid from datetime import date, datetime from enum import Enum from typing import List, Optional, Dict from sqlalchemy import and_, outerjoin from sqlalchemy.ext.asyncio import AsyncSession from sqlalchemy.future import select from helpers.session_context import SessionContext#, join, o...
derivative-programming/Farm-Py-SqlAlchemy-FastApi
managers/organization.py
organization.py
py
12,860
python
en
code
0
github-code
71
[ { "api_name": "services.logging_config.get_logger", "line_number": 17, "usage_type": "call" }, { "api_name": "helpers.session_context.SessionContext", "line_number": 22, "usage_type": "name" }, { "api_name": "services.db_config.db_dialect", "line_number": 28, "usage_type"...
32244380922
import numpy as np import os from keras.models import Sequential, load_model from keras.layers import Dense, Conv2D, Flatten, MaxPool2D, Dropout from keras.optimizers import Adam, SGD import cv2 def create_model(): model = Sequential() model.add(Dense(1056, activation="relu", input_shape=(32, 33))) model....
CasJanse/super_hexagon_AI
number_recognition.py
number_recognition.py
py
1,113
python
en
code
0
github-code
71
[ { "api_name": "keras.models.Sequential", "line_number": 10, "usage_type": "call" }, { "api_name": "keras.layers.Dense", "line_number": 11, "usage_type": "call" }, { "api_name": "keras.layers.Flatten", "line_number": 12, "usage_type": "call" }, { "api_name": "keras...
31759223370
import sys from collections import deque def part1(grid,max_x,max_y): part1 = 0 for xa in range(max_x+1): for ya in range(max_y+1): if grid[(xa,ya)][0] > 0: #non-empty for xb in range(max_x+1): for yb in range(max_y+1): if (xa,ya) ...
andrewfroehlich/AdventOfCode
2016/problem22.py
problem22.py
py
2,609
python
en
code
0
github-code
71
[ { "api_name": "collections.deque", "line_number": 18, "usage_type": "call" } ]
39409723162
import requests import json port = 59224 baseUrl = 'http://localhost:{}/'.format(port) # Check if Bottango is currently able to animate # # response data: # bool canAnimate requestUrl = baseUrl + 'CanAnimate/' try: response = requests.get(requestUrl) response.raise_for_status() responseData = response.json() pri...
EvanBottango/Bottango
PlaybackControlAPI/Example_CanAnimate.py
Example_CanAnimate.py
py
466
python
en
code
11
github-code
71
[ { "api_name": "requests.get", "line_number": 14, "usage_type": "call" }, { "api_name": "requests.exceptions", "line_number": 19, "usage_type": "attribute" } ]
6395888470
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Date : 2016-01-01 10:10:32 # @Author : Zhaifg (zhaifengguo@foxmail.com) # @Link : http://htop.me # @Version : $Id$ import threading import time import logging logging.basicConfig(level=logging.DEBUG, format='(%(threadingName)-10s) %(message)s...
zhaifg/skills-and-tutorial
Python/Python Module/threading_daemon.py
threading_daemon.py
py
645
python
en
code
1
github-code
71
[ { "api_name": "logging.basicConfig", "line_number": 12, "usage_type": "call" }, { "api_name": "logging.DEBUG", "line_number": 12, "usage_type": "attribute" }, { "api_name": "logging.debug", "line_number": 16, "usage_type": "call" }, { "api_name": "time.sleep", ...
22212340741
import datetime import stashy from pybitbucket37.auth import BasicAuthenticator from pybitbucket37.bitbucket import Client from pybitbucket37.repository import Repository, RepositoryRole from pybitbucket37.team import Team from pybitbucket37.pullrequest import PullRequest XLS_DATE_FORMAT = "%Y-%m-%d %H:%M:%S" ISO_DATE...
cormaxed/bitbucket-helper
helperlib/bitbucket/bitbucket_api.py
bitbucket_api.py
py
6,000
python
en
code
1
github-code
71
[ { "api_name": "stashy.connect", "line_number": 57, "usage_type": "call" }, { "api_name": "datetime.datetime.utcfromtimestamp", "line_number": 86, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 86, "usage_type": "attribute" }, { "api_name...
41995942954
import argparse from pyspark.sql import functions as f from pyspark.sql.dataframe import DataFrame from pyspark.sql import SparkSession import pendulum def operacao_agrupada(df_param: DataFrame) -> DataFrame: """Função para gerar o dataframe de operação agrupado Args: df_param (DataFrame): dataframe ...
rodrigorocha1/monitoramento_sptrans
src/data_transform/tranformacao_dataframe.py
tranformacao_dataframe.py
py
6,267
python
pt
code
0
github-code
71
[ { "api_name": "pyspark.sql.dataframe.DataFrame", "line_number": 8, "usage_type": "name" }, { "api_name": "pyspark.sql.functions.explode", "line_number": 17, "usage_type": "call" }, { "api_name": "pyspark.sql.functions", "line_number": 17, "usage_type": "name" }, { ...
15960931293
# https://leetcode.com/problems/reverse-string/ from typing import List class ReverseString: @staticmethod def reverse_string(s: List[str]) -> None: s.reverse() if __name__ == '__main__': test = ReverseString() test_string = ["h", "e", "l", "l", "o"] test.reverse_string(test_string) ...
antykwar/python-algorithms
leetcode_tasks/reverse_string.py
reverse_string.py
py
340
python
en
code
0
github-code
71
[ { "api_name": "typing.List", "line_number": 8, "usage_type": "name" } ]
71693791269
from selenium.webdriver.chrome.options import Options from selenium import webdriver import time import pymysql from Libsql import create_table,insert_into,update from urllib.robotparser import RobotFileParser #______________________________________________________________________________# class DataColumn: ''' ...
GaboUCR/Web-Scraping-with-Python
Virginia Listing practice/Libselenium.py
Libselenium.py
py
9,049
python
en
code
0
github-code
71
[ { "api_name": "urllib.robotparser.RobotFileParser", "line_number": 52, "usage_type": "call" }, { "api_name": "selenium.webdriver.chrome.options.Options", "line_number": 102, "usage_type": "call" }, { "api_name": "selenium.webdriver.Chrome", "line_number": 106, "usage_type...
6444246511
import numpy as np from PIL import Image from scipy.signal import convolve2d import matplotlib.pyplot as plt import pickle import DataHandler import logging logger = logging.getLogger('root.' + __name__) logger.addHandler(logging.NullHandler()) def flipped(matrix): """ Flip matrix horizontally and vertically...
matkrak/enlargeme
CCRBM.py
CCRBM.py
py
21,472
python
en
code
3
github-code
71
[ { "api_name": "logging.getLogger", "line_number": 10, "usage_type": "call" }, { "api_name": "logging.NullHandler", "line_number": 11, "usage_type": "call" }, { "api_name": "numpy.ndarray", "line_number": 19, "usage_type": "call" }, { "api_name": "numpy.exp", "...
16412560675
import sys, os, stat, glob, importlib.util, importlib, subprocess this_path = os.path.dirname(os.path.abspath(__file__)) sys.path.append(os.path.join(this_path, "..", "infra")) import infra def import_file(filepath): name = os.path.splitext(os.path.split(filepath)[1])[0] spec = importlib.util.spec_from_file_...
shooshx/led_console
launcher/main.py
main.py
py
5,510
python
en
code
0
github-code
71
[ { "api_name": "os.path.dirname", "line_number": 3, "usage_type": "call" }, { "api_name": "os.path", "line_number": 3, "usage_type": "attribute" }, { "api_name": "os.path.abspath", "line_number": 3, "usage_type": "call" }, { "api_name": "sys.path.append", "line...
29971594539
import numpy as np import torch from torch.utils.data import Dataset, DataLoader import pandas as pd import os import glob as glob import skimage.io as io from skimage.transform import resize # import albumentations as A # from albumentations.pytorch import ToTensorV2 from src.config import CLASSES, RESIZE_TO, TRAIN...
spinonoir/hlc-polyp-detection
data_utils/old/MaskedPolypDataset.py
MaskedPolypDataset.py
py
3,664
python
en
code
2
github-code
71
[ { "api_name": "torch.utils.data.Dataset", "line_number": 16, "usage_type": "name" }, { "api_name": "os.path.join", "line_number": 20, "usage_type": "call" }, { "api_name": "os.path", "line_number": 20, "usage_type": "attribute" }, { "api_name": "os.path.join", ...
40336395966
from tkinter import * # библиотека import requests # библиотека def get_crypt(): # функция """ДАННАЯ ФУНКЦИЯ ВЫПОЛНЯЕТ ПАРСИНГ КРИПТОВАЛЮТЫ С САЙТА COINMARKETCAP""" global info # переменная global metka # переменная metka.destroy() # удаляет метку при повторном получаении информации о криптовалюте l...
Pashitza/Fill
Pars.py
Pars.py
py
2,299
python
ru
code
0
github-code
71
[ { "api_name": "requests.get", "line_number": 9, "usage_type": "call" } ]
7476517871
import sys import nltk.data from nltk.tokenize import sent_tokenize tokenizer = nltk.data.load('tokenizers/punkt/japanese.pickle') SAMPLE_SIZE = 1024 sample = sys.stdin.read(SAMPLE_SIZE) while sample: tokenized_sents = tokenizer.tokenize(sample) for sentence in tokenized_sents: sys.stdout.write(sent...
samagino/SP19-LING-L445
01_Tokenisation/punkt_segmenter.py
punkt_segmenter.py
py
375
python
en
code
0
github-code
71
[ { "api_name": "nltk.data.data.load", "line_number": 5, "usage_type": "call" }, { "api_name": "nltk.data.data", "line_number": 5, "usage_type": "attribute" }, { "api_name": "nltk.data", "line_number": 5, "usage_type": "name" }, { "api_name": "sys.stdin.read", "...
11209920535
import torch from torch import nn import torch.nn.functional as F from torch.nn import BatchNorm1d from torch.nn import Sequential, Linear, ReLU from torch_geometric.nn import GINConv, global_add_pool, global_mean_pool class GIN(torch.nn.Module): def __init__(self, dim_features, dim_target, model_configs, datase...
CAVED123/MolRep111
MolRep/Models/graph_based/GIN.py
GIN.py
py
4,386
python
en
code
1
github-code
71
[ { "api_name": "torch.nn", "line_number": 9, "usage_type": "attribute" }, { "api_name": "torch_geometric.nn.global_add_pool", "line_number": 24, "usage_type": "name" }, { "api_name": "torch_geometric.nn.global_mean_pool", "line_number": 26, "usage_type": "name" }, { ...
10762409448
from unittest.mock import MagicMock, patch import pytest from app.domain.entities import Tank from app.domain.enums import Direction from app.domain.utils import Size, Vector class _ModulePatch: _PATH = "app.domain.entities.tank" BULLET_FACTORY = f"{_PATH}.BulletFactory" class TestsTank: @patch(_Modul...
aleshabrave/battle_city
tests/domain/entities/test_tank.py
test_tank.py
py
1,906
python
en
code
0
github-code
71
[ { "api_name": "unittest.mock.MagicMock", "line_number": 18, "usage_type": "call" }, { "api_name": "app.domain.entities.Tank.__post_init__", "line_number": 20, "usage_type": "call" }, { "api_name": "app.domain.entities.Tank", "line_number": 20, "usage_type": "name" }, ...
6125207221
import os import sys import collections import numpy as np import matplotlib.pyplot as plt from sklearn.model_selection import train_test_split class scoring(): # This class includes all helper functions that can be used to assess performance of culling technique def __init__(self, featureNames): ...
Samwich1998/Stress-Analysis-Head
_Supplementary/Blink Identification/featureSelection.py
featureSelection.py
py
16,202
python
en
code
3
github-code
71
[ { "api_name": "collections.Counter", "line_number": 36, "usage_type": "call" }, { "api_name": "collections.Counter", "line_number": 37, "usage_type": "call" }, { "api_name": "collections.Counter", "line_number": 45, "usage_type": "call" }, { "api_name": "collectio...
40231391727
import numpy as np import gym import matplotlib.pyplot as plt if __name__ == "__main__": ENV = gym.make("FrozenLake-v0") DISCOUNT = 0.9 EPSILON = 0.1 POSSIBLE_ACTIONS = [0, 1, 2, 3] STATE_SPACE = list(range(16)) ESTIMATES = {} RETURNS = {} PAIRS_VISITED = {} for state in STATE_SPAC...
paulfioravanti/Reinforcement-Learning-In-Motion
Unit-6-The-Windy-Gridworld/frozen_lake.py
frozen_lake.py
py
2,935
python
en
code
1
github-code
71
[ { "api_name": "gym.make", "line_number": 6, "usage_type": "call" }, { "api_name": "numpy.random.choice", "line_number": 23, "usage_type": "call" }, { "api_name": "numpy.random", "line_number": 23, "usage_type": "attribute" }, { "api_name": "numpy.array", "line...
9417810258
import os from argparse import ArgumentParser import datasets import yaml from togepi.data_processors.tokenizers.tokenizer import TogepiTokenizer from togepi.utils.utils import set_seed def main(config_path, hf_dataset_path, path_to_store_hf_tokenizer): set_seed(seed=42) with open(config_path, 'r') as fp: ...
TushaarGVS/togepi
scripts/data_preprocessing/build_tokenizer.py
build_tokenizer.py
py
1,216
python
en
code
0
github-code
71
[ { "api_name": "togepi.utils.utils.set_seed", "line_number": 12, "usage_type": "call" }, { "api_name": "yaml.safe_load", "line_number": 15, "usage_type": "call" }, { "api_name": "datasets.load_from_disk", "line_number": 17, "usage_type": "call" }, { "api_name": "to...
23748863264
# get the data needed to plot the TEP with a quiver plot on top of it import numpy as np #import pickle import os import pandas as pd import csv from scipy.interpolate import interp1d import sys sys.path.insert(0,'../../functions') # so I can import the functions from cycle_funcs import calc_fitness, calc_dfitness, s...
nadiahpk/sumatran-dispersal-dimorphism
scripts/circular/find_dimorph_isocline_1_0.py
find_dimorph_isocline_1_0.py
py
6,113
python
en
code
0
github-code
71
[ { "api_name": "sys.path.insert", "line_number": 11, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 11, "usage_type": "attribute" }, { "api_name": "pandas.read_csv", "line_number": 49, "usage_type": "call" }, { "api_name": "pandas.read_csv", "...
33892293657
import json import random with open('data/LLMScience.json',encoding='utf-8') as f: datas = json.load(f) datas = datas[:200] # datas = random.sample(datas, 5) prompt = """Question: {} A: {} B: {} C: {} D: {} E: {} Answer: {}""" # 筛选出所有答案为A,B,C,D,E的数据 data_A = [item for item in datas if item['answer'] == 'A'] da...
GasolSun36/llm_science
utils/sample_few_shot.py
sample_few_shot.py
py
1,323
python
en
code
0
github-code
71
[ { "api_name": "json.load", "line_number": 5, "usage_type": "call" }, { "api_name": "random.choice", "line_number": 31, "usage_type": "call" }, { "api_name": "random.choice", "line_number": 32, "usage_type": "call" }, { "api_name": "random.choice", "line_number...
70515990630
import json # результат матча file_name1 = "processed_data (1).json" # исходники для матчера file_name2 = "input_data.json" with open(file_name1, 'r+', encoding='utf-8') as file1: with open(file_name2, 'r', encoding='utf-8') as file2: print(type(file1)) file1 = json.load(file1) file2 = jso...
BlekDark/matcher
Microservices/parser_pair_csv_to_json/add_true_pair.py
add_true_pair.py
py
1,646
python
en
code
0
github-code
71
[ { "api_name": "json.load", "line_number": 9, "usage_type": "call" }, { "api_name": "json.load", "line_number": 10, "usage_type": "call" }, { "api_name": "json.dump", "line_number": 36, "usage_type": "call" } ]
17572631429
import matplotlib.pyplot as plt import numpy as np import tensorflow as tf from sklearn import metrics import pandas as pd import pickle from keras.optimizers import Adam from keras.models import Model from keras.layers import Dense from keras.layers import Input from keras.layers import Flatten from keras.layers imp...
tumng2002/csse4011-thor-gold
ml_model/ml_model.py
ml_model.py
py
5,024
python
en
code
0
github-code
71
[ { "api_name": "keras.layers.Input", "line_number": 20, "usage_type": "call" }, { "api_name": "keras.layers.Conv2D", "line_number": 21, "usage_type": "call" }, { "api_name": "keras.layers.Dropout", "line_number": 22, "usage_type": "call" }, { "api_name": "keras.lay...
75080717349
from selenium import webdriver import time browser = webdriver.Chrome('C://Users//20143//Desktop//chromedriver.exe') browser.get("https://basecamp.robolink.com/cwists/category#products=%5B1%5D&selected_sort_by=alphabetical") time.sleep(5) button = browser.find_element_by_xpath('//*[@id="activity-search-results...
hazelZzang/Crawling
crawler.py
crawler.py
py
1,412
python
en
code
0
github-code
71
[ { "api_name": "selenium.webdriver.Chrome", "line_number": 4, "usage_type": "call" }, { "api_name": "selenium.webdriver", "line_number": 4, "usage_type": "name" }, { "api_name": "time.sleep", "line_number": 7, "usage_type": "call" }, { "api_name": "time.sleep", ...
27130263298
import numpy as np import pandas as pd from sqlalchemy import create_engine, MetaData, Table, Column, Integer, \ String, Float, DateTime, ForeignKeyConstraint, ForeignKey,\ Enum, UniqueConstraint, Boolean from geoalchemy2 import Geometry import website.models as m # Pand...
npmcdn-to-unpkg-bot/mircs-geogenealogy
mircsgeo/website/table_generator.py
table_generator.py
py
7,176
python
en
code
0
github-code
71
[ { "api_name": "sqlalchemy.Integer", "line_number": 21, "usage_type": "name" }, { "api_name": "sqlalchemy.Float", "line_number": 22, "usage_type": "name" }, { "api_name": "sqlalchemy.DateTime", "line_number": 23, "usage_type": "name" }, { "api_name": "sqlalchemy.St...
29515190212
# Author : Tim Destan # Feature based clusterer from collections import defaultdict from qbcommon import all_pairs_symmetric from featurespace import * import logging logger = logging.getLogger("FeatureClusterer") class ScoreTypes(object): DISTANCE = "DISTANCE" SIMILARITY = "SIMILARITY" class GuidGenerator(obje...
timdestan/quiz-bowl-entity-resolution
cluster.py
cluster.py
py
9,300
python
en
code
1
github-code
71
[ { "api_name": "logging.getLogger", "line_number": 9, "usage_type": "call" }, { "api_name": "collections.defaultdict", "line_number": 53, "usage_type": "call" }, { "api_name": "qbcommon.all_pairs_symmetric", "line_number": 158, "usage_type": "call" } ]
13050103713
from typing import Optional, Dict, Any from django.contrib.auth.models import AnonymousUser from users.models import JustfixUser class GraphQLStaticRequest: """ This represents a GraphQL request made on behalf of front-end code that is trying to generate static content--such as a PDF or email text--a...
JustFixNYC/tenants2
project/graphql_static_request.py
graphql_static_request.py
py
1,220
python
en
code
23
github-code
71
[ { "api_name": "typing.Optional", "line_number": 25, "usage_type": "name" }, { "api_name": "users.models.JustfixUser", "line_number": 25, "usage_type": "name" }, { "api_name": "typing.Optional", "line_number": 26, "usage_type": "name" }, { "api_name": "typing.Dict"...
10876392821
import os import sys import logging import json config_logger = logging.getLogger("main") class Configuration(): @property def DEBUG(self): if "WINGDB_ACTIVE" in os.environ: return False else: return True @property def TESTING(self): return False @property def DATABASE_URI(s...
jaimeviloria/flask-riak-mcollective-ldap3
app/models/config.py
config.py
py
1,283
python
en
code
0
github-code
71
[ { "api_name": "logging.getLogger", "line_number": 6, "usage_type": "call" }, { "api_name": "os.environ", "line_number": 12, "usage_type": "attribute" }, { "api_name": "os.environ", "line_number": 23, "usage_type": "attribute" }, { "api_name": "json.loads", "li...
69849810149
from datetime import date from decimal import Decimal from django.test import TestCase from charcoallog.investments.forms import InvestmentDetailsForm from charcoallog.investments.models import NewInvestmentDetails class InvestmentDetailsFormTest(TestCase): def test_form_has_fields(self): """ Form must ...
hpfn/charcoallog
charcoallog/investments/tests/test_investment_detail_form.py
test_investment_detail_form.py
py
1,866
python
en
code
4
github-code
71
[ { "api_name": "django.test.TestCase", "line_number": 10, "usage_type": "name" }, { "api_name": "charcoallog.investments.forms.InvestmentDetailsForm", "line_number": 13, "usage_type": "call" }, { "api_name": "django.test.TestCase", "line_number": 22, "usage_type": "name" ...
27632437785
import pandas as pd import matplotlib import matplotlib.pyplot as plt import os directory = os.fsencode('../stations/') l = [] for s in os.listdir(directory): s = s.decode('ascii') if s.startswith('augusta'): l.append(s) l.sort() files = [] for i in range(len(l)): files.append(pd.read_csv('../stations/'+l[i], de...
elevitanz/Extreme_Events_Sicily
SI/augusta_full_view/global.py
global.py
py
2,265
python
en
code
0
github-code
71
[ { "api_name": "os.fsencode", "line_number": 6, "usage_type": "call" }, { "api_name": "os.listdir", "line_number": 8, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 15, "usage_type": "call" }, { "api_name": "pandas.concat", "line_number...
31065257078
# -*- coding: utf-8 -*- import matplotlib.pyplot as plt import numpy as np import pandas as pd import scipy as sp import scipy.stats ''' Git command line: git add 'baseball_data.py' git commit -m 'initial commit' git remote add origin https://github.com/cjpeck/baseball_data.git git push -u origin master ''' def get...
cjpeck/baseball_data
baseball_data.py
baseball_data.py
py
10,122
python
en
code
0
github-code
71
[ { "api_name": "numpy.sum", "line_number": 46, "usage_type": "call" }, { "api_name": "pandas.DataFrame", "line_number": 57, "usage_type": "call" }, { "api_name": "pandas.DataFrame", "line_number": 58, "usage_type": "call" }, { "api_name": "pandas.Series", "line...
20508252548
from datetime import datetime from pynput.keyboard import Key, Controller import time, os keyboard = Controller() browser = "google-chrome" # replace it with your browser link = "jcx-sgnp-dra" # set your link here meet_time = ("12:14:30") # set your time here def presstabkey(num, tym, keys): time.slee...
A-L-V-I-N/gmeet_automate
gmeet_automate_linx.py
gmeet_automate_linx.py
py
673
python
en
code
0
github-code
71
[ { "api_name": "pynput.keyboard.Controller", "line_number": 4, "usage_type": "call" }, { "api_name": "time.sleep", "line_number": 12, "usage_type": "call" }, { "api_name": "pynput.keyboard.Key.enter", "line_number": 17, "usage_type": "attribute" }, { "api_name": "p...
37359988795
import grpc import pytest from couchers import errors from couchers.db import session_scope from couchers.models import Cluster, User from couchers.servicers.admin import Admin from proto import admin_pb2, admin_pb2_grpc from tests.test_fixtures import db, generate_user, get_user_id_and_token, real_session, testconfig...
chrisschaaf/couchers
app/backend/src/tests/test_admin.py
test_admin.py
py
5,937
python
en
code
null
github-code
71
[ { "api_name": "pytest.fixture", "line_number": 12, "usage_type": "call" }, { "api_name": "tests.test_fixtures.real_session", "line_number": 61, "usage_type": "call" }, { "api_name": "proto.admin_pb2_grpc.add_AdminServicer_to_server", "line_number": 61, "usage_type": "attr...
12285667767
#!/usr/bin/env python import pika import sys, time, datetime from pathlib import Path # Se o cliente for executado no windows ou Visual Studio Code, descomentar a linha abaixo #sys.path.insert(0, str(Path().resolve())) # Se o cliente for executado no linux, descomentar a linha abaixo sys.path.insert(0, str(Path().reso...
raphaelcomph-dev/TCC
AMQP/client.py
client.py
py
3,228
python
pt
code
0
github-code
71
[ { "api_name": "sys.path.insert", "line_number": 9, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 9, "usage_type": "attribute" }, { "api_name": "pathlib.Path", "line_number": 9, "usage_type": "call" }, { "api_name": "data.Data", "line_number"...
32848493052
from PyQt5.QtCore import Qt from PyQt5.QtWidgets import QApplication, QWidget, QLabel, QPushButton, QVBoxLayout app = QApplication([]) main_win = QWidget() main_win.setWindowTitle('TRASH') main_win.resize(400, 250) label = QLabel("Натисни щоб дізнатись переможця") result = QLabel("?") btn = QPushButto...
BruhWaxie/window
program.py
program.py
py
529
python
en
code
0
github-code
71
[ { "api_name": "PyQt5.QtWidgets.QApplication", "line_number": 5, "usage_type": "call" }, { "api_name": "PyQt5.QtWidgets.QWidget", "line_number": 6, "usage_type": "call" }, { "api_name": "PyQt5.QtWidgets.QLabel", "line_number": 12, "usage_type": "call" }, { "api_nam...
22276260522
import numpy as np import pandas as pd import pytest from sklearn.base import clone from sklearn.pipeline import Pipeline from sklearn.utils.estimator_checks import check_estimator from feature_engine.timeseries.forecasting import ( ExpandingWindowFeatures, LagFeatures, WindowFeatures, ) from tests.estimat...
feature-engine/feature_engine
tests/test_time_series/test_forecasting/test_check_estimator_forecasting.py
test_check_estimator_forecasting.py
py
2,152
python
en
code
1,587
github-code
71
[ { "api_name": "feature_engine.timeseries.forecasting.LagFeatures", "line_number": 16, "usage_type": "call" }, { "api_name": "feature_engine.timeseries.forecasting.WindowFeatures", "line_number": 17, "usage_type": "call" }, { "api_name": "feature_engine.timeseries.forecasting.Expa...
34107899843
import sys from PyQt5.QtWidgets import * from PyQt5.QtGui import * from PyQt5.QtCore import Qt from PyQt5 import uic import pandas as pd import openpyxl import datetime as pydatetime form_class = uic.loadUiType("ui/main_page_test.ui")[0] class WindowClass(QMainWindow, form_class) : def __init__(self) : s...
PsycIT/Edu_Exp_App
tmp/main_only_page.py
main_only_page.py
py
1,758
python
en
code
0
github-code
71
[ { "api_name": "PyQt5.uic.loadUiType", "line_number": 11, "usage_type": "call" }, { "api_name": "PyQt5.uic", "line_number": 11, "usage_type": "name" }, { "api_name": "pandas.DataFrame", "line_number": 21, "usage_type": "call" }, { "api_name": "datetime.datetime.tod...
40308018977
import math import numpy as np import matplotlib.pyplot as plt File = open("Galaxy1.txt","r") next(File) radius=[] V=[] mV=[] m=[] DMmassV=[] CmassV=[] #m[radius.index(i)]+ 4*math.pi*(100*10**6)*(1.87**2)*(i-1.87*np.arctan(i/1.87)) for i in File.readlines(): radius.append(float(i.split()[0])) V.append(floa...
Emlyn25/Physics-project-code-and-images
Q9_10_11.py
Q9_10_11.py
py
1,082
python
en
code
0
github-code
71
[ { "api_name": "math.sqrt", "line_number": 24, "usage_type": "call" }, { "api_name": "math.pi", "line_number": 24, "usage_type": "attribute" }, { "api_name": "numpy.arctan", "line_number": 24, "usage_type": "call" }, { "api_name": "math.sqrt", "line_number": 26...
3912305531
from enum import IntEnum import requests import time import json import logging import os logger = logging.getLogger('charger') logger.setLevel(logging.INFO) from sink import Sink data_override_file="debug_data.json" MIN_AMP=6 TIMEOUT_DETECT_VEHICLE = 60 TIMEOUT_WAIT_FOR_PLUG_IN = 12 UPHYSTERESIS = 20 DOWNHYSTERESIS ...
amandebu/pichaco3
charger.py
charger.py
py
15,842
python
en
code
0
github-code
71
[ { "api_name": "logging.getLogger", "line_number": 7, "usage_type": "call" }, { "api_name": "logging.INFO", "line_number": 8, "usage_type": "attribute" }, { "api_name": "enum.IntEnum", "line_number": 22, "usage_type": "name" }, { "api_name": "enum.IntEnum", "li...
31564588326
# -*- coding: utf-8 -*- # https://github.com/latefyr/kicadcreo.git # MIT license # # Parse Creo Schematic cable file and take harness numbers and # wire/cable lengths back to Kicad schematic. # # Do not overwrite the original Schematic. # # Copyright (C) LasseFyr 2019. # # This has been tested only with Cr...
lassefyr/kicadToCreo
xmlReadCreo.py
xmlReadCreo.py
py
22,591
python
en
code
3
github-code
71
[ { "api_name": "os.path.exists", "line_number": 61, "usage_type": "call" }, { "api_name": "os.path", "line_number": 61, "usage_type": "attribute" }, { "api_name": "shutil.move", "line_number": 62, "usage_type": "call" }, { "api_name": "os.path.exists", "line_nu...
3900162868
from django.shortcuts import render, redirect from .models import Show from django.contrib import messages def shows(request): context = { "shows":Show.objects.all() } return render(request, "index.html", context) def index(request): return redirect("/shows") def new_show(request): return...
edanik90/pythonStack
django/djangoFullStack/tv_shows_project/tv_shows_app/views.py
views.py
py
1,916
python
en
code
0
github-code
71
[ { "api_name": "models.Show.objects.all", "line_number": 7, "usage_type": "call" }, { "api_name": "models.Show.objects", "line_number": 7, "usage_type": "attribute" }, { "api_name": "models.Show", "line_number": 7, "usage_type": "name" }, { "api_name": "django.shor...
28267958268
#!/usr/bin/env python # -*- coding:utf-8 -*- import re import requests import os import base64 #导入thrift的python模块 from thrift import Thrift from thrift.transport import TSocket from thrift.transport import TTransport from thrift.protocol import TBinaryProtocol #导入编译生成的hbase 模块 from myThrift.hbase import THBaseService...
AlvisZhao/TrainingSpider
Python2Hbase/myThrift/SpiderNum01.py
SpiderNum01.py
py
4,711
python
en
code
0
github-code
71
[ { "api_name": "requests.get", "line_number": 25, "usage_type": "call" }, { "api_name": "re.findall", "line_number": 27, "usage_type": "call" }, { "api_name": "thrift.transport.TSocket.TSocket", "line_number": 47, "usage_type": "call" }, { "api_name": "thrift.trans...
41044906912
import requests from bs4 import BeautifulSoup products_to_track = [ { "URL":"https://www.nike.com/in/t/air-jordan-1-mid-se-shoes-CQ6f9G/DV1308-104", "Price":"12295.00", "Target_price":13000.00 }, { "URL":"https://www.nike.com/in/t/air-jordan-1-mid-shoes-SQf7DM/DQ...
AdithyaMarla/WebScrapingProject
main.py
main.py
py
1,890
python
en
code
0
github-code
71
[ { "api_name": "requests.get", "line_number": 37, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_number": 38, "usage_type": "call" } ]
20177498223
# encoding=utf-8 __author__ = 'YiTao' import os import sys import logging from datetime import * class LogHelper: def __init__(self): self.log = self.getlog() def info(self, message): self.log.info(message) def error(self, message): self.log.error(message) def getlog(self):...
mike-hmr/Python-PythonDemo
loghelper.py
loghelper.py
py
1,241
python
en
code
0
github-code
71
[ { "api_name": "logging.getLogger", "line_number": 21, "usage_type": "call" }, { "api_name": "logging.Formatter", "line_number": 22, "usage_type": "call" }, { "api_name": "os.path.exists", "line_number": 24, "usage_type": "call" }, { "api_name": "os.path", "lin...
20622106705
from datetime import datetime from bson import ObjectId import ext_requests.mongodb_client as db def mongo_upsert_cluster(cluster_ip, message): db.app.logger.info("MONGODB - upserting cluster...") clusters = db.mongo_clusters.db.clusters cluster_info = message['cluster_info'] cluster_name = message[...
oakestra/oakestra
root_orchestrator/system-manager-python/ext_requests/cluster_db.py
cluster_db.py
py
4,016
python
en
code
29
github-code
71
[ { "api_name": "ext_requests.mongodb_client.app.logger.info", "line_number": 9, "usage_type": "call" }, { "api_name": "ext_requests.mongodb_client.app", "line_number": 9, "usage_type": "attribute" }, { "api_name": "ext_requests.mongodb_client", "line_number": 9, "usage_typ...
8444218647
import datetime from django.db import models from django.shortcuts import render_to_response, get_object_or_404 from django.template import RequestContext from django.views.decorators.cache import cache_page from bios.models import Bio from competitions.models import Competition from games.models import Game, GameSou...
SoccerStatsUS/s2
games/views.py
views.py
py
6,044
python
en
code
0
github-code
71
[ { "api_name": "competitions.models.Competition.objects.get", "line_number": 23, "usage_type": "call" }, { "api_name": "competitions.models.Competition.objects", "line_number": 23, "usage_type": "attribute" }, { "api_name": "competitions.models.Competition", "line_number": 23,...
42190612784
#!/usr/bin/env python # coding: utf-8 # # Remarks # # * Data normalization # * Mobilenet expects data from -1 to 1 # * Normalize Input Data or Include in Model # * TFLite Conversion must fit according to decision # * Ground Truth Data: for better inspection Data multiplied by 80. Undo the chan...
muedavid/SGED
python scripts/CASENet.py
CASENet.py
py
18,803
python
en
code
0
github-code
71
[ { "api_name": "os.environ", "line_number": 47, "usage_type": "attribute" }, { "api_name": "argparse.ArgumentParser", "line_number": 57, "usage_type": "call" }, { "api_name": "tensorflow.random.set_seed", "line_number": 174, "usage_type": "call" }, { "api_name": "t...
33041578464
from django.contrib.auth.views import LoginView from django.urls import path from cinema.views import ( IndexView, MovieDetailView, SessionDetailView, CreateUserView, TicketListView, LogoutView, ) urlpatterns = [ path("", IndexView.as_view(), name="index"), path("accounts/login/", Logi...
oleksiikolii/pet-movie-theatre
cinema/urls.py
urls.py
py
791
python
en
code
0
github-code
71
[ { "api_name": "django.urls.path", "line_number": 14, "usage_type": "call" }, { "api_name": "cinema.views.IndexView.as_view", "line_number": 14, "usage_type": "call" }, { "api_name": "cinema.views.IndexView", "line_number": 14, "usage_type": "name" }, { "api_name":...
9423636712
import unittest import data class TestData(unittest.TestCase): def test_batch(self): sequences = [el.split() for el in \ ['I love it', 'My name is Earl', 'Whose line is it anyway', 'As you like it', 'Everybody']] words = list(set([el for lis in sequences for el in lis])) ...
PabloMosUU/BibleWordPasting
unit_tests/test_data.py
test_data.py
py
4,530
python
en
code
0
github-code
71
[ { "api_name": "unittest.TestCase", "line_number": 4, "usage_type": "attribute" }, { "api_name": "data.PAD_TOKEN", "line_number": 10, "usage_type": "attribute" }, { "api_name": "data.START_OF_VERSE_TOKEN", "line_number": 11, "usage_type": "attribute" }, { "api_name...
25019118927
import numpy as np import pytest import torch from torch.utils.data import DataLoader from ml_recon.utils.collate_function import collate_fn from ml_recon.dataset.fastMRI_dataset import FastMRIDataset from ml_recon.dataset.self_supervised_decorator import UndersampleDecorator ACS_LINES = 10 @pytest.fixture def data...
brendo-k/mri_machine_learning_reconstruction
test/Datasets/test_undersampling_decorator.py
test_undersampling_decorator.py
py
1,860
python
en
code
0
github-code
71
[ { "api_name": "torch.manual_seed", "line_number": 15, "usage_type": "call" }, { "api_name": "ml_recon.dataset.fastMRI_dataset.FastMRIDataset", "line_number": 16, "usage_type": "call" }, { "api_name": "ml_recon.dataset.self_supervised_decorator.UndersampleDecorator", "line_num...
71438259430
from api_yamdb.settings import REGEX_USERNAME from django.core.exceptions import ValidationError class ValidateUsername: """ Валидатор для username. """ def validate_username(self, username): if not REGEX_USERNAME.fullmatch(username): raise ValidationError( f'Некорр...
Khryashoff/api_yamdb
api_yamdb/users/validators.py
validators.py
py
556
python
ru
code
0
github-code
71
[ { "api_name": "api_yamdb.settings.REGEX_USERNAME.fullmatch", "line_number": 10, "usage_type": "call" }, { "api_name": "api_yamdb.settings.REGEX_USERNAME", "line_number": 10, "usage_type": "name" }, { "api_name": "django.core.exceptions.ValidationError", "line_number": 11, ...
27562605295
import json from tqdm import tqdm from anlp_project.datasets.europarl import EuroParlRaw def main(): """ Converts dataset to jsonlines format needed for baseline++ training """ dataset = EuroParlRaw() with open("dataset.jsonl", "w") as f: for de, en in tqdm(dataset): f.w...
yoogottamk/anlp-project
anlp_project/datasets/convert-to-jsonl.py
convert-to-jsonl.py
py
423
python
en
code
1
github-code
71
[ { "api_name": "anlp_project.datasets.europarl.EuroParlRaw", "line_number": 14, "usage_type": "call" }, { "api_name": "tqdm.tqdm", "line_number": 16, "usage_type": "call" }, { "api_name": "json.dumps", "line_number": 17, "usage_type": "call" } ]
19567013386
import nidaqmx import torch import numpy as np import time from nidaqmx.constants import AcquisitionType, TerminalConfiguration from collections import deque from sklearn.preprocessing import StandardScaler import matplotlib.pyplot as plt from matplotlib.animation import FuncAnimation from LSTMmodel import Gai...
hyungseokR/estimation_gait_speed_practice
gait_speed_est_practice/speed_estimation_real_time.py
speed_estimation_real_time.py
py
3,246
python
en
code
0
github-code
71
[ { "api_name": "LSTMmodel.GaitLSTM", "line_number": 27, "usage_type": "call" }, { "api_name": "torch.load", "line_number": 28, "usage_type": "call" }, { "api_name": "torch.device", "line_number": 30, "usage_type": "call" }, { "api_name": "torch.cuda.is_available", ...
26570805170
import numpy as np import scipy.sparse as sps try: from petsc4py import PETSc except ImportError: print("No PETSc. Bicstab solver wont work") try: import pyamg except ImportError: print("No pyamg. amg solver wont work") try: import pypardiso except ImportError: print("No pypardis. pardiso solv...
rbe051/ViscFrac
utils/linear_solvers.py
linear_solvers.py
py
3,031
python
en
code
0
github-code
71
[ { "api_name": "pyamg.smoothed_aggregation_solver", "line_number": 24, "usage_type": "call" }, { "api_name": "pypardiso.spsolve", "line_number": 41, "usage_type": "call" }, { "api_name": "scipy.sparse.linalg.spilu", "line_number": 45, "usage_type": "call" }, { "api...
23233521045
# coding=utf-8 import codecs import os import pymssql import sys import uuid from com.database.ConnectDataBase import ConnectionDatabase # 设置默认编码 from xml.etree import ElementTree import xlrd ''' 数据库连接 ''' def getConnect_new(): __conn = ConnectionDatabase("localhost", "sa", "11111", "EpointOATest3") retu...
YichangYin/python_demo
com/analysisi/base.py
base.py
py
4,195
python
en
code
0
github-code
71
[ { "api_name": "com.database.ConnectDataBase.ConnectionDatabase", "line_number": 18, "usage_type": "call" }, { "api_name": "com.database.ConnectDataBase.ConnectionDatabase", "line_number": 22, "usage_type": "call" }, { "api_name": "os.listdir", "line_number": 31, "usage_ty...