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
34137846255
import time from selenium import webdriver import os import requests from selenium.webdriver.chrome.service import Service from selenium.webdriver.common.by import By from selenium.common.exceptions import NoSuchElementException # Set the path to the ChromeDriver executable chrome_driver_path = r"C:\Users\Tahsin\Deskt...
tahsinsoyak/trendyol-scrapping
scrapper.py
scrapper.py
py
4,402
python
en
code
0
github-code
18
[ { "api_name": "selenium.webdriver.chrome.service.Service", "line_number": 13, "usage_type": "call" }, { "api_name": "selenium.webdriver.Chrome", "line_number": 19, "usage_type": "call" }, { "api_name": "selenium.webdriver", "line_number": 19, "usage_type": "name" }, {...
36630542653
from rest_framework.serializers import ModelSerializer from apps.recipe.models.biscuit_recipe import BiscuitRecipe from api.biscuit.serializers.biscuit import BiscuitModelSerializer from api.product.serializers.product import ProductModelSerializer class BiscuitRecipeSerializer(ModelSerializer): class Meta: ...
Aziz0507/beckend
api/recipe/serializers/biscuit_recipe.py
biscuit_recipe.py
py
839
python
en
code
1
github-code
18
[ { "api_name": "rest_framework.serializers.ModelSerializer", "line_number": 8, "usage_type": "name" }, { "api_name": "apps.recipe.models.biscuit_recipe.BiscuitRecipe", "line_number": 10, "usage_type": "name" }, { "api_name": "rest_framework.serializers.ModelSerializer", "line_...
10251740913
""" Author: Aaron Hakrider Date: 9/27/18 Worked with Joy Shaffer for assistance """ from LFSR_LAB import lfsr import argparse def main(): parser = argparse.ArgumentParser() parser.add_argument("n_bits", type=int, help="number of bits") args = parser.parse_args() # call my program output = my_pr...
awharkrider/CPSC_3320_Cybersecurity_Lab
LFSR_LAB/lab_program.py
lab_program.py
py
1,053
python
en
code
1
github-code
18
[ { "api_name": "argparse.ArgumentParser", "line_number": 13, "usage_type": "call" }, { "api_name": "LFSR_LAB.lfsr.LFSR", "line_number": 34, "usage_type": "call" }, { "api_name": "LFSR_LAB.lfsr", "line_number": 34, "usage_type": "name" } ]
75383217959
import openai import chromadb from dotenv import load_dotenv from .variables import OPENAI_API_KEY from langchain.vectorstores import Chroma from langchain.docstore.document import Document from langchain.embeddings.openai import OpenAIEmbeddings from langchain.text_splitter import RecursiveCharacterTextSplitter lo...
ganiyuolalekan/fastdoc_app
modules/vector_db_funcs.py
vector_db_funcs.py
py
6,276
python
en
code
0
github-code
18
[ { "api_name": "dotenv.load_dotenv", "line_number": 13, "usage_type": "call" }, { "api_name": "openai.api_key", "line_number": 15, "usage_type": "attribute" }, { "api_name": "variables.OPENAI_API_KEY", "line_number": 15, "usage_type": "name" }, { "api_name": "chrom...
3422067705
#!/usr/bin/env python # coding: utf-8 # In[1]: ### chi-squared distribution and test import numpy as np # In[2]: data1 = np.random.chisquare(df = 1,size = 1000) data2 = np.random.chisquare(df = 2,size = 1000) data3 = np.random.chisquare(df = 3,size = 1000) # In[3]: print(data1[:10]) # In[4]: import matpl...
Ayiekoo/z-t-tests
chi_squared test.py
chi_squared test.py
py
1,159
python
en
code
0
github-code
18
[ { "api_name": "numpy.random.chisquare", "line_number": 14, "usage_type": "call" }, { "api_name": "numpy.random", "line_number": 14, "usage_type": "attribute" }, { "api_name": "numpy.random.chisquare", "line_number": 15, "usage_type": "call" }, { "api_name": "numpy...
39804828727
#!/usr/bin/env python # coding: utf-8 # In[ ]: import os import json import csv from pathlib import Path cwd_path = Path.cwd() if os.path.exists(cwd_path / "metadata_config.py"): try: from metadata_config import * except ModuleNotFoundError: print("Please make sure to create a file called me...
zakhikhan/chia-nft-minting-helper
generate_metadata.py
generate_metadata.py
py
2,850
python
en
code
13
github-code
18
[ { "api_name": "pathlib.Path.cwd", "line_number": 11, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_number": 11, "usage_type": "name" }, { "api_name": "os.path.exists", "line_number": 13, "usage_type": "call" }, { "api_name": "os.path", "line_numb...
41767964002
""" theme file """ import ptah import sqlalchemy as sqla from pyramid.threadlocal import get_current_registry from permissions import AddThemeFile ThemeFileSchema = ptah.form.Fieldset( ptah.form.TextField( 'version', title = u'Version'), ptah.form.FileField( 'data', title =...
cleder/ploud.themegallery
ploud/themegallery/themefile.py
themefile.py
py
1,362
python
en
code
null
github-code
18
[ { "api_name": "ptah.form.Fieldset", "line_number": 10, "usage_type": "call" }, { "api_name": "ptah.form", "line_number": 10, "usage_type": "attribute" }, { "api_name": "ptah.form.TextField", "line_number": 12, "usage_type": "call" }, { "api_name": "ptah.form", ...
36519676990
from random import choice, random, sample import numpy as np import networkx as nx class ArmBaseStruct(object): def __init__(self, armID): self.armID = armID self.totalReward = 0.0 self.numPlayed = 0 self.averageReward = 0.0 self.p_max = 1 def update...
HCDM/BanditLib
OnlineInfluenceMaximization/BanditAlg/greedy.py
greedy.py
py
2,237
python
en
code
314
github-code
18
[ { "api_name": "random.random", "line_number": 21, "usage_type": "call" }, { "api_name": "random.random", "line_number": 22, "usage_type": "call" }, { "api_name": "networkx.DiGraph", "line_number": 42, "usage_type": "call" } ]
25869805589
from json import loads from functools import cmp_to_key from math import prod def comp(left, right): left, right = left[::-1], right[::-1] while left and right: a, b = left.pop(), right.pop() if isinstance(a, int) and isinstance(b, int): if a != b: return -1 if a < ...
alexcsf/aoc2022
day13/main.py
main.py
py
1,277
python
en
code
1
github-code
18
[ { "api_name": "json.loads", "line_number": 31, "usage_type": "call" }, { "api_name": "functools.cmp_to_key", "line_number": 33, "usage_type": "call" }, { "api_name": "math.prod", "line_number": 36, "usage_type": "call" } ]
7570106980
from django.contrib import admin from .models import Product # enable tax @admin.action(description='tax on') def tax_status_on(modeladmin, request, queryset): queryset.update(tax_status=True) # disable tax @admin.action(description='tax off') def tax_status_off(modeladmin, request, queryset): queryset.upda...
hanifeh/CRM
product/admin.py
admin.py
py
926
python
en
code
1
github-code
18
[ { "api_name": "django.contrib.admin.action", "line_number": 6, "usage_type": "call" }, { "api_name": "django.contrib.admin", "line_number": 6, "usage_type": "name" }, { "api_name": "django.contrib.admin.action", "line_number": 12, "usage_type": "call" }, { "api_na...
4916303448
import re, email.utils n = int(input()) format_emaildata=[] emaildata = [input() for _ in range(n)] for i in emaildata: x = email.utils.parseaddr(i) format_emaildata.append(x) pattern = re.compile(r'(^[a-zA-Z][a-zA-Z0-9\-+._]+@[a-z]+\.[a-z]+$)') print('\n') for i in format_emaildata: match = pattern.search(i[1]) ...
reachabhi/python
practice_exercises/regex/hackerrank_5_emailaddress.py
hackerrank_5_emailaddress.py
py
382
python
en
code
0
github-code
18
[ { "api_name": "email.utils.utils.parseaddr", "line_number": 6, "usage_type": "call" }, { "api_name": "email.utils.utils", "line_number": 6, "usage_type": "attribute" }, { "api_name": "email.utils", "line_number": 6, "usage_type": "name" }, { "api_name": "re.compil...
27032135766
from pyramid.response import Response from pyramid.view import view_config from sqlalchemy.exc import DBAPIError from sqlalchemy import func from ..models.mymodel import TblPatient from collections import OrderedDict import logging log = logging.getLogger(__name__) @view_config(route_name='home', renderer='../templ...
muhakbaryasin/kamdabase3
kamdabase3/views/default.py
default.py
py
1,846
python
en
code
0
github-code
18
[ { "api_name": "logging.getLogger", "line_number": 11, "usage_type": "call" }, { "api_name": "collections.OrderedDict", "line_number": 17, "usage_type": "call" }, { "api_name": "collections.OrderedDict", "line_number": 21, "usage_type": "call" }, { "api_name": "mod...
21892040894
#!/usr/bin/python import os, sys, socket, getpass from lib import fstab, ping, sge, network, hosts, nodelist # Make sure the script is being run as root whoami = getpass.getuser() if whoami != 'root': print('This script must be run as root') sys.exit() else: print('Running as root... OK') # Get the na...
wilsonmichaelc/sge-admin-tools
add_node.py
add_node.py
py
1,952
python
en
code
0
github-code
18
[ { "api_name": "getpass.getuser", "line_number": 7, "usage_type": "call" }, { "api_name": "sys.exit", "line_number": 11, "usage_type": "call" }, { "api_name": "socket.gethostname", "line_number": 16, "usage_type": "call" }, { "api_name": "lib.ping.host_alive", ...
71547748199
#%% # Carl Klier - Graph Coloring Annealing for Network Science Final Exam import networkx as nx import matplotlib.pyplot as plt import numpy as np import random import math import json import sys # nodes = ['a', 'b', 'c'] # edges = [('a', 'b'), ('a', 'c'), ('b', 'c')] # nodes = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h...
carlklier/GraphColoringMonteCarloAnnealing
annealing.py
annealing.py
py
2,808
python
en
code
0
github-code
18
[ { "api_name": "json.load", "line_number": 21, "usage_type": "call" }, { "api_name": "networkx.Graph", "line_number": 22, "usage_type": "call" }, { "api_name": "random.seed", "line_number": 39, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.figure", "...
41861557074
#from msilib.schema import Error import requests from bs4 import BeautifulSoup import re import json from openpyxl import load_workbook from datetime import datetime import time from telegram import Bot import logging import os try: import config except: pass try: token = os.environ.get('TOKEN') except: ...
sziyan/lenovo-tools
warranty.py
warranty.py
py
10,023
python
en
code
0
github-code
18
[ { "api_name": "os.environ.get", "line_number": 20, "usage_type": "call" }, { "api_name": "os.environ", "line_number": 20, "usage_type": "attribute" }, { "api_name": "telegram.Bot", "line_number": 24, "usage_type": "call" }, { "api_name": "logging.basicConfig", ...
8383396030
import time import json import re import urllib2 import bleach import html5lib import webapp2 from lib import markdown from google.appengine.api import channel from google.appengine.ext import ndb from google.appengine.api import urlfetch from lib.github import github import config import web.forms as forms from w...
kordless/stackmonkey-site
web/handlers/projecthandlers.py
projecthandlers.py
py
15,975
python
en
code
0
github-code
18
[ { "api_name": "web.basehandler.BaseHandler", "line_number": 26, "usage_type": "name" }, { "api_name": "web.models.models.User.get_by_id", "line_number": 30, "usage_type": "call" }, { "api_name": "web.models.models.User", "line_number": 30, "usage_type": "name" }, { ...
74588139238
import numpy as np import matplotlib.pyplot as plt ###################Calcul et tracé de la fonction############################## t=np.linspace(0,0.2,1000) xi_d=0.2 w0_d=204 K_d=2 s=K_d*(1-np.exp(-w0_d*xi_d*t)/np.sqrt(1-xi_d**2)*np.cos(w0_d*np.sqrt(1-xi_d**2)*t\ -...
Costadoat/Informatique
DS/Annees_precedentes/2019-2020/DS01/DS01.py
DS01.py
py
2,014
python
zh
code
0
github-code
18
[ { "api_name": "numpy.linspace", "line_number": 5, "usage_type": "call" }, { "api_name": "numpy.exp", "line_number": 9, "usage_type": "call" }, { "api_name": "numpy.sqrt", "line_number": 9, "usage_type": "call" }, { "api_name": "numpy.cos", "line_number": 9, ...
213879556
import sys sys.path.append('/Users/admin/Documents/Diploma/tcn/') import argparse import tensorflow as tf import numpy as np from tf_version.model import TCN from utils import data_generator, get_logger logger = get_logger("music_test_tensorflow") parser = argparse.ArgumentParser(description='Sequence Modeling - Po...
oshyshkin/tcn
tf_version/music_test.py
music_test.py
py
5,456
python
en
code
0
github-code
18
[ { "api_name": "sys.path.append", "line_number": 2, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 2, "usage_type": "attribute" }, { "api_name": "utils.get_logger", "line_number": 11, "usage_type": "call" }, { "api_name": "argparse.ArgumentParser"...
2466832564
import mysql.connector import datetime from tabulate import tabulate con=mysql.connector.connect(host="localhost", user="root", password="87654321", database="practice") cur=con.cursor() def menu(): print('~'*120) pr...
archanadby05/Hotel-management-system
Hotel Py MSI.py
Hotel Py MSI.py
py
10,443
python
en
code
0
github-code
18
[ { "api_name": "mysql.connector.connector.connect", "line_number": 4, "usage_type": "call" }, { "api_name": "mysql.connector.connector", "line_number": 4, "usage_type": "attribute" }, { "api_name": "mysql.connector", "line_number": 4, "usage_type": "name" }, { "api...
25365196565
from asyncio import run from re import findall from traceback import format_exc from discord import Embed from discord.ext.commands import Cog from discord.ext.tasks import loop from discord_components_mirror import Button, ButtonStyle from pymongo import DESCENDING from mlpbots import DB, logs, FOOTER async def pa...
JackieWaltRyan/mlpbots
modules/game.py
game.py
py
11,078
python
ru
code
2
github-code
18
[ { "api_name": "mlpbots.DB", "line_number": 16, "usage_type": "name" }, { "api_name": "mlpbots.DB", "line_number": 17, "usage_type": "name" }, { "api_name": "discord.Embed", "line_number": 18, "usage_type": "call" }, { "api_name": "discord_components_mirror.Button"...
19734628520
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('MyPlan', '0006_sprints'), ] operations = [ migrations.AlterField( model_name='singl...
waldemar-m/Django
DIX/MyPlan/migrations/0007_auto_20180113_1556.py
0007_auto_20180113_1556.py
py
446
python
en
code
0
github-code
18
[ { "api_name": "django.db.migrations.Migration", "line_number": 8, "usage_type": "attribute" }, { "api_name": "django.db.migrations", "line_number": 8, "usage_type": "name" }, { "api_name": "django.db.migrations.AlterField", "line_number": 15, "usage_type": "call" }, {...
25217176702
# https://leetcode.com/problems/best-meeting-point/ # tags: #google, #math, #matrix # # Manhattan distance: (p1, p2) = |p2.x - p1.x| + |p2.y - p1.y| # The optimal point is the mean # For example, 1-1-0-0-1, the optimal point is at x = 1, and assume the total distance is d # If we move the point to the right, x = 2, the...
ronelzb/leetcode
numbers/0296_best_meeting_point.py
0296_best_meeting_point.py
py
1,532
python
en
code
0
github-code
18
[ { "api_name": "typing.List", "line_number": 15, "usage_type": "name" }, { "api_name": "typing.List", "line_number": 29, "usage_type": "name" } ]
32011048861
#!/usr/bin/env python3 import os import pickle import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt from inimotif_core import KmerCounter, MotifManager, save_figure from yattag import Doc,indent import numpy as np class FileProcessor: def __init__(self, file_name=None, file_type="fasta", out_dir...
chengl7/IniMotif
inimotif_main.py
inimotif_main.py
py
23,459
python
en
code
1
github-code
18
[ { "api_name": "matplotlib.use", "line_number": 5, "usage_type": "call" }, { "api_name": "os.path.exists", "line_number": 15, "usage_type": "call" }, { "api_name": "os.path", "line_number": 15, "usage_type": "attribute" }, { "api_name": "inimotif_core.KmerCounter",...
23268357774
import json import pickle from os import listdir from os.path import isfile, join import argparse import pandas as pd import nltk import xml.etree.ElementTree as ET import shlex,subprocess import re resturl = "http://localhost:2222/rest/annotate" def run_fp(speaker,sentence): first_person = ['I','me','Me','We','...
MathildaSu/Entity-Assisted-BERT
preprocess/preprocess_all.py
preprocess_all.py
py
4,077
python
en
code
0
github-code
18
[ { "api_name": "nltk.pos_tag", "line_number": 24, "usage_type": "call" }, { "api_name": "shlex.split", "line_number": 33, "usage_type": "call" }, { "api_name": "subprocess.Popen", "line_number": 34, "usage_type": "call" }, { "api_name": "subprocess.PIPE", "line...
22107192376
''' Code for studying newton's laws using sr04 sensor Logs data from various sensors. Author : Jithin B.P, jithinbp@gmail.com Date : Sep-2019 License : GNU GPL version 3 ''' import sys,time t = time.time() from utils import * from PyQt5 import QtGui, QtCore, QtWidgets import pyqtgraph as pg import math, os.path,...
expeyes/expeyes-programs
eyes17/newtons_laws.py
newtons_laws.py
py
9,284
python
en
code
16
github-code
18
[ { "api_name": "time.time", "line_number": 9, "usage_type": "call" }, { "api_name": "time.time", "line_number": 30, "usage_type": "call" }, { "api_name": "numpy.random.randint", "line_number": 31, "usage_type": "call" }, { "api_name": "numpy.random", "line_numb...
2473700137
from PIL import Image from pytesseract import pytesseract path_to_tesseract = '/opt/homebrew/Cellar/tesseract/5.2.0/bin/tesseract' path_to_image = 'data/sampleText1.png' pytesseract.tesseract_cmd = path_to_tesseract img = Image.open(path_to_image) text = pytesseract.image_to_string(img) print() print(text)
RochanVanam/TextRecognition
TextRecognition.py
TextRecognition.py
py
311
python
en
code
0
github-code
18
[ { "api_name": "pytesseract.pytesseract.tesseract_cmd", "line_number": 7, "usage_type": "attribute" }, { "api_name": "pytesseract.pytesseract", "line_number": 7, "usage_type": "name" }, { "api_name": "PIL.Image.open", "line_number": 9, "usage_type": "call" }, { "ap...
6395636677
"""empty message Revision ID: 3e7face35638 Revises: e8f7da151d15 Create Date: 2017-04-26 02:22:03.258321 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '3e7face35638' down_revision = 'e8f7da151d15' branch_labels = None depends_on = None def upgrade(): # ...
openirc/api
migrations/versions/3e7face35638_.py
3e7face35638_.py
py
922
python
en
code
0
github-code
18
[ { "api_name": "alembic.op.add_column", "line_number": 21, "usage_type": "call" }, { "api_name": "alembic.op", "line_number": 21, "usage_type": "name" }, { "api_name": "sqlalchemy.Column", "line_number": 21, "usage_type": "call" }, { "api_name": "sqlalchemy.String"...
41178442433
from __future__ import print_function import os, sys, re, string from collections import defaultdict import itertools import numpy as np try: from word2keypress.weight_matrix import WEIGHT_MATRIX from word2keypress import Keyboard except ImportError: from weight_matrix import WEIGHT_MATRIX import pyxim...
rchatterjee/word2keypress
src/word2keypress/weighted_edist.py
weighted_edist.py
py
17,555
python
en
code
3
github-code
18
[ { "api_name": "pyximport.install", "line_number": 12, "usage_type": "call" }, { "api_name": "_keyboard.Keyboard", "line_number": 26, "usage_type": "call" }, { "api_name": "string.printable", "line_number": 32, "usage_type": "attribute" }, { "api_name": "os.path.di...
75133723559
#!/usr/bin/env python3 """ This script is designed as a sandbox for testing different ensembling and post-processing steps. Edit to create the ensembles / weights / post-processing pipelines you want to try, then run to produce results for each. """ import numpy as np import pandas as pd import sys, os import csv from...
jcausey-astate/ai_campus_kits19
ensemble_unet_multiple_tests_with_post_process.py
ensemble_unet_multiple_tests_with_post_process.py
py
10,478
python
en
code
3
github-code
18
[ { "api_name": "numpy.argmax", "line_number": 97, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.figure", "line_number": 98, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 98, "usage_type": "name" }, { "api_name": "matplotlib.py...
3580931133
#!/usr/bin/env python import os from alembic.config import Config from alembic import command from explicates.core import db, create_app from explicates.model.collection import Collection app = create_app() def db_create(): """Create the db""" with app.app_context(): db.create_all() here =...
alexandermendes/explicates
bin/db_create.py
db_create.py
py
859
python
en
code
7
github-code
18
[ { "api_name": "explicates.core.create_app", "line_number": 11, "usage_type": "call" }, { "api_name": "explicates.core.db.create_all", "line_number": 17, "usage_type": "call" }, { "api_name": "explicates.core.db", "line_number": 17, "usage_type": "name" }, { "api_n...
12369123469
#!/usr/local/bin/python3 from turtle import color from dwave.system.samplers import DWaveSampler from dwave.system.samplers.dwave_sampler import DWaveSampler import dwave_networkx as dnx import networkx as nx import neal import datetime import sys import numpy as np from sympy import ask from Qubo.import_data import ...
NielsenErik/QUBO_and_QALS_for_Feature_Selection
OLD/OLD_04-05-22/start.py
start.py
py
11,928
python
en
code
0
github-code
18
[ { "api_name": "Qubo.colors.colors.BOLD", "line_number": 26, "usage_type": "attribute" }, { "api_name": "Qubo.colors.colors", "line_number": 26, "usage_type": "name" }, { "api_name": "Qubo.colors.colors.HEADER", "line_number": 26, "usage_type": "attribute" }, { "ap...
5867721655
from django.shortcuts import render, redirect from django.http import HttpResponse from .models import * from .forms import * def home(request): orders = Order.objects.all() customers = Customer.objects.all() total_orders = orders.count() pending_orders = orders.filter(status='pending').count() ...
bryan-menendez/ivy-django
accounting/views.py
views.py
py
2,591
python
en
code
0
github-code
18
[ { "api_name": "django.shortcuts.render", "line_number": 19, "usage_type": "call" }, { "api_name": "django.shortcuts.render", "line_number": 23, "usage_type": "call" }, { "api_name": "django.shortcuts.render", "line_number": 40, "usage_type": "call" }, { "api_name"...
75003727401
import configparser from datetime import datetime import os from pyspark.sql import SparkSession from pyspark.sql.functions import udf, col from pyspark.sql.functions import year, month, dayofmonth, hour, weekofyear, date_format from sql_queries import songs_table_query, artists_table_query, log_filtered_query, users_q...
BLUEBAYcreater/Data-Lakes-with-Spark-Nanodegree-Project
etl.py
etl.py
py
4,619
python
en
code
1
github-code
18
[ { "api_name": "configparser.ConfigParser", "line_number": 9, "usage_type": "call" }, { "api_name": "os.environ", "line_number": 12, "usage_type": "attribute" }, { "api_name": "os.environ", "line_number": 13, "usage_type": "attribute" }, { "api_name": "pyspark.sql....
10354603824
from django.core.management.base import BaseCommand from cities.models import City, Distance class Command(BaseCommand): help = 'Create A B C Cities' def handle(self, *args, **options): if City.objects.all(): return None A = City.objects.create(name='Ciudad A') B = City.ob...
Deathpandk/eiya-joseph-test
src/cities/management/commands/create_test_cities.py
create_test_cities.py
py
804
python
en
code
0
github-code
18
[ { "api_name": "django.core.management.base.BaseCommand", "line_number": 5, "usage_type": "name" }, { "api_name": "cities.models.City.objects.all", "line_number": 9, "usage_type": "call" }, { "api_name": "cities.models.City.objects", "line_number": 9, "usage_type": "attrib...
70559150441
### Importing libraries import pandas as pd import numpy as np from datetime import datetime from lightgbm import LGBMRegressor # import gresearch_crypto import traceback import time from datetime import datetime import matplotlib.pyplot as plt import plotly.graph_objects as go from sklearn.model_selection import GridS...
axjing/G-Research.axj
utils/preprocess.py
preprocess.py
py
7,713
python
en
code
1
github-code
18
[ { "api_name": "pandas.read_csv", "line_number": 17, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 18, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 19, "usage_type": "call" }, { "api_name": "pandas.read_csv", ...
9179203016
from django.urls import path from polls import views app_name = 'polls' urlpatterns = [ path('',views.index, name='index'), # path('test1',views.test1, name='test1'), path('<int:question_id>/',views.detail, name='detail'), #/polls/5/ path('<int:question_id>/vote/', views.vote, name='vote'), #/polls/5/v...
oggong/django_study
Django/pjt_Django/myDjangoSite/polls/urls.py
urls.py
py
553
python
en
code
0
github-code
18
[ { "api_name": "django.urls.path", "line_number": 6, "usage_type": "call" }, { "api_name": "polls.views.index", "line_number": 6, "usage_type": "attribute" }, { "api_name": "polls.views", "line_number": 6, "usage_type": "name" }, { "api_name": "django.urls.path", ...
27246173757
from django.urls import path from .views import PostListView, PostCreateView, PostDeleteView, PostUpdateView, LikeView, RateView app_name = "posts" urlpatterns = [ path("", PostListView.as_view(), name="list"), path("share/", PostCreateView.as_view(), name="share"), path("delete/<int:post_id>/", PostDelet...
seymaozukanar/hipogram
hipogram/posts/urls.py
urls.py
py
563
python
en
code
0
github-code
18
[ { "api_name": "django.urls.path", "line_number": 7, "usage_type": "call" }, { "api_name": "views.PostListView.as_view", "line_number": 7, "usage_type": "call" }, { "api_name": "views.PostListView", "line_number": 7, "usage_type": "name" }, { "api_name": "django.ur...
18890294103
import numpy as np from matplotlib import pyplot as plt import math from scipy import optimize import utils #================================== Storing Data ====================================== data = np.array(np.loadtxt('C:/Users/Kartikaeya/Desktop/ex2data1.txt',delimiter=',')) X,y = data[:,(0,1)],data[:,2] ...
Kartikaeya/Learning-Content
Kartikaeya_180108017/ML_Week3.py
ML_Week3.py
py
6,520
python
en
code
null
github-code
18
[ { "api_name": "numpy.array", "line_number": 7, "usage_type": "call" }, { "api_name": "numpy.loadtxt", "line_number": 7, "usage_type": "call" }, { "api_name": "numpy.reshape", "line_number": 9, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.scatter", ...
8074137663
from termcolor import colored import sys from matplotlib import pyplot as plt from mpl_toolkits.mplot3d import Axes3D from matplotlib._png import read_png from matplotlib.cbook import get_sample_data import os import numpy as np from PIL import Image import scipy.cluster as cluster from sklearn.svm import OneClassSVM f...
RoboticsIIITH/LiDAR_small_obstacle
lidr_clustering_orig.py
lidr_clustering_orig.py
py
10,683
python
en
code
1
github-code
18
[ { "api_name": "warnings.filterwarnings", "line_number": 20, "usage_type": "call" }, { "api_name": "os.listdir", "line_number": 28, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 28, "usage_type": "call" }, { "api_name": "os.path", "line_n...
45630039944
from flask import Flask, flash, request, redirect, url_for, render_template, jsonify import numpy as np import pandas as pd import os from pathlib import Path import pathlib import sys # sys.path.insert(1, 'D:\email2faq\email-2-faq\email2faq') temp = pathlib.Path(__file__).parent.resolve() print("temp is :", temp) pat...
IEEE-NITK/email-2-faq
email2faq/web/app.py
app.py
py
2,226
python
en
code
3
github-code
18
[ { "api_name": "pathlib.Path", "line_number": 10, "usage_type": "call" }, { "api_name": "os.path.dirname", "line_number": 12, "usage_type": "call" }, { "api_name": "os.path", "line_number": 12, "usage_type": "attribute" }, { "api_name": "os.path.dirname", "line...
620615625
# -*- coding: UTF-8 -*- import logging.config # ログ設定ファイルからログ設定を読み込み logging.config.fileConfig('/var/www/html/MyWeb/FaceMOD/logging.conf', disable_existing_loggers=False) logger = logging.getLogger() logger.debug('face_auth.py 呼び出し') try: import sys, codecs, io import cv2 import numpy as np import os ...
TomiyamaSatoshi/FaceAuthApp
face_auth.py
face_auth.py
py
4,968
python
ja
code
0
github-code
18
[ { "api_name": "logging.config.config.fileConfig", "line_number": 5, "usage_type": "call" }, { "api_name": "logging.config.config", "line_number": 5, "usage_type": "attribute" }, { "api_name": "logging.config", "line_number": 5, "usage_type": "name" }, { "api_name"...
11149232510
from flask import render_template from jwt import encode from uuid import uuid4 from flask import Flask from flask import request from flask import make_response import redis import datetime app = Flask(__name__) db = redis.Redis(host='client_redis', port=6381, decode_responses=True) JWT_SECREATE_DATABASE = "SECRE...
ivanprokopets/Web-application
Aplikacja_Webowa_Etap_2/client/main.py
main.py
py
3,792
python
en
code
1
github-code
18
[ { "api_name": "flask.Flask", "line_number": 12, "usage_type": "call" }, { "api_name": "redis.Redis", "line_number": 14, "usage_type": "call" }, { "api_name": "flask.render_template", "line_number": 32, "usage_type": "call" }, { "api_name": "flask.make_response", ...
5396942063
# coding: utf-8 """ WEX REST APIs Authentication methods - Basic Auth - JSON Web Token - [POST /api/v1/usermgmt/login](#!/User/signinUser) - [POST /api/v1/usermgmt/logout](#!/User/doLogout) - Python client sample [Download](/docs/wex-python-api.zip) OpenAPI spec version: 12.0.2.417 Generate...
adam725417/Walsin
wex-python-api/ibmwex/models/field.py
field.py
py
4,314
python
en
code
0
github-code
18
[ { "api_name": "six.iteritems", "line_number": 136, "usage_type": "call" }, { "api_name": "pprint.pformat", "line_number": 160, "usage_type": "call" } ]
19348333682
import requests from os import environ as env from bs4 import BeautifulSoup as bs import sys import re ERP_HOMEPAGE_URL = 'https://erp.iitkgp.ac.in/IIT_ERP3/welcome.jsp' ERP_LOGIN_URL = 'https://erp.iitkgp.ac.in/SSOAdministration/auth.htm' ERP_SECRET_QUESTION_URL = 'https://erp.iitkgp.ac.in/SSOAdministration/getSecuri...
nilesh05apr/MFTP-WhatsApp
erp.py
erp.py
py
4,091
python
en
code
0
github-code
18
[ { "api_name": "requests.Session", "line_number": 48, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_number": 51, "usage_type": "call" }, { "api_name": "os.environ", "line_number": 60, "usage_type": "name" }, { "api_name": "os.environ", "line_...
7281238550
import discord, json, asyncio, random from discord.ext import commands from datetime import datetime class Games(commands.Cog): def __init__(self, client): self.client = client @commands.group() @commands.guild_only() async def wtp(self, ctx): """Who's that pokemon game.""" ...
EliteB0Y/TESBot
cogs/games.py
games.py
py
13,871
python
en
code
1
github-code
18
[ { "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": "discord.Embed", "line_number": 16, "usage_type": "call" }, { "api_name": "discor...
35514337986
import logging import shutil import os from flamingo.core.data_model import ContentSet, AND, NOT, OR, Q, F from flamingo.core.plugins.plugin_manager import PluginManager from flamingo.core.parser import FileParser, ParsingError from flamingo.core.plugins.media import add_media from flamingo.core.utils.imports import a...
pengutronix/flamingo
flamingo/core/context.py
context.py
py
10,718
python
en
code
18
github-code
18
[ { "api_name": "flamingo.core.types.OverlayObject", "line_number": 13, "usage_type": "name" }, { "api_name": "logging.getLogger", "line_number": 34, "usage_type": "call" }, { "api_name": "flamingo.core.plugins.plugin_manager.PluginManager", "line_number": 38, "usage_type":...
34903385107
import threading import cv2 as cv import config import math import logging import numpy as np import statistics logger = logging.getLogger(__name__) class Tracker: def __init__ (self, debug): self.debug = debug self.processingEnded = True self.processingSucceeded = False self.fai...
guycs/tello_cv_control
droneapp/models/findSquare.py
findSquare.py
py
21,977
python
en
code
0
github-code
18
[ { "api_name": "logging.getLogger", "line_number": 10, "usage_type": "call" }, { "api_name": "cv2.getTickCount", "line_number": 23, "usage_type": "call" }, { "api_name": "cv2.getTickFrequency", "line_number": 23, "usage_type": "call" }, { "api_name": "config.FRAME_...
25859548789
from tkinter import * from PIL import Image, ImageTk window = Tk() window.title("Image with PIL") window.state("zoomed") # To open a .jpg image, the Image module of the PIL library is used. To open an image with it, this is the way. The "open" function takes the name of the file as a string. images = Image.open("D:...
HarshPrateek559/Python
tKinter_learning/PIL_image.py
PIL_image.py
py
1,099
python
en
code
0
github-code
18
[ { "api_name": "PIL.Image.open", "line_number": 11, "usage_type": "call" }, { "api_name": "PIL.Image", "line_number": 11, "usage_type": "name" }, { "api_name": "PIL.ImageTk.PhotoImage", "line_number": 17, "usage_type": "call" }, { "api_name": "PIL.ImageTk", "li...
70235697320
import xlrd import json import PIL from PIL import Image from PIL import ImageDraw from PIL import ImageFont import qrcode season = "winter" file_path = season + ".xlsx" data = xlrd.open_workbook(file_path) table = data.sheet_by_name("Sheet1") rows_num = table.nrows cols_num = table.ncols keys = table.row_values(0)...
BlauHimmel/Animee
qrcode/code_img_gen.py
code_img_gen.py
py
1,532
python
en
code
9
github-code
18
[ { "api_name": "xlrd.open_workbook", "line_number": 12, "usage_type": "call" }, { "api_name": "PIL.ImageFont.truetype", "line_number": 22, "usage_type": "call" }, { "api_name": "PIL.ImageFont", "line_number": 22, "usage_type": "name" }, { "api_name": "json.dumps", ...
16641631551
#!/usr/bin/env python3 import tkinter as tk import nltk import re words = "about-how off-of a-lot always and-so-on and-etc. anything bad because ‘cause could-of ‘cuz due-to etc forever get getting good be got gotten had-of here-are here-is I-believe I-think in-conclusion in-my-opinion just kind-of like lottsa major m...
JoelJaison/DeadWordChecker
DeadWordChecker.py
DeadWordChecker.py
py
4,985
python
en
code
0
github-code
18
[ { "api_name": "tkinter.Tk", "line_number": 11, "usage_type": "call" }, { "api_name": "tkinter.Frame", "line_number": 17, "usage_type": "call" }, { "api_name": "tkinter.SUNKEN", "line_number": 17, "usage_type": "attribute" }, { "api_name": "tkinter.Frame", "lin...
22732213880
# coding:utf8 import sys import cv2 import numpy as np import matplotlib as plt # import PyQt5 import matplotlib.pyplot as plt def preprocess(gray): # 1. Sobel算子,x方向求梯度 sobel = cv2.Sobel(gray, cv2.CV_8U, 1, 0, ksize=3) # 2. 二值化 ret, binary = cv2.threshold(sobel, 0, 255, cv2.THRESH_OTSU + cv2.THRESH_B...
gsq7474741/Arknights_auto_fight
beta/text_region.py
text_region.py
py
4,233
python
en
code
0
github-code
18
[ { "api_name": "cv2.Sobel", "line_number": 13, "usage_type": "call" }, { "api_name": "cv2.CV_8U", "line_number": 13, "usage_type": "attribute" }, { "api_name": "cv2.threshold", "line_number": 15, "usage_type": "call" }, { "api_name": "cv2.THRESH_OTSU", "line_nu...
628586102
import copy import functools import os import time import glob from concurrent.futures import ThreadPoolExecutor import numpy as np from PySide6.QtCore import QObject, QThreadPool, Signal from PySide6.QtWidgets import QMessageBox from hexrd import imageseries from hexrd.imageseries.omega import OmegaImageSeries fro...
HEXRD/hexrdgui
hexrdgui/image_load_manager.py
image_load_manager.py
py
19,650
python
en
code
22
github-code
18
[ { "api_name": "PySide6.QtCore.QObject", "line_number": 28, "usage_type": "name" }, { "api_name": "hexrdgui.singletons.QSingleton", "line_number": 28, "usage_type": "name" }, { "api_name": "PySide6.QtCore.Signal", "line_number": 31, "usage_type": "call" }, { "api_n...
36024795173
from datasets import load_dataset, load_metric from transformers import AutoTokenizer, HfArgumentParser, TrainingArguments, AutoModelForTokenClassification, Trainer, \ DataCollatorForTokenClassification import json import numpy as np from bert_crf import BertCRF from dataclasses import field, dataclass from typing ...
youzanai/trexpark
src/token_classification/product_title_ner/title_token_classification.py
title_token_classification.py
py
7,553
python
en
code
61
github-code
18
[ { "api_name": "json.load", "line_number": 12, "usage_type": "call" }, { "api_name": "datasets.load_metric", "line_number": 16, "usage_type": "call" }, { "api_name": "numpy.where", "line_number": 28, "usage_type": "call" }, { "api_name": "json.loads", "line_num...
73811673640
import json import logging import os import pickle import re import signal import subprocess import sys import tempfile import time import uuid import warnings from ruamel.yaml import YAML from ruamel.yaml.comments import CommentedMap from configargparse import ArgParser, YAMLConfigFileParser from argparse import (SUP...
DataBiosphere/toil
src/toil/common.py
common.py
py
109,494
python
en
code
856
github-code
18
[ { "api_name": "sys.version_info", "line_number": 44, "usage_type": "attribute" }, { "api_name": "typing.TYPE_CHECKING", "line_number": 74, "usage_type": "name" }, { "api_name": "logging.getLogger", "line_number": 91, "usage_type": "call" }, { "api_name": "os.path....
31896479072
import logging from unittest.mock import patch import pytest from corgi.core.models import ProductComponentRelation, SoftwareBuild from corgi.tasks.brew import slow_fetch_brew_build, slow_fetch_modular_build from corgi.tasks.common import create_relations from .factories import ProductStreamFactory, SoftwareBuildFac...
RedHatProductSecurity/component-registry
tests/test_relations.py
test_relations.py
py
1,897
python
en
code
19
github-code
18
[ { "api_name": "logging.getLogger", "line_number": 12, "usage_type": "call" }, { "api_name": "pytest.mark", "line_number": 14, "usage_type": "attribute" }, { "api_name": "pytest.mark.django_db", "line_number": 15, "usage_type": "call" }, { "api_name": "pytest.mark"...
42371476170
#!/usr/bin/python3 """BaseModel Class""" from datetime import datetime from uuid import uuid4 from models import storage from sqlalchemy.ext.declarative import declarative_base from sqlalchemy import String, Column, DateTime Base = declarative_base() class BaseModel(Base): """ Base class, BaseModel, defi...
jasmin1002/AirBnB_clone
models/base_model.py
base_model.py
py
3,287
python
en
code
1
github-code
18
[ { "api_name": "sqlalchemy.ext.declarative.declarative_base", "line_number": 13, "usage_type": "call" }, { "api_name": "sqlalchemy.Column", "line_number": 22, "usage_type": "call" }, { "api_name": "sqlalchemy.String", "line_number": 22, "usage_type": "call" }, { "a...
31941310608
import os, sys currentdir = os.path.dirname(os.path.realpath(__file__)) parentdir = os.path.dirname(currentdir) sys.path.append(parentdir) import shared.ipc as ipc import time, json from shared.jsonhandler import * fileHandle = open("Cfg_Clock.json") jConfig = json.load(fileHandle) fileHandle.close() communication ...
scheible/wordclock
bin/web/mock_daemon.py
mock_daemon.py
py
911
python
en
code
0
github-code
18
[ { "api_name": "os.path.dirname", "line_number": 2, "usage_type": "call" }, { "api_name": "os.path", "line_number": 2, "usage_type": "attribute" }, { "api_name": "os.path.realpath", "line_number": 2, "usage_type": "call" }, { "api_name": "os.path.dirname", "lin...
26890684798
import pymysql '''def connnect_userLibrary(): connection = pymysql.connect(host='creamsonservices.com', user='creamson_langlab', password='Langlab@123', db='creamson_user_library', charset='utf8mb4', cursorclass=pymysql.cursors.DictCursor) return connection ...
sutandra-coder/myelsa
utils.py
utils.py
py
6,498
python
en
code
0
github-code
18
[ { "api_name": "pymysql.connect", "line_number": 23, "usage_type": "call" }, { "api_name": "pymysql.cursors", "line_number": 28, "usage_type": "attribute" }, { "api_name": "pymysql.connect", "line_number": 33, "usage_type": "call" }, { "api_name": "pymysql.cursors"...
5882053973
from appData.calculator import calculate from appData.categorizer import categorize from appData.parser import parse from appData.setup import setup from appData.gui import mmtGui from datetime import datetime import tkinter as tk from tkinter import filedialog from tkinter import ttk import sys import os im...
PietOnHub/2020_MoneyManagementTool
mmt.py
mmt.py
py
2,888
python
en
code
0
github-code
18
[ { "api_name": "sys.dont_write_bytecode", "line_number": 14, "usage_type": "attribute" }, { "api_name": "os.path.join", "line_number": 26, "usage_type": "call" }, { "api_name": "os.path", "line_number": 26, "usage_type": "attribute" }, { "api_name": "os.getcwd", ...
25580555269
# https://www.slideshare.net/hcpc_hokudai/advanced-dp-2016 動的計画法の問題の解説がされている 神 # これが比較的わかりやすいかも https://algo-logic.info/bit-dp/ ''' 定式化(本は"集める"DPで定義してるが、わかりやすさのため"配る"DPで定式化) ノーテーション S ... 頂点集合 | ... 和集合演算子 dp[S][v] ... 重みの総和の最小。頂点0から頂点集合Sを経由してvに到達する。 更新則 dp[S|{v}] = min{dp[S][u]+d(u,v)} ただしv∉S 初期条件 dp[∅][0] = 0 #V...
masakiaota/kyoupuro
practice/ants_book/173_traveling_salesman.py
173_traveling_salesman.py
py
2,102
python
ja
code
1
github-code
18
[ { "api_name": "itertools.product", "line_number": 35, "usage_type": "call" } ]
29414547791
from enum import Enum # HX: Breakup program into "Get keywords of cards", "Produce matrix", "Show on site" # HX: Rarity breakdown # HX: With Prowess, add toggle for number of spells on stack # HX: Compile python # Combat-related keywords # HX: Protection KEYWORDS = ["Deathtouch", "Defender", "...
hexecute/MtG-Matrix
basics.py
basics.py
py
3,043
python
en
code
0
github-code
18
[ { "api_name": "enum.Enum", "line_number": 20, "usage_type": "name" } ]
34679698330
""" Widget interfaces """ from zope import schema from zope.interface import Interface from eea.googlecharts.config import EEAMessageFactory as _ class IPortletAdd(Interface): """ Portlet widget add schema """ name = schema.TextLine( title=_(u'Name'), description=_(u"Widget's name"), ...
eea/eea.googlecharts
eea/googlecharts/widgets/portlet/interfaces.py
interfaces.py
py
919
python
en
code
2
github-code
18
[ { "api_name": "zope.interface.Interface", "line_number": 7, "usage_type": "name" }, { "api_name": "zope.schema.TextLine", "line_number": 10, "usage_type": "call" }, { "api_name": "zope.schema", "line_number": 10, "usage_type": "name" }, { "api_name": "eea.googlech...
32984185856
from ...util import context, call, config_update import multiprocessing as mp import numpy as np import os import click def minmax(el, v): return (el - np.min(v)) / (np.max(v) - np.min(v)) if np.max(v) - np.min(v) is not 0 else 0 @click.command() @click.option('--target', default=None) @click.option('--plotting...
rgcl/msc_thesis
msc_thesis/stages/200_creating_big_catalog/_201_creating_big_catalog.py
_201_creating_big_catalog.py
py
1,304
python
en
code
0
github-code
18
[ { "api_name": "numpy.max", "line_number": 9, "usage_type": "call" }, { "api_name": "numpy.min", "line_number": 9, "usage_type": "call" }, { "api_name": "os.environ", "line_number": 17, "usage_type": "attribute" }, { "api_name": "click.command", "line_number": ...
31239295762
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = "heider" __doc__ = r""" Created on 24/01/2022 """ import numpy import pyaudio # sudo apt-get install python3-pyaudio from draugr.drawers import discrete_scroll_plot from matplotlib import pyplot RATE = 44100 CHUNK = int(RATE / 20) #...
cnheider/modulation
samples/unsorted/mpl_plot.py
mpl_plot.py
py
965
python
en
code
1
github-code
18
[ { "api_name": "pyaudio.PyAudio", "line_number": 19, "usage_type": "call" }, { "api_name": "pyaudio.paInt16", "line_number": 21, "usage_type": "attribute" }, { "api_name": "draugr.drawers.discrete_scroll_plot", "line_number": 29, "usage_type": "call" }, { "api_name...
23669740675
import logging import os P = '/home/wuyinan/Desktop/coin.forecaster/' if os.path.exists( '/home/wuyinan/Desktop/coin.forecaster/') else '/Users/wuyinan/Projects/se/projects/coin.forecaster/' C = { # ----------------------------- args ----------------------------- 'model_opts': 'gru_opts', 'trade_data...
wuyinan0126/coin.forecaster
coin/__init__.py
__init__.py
py
4,222
python
en
code
0
github-code
18
[ { "api_name": "os.path.exists", "line_number": 5, "usage_type": "call" }, { "api_name": "os.path", "line_number": 5, "usage_type": "attribute" }, { "api_name": "logging.INFO", "line_number": 95, "usage_type": "attribute" }, { "api_name": "logging.Formatter", "...
12879532049
import cv2 import numpy as np from os import listdir from os.path import isfile, join faceCascade=cv2.CascadeClassifier('C:\\Users\\omkar\\Anaconda3\\Lib\\site-packages\\cv2\\data\\haarcascade_frontalface_default.xml') def face_detector(img, size = 0.5): gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) f...
OmkarNehete/HomeSecuritySystem
facedetector.py
facedetector.py
py
1,664
python
en
code
0
github-code
18
[ { "api_name": "cv2.CascadeClassifier", "line_number": 6, "usage_type": "call" }, { "api_name": "cv2.cvtColor", "line_number": 9, "usage_type": "call" }, { "api_name": "cv2.COLOR_BGR2GRAY", "line_number": 9, "usage_type": "attribute" }, { "api_name": "cv2.rectangle...
7112879615
from typing import List class Solution: def insert(self, intervals: List[List[int]], newInterval: List[int]) -> List[List[int]]: if not intervals: return [newInterval] if newInterval[1] < intervals[0][0]: return [newInterval] + intervals if newInterval[0] > intervals...
longkun-uestc/examination
力扣网/57-插入区间.py
57-插入区间.py
py
1,259
python
en
code
1
github-code
18
[ { "api_name": "typing.List", "line_number": 3, "usage_type": "name" } ]
25839570072
from django.contrib.auth.decorators import login_required from django.http import HttpResponse from django.shortcuts import render, redirect from django.contrib import messages from .models import Producto, Pedido, Cliente, Venta from django.contrib.auth.models import User from django.contrib.auth import authenticate, ...
MarcosNapolitano/MDP
MercadoDelPlata/views.py
views.py
py
5,780
python
es
code
0
github-code
18
[ { "api_name": "django.forms.ModelForm", "line_number": 18, "usage_type": "attribute" }, { "api_name": "django.forms", "line_number": 18, "usage_type": "name" }, { "api_name": "models.Venta", "line_number": 20, "usage_type": "name" }, { "api_name": "django.forms.wi...
70114676521
import json import os import datetime import sys import pdb br = pdb.set_trace def get_module_name(fn): mn, ext = os.path.splitext(fn) mn = mn.replace('\\', '.') mn = mn.replace('/', '.') return mn def get_dn_and_build(home, sub_dn): dn = os.path.join(home, sub_dn) if not os.path.exists(dn...
CountChu/LeetCodePython
util.py
util.py
py
2,310
python
en
code
0
github-code
18
[ { "api_name": "pdb.set_trace", "line_number": 7, "usage_type": "attribute" }, { "api_name": "os.path.splitext", "line_number": 10, "usage_type": "call" }, { "api_name": "os.path", "line_number": 10, "usage_type": "attribute" }, { "api_name": "os.path.join", "l...
10852269960
from unittest import TestCase import six from openformats.exceptions import RuleError from openformats.handlers import Handler class HandlerTestCase(TestCase): def setUp(self): self.handler = Handler() def tearDown(self): self.handler = None def test_get_rule_number_returns(self): ...
transifex/openformats
openformats/tests/test_handlers.py
test_handlers.py
py
1,190
python
en
code
10
github-code
18
[ { "api_name": "unittest.TestCase", "line_number": 9, "usage_type": "name" }, { "api_name": "openformats.handlers.Handler", "line_number": 11, "usage_type": "call" }, { "api_name": "six.iteritems", "line_number": 25, "usage_type": "call" }, { "api_name": "six.iteri...
35960684229
import tensorflow as tf from scipy.spatial.transform import Rotation as R import numpy as np import cv2 import transformations def test_rotation_from_axisangle(): print('test_rotation_from_axisangle') # The first element in the batch will have the identity rotation, the second element another # more comp...
xianlopez/monodepth2_tf2
test_transformations.py
test_transformations.py
py
15,147
python
en
code
0
github-code
18
[ { "api_name": "tensorflow.constant", "line_number": 13, "usage_type": "call" }, { "api_name": "tensorflow.float32", "line_number": 13, "usage_type": "attribute" }, { "api_name": "tensorflow.constant", "line_number": 15, "usage_type": "call" }, { "api_name": "tenso...
14516738771
import pandas import requests from tqdm import tqdm def edgar_frames(urldescriptor=''): """ The edgar_frames function aggregates one fact for each reporting entity that is last filed that most closely fits the calendrical period requested. This API supports for annual, quarterly and instantaneous data In...
cowboycodeman/tidyxbrl
src/tidyxbrl/edgar_frames.py
edgar_frames.py
py
2,433
python
en
code
1
github-code
18
[ { "api_name": "requests.get", "line_number": 33, "usage_type": "call" }, { "api_name": "pandas.DataFrame", "line_number": 36, "usage_type": "call" }, { "api_name": "pandas.json_normalize", "line_number": 36, "usage_type": "call" }, { "api_name": "pandas.melt", ...
15606538472
from movie_client import MovieClient import requests.exceptions def main(): print_header() search_event_loop() def print_header(): print('-----------------------------') print(' MOVIE SEARCH APP') print('-----------------------------') def search_event_loop(): search = 'ONCE_THROUGH_L...
obuqwe/Python-Project
01_Start/10_Movie_search/program.py
program.py
py
1,043
python
en
code
0
github-code
18
[ { "api_name": "movie_client.MovieClient", "line_number": 23, "usage_type": "call" }, { "api_name": "requests.exceptions.exceptions", "line_number": 29, "usage_type": "attribute" }, { "api_name": "requests.exceptions", "line_number": 29, "usage_type": "name" } ]
36424781938
from tkinter import (BOTH, BOTTOM, END, HORIZONTAL, NO, RIDGE, RIGHT, VERTICAL, Button, Frame, Image, Label, LabelFrame, StringVar, Tk, W, X, Y, messagebox, ttk) import mysql.connector from dotenv import dotenv_values from PIL import Image, ImageTk class Employee(Tk): co...
PatharePrasad/Employee-Mangement-System
employee.py
employee.py
py
20,372
python
en
code
0
github-code
18
[ { "api_name": "tkinter.Tk", "line_number": 10, "usage_type": "name" }, { "api_name": "dotenv.dotenv_values", "line_number": 11, "usage_type": "call" }, { "api_name": "tkinter.StringVar", "line_number": 17, "usage_type": "call" }, { "api_name": "tkinter.StringVar",...
70114530281
# # Build a N-ary Tree for the problem 0589. # # https://leetcode.com/problems/n-ary-tree-preorder-traversal/ # # Given an array... # # Example 1: # Input: ls = [ # 1, # None, 3, 2, 4, # None, 5, 6 # ] # Output: "1, (3, 2, 4), (5, 6)" # # Example 2: # Input: ls...
CountChu/LeetCodePython
learn_14_n_ary_tree/solutions/my015-build-n-ary-tree-s1.py
my015-build-n-ary-tree-s1.py
py
2,575
python
en
code
0
github-code
18
[ { "api_name": "pdb.set_trace", "line_number": 31, "usage_type": "attribute" }, { "api_name": "sys.modules", "line_number": 62, "usage_type": "attribute" } ]
24798717701
# coding: utf-8 """ A toy mixture model with uncertainties in STAN """ from __future__ import division, print_function __author__ = "Andy Casey <arc@cam.ast.ac.uk>" # Standard libraries import logging # Third party libraries import matplotlib.pyplot as plt import numpy as np import pandas as pd import pystan def...
andycasey/ges
homogenisation/tests/mixture.py
mixture.py
py
1,899
python
en
code
0
github-code
18
[ { "api_name": "numpy.loadtxt", "line_number": 21, "usage_type": "call" }, { "api_name": "pystan.stan", "line_number": 27, "usage_type": "call" }, { "api_name": "pandas.DataFrame", "line_number": 38, "usage_type": "call" }, { "api_name": "numpy.arange", "line_n...
32512868191
import tensorflow as tf from tensorflow.keras.models import Model from tensorflow.keras import regularizers from tensorflow.keras.layers import Input, Add, BatchNormalization, Conv2D, Subtract, Multiply, Reshape, MaxPooling2D, \ UpSampling2D, Cropping2D, concatenate import horovod.tensorflow as hvd def hooknet(in...
sara-nl/parallel-hooknet
source/model_tf_2.py
model_tf_2.py
py
8,326
python
en
code
0
github-code
18
[ { "api_name": "tensorflow.keras.regularizers.l2", "line_number": 29, "usage_type": "call" }, { "api_name": "tensorflow.keras.regularizers", "line_number": 29, "usage_type": "name" }, { "api_name": "tensorflow.keras.layers.Input", "line_number": 32, "usage_type": "call" ...
43571945254
import flask import numpy as np import pandas as pd import difflib from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.metrics.pairwise import cosine_similarity app = flask.Flask(__name__, template_folder='templates') movies_data = pd.read_csv('movies.csv') selected_features = ['genres','keyword...
SHRIYANSHGAUR/MovieClub
app.py
app.py
py
2,586
python
en
code
1
github-code
18
[ { "api_name": "flask.Flask", "line_number": 9, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 11, "usage_type": "call" }, { "api_name": "sklearn.feature_extraction.text.TfidfVectorizer", "line_number": 18, "usage_type": "call" }, { "api_na...
25090940378
# Voting Ensemble for Classification import pandas from sklearn import model_selection from sklearn.linear_model import LogisticRegression from sklearn.tree import DecisionTreeClassifier from sklearn.svm import SVC from sklearn.ensemble import VotingClassifier url = "https://raw.githubusercontent.com/jbrownlee/Datasets...
vishnu-muraly/AppliedML
09. Cloud/AV/fs.py
fs.py
py
1,006
python
en
code
1
github-code
18
[ { "api_name": "pandas.read_csv", "line_number": 10, "usage_type": "call" }, { "api_name": "sklearn.model_selection.KFold", "line_number": 15, "usage_type": "call" }, { "api_name": "sklearn.model_selection", "line_number": 15, "usage_type": "name" }, { "api_name": ...
73648866600
from rliable import library as rly from rliable import metrics from rliable import plot_utils import matplotlib.pyplot as plt import matplotlib.patches as mpatches import seaborn as sns import numpy as np RAND_STATE = np.random.RandomState(1234) StratifiedBootstrap = rly.StratifiedBootstrap IQM = lambda x: metrics...
mmm43514/TD3_HER_Multigoal
plot_scripts/rliable_plots.py
rliable_plots.py
py
5,141
python
en
code
0
github-code
18
[ { "api_name": "numpy.random.RandomState", "line_number": 11, "usage_type": "call" }, { "api_name": "numpy.random", "line_number": 11, "usage_type": "attribute" }, { "api_name": "rliable.library.StratifiedBootstrap", "line_number": 13, "usage_type": "attribute" }, { ...
22161586791
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Copy from Aladdin, not my own coding!! Just for use of learning and reference! """ """ let's talk about character-level LSTM 1. identiy the tensor size, tensor.Size([]) = tensor(22), 0-D tensor, you can conver it to tensor([22]) = tensor.Size([1]) by view(1) 2. vi...
frankligy/exercise_codes
deepLearning/pytorch_character_LSTM.py
pytorch_character_LSTM.py
py
6,911
python
en
code
3
github-code
18
[ { "api_name": "torch.device", "line_number": 40, "usage_type": "call" }, { "api_name": "torch.cuda.is_available", "line_number": 40, "usage_type": "call" }, { "api_name": "torch.cuda", "line_number": 40, "usage_type": "attribute" }, { "api_name": "string.printable...
21990750343
import wikipedia as wiki def get_wiki_data(search_item): ########## getiing sentance from wikipedia################################ result = wiki.page(wiki.search(search_item)[0]) result_list = result.summary count = 0 words = " " for i in range(len(result_list)): if count>=3: ...
NitishBhatt07/AdvanceSiteScraper
combineproject/modules/wiki.py
wiki.py
py
546
python
en
code
0
github-code
18
[ { "api_name": "wikipedia.page", "line_number": 5, "usage_type": "call" }, { "api_name": "wikipedia.search", "line_number": 5, "usage_type": "call" } ]
18405948672
# -*- coding: utf-8 -*- from PIL import Image , ImageDraw , ImageFilter import Tkinter as tk import math #화면 사이즈 구하기 root = tk.Tk() width = root.winfo_screenwidth() height = root.winfo_screenheight() del root #배경 이미지와 타겟이미지 선언 wallpaper = Image.new(size = (width,height), color="white",mode="RGB") img = Image.open...
keepworking/BackFillPy
BackFillPy.py
BackFillPy.py
py
1,347
python
ko
code
0
github-code
18
[ { "api_name": "Tkinter.Tk", "line_number": 8, "usage_type": "call" }, { "api_name": "PIL.Image.new", "line_number": 16, "usage_type": "call" }, { "api_name": "PIL.Image", "line_number": 16, "usage_type": "name" }, { "api_name": "PIL.Image.open", "line_number":...
73437078759
from MemeGenerator.file_helper import FileHelper from PIL import Image, ImageDraw, ImageFont import os import shutil class MemeGenerator: """ Set instance attributes """ def __init__(self, output_dir): self.output_dir = output_dir self.default_font = './fonts/LilitaOne-Regular.ttf' se...
joeyBerger/meme-generator
MemeGenerator/MemeGenerator.py
MemeGenerator.py
py
2,905
python
en
code
0
github-code
18
[ { "api_name": "PIL.Image.open", "line_number": 23, "usage_type": "call" }, { "api_name": "PIL.Image", "line_number": 23, "usage_type": "name" }, { "api_name": "PIL.Image.NEAREST", "line_number": 31, "usage_type": "attribute" }, { "api_name": "PIL.Image", "line...
532345969
import colorgram # extract 30 colors from the image colors = colorgram.extract("damien_hirst.jpg", 30) rgb_colors = [] for color in colors: red = color.rgb.r green = color.rgb.g blue = color.rgb.b cols = (red, green, blue) rgb_colors.append(cols) print(rgb_colors)
ajaydev17/100-Days-Of-Python
Day 18/hirst_painting/extract_rgb.py
extract_rgb.py
py
287
python
en
code
0
github-code
18
[ { "api_name": "colorgram.extract", "line_number": 4, "usage_type": "call" } ]
74983770599
import discord from discord.ext import commands class Abberantics: colour = 0xFF4500 apexrole = 658508587496112193 csgorole = 658508867172564992 mwrole = 658508851372359690 fortrole = 658509013666889759 owrole = 658509166498807848 r6role = 658509196764905492 rlrole = 664996153288556595 ...
Lemony-Juicy/exult-bot
bot/cogs/friends.py
friends.py
py
14,889
python
en
code
0
github-code
18
[ { "api_name": "discord.ui", "line_number": 26, "usage_type": "attribute" }, { "api_name": "discord.ui.button", "line_number": 31, "usage_type": "call" }, { "api_name": "discord.ui", "line_number": 31, "usage_type": "attribute" }, { "api_name": "discord.ButtonStyle...
3957528442
import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns import streamlit as st import plotly.express as px import statsmodels.api as sm import io def app(): # Web App Title st.markdown(''' # **The Plotly Web App** This is the **plotly App** ...
sartajbalti/Desi_Machine_Learning
streamlitwork/apps/Newapp.py
Newapp.py
py
4,888
python
en
code
1
github-code
18
[ { "api_name": "streamlit.markdown", "line_number": 13, "usage_type": "call" }, { "api_name": "streamlit.header", "line_number": 21, "usage_type": "call" }, { "api_name": "streamlit.file_uploader", "line_number": 22, "usage_type": "call" }, { "api_name": "streamlit...
2899120874
import datetime import shutil import matplotlib import os import time import copy import torch from PIL import Image, ImageFont from numpy import random from torch.utils.data import DataLoader from confusion_matrix import plot_confusion_matrix_from_data from evaluation.overall_evaluation import Overall...
metzzo/deephumor
pipeline/models/train_cnn.py
train_cnn.py
py
11,388
python
en
code
3
github-code
18
[ { "api_name": "time.time", "line_number": 40, "usage_type": "call" }, { "api_name": "torch.utils.data.DataLoader", "line_number": 50, "usage_type": "call" }, { "api_name": "torch.utils.data.DataLoader", "line_number": 51, "usage_type": "call" }, { "api_name": "tor...
11696023429
import asyncio import contextlib import json import locale import logging import os.path import signal import subprocess from asyncio.subprocess import PIPE, create_subprocess_exec import psutil import lambentlight.server as server from .config import default_folder as default from .resources import LocalResource fro...
LambentLight/LambentLight
LambentLight.Server/lambentlight/server/datafolder.py
datafolder.py
py
7,756
python
en
code
23
github-code
18
[ { "api_name": "logging.getLogger", "line_number": 18, "usage_type": "call" }, { "api_name": "os.path.path.isdir", "line_number": 26, "usage_type": "call" }, { "api_name": "os.path.path", "line_number": 26, "usage_type": "attribute" }, { "api_name": "os.path", ...
27253595467
import ctypes import struct import sys import threading try: from typing import Any, Optional, Union, Dict, List except ImportError: pass # import xml parser. lxml/etree only available since python 2.5 use_minidom = False try: import lxml.etree # type: ignore except ImportError: from xml.dom.minidom ...
dsuch/pymqi
code/pymqi/__init__.py
__init__.py
py
131,687
python
en
code
111
github-code
18
[ { "api_name": "os.environ.get", "line_number": 26, "usage_type": "call" }, { "api_name": "os.environ", "line_number": 26, "usage_type": "name" }, { "api_name": "os.path.join", "line_number": 30, "usage_type": "call" }, { "api_name": "os.path.exists", "line_num...
21924732458
"""opencvFaceRec URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.9/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Cla...
fedjo/aat
project/opencvFaceRec/urls.py
urls.py
py
1,773
python
en
code
1
github-code
18
[ { "api_name": "revproxy.views.ProxyView", "line_number": 23, "usage_type": "name" }, { "api_name": "django.conf.urls.url", "line_number": 39, "usage_type": "call" }, { "api_name": "django.contrib.admin.site", "line_number": 39, "usage_type": "attribute" }, { "api_...
34350014450
from time import strptime import requests from tkinter import * import math import json import datetime as dt from datetime import date from datetime import datetime # import mainWindow # city_name = mainWindow.Clicked() city_name = "Amsterdam,NL" api_key = "bbdaa09e0842234cc242fc5186627b70" def get_weather(api_ke...
snsyemrah/Project_AutoScout24
weather.py
weather.py
py
2,863
python
en
code
0
github-code
18
[ { "api_name": "requests.get", "line_number": 20, "usage_type": "call" }, { "api_name": "math.floor", "line_number": 32, "usage_type": "call" }, { "api_name": "math.floor", "line_number": 36, "usage_type": "call" }, { "api_name": "datetime.datetime.strptime", "...
13145285314
#!/usr/bin/python # -*- coding: utf-8 -*- owner = "ojahnn" # Name des Accounts, an den Fehlermeldungen gesendet werden import HP_config import tweepy import sqlite3 def login(): # for info on the tweepy module, see http://tweepy.readthedocs.org/en/ # Authentication is taken from F3_config.py consu...
eseyffarth/HarryPotterBot
HP_bot.py
HP_bot.py
py
2,208
python
en
code
0
github-code
18
[ { "api_name": "HP_config.consumer_key", "line_number": 13, "usage_type": "attribute" }, { "api_name": "HP_config.consumer_secret", "line_number": 14, "usage_type": "attribute" }, { "api_name": "HP_config.access_token", "line_number": 15, "usage_type": "attribute" }, {...
25579538449
# https://atcoder.jp/contests/abc132/tasks/abc132_e # ぱっと思いつくのはダイクストラで3回で到達できる点を探索していくとかかなぁ import sys sys.setrecursionlimit(1 << 25) read = sys.stdin.readline ra = range enu = enumerate def mina(*argv, sub=1): return list(map(lambda x: x - sub, argv)) # 受け渡されたすべての要素からsubだけ引く.リストを*をつけて展開しておくこと def read_a_int(): ret...
masakiaota/kyoupuro
practice/E_ABC/abc132_e/abc132_e.py
abc132_e.py
py
2,020
python
ja
code
1
github-code
18
[ { "api_name": "sys.setrecursionlimit", "line_number": 4, "usage_type": "call" }, { "api_name": "sys.stdin", "line_number": 5, "usage_type": "attribute" }, { "api_name": "collections.defaultdict", "line_number": 57, "usage_type": "call" }, { "api_name": "collection...
26243010810
# Author: Salvatore Masecchia <salvatore.masecchia@disi.unige.it> # License: New BSD """ BIC-search related functions """ import itertools as it import numpy as np import utils #import algorithm as alg def atoms_jumps(B, eps=1e-3): """ Counts the number of non-zero levels (up to eps tolerance). """ ajumps ...
slipguru/PyCGH
pycgh/analysis/eFLLAT/bic.py
bic.py
py
5,603
python
en
code
1
github-code
18
[ { "api_name": "numpy.empty_like", "line_number": 15, "usage_type": "call" }, { "api_name": "numpy.ones", "line_number": 21, "usage_type": "call" }, { "api_name": "numpy.diff", "line_number": 27, "usage_type": "call" }, { "api_name": "numpy.inf", "line_number":...
3395864340
import sys from PyQt5.QtWidgets import * import xml.etree.ElementTree as elemTree import os import shutil def search(dirname, filter): l = list() filenames = os.listdir(dirname) for filename in filenames: full_filename = os.path.join(dirname, filename) ext = os.path.splitext(full...
isdsi/eagle_lbr_editor
lbr_editor_qt.py
lbr_editor_qt.py
py
7,248
python
en
code
0
github-code
18
[ { "api_name": "os.listdir", "line_number": 9, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 11, "usage_type": "call" }, { "api_name": "os.path", "line_number": 11, "usage_type": "attribute" }, { "api_name": "os.path.splitext", "line_numb...
42204639605
import open3d.ml as _ml3d import open3d.ml.torch as ml3d from open3d.ml.vis import Visualizer, BoundingBox3D, LabelLUT from open3d.ml import datasets import argparse from tqdm import tqdm def parse_args(): parser = argparse.ArgumentParser( description='Demo for inference of object detection') parse...
TerranL/REDSA-CAV
scripts/object_detection/objdet_Kitti_frame.py
objdet_Kitti_frame.py
py
2,599
python
en
code
0
github-code
18
[ { "api_name": "argparse.ArgumentParser", "line_number": 12, "usage_type": "call" }, { "api_name": "open3d.ml.utils.Config.load_from_file", "line_number": 56, "usage_type": "call" }, { "api_name": "open3d.ml.utils", "line_number": 56, "usage_type": "attribute" }, { ...
26871397674
import os import cv2 import numpy as np import xml.etree.ElementTree as ET from keras.preprocessing import image def add_mask_pat(Patlist, Masklist): PatROIlist = [] for pat1 in Patlist: patname1 = pat1['name'] labname1 = pat1['label'] filepaths1 = pat1['filepaths'] imgs1 = pat1['images'] rois = [] roifi...
Troianll/Prediction-of-HT
get_image.py
get_image.py
py
8,400
python
en
code
0
github-code
18
[ { "api_name": "os.walk", "line_number": 55, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 64, "usage_type": "call" }, { "api_name": "os.path", "line_number": 64, "usage_type": "attribute" }, { "api_name": "os.path.join", "line_number": 7...
14175665506
import torch import torch.nn as nn import torch.nn.functional as F from ..registry import LOSSES from .utils import weight_reduce_loss import random def smooth_one_hot(true_labels: torch.Tensor, classes_count: int, classes, cate2id, smoothing_pair, smoothing=0.0): confidence = 1.0 - smoothing label_shape = to...
13282803166/shengna
mmdetection/mmdet/models/losses/label_smoothing_loss.py
label_smoothing_loss.py
py
2,960
python
en
code
0
github-code
18
[ { "api_name": "torch.Tensor", "line_number": 9, "usage_type": "attribute" }, { "api_name": "torch.Size", "line_number": 11, "usage_type": "call" }, { "api_name": "torch.empty", "line_number": 12, "usage_type": "call" }, { "api_name": "torch.mean", "line_number...
5615880990
from django.test import TestCase from django.test import Client class miniProgramTestCase(TestCase): def setUp(self): self.client = Client() def testConnection(self): response = self.client.get('/uploadServer/') self.assertEqual(response.status_code, 200) response = self.clien...
pwjworks/MiniProgram_Server
uploadServer/tests.py
tests.py
py
402
python
en
code
0
github-code
18
[ { "api_name": "django.test.TestCase", "line_number": 5, "usage_type": "name" }, { "api_name": "django.test.Client", "line_number": 7, "usage_type": "call" } ]