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
29524541479
__author__ = 'Vas Vasiliadis <vas@uchicago.edu>' import uuid import time import json from datetime import datetime from dateutil import tz from dateutil import parser import boto3 from boto3.dynamodb.conditions import Key from botocore.client import Config from botocore.exceptions import ClientError from botocore.exc...
asriram1/Cloud-Computing-Capstone-Project
web/views.py
views.py
py
18,585
python
en
code
0
github-code
97
[ { "api_name": "boto3.client", "line_number": 35, "usage_type": "call" }, { "api_name": "gas.app.config", "line_number": 36, "usage_type": "attribute" }, { "api_name": "gas.app", "line_number": 36, "usage_type": "name" }, { "api_name": "botocore.client.Config", ...
10578354955
# - - coding:utf-8 - - """ # author: wktxzr # Created Time : 20180503 # File Name: calculate_q_main.py # Description: 计算IDF """ import os import multiprocessing CUR_PATH = os.path.split(os.path.realpath(__file__.split('/')[-1]))[0] TOPICS = 'MB226 MB230 MB254 MB265 MB267 MB320 MB358 MB362 MB371 MB377 MB391 MB392 MB4...
wangkai0725/cluster_constraints
expand/calculate_q_main.py
calculate_q_main.py
py
1,051
python
en
code
0
github-code
97
[ { "api_name": "os.path.split", "line_number": 13, "usage_type": "call" }, { "api_name": "os.path", "line_number": 13, "usage_type": "attribute" }, { "api_name": "os.path.realpath", "line_number": 13, "usage_type": "call" }, { "api_name": "os.system", "line_num...
38230390184
from MainControlLoop.lib.drivers.APRS import APRS from MainControlLoop.lib.StateFieldRegistry import StateFieldRegistry, StateField, StateFieldRegistryLocker from MainControlLoop.lib.modes import Mode from MainControlLoop.tasks.APRS.actuate_task import APRSActuateTask, APRSCriticalMessage from MainControlLoop.tasks.Dow...
TJREVERB/pfs
MainControlLoop/tasks/APRS/control_task.py
control_task.py
py
5,068
python
en
code
6
github-code
97
[ { "api_name": "enum.Enum", "line_number": 11, "usage_type": "name" }, { "api_name": "enum.Enum", "line_number": 18, "usage_type": "name" }, { "api_name": "MainControlLoop.lib.drivers.APRS.APRS", "line_number": 31, "usage_type": "name" }, { "api_name": "MainControl...
74998040960
# -*- coding: utf-8 -*- import rdflib import subprocess import sys import codecs sys.stdout = codecs.getwriter("utf-8")(sys.stdout) # On créé un graph RDF et on charge le contenu de la base de données Zotero # dans ce graph g = rdflib.Graph() g.load('Zotero-AK.rdf') # On déclare les espace de noms utilisés dans...
osp/osp.work.annak
Zotero-AK/extract_urls.py
extract_urls.py
py
1,001
python
fr
code
0
github-code
97
[ { "api_name": "sys.stdout", "line_number": 10, "usage_type": "attribute" }, { "api_name": "codecs.getwriter", "line_number": 10, "usage_type": "call" }, { "api_name": "rdflib.Graph", "line_number": 15, "usage_type": "call" }, { "api_name": "rdflib.Namespace", ...
14636774143
""" Functions and classes for sampling the *showq* output. """ import remote from script import Data_jobscript from cfg import Cfg from qstatx import Data_qstat from sar import Data_sar from titleline import title_line import rules from mycollections import OrderedDict,od_add_list_item,...
etijskens/job-monitoring
dashboard2/showq.py
showq.py
py
49,018
python
en
code
1
github-code
97
[ { "api_name": "remote.run", "line_number": 57, "usage_type": "call" }, { "api_name": "remote.xml_to_odict", "line_number": 57, "usage_type": "attribute" }, { "api_name": "remote.err_print", "line_number": 161, "usage_type": "call" }, { "api_name": "cfg.Cfg.correct...
11695724553
import itertools from operator import truediv import subprocess import time import timeit from unittest.mock import patch from Cython.Compiler.TreeFragment import * from Cython.Compiler.Visitor import * from Cython.Compiler.Main import * from Cython.CodeWriter import * from Cython.Compiler.AnalysedTreeTransforms import...
SOLAR-group/Py2Cy
algorithm/exhaustive.py
exhaustive.py
py
2,434
python
en
code
3
github-code
97
[ { "api_name": "algorithm.algorithm.Algorithm", "line_number": 21, "usage_type": "name" }, { "api_name": "time.time", "line_number": 26, "usage_type": "call" }, { "api_name": "utilities.cython_tree.file_to_ast", "line_number": 29, "usage_type": "call" }, { "api_nam...
9513932796
import sqlite3 con =sqlite3.connect("sample.db") cursor = con.cursor() # User名を指定して、Aeg (年齢)を更新するprogram # ユーザーに何をしてもらいたいか? target_name = input("whose 'age' do you want to update?") new_age = input("Tell me new age:") print(target_name, new_age) # SQL 文を作成 # 文字列を使って SQL を作成するという事は脆弱性があるので注意する # SQL ingection という攻撃...
MoTo-LaBo/Python-Guideline
database/update.py
update.py
py
1,033
python
ja
code
0
github-code
97
[ { "api_name": "sqlite3.connect", "line_number": 3, "usage_type": "call" } ]
1685830967
import os from setuptools import setup DESC = "Some decorators and classes to make working with django projects easier." try: with open('readme.rst') as file: long_description = file.read() except IOError: long_description = DESC setup( name = "django-drapes", version = "0.1.2", author = ...
afroisalreadyinu/django-drapes
setup.py
setup.py
py
737
python
en
code
2
github-code
97
[ { "api_name": "setuptools.setup", "line_number": 12, "usage_type": "call" } ]
6554704067
from django.urls import path from django.contrib.auth.decorators import login_required from apps.citas.views import * urlpatterns =[ path('listar_tipo_mascota/',login_required(TipoMascotaListView.as_view()), name='listar_tipo_mascota'), path('tipo_mascota/',login_required(TipoMascotaView.as_view()), name='tipo_...
Vitonel0404/project-veterinaria-usat
apps/citas/urls.py
urls.py
py
2,536
python
es
code
0
github-code
97
[ { "api_name": "django.urls.path", "line_number": 5, "usage_type": "call" }, { "api_name": "django.contrib.auth.decorators.login_required", "line_number": 5, "usage_type": "call" }, { "api_name": "django.urls.path", "line_number": 6, "usage_type": "call" }, { "api_...
5097197505
from django.db.models import Avg, Count from django.shortcuts import get_object_or_404 from django_filters.rest_framework import DjangoFilterBackend from rest_framework import permissions from rest_framework.pagination import LimitOffsetPagination from rest_framework.viewsets import ModelViewSet from reviews.models im...
HopedForLuck/api_yamdb
api_yamdb/api/v1/views.py
views.py
py
3,146
python
en
code
0
github-code
97
[ { "api_name": "mixins.CreateListDestroyViewSet", "line_number": 19, "usage_type": "name" }, { "api_name": "reviews.models.Category.objects.all", "line_number": 22, "usage_type": "call" }, { "api_name": "reviews.models.Category.objects", "line_number": 22, "usage_type": "a...
71157618560
# # This project describes the detection of varroas using opencv's # Simple Blob Detector with some arbitrary but seemingly working parameters # # version originale de Vincent SAHLER : https://gist.github.com/vsahler/9686d9b12d63bb1f1481aa957bd1933e # # documentation : https://learnopencv.com/blob-detection-usin...
Barrois/Comptage-de-Varroas
ComptageVarroas_Blob_Fabrice_9.py
ComptageVarroas_Blob_Fabrice_9.py
py
8,680
python
fr
code
1
github-code
97
[ { "api_name": "cv2.imread", "line_number": 76, "usage_type": "call" }, { "api_name": "cv2.SimpleBlobDetector_Params", "line_number": 84, "usage_type": "call" }, { "api_name": "cv2.SimpleBlobDetector_create", "line_number": 99, "usage_type": "call" }, { "api_name":...
31438680927
import time from datetime import timedelta, datetime from unittest import skip from decimal import Decimal from django.conf import settings from django.utils import timezone from django.core.exceptions import ValidationError from core.tests.base import OrderBaseTestCase from core.tests.utils import data_provider, ena...
hossamelneily/nexchange
orders/tests/test_models.py
test_models.py
py
56,935
python
en
code
1
github-code
97
[ { "api_name": "core.tests.base.OrderBaseTestCase", "line_number": 39, "usage_type": "name" }, { "api_name": "decimal.Decimal", "line_number": 44, "usage_type": "call" }, { "api_name": "orders.models.Order.TYPES", "line_number": 51, "usage_type": "attribute" }, { "...
370318750
import json import time import os import sys from tabulate import tabulate import add_question as aq aq.top_list()#tworzy globalną listę tematów class AskModule: def __init__(self, name): self.name = name self.score = 0 print("\nWitam {}!\n\nWybierz dziedzinę pytań:".format(name)) ...
DJBio/Python_UJ_III_semestr
PyQu/ask_module.py
ask_module.py
py
3,758
python
pl
code
0
github-code
97
[ { "api_name": "add_question.top_list", "line_number": 9, "usage_type": "call" }, { "api_name": "tabulate.tabulate", "line_number": 21, "usage_type": "call" }, { "api_name": "time.sleep", "line_number": 46, "usage_type": "call" }, { "api_name": "json.load", "li...
25975379694
#!/usr/bin/env python3 """ Why shell=True can be dangerous echo '%an\' > /tmp/wuzhere #' """ import argparse import subprocess import sys def main(): parser = argparse.ArgumentParser(description=__doc__) parser.add_argument("-u", "--unsafe", action="store_true") args = parser.parse_args() # get desi...
nicktimko/talks-throw-out-your-shell-scripts
examples/shellinjection/shellinjection.py
shellinjection.py
py
691
python
en
code
1
github-code
97
[ { "api_name": "argparse.ArgumentParser", "line_number": 13, "usage_type": "call" }, { "api_name": "subprocess.run", "line_number": 25, "usage_type": "call" }, { "api_name": "subprocess.run", "line_number": 27, "usage_type": "call" }, { "api_name": "sys.exit", ...
26327753554
from typing import Dict from string import Template from enum import Enum from g_code_parsing.g_code_functionality_defs.g_code_functionality_def_base import ( GCodeFunctionalityDefBase, ) class SetTempGCodeFunctionalityDef(GCodeFunctionalityDefBase): # Using this list to output string in specific order EX...
Opentrons/opentrons
g-code-testing/g_code_parsing/g_code_functionality_defs/tempdeck/set_temp_g_code_functionality_def.py
set_temp_g_code_functionality_def.py
py
1,075
python
en
code
363
github-code
97
[ { "api_name": "g_code_parsing.g_code_functionality_defs.g_code_functionality_def_base.GCodeFunctionalityDefBase", "line_number": 9, "usage_type": "name" }, { "api_name": "enum.Enum", "line_number": 13, "usage_type": "name" }, { "api_name": "typing.Dict", "line_number": 20, ...
71088547840
import math import numpy as np from scipy import optimize from scipy import special import tensorflow_privacy as tfp RDP_ORDERS = tuple(map(float, range(2, 21))) RDP_ORDERS += (22., 24., 28., 32., 64., 128., 256.) DIV_EPSILON = 1e-22 def log_comb(n, k): gammaln = special.gammaln return gammaln(n + 1) - gammaln(...
luke-who/Federated-Learning-Project
federated/distributed_discrete_gaussian/accounting_utils.py
accounting_utils.py
py
11,848
python
en
code
7
github-code
97
[ { "api_name": "scipy.special.gammaln", "line_number": 14, "usage_type": "attribute" }, { "api_name": "scipy.special", "line_number": 14, "usage_type": "name" }, { "api_name": "scipy.special.comb", "line_number": 42, "usage_type": "call" }, { "api_name": "scipy.spe...
32769808629
import speech_recognition as sr #use the microphone as source for input. Here, we also specify #which device ID to specifically look for incase the microphone #is not working, an error will pop up saying "device_id undefined" sample_rate = 48000 chunk_size = 2048 #Initialize the recognizer r = sr.Recognizer() ...
nichowes/IoT_SmartBabyMonitoring
RaspberryPi_Code/SYSC4907/Iot_SmartBaby_MonitoringSystem/Python/SpeechRecognition/testSpeechRecognition.py
testSpeechRecognition.py
py
1,187
python
en
code
0
github-code
97
[ { "api_name": "speech_recognition.Recognizer", "line_number": 10, "usage_type": "call" }, { "api_name": "speech_recognition.Microphone", "line_number": 12, "usage_type": "call" }, { "api_name": "speech_recognition.UnknownValueError", "line_number": 29, "usage_type": "attr...
71540891200
import os from datetime import datetime, timedelta import pandas as pd import streamlit as st from streamlit.elements.widgets.time_widgets import DateWidgetReturn from req.param import ReqParam from utils.gh import ( get_commit_author_weekly_num, get_commit_weekly_num, get_issues_weekly_num, ) from utils....
zhongjiajie/ossinsight-lite
streamlit_app.py
streamlit_app.py
py
3,263
python
en
code
0
github-code
97
[ { "api_name": "datetime.datetime", "line_number": 16, "usage_type": "name" }, { "api_name": "datetime.datetime.now", "line_number": 16, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 17, "usage_type": "name" }, { "api_name": "datetime.ti...
30395294488
from django.conf.urls import patterns, url # sighting specific url patterns urlpatterns = patterns('bushlog.apps.sighting.views', url(r'^search/$', 'search', name='search'), url(r'^create/$', 'create', name='create'), url(r'^create/image/$', 'create_image', name='create_image'), url(r'^forms/(?P<type>...
mnbundle/bushlog
bushlog/apps/sighting/urls.py
urls.py
py
718
python
en
code
0
github-code
97
[ { "api_name": "django.conf.urls.patterns", "line_number": 5, "usage_type": "call" }, { "api_name": "django.conf.urls.url", "line_number": 6, "usage_type": "call" }, { "api_name": "django.conf.urls.url", "line_number": 7, "usage_type": "call" }, { "api_name": "djan...
21269894507
import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns from statsmodels.stats.multitest import multipletests from matplotlib.patches import Rectangle from matplotlib.colors import ListedColormap from matplotlib.colors import BoundaryNorm from get_dfs import get_metabs, get_md from...
korem-lab/PTB_Metabs_2021
preprint/fig_2AD.py
fig_2AD.py
py
4,401
python
en
code
0
github-code
97
[ { "api_name": "numpy.sign", "line_number": 25, "usage_type": "attribute" }, { "api_name": "numpy.log10", "line_number": 25, "usage_type": "attribute" }, { "api_name": "seaborn.set_context", "line_number": 30, "usage_type": "call" }, { "api_name": "seaborn.set", ...
12715976987
""" Copyright 2012, August 05 Written by Pattarapol (Cheer) Iamngamsup E-mail: IAM.PATTARAPOL@GMAIL.COM Counting Sundays Problem 19 You are given the following information, but you may prefer to do some research for yourself. 1 Jan 1900 was a Monday. Thirty days has September, April, June and N...
pattarapol-iamngamsup/projecteuler_python
problem_019.py
problem_019.py
py
1,852
python
en
code
0
github-code
97
[ { "api_name": "datetime.datetime", "line_number": 44, "usage_type": "call" }, { "api_name": "datetime.datetime.utcnow", "line_number": 52, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 52, "usage_type": "attribute" }, { "api_name": "dat...
2585321284
# This file contains utility-type of functions to assist with the creation # of a histogram graph, e.g., for preparing # the input data before plotting them as a histogram. from typing import List import pandas as pd from .constants import COL_NAME_BUCKETS, COL_NAME_FREQS, PRECISION_VAL def create_df_w_lats_ranges...
datastax/fallout
tools/artifact-checkers/histo-freq/src/histo_freq/utils.py
utils.py
py
1,396
python
en
code
51
github-code
97
[ { "api_name": "typing.List", "line_number": 13, "usage_type": "name" }, { "api_name": "constants.PRECISION_VAL", "line_number": 35, "usage_type": "argument" }, { "api_name": "constants.PRECISION_VAL", "line_number": 36, "usage_type": "argument" }, { "api_name": "p...
23920911060
import discord,asyncio,DiscordUtils from discord.ext import commands, tasks from discord.ext.commands import * from discord_components import * music = DiscordUtils.Music() class Music(Cog): def __init__(self,bot): self.bot = bot @command(aliases=["j",]) async def join(self,ctx): ...
Legion04/discord-bot-0
cogs/Music.py
Music.py
py
9,333
python
en
code
0
github-code
97
[ { "api_name": "DiscordUtils.Music", "line_number": 6, "usage_type": "call" }, { "api_name": "discord.Embed", "line_number": 110, "usage_type": "call" }, { "api_name": "discord.Color.random", "line_number": 110, "usage_type": "call" }, { "api_name": "discord.Color"...
2875744481
import layers import cv2 import numpy as np import utils from PIL import Image import computationalgraph def load_images(filenames, IMG_SIZE=50): images = [] for filename in filenames: #X shape is [WIDTH, HEIGHT, CHANNELS] X = cv2.imread(filename) #Resize X to [IMG_SIZE,...
ramacastro/AlexNet-CNN-from-scratch-using-computational-graphs-only-NumPy
layers_test.py
layers_test.py
py
2,359
python
en
code
4
github-code
97
[ { "api_name": "cv2.imread", "line_number": 14, "usage_type": "call" }, { "api_name": "cv2.resize", "line_number": 16, "usage_type": "call" }, { "api_name": "numpy.stack", "line_number": 22, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 28...
74690922559
# -*- coding: utf-8 -*- from twisted.internet.protocol import DatagramProtocol from c2w.main.lossy_transport import LossyTransport import c2w.main.constants as c2w_constants import c2w.protocol.constants as constants from twisted.internet import reactor from c2w.protocol.message import Message from c2w.protocol.format_...
ldesuque/c2w-protocol
c2w/protocol/udp_chat_client.py
udp_chat_client.py
py
10,150
python
en
code
0
github-code
97
[ { "api_name": "logging.basicConfig", "line_number": 11, "usage_type": "call" }, { "api_name": "logging.getLogger", "line_number": 12, "usage_type": "call" }, { "api_name": "twisted.internet.protocol.DatagramProtocol", "line_number": 15, "usage_type": "name" }, { "...
28042687730
import pandas as pd from sklearn.ensemble import RandomForestClassifier from sklearn.metrics import accuracy_score, precision_score, recall_score, f1_score train = pd.read_csv("training.csv") train = train.drop(['url'], axis=1) x_train = train.iloc[:, 0:-1] y_train = train.iloc[:, -1] clf = RandomForestClassifier(n_e...
rahulvarma5297/semester5
DM/ASSIGN2/assign2.py
assign2.py
py
843
python
en
code
0
github-code
97
[ { "api_name": "pandas.read_csv", "line_number": 4, "usage_type": "call" }, { "api_name": "sklearn.ensemble.RandomForestClassifier", "line_number": 10, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 13, "usage_type": "call" }, { "api_name":...
11113613851
import re from django.utils.text import compress_string from django.utils.cache import patch_vary_headers from django import http try: import levelhub.settings as settings XS_SHARING_ALLOWED_ORIGINS = settings.XS_SHARING_ALLOWED_ORIGINS XS_SHARING_ALLOWED_METHODS = settings.XS_SHARING_ALLOWED_METHODS ex...
ywangd/levelhub_server
wsgi/levelhub/middleware/crossdomainxhr.py
crossdomainxhr.py
py
2,557
python
en
code
0
github-code
97
[ { "api_name": "levelhub.settings.XS_SHARING_ALLOWED_ORIGINS", "line_number": 11, "usage_type": "attribute" }, { "api_name": "levelhub.settings", "line_number": 11, "usage_type": "name" }, { "api_name": "levelhub.settings.XS_SHARING_ALLOWED_METHODS", "line_number": 12, "us...
38130354510
import httphelper import requests import quandl, pandas as pd quandl_partialurl = 'https://www.quandl.com/api/v3/datasets/WIKI/{}/data.json?start_date={}&api_key={}' quandl_fullurl = 'https://www.quandl.com/api/v3/datasets/WIKI/{}/data.json?&api_key={}' def load_historicdata(symbol): url = quandl_fullurl.format(s...
w0lv3r1nix/Market-Research
market-data/quandlwrap/httpwrap.py
httpwrap.py
py
955
python
en
code
0
github-code
97
[ { "api_name": "quandl.ApiConfig", "line_number": 9, "usage_type": "attribute" }, { "api_name": "quandl.ApiConfig", "line_number": 13, "usage_type": "attribute" }, { "api_name": "httphelper.get_httprequest", "line_number": 21, "usage_type": "call" }, { "api_name": ...
6082361638
from flask import Blueprint, request, current_app from libs.awsservice import * from libs.awsclient import awsTempToken from libs.awss3service import * from libs.awssupport import awssupport from libs.defResponse import success, nonauthorization from models.Company import CompanyControl from models.AwsTokenRecord impor...
Joker-Cch/erp-cn
views/Report.py
Report.py
py
7,848
python
en
code
0
github-code
97
[ { "api_name": "flask.Blueprint", "line_number": 15, "usage_type": "call" }, { "api_name": "flask.request.json", "line_number": 22, "usage_type": "attribute" }, { "api_name": "flask.request", "line_number": 22, "usage_type": "name" }, { "api_name": "flask.request.j...
6115994740
''' This is used to plot the results from the pitch detector. To change which sound file you're looking at, modify the 'testing' variable. To change which note you're looking at, modify the 'ii' variable. To change if you're looking at a single note or the entire melody, modify the 'sung_note' variable, and 'times...
asdfang/HarmonizeMeOldFiles
python_tests/onepitch.py
onepitch.py
py
6,215
python
en
code
0
github-code
97
[ { "api_name": "matplotlib.pyplot.subplots", "line_number": 120, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 120, "usage_type": "name" }, { "api_name": "matplotlib.patches.Patch", "line_number": 121, "usage_type": "call" }, { "api_name...
6918927381
from django.shortcuts import render, redirect, get_object_or_404 from django.views import View from .cart_module import Cart from .models import Order, OrderItem, DiscountCode from product.models import Product class CartDetailView(View): def get(self, request): cart = Cart(request) return rende...
Max-shiri-90/E-commerce
online-shop/order/views.py
views.py
py
2,182
python
en
code
0
github-code
97
[ { "api_name": "django.views.View", "line_number": 9, "usage_type": "name" }, { "api_name": "cart_module.Cart", "line_number": 11, "usage_type": "call" }, { "api_name": "django.shortcuts.render", "line_number": 12, "usage_type": "call" }, { "api_name": "django.view...
71261582079
# Jane Street: June 2020 # Twenty Four Seven # The grid is incomplete. Place numbers in some of the empty cells below so that in total the grid # contains one 1, two 2’s, etc., up to seven 7’s. Furthermore, each row and column must contain # exactly 4 numbers which sum to 20. Finally, the numbered cells must form a ...
AnandakrishnanV/Solving-Puzzles-with-Z3
twenty_four_seven_simple.py
twenty_four_seven_simple.py
py
2,701
python
en
code
1
github-code
97
[ { "api_name": "constraints.findNNs", "line_number": 31, "usage_type": "call" }, { "api_name": "constraints.sum_of_rows", "line_number": 34, "usage_type": "call" }, { "api_name": "constraints.count_in_each_r_and_c", "line_number": 35, "usage_type": "call" }, { "api...
37746313923
import tensorflow as tf import kerastuner as kt import os import cv2 import random import time import numpy as np import pickle import h5py import keras from sklearn.model_selection import train_test_split from tensorflow.keras.models import Sequential from tensorflow.keras.layers import Dense, Conv2D, Activation, Fla...
Furknn/Bitirme-Tezi-Backend
HyperParameterTuner.py
HyperParameterTuner.py
py
4,501
python
en
code
0
github-code
97
[ { "api_name": "os.path.join", "line_number": 26, "usage_type": "call" }, { "api_name": "os.path", "line_number": 26, "usage_type": "attribute" }, { "api_name": "os.listdir", "line_number": 28, "usage_type": "call" }, { "api_name": "cv2.imread", "line_number": ...
4187740873
#!/usr/bin/env python """ # License: GNU Affero General Public License v3 or later # A copy of GNU AGPL v3 should have been included in this software package in LICENSE.txt. File containing definition of the NCBI class and containing functions useful for handling NCBI taxonomy databases """ import gzip import loggin...
KwanLab/Autometa
autometa/taxonomy/ncbi.py
ncbi.py
py
18,892
python
en
code
34
github-code
97
[ { "api_name": "logging.getLogger", "line_number": 29, "usage_type": "call" }, { "api_name": "autometa.config.utilities.DEFAULT_CONFIG.get", "line_number": 31, "usage_type": "call" }, { "api_name": "autometa.config.utilities.DEFAULT_CONFIG", "line_number": 31, "usage_type"...
73705207360
import pandas as pd import matplotlib.pyplot as plt import seaborn as sns file_path_csv = '../data/data.csv' data = pd.read_csv(file_path_csv) data.head() # Devices Used plt.figure(figsize=(10, 6)) sns.countplot(x='DEVICE_TYPE_W63', data=data) plt.title('Distribution of Devices Used') plt.ylabel('Count') plt.xlabel(...
kyle1373/ECE143-group-4
visualizations/app.py
app.py
py
1,222
python
en
code
0
github-code
97
[ { "api_name": "pandas.read_csv", "line_number": 6, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.figure", "line_number": 11, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 11, "usage_type": "name" }, { "api_name": "seaborn.cou...
32232865799
from django.core.validators import MinValueValidator, MaxValueValidator from django.db import models class Task(models.Model): text = models.CharField(max_length=160) deadline = models.DateField() progress = models.IntegerField( default=0, validators=[ MinValueValidator(0), ...
lysnikolaou/django-todo
skasys_ha/todo/models.py
models.py
py
368
python
en
code
0
github-code
97
[ { "api_name": "django.db.models.Model", "line_number": 5, "usage_type": "attribute" }, { "api_name": "django.db.models", "line_number": 5, "usage_type": "name" }, { "api_name": "django.db.models.CharField", "line_number": 6, "usage_type": "call" }, { "api_name": "...
2715342387
import sys,argparse,codecs from tfner.configfromfile import ModelConfig from tfner.core import build_model #---------------------------------------------------------------------- # main function def main(argv): # parse command-line arguments parser=argparse.ArgumentParser(description="build a NN model for...
aymara/lima-tfner
build_model.py
build_model.py
py
721
python
en
code
3
github-code
97
[ { "api_name": "argparse.ArgumentParser", "line_number": 10, "usage_type": "call" }, { "api_name": "tfner.configfromfile.ModelConfig", "line_number": 19, "usage_type": "call" }, { "api_name": "tfner.core.build_model", "line_number": 20, "usage_type": "call" }, { "a...
17537043409
import cv2 def collage(imag): vi=cv2.VideoCapture("C:\\Users\\anand\\Videos\\cheeta.mp4") fps=int(vi.get(cv2.CAP_PROP_FPS)) w=int(vi.get(cv2.CAP_PROP_FRAME_WIDTH)) h=int(vi.get(cv2.CAP_PROP_FRAME_HEIGHT)) op=cv2.VideoWriter("C:\\Users\\anand\\Videos\\cheeta.avi",cv2.VideoWriter_fourcc('X','V','I','D...
G3learns/python
image4.py
image4.py
py
877
python
en
code
0
github-code
97
[ { "api_name": "cv2.VideoCapture", "line_number": 3, "usage_type": "call" }, { "api_name": "cv2.CAP_PROP_FPS", "line_number": 4, "usage_type": "attribute" }, { "api_name": "cv2.CAP_PROP_FRAME_WIDTH", "line_number": 5, "usage_type": "attribute" }, { "api_name": "cv2...
38569911232
# Problem 24 # ========== # # # A permutation is an ordered arrangement of objects. For example, 3124 is # one possible permutation of the digits 1, 2, 3 and 4. If all of the # permutations are listed numerically or alphabetically, we call it # lexicographic order. The lexicographic permutations of 0, 1 and...
ximocoder/CodeExercises
Project Euler/Python/Exercise24.py
Exercise24.py
py
794
python
en
code
0
github-code
97
[ { "api_name": "itertools.permutations", "line_number": 16, "usage_type": "call" } ]
2870068576
from flask import Flask, render_template, request from main import get_candlestick_data, save_to_csv, get_market_caps import plotly.express as px import pandas as pd import plotly.graph_objects as go app = Flask(__name__) SYMBOLS = [ "ADAUSDT", "DOGEUSDT", "TRXUSDT", "MATICUSDT", "SOLUSDT", ...
WDemidenko/Algo-Zeus-test_task
app.py
app.py
py
1,580
python
en
code
0
github-code
97
[ { "api_name": "flask.Flask", "line_number": 9, "usage_type": "call" }, { "api_name": "flask.request.args.get", "line_number": 27, "usage_type": "call" }, { "api_name": "flask.request.args", "line_number": 27, "usage_type": "attribute" }, { "api_name": "flask.reque...
25254139616
from http.client import responses import numpy as np import pandas as pd from sklearn.linear_model import LinearRegression from scipy.stats import chi2_contingency from sklearn.preprocessing import LabelEncoder import matplotlib as plt import seaborn as sns url="http://data.insideairbnb.com/singapore/sg/singapore/202...
farima-trb/Data-Mining-Course-Project
datamining-uni/4/Untitled-1 copy.py
Untitled-1 copy.py
py
4,444
python
en
code
0
github-code
97
[ { "api_name": "pandas.read_csv", "line_number": 12, "usage_type": "call" }, { "api_name": "sklearn.linear_model.LinearRegression", "line_number": 70, "usage_type": "call" }, { "api_name": "pandas.crosstab", "line_number": 93, "usage_type": "call" }, { "api_name": ...
73832841920
import imutils import shutil import numpy as np import copy import glob import cv2 import os import re PIC_NAMES = [ #'alien', 'alienmonster', #'avocado', 'beamingfacewithsmilingeyes', #'baguettebread', 'butterfly', 'banana', 'babychick', 'balloon', 'books', 'bird', #'...
GrzegorzKrug/zoom-your-picture
modules/get_preview_images.py
get_preview_images.py
py
2,872
python
en
code
0
github-code
97
[ { "api_name": "os.path.join", "line_number": 62, "usage_type": "call" }, { "api_name": "os.path", "line_number": 62, "usage_type": "attribute" }, { "api_name": "os.path.join", "line_number": 63, "usage_type": "call" }, { "api_name": "os.path", "line_number": 6...
21806439249
import json from urllib.parse import urlparse from stark.codecs import BaseCodec from stark.codecs.jsonschema import JSONSchemaEncoder from stark.schema import ( SchemaDefinitions, JSONSchema, String, Choice, Object, Any, Reference, Array, Boolean, is_schema ) from stark.compat i...
aachurin/stark
stark/codecs/openapi.py
openapi.py
py
13,923
python
en
code
0
github-code
97
[ { "api_name": "stark.schema.Object", "line_number": 21, "usage_type": "call" }, { "api_name": "stark.schema.String", "line_number": 22, "usage_type": "call" }, { "api_name": "stark.schema.Object", "line_number": 25, "usage_type": "call" }, { "api_name": "stark.sch...
40871063654
# author : Arief Anbiya (anbarief@live.com) # Algorithm for the visualization import numpy sqrt = numpy.sqrt cos = numpy.cos sin = numpy.sin pi = numpy.pi import matplotlib.pyplot as plt import matplotlib.font_manager as fm from matplotlib import colors as mplcolors from statistweepy import utils from statistweepy im...
anbarief/statistweepy
statistweepy/viz.py
viz.py
py
13,709
python
en
code
9
github-code
97
[ { "api_name": "numpy.sqrt", "line_number": 5, "usage_type": "attribute" }, { "api_name": "numpy.cos", "line_number": 6, "usage_type": "attribute" }, { "api_name": "numpy.sin", "line_number": 7, "usage_type": "attribute" }, { "api_name": "numpy.pi", "line_numbe...
37046300650
from sklearn.metrics import precision_recall_fscore_support from sklearn.metrics import accuracy_score from sklearn.metrics import classification_report from sklearn.metrics import confusion_matrix import matplotlib.pyplot as plt import numpy as np import itertools #file path predicted labels file_path_pred = '/home/...
kenellysra/emotiondetection
src/python/evaluationml.py
evaluationml.py
py
3,790
python
en
code
0
github-code
97
[ { "api_name": "sklearn.metrics.precision_recall_fscore_support", "line_number": 51, "usage_type": "call" }, { "api_name": "sklearn.metrics.accuracy_score", "line_number": 53, "usage_type": "call" }, { "api_name": "sklearn.metrics.classification_report", "line_number": 62, ...
13067624468
from scapy.all import * from scapy.contrib.pnio_rpc import * from scapy.contrib.dce_rpc import * from scapy.contrib.pnio import * import crcmod from helper.gsdml_parser import XMLDevice load_contrib("pnio") load_contrib("pnio_rpc") load_contrib("dce_rpc") class PNIOPSMessage: def __init__(self) -> None: ...
seb711/profisafe
helper/view_pnsafe_data.py
view_pnsafe_data.py
py
5,983
python
en
code
0
github-code
97
[ { "api_name": "crcmod.mkCrcFun", "line_number": 129, "usage_type": "call" }, { "api_name": "helper.gsdml_parser.XMLDevice", "line_number": 131, "usage_type": "call" } ]
32491038551
import pymongo from app import app from flask import request, jsonify, render_template, redirect, url_for, flash import sys from app.database import tasks_collection, redis_conn from rq import Queue from bson import ObjectId from datetime import datetime from app.worker import clean_data, transform_data, analyz...
Eskabore/distributed_task_queue
app/tasks.py
tasks.py
py
10,110
python
en
code
0
github-code
97
[ { "api_name": "rq.Queue", "line_number": 20, "usage_type": "call" }, { "api_name": "app.database.redis_conn", "line_number": 20, "usage_type": "name" }, { "api_name": "rq.Queue", "line_number": 21, "usage_type": "call" }, { "api_name": "app.database.redis_conn", ...
6200301952
import asyncio from services import file_manager from services import rcon_manager from services import permission_manager from services import db_access from datetime import datetime, timedelta config = file_manager.load_config() def main_check(): for x in config["servers"]: tribe_list = rcon_manager....
visualies/tribe_ranks
main.py
main.py
py
5,771
python
en
code
0
github-code
97
[ { "api_name": "services.file_manager.load_config", "line_number": 9, "usage_type": "call" }, { "api_name": "services.file_manager", "line_number": 9, "usage_type": "name" }, { "api_name": "services.rcon_manager.player_tribe_check", "line_number": 15, "usage_type": "call" ...
5601295523
def findancestors(thing): ''' specify and object (thing) to traceback, returns G wich is an AGraph object to plot: G.draw('<filename>.svg/jpg/tiff/pdf', prog = 'dot') ''' import pygraphviz as pgv mro = thing.__mro__ base_relations = {} base_relations_literal = {} for i in mro: base_relations[i] = i.__bas...
Bionetbook/bionetbook
bnbapp/sandbox/findancestors.py
findancestors.py
py
725
python
en
code
0
github-code
97
[ { "api_name": "pygraphviz.AGraph", "line_number": 18, "usage_type": "call" } ]
23206438990
import time import random import pygame import sys import os import json import gym import numpy as np from stable_baselines3 import A2C, PPO, DQN from pygame_ped_env.entities.maskedDQN import MaskableDQN from sb3_contrib.ppo_mask import MaskablePPO from pygame.sprite import Sprite, Group, GroupSingle from typing im...
Rik-Fox/pygame_ped_env
pygame_ped_env/envs/env1.py
env1.py
py
31,061
python
en
code
0
github-code
97
[ { "api_name": "gym.Env", "line_number": 27, "usage_type": "attribute" }, { "api_name": "typing.Union", "line_number": 31, "usage_type": "name" }, { "api_name": "typing.Sequence", "line_number": 31, "usage_type": "name" }, { "api_name": "os.path.dirname", "line...
6560624836
import cv2 import numpy as np import pandas as pd from tensorflow import keras model = keras.models.load_model('MNIST_AmericanSignLanguage.h5') cap = cv2.VideoCapture(0) while True: ret, photo = cap.read() photo = cv2.cvtColor(photo, cv2.COLOR_BGR2GRAY) # photo = cv2.flip(photo,1) photo = cv2.rec...
This-is-NB/ISL_Recognition
temp.py
temp.py
py
834
python
en
code
0
github-code
97
[ { "api_name": "tensorflow.keras.models.load_model", "line_number": 5, "usage_type": "call" }, { "api_name": "tensorflow.keras.models", "line_number": 5, "usage_type": "attribute" }, { "api_name": "tensorflow.keras", "line_number": 5, "usage_type": "name" }, { "api...
22986859633
from django.shortcuts import render, redirect from django.contrib import messages from django.http import HttpResponse from subtitlingAI.forms import VideoFileForm from subtitlingAI.models import VideoFile from subtitlingAI.data_process.transcription import main import shutil, os def clean_database(): n = VideoFil...
margotbtn/subtitling-app
subtitlingAI/views.py
views.py
py
1,536
python
en
code
0
github-code
97
[ { "api_name": "subtitlingAI.models.VideoFile.objects.count", "line_number": 10, "usage_type": "call" }, { "api_name": "subtitlingAI.models.VideoFile.objects", "line_number": 10, "usage_type": "attribute" }, { "api_name": "subtitlingAI.models.VideoFile", "line_number": 10, ...
8821260453
import json import pytest from anno.crud import CRUD from anno.errors import InvalidInputWebAnnotationError from anno.json_models import AnnoJS from anno.json_models import Catcha from .conftest import make_wa_object @pytest.mark.skip('debugging fixture') @pytest.mark.usefixtures('wa_list') def test_fixture_wa_list...
nmaekawa/catchpy
anno/tests/test_annojs.py
test_annojs.py
py
1,850
python
en
code
9
github-code
97
[ { "api_name": "json.dumps", "line_number": 15, "usage_type": "call" }, { "api_name": "pytest.mark.skip", "line_number": 12, "usage_type": "call" }, { "api_name": "pytest.mark", "line_number": 12, "usage_type": "attribute" }, { "api_name": "pytest.mark.usefixtures"...
70695665919
from sqlalchemy.ext.asyncio import AsyncSession from sqlalchemy.orm import Session from sqlalchemy.sql import text from sqlalchemy.orm import Session from models import games as games_model from models import users as users_model from schemas import games as games_schema def read_boxes(db: Session): BoxList = db.q...
HackathonWinterAteam/LearningKaruta
app/cruds/games.py
games.py
py
4,459
python
en
code
1
github-code
97
[ { "api_name": "sqlalchemy.orm.Session", "line_number": 9, "usage_type": "name" }, { "api_name": "models.games.boxes", "line_number": 10, "usage_type": "attribute" }, { "api_name": "models.games", "line_number": 10, "usage_type": "name" }, { "api_name": "sqlalchemy...
30449707841
import argparse import os import sys import time import mmap import signal from os import fork def main(): parser = argparse.ArgumentParser() parser.add_argument('-f', '--file', help='Path del archivo') args = parser.parse_args() mapp(args) def store_up(segment, cpid, args):...
Agustinm28/Computacion_2
Signals y mmap/mmap_sig.py
mmap_sig.py
py
1,565
python
en
code
0
github-code
97
[ { "api_name": "argparse.ArgumentParser", "line_number": 11, "usage_type": "call" }, { "api_name": "sys.stdin", "line_number": 20, "usage_type": "attribute" }, { "api_name": "os.getpid", "line_number": 21, "usage_type": "call" }, { "api_name": "os.getpid", "lin...
10641260653
from turtle import Turtle, Screen import random import colorgram import re turtle = Turtle() turtle.shape("turtle") turtle.color("DarkOrchid1") def draw_square(): """draw a square""" turtle.forward(100) turtle.right(90) turtle.forward(100) turtle.right(90) turtle.forward(100) turtle.right...
hank8906/Python_100Days_intermediate
intermediate/Day18/main.py
main.py
py
3,063
python
en
code
0
github-code
97
[ { "api_name": "turtle.Turtle", "line_number": 5, "usage_type": "call" }, { "api_name": "turtle.shape", "line_number": 7, "usage_type": "call" }, { "api_name": "turtle.color", "line_number": 8, "usage_type": "call" }, { "api_name": "turtle.forward", "line_numbe...
41311201504
import json from datetime import datetime, date from flask import Blueprint, request from flask import current_app as app from db.wikishield_connection import DBConnection as WS from db.wikishield_db import WikishieldDB from lang.langs import Lang, LangsManager from db.connection_info import read_sql_user_name from c...
MatanelAbayof/Wikishield
routes/api.py
api.py
py
7,043
python
en
code
0
github-code
97
[ { "api_name": "flask.Blueprint", "line_number": 14, "usage_type": "call" }, { "api_name": "json.dumps", "line_number": 42, "usage_type": "call" }, { "api_name": "json.dumps", "line_number": 54, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_n...
35331665067
from typing import Any, Dict, List, Tuple from itertools import product import numpy as np DataSpec = Tuple[str, Dict[str, Any]] def hmm_dataset(non_null_mean_min: int, non_null_mean_max: int, trans_min: float = 0.1, trans_max: float = 1, trans_step: f...
neilzxu/suplord
src/exp/datasets.py
datasets.py
py
2,285
python
en
code
0
github-code
97
[ { "api_name": "typing.Tuple", "line_number": 6, "usage_type": "name" }, { "api_name": "typing.Dict", "line_number": 6, "usage_type": "name" }, { "api_name": "typing.Any", "line_number": 6, "usage_type": "name" }, { "api_name": "itertools.product", "line_number...
42212343429
import json import random import requests from discord.ext.commands import Bot, BucketType, Cog, Context, command, cooldown from .utils.logs import * class RandomAPI: def __init__(self, api_key: str) -> None: self.api_key = api_key self.cache = [] self.d1k = [] self.cache_size = ...
mtsev/senko
cogs/dice.py
dice.py
py
3,987
python
en
code
4
github-code
97
[ { "api_name": "requests.post", "line_number": 34, "usage_type": "call" }, { "api_name": "json.dumps", "line_number": 34, "usage_type": "call" }, { "api_name": "random.randint", "line_number": 39, "usage_type": "call" }, { "api_name": "discord.ext.commands.Cog", ...
2827485846
#!/usr/bin/env python import os import sys import argparse import wikimap from itertools import imap class GridSearch(object): """ This class iterates through different combinations of parameters. For each argument a value or a list of values is given. At each step of the iteration one value from ea...
pderkowski/wikimap
run.py
run.py
py
10,027
python
en
code
1
github-code
97
[ { "api_name": "itertools.imap", "line_number": 53, "usage_type": "call" }, { "api_name": "argparse.ArgumentParser", "line_number": 63, "usage_type": "call" }, { "api_name": "argparse.ArgumentDefaultsHelpFormatter", "line_number": 64, "usage_type": "attribute" }, { ...
73781960637
""" Swithing between color spaces - systems of representing colors RGB, Grayscale, HSV, LAB """ import cv2 as cv from matplotlib import pyplot as plt img_path='snip.jpg' img = cv.imread(img_path) # BGR (Blue Green Red) to Grayscale # Grayscale shows you the distribution of intensities in an image gray = cv.cvtColor...
themichaelmort/Soccer_video_tracking
color_spaces.py
color_spaces.py
py
823
python
en
code
0
github-code
97
[ { "api_name": "cv2.imread", "line_number": 11, "usage_type": "call" }, { "api_name": "cv2.cvtColor", "line_number": 15, "usage_type": "call" }, { "api_name": "cv2.COLOR_BGR2GRAY", "line_number": 15, "usage_type": "attribute" }, { "api_name": "cv2.cvtColor", "l...
35226585632
import cv2 import numpy as np pathBGD = 'Resources/Background.png' pathA = 'Resources/Typa_A.png' pathB = 'Resources/Typa_B.png' pathC = 'Resources/Typa_C.png' pathD = 'Resources/Typa_D.png' pathTest = 'Resources/Ahw0145.png' imgTest = cv2.imread(pathTest) imgBGD = cv2.imread(pathBGD) imgCopy = imgTest.copy() maskA =...
ck0121/Flag-Classification
sobel detection/Mask_1.py
Mask_1.py
py
1,782
python
en
code
0
github-code
97
[ { "api_name": "cv2.imread", "line_number": 11, "usage_type": "call" }, { "api_name": "cv2.imread", "line_number": 12, "usage_type": "call" }, { "api_name": "cv2.imread", "line_number": 14, "usage_type": "call" }, { "api_name": "cv2.imread", "line_number": 15, ...
33665914846
import openpyxl from find_code import * from converter import converter def main(): try: # Если файл имеет расширения не .xlsx, то сохраняю его в этот формат. converter() except: # Иначе пропустить. pass create_document() def create_document(): upd = openpyxl.open('upd...
cka304huk-m/Public
tdm/read_upd.py
read_upd.py
py
2,070
python
ru
code
0
github-code
97
[ { "api_name": "converter.converter", "line_number": 8, "usage_type": "call" }, { "api_name": "openpyxl.open", "line_number": 16, "usage_type": "call" } ]
36369746859
from flask_redis import FlaskRedis from ..utils.eventlet import eventlet from flask_socketio import emit import time redis_store = FlaskRedis() def redisReader(): pubsub = redis_store.pubsub() pubsub.subscribe('msg') print ('Starting Redis subscriber') for msg in pubsub.listen(): #print ('>>>>>', msg) print('R...
vladimirmyshkovski/tetrafoil
application/utils/redis.py
redis.py
py
590
python
en
code
4
github-code
97
[ { "api_name": "flask_redis.FlaskRedis", "line_number": 6, "usage_type": "call" }, { "api_name": "utils.eventlet.eventlet.GreenPool", "line_number": 21, "usage_type": "call" }, { "api_name": "utils.eventlet.eventlet", "line_number": 21, "usage_type": "name" } ]
158344106
from flask import render_template, redirect, request, session from flask_app import app from flask_app.config.mysqlconnection import connectToMySQL from flask_app.models.users_model import User from flask_app.models.recipes_model import Recipe @app.route('/new/recipe') # to show the create recipe page def new(): ...
beccamargolis/recipe_hub
flask_app/controllers/recipes_controller.py
recipes_controller.py
py
2,657
python
en
code
0
github-code
97
[ { "api_name": "flask.session", "line_number": 11, "usage_type": "name" }, { "api_name": "flask.redirect", "line_number": 12, "usage_type": "call" }, { "api_name": "flask.session", "line_number": 14, "usage_type": "name" }, { "api_name": "flask.render_template", ...
22199512728
from json import load from itsdangerous import exc import VideoPage from PyQt5 import QtWidgets import data import loadingPage import pafy import videoLoading import urllib.request from PyQt5.QtGui import * class PlayList: def __init__(self,Ui,con): self.ui=Ui self.con=con # 굳이 매개변수로 할필요 없었다 ...
manNomi/testNeflix
playListPage.py
playListPage.py
py
11,982
python
en
code
0
github-code
97
[ { "api_name": "loadingPage.Loading", "line_number": 17, "usage_type": "call" }, { "api_name": "videoLoading.LoadingVideo", "line_number": 18, "usage_type": "call" }, { "api_name": "VideoPage.Video", "line_number": 19, "usage_type": "call" }, { "api_name": "data.Da...
34733266444
from zope import component from Acquisition import aq_inner from AccessControl import ClassSecurityInfo from Products.CMFCore.permissions import View from Products.CMFCore.utils import getToolByName from Products.Five.browser import BrowserView from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile ...
Raptus/raptus.article.mapsjunaio
raptus/article/mapsjunaio/xml/junaio.py
junaio.py
py
2,847
python
en
code
0
github-code
97
[ { "api_name": "Products.Five.browser.BrowserView", "line_number": 15, "usage_type": "name" }, { "api_name": "Products.Five.browser.pagetemplatefile.ViewPageTemplateFile", "line_number": 23, "usage_type": "call" }, { "api_name": "Products.CMFCore.utils.getToolByName", "line_nu...
44375412738
from sys import argv from os.path import abspath from os import getenv import json import codecs type_ = argv[1] alias, code_dir = argv[2:4] home = '/home/'+getenv("SUDO_USER") if type_ == "file": code_lit = "" with open(abspath(code_dir),'r') as codeF: line = codeF.readline() while line: code_lit += line ...
TheKillerAboy/Ubuntu-Extensions
SHDev/SHDev/install.py
install.py
py
764
python
en
code
0
github-code
97
[ { "api_name": "sys.argv", "line_number": 7, "usage_type": "name" }, { "api_name": "sys.argv", "line_number": 8, "usage_type": "name" }, { "api_name": "os.getenv", "line_number": 9, "usage_type": "call" }, { "api_name": "os.path.abspath", "line_number": 12, ...
36610539481
# Util classes from utils file from utils import Stack from utils import Queue # This BFS will take the player back to the nearest room that has an unexplored exit def uncharted_path(currentPath, room_id, player): # Create an empty set to store visited nodes visited = set() # Create an empty Queue and enqu...
AAsriyan/Sprint-Challenge--Graphs
graph_adventure/helpers.py
helpers.py
py
2,219
python
en
code
0
github-code
97
[ { "api_name": "utils.Queue", "line_number": 10, "usage_type": "call" } ]
13825150072
from django.urls import path from . import views # start with blog urlpatterns = [ # http://localhost:8000/oas/ path('', views.article_list, name='article_list'), path('<int:article_pk>', views.article_detail, name="article_detail"), path('type/<int:err_type_pk>', views.article_with_type, name="article...
lightlogic5/fault_sys
oa/urls.py
urls.py
py
427
python
en
code
0
github-code
97
[ { "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", ...
73020642560
# #!/usr/bin/env python from selenium import webdriver from selenium.webdriver.chrome.options import Options as ChromeOptions class SwagLab: # Start the browser and login with standard_user options = ChromeOptions() options.add_argument("--no-sandbox") options.add_argument('--headless') option...
ub-wroteIt/azure-devops-demo
automatedtesting/selenium/login.py
login.py
py
2,872
python
en
code
0
github-code
97
[ { "api_name": "selenium.webdriver.chrome.options.Options", "line_number": 7, "usage_type": "call" }, { "api_name": "selenium.webdriver.Chrome", "line_number": 13, "usage_type": "call" }, { "api_name": "selenium.webdriver", "line_number": 13, "usage_type": "name" } ]
7259529794
import timeit; program_start_time = timeit.default_timer() import random random.seed(int(timeit.default_timer())) from general_tools import * import logging import formatting, preprocessWavs logger = logging.getLogger('PrepTCDTIMIT') logger.setLevel(logging.DEBUG) FORMAT = '[$BOLD%(filename)s$RESET:%(lineno)d][%(l...
matthijsvk/multimodalSR
code/audioSR/dataToPkl_testSet.py
dataToPkl_testSet.py
py
5,012
python
en
code
56
github-code
97
[ { "api_name": "timeit.default_timer", "line_number": 3, "usage_type": "call" }, { "api_name": "random.seed", "line_number": 6, "usage_type": "call" }, { "api_name": "timeit.default_timer", "line_number": 6, "usage_type": "call" }, { "api_name": "logging.getLogger"...
24483823071
from django.conf import settings from django.conf.urls.static import static from django.contrib import admin from django.urls import path, include from app1 import views app_name='app1' urlpatterns = [ path('',views.fn1,name='fn1'), path('delete/<int:id>/',views.deletefn,name='deletefn'), path('update/<int...
mathewjoseph2811/mathew
todoapp/app1/urls.py
urls.py
py
796
python
en
code
0
github-code
97
[ { "api_name": "django.urls.path", "line_number": 9, "usage_type": "call" }, { "api_name": "app1.views.fn1", "line_number": 9, "usage_type": "attribute" }, { "api_name": "app1.views", "line_number": 9, "usage_type": "name" }, { "api_name": "django.urls.path", "...
28987891900
import socket # for connecting to the server import _thread # to manage multiple clients import json # to enconde and decode the data host = '127.0.0.1' port = 5000 # initiate port no above 1024 clients = {} def server_program(): print('Starting Relay Server at ' + host + ':' + str(port)) # show in terminal ...
vitorpamplona/relayserver
server.py
server.py
py
2,333
python
en
code
0
github-code
97
[ { "api_name": "socket.socket", "line_number": 14, "usage_type": "call" }, { "api_name": "_thread.start_new_thread", "line_number": 22, "usage_type": "call" }, { "api_name": "json.loads", "line_number": 35, "usage_type": "call" }, { "api_name": "json.loads", "l...
40450595184
import os import json import importlib from io import StringIO import h2o.exceptions import pytest import pandas as pd import insolver from insolver import InsolverDataFrame from insolver.wrappers import InsolverGLMWrapper from insolver.transforms import ( InsolverTransform, TransformAge, TransformMapValue...
MindSetLib/Insolver
tests/test_serving_flask.py
test_serving_flask.py
py
4,795
python
en
code
17
github-code
97
[ { "api_name": "pandas.isnull", "line_number": 29, "usage_type": "call" }, { "api_name": "insolver.InsolverDataFrame", "line_number": 74, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 74, "usage_type": "call" }, { "api_name": "io.StringIO"...
27215362092
import uuid from django.core.validators import MaxValueValidator, MinValueValidator from django.db import models from django.utils.translation import gettext_lazy as _ class TimeStampedMixin(models.Model): created = models.DateTimeField(auto_now_add=True) modified = models.DateTimeField(auto_now=True) c...
nekto007/new_admin_panel_sprint_2
01_doker_compose/app/movies/models.py
models.py
py
4,591
python
en
code
0
github-code
97
[ { "api_name": "django.db.models.Model", "line_number": 8, "usage_type": "attribute" }, { "api_name": "django.db.models", "line_number": 8, "usage_type": "name" }, { "api_name": "django.db.models.DateTimeField", "line_number": 9, "usage_type": "call" }, { "api_name...
24936950957
import sys from collections import deque from itertools import combinations import copy input = sys.stdin.readline N,M = map(int, input().split()) board = [[0 for _ in range(M)] for _ in range(N)] dx = [-1, 0, 1, 0] dy = [0, 1, 0, -1] answer = -1 empty_pos = [] virus_pos = [] for i in range(N): row = list(ma...
fegler/ps
boj/14502.py
14502.py
py
1,292
python
en
code
0
github-code
97
[ { "api_name": "sys.stdin", "line_number": 6, "usage_type": "attribute" }, { "api_name": "itertools.combinations", "line_number": 25, "usage_type": "call" }, { "api_name": "collections.deque", "line_number": 28, "usage_type": "call" } ]
14614923309
import datetime from typing import Callable, List MIGRATIONS: List[Callable] = [] migration = MIGRATIONS.append def migrate(db): ensure_migrations_table(db) already_applied = {r["name"] for r in db["_llm_migrations"].rows} for fn in MIGRATIONS: name = fn.__name__ if name not in already_ap...
simonw/llm
llm/migrations.py
migrations.py
py
4,836
python
en
code
1,859
github-code
97
[ { "api_name": "typing.List", "line_number": 4, "usage_type": "name" }, { "api_name": "typing.Callable", "line_number": 4, "usage_type": "name" }, { "api_name": "datetime.datetime.utcnow", "line_number": 16, "usage_type": "call" }, { "api_name": "datetime.datetime"...
978237233
import mysql_config import mysql.connector from mysql.connector import errorcode import datetime import decimal import plotly.express as px import seaborn as sns import matplotlib as mpl import matplotlib.patches as mpatches import matplotlib.pyplot as plt import numpy as np import plotly.graph_objects as go import io ...
johnny22/Weather_app
front_end/data_getter.py
data_getter.py
py
15,291
python
en
code
0
github-code
97
[ { "api_name": "mysql.connector.connector.connect", "line_number": 22, "usage_type": "call" }, { "api_name": "mysql.connector.connector", "line_number": 22, "usage_type": "attribute" }, { "api_name": "mysql.connector", "line_number": 22, "usage_type": "name" }, { "...
73757812158
""" Pytorch Lightning models for MNIST dataset. """ from typing import Callable, List, Optional, Union from lightning.pytorch.utilities.types import EVAL_DATALOADERS import torch from torch import nn from torch.nn import functional as F from torch.utils.data import DataLoader, random_split from torchmetrics import Acc...
interTwin-eu/T6.5-AI-and-ML
ai/src/itwinai/plmodels/mnist.py
mnist.py
py
7,168
python
en
code
3
github-code
97
[ { "api_name": "base.ItwinaiBasePlDataModule", "line_number": 18, "usage_type": "name" }, { "api_name": "typing.Optional", "line_number": 36, "usage_type": "name" }, { "api_name": "typing.Callable", "line_number": 36, "usage_type": "name" }, { "api_name": "torchvis...
36621743292
''' This pyspark script reads parquet file and displays its content ''' from pyspark.sql import SparkSession, DataFrame # Create Spark Session # here 3.0.3 is the spark version;refer using https://mvnrepository.com/artifact/org.apache.spark/spark-sql-kafka-0-10 spark = SparkSession \ .builder \ .appName("Spa...
rollingJuggernaut/spark-streaming
readParquetFile.py
readParquetFile.py
py
849
python
en
code
0
github-code
97
[ { "api_name": "pyspark.sql.SparkSession.builder.appName", "line_number": 9, "usage_type": "call" }, { "api_name": "pyspark.sql.SparkSession.builder", "line_number": 9, "usage_type": "attribute" }, { "api_name": "pyspark.sql.SparkSession", "line_number": 9, "usage_type": "...
8994639025
from django.core.mail import send_mail from django.utils.translation import gettext from FamilyBackend import settings from core.services.email.system import render_email def send_item_email(timetable: str, row: str, start_time: str, item_title: str, family: str, email: list): context = {"timeta...
louieee/FamilyApp
FamilyBackend/core/services/email/timetable.py
timetable.py
py
676
python
en
code
1
github-code
97
[ { "api_name": "core.services.email.system.render_email", "line_number": 13, "usage_type": "call" }, { "api_name": "django.utils.translation.gettext", "line_number": 14, "usage_type": "call" }, { "api_name": "django.core.mail.send_mail", "line_number": 15, "usage_type": "c...
9425434488
""" 自定义中间件 """ import hashlib from django.core.cache import cache from django.http import JsonResponse SHA1_GEN_PROTO = hashlib.sha1() def check_user_sign(get_response): def middleware(request): if request.path.startswith('/api'): data = request.GET if request.method == 'GET' else request.d...
xiongwenxin123/fang
common/middlewares.py
middlewares.py
py
928
python
en
code
0
github-code
97
[ { "api_name": "hashlib.sha1", "line_number": 9, "usage_type": "call" }, { "api_name": "django.core.cache.cache.get", "line_number": 19, "usage_type": "call" }, { "api_name": "django.core.cache.cache", "line_number": 19, "usage_type": "name" }, { "api_name": "djang...
41299061535
import random from statistics import mode from typing import Union import torch from torch import Tensor import torch.nn as nn import torch.nn.functional as F from torch.utils.data import DataLoader from tqdm.auto import tqdm import transformers import logging import pandas as pd import os import argparse import log...
tejasvaidhyadev/mila_course
nlp/a4_code/part_2_code.py
part_2_code.py
py
14,827
python
en
code
0
github-code
97
[ { "api_name": "argparse.ArgumentParser", "line_number": 21, "usage_type": "call" }, { "api_name": "logging.getLogger", "line_number": 26, "usage_type": "call" }, { "api_name": "logging.INFO", "line_number": 27, "usage_type": "attribute" }, { "api_name": "logging.F...
38712492069
import cadquery as cq from cadquery import * try: from OCC.Core.gp import gp_Dir, gp_Pnt, gp_Vec, gp_XYZ except: from OCP.gp import gp_Dir, gp_Pnt, gp_Vec, gp_XYZ try: import crayons has_crayons = True except: has_crayons = False from cqkit.cq_geometry import edge_length, wire_length from .cq_f...
michaelgale/cq-kit
cqkit/cq_pprint.py
cq_pprint.py
py
9,255
python
en
code
84
github-code
97
[ { "api_name": "cq_files.better_float_str", "line_number": 27, "usage_type": "call" }, { "api_name": "crayons.red", "line_number": 35, "usage_type": "call" }, { "api_name": "crayons.green", "line_number": 37, "usage_type": "call" }, { "api_name": "crayons.blue", ...
11917525731
from beir.datasets.data_loader import GenericDataLoader from beir.retrieval.train import TrainRetriever from sentence_transformers import SentenceTransformer, losses, models import os def mnrl( data_path, base_ckpt, output_dir, max_seq_length=350, use_amp=True, qgen_prefix="qgen", ): prefi...
UKPLab/gpl
gpl/toolkit/mnrl.py
mnrl.py
py
1,680
python
en
code
281
github-code
97
[ { "api_name": "beir.datasets.data_loader.GenericDataLoader", "line_number": 17, "usage_type": "call" }, { "api_name": "sentence_transformers.models.Transformer", "line_number": 23, "usage_type": "call" }, { "api_name": "sentence_transformers.models", "line_number": 23, "u...
31983430131
import tweepy consumer_key="PxKJuonUhVuyiE5KzcjazfrWR" consumer_secret="xSl4Q1T6jfs5DqiseNeVJLsEpcfZpk5LjrBUpAJXebWd56aBIE" access_token="1522356900204933120-NvVS8bZxeODCIESjbBWQ46iQNZlKYb" access_token_secret="gVGo4GOxfJCvyQ7gOY1alqJzjrZz1RLJZeGs92wBaGHXL" auth = tweepy.OAuthHandler(consumer_key, consumer_secret) ...
khaou1/tweepy-bots
bot.py
bot.py
py
773
python
en
code
0
github-code
97
[ { "api_name": "tweepy.OAuthHandler", "line_number": 8, "usage_type": "call" }, { "api_name": "tweepy.API", "line_number": 13, "usage_type": "call" } ]
13310539534
from project_manager.app import members from django.test import TestCase class MemberTestCase(TestCase): def setUp(self): test_user_name = "test_name" test_role_name = "test_role" test_role_name_2 = "test_role_2" self.role = members.create_new_role(test_role_name) self.role2...
odonnellryan/project_manager
project_manager/app/members_test.py
members_test.py
py
807
python
en
code
0
github-code
97
[ { "api_name": "django.test.TestCase", "line_number": 4, "usage_type": "name" }, { "api_name": "project_manager.app.members.create_new_role", "line_number": 9, "usage_type": "call" }, { "api_name": "project_manager.app.members", "line_number": 9, "usage_type": "name" }, ...
30926200904
# Databricks notebook source from pydantic import BaseSettings class Settings(BaseSettings): AZURE_ACC: str = "" AZURE_ACC_KEY: str = "" class Config: env_file = ".env" case_sensitive = True settings = Settings() # COMMAND ---------- import time def first_level_folders(path...
4dori/Data-Engineering
module_7/Spark_Streaming_Databricks/notebooks/Simulation.py
Simulation.py
py
1,444
python
en
code
0
github-code
97
[ { "api_name": "pydantic.BaseSettings", "line_number": 4, "usage_type": "name" }, { "api_name": "time.sleep", "line_number": 36, "usage_type": "call" } ]
31679481608
import numpy as np from keras import backend as K from keras.engine import Layer class ConvolutionalAutoencoderLayer(Layer): def __init__(self, filters, filter_size=(2, 2), **kwargs): """ Constructor for creating the ConvAutoencoder Layer ...
tms1337/tensorflow-tutorial
ConvolutionalAutoencoderLayer.py
ConvolutionalAutoencoderLayer.py
py
2,585
python
en
code
0
github-code
97
[ { "api_name": "keras.engine.Layer", "line_number": 6, "usage_type": "name" }, { "api_name": "keras.backend.conv2d", "line_number": 44, "usage_type": "call" }, { "api_name": "keras.backend", "line_number": 44, "usage_type": "name" }, { "api_name": "keras.backend.bi...
30837565454
import sys import pytest from clime import clime from docs_src.enums.tutorial_001 import main, Dude, Colors def test_help(set_cli_sys_argv, capsys): sys.argv.append("--help") with pytest.raises(SystemExit): main() captured = capsys.readouterr() assert "{Colors.red,Colors.blue}" in captured.o...
ilanjb/clime
tests/test_docs_src/test_enum/test_tutorial_001.py
test_tutorial_001.py
py
1,210
python
en
code
0
github-code
97
[ { "api_name": "sys.argv.append", "line_number": 10, "usage_type": "call" }, { "api_name": "sys.argv", "line_number": 10, "usage_type": "attribute" }, { "api_name": "pytest.raises", "line_number": 11, "usage_type": "call" }, { "api_name": "docs_src.enums.tutorial_0...
23935590390
import os import cv2 import sys sys.path.append(r"C:\Users\jeanbaptiste\Desktop\assiette\v2\main") import imutils import numpy as np import time import matplotlib.pyplot as plt from PIL import Image def open_picture(image, mode): """We open picture""" if mode == 1: img = cv2.imread...
LeGrosLezard/remove-background
background/main2.py
main2.py
py
4,219
python
en
code
0
github-code
97
[ { "api_name": "sys.path.append", "line_number": 4, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 4, "usage_type": "attribute" }, { "api_name": "cv2.imread", "line_number": 18, "usage_type": "call" }, { "api_name": "cv2.imread", "line_number"...
25622344131
from app import create_app from pytest import fixture from app.extensions import db from app.models import Product, Category from slugify import slugify @fixture def app(): app = create_app() app.testing = True return app @fixture def create_database(app): with app.app_context(): db.create_a...
Anaxxi/flaskstore-
flask-store/tests/conftest.py
conftest.py
py
848
python
en
code
0
github-code
97
[ { "api_name": "app.create_app", "line_number": 9, "usage_type": "call" }, { "api_name": "app.testing", "line_number": 10, "usage_type": "attribute" }, { "api_name": "pytest.fixture", "line_number": 7, "usage_type": "name" }, { "api_name": "app.app_context", "l...
23702778958
import json import sys import statistics import urllib.request targetScore = [] diseaseScore = [] sampleList = [] def targetAnalysis(targetName, targetList): vTarStddev, vTarMean, vTarMax, vTarMin = stand_dev(targetList) print("Standart deviation for target {} = {}".format(targetName, vTarStddev)) print("Mean fo...
mira13/OpenTargets
TestA/ProcessingToolboxA.py
ProcessingToolboxA.py
py
2,266
python
en
code
0
github-code
97
[ { "api_name": "urllib.request.request.urlopen", "line_number": 28, "usage_type": "call" }, { "api_name": "urllib.request.request", "line_number": 28, "usage_type": "attribute" }, { "api_name": "urllib.request", "line_number": 28, "usage_type": "name" }, { "api_nam...
12019382661
# -*- coding: utf-8 -*- """ Created on Wed Apr 20 19:48:13 2022 @author: sonaw """ import pandas as pd import matplotlib.pyplot as plt import numpy as np df = pd.read_csv('eda_data.csv') #choose relevant columns df.columns df_model = df[['avg_salary','Rating','Size','Type of ownership','Industry','Sector','Revenue...
ketansonawane/data-science-salary-estimator
model_building.py
model_building.py
py
3,451
python
en
code
0
github-code
97
[ { "api_name": "pandas.read_csv", "line_number": 12, "usage_type": "call" }, { "api_name": "pandas.get_dummies", "line_number": 21, "usage_type": "call" }, { "api_name": "sklearn.model_selection.train_test_split", "line_number": 29, "usage_type": "call" }, { "api_n...
26328159744
"""Radwag Responses.""" from .commands import RadwagCommand, RADWAG_COMMAND_TERMINATOR from enum import Enum from dataclasses import dataclass from typing import Optional, List class RadwagResponseCodes(str, Enum): """Radwag response codes.""" NONE = "" IN_PROGRESS = "A" CARRIED_OUT_AFTER_IN_PROGRES...
Opentrons/opentrons
hardware-testing/hardware_testing/drivers/radwag/responses.py
responses.py
py
4,191
python
en
code
363
github-code
97
[ { "api_name": "enum.Enum", "line_number": 9, "usage_type": "name" }, { "api_name": "commands.RadwagCommand", "line_number": 50, "usage_type": "name" }, { "api_name": "typing.List", "line_number": 52, "usage_type": "name" }, { "api_name": "typing.Optional", "li...
42713436666
from django.apps import apps from django.core.exceptions import ImproperlyConfigured from fluentcms_emailtemplates.extensions import EmailContentPlugin from fluent_contents.extensions import plugin_pool from .models import OrderSummaryEmailItem @plugin_pool.register class OrderSummaryEmailPlugin(EmailContentPlugin): ...
django-fluent/fluentcms-emailtemplates
fluentcms_emailtemplates/plugins/oscar_email/content_plugins.py
content_plugins.py
py
1,541
python
en
code
4
github-code
97
[ { "api_name": "fluentcms_emailtemplates.extensions.EmailContentPlugin", "line_number": 9, "usage_type": "name" }, { "api_name": "models.OrderSummaryEmailItem", "line_number": 13, "usage_type": "name" }, { "api_name": "fluentcms_emailtemplates.extensions.EmailContentPlugin", "...
22570861891
import couchdb from pymongo import MongoClient import json import requests from pymongo.errors import ConnectionFailure URL = 'http://admin:admin@localhost:5984' print(URL) try: response = requests.get(URL) if response.status_code == 200: print('CouchDB conection failed: Success') if response.stat...
Byron040601/ExamenAD
7.py
7.py
py
986
python
en
code
0
github-code
97
[ { "api_name": "requests.get", "line_number": 11, "usage_type": "call" }, { "api_name": "requests.ConnectionError", "line_number": 16, "usage_type": "attribute" }, { "api_name": "couchdb.Server", "line_number": 19, "usage_type": "call" }, { "api_name": "pymongo.Mon...
30260859041
# -*- coding: utf-8 -*- from __future__ import absolute_import import logging logger = logging.getLogger(__name__) import threading from six import with_metaclass from six.moves import queue from ._text import to_text class Singleton(type): def __new__(cls, name, parents, params): try: retu...
ansible/ansible-container
container/utils/logmux.py
logmux.py
py
1,313
python
en
code
2,204
github-code
97
[ { "api_name": "logging.getLogger", "line_number": 6, "usage_type": "call" }, { "api_name": "six.with_metaclass", "line_number": 23, "usage_type": "call" }, { "api_name": "six.moves.queue.Queue", "line_number": 26, "usage_type": "call" }, { "api_name": "six.moves.q...
40636713547
################################################ ############################################### import os import sys import signal import time import lib.NETSocket as socket import re class HTTPClient(): def __init__(self): self.connect = socket.NETSocket() self.http_user_agent="Mozilla/5.0 (X1...
alex-filimonov/acs_prototype
lib/HTTPClient.py
HTTPClient.py
py
1,750
python
en
code
0
github-code
97
[ { "api_name": "lib.NETSocket.NETSocket", "line_number": 15, "usage_type": "call" }, { "api_name": "lib.NETSocket", "line_number": 15, "usage_type": "name" }, { "api_name": "re.split", "line_number": 46, "usage_type": "call" } ]