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
9927108927
# coding: utf-8 # In[89]: import tarfile import xml.etree.ElementTree as ET import tqdm import codecs # In[87]: members = [] tar = tarfile.open("unlabeled.tar.gz", "r:gz") outfile = codecs.open("unlabeled.txt", 'w', 'utf-8') for member in tar: f = tar.extractfile(member) if f is None: con...
peteykun/NLU-Assignment3
tar2txt.py
tar2txt.py
py
874
python
en
code
0
github-code
1
[ { "api_name": "tarfile.open", "line_number": 18, "usage_type": "call" }, { "api_name": "codecs.open", "line_number": 19, "usage_type": "call" }, { "api_name": "xml.etree.ElementTree.fromstring", "line_number": 29, "usage_type": "call" }, { "api_name": "xml.etree.E...
26728719706
import math import os import random import re import warnings from typing import Dict, List, Tuple, Union import cv2 import numpy as np import torch import torch.distributed as dist import torch.multiprocessing as mp import torch.optim as optim from torch import nn from torch.nn.parallel import DistributedDataParallel...
tattaka/unsupervised-hdr-imaging
unsupervised_hdr/core.py
core.py
py
15,835
python
en
code
8
github-code
1
[ { "api_name": "warnings.simplefilter", "line_number": 24, "usage_type": "call" }, { "api_name": "torch.__version__.split", "line_number": 25, "usage_type": "call" }, { "api_name": "torch.__version__", "line_number": 25, "usage_type": "attribute" }, { "api_name": "...
39157907847
# http://localhost:3000/objects import requests url = "localhost:3000/objects" payload = "{\n \"id\": 5,\n \"item\": \"The Fiancรฉs\",\n \"artist\": \"Pierre Auguste Renoir\",\n \"collection\": \"Wallrafโ€“Richartz Museum, Cologne, Germany\",\n \"date\": \"1868\"\n }" headers = { ...
mustafaakgul/python-guide
src/32-restful_api/local_db_hitting.py
local_db_hitting.py
py
471
python
en
code
0
github-code
1
[ { "api_name": "requests.request", "line_number": 11, "usage_type": "call" } ]
21402710703
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2018/11/30 14:47 # @Author : qingping.niu # @File : StartTime.py # @desc : import os,time,datetime import uiautomator2 as u2 def getdevices(): devices = [] result = os.popen("adb devices").readlines() result.reverse() try: for l...
nqping/MyToolkit
Quality/StartTime.py
StartTime.py
py
1,098
python
en
code
0
github-code
1
[ { "api_name": "os.popen", "line_number": 13, "usage_type": "call" }, { "api_name": "uiautomator2.connect", "line_number": 28, "usage_type": "call" }, { "api_name": "datetime.datetime.now", "line_number": 32, "usage_type": "call" }, { "api_name": "datetime.datetime...
27689203044
import discord import yaml with open("data/users.yaml", "r") as ymlfile: users = yaml.load(ymlfile, Loader=yaml.BaseLoader) def find(ctx, typ): for i in users[typ]: if str(i) == str(ctx.message.author): return True return False async def check_admin(ctx): if find(...
Kattulel/DisneyBot
config/usercontrol.py
usercontrol.py
py
513
python
en
code
1
github-code
1
[ { "api_name": "yaml.load", "line_number": 5, "usage_type": "call" }, { "api_name": "yaml.BaseLoader", "line_number": 5, "usage_type": "attribute" } ]
73631959395
"""Utility file to seed kindred database from Native-Land data""" from sqlalchemy import func from models import Tribe, Language, connect_to_db, db from routes import app import json def json_reader(file_path): """Opens & loads json files""" with open(file_path) as file: json_dict = json.load(file) return js...
bsmejkal/kindred-culture
seed.py
seed.py
py
1,824
python
en
code
0
github-code
1
[ { "api_name": "json.load", "line_number": 13, "usage_type": "call" }, { "api_name": "models.Tribe.query.delete", "line_number": 24, "usage_type": "call" }, { "api_name": "models.Tribe.query", "line_number": 24, "usage_type": "attribute" }, { "api_name": "models.Tr...
31486116618
from numpy import linspace from xspec import * from cstat_deviation import * import matplotlib.pyplot as plt import numpy as np def compute_deviation(file_name): """ This function computes the cstat deviation from an xcm file Args: file_name (.xcm): xcm file Returns: the cstat d...
Lucas-Dfr/CrossCorrelationSearch-v1
model_selection/model_selection.py
model_selection.py
py
2,421
python
en
code
0
github-code
1
[ { "api_name": "matplotlib.pyplot.style.use", "line_number": 77, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.style", "line_number": 77, "usage_type": "attribute" }, { "api_name": "matplotlib.pyplot", "line_number": 77, "usage_type": "name" }, { "api_na...
7417438363
import numpy as np import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec import torch import torch.nn as nn import torch.optim as optim from pathlib import Path from .model import EncoderModel, DecoderModel class Modelrunner(): def __init__(self, model_def, load_latest = False ): self...
REPLICA-Collective-Rep/DATECentral
model/modelrunner.py
modelrunner.py
py
7,009
python
en
code
0
github-code
1
[ { "api_name": "torch.nn.SmoothL1Loss", "line_number": 31, "usage_type": "call" }, { "api_name": "torch.nn", "line_number": 31, "usage_type": "name" }, { "api_name": "torch.from_numpy", "line_number": 62, "usage_type": "call" }, { "api_name": "numpy.float32", "...
2949776160
from selenium.webdriver.firefox.options import Options as FirefoxOptions import filesHandler as fh import lpCrawler as lp def scrape_charts(filepath): """ Scrape the data of all the charts of Polish Radio Program 3. """ ff_options = FirefoxOptions() ff_options.add_argument('--headless') driver = lp.LP...
magdalena-natalia/PR3TimeMachine
lpJson.py
lpJson.py
py
434
python
en
code
0
github-code
1
[ { "api_name": "selenium.webdriver.firefox.options.Options", "line_number": 8, "usage_type": "call" }, { "api_name": "lpCrawler.LPCrawler", "line_number": 10, "usage_type": "call" }, { "api_name": "filesHandler.write_json", "line_number": 12, "usage_type": "call" } ]
19360145371
import logging import pandas as pd from zenml import step class IngestData: """ Ingesting data from the data_path provided. """ def __init__(self, path: str): """ Args: data_path: path to the data. """ self.path = path def get_data(self): """ ...
MaruthiKo/customer-satisfaction_mlops
steps/ingest_data.py
ingest_data.py
py
987
python
en
code
0
github-code
1
[ { "api_name": "logging.info", "line_number": 23, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 24, "usage_type": "call" }, { "api_name": "logging.error", "line_number": 42, "usage_type": "call" }, { "api_name": "zenml.step", "line_num...
71873135395
import re import sys from deep_translator import GoogleTranslator # Split the text into smaller groups up to 5000 characters without breaking lines so need to split on new lines def split_text(text, max_len=4500): # Split the text into lines lines = text.split("\n") # List of chunks chunks = [...
BaseMax/UnlimitedAutoTranslate
UnlimitedAutoTranslate.py
UnlimitedAutoTranslate.py
py
2,207
python
en
code
10
github-code
1
[ { "api_name": "deep_translator.GoogleTranslator", "line_number": 39, "usage_type": "call" }, { "api_name": "re.sub", "line_number": 43, "usage_type": "call" }, { "api_name": "sys.argv", "line_number": 50, "usage_type": "attribute" }, { "api_name": "sys.exit", ...
39546171687
''' ็ˆฌ่™ซไธป็จ‹ๅบ ไปŽๅทฅไฟก้ƒจ่Žทๅ–ๅนถไธ‹่ฝฝใ€Šๅ…ๅพ่ฝฆ่พ†่ดญ็ฝฎ็จŽ็š„ๆ–ฐ่ƒฝๆบๆฑฝ่ฝฆ่ฝฆๅž‹็›ฎๅฝ•ใ€‹๏ผŒใ€Šๆ–ฐ่ƒฝๆบๆฑฝ่ฝฆๆŽจๅนฟๅบ”็”จๆŽจ่่ฝฆๅž‹็›ฎๅฝ•ใ€‹๏ผŒใ€Š้“่ทฏๆœบๅŠจ่ฝฆ่พ†็”ŸไบงไผไธšๅŠไบงๅ“ใ€‹ๆ–‡ไปถ๏ผŒๆ–‡ไปถๅ‚จๅญ˜่‡ณ './data/origin_data' @Author: KivenChen @Date: 2019-04-10 ''' import os import asyncio from . import output from .spider import spider_1, spider_2 def main(): base_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) ...
KivenCkl/New_Energy_Vehicles_Info_Crawler
Spider/main.py
main.py
py
1,597
python
zh
code
28
github-code
1
[ { "api_name": "os.path.dirname", "line_number": 16, "usage_type": "call" }, { "api_name": "os.path", "line_number": 16, "usage_type": "attribute" }, { "api_name": "os.path.abspath", "line_number": 16, "usage_type": "call" }, { "api_name": "os.path.join", "line...
5216154869
import pygame import time import random pygame.init() white = (255, 255, 255) black = (0, 0, 0) red = (255, 0, 0) blue = (0, 0, 255) dis_width = 800 dis_height = 600 dis = pygame.display.set_mode((dis_width, dis_height)) pygame.display.set_caption('collect the trash') background = pygame.image.load("natureback...
evanse10/Shehacks2021
game.py
game.py
py
5,694
python
en
code
0
github-code
1
[ { "api_name": "pygame.init", "line_number": 5, "usage_type": "call" }, { "api_name": "pygame.display.set_mode", "line_number": 15, "usage_type": "call" }, { "api_name": "pygame.display", "line_number": 15, "usage_type": "attribute" }, { "api_name": "pygame.display...
38920515345
from flask import Flask from flask import request # `request` is a global object that can be used to access the query string of a url # Create a new Flask instance (passing the current namespace to the Flask initializer) app = Flask(__name__) # Create a route # Note this uses 'pie syntax' to implement a decorator # ...
Crossroadsman/FlaskProject
simple_app.py
simple_app.py
py
2,440
python
en
code
0
github-code
1
[ { "api_name": "flask.Flask", "line_number": 6, "usage_type": "call" }, { "api_name": "flask.request.args.get", "line_number": 32, "usage_type": "call" }, { "api_name": "flask.request.args", "line_number": 32, "usage_type": "attribute" }, { "api_name": "flask.reque...
15871446797
# coding=utf-8 from openpyxl import Workbook #ๅœจๅ†…ๅญ˜ไธญๅˆ›ๅปบไธ€ไธชworkbookๅฏน่ฑก wb = Workbook() ws = wb.get_active_sheet() print(ws.title) ws.title = u'99ไน˜ๆณ•่กจ' #่ฎพ็ฝฎๅ•ๅ…ƒๆ ผ็š„ๅ€ผ for row in range(1,10): for col in range(1,10): ws.cell(row = row, column = col).value = row * col #ๆœ€ๅŽไฟๅญ˜ wb.save(filename='99ไน˜ๆณ•่กจ.xls')
stella-chmt/daily_scripts
python/practise_for_yingl_lessons/lesson_1/multiply_sheet.py
multiply_sheet.py
py
359
python
en
code
0
github-code
1
[ { "api_name": "openpyxl.Workbook", "line_number": 5, "usage_type": "call" } ]
18096921378
import requests from bs4 import BeautifulSoup as bs import arrow import csv import pandas as pd from time import sleep def forager(): venue = "Forager" prices = "NaN" month = input("Please enter the number of the month in the form '1': ") for l in range(1, 13): if month == str(l): ...
Astatham98/EventWebScrape
webscrape1/forager.py
forager.py
py
2,955
python
en
code
0
github-code
1
[ { "api_name": "arrow.get", "line_number": 15, "usage_type": "call" }, { "api_name": "arrow.get", "line_number": 25, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 34, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_number...
27970246169
# coding=utf-8 import logging import os import uuid import xlwt from django.core.cache import cache from django.core.urlresolvers import reverse from django.db import IntegrityError from django.db import transaction from BanBanTong import constants from BanBanTong.db import models from BanBanTong.db import utils as db_...
xiaolin0199/bbt
apps/BanBanTong/views/system/lesson_teacher.py
lesson_teacher.py
py
11,751
python
en
code
0
github-code
1
[ { "api_name": "logging.getLogger", "line_number": 24, "usage_type": "call" }, { "api_name": "BanBanTong.forms.lesson_teacher.LessonTeacherForm", "line_number": 33, "usage_type": "call" }, { "api_name": "BanBanTong.utils.simplecache.LessonTeacher.update", "line_number": 36, ...
3028681836
import numpy as np import tensorflow as tf import extra_keras_datasets.emnist as centr_emnist # See https://github.com/machinecurve/extra_keras_datasets import nest_asyncio nest_asyncio.apply() tf.compat.v1.enable_v2_behavior() tf.compat.v1.graph_util.extract_sub_graph # Final evaluation in test dataset print("Eval...
fwilhelmi/blockchain_enabled_federated_learning
Code & Results/TensorFlow code/evaluate_models_test_dataset.py
evaluate_models_test_dataset.py
py
1,279
python
en
code
27
github-code
1
[ { "api_name": "nest_asyncio.apply", "line_number": 6, "usage_type": "call" }, { "api_name": "tensorflow.compat.v1.enable_v2_behavior", "line_number": 8, "usage_type": "call" }, { "api_name": "tensorflow.compat", "line_number": 8, "usage_type": "attribute" }, { "ap...
20059712231
import os from setuptools import setup, find_packages exec(open('hops/version.py').read()) def read(fname): try: return open(os.path.join(os.path.dirname(__file__), fname), encoding='utf8').read() #python3 except: return open(os.path.join(os.path.dirname(__file__), fname)).read() #python2 se...
logicalclocks/hopsworks-cloud-sdk
setup.py
setup.py
py
1,664
python
en
code
1
github-code
1
[ { "api_name": "os.path.join", "line_number": 9, "usage_type": "call" }, { "api_name": "os.path", "line_number": 9, "usage_type": "attribute" }, { "api_name": "os.path.dirname", "line_number": 9, "usage_type": "call" }, { "api_name": "os.path.join", "line_numbe...
13261468913
import websocket, json, pprint,talib, numpy SOCKET = "wss://stream.binance.com:9443/ws/ethusdt@kline_1m" avg = 0 open_total = [] closed_total = [] high_total = [] low_total = [] SSL_PERIOD = 14 STOCK = "ETHUSD" PAY = 100.00 POSTION = False TRADE_QUANTITY = 0 profit = 0 def on_open(webS): print(" opened conn...
TDysart1/botbot
ethrium.py
ethrium.py
py
4,606
python
en
code
0
github-code
1
[ { "api_name": "json.loads", "line_number": 25, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 67, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 68, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 6...
20920450281
#!/usr/bin/env python3 # publisher for a specific img folder import rospy from std_msgs.msg import String from detection_only.msg import Bbox_6, Bbox6Array from sensor_msgs.msg import Image import json import time import cv2 from os import listdir from os.path import isfile, join from cv_bridge import CvBridge import ...
ziyan0302/Yolov5_DeepSort_Pytorch_ros
src/detection_only/src/img_pubtest.py
img_pubtest.py
py
1,994
python
en
code
5
github-code
1
[ { "api_name": "os.listdir", "line_number": 19, "usage_type": "call" }, { "api_name": "os.path.isfile", "line_number": 28, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 28, "usage_type": "call" }, { "api_name": "os.path.join", "line_numbe...
11274134402
import z3 import random special_var_table = {} _var_count = 0 def new_variable(var_type): global _var_count _var_count += 1 if var_type == "Bool": return z3.Bool("Bool" + str(_var_count)) elif var_type == "Int": return z3.Int("Int" + str(_var_count)) else: assert False def...
hsh814/ExtractFix
src/synthesis/second_order/util/common.py
common.py
py
2,587
python
en
code
0
github-code
1
[ { "api_name": "z3.Bool", "line_number": 11, "usage_type": "call" }, { "api_name": "z3.Int", "line_number": 13, "usage_type": "call" }, { "api_name": "z3.Not", "line_number": 23, "usage_type": "call" }, { "api_name": "z3.And", "line_number": 23, "usage_type...
1972302698
# This demo shows how to plot the contour plot for given function, with resultant of the partial derivatives displayed # as arrows import numpy as np import matplotlib.pyplot as plt import math def func(x, y): z = y - x - 2 * x ** 2 - 2 * x * y - y ** 2 return z x = np.linspace(-2, 0, 20) y = np.linspace(1...
Homingdung/numerical_analysis_py
fieldsVisualize.py
fieldsVisualize.py
py
521
python
en
code
0
github-code
1
[ { "api_name": "numpy.linspace", "line_number": 14, "usage_type": "call" }, { "api_name": "numpy.linspace", "line_number": 15, "usage_type": "call" }, { "api_name": "numpy.meshgrid", "line_number": 16, "usage_type": "call" }, { "api_name": "numpy.gradient", "li...
29539726668
from traceback import print_tb from matplotlib import pyplot as pl import numpy as np import re def poly_regression(dataset1): x1 = np.arange(dataset1.size) z1 = np.polyfit(x1, np.log(dataset1),1) exp_1 = np.exp(z1[1]) plot_p1 = [exp_1*np.exp(z1[0]*x) for x in range(50)] return plot_p1 # ...
MatheusMenezes/latent_learning_app
plot_codes/plot_grid.py
plot_grid.py
py
14,212
python
en
code
0
github-code
1
[ { "api_name": "numpy.arange", "line_number": 10, "usage_type": "call" }, { "api_name": "numpy.polyfit", "line_number": 11, "usage_type": "call" }, { "api_name": "numpy.log", "line_number": 11, "usage_type": "call" }, { "api_name": "numpy.exp", "line_number": 1...
74081283232
from unittest.mock import patch, Mock import pytest from item_db import ItemDB from shopping_cart import ShoppingCart @pytest.fixture def cart(): return ShoppingCart(4) def mock_get_price(item: str): if item == 'pear': return 2 if item == 'banana': return 3 def test_can_add_item_to_c...
lorencmateusz/learning-tests
test_shopping_cart.py
test_shopping_cart.py
py
1,091
python
en
code
0
github-code
1
[ { "api_name": "shopping_cart.ShoppingCart", "line_number": 11, "usage_type": "call" }, { "api_name": "pytest.fixture", "line_number": 9, "usage_type": "attribute" }, { "api_name": "pytest.raises", "line_number": 35, "usage_type": "call" }, { "api_name": "item_db.I...
34013737364
from heapq import * from collections import deque from collections import Counter def schedule_tasks(tasks, k): # We should always try to schedule the task with the highest count. # So, we can get the counts for each task and add to max Heap. # Then, pop from maxHeap to schedule (k + 1) tasks # For each task,...
kjingers/Leetcode
Problems/TaskScheduler/TaskScheduler.py
TaskScheduler.py
py
1,856
python
en
code
0
github-code
1
[ { "api_name": "collections.Counter", "line_number": 19, "usage_type": "call" } ]
22861823283
import json import requests import argparse import sys import os from selenium import webdriver from selenium.webdriver.chrome.options import Options from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.by import By chrom...
PFE-Attack-client/PFE-Attaques-client
platform/my-vuln-app/bot-victim/main.py
main.py
py
2,034
python
en
code
0
github-code
1
[ { "api_name": "selenium.webdriver.chrome.options.Options", "line_number": 11, "usage_type": "call" }, { "api_name": "selenium.webdriver.Chrome", "line_number": 18, "usage_type": "call" }, { "api_name": "selenium.webdriver", "line_number": 18, "usage_type": "name" }, {...
40086162188
import argparse import pprint import shutil from pathlib import Path import tensorflow as tf import yaml from tensorflow import keras from dataset_factory import DatasetBuilder from losses import CTCLoss from metrics import SequenceAccuracy from models import build_model parser = argparse.ArgumentParser() parser.add...
FLming/CRNN.tf2
crnn/train.py
train.py
py
2,049
python
en
code
144
github-code
1
[ { "api_name": "argparse.ArgumentParser", "line_number": 15, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_number": 17, "usage_type": "name" }, { "api_name": "pathlib.Path", "line_number": 21, "usage_type": "name" }, { "api_name": "yaml.load", "li...
16538322007
import plotly.express as px import pandas as pd from datastructure import * from sklearn.decomposition import PCA import plotly.graph_objects as go def createSPLOM(data, idx, indexRange, maxComp): O = np.transpose(data.series[idx].orientations, (1, 0, 2))[indexRange[0]:indexRange[1]] O = O.reshape(O.shape[0],...
marinaevers/asevis
Components/splom.py
splom.py
py
1,208
python
en
code
0
github-code
1
[ { "api_name": "sklearn.decomposition.PCA", "line_number": 11, "usage_type": "call" }, { "api_name": "pandas.DataFrame", "line_number": 19, "usage_type": "call" }, { "api_name": "plotly.express.scatter_matrix", "line_number": 20, "usage_type": "call" }, { "api_name...
22720982859
#!/usr/bin/env python3 from __future__ import annotations import torch from .. import settings from ..utils.broadcasting import _matmul_broadcast_shape, _mul_broadcast_shape from ..utils.deprecation import bool_compat from ..utils.getitem import _noop_index from .dense_linear_operator import DenseLinearOperator, to_...
cornellius-gp/linear_operator.old
linear_operator/operators/cat_linear_operator.py
cat_linear_operator.py
py
18,489
python
en
code
18
github-code
1
[ { "api_name": "torch.is_tensor", "line_number": 17, "usage_type": "call" }, { "api_name": "torch.cat", "line_number": 18, "usage_type": "call" }, { "api_name": "dense_linear_operator.to_linear_operator", "line_number": 20, "usage_type": "call" }, { "api_name": "de...
35483658265
from nltk.compat import gutenberg gutenberg.fileids() dir(gutenberg) JM_book = gutenberg.words('milton-paradise.txt') len(JM_book) sample_JM = JM_book[100:150] sample_JM len(sample_JM) set_JM = set(sample_JM) set_JM len(set(set_JM)) type(set_JM) sorteSet_JM = sorted(set_JM) sorteSet_JM len(sorteSet_JM) print("mil...
FernandoMartinezJara/Nltk
curso2/2 Organizing Words by Set and Sorted.py
2 Organizing Words by Set and Sorted.py
py
376
python
en
code
0
github-code
1
[ { "api_name": "nltk.compat.gutenberg.fileids", "line_number": 3, "usage_type": "call" }, { "api_name": "nltk.compat.gutenberg", "line_number": 3, "usage_type": "name" }, { "api_name": "nltk.compat.gutenberg", "line_number": 5, "usage_type": "argument" }, { "api_na...
70852654755
import csv from collections import OrderedDict from statistics import mean def calculate_averages(input_file_name, output_file_name): f1 = open(input_file_name) reader = csv.reader(f1) for row in reader: name = row[0] grd = list() for grade in row[1:]: grd.append(float(...
NafisehAbrishami/Python_and_C_Projects
Project-Source1.py
Project-Source1.py
py
3,671
python
en
code
0
github-code
1
[ { "api_name": "csv.reader", "line_number": 7, "usage_type": "call" }, { "api_name": "csv.writer", "line_number": 14, "usage_type": "call" }, { "api_name": "statistics.mean", "line_number": 15, "usage_type": "call" }, { "api_name": "csv.reader", "line_number": ...
27701560902
import json import argparse from typing import Text, Dict, List def render_embedding(active: List[int], height: int, width: int) -> None: for row in range(height): print("|", end="") for col in range(width): i = row * width + col print("X" if i in active else " ", end="") ...
RasaHQ/semantic-map-embedding
scripts/view_smap.py
view_smap.py
py
1,651
python
en
code
0
github-code
1
[ { "api_name": "typing.List", "line_number": 6, "usage_type": "name" }, { "api_name": "typing.Text", "line_number": 15, "usage_type": "name" }, { "api_name": "json.load", "line_number": 17, "usage_type": "call" }, { "api_name": "typing.Dict", "line_number": 27,...
17977450408
# implementation based on DeepLTL https://github.com/reactive-systems/deepltl import sys import importlib import os.path as path import subprocess import re from timeit import default_timer as timer from typing import Tuple import multiexit from dlsgs.utils import ltl_parser DEFAULT_BINARY_PATH = "bin" def solve_...
ju-kreber/Transformers-and-GANs-for-LTL-sat
impl/dlsgs/data_generation/ltl.py
ltl.py
py
8,473
python
en
code
1
github-code
1
[ { "api_name": "dlsgs.utils.ltl_parser.ltl_trace", "line_number": 27, "usage_type": "call" }, { "api_name": "dlsgs.utils.ltl_parser", "line_number": 27, "usage_type": "name" }, { "api_name": "dlsgs.utils.ltl_parser.Token", "line_number": 34, "usage_type": "attribute" }, ...
15554588830
import os import smtplib import ssl from email.message import EmailMessage from email.utils import formataddr from dotenv import load_dotenv from pathlib import Path # Load the environment variables current_dir = Path(__file__).resolve().parent if "__file__" in locals() else Path.cwd() envars = current_dir / ".env" l...
martgjepali/E-mail-Automation
send_email.py
send_email.py
py
2,464
python
en
code
0
github-code
1
[ { "api_name": "pathlib.Path", "line_number": 10, "usage_type": "call" }, { "api_name": "pathlib.Path.cwd", "line_number": 10, "usage_type": "call" }, { "api_name": "dotenv.load_dotenv", "line_number": 12, "usage_type": "call" }, { "api_name": "os.getenv", "lin...
13967642156
import boto3 from colorama import Fore, Back, Style from functions import create_client def help(): print(Fore.YELLOW + "\n================================================================================================" + Style.RESET_ALL) print("[+] Module Description:\n") print("\tThis module will enumer...
MiedzinskiBuck/Kintoun
modules/enumeration/s3_enumerate_buckets.py
s3_enumerate_buckets.py
py
2,776
python
en
code
6
github-code
1
[ { "api_name": "colorama.Fore.YELLOW", "line_number": 6, "usage_type": "attribute" }, { "api_name": "colorama.Fore", "line_number": 6, "usage_type": "name" }, { "api_name": "colorama.Style.RESET_ALL", "line_number": 6, "usage_type": "attribute" }, { "api_name": "co...
75108619553
#!/usr/bin/python3 """ ๆฑŸ่ฅฟๆฐดๅบ“ไฟกๆฏ Author: cg Date: 2020/7/11 15:58 """ import json import urllib.request from crawl.spiders.base_spider import BaseSpider from operate.schedulermgr import SchedulerMgr from db.mapping.jiangxi_reservoir.jiangxi_reservoir import JiangxiReservoir from db.mapping.jiangxi_reservoir.jiangxi_r...
0827cg/cgspiders
crawl/spiders/jiangxi_reservoir.py
jiangxi_reservoir.py
py
3,313
python
en
code
0
github-code
1
[ { "api_name": "crawl.spiders.base_spider.BaseSpider", "line_number": 20, "usage_type": "name" }, { "api_name": "operate.schedulermgr.SchedulerMgr.add_job_cron", "line_number": 33, "usage_type": "call" }, { "api_name": "operate.schedulermgr.SchedulerMgr", "line_number": 33, ...
38812425841
import numpy as np import cv2 img=cv2.imread('img4.png',0) alto,ancho=img.shape[:2] img1=np.zeros([alto, ancho], np.uint8) img2=np.zeros([alto, ancho], np.uint8) img3=np.zeros([alto, ancho], np.uint8) k = np.array([[0, 1, 0], [1, 6, 1], [0, 1, 0]])/10 k1 = np.array([[0, -1, 0], [-1, 5, -1], [0, -1, 0]]) img...
jaime1315321/VisionArtificial2022_2
andres_carpeta/MATERAIAL COMPARTIDO/vision/sebas/Punto_e.py
Punto_e.py
py
1,991
python
es
code
0
github-code
1
[ { "api_name": "cv2.imread", "line_number": 4, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_number": 6, "usage_type": "call" }, { "api_name": "numpy.uint8", "line_number": 6, "usage_type": "attribute" }, { "api_name": "numpy.zeros", "line_number":...
2371194732
import json import os from datetime import timedelta, date, datetime from flask import render_template, request, redirect, Response, send_from_directory, session, url_for, abort from flask.views import MethodView from flask_admin.contrib import sqla from flask_security import current_user from clocking.models import ...
eaudeweb/mac-logging
clocking/api/view.py
view.py
py
6,160
python
en
code
0
github-code
1
[ { "api_name": "flask_admin.contrib.sqla.ModelView", "line_number": 17, "usage_type": "attribute" }, { "api_name": "flask_admin.contrib.sqla", "line_number": 17, "usage_type": "name" }, { "api_name": "flask_security.current_user.is_active", "line_number": 20, "usage_type":...
25191387496
import os import pathlib import gzip from itertools import groupby from typing import List, Dict, TextIO, Tuple, Union import numpy as np import pandas as pd import plot # type aliases NX_DICT = Dict[str, List[int]] AUN_DICT = Dict[str, float] class AssemblyCollection: def __init__( self, pat...
W-L/pauNy
pauNy/lib.py
lib.py
py
10,096
python
en
code
1
github-code
1
[ { "api_name": "typing.Dict", "line_number": 13, "usage_type": "name" }, { "api_name": "typing.List", "line_number": 13, "usage_type": "name" }, { "api_name": "typing.Dict", "line_number": 14, "usage_type": "name" }, { "api_name": "typing.List", "line_number": ...
72357287713
import beneath from config import SUBREDDIT from generators import posts, comments with open("schemas/post.graphql", "r") as file: POSTS_SCHEMA = file.read() with open("schemas/comment.graphql", "r") as file: COMMENTS_SCHEMA = file.read() def make_table_name(subreddit, kind): name = subreddit.replace("...
beneath-hq/beneath
examples/reddit/main.py
main.py
py
1,323
python
en
code
75
github-code
1
[ { "api_name": "beneath.Pipeline", "line_number": 29, "usage_type": "call" }, { "api_name": "generators.posts", "line_number": 32, "usage_type": "name" }, { "api_name": "generators.posts.generate_posts", "line_number": 32, "usage_type": "attribute" }, { "api_name":...
16735200242
# coding=utf-8 from charm.toolbox.pairinggroup import * from utils.newsecretutils import Utils from charm.toolbox.ABEncMultiAuth import ABEncMultiAuth import re # from newjson import ElementEncoder, ElementDecoder import utils.newjson as newjson import queue import time import threading debug = False import newma impo...
scottocs/OFE-ABE
Alice.py
Alice.py
py
4,244
python
en
code
0
github-code
1
[ { "api_name": "newma.Dabe", "line_number": 20, "usage_type": "call" }, { "api_name": "utils.newjson.loads", "line_number": 26, "usage_type": "call" }, { "api_name": "utils.newjson", "line_number": 26, "usage_type": "name" }, { "api_name": "utils.newjson.loads", ...
23885295653
from functools import partial from numbers import Number from typing import Iterable import numpy as np from ...mat_gen import zeros from ...node import Node from .base import ( _assemble_wout, _compute_error, _initialize_readout, _prepare_inputs_for_learning, _split_and_save_wout, readout_for...
reservoirpy/reservoirpy
reservoirpy/nodes/readouts/lms.py
lms.py
py
4,648
python
en
code
296
github-code
1
[ { "api_name": "numpy.outer", "line_number": 22, "usage_type": "call" }, { "api_name": "base._prepare_inputs_for_learning", "line_number": 28, "usage_type": "call" }, { "api_name": "node.input_bias", "line_number": 28, "usage_type": "attribute" }, { "api_name": "ba...
6127715262
from bs4 import BeautifulSoup import re from random_uk_bank_account.client.vocalink import VocalinkApi from random_uk_bank_account.utils.exceptions import ErrorInferringVocalinkVersions SORT_CODE_SUB_LINK_TEXT = "Sorting Code Substitution Data" MODULUS_WEIGHT_TABLE_LINK_TEXT = "Modulus weight table data" def _extrac...
j-puri/random-uk-bank-account
random_uk_bank_account/vocalink/vocalink_version.py
vocalink_version.py
py
978
python
en
code
0
github-code
1
[ { "api_name": "bs4.BeautifulSoup", "line_number": 10, "usage_type": "name" }, { "api_name": "re.findall", "line_number": 13, "usage_type": "call" }, { "api_name": "random_uk_bank_account.utils.exceptions.ErrorInferringVocalinkVersions", "line_number": 15, "usage_type": "c...
28602926196
''' ใ“ใฎใ‚ณใƒผใƒ‰ใฏimabariใ•ใ‚“ใฎใ‚ณใƒผใƒ‰ใ‚’ๅ…ƒใซไฝœๆˆใ—ใฆใ„ใพใ™ใ€‚ https://github.com/imabari/covid19-data/blob/master/aichi/aichi_ocr.ipynb ''' import pathlib import re import requests from bs4 import BeautifulSoup from urllib.parse import urljoin import pytesseract import csv import recognize_main_summary_date_1 as date_pattern1 import recogni...
code4nagoya/covid19-aichi-tools
scrape_main_summary.py
scrape_main_summary.py
py
5,379
python
en
code
6
github-code
1
[ { "api_name": "requests.get", "line_number": 31, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_number": 33, "usage_type": "call" }, { "api_name": "pathlib.PurePath", "line_number": 33, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_n...
7065938845
""" Pลฏvodnรญ nรกvrh: class Board - grid * reset * draw * score - z pohledu hrรกฤe * score_wnd5 * wintie - globรกlnฤ›, 0 = jedeme dรกl, 1/-1 win hrรกฤ, jinak = tie * wintie_wnd5 """ import pygame import random import math from pyshqorky.players import * class Board: """ Tล™รญda pro prรกci s hernรญ deskou. Jsou zde informace ...
zdenekkhol/pyshqorky
pyshqorky/board.py
board.py
py
14,134
python
cs
code
0
github-code
1
[ { "api_name": "pygame.Rect", "line_number": 51, "usage_type": "attribute" }, { "api_name": "pygame.draw.rect", "line_number": 63, "usage_type": "call" }, { "api_name": "pygame.draw", "line_number": 63, "usage_type": "attribute" }, { "api_name": "pygame.Rect", ...
26443195131
import pymongo import os from datetime import datetime import math import re import pymongo import keys # .gitgnored file from bson.objectid import ObjectId from bson.son import SON import atexit import math CONNECTION = None PAGESIZE = 10 def date_now(): """ Needed to keep the same date in python and mong...
ssi-dk/BeONE-old-version
bifrost/bifrost_mongo_interface.py
bifrost_mongo_interface.py
py
8,965
python
en
code
0
github-code
1
[ { "api_name": "datetime.datetime.utcnow", "line_number": 22, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 22, "usage_type": "name" }, { "api_name": "math.floor", "line_number": 23, "usage_type": "call" }, { "api_name": "atexit.register...
18709087270
# Dictionary and counter in Python to find winner of election print("======== Counter + Sorted + Slicing ========") from collections import Counter def winner(input): votes = Counter(input) dic = {} # output : {4: [], 2: [], 3: []} for value in votes.values(): dic[value] = [] # output : ...
dilipksahu/Python-Programming-Example
Dictionary Programs/findElectionWinner.py
findElectionWinner.py
py
1,507
python
en
code
0
github-code
1
[ { "api_name": "collections.Counter", "line_number": 7, "usage_type": "call" }, { "api_name": "collections.Counter", "line_number": 48, "usage_type": "call" } ]
31980288440
from django.urls import path from . import views app_name = 'pages' urlpatterns = [ path('', views.index, name='index'), path('fare/', views.fare, name='fare'), path('about-us/', views.about, name='aboutus'), path('contact-us/', views.contactus, name='contactus'), path('complaints/', views.complai...
saidulroney/nuist-pms
pages/urls.py
urls.py
py
347
python
en
code
0
github-code
1
[ { "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", ...
38841332585
import sqlalchemy from sqlalchemy.ext.declarative import declarative_base #Crear engine engine = sqlalchemy.create_engine("sqlite:///slangs2.db") Base = declarative_base() #Crear diccionario class Diccionario(Base): __tablename__ = "diccionario" id = sqlalchemy.Column(sqlalchemy.Integer, primary...
mtamburrelli/slangsSQLAlchemy
Slangs2(SqlAlchemy)/slangsTarea2(SQLALCHEMY).py
slangsTarea2(SQLALCHEMY).py
py
4,417
python
es
code
0
github-code
1
[ { "api_name": "sqlalchemy.create_engine", "line_number": 6, "usage_type": "call" }, { "api_name": "sqlalchemy.ext.declarative.declarative_base", "line_number": 8, "usage_type": "call" }, { "api_name": "sqlalchemy.Column", "line_number": 14, "usage_type": "call" }, { ...
2347070900
from django.core.exceptions import ValidationError from django.db import transaction from rest_framework import exceptions, status, viewsets from rest_framework.decorators import action from rest_framework.response import Response from ESSArch_Core.ip.models import Agent, InformationPackage from ESSArch_Core.ip.permis...
ESSolutions/ESSArch_Tools_Producer
ESSArch_TP/profiles/views.py
views.py
py
5,722
python
en
code
4
github-code
1
[ { "api_name": "ESSArch_Core.profiles.views.SubmissionAgreementViewSet", "line_number": 17, "usage_type": "name" }, { "api_name": "ESSArch_Core.profiles.models.SubmissionAgreement.objects.get", "line_number": 20, "usage_type": "call" }, { "api_name": "ESSArch_Core.profiles.models....
26813527429
import os import numpy as np import pandas as pd from tqdm import * def label2csv(input_file, output_file, labels_file, train_dir): with open(labels_file, 'r', encoding='utf-8') as f: labels = f.readlines() labels = [a.strip() for a in labels] n_labels = len(labels) with open(input_file, 'r...
gen0924/ECG-HEFEI
round2/code/prep/ecg_prep.py
ecg_prep.py
py
7,039
python
en
code
6
github-code
1
[ { "api_name": "pandas.DataFrame", "line_number": 35, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 41, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 42, "usage_type": "call" }, { "api_name": "pandas.DataFrame", ...
15948730497
from datetime import datetime from django.contrib import messages from django.contrib.auth import get_user_model from django.db.models import F, Subquery, Count, Q from django.http.response import JsonResponse from django.shortcuts import render, get_object_or_404, redirect from django.contrib.auth.decorators import lo...
NirushaaaR/CTF-platform-final-project
src/game/views.py
views.py
py
5,996
python
en
code
0
github-code
1
[ { "api_name": "game.models.Challenge.objects.filter", "line_number": 23, "usage_type": "call" }, { "api_name": "game.models.Challenge.objects", "line_number": 23, "usage_type": "attribute" }, { "api_name": "game.models.Challenge", "line_number": 23, "usage_type": "name" ...
16572439195
import matplotlib.pyplot as plt import numpy as np import pandas as pd import seaborn as sns sns.set(style="whitegrid") sns.set_context("paper", font_scale=1.5) # read entire results data = pd.read_csv("../CSV/jmh-result.csv") # filter Benchmarks data = data.loc[data['Benchmark'].str.contains("OneShot")] # names ar...
huti26/project-loom-analysis
Plots/Seaborn/JMH/Scripts/OneShot-stackDepths-as-columns.py
OneShot-stackDepths-as-columns.py
py
1,252
python
en
code
0
github-code
1
[ { "api_name": "seaborn.set", "line_number": 6, "usage_type": "call" }, { "api_name": "seaborn.set_context", "line_number": 7, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 10, "usage_type": "call" }, { "api_name": "numpy.int64", "line...
28096738039
import requests from text2speech.modules import RemoteTTS, TTSValidator class MaryTTS(RemoteTTS): PARAMS = { 'INPUT_TYPE': 'TEXT', 'AUDIO': 'WAVE_FILE', 'OUTPUT_TYPE': 'AUDIO' } def __init__(self, config=None): config = config or {"lang": "en-us", ...
HelloChatterbox/text2speech
text2speech/modules/mary_tts.py
mary_tts.py
py
2,017
python
en
code
2
github-code
1
[ { "api_name": "text2speech.modules.RemoteTTS", "line_number": 6, "usage_type": "name" }, { "api_name": "requests.get", "line_number": 35, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 38, "usage_type": "call" }, { "api_name": "text2speech.mo...
31551591291
# This code is written to extract electronic band structure data from V.A.S.P. calculation results. import codecs import re import linecache # ่ฟ™ไธชๆจกๅ—้žๅธธ้€‚ๅˆๆ นๆฎ็ป™ๅ‡บ็š„่กŒๅท๏ผŒ ไปŽๆ–‡ๆœฌๆ–‡ไปถไธญ่ฏปๅ–ๆŒ‡ๅฎš่กŒ็š„ๆ•ฐๆฎ import numpy as np class vasp: def __init__(self): self.name = vasp ##############################################...
MajestyV/VASPWheels
VaspWheels/GetElectronicBands.py
GetElectronicBands.py
py
17,172
python
zh
code
5
github-code
1
[ { "api_name": "linecache.getline", "line_number": 18, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 24, "usage_type": "call" }, { "api_name": "codecs.open", "line_number": 32, "usage_type": "call" }, { "api_name": "re.compile", "line_numb...
19595095260
from django.forms import ModelForm from product.models import Product from django import forms class ProductForm(ModelForm): class Meta: model = Product exclude = ["modified", "created"] def __init__(self, **kwargs): super().__init__(**kwargs) ignore_fields = ["image"] ...
mbijou92/erp
gallery_backend/forms.py
forms.py
py
606
python
en
code
0
github-code
1
[ { "api_name": "django.forms.ModelForm", "line_number": 6, "usage_type": "name" }, { "api_name": "product.models.Product", "line_number": 8, "usage_type": "name" }, { "api_name": "django.forms.Form", "line_number": 22, "usage_type": "attribute" }, { "api_name": "dj...
34541456179
import praw import gspread from oauth2client.service_account import ServiceAccountCredentials import bmemcached import re import time import os import json import threading ARTIST_COL = 0 ALBUM_COL = 1 SCORE_COL = 2 SUBREDDITS = 'fantanoforever+hiphopheads' COMMAND = re.compile('!fantanobot (.*)', re.IGNORECASE) U...
itsjackgardner/FantanoBot
responder.py
responder.py
py
5,602
python
en
code
0
github-code
1
[ { "api_name": "re.compile", "line_number": 16, "usage_type": "call" }, { "api_name": "re.IGNORECASE", "line_number": 16, "usage_type": "attribute" }, { "api_name": "oauth2client.service_account.ServiceAccountCredentials.from_json_keyfile_dict", "line_number": 25, "usage_t...
10867699789
import numpy as np import pandas as pd from matplotlib import pyplot as plt from sklearn.cluster import KMeans df = pd.read_csv('dataset.csv') X = np.array(df) c_x = np.array([0.1,0.3]) c_y = np.array([0.6,0.2]) centroids = np.array(list(zip(c_x,c_y))) print(centroids) model = KMeans() model.fit(X, centroids) pl...
yogeshwarram/LP3-2
Kmeans.py
Kmeans.py
py
491
python
en
code
0
github-code
1
[ { "api_name": "pandas.read_csv", "line_number": 7, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 9, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 11, "usage_type": "call" }, { "api_name": "numpy.array", "line_number"...
11344865437
from itertools import permutations import math # ์†Œ์ˆ˜ ํŒ๋ณ„ ํ•จ์ˆ˜ def is_prime_number(x): if x < 2: return False for i in range(2, int(math.sqrt(x)) + 1): if x % i == 0: return False return True def solution(numbers): answer = set() for length in range(1, len(numbers) + 1): ...
CHOJUNGHO96/algorithm
ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค_๊ณ ๋“์ kit/์™„์ „ํƒ์ƒ‰/2๋‹จ๊ณ„_์†Œ์ˆ˜์ฐพ๊ธฐ2.py
2๋‹จ๊ณ„_์†Œ์ˆ˜์ฐพ๊ธฐ2.py
py
560
python
en
code
0
github-code
1
[ { "api_name": "math.sqrt", "line_number": 8, "usage_type": "call" }, { "api_name": "itertools.permutations", "line_number": 17, "usage_type": "call" } ]
36390024180
import os import numpy as np import torch import torch.utils.data as data from torch.utils.tensorboard import SummaryWriter from torchvision import transforms from tqdm.notebook import tqdm from dataset import MolecularDataset from pointnet import PointNetCls writer = SummaryWriter() # hyper parameters LR = 0.001...
HeatEnergists/PointNet
regression/train.py
train.py
py
3,150
python
en
code
1
github-code
1
[ { "api_name": "torch.utils.tensorboard.SummaryWriter", "line_number": 15, "usage_type": "call" }, { "api_name": "dataset.MolecularDataset", "line_number": 23, "usage_type": "call" }, { "api_name": "torchvision.transforms.ToTensor", "line_number": 23, "usage_type": "call" ...
36571795647
from flask import jsonify, request from flask_restful import Resource from Model import db, VistorLevel, LevelOptionsSchema, Level2OptionsSchema, Vistor, LocationOptionSchema from webargs import fields, validate from webargs.flaskparser import use_args, use_kwargs, parser, abort level_schema = LevelOptionsSchema leve...
donc310/WidgetApi
resources/Levels.py
Levels.py
py
1,692
python
en
code
0
github-code
1
[ { "api_name": "Model.LevelOptionsSchema", "line_number": 8, "usage_type": "name" }, { "api_name": "Model.LevelOptionsSchema", "line_number": 9, "usage_type": "call" }, { "api_name": "Model.Level2OptionsSchema", "line_number": 11, "usage_type": "name" }, { "api_nam...
33520509892
import os import sys import time import pytest def test_modules(): topdir = os.path.dirname(__file__) for dirpath, _, filenames in os.walk(topdir): for fname in filenames: if _is_test_module(fname): yield os.path.join(dirpath, fname) def _is_test_module(fname): return...
robotframework/RIDE
utest/time_tests.py
time_tests.py
py
1,321
python
en
code
910
github-code
1
[ { "api_name": "os.path.dirname", "line_number": 8, "usage_type": "call" }, { "api_name": "os.path", "line_number": 8, "usage_type": "attribute" }, { "api_name": "os.walk", "line_number": 9, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 1...
6908770297
import json from django.http import HttpResponse from django.shortcuts import render from django.template.loader import render_to_string from django.views.decorators.csrf import csrf_exempt from django.views.generic.base import View from hipsterboard.board.models import Player from hipsterboard.board.models import It...
Olivia5k/hipsterboard
hipsterboard/board/views.py
views.py
py
1,530
python
en
code
0
github-code
1
[ { "api_name": "django.views.generic.base.View", "line_number": 13, "usage_type": "name" }, { "api_name": "hipsterboard.board.models.Player.objects.all", "line_number": 16, "usage_type": "call" }, { "api_name": "hipsterboard.board.models.Player.objects", "line_number": 16, ...
26355834775
import json, os, platform, subprocess, sys, time from datetime import datetime, timedelta from operator import itemgetter isPy3 = True try: from colorama import init init() except ImportError as e: pass scripts_lib_path = os.path.join(os.path.dirname(__file__), "lib") this_platform_system = str(platform...
pgEdge/nodectl
cli/scripts/api.py
api.py
py
20,709
python
en
code
7
github-code
1
[ { "api_name": "colorama.init", "line_number": 10, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 14, "usage_type": "call" }, { "api_name": "os.path", "line_number": 14, "usage_type": "attribute" }, { "api_name": "os.path.dirname", "line_n...
33310802794
# Command tool to view system statisitics from commands import Command import psutil import math def convert_size(size_bytes): """Converts a number of bytes to its respective unit such as GB or MB""" if size_bytes == 0: return "0B" size_name = ("B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB") i ...
grqphical07/Phosphate
commands/stats.py
stats.py
py
2,047
python
en
code
0
github-code
1
[ { "api_name": "math.floor", "line_number": 11, "usage_type": "call" }, { "api_name": "math.log", "line_number": 11, "usage_type": "call" }, { "api_name": "math.pow", "line_number": 12, "usage_type": "call" }, { "api_name": "commands.Command", "line_number": 16...
75249726112
# coding: utf-8 # In[4]: import sys get_ipython().system('{sys.executable} -m pip install tweepy') #Import the necessary methods from tweepy library from tweepy.streaming import StreamListener from tweepy import OAuthHandler from tweepy import Stream #Variables that contains the user credentials to access Twitter...
hameedmf/news_app
TwitterExtraction.py
TwitterExtraction.py
py
1,245
python
en
code
0
github-code
1
[ { "api_name": "tweepy.streaming.StreamListener", "line_number": 23, "usage_type": "name" }, { "api_name": "tweepy.OAuthHandler", "line_number": 37, "usage_type": "call" }, { "api_name": "tweepy.Stream", "line_number": 39, "usage_type": "call" } ]
72799954595
import unittest from django.contrib.auth.models import User from django_reputation.models import (Reputation, ReputationAction, UserReputationAction, Permission, ReputationContent) import django_reputation.config as config from django_reputation.decorators import ReputationRequire...
genghisu/eruditio
eruditio/shared_apps/django_reputation/tests.py
tests.py
py
6,802
python
en
code
0
github-code
1
[ { "api_name": "unittest.TestCase", "line_number": 12, "usage_type": "attribute" }, { "api_name": "django.contrib.auth.models.User.objects.create_user", "line_number": 14, "usage_type": "call" }, { "api_name": "django.contrib.auth.models.User.objects", "line_number": 14, "...
13734252379
# -*- coding: utf-8 -*- from django.db import models, migrations import accounts.models from django.conf import settings class Migration(migrations.Migration): dependencies = [ ('base', '0001_initial'), migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ ...
domino14/Webolith
djAerolith/accounts/migrations/0001_initial.py
0001_initial.py
py
1,684
python
en
code
32
github-code
1
[ { "api_name": "django.db.migrations.Migration", "line_number": 9, "usage_type": "attribute" }, { "api_name": "django.db.migrations", "line_number": 9, "usage_type": "name" }, { "api_name": "django.db.migrations.swappable_dependency", "line_number": 13, "usage_type": "call...
39884501056
"""Flame graph module.""" import inspect import runpy import signal import time from collections import defaultdict from vprof import base_profiler _SAMPLE_INTERVAL = 0.001 class _StatProfiler: """Statistical profiler. Samples call stack at regular intervals specified by _SAMPLE_INTERVAL. """ def ...
nvdv/vprof
vprof/flame_graph.py
flame_graph.py
py
6,376
python
en
code
3,934
github-code
1
[ { "api_name": "collections.defaultdict", "line_number": 20, "usage_type": "call" }, { "api_name": "signal.signal", "line_number": 27, "usage_type": "call" }, { "api_name": "signal.SIGPROF", "line_number": 27, "usage_type": "attribute" }, { "api_name": "signal.seti...
20248326794
import os import h3.api.numpy_int as h3 import numpy as np from scipy import stats from grids_toolbox import H3Grids from indicator_toolbox import Indicator, dist_unit_converter class ProximityIndicator(Indicator): def __init__(self, H3, name='proximity', Table=None): super().__init__(H3, name, Table) ...
csl-hcmc/SaiGon-Peninsula
Software/L3_SZ_CityScope-cw_dev/backend/proximity_indicator.py
proximity_indicator.py
py
8,841
python
en
code
2
github-code
1
[ { "api_name": "indicator_toolbox.Indicator", "line_number": 9, "usage_type": "name" }, { "api_name": "h3.api.numpy_int.h3_to_geo", "line_number": 19, "usage_type": "call" }, { "api_name": "h3.api.numpy_int", "line_number": 19, "usage_type": "name" }, { "api_name":...
43513717152
# Get light values from ESP32 at regular intervals and store in tLightValues import mysql.connector import logging import requests import time from datetime import datetime # Set up logging logging.basicConfig(filename="/home/jkumar/Projects/logs/lightTracker/lightTracker.log", level=logging.INFO,format="%(asctime)s...
jitadityakumar/home-automation
lightTracker/python/getLightValues.py
getLightValues.py
py
3,301
python
en
code
0
github-code
1
[ { "api_name": "logging.basicConfig", "line_number": 11, "usage_type": "call" }, { "api_name": "logging.INFO", "line_number": 11, "usage_type": "attribute" }, { "api_name": "logging.info", "line_number": 12, "usage_type": "call" }, { "api_name": "logging.info", ...
17418906876
import collections import math class Graph: ''' graph class inspired by https://gist.github.com/econchick/4666413 ''' def __init__(self): self.vertices = set() # makes the default value for all vertices an empty list self.edges = collections.defaultdict(list) self.weights...
nzavarinsky/Algorhitms
LABA4(dijkstra-algo)/dijkstra-v2.py
dijkstra-v2.py
py
2,905
python
en
code
1
github-code
1
[ { "api_name": "collections.defaultdict", "line_number": 13, "usage_type": "call" }, { "api_name": "math.inf", "line_number": 37, "usage_type": "attribute" } ]
21429960495
import os import mock import yaml import unittest import tempfile from pathlib import Path import setuppath from ops.testing import Harness from src.charm import AlgorandCharm class BaseTestAlgoCharm(unittest.TestCase): @classmethod def setUpClass(cls): """Setup class fixture.""" # Setup a ...
ZestBloom/charm-algorand-node
tests/unit/unittest_base.py
unittest_base.py
py
3,335
python
en
code
0
github-code
1
[ { "api_name": "unittest.TestCase", "line_number": 14, "usage_type": "attribute" }, { "api_name": "tempfile.TemporaryDirectory", "line_number": 20, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 24, "usage_type": "call" }, { "api_name": "os.pa...
14851062460
import os import sys import numpy as np import cv2 as cv import matplotlib.pyplot as plt def homography_function(x, y, H): # x&y-> N-by-1, H-> 3-by-3, return-> (N-by-1,N-by-1) D = (H[2,0] * x + H[2,1] * y + 1) xs = (H[0,0] * x + H[0,1] * y + H[0,2]) / D ys = (H[1,0] * x + H[1,1] * y + H[1,2]) / D return xs, ...
burakkunkcu/image-stitching
image-stitching.py
image-stitching.py
py
12,882
python
en
code
1
github-code
1
[ { "api_name": "numpy.shape", "line_number": 16, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_number": 17, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_number": 40, "usage_type": "call" }, { "api_name": "numpy.vstack", "line_number":...
23164289569
from pathlib import Path from math import ceil, log2 from progress.bar import Bar import numpy as np import pandas as pd import rasterio from rasterio.windows import get_data_window import geopandas as gp import shapely from analysis.constants import INDICATORS, CORRIDORS from analysis.lib.raster import write_raster...
astutespruce/secas-blueprint
analysis/prep/tiles/encode_pixel_layers.py
encode_pixel_layers.py
py
6,876
python
en
code
0
github-code
1
[ { "api_name": "pathlib.Path", "line_number": 16, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_number": 18, "usage_type": "call" }, { "api_name": "analysis.constants.INDICATORS", "line_number": 33, "usage_type": "name" }, { "api_name": "pandas.DataFr...
26647008274
from newspaper import Article from splitText import SplitText from summarizer import Summarizer from summarizingFuncs import naiveTextRank TEST_ARTICLE = "http://www.lefigaro.fr/vie-bureau/2017/10/06/09008-20171006ARTFIG00032-japon-une-journaliste-meurt-apres-159-heures-sup-en-un-mois.php" TEST_ARTICLE2 = "http://www.l...
AelHenri/TLDR-bot
TLDR/main.py
main.py
py
784
python
en
code
0
github-code
1
[ { "api_name": "newspaper.Article", "line_number": 10, "usage_type": "call" }, { "api_name": "splitText.SplitText", "line_number": 13, "usage_type": "call" }, { "api_name": "summarizer.Summarizer", "line_number": 16, "usage_type": "call" }, { "api_name": "summarizi...
42373937252
import itertools as it from functools import reduce import numpy as np from qiskit import QuantumCircuit from libbench.ibm import Job as IBMJob class IBMSchroedingerMicroscopeJob(IBMJob): @staticmethod def job_factory( num_post_selections, num_pixels, num_shots, xmin, xmax, ymin, ymax, add_measureme...
rumschuettel/quantum-benchmarks
benchmarks/Schroedinger-Microscope/ibm/job.py
job.py
py
2,226
python
en
code
5
github-code
1
[ { "api_name": "libbench.ibm.Job", "line_number": 10, "usage_type": "name" }, { "api_name": "numpy.linspace", "line_number": 15, "usage_type": "call" }, { "api_name": "numpy.linspace", "line_number": 17, "usage_type": "call" }, { "api_name": "itertools.product", ...
3294429630
import time from matplotlib import pyplot as plt from util import make_random import algorithms class Config: SORTING_ALGORITHMS = algorithms.__all__ # SORTING_ALGORITHMS = [algorithms.bubble_sort, algorithms.insertion_sort, algorithms.selection_sort, algorithms.merge_sort, algorithms.quick_sort] NUM_RA...
michael-lesirge/intermediate-programming-class
sorting/time_complexity_graph.py
time_complexity_graph.py
py
1,565
python
en
code
0
github-code
1
[ { "api_name": "algorithms.__all__", "line_number": 9, "usage_type": "attribute" }, { "api_name": "util.make_random", "line_number": 19, "usage_type": "call" }, { "api_name": "time.perf_counter", "line_number": 30, "usage_type": "call" }, { "api_name": "time.perf_c...
15749350207
from pymongo import MongoClient import pandas as pd client = MongoClient() db = client['Capstone'] parcels = db["ParcelsWithVariables"] def TransformData(Xin): X = Xin # Do a one-hot encoding of the nhood ids into seperate variables # to prevent them being treated numerically when they are categorical nhood = pd....
IvoDonev/DSCapstone
GetTrainingData.py
GetTrainingData.py
py
1,401
python
en
code
0
github-code
1
[ { "api_name": "pymongo.MongoClient", "line_number": 4, "usage_type": "call" }, { "api_name": "pandas.get_dummies", "line_number": 12, "usage_type": "call" }, { "api_name": "pandas.concat", "line_number": 14, "usage_type": "call" }, { "api_name": "pandas.get_dummie...
71312255075
from PyQt6.QtWidgets import QDialog, QPushButton, QLineEdit, QRadioButton, QComboBox, QListWidget, QFileDialog, QMessageBox from PyQt6 import uic import sys import time import os from absPath import resource_path from LMSdataBackend import schoolClass_CRUD from LMSdataBackend import gradeJHS_CRUD from LMSdataBackend i...
jpcanas/School_LMSv2
LMS_v2.1/LMSUiFrontend/cardExportWindow.py
cardExportWindow.py
py
4,799
python
en
code
0
github-code
1
[ { "api_name": "PyQt6.QtWidgets.QDialog", "line_number": 17, "usage_type": "name" }, { "api_name": "PyQt6.uic.loadUi", "line_number": 20, "usage_type": "call" }, { "api_name": "PyQt6.uic", "line_number": 20, "usage_type": "name" }, { "api_name": "absPath.resource_p...
75267266272
from __future__ import absolute_import from __future__ import print_function from __future__ import division import matplotlib.pyplot as plt from mpl_toolkits.axes_grid1 import ImageGrid import numpy as np import os import tensorflow as tf from model import Unrolled_GAN from data_utils import Processor flags = tf.ap...
gokul-uf/TF-Unrolled-GAN
main.py
main.py
py
4,491
python
en
code
5
github-code
1
[ { "api_name": "tensorflow.app", "line_number": 14, "usage_type": "attribute" }, { "api_name": "tensorflow.logging.set_verbosity", "line_number": 18, "usage_type": "call" }, { "api_name": "tensorflow.logging", "line_number": 18, "usage_type": "attribute" }, { "api_...
21531841556
import pandas as pd from joblib import dump, load from sklearn.ensemble import RandomForestClassifier, GradientBoostingClassifier, AdaBoostClassifier, VotingClassifier from sklearn.neural_network import MLPClassifier from sklearn.linear_model import SGDClassifier from sklearn.metrics import f1_score from utils import l...
daniel-yehezkel/DS.DPA.HW1
train.py
train.py
py
1,254
python
en
code
0
github-code
1
[ { "api_name": "utils.load_folder", "line_number": 11, "usage_type": "call" }, { "api_name": "pandas.concat", "line_number": 18, "usage_type": "call" }, { "api_name": "pandas.concat", "line_number": 19, "usage_type": "call" }, { "api_name": "sklearn.ensemble.Random...
8702400345
import streamlit as st import altair as alt import inspect from vega_datasets import data @st.experimental_memo def get_chart_72043(use_container_width: bool): import altair as alt import pandas as pd import numpy as np np.random.seed(1) source = pd.DataFrame({ 'x': np.arange(100)...
streamlit/release-demos
1.16.0/demo_app_altair/pages/71_Scatter_With_Loess.py
71_Scatter_With_Loess.py
py
1,216
python
en
code
78
github-code
1
[ { "api_name": "numpy.random.seed", "line_number": 12, "usage_type": "call" }, { "api_name": "numpy.random", "line_number": 12, "usage_type": "attribute" }, { "api_name": "pandas.DataFrame", "line_number": 14, "usage_type": "call" }, { "api_name": "numpy.arange", ...
31765432845
import cv2 import time class Camera(): def __init__(self): self.capture = cv2.VideoCapture('resource/capture.mp4') # cv2.namedWindow('test') def get_image(self, t): t=1000 ret = self.capture.set(cv2.CAP_PROP_POS_FRAMES, t) ret, frame = self.capture.read() if ret ...
cande-cansat/SatSAT
SocketTest/satellite_camera.py
satellite_camera.py
py
568
python
en
code
0
github-code
1
[ { "api_name": "cv2.VideoCapture", "line_number": 6, "usage_type": "call" }, { "api_name": "cv2.CAP_PROP_POS_FRAMES", "line_number": 10, "usage_type": "attribute" }, { "api_name": "cv2.cvtColor", "line_number": 13, "usage_type": "call" }, { "api_name": "cv2.COLOR_B...
11371082097
#!/usr/bin/env python from collections import OrderedDict import rows class BrazilianMoneyField(rows.fields.DecimalField): """Parser for money in Brazilian notation "1.234,56" -> Decimal("1234.56") """ @classmethod def deserialize(cls, value): value = (value or "").replace(".", "").repl...
julianyraiol/portal_transparencia_am
antigo/pdf_parser.py
pdf_parser.py
py
2,419
python
en
code
4
github-code
1
[ { "api_name": "rows.fields", "line_number": 7, "usage_type": "attribute" }, { "api_name": "collections.OrderedDict", "line_number": 19, "usage_type": "call" }, { "api_name": "rows.fields", "line_number": 21, "usage_type": "attribute" }, { "api_name": "rows.fields"...
28917567329
import healpy as hp from astropy import units as u from astropy.coordinates import SkyCoord from numpy import * import numpy as np import matplotlib.pyplot as plt import healpy as hp from astropy.io import fits with fits.open('gsm_182mhz_Jysr_nomono_nogalaxy_2048.fits') as hdu: data = hdu[0].data with fits.open('...
nicholebarry/gar_scripts
woden_scripts/temp_plotter.py
temp_plotter.py
py
3,024
python
en
code
0
github-code
1
[ { "api_name": "astropy.io.fits.open", "line_number": 10, "usage_type": "call" }, { "api_name": "astropy.io.fits", "line_number": 10, "usage_type": "name" }, { "api_name": "astropy.io.fits.open", "line_number": 13, "usage_type": "call" }, { "api_name": "astropy.io....
72198180835
from sklearn.metrics import accuracy_score from sklearn.model_selection import train_test_split from sklearn.neighbors import KNeighborsClassifier from sklearn import preprocessing from sklearn.neighbors import NearestCentroid def cv2NN(X_train, X_test, y_train, y_test, kneighbors, metric ='euclidean', scalling = Fals...
karmelowsky/AcuteInflammations
myFunctions.py
myFunctions.py
py
1,517
python
en
code
0
github-code
1
[ { "api_name": "sklearn.preprocessing.minmax_scale", "line_number": 11, "usage_type": "call" }, { "api_name": "sklearn.preprocessing", "line_number": 11, "usage_type": "name" }, { "api_name": "sklearn.neighbors.KNeighborsClassifier", "line_number": 13, "usage_type": "call"...
26579217754
# Data Sonification Project - LITR 0110D import csv from datetime import datetime from miditime.miditime import MIDITime from scipy import stats import math # instantiate the MITITime class with tempo 120 and 5sec/year mymidi = MIDITime(120, 'data_sonfication.mid', 1, 5, 1) # load in climate data as dictionary climat...
pattwm16/climate_sonification
data_sonification.py
data_sonification.py
py
2,655
python
en
code
0
github-code
1
[ { "api_name": "miditime.miditime.MIDITime", "line_number": 9, "usage_type": "call" }, { "api_name": "csv.reader", "line_number": 14, "usage_type": "call" }, { "api_name": "datetime.datetime.strptime", "line_number": 20, "usage_type": "call" }, { "api_name": "datet...
8125849858
#!/usr/bin/env python """Apply a threshold to an image for background subtraction.""" __author__ = "Anas Abou Allaban" __maintainer__ = "Anas Abou Allaban" __email__ = "anas@abouallaban.info" import cv2 import numpy as np def printImage(image): cv2.imshow('Test', image) cv2.waitKey(0) cv2.de...
piraka9011/EECE5550_MobileRobotics
mobile_robotics_utilities/scripts/threshold_image.py
threshold_image.py
py
1,348
python
en
code
0
github-code
1
[ { "api_name": "cv2.imshow", "line_number": 12, "usage_type": "call" }, { "api_name": "cv2.waitKey", "line_number": 13, "usage_type": "call" }, { "api_name": "cv2.destroyAllWindows", "line_number": 14, "usage_type": "call" }, { "api_name": "cv2.imread", "line_n...
25833334472
#!/usr/bin/python3 import sys, os from PIL import Image #import tinify #tinify.key = "bjRHvxqtkW0Lw3vIVMUc2-aM-kxMfYln" origin_file = sys.argv[1] dst_path = str(os.path.dirname(origin_file)) + '/p_i/' base_name = str(os.path.basename(origin_file)) file_name, file_extension = os.path.splitext(base_name) print( ...
mijkenator/muploader
tinify/tf_mbd180.py
tf_mbd180.py
py
1,043
python
en
code
0
github-code
1
[ { "api_name": "sys.argv", "line_number": 8, "usage_type": "attribute" }, { "api_name": "os.path.dirname", "line_number": 9, "usage_type": "call" }, { "api_name": "os.path", "line_number": 9, "usage_type": "attribute" }, { "api_name": "os.path.basename", "line_...
2129904597
#!/usr/bin/env python3 import sys from heapq import nlargest import json from math import * ratings = {} rest = {} visited = [] #function jaccard #calculate the similarity index between two teammated by their ID's #parameters- ratings, id1, id2 #ratings - the dictionary of ratings that got established in init() #id...
dgeorge10/suitable-puzzles
recommendation/solution.py
solution.py
py
6,538
python
en
code
0
github-code
1
[ { "api_name": "json.load", "line_number": 50, "usage_type": "call" }, { "api_name": "json.load", "line_number": 55, "usage_type": "call" }, { "api_name": "json.load", "line_number": 62, "usage_type": "call" }, { "api_name": "heapq.nlargest", "line_number": 114...
18468558231
import numpy as np import pylab as pl from sklearn import mixture np.random.seed(0) #C1 = np.array([[3, -2.7], [1.5, 2.7]]) #C2 = np.array([[1, 2.0], [-1.5, 1.7]]) # #X_train = np.r_[ # np.random.multivariate_normal((-7, -7), C1, size=7), # np.random.multivariate_normal((7, 7), C2, size=7), #] X_train = np.r_[ ...
sum-coderepo/Optimization-Python
Assignments_SMAI/BayesianClassifier.py
BayesianClassifier.py
py
1,043
python
en
code
2
github-code
1
[ { "api_name": "numpy.random.seed", "line_number": 5, "usage_type": "call" }, { "api_name": "numpy.random", "line_number": 5, "usage_type": "attribute" }, { "api_name": "numpy.r_", "line_number": 14, "usage_type": "attribute" }, { "api_name": "numpy.array", "li...
24870806650
#!/usr/bin/env python3 import lib.exitcode import lib.utilities as utilities import os import shutil import sys from lib.database import Database from lib.database_lib.config import Config from lib.lorisgetopt import LorisGetOpt __license__ = 'GPLv3' def main(): usage = ( "\n" "***************...
aces/Loris-MRI
tools/correct_blake2b_and_md5_hashes_in_database.py
correct_blake2b_and_md5_hashes_in_database.py
py
18,913
python
en
code
10
github-code
1
[ { "api_name": "lib.lorisgetopt.LorisGetOpt", "line_number": 50, "usage_type": "call" }, { "api_name": "os.path.basename", "line_number": 50, "usage_type": "call" }, { "api_name": "os.path", "line_number": 50, "usage_type": "attribute" }, { "api_name": "lib.databas...
72340313954
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('portfolios', '0002_auto_20170514_1729'), ] operations = [ migrations.AlterField( model_name='portfolioprovider',...
zakvan2022/Betasmartz
portfolios/migrations/0003_auto_20170519_0144.py
0003_auto_20170519_0144.py
py
469
python
en
code
1
github-code
1
[ { "api_name": "django.db.migrations.Migration", "line_number": 7, "usage_type": "attribute" }, { "api_name": "django.db.migrations", "line_number": 7, "usage_type": "name" }, { "api_name": "django.db.migrations.AlterField", "line_number": 14, "usage_type": "call" }, {...
43495756114
import numpy as np from numpy import ndarray from classes.utils import r2oos from classes.data_loader import DataLoader from sklearn.linear_model import ElasticNet from sklearn.model_selection import GridSearchCV class ElasticNet_Model(object): def __init__(self, data_loader: DataLoader, alpha: float = 1.0, l1_r...
Sho-Shoo/36490-F23-Group1
classes/elasticNet_model.py
elasticNet_model.py
py
4,506
python
en
code
0
github-code
1
[ { "api_name": "classes.data_loader.DataLoader", "line_number": 11, "usage_type": "name" }, { "api_name": "numpy.zeros", "line_number": 17, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_number": 18, "usage_type": "call" }, { "api_name": "numpy.zeros", ...
18794965698
import os import sys import transaction import json from pyramid.paster import ( get_appsettings, setup_logging, ) from pyramid.scripts.common import parse_vars from ..models.meta import Base from ..models import ( get_engine, get_session_factory, get_tm_session, ) from ..models import S...
alko89/cryptodokladi
cryptodokladi/scripts/initializedb.py
initializedb.py
py
2,872
python
en
code
0
github-code
1
[ { "api_name": "os.path.basename", "line_number": 24, "usage_type": "call" }, { "api_name": "os.path", "line_number": 24, "usage_type": "attribute" }, { "api_name": "sys.exit", "line_number": 27, "usage_type": "call" }, { "api_name": "sys.argv", "line_number": ...
40061188327
# https://www.acmicpc.net/problem/18352 # N๊ฐœ์˜ ๋„์‹œ, M๊ฐœ์˜ ๋„๋กœ # ๋ชจ๋“  ๋„๋กœ์˜ ๊ฑฐ๋ฆฌ 1 # ํŠน์ • ๋„์‹œ X๋ฅด ๋ถ€ํ„ฐ ์ถœ๋ฐœํ•˜์—ฌ ๋„๋‹ฌํ•  ์ˆ˜ ์žˆ๋Š” ๋ชจ๋“  ๋„์‹œ ์ค‘์— ์ตœ๋‹จ ๊ฑฐ๋ฆฌ๊ฐ€ K์ธ ๋„์‹œ ๋ฒˆํ˜ธ ์ถœ๋ ฅ import sys from collections import defaultdict from collections import deque def BFS(X): qu = deque() qu.append(X) dist[X] = 0 while qu: node = qu.popleft() f...
hyein99/Algorithm_python_for_coding_test
Part3/ch13_DFS BFS ๋ฌธ์ œ/15_ํŠน์ • ๊ฑฐ๋ฆฌ์˜ ๋„์‹œ ์ฐพ๊ธฐ.py
15_ํŠน์ • ๊ฑฐ๋ฆฌ์˜ ๋„์‹œ ์ฐพ๊ธฐ.py
py
999
python
ko
code
0
github-code
1
[ { "api_name": "collections.deque", "line_number": 11, "usage_type": "call" }, { "api_name": "sys.stdin.readline", "line_number": 23, "usage_type": "call" }, { "api_name": "sys.stdin", "line_number": 23, "usage_type": "attribute" }, { "api_name": "collections.defau...
4966009254
from gtts import gTTS from playsound import playsound import os import queue import threading import logging logging.basicConfig(level=logging.INFO) class AudioPlayer: def __init__(self): self.audio_queue = queue.Queue() def play_audio(self, file_path): """ Play the audio and signal ...
TheoTime01/ChatMoov
text_to_speech/text_to_speech.py
text_to_speech.py
py
2,681
python
en
code
0
github-code
1
[ { "api_name": "logging.basicConfig", "line_number": 8, "usage_type": "call" }, { "api_name": "logging.INFO", "line_number": 8, "usage_type": "attribute" }, { "api_name": "queue.Queue", "line_number": 13, "usage_type": "call" }, { "api_name": "playsound.playsound",...
17684234926
# -*- coding: utf-8 -*- """ Created on Thu Jan 5 17:12:07 2017 @author: Aniket """ import gym import universe import random def determine_turn(turn, observation_n, j, total_sum, prev_total_sum, reward_n): if(j>=15): if(total_sum/j) == 0: turn = True else: turn = Fals...
aniketparsewar/Machine-Learning
OpenAI_Universe.py
OpenAI_Universe.py
py
1,961
python
en
code
0
github-code
1
[ { "api_name": "gym.make", "line_number": 37, "usage_type": "call" }, { "api_name": "random.choice", "line_number": 63, "usage_type": "call" } ]