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
7414775356
from __future__ import unicode_literals, print_function, division __author__ = "mozman <mozman@gmx.at>" import os import zipfile import random from datetime import datetime from .xmlns import etree, CN from .manifest import Manifest from .compatibility import tobytes, bytes2unicode, is_bytes, is_zipfile from .compati...
T0ha/ezodf
ezodf/filemanager.py
filemanager.py
py
7,721
python
en
code
61
github-code
1
[ { "api_name": "datetime.datetime.now", "line_number": 22, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 22, "usage_type": "name" }, { "api_name": "zipfile.ZipInfo", "line_number": 23, "usage_type": "call" }, { "api_name": "zipfile.ZIP_D...
23466715421
#!/usr/bin/python3 from brownie import CallMeChallenge from scripts.deploy import deploy from scripts.helpful_scripts import get_account from colorama import Fore # * colours green = Fore.GREEN red = Fore.RED blue = Fore.BLUE magenta = Fore.MAGENTA reset = Fore.RESET def print_colour(target, solved=False): if so...
Aviksaikat/Blockchain-CTF-Solutions
capturetheether/warmup/CallMe_DONE/scripts/hack.py
hack.py
py
1,151
python
en
code
1
github-code
1
[ { "api_name": "colorama.Fore.GREEN", "line_number": 8, "usage_type": "attribute" }, { "api_name": "colorama.Fore", "line_number": 8, "usage_type": "name" }, { "api_name": "colorama.Fore.RED", "line_number": 9, "usage_type": "attribute" }, { "api_name": "colorama.F...
39906386971
from sklearn.model_selection import train_test_split import tensorflow as tf import keras import os import numpy as np from PIL import Image import matplotlib.pyplot as plt from os import listdir from matplotlib import image import random from keras.utils import np_utils from keras import callbacks # batch_size = high...
jansowa/pneumonia-model
load_data.py
load_data.py
py
4,145
python
en
code
0
github-code
1
[ { "api_name": "tensorflow.io.gfile.glob", "line_number": 34, "usage_type": "call" }, { "api_name": "tensorflow.io", "line_number": 34, "usage_type": "attribute" }, { "api_name": "tensorflow.io.gfile.glob", "line_number": 35, "usage_type": "call" }, { "api_name": "...
40529127357
import bpy from bpy.types import NodeSocket from . import ProkitekturaContainerNode class ProkitekturaDemoAdvancedAttr(ProkitekturaContainerNode, bpy.types.Node): # make ProkitekturaNode the first super() in multiple inheritance # Optional identifier string. If not explicitly defined, the python class na...
vvoovv/blosm-nodes
node/demoNode.py
demoNode.py
py
4,620
python
en
code
1
github-code
1
[ { "api_name": "bpy.types", "line_number": 7, "usage_type": "attribute" }, { "api_name": "bpy.props.BoolProperty", "line_number": 51, "usage_type": "call" }, { "api_name": "bpy.props", "line_number": 51, "usage_type": "attribute" }, { "api_name": "bpy.props.IntProp...
16625738937
""" GLPointCloudPlotItem.py - extension of pyqtgraph for plotting pointclouds This file implements an extension of pyqtgraph for visualizing PointClouds. Last update: 04/10/2013, Tadewos Somano(tadewos85@gmail.com) """ from OpenGL.GL import * from pyqtgraph.opengl.GLGraphicsItem import GLGraphicsItem __all__ =...
GeoDTN/Communication-Technologies-Multimedia
GLPointCloudPlotItem.py
GLPointCloudPlotItem.py
py
2,544
python
en
code
0
github-code
1
[ { "api_name": "pyqtgraph.opengl.GLGraphicsItem.GLGraphicsItem", "line_number": 14, "usage_type": "name" }, { "api_name": "pyqtgraph.opengl.GLGraphicsItem.GLGraphicsItem.__init__", "line_number": 28, "usage_type": "call" }, { "api_name": "pyqtgraph.opengl.GLGraphicsItem.GLGraphics...
4538885674
# Helper functions for stochastic raytracer import numpy as np import pickle import matplotlib.pyplot as plt from scipy import interpolate from sklearn import preprocessing # Create a linear interpolant in each of the x, y, z directions def create_interpolant(xyz, g): fx = interpolate.RegularGridInterpo...
Bryden38/579_project_code
stochastic_raytracer_helper.py
stochastic_raytracer_helper.py
py
7,495
python
en
code
0
github-code
1
[ { "api_name": "scipy.interpolate.RegularGridInterpolator", "line_number": 11, "usage_type": "call" }, { "api_name": "scipy.interpolate", "line_number": 11, "usage_type": "name" }, { "api_name": "scipy.interpolate.RegularGridInterpolator", "line_number": 12, "usage_type": ...
73910447714
__author__ = 'Victor Olaya' __date__ = 'August 2012' __copyright__ = '(C) 2012, Victor Olaya' # This will get replaced with a git SHA1 when you do a git archive __revision__ = '$Format:%H$' import os import codecs import datetime from processing.tools.system import userFolder from processing.core.ProcessingConfig im...
nextgis/nextgisqgis
python/plugins/processing/core/ProcessingLog.py
ProcessingLog.py
py
4,717
python
en
code
27
github-code
1
[ { "api_name": "processing.tools.system.userFolder", "line_number": 29, "usage_type": "call" }, { "api_name": "os.sep", "line_number": 29, "usage_type": "attribute" }, { "api_name": "os.path.isfile", "line_number": 30, "usage_type": "call" }, { "api_name": "os.path...
33402238582
import functools words=input().split() def validate(word): letters=[] for i in word: if i.upper() not in letters: letters.append(i.upper()) if len(letters)>3: return True return False if __name__=='__main__': answer1=list(filter(validate, words)) print(list(map(lambda...
Bulka148/IsmagilovB_11105
task004.py
task004.py
py
472
python
en
code
0
github-code
1
[ { "api_name": "functools.reduce", "line_number": 15, "usage_type": "call" } ]
17360106168
from datetime import datetime from sqlalchemy import Column from sqlalchemy.sql.sqltypes import Integer, Text, Date, Boolean from sqlalchemy.ext.declarative import declarative_base Base = declarative_base() class Follower(Base): __tablename__ = 'follower' id = Column(Integer, primary_key=True) name = C...
MickaelBergem/unfollower
models.py
models.py
py
573
python
en
code
6
github-code
1
[ { "api_name": "sqlalchemy.ext.declarative.declarative_base", "line_number": 7, "usage_type": "call" }, { "api_name": "sqlalchemy.Column", "line_number": 13, "usage_type": "call" }, { "api_name": "sqlalchemy.sql.sqltypes.Integer", "line_number": 13, "usage_type": "argument...
28416232124
#!/usr/bin/env python2 # [Ordered Dictionary for Py2.4 « Python recipes « ActiveState Code] # (http://code.activestate.com/recipes/576693/) from collections import OrderedDict od = OrderedDict() od["a"] = 1 od["b"] = 2 od["c"] = 4 od["d"] = 5 del od["a"] od["a"] = 3 for k, v in od.iteritems(): print("{},{}".fo...
10sr/junks
python/ordereddict.py
ordereddict.py
py
627
python
en
code
0
github-code
1
[ { "api_name": "collections.OrderedDict", "line_number": 8, "usage_type": "call" } ]
13806395486
""" Yo que se ya """ import argparse import mido import logging from timeit import default_timer as timer from video import Video # from moviepy.editor import * DEBUG = True def print_d(msg): if DEBUG: print(msg) def maxSymNotes(notes): curr = max = 0 for note in notes: if note[2] == 0...
nestor98/pymidi2vid
editor.py
editor.py
py
12,213
python
en
code
1
github-code
1
[ { "api_name": "mido.MidiTrack", "line_number": 122, "usage_type": "call" }, { "api_name": "mido.Message", "line_number": 124, "usage_type": "call" }, { "api_name": "mido.merge_tracks", "line_number": 126, "usage_type": "call" }, { "api_name": "timeit.default_timer...
34573074614
import os from os import getenv from dotenv import load_dotenv if os.path.exists("local.env"): load_dotenv("local.env") API_ID = int(getenv("API_ID", "6435225")) #optional API_HASH = getenv("API_HASH", "") #optional SUDO_USERS = list(map(int, getenv("SUDO_USERS", "").split())) OWNER_ID = int(getenv("OWNER_ID"))...
ITZ-ZAID/ZAID-USERBOT
config.py
config.py
py
1,235
python
en
code
167
github-code
1
[ { "api_name": "os.path.exists", "line_number": 5, "usage_type": "call" }, { "api_name": "os.path", "line_number": 5, "usage_type": "attribute" }, { "api_name": "dotenv.load_dotenv", "line_number": 6, "usage_type": "call" }, { "api_name": "os.getenv", "line_num...
26661499475
# -*- coding: utf-8 -*- from scrapy import Spider, Request, FormRequest from MobaiSpider.items import MobaispiderItem import numpy as np import json import time class MobaiSpider(Spider): name = 'mobai' # allowed_domains = ['mobike.com'] # start_urls = ['http://mobike.com/'] url = "https://mwx.mobike....
jllan/spiders_mess
MobaiSpider/MobaiSpider/spiders/mobai.py
mobai.py
py
2,846
python
en
code
0
github-code
1
[ { "api_name": "scrapy.Spider", "line_number": 9, "usage_type": "name" }, { "api_name": "numpy.arange", "line_number": 41, "usage_type": "call" }, { "api_name": "numpy.arange", "line_number": 43, "usage_type": "call" }, { "api_name": "MobaiSpider.items.MobaispiderI...
42447368963
""" Preprocess the ISBI data set. """ __author__ = "Mike Pekala" __copyright__ = "Copyright 2015, JHU/APL" __license__ = "Apache 2.0" import argparse, os.path import numpy as np from scipy.stats.mstats import mquantiles import scipy.io import emlib def get_args(): """Command line parameters for the 'deploy'...
iscoe/coca
Experiments/CcT/preprocess.py
preprocess.py
py
3,303
python
en
code
6
github-code
1
[ { "api_name": "argparse.ArgumentParser", "line_number": 25, "usage_type": "call" }, { "api_name": "os.path.path.isdir", "line_number": 70, "usage_type": "call" }, { "api_name": "os.path.path", "line_number": 70, "usage_type": "attribute" }, { "api_name": "os.path"...
185545694
import pickle import struct from pathlib import Path from interact import interact as io from utils import Path_utils import samplelib.SampleHost from samplelib import Sample packed_faceset_filename = 'faceset.pak' class PackedFaceset(): VERSION = 1 @staticmethod def pack(samples_path): sample...
jem0101/BigSwag-SQA2022-AUBURN
TestOrchestrator4ML-main/resources/Data/supervised/GITLAB_REPOS/bytehackr@DeepFaceLab/samplelib/PackedFaceset.py
PackedFaceset.py
py
3,627
python
en
code
2
github-code
1
[ { "api_name": "interact.interact.log_info", "line_number": 22, "usage_type": "call" }, { "api_name": "interact.interact", "line_number": 22, "usage_type": "name" }, { "api_name": "interact.interact.input_bool", "line_number": 23, "usage_type": "call" }, { "api_nam...
6468869212
import pandas as pd import numpy as np import matplotlib.pyplot as plt import random def coin(): return random.randrange(0,2) def coins20(): X = [] for i in range(0,20): X.append(coin()) return X def mili(): E = [] for i in range(0,1000000): E.append(coins20()...
Testosterol/Machine-Learning---Python-2
Assign2.py
Assign2.py
py
5,960
python
en
code
0
github-code
1
[ { "api_name": "random.randrange", "line_number": 7, "usage_type": "call" }, { "api_name": "numpy.shape", "line_number": 22, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.figure", "line_number": 40, "usage_type": "call" }, { "api_name": "matplotlib.pyplo...
39605975671
import pygame as pg from pygame.math import Vector2 from src.camera import Camera from src.game_objects.abstract.tile import Tile from src.game_objects.movable_tile import MovableTile from src.game_objects.selection_box import SelectionBox from src.game_objects.static_tile import StaticTile from src.graphics import Sp...
tmcgroul/GPD-4X
src/game_core.py
game_core.py
py
5,377
python
en
code
1
github-code
1
[ { "api_name": "src.main_loop.MainLoop", "line_number": 25, "usage_type": "name" }, { "api_name": "src.settings.constants.CAPTION", "line_number": 27, "usage_type": "argument" }, { "api_name": "src.settings.constants.SCREEN_SIZE", "line_number": 27, "usage_type": "argument...
244144573
__author__ = 'nipunbatra' import numpy as np import pandas as pd def read_df(): df = pd.read_csv("../data/input/main-data.csv",index_col=0) dfc = df.copy() df = df.drop(871) df = df.drop(1169) w=df[['aggregate_%d' %i for i in range(1,13)]] df = df.ix[w[w>0].dropna().index] feature...
nipunbatra/Gemello
code/create_df.py
create_df.py
py
7,664
python
en
code
18
github-code
1
[ { "api_name": "pandas.read_csv", "line_number": 9, "usage_type": "call" }, { "api_name": "itertools.combinations", "line_number": 50, "usage_type": "call" }, { "api_name": "numpy.hstack", "line_number": 52, "usage_type": "call" }, { "api_name": "numpy.percentile",...
17114049075
from django.urls import reverse_lazy from django.views.generic.edit import FormView from forum.forms import ContactForm class ContactView(FormView): template_name = 'pages/contact.html' form_class = ContactForm success_url = reverse_lazy('forum:home') def form_valid(self, form): form.send_em...
Projectca-r/it
itacademy-django/forum/views/contact.py
contact.py
py
366
python
en
code
0
github-code
1
[ { "api_name": "django.views.generic.edit.FormView", "line_number": 7, "usage_type": "name" }, { "api_name": "forum.forms.ContactForm", "line_number": 9, "usage_type": "name" }, { "api_name": "django.urls.reverse_lazy", "line_number": 10, "usage_type": "call" } ]
1402617285
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5.QtWidgets import QFileDialog, QMessageBox from PyQt5.QtCore import QTimer import sys import time import csv import os import winsound from libs import Track, getShiftRPM, fuelSavingOptimiser, rollOut from libs.IDDU import IDDUThread, IDDUItem from libs.auxiliaries i...
MarcMatten/iDDU
gui/iDDUgui.py
iDDUgui.py
py
78,820
python
en
code
2
github-code
1
[ { "api_name": "libs.IDDU.IDDUThread", "line_number": 26, "usage_type": "name" }, { "api_name": "libs.IDDU.IDDUThread.__init__", "line_number": 29, "usage_type": "call" }, { "api_name": "libs.IDDU.IDDUThread", "line_number": 29, "usage_type": "name" }, { "api_name"...
15427212046
import random import requests from currency_converter import CurrencyConverter from forex_python.converter import CurrencyRates def get_guess_from_user(): while True: try: guess = float(input("Enter your guess for the value in ILS: ")) break except ValueError: pr...
Almonk777/WorldOfGame
CurrencyRouletteGame.py
CurrencyRouletteGame.py
py
1,720
python
en
code
0
github-code
1
[ { "api_name": "currency_converter.CurrencyConverter", "line_number": 16, "usage_type": "call" }, { "api_name": "random.randint", "line_number": 37, "usage_type": "call" } ]
39974834021
from tensorflow import keras import matplotlib.pyplot as plt from sklearn.metrics import confusion_matrix import seaborn as sns import numpy as np from custom_models import custom_model, old_model from data_preprocessing import Preprocessing from data_augmentation import DataAugmentation from config import ...
AnaChikashua/Georgian-OCR
model/train_ocr.py
train_ocr.py
py
1,997
python
en
code
0
github-code
1
[ { "api_name": "config.ConstantConfig", "line_number": 15, "usage_type": "call" }, { "api_name": "tensorflow.keras.callbacks.EarlyStopping", "line_number": 18, "usage_type": "call" }, { "api_name": "tensorflow.keras.callbacks", "line_number": 18, "usage_type": "attribute" ...
3477761372
from flask import Flask, jsonify, request, make_response import torch from transformers import BertTokenizer, BertModel from sklearn.metrics.pairwise import cosine_similarity import numpy as np import pandas as pd app=Flask(__name__) # @app.route('/<string:text1>/<string:text2>') @app.route('/post_json',me...
daringsingh22/sementicsimilar
app.py
app.py
py
1,487
python
en
code
0
github-code
1
[ { "api_name": "flask.Flask", "line_number": 8, "usage_type": "call" }, { "api_name": "flask.request.get_json", "line_number": 14, "usage_type": "call" }, { "api_name": "flask.request", "line_number": 14, "usage_type": "name" }, { "api_name": "transformers.BertToke...
72827279715
import sys from collections import deque dx = [1,-1,0,0] dy = [0,0,1,-1] n,m = map(int,sys.stdin.readline().split()) arr = [] for _ in range(m): arr.append(list(sys.stdin.readline().strip())) visit = [[int(1e9)]*n for _ in range(m)] queue = deque([[0,0]]) visit[0][0] = 0 while queue: x,y = queue.popleft() ...
clapans/Algorithm_Study
박수근/all_code/1261.py
1261.py
py
767
python
en
code
0
github-code
1
[ { "api_name": "sys.stdin.readline", "line_number": 7, "usage_type": "call" }, { "api_name": "sys.stdin", "line_number": 7, "usage_type": "attribute" }, { "api_name": "sys.stdin.readline", "line_number": 10, "usage_type": "call" }, { "api_name": "sys.stdin", "l...
29062292111
from question_model import Question from data import question_data from quiz_brain import QuizBrain question_bank = [] for question in question_data: question_bank.append(Question(question["text"], question["answer"])) brain = QuizBrain(question_bank) while brain.stillHasQuestions(): brain.next_question() ...
miklealex/PythonProjects
TrueFalseQuiz/main.py
main.py
py
429
python
en
code
0
github-code
1
[ { "api_name": "data.question_data", "line_number": 7, "usage_type": "name" }, { "api_name": "question_model.Question", "line_number": 8, "usage_type": "call" }, { "api_name": "quiz_brain.QuizBrain", "line_number": 10, "usage_type": "call" } ]
18061408079
from pathlib import Path from tensorflow.keras import layers from tensorflow.keras import models from tensorflow.keras import optimizers from tensorflow.keras.preprocessing.image import ImageDataGenerator import tensorflow as tf from solve_cudnn_error import solve_cudnn_error solve_cudnn_error() base_dir = Path('cats...
enrongtsai/Horovod-practice
original_cat_dog.py
original_cat_dog.py
py
3,594
python
en
code
2
github-code
1
[ { "api_name": "solve_cudnn_error.solve_cudnn_error", "line_number": 9, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_number": 11, "usage_type": "call" }, { "api_name": "tensorflow.keras.models.Sequential", "line_number": 30, "usage_type": "call" }, { ...
33711265867
import pandas as pd from dateutil import parser import numpy as np def load_data(_file, pct_split): """Load test and train data into a DataFrame :return pd.DataFrame with ['test'/'train', features]""" # load train and test data data = pd.read_csv(_file) # split into train and test using pct_spli...
braddeutsch/example_pipeline
btc_battle/data/make_dataset.py
make_dataset.py
py
1,960
python
en
code
0
github-code
1
[ { "api_name": "pandas.read_csv", "line_number": 11, "usage_type": "call" }, { "api_name": "pandas.to_datetime", "line_number": 32, "usage_type": "call" }, { "api_name": "datetime.timedelta", "line_number": 46, "usage_type": "call" }, { "api_name": "numpy.min", ...
26112150368
# This files contains your custom actions which can be used to run # custom Python code. # # See this guide on how to implement these action: # https://rasa.com/docs/rasa/custom-actions # This is a simple example for a custom action which utters "Hello World!" from typing import Any, Text, Dict, List # from rasa_sdk...
RupakBiswas-2304/covid-bot
actions/actions.py
actions.py
py
2,360
python
en
code
1
github-code
1
[ { "api_name": "rasa_sdk.Action", "line_number": 29, "usage_type": "name" }, { "api_name": "typing.Text", "line_number": 30, "usage_type": "name" }, { "api_name": "rasa_sdk.Tracker", "line_number": 33, "usage_type": "name" }, { "api_name": "typing.Dict", "line_...
11373411713
# -*- coding: utf-8 -*- """Implementation of the Airfield class.""" import logging import random import math import pygame from airportgame.runway import Runway from airportgame.utilities import vec2tuple, distance_between class Airfield(): """ Airfield that contains runways. """ FIELD_HEIGHT = 200...
soikkea/airportgame
airportgame/airfield.py
airfield.py
py
8,706
python
en
code
0
github-code
1
[ { "api_name": "logging.getLogger", "line_number": 27, "usage_type": "call" }, { "api_name": "pygame.Surface", "line_number": 45, "usage_type": "call" }, { "api_name": "random.randint", "line_number": 55, "usage_type": "call" }, { "api_name": "random.randint", ...
1270621755
import requests import pandas as pd from alpha_vantage.timeseries import TimeSeries import numpy as np def sharpe_sortino_beta(ticker='TSLA', market_returns='SPY'): try: ts = TimeSeries(key='SWKZ23Y8HKIF4N4A', output_format='pandas') data, meta_data = ts.get_daily_adjusted(ticker) ...
HudsonHurtig/TamuHack2023
StockData.py
StockData.py
py
1,756
python
en
code
0
github-code
1
[ { "api_name": "alpha_vantage.timeseries.TimeSeries", "line_number": 10, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 37, "usage_type": "call" }, { "api_name": "requests.codes", "line_number": 38, "usage_type": "attribute" } ]
42654133120
#!/usr/bin/env python3 # Written by Telekrex import pygame import sys import os os.environ['SDL_VIDEO_CENTERED'] = '1' tps = 30 pygame.init() pygame.display.set_caption('Color Calibrator') monitor = (pygame.display.Info().current_w, pygame.display.Info().current_h) clock = pygame.time.Clock() void = pygame.display.set_...
telekrex/colorbase
source/colorbase.py
colorbase.py
py
1,018
python
en
code
1
github-code
1
[ { "api_name": "os.environ", "line_number": 6, "usage_type": "attribute" }, { "api_name": "pygame.init", "line_number": 8, "usage_type": "call" }, { "api_name": "pygame.display.set_caption", "line_number": 9, "usage_type": "call" }, { "api_name": "pygame.display", ...
13223932657
from reference_model.Lactose.LactoseCrystallizer import LactoseCrystallizer from data.Data import Data, Batch from domain.Domain import Domain import numpy as np import seaborn as sns from data.Illustration import Illustration import matplotlib.pyplot as plt sns.set() # Construct discretized domain object for hybrid m...
rfjoni/ParticleModel
reference_model/Lactose/demo.py
demo.py
py
1,694
python
en
code
7
github-code
1
[ { "api_name": "seaborn.set", "line_number": 8, "usage_type": "call" }, { "api_name": "domain.Domain", "line_number": 11, "usage_type": "name" }, { "api_name": "domain.Domain.Domain", "line_number": 11, "usage_type": "call" }, { "api_name": "domain.Domain.add_axis"...
24349296351
import json from pprint import pprint import requests import logbook from log_book import init_logger logger = logbook.Logger(__file__) def main(): init_logger('movie-app.log') logbook.info("Starting the omdb search app...") logbook.debug("Getting user's input...") movie_name = get_user_input() ...
pgmilenkov/100daysofcode-with-python-course
days/40-42-json-data/omdb_parse.py
omdb_parse.py
py
1,714
python
en
code
null
github-code
1
[ { "api_name": "logbook.Logger", "line_number": 7, "usage_type": "call" }, { "api_name": "log_book.init_logger", "line_number": 11, "usage_type": "call" }, { "api_name": "logbook.info", "line_number": 12, "usage_type": "call" }, { "api_name": "logbook.debug", "...
33524555484
from tkinter import * from tkinter.ttk import * from tkinter import scrolledtext import os import tkinter.filedialog as filedialog from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2Tk # Implement the default Matplotlib key bindings. from matplotlib.backend_bases import key_press_handler...
JonathanCauchon/LunaUtils
GUI.py
GUI.py
py
11,420
python
en
code
1
github-code
1
[ { "api_name": "os.getcwd", "line_number": 45, "usage_type": "call" }, { "api_name": "tkinter.filedialog.askopenfile", "line_number": 46, "usage_type": "call" }, { "api_name": "tkinter.filedialog", "line_number": 46, "usage_type": "name" }, { "api_name": "matplotli...
19388016465
from audioop import ratecv from pathlib import Path import tkinter as tk from tkinter import ttk from tkinter.filedialog import askopenfilename import PIL.Image import PIL.ImageTk # Defining of global variables... _MODULE_DIR = Path(__file__).resolve().parent class GifAnimationWin(tk.Tk): def __init__( ...
megacodist/a-bit-more-of-an-interest
Image/gif-animation.pyw
gif-animation.pyw
pyw
4,641
python
en
code
0
github-code
1
[ { "api_name": "pathlib.Path", "line_number": 12, "usage_type": "call" }, { "api_name": "tkinter.Tk", "line_number": 15, "usage_type": "attribute" }, { "api_name": "pathlib.Path", "line_number": 18, "usage_type": "name" }, { "api_name": "PIL.Image.ImageTk", "li...
40639476449
from pygame.locals import * import numpy as np import os import pygame import sys import time from source.core.game_objects.bomb.Bomb import Bomb from source.core.game_objects.bomb.Fire import Fire from source.core.game_objects.character.Cpu import Cpu from source.core.ui.GameOver import GameOver from source.core.ui.M...
asilvaigor/bomberboy
source/core/engine/Match.py
Match.py
py
10,719
python
en
code
1
github-code
1
[ { "api_name": "os.path.dirname", "line_number": 35, "usage_type": "call" }, { "api_name": "os.path", "line_number": 35, "usage_type": "attribute" }, { "api_name": "os.path.realpath", "line_number": 35, "usage_type": "call" }, { "api_name": "pygame.font.Font", ...
10461388653
""" Модуль для работы с базой данных sqlite3. """ import sqlite3 from typing import Dict import os PATH = 'db' DATABASE = 'db.sqlite3' connect = sqlite3.connect(os.path.join(PATH, DATABASE)) cursor = connect.cursor() def create_db() -> None: """ Создает базу данных и таблицы в ней, если база и таблицы ...
darkus007/FlatScrapper
database/db_sqlite.py
db_sqlite.py
py
2,466
python
ru
code
0
github-code
1
[ { "api_name": "sqlite3.connect", "line_number": 12, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 12, "usage_type": "call" }, { "api_name": "os.path", "line_number": 12, "usage_type": "attribute" }, { "api_name": "typing.Dict", "line_num...
41629028008
from jira import JIRA import pandas as pd from datetime import datetime import plotly import plotly.graph_objs as go import numpy as np from ast import literal_eval from IPython.display import display, HTML pd.set_option('display.max_columns', 999) plotly.offline.init_notebook_mode() def product_closed_time(version)...
matthewjwall/youi-product-flow-metrics
scripts/metrics_okrs.py
metrics_okrs.py
py
8,557
python
en
code
0
github-code
1
[ { "api_name": "pandas.set_option", "line_number": 10, "usage_type": "call" }, { "api_name": "plotly.offline.init_notebook_mode", "line_number": 11, "usage_type": "call" }, { "api_name": "plotly.offline", "line_number": 11, "usage_type": "attribute" }, { "api_name"...
26276689512
import pandas as pd import json import dash from dash import dcc,html, callback from dash.dependencies import Input, Output import plotly.graph_objs as go import plotly.express as px import dash_bootstrap_components as dbc import numpy as np import pathlib dash.register_page(__name__, path = '/', name="Accueil") ## D...
louislat/deployer
pages/pg0.py
pg0.py
py
2,800
python
fr
code
0
github-code
1
[ { "api_name": "dash.register_page", "line_number": 12, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_number": 15, "usage_type": "call" }, { "api_name": "json.load", "line_number": 19, "usage_type": "call" }, { "api_name": "pandas.DataFrame.from_dict"...
70427983394
import pandas as pd import matplotlib.pyplot as plt import os class CoefficientAnalyzer: def __init__(self, data_file): """ Initialize the CoefficientAnalyzer class. """ # Load the data for all trials from the CSV self.data = pd.read_csv(data_file) def calculate_coeffic...
NolanTrem/phys1494
experiment1/motion_analyzer.py
motion_analyzer.py
py
4,688
python
en
code
1
github-code
1
[ { "api_name": "pandas.read_csv", "line_number": 11, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.figure", "line_number": 72, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 72, "usage_type": "name" }, { "api_name": "matplotlib...
31589162522
import itertools from osgeo import ogr,osr import shapely.geometry # Convert Shapely type to OGR type shapely_to_ogr_type = { shapely.geometry.linestring.LineString: ogr.wkbLineString, shapely.geometry.polygon.Polygon: ogr.wkbPolygon, } def to_datasource(shape): """Converts an in-memory Shapely object t...
pism/uafgi
uafgi/util/shapelyutil.py
shapelyutil.py
py
1,095
python
en
code
1
github-code
1
[ { "api_name": "shapely.geometry.geometry", "line_number": 8, "usage_type": "attribute" }, { "api_name": "shapely.geometry", "line_number": 8, "usage_type": "name" }, { "api_name": "shapely.geometry.geometry", "line_number": 9, "usage_type": "attribute" }, { "api_n...
73286444834
from koza.cli_runner import koza_app from loguru import logger source_name = "mimtitles" row = koza_app.get_row(source_name) map = koza_app.get_map(source_name) ### # From OMIM # An asterisk (*) before an entry number indicates a gene. # # A number symbol (#) before an entry number indicates that it is a descrip...
monarch-initiative/monarch-ingest
src/monarch_ingest/maps/mimtitles.py
mimtitles.py
py
2,943
python
en
code
11
github-code
1
[ { "api_name": "koza.cli_runner.koza_app.get_row", "line_number": 8, "usage_type": "call" }, { "api_name": "koza.cli_runner.koza_app", "line_number": 8, "usage_type": "name" }, { "api_name": "koza.cli_runner.koza_app.get_map", "line_number": 9, "usage_type": "call" }, ...
18042327734
# -*- coding: utf-8 -*- from django import forms from ..models import Programacao class ProgramacaoForm(forms.ModelForm): class Meta: model = Programacao fields = ( 'programa', 'data_inicio', 'data_fim' ) def clean(self): cleaned_data = super(ProgramacaoForm, self...
rbiassusi/grade_programacao
grade_programacao/radio/forms/programacaoform.py
programacaoform.py
py
549
python
pt
code
0
github-code
1
[ { "api_name": "django.forms.ModelForm", "line_number": 6, "usage_type": "attribute" }, { "api_name": "django.forms", "line_number": 6, "usage_type": "name" }, { "api_name": "models.Programacao", "line_number": 9, "usage_type": "name" } ]
23270541963
""" Detection Recipe - 12.0.4.17 References: (1) 'Asteroseismic detection predictions: TESS' by Chaplin (2015) (2) 'On the use of empirical bolometric corrections for stars' by Torres (2010) (3) 'The amplitude of solar oscillations using stellar techniques' by Kjeldson (2008) (4) 'An absolutely calibrated Teff sca...
Fill4/tess-yield
tess-yield/TASC_detection_recipe.py
TASC_detection_recipe.py
py
22,339
python
en
code
0
github-code
1
[ { "api_name": "warnings.simplefilter", "line_number": 35, "usage_type": "call" }, { "api_name": "numpy.log10", "line_number": 58, "usage_type": "call" }, { "api_name": "numpy.full", "line_number": 59, "usage_type": "call" }, { "api_name": "numpy.log10", "line_...
31379366652
from bs4 import BeautifulSoup as bs import csv import requests URL = 'https://kaktus.media/?lable=8&date=2022-10-15&order=time' dict_with_news = {} def get_html(url): response = requests.get(url) return response.text def get_soup(html): soup = bs(html, 'lxml') return soup def get_list_news(): ...
31nkmu/hackathon_bot_kaktus_media
parsing.py
parsing.py
py
1,183
python
en
code
1
github-code
1
[ { "api_name": "requests.get", "line_number": 10, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_number": 15, "usage_type": "call" } ]
17828467348
from django.contrib import admin from django.urls import path,include from . import views urlpatterns = [ path('admin/', admin.site.urls), path('',views.index,name='Home'), path('aboutus/',views.aboutus,name='aboutUs'), path('product/<int:prodId>',views.prodDetails,name='prodDetails'), path('emptyC...
aman1100/thcProject
thcProject/thcProducts/urls.py
urls.py
py
421
python
en
code
1
github-code
1
[ { "api_name": "django.urls.path", "line_number": 6, "usage_type": "call" }, { "api_name": "django.contrib.admin.site", "line_number": 6, "usage_type": "attribute" }, { "api_name": "django.contrib.admin", "line_number": 6, "usage_type": "name" }, { "api_name": "dja...
5530540643
import config from db import db_config from db import db_users #from calendar import cal from flask import Flask, render_template, request from pymessager.message import Messager client = Messager(config.facebook_access_token) import os import json from msg_handlers import main_handler, notification_handler, responses...
kartikye/sch
run.py
run.py
py
2,339
python
en
code
0
github-code
1
[ { "api_name": "pymessager.message.Messager", "line_number": 7, "usage_type": "call" }, { "api_name": "config.facebook_access_token", "line_number": 7, "usage_type": "attribute" }, { "api_name": "msg_handlers.responses", "line_number": 15, "usage_type": "name" }, { ...
25777861293
import smtplib from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from email.Utils import COMMASPACE, formatdate # me == my email address # you == recipient's email address #assert type(to)==list def send_mail(to,fro,sub,html,html_text=None): #to = ['Chacha <sakhawat.sobhan@gmail....
tanvirraj/hirenow
doc/generic_mail.py
generic_mail.py
py
2,470
python
en
code
1
github-code
1
[ { "api_name": "email.mime.multipart.MIMEMultipart", "line_number": 15, "usage_type": "call" }, { "api_name": "email.Utils.COMMASPACE.join", "line_number": 18, "usage_type": "call" }, { "api_name": "email.Utils.COMMASPACE", "line_number": 18, "usage_type": "name" }, { ...
18455156740
#import libraries from sklearn.model_selection import train_test_split import numpy as np from imblearn.over_sampling import SMOTE from svm_constructdata import constructdata from sklearn.ensemble import RandomForestClassifier from sklearn.model_selection import RandomizedSearchCV #generate data features,labels = cons...
kksuresh25/Cancer-AI
Random Forest/rf_tunehyperparameters.py
rf_tunehyperparameters.py
py
2,420
python
en
code
1
github-code
1
[ { "api_name": "svm_constructdata.constructdata", "line_number": 10, "usage_type": "call" }, { "api_name": "sklearn.model_selection.train_test_split", "line_number": 21, "usage_type": "call" }, { "api_name": "sklearn.ensemble.RandomForestClassifier", "line_number": 24, "us...
32437306078
# Continuous cart pole using policy gradients (PG) # Running this script does the trick! import gym import numpy as np from gym import wrappers # env = gym.make('InvertedPendulum-v1') env = gym.make('Pendulum-v0') # env = wrappers.Monitor(env, '/home/sid/ccp_pg', force=True) def simulate(policy, steps, graphics=Fal...
geyang/reinforcement_learning_learning_notes
gym-sessions/ge-baselines/simple_vpg.py
simple_vpg.py
py
3,296
python
en
code
3
github-code
1
[ { "api_name": "gym.make", "line_number": 9, "usage_type": "call" }, { "api_name": "numpy.random.randn", "line_number": 40, "usage_type": "call" }, { "api_name": "numpy.random", "line_number": 40, "usage_type": "attribute" }, { "api_name": "numpy.append", "line...
10361363697
import numpy as np import matplotlib.pyplot as plt from matplotlib import cm from matplotlib.ticker import LinearLocator ## 1d example # camera is at origin and looks right # objects have position, importance, transparency ## Formulas # extinction \mu(x) = \alpha_x # optical_depth \tau(d_i) = \sum_j^i - \ln(1-\alpha...
BETuncay/demo-doo
example1d.py
example1d.py
py
6,164
python
en
code
0
github-code
1
[ { "api_name": "numpy.linspace", "line_number": 26, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_number": 27, "usage_type": "call" }, { "api_name": "numpy.abs", "line_number": 29, "usage_type": "call" }, { "api_name": "numpy.linspace", "line_numbe...
5227372260
# 移动止盈止损策略 赢损比自定义 默认1.5:1 import pymysql as sql import pandas as pd import requests as req db = sql.connect(host="localhost", user="root", password="74110", database="quant-trade", port=3307, autocommit=True) sina_url = 'http://hq.sinajs.cn/list=' # 获取新浪财经的指定股票实时数据返回dateframe类型 #参考链接 https://www.jia...
ZHAOHUHU/quant-trade
com/quant/trade/zhao/tralling_stop.py
tralling_stop.py
py
1,024
python
en
code
0
github-code
1
[ { "api_name": "pymysql.connect", "line_number": 6, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 15, "usage_type": "call" }, { "api_name": "pandas.DataFrame", "line_number": 16, "usage_type": "call" }, { "api_name": "pandas.DataFrame", "...
1747709397
import dash import dash_core_components as dcc import dash_html_components as html from dash.dependencies import Input, Output import plotly.graph_objs as go import numpy as np # input N=100 returns_input = np.array([0.04,0.06]) volas_input = np.array([0.06,0.10]) corr_input=0 def covariance(corr_c...
investeer-io/markowitz_bokeh
dashEfficientFrontierSlider.py
dashEfficientFrontierSlider.py
py
2,474
python
en
code
0
github-code
1
[ { "api_name": "numpy.array", "line_number": 12, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 13, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 18, "usage_type": "call" }, { "api_name": "numpy.diag", "line_number": 1...
1101552482
import torch import torch.optim as optim from torch.autograd import Variable from torchvision import datasets, transforms import os import matplotlib.pyplot as plt from autoencoder import Autoencoder from gmmn import * from constants import * if not os.path.exists(root): os.mkdir(root) if not os.path.exists(mod...
Abhipanda4/GMMN-Pytorch
train.py
train.py
py
3,369
python
en
code
13
github-code
1
[ { "api_name": "os.path.exists", "line_number": 13, "usage_type": "call" }, { "api_name": "os.path", "line_number": 13, "usage_type": "attribute" }, { "api_name": "os.mkdir", "line_number": 14, "usage_type": "call" }, { "api_name": "os.path.exists", "line_numbe...
15278137621
# Hashmap + list from collections import Counter class FindSumPairs: def __init__(self, nums1, nums2): self.n1, self.n2 = Counter(nums1), Counter(nums2) self.n = [i for i in nums2] def add(self, index: int, val: int) -> None: self.n2[self.n[index]] -= 1 # Remove the element from the ...
onyxolu/DSA
Bloomberg/Top 100/FindingPairsWithACertainSum.py
FindingPairsWithACertainSum.py
py
827
python
en
code
0
github-code
1
[ { "api_name": "collections.Counter", "line_number": 8, "usage_type": "call" } ]
569319840
from rest_framework import serializers # from departamentos.api.serializers import DepartamentoSerializer # from municipios.api.serializers import MunicipioSerializer from usuarios.models import Usuario class UsuarioSerializer(serializers.ModelSerializer): # municipio = MunicipioSerializer() # departamento =...
OscarRuiz15/BackendTG
usuarios/api/serializers.py
serializers.py
py
727
python
es
code
0
github-code
1
[ { "api_name": "rest_framework.serializers.ModelSerializer", "line_number": 8, "usage_type": "attribute" }, { "api_name": "rest_framework.serializers", "line_number": 8, "usage_type": "name" }, { "api_name": "usuarios.models.Usuario", "line_number": 13, "usage_type": "name...
15238963233
import json import pickle def getNumToTagsMap(): with open("./metadata/all_tags.cls") as fi: taglist = map(lambda x: x[:-1], fi.readlines()) with open("./metadata/mappings.json") as fi: mapping = json.loads(fi.read()) finalTag = list(map(lambda x: mapping[x], taglist)) return finalTa...
kyuyeonpooh/objects-that-sound
utils/util.py
util.py
py
1,765
python
en
code
31
github-code
1
[ { "api_name": "json.loads", "line_number": 10, "usage_type": "call" }, { "api_name": "pickle.dump", "line_number": 53, "usage_type": "call" }, { "api_name": "pickle.dump", "line_number": 54, "usage_type": "call" }, { "api_name": "pickle.load", "line_number": 6...
70107487715
from django.urls import path from . import views urlpatterns = [ path('list_plants/', views.all_plants, name='list_plants'), path('add_plant/', views.add_plant, name='add_plant'), path('edit_plant/<int:plant_id>/', views.edit_plant, name='edit_plant'), path('plant_detail/<int:location_id>/<int:pk>/...
Stephen-J-Whitaker/wild-carbon
plants/urls.py
urls.py
py
1,029
python
en
code
0
github-code
1
[ { "api_name": "django.urls.path", "line_number": 5, "usage_type": "call" }, { "api_name": "django.urls.path", "line_number": 6, "usage_type": "call" }, { "api_name": "django.urls.path", "line_number": 7, "usage_type": "call" }, { "api_name": "django.urls.path", ...
19142088501
from . import constants def get_response(url: str, headers: dict = constants.DEFAULT_HEADERS): try: import requests as r except ImportError: raise "Not search a requests module." response = r.get(url=url, headers=headers) if response.status_code != 200: raise "Not response co...
PavelKrivorotov/Test_Task_python_04_02_2023
main/main/utils.py
utils.py
py
773
python
en
code
0
github-code
1
[ { "api_name": "requests.get", "line_number": 10, "usage_type": "call" }, { "api_name": "re.compile", "line_number": 20, "usage_type": "call" }, { "api_name": "re.findall", "line_number": 21, "usage_type": "call" } ]
43645610632
import pyspark import pyspark.sql from pyspark.sql import * from pyspark.sql.functions import * import json import urllib import argparse conf = pyspark.SparkConf().setMaster("local[*]").setAll([ ('spark.jars.packages', 'com.databricks:spark-xml_2.11:0.8.0'), ...
epfl-dlab/WikiPDA
PaperAndCode/TopicsExtractionPipeline/GetBeta.py
GetBeta.py
py
1,797
python
en
code
10
github-code
1
[ { "api_name": "pyspark.SparkConf", "line_number": 10, "usage_type": "call" }, { "api_name": "argparse.ArgumentParser", "line_number": 25, "usage_type": "call" } ]
27172359979
from django import forms from .models import Tag, Post from django.core.exceptions import ValidationError class PostForm(forms.ModelForm): class Meta: model = Post fields = ['title', 'slug', 'body', 'tags'] widgets = { 'title': forms.TextInput(attrs={'class': 'form-con...
HolidayMan/pinkerblog
blog/engine/forms.py
forms.py
py
2,745
python
en
code
0
github-code
1
[ { "api_name": "django.forms.ModelForm", "line_number": 6, "usage_type": "attribute" }, { "api_name": "django.forms", "line_number": 6, "usage_type": "name" }, { "api_name": "models.Post", "line_number": 9, "usage_type": "name" }, { "api_name": "django.forms.TextIn...
43687469628
# -*- coding: utf-8 -*- import os,sys,inspect currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) parentdir = os.path.dirname(currentdir) sys.path.insert(0,parentdir) from PyQt4 import QtGui from PyQt4 import QtCore import os import modules.filter as tableWidgetFilters import modules....
Doberm4n/POEStashJsonViewer
ui/main_layout.py
main_layout.py
py
8,943
python
en
code
0
github-code
1
[ { "api_name": "os.path.dirname", "line_number": 3, "usage_type": "call" }, { "api_name": "os.path", "line_number": 3, "usage_type": "attribute" }, { "api_name": "os.path.abspath", "line_number": 3, "usage_type": "call" }, { "api_name": "inspect.getfile", "line...
37413122640
import torch import torch.nn as nn import torch.nn.functional as F from model.octconv import * import model.venconv as venconv from model.median_pooling import median_pool_2d class SNRom(nn.Module): def __init__(self, in_channels=1, hide_channels=64, out_channels=1, kernel_size=3, alpha_in=0.5, ...
StephenYang190/SpeckleNoisePytorch
model/SNRom.py
SNRom.py
py
4,128
python
en
code
0
github-code
1
[ { "api_name": "torch.nn.Module", "line_number": 9, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 9, "usage_type": "name" }, { "api_name": "torch.nn.ModuleList", "line_number": 26, "usage_type": "call" }, { "api_name": "torch.nn", "line_...
15850354420
import pandas as pd from typing import Union, List, Optional, Tuple from bokeh.io import output_notebook from bokeh.resources import INLINE from bokeh.plotting import figure, gridplot from bokeh.plotting import show as _show from pandas.api.types import is_string_dtype from bokeh.palettes import Set1 output_notebook(I...
idiotekk/unknownlib
lib/unknownlib/plt/bk.py
bk.py
py
2,990
python
en
code
0
github-code
1
[ { "api_name": "bokeh.io.output_notebook", "line_number": 10, "usage_type": "call" }, { "api_name": "bokeh.resources.INLINE", "line_number": 10, "usage_type": "argument" }, { "api_name": "bokeh.palettes.Set1", "line_number": 15, "usage_type": "name" }, { "api_name"...
70766232034
from stable_baselines3 import A2C from algos.PlaNet.planet import PlaNet from algos.PlaNet.policies import DiscreteMPCPlanner from algos.PlaNet.world_model import DreamerModel import os from buffers.chunk_buffer import ChunkReplayBuffer from buffers.introspective_buffer import IntrospectiveChunkReplayBuffer from algos...
GittiHab/mbrl-thesis-code
algos/setup.py
setup.py
py
3,496
python
en
code
1
github-code
1
[ { "api_name": "utils.total_timesteps", "line_number": 25, "usage_type": "call" }, { "api_name": "utils.total_timesteps", "line_number": 26, "usage_type": "call" }, { "api_name": "algos.PlaNet.world_model.DreamerModel.from_args", "line_number": 32, "usage_type": "call" }...
24154817598
#!/usr/bin/env python ''' Mizoo rename all your photos with a description of what is in them. It uses Microsoft Computer Vision API's to describe what it sees on the image and rename the file to that description. By naming your photos with a description of the content you will never have to dig up an old photo from y...
albertoqa/mizoo
mizoo/mizoo.py
mizoo.py
py
3,866
python
en
code
1
github-code
1
[ { "api_name": "json.dumps", "line_number": 39, "usage_type": "call" }, { "api_name": "http.client.HTTPSConnection", "line_number": 43, "usage_type": "call" }, { "api_name": "http.client", "line_number": 43, "usage_type": "attribute" }, { "api_name": "json.loads", ...
39278591910
import cv2 import numpy as np import imutils PATH_TEMPLATE_MSLOGO = r"C:\Users\ASUS\Desktop\Working\PROJECT\Mybotic Product\mySejahtera Scan\images\template images\mslogo.png" PATH_TEMPLATE_TICKMARK = r"C:\Users\ASUS\Desktop\Working\PROJECT\Mybotic Product\mySejahtera Scan\images\template images\tickmark.png" SIMILAR...
Awexander/mySejahtera-scanner
mysejahtera_scan_v1.py
mysejahtera_scan_v1.py
py
3,056
python
en
code
0
github-code
1
[ { "api_name": "cv2.imread", "line_number": 12, "usage_type": "call" }, { "api_name": "cv2.imread", "line_number": 18, "usage_type": "call" }, { "api_name": "cv2.cvtColor", "line_number": 19, "usage_type": "call" }, { "api_name": "cv2.COLOR_BGR2GRAY", "line_num...
38933917008
#!/usr/bin/env python # encoding: utf-8   """  @author: zzz_jq @contact: zhuangjq@stu.xmu.edu.cn @software: PyCharm  @file: data_process.py  @create: 2020/11/30 16:06  """ import re import os from pathlib import Path from tqdm import tqdm import numpy as np import pandas as pd from sklearn.feature_extraction.text imp...
TsinghuaDatabaseGroup/AI4DBCode
Spark-Tuning/prediction_ml/spark_tuning/by_stage/ml_baselines/data_process_one_line.py
data_process_one_line.py
py
3,683
python
en
code
56
github-code
1
[ { "api_name": "re.sub", "line_number": 45, "usage_type": "call" }, { "api_name": "sklearn.feature_extraction.text.TfidfVectorizer", "line_number": 63, "usage_type": "call" }, { "api_name": "tqdm.tqdm", "line_number": 67, "usage_type": "call" }, { "api_name": "nump...
22039745744
query_variables = { "wallet": "tz1NqA15BLrMFZNsGWBwrq8XkcXfGyCpapU1", "timestart": "2021-07-01", "timeend": "2022-06-30" } buys_start = "2019-01-01" currency = "AUD" import json import os import datetime import csv import requests # Prepare conversion rates # Using the RBA exchange rates spreadsheet cleaned up...
mattebb/tezos-nft-tax-report
report.py
report.py
py
8,757
python
en
code
2
github-code
1
[ { "api_name": "csv.reader", "line_number": 22, "usage_type": "call" }, { "api_name": "datetime.timedelta", "line_number": 36, "usage_type": "call" }, { "api_name": "datetime.timedelta", "line_number": 45, "usage_type": "call" }, { "api_name": "requests.post", ...
7409145188
import pandas as pd import numpy as np import loaders as ld import analytics as an def cooc(opens,closes,costs=0.0001,cutoff=1,strength=10000,prec=2,ret=0,sw=0,inv=0): k = opens.shape[1]-opens.isnull().sum(axis=1) CO_ret = np.log(opens/closes.shift(1)) OC_ret = closes/opens-1 #OO_ret = np.log(opens/ope...
mlabedzki/Fortuna
strategies.py
strategies.py
py
6,008
python
en
code
0
github-code
1
[ { "api_name": "numpy.log", "line_number": 8, "usage_type": "call" }, { "api_name": "numpy.sign", "line_number": 28, "usage_type": "call" }, { "api_name": "numpy.minimum", "line_number": 29, "usage_type": "call" }, { "api_name": "numpy.maximum", "line_number": ...
19586982312
import os, pathlib from pydo import * this_dir = pathlib.Path(__file__).parent try: from . import config except ImportError: log.error('Error: Project is not configured.') exit(-1) try: jobs = int(os.environ['PYDOJOBS'], 10) except Exception: import multiprocessing jobs = multiprocessing.cpu...
ali1234/rpi-ramdisk
__init__.py
__init__.py
py
1,348
python
en
code
79
github-code
1
[ { "api_name": "pathlib.Path", "line_number": 5, "usage_type": "call" }, { "api_name": "os.environ", "line_number": 14, "usage_type": "attribute" }, { "api_name": "multiprocessing.cpu_count", "line_number": 17, "usage_type": "call" } ]
17166477183
# -*- coding: utf-8 -*- """ Created on Thu Jun 3 15:50:28 2021 @author: mozhenling """ import copy import numpy as np import scipy.io as scio import matplotlib.pyplot as plt from dbtpy.filters.afilter import filter_fun from dbtpy.findexes.afindex import findex_fun from dbtpy.findexes.sigto import sig_real_to_env #--...
mozhenling/dbtree
dbtpy/funs/fun_diag.py
fun_diag.py
py
18,106
python
en
code
4
github-code
1
[ { "api_name": "dbtpy.filters.afilter.filter_fun", "line_number": 75, "usage_type": "call" }, { "api_name": "dbtpy.findexes.sigto.sig_real_to_env", "line_number": 77, "usage_type": "call" }, { "api_name": "dbtpy.findexes.afindex.findex_fun", "line_number": 79, "usage_type"...
41495665790
import torch import torch.nn as nn class MASRModel(nn.Module): def __init__(self, **config): super().__init__() self.config = config @classmethod def load(cls, path): package = torch.load(path) state_dict = package["state_dict"] config = package["config"] m...
nobody132/masr
models/base.py
base.py
py
1,176
python
en
code
1,754
github-code
1
[ { "api_name": "torch.nn.Module", "line_number": 5, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 5, "usage_type": "name" }, { "api_name": "torch.load", "line_number": 12, "usage_type": "call" }, { "api_name": "trainable.TrainableModel", ...
9293506322
#this model aim to reduce number of rounds but will continue to use random method import random from datetime import datetime start_time = datetime.now() final_state = [1,2,3,4,5,6,7,8] initial_state = [0,0,0,0,0,0,0,0] #random initail state with different position of number while 0 in initial_state: rand = rand...
Tanisa124/AI-Practice
heuristic_lessRound.py
heuristic_lessRound.py
py
2,058
python
en
code
0
github-code
1
[ { "api_name": "datetime.datetime.now", "line_number": 5, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 5, "usage_type": "name" }, { "api_name": "random.randint", "line_number": 12, "usage_type": "call" }, { "api_name": "random.randint",...
35465861402
import itertools import torch.nn as nn import decoder import encoder import modules from utils import MergeDict class Model(nn.Module): def __init__(self, sample_rate, vocab_size): super().__init__() self.spectra = modules.Spectrogram(sample_rate) # self.encoder = encoder.Conv2dRNNEnco...
vshmyhlo/listen-attend-and-speell-pytorch
model.py
model.py
py
2,131
python
en
code
11
github-code
1
[ { "api_name": "torch.nn.Module", "line_number": 11, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 11, "usage_type": "name" }, { "api_name": "modules.Spectrogram", "line_number": 15, "usage_type": "call" }, { "api_name": "encoder.Conv2dAtten...
27981377485
import requests import json import numpy as np import time import pandas as pd from pymysql import connect import csv from custom_send_email import sendEmail # 获取订单簿数据 class GetData(object): ''' 获取对应api bitmax数据,计算固定比例的数据,监控变化,发送邮件 ''' def __init__(self,url): self.url = url # self.da...
jackendoff/bilian_bitmax_data
BITMAX_jackendoff.py
BITMAX_jackendoff.py
py
10,355
python
en
code
1
github-code
1
[ { "api_name": "time.time", "line_number": 21, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 26, "usage_type": "call" }, { "api_name": "json.loads", "line_number": 27, "usage_type": "call" }, { "api_name": "numpy.percentile", "line_number...
29598602871
import numpy as np import keras # from keras.models import Sequential from keras.models import * from keras.layers import * import random from sklearn.model_selection import train_test_split #this one will be used for normalization and standardization from sklearn import preprocessing import scipy.io as sio # We us...
ell-hol/mpc-DL-controller
simulate_DL_controller.py
simulate_DL_controller.py
py
16,307
python
en
code
61
github-code
1
[ { "api_name": "numpy.array", "line_number": 24, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 25, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 26, "usage_type": "call" }, { "api_name": "numpy.dot", "line_number": 29...
30296294545
import serial import sys import time def out_gpio(value): f_val = open('/sys/class/gpio/gpio18/value', 'w') f_val.write(value) f_val.close() # первый байт req - ожидаемая длина ответа def make_request(req): out_gpio('1') port.write(req[1:]) time.sleep(0.004) out_gpio('0') while(port.inWaiting() == 0): time....
almarkov/quest
test.py
test.py
py
651
python
ru
code
0
github-code
1
[ { "api_name": "time.sleep", "line_number": 14, "usage_type": "call" }, { "api_name": "time.sleep", "line_number": 17, "usage_type": "call" }, { "api_name": "sys.stdout.write", "line_number": 19, "usage_type": "call" }, { "api_name": "sys.stdout", "line_number"...
8707312288
#---------------------------------------------------------------------- # Package Management #---------------------------------------------------------------------- import os import os.path as op import textwrap import argparse import pandas as pd import re import zipfile from tqdm import tqdm, trange import hashlib ...
muscbridge/comprssr
comprssr.py
comprssr.py
py
7,544
python
en
code
0
github-code
1
[ { "api_name": "argparse.ArgumentParser", "line_number": 24, "usage_type": "call" }, { "api_name": "argparse.RawDescriptionHelpFormatter", "line_number": 26, "usage_type": "attribute" }, { "api_name": "textwrap.dedent", "line_number": 27, "usage_type": "call" }, { ...
24383408411
"""Script to gather IMDB keywords from 2013's top grossing movies.""" import sys from os import path import time from business_logic.compare_prices import ComparePrices import logging from business_logic.logic import Logic logger = logging.getLogger('ftpuploader') hdlr = logging.FileHandler('ftplog.log') formatter = lo...
life-of-pi-thon/crypto_carluccio
lukrative.py
lukrative.py
py
1,077
python
en
code
0
github-code
1
[ { "api_name": "logging.getLogger", "line_number": 8, "usage_type": "call" }, { "api_name": "logging.FileHandler", "line_number": 9, "usage_type": "call" }, { "api_name": "logging.Formatter", "line_number": 10, "usage_type": "call" }, { "api_name": "logging.INFO", ...
19767607746
"""CSV操作 aws cliの初期設定 aws configure 設定の確認 ~/.aws/ boto3 Client APIとResource API Client API・・・リソースを操作する場合も参照系と同様に、対象のリソースIDを引数に加えてメソッドを実行する。 ex) s3 = boto3.client('s3') # バケット一覧を取得 s3.list_buckets() obj = client.get_object(Bucket='test_bucket', Key='test.text') print(obj['body'].read()) Resource API・・・リソースを操作する場合には対象の...
yoshikikasama/data_analytics
coding/boto3/tutorials/csv_from_s3.py
csv_from_s3.py
py
6,116
python
ja
code
0
github-code
1
[ { "api_name": "boto3.client", "line_number": 53, "usage_type": "call" }, { "api_name": "json.dumps", "line_number": 92, "usage_type": "call" }, { "api_name": "io.TextIOWrapper", "line_number": 108, "usage_type": "call" }, { "api_name": "io.BytesIO", "line_numb...
39002643737
import sqlite3 DbName = "./db/timing_plan.db" class Cdb: def __init__(self,dbName): self.dbName = dbName #数据库名称 self.conn = None #文件与数据库的连接 self.cursor = None #文件与数据库的交互 self.__connect() def __connect(self): #将数据库与文件连接 try: self.conn = sqlite...
lx-dtbs/UI-base
sumo_liveUpdate_ui/DbBase.py
DbBase.py
py
2,777
python
en
code
1
github-code
1
[ { "api_name": "sqlite3.connect", "line_number": 11, "usage_type": "call" } ]
22184099208
""" Simple `GIL` released demo. """ import threading import requests from ch01.tools import time_it def simple_request() -> None: """Make a simple request""" response = requests.get("https://www.google.com") print(f"Response status code: {response.status_code}") @time_it def requests_no_threading() ->...
iplitharas/myasyncio
ch01/gil_released_demo.py
gil_released_demo.py
py
700
python
en
code
0
github-code
1
[ { "api_name": "requests.get", "line_number": 13, "usage_type": "call" }, { "api_name": "ch01.tools.time_it", "line_number": 17, "usage_type": "name" }, { "api_name": "threading.Thread", "line_number": 25, "usage_type": "call" }, { "api_name": "threading.Thread", ...
70026443555
import os import datetime import argparse import sys import shutil def run(): parser = argparse.ArgumentParser(description="Delete files each period of time") parser.add_argument("--dir_path", type=str, help="Path to the folder") parser.add_argument("--period", type=int, help="Period of time in days") a...
JassielMG/AutoCleanFolder
main.py
main.py
py
1,778
python
en
code
0
github-code
1
[ { "api_name": "argparse.ArgumentParser", "line_number": 7, "usage_type": "call" }, { "api_name": "sys.stdout.write", "line_number": 11, "usage_type": "call" }, { "api_name": "sys.stdout", "line_number": 11, "usage_type": "attribute" }, { "api_name": "datetime.date...
14621398412
import os import tornado.web from .Util import * from .Core import * class IndexHandler(tornado.web.RequestHandler): def get(self): self.render("index.html", people="skipper") class LogIndexHandler(tornado.web.RequestHandler): def get(self): self.render("log/log_index.html") class LogList...
daddvted/arch1ve
python_code/log2chart_tornado/engine/Handler.py
Handler.py
py
3,264
python
en
code
0
github-code
1
[ { "api_name": "tornado.web.web", "line_number": 8, "usage_type": "attribute" }, { "api_name": "tornado.web", "line_number": 8, "usage_type": "name" }, { "api_name": "tornado.web.web", "line_number": 13, "usage_type": "attribute" }, { "api_name": "tornado.web", ...
72632864993
import json from flask import Flask, render_template, request, jsonify from sklearn.svm import SVC from sklearn.feature_extraction.text import CountVectorizer app = Flask(__name__) # Load the business guidelines from a JSON file with open("business_guidelines.json", "r") as f: guidelines_data = json.load...
Balakumarmd/Ideavalidator
app.py
app.py
py
1,730
python
en
code
0
github-code
1
[ { "api_name": "flask.Flask", "line_number": 6, "usage_type": "call" }, { "api_name": "json.load", "line_number": 10, "usage_type": "call" }, { "api_name": "sklearn.feature_extraction.text.CountVectorizer", "line_number": 20, "usage_type": "call" }, { "api_name": "...
26358115895
from __future__ import print_function, division #################################################################### ###### Copyright (c) 2022-2023 PGEDGE ########## #################################################################### import argparse, sys, os, tempfile, json, subprocess, getpass...
pgEdge/nodectl
src/pgXX/config-pgXX.py
config-pgXX.py
py
4,102
python
en
code
7
github-code
1
[ { "api_name": "os.getenv", "line_number": 12, "usage_type": "call" }, { "api_name": "os.getenv", "line_number": 13, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 15, "usage_type": "call" }, { "api_name": "os.path", "line_number": 15, ...
43751970541
#!/usr/bin/env python3 """ Scraper for the 'The Flavor Bible'. Created by Jon. """ import json import os import re import sqlite3 import sys import ebooklib from ebooklib import epub from bs4 import BeautifulSoup latest_id = 0 def createTables(c): c.execute('''CREATE TABLE ingredients( id int...
tristanchu/FlavorFinder
dev/scraper.py
scraper.py
py
11,938
python
en
code
2
github-code
1
[ { "api_name": "re.search", "line_number": 75, "usage_type": "call" }, { "api_name": "re.sub", "line_number": 76, "usage_type": "call" }, { "api_name": "os.path.isfile", "line_number": 158, "usage_type": "call" }, { "api_name": "os.path", "line_number": 158, ...
74407308832
from fastapi import Depends, FastAPI app = FastAPI() """ # Dependency injection: a function that abstracts logic and can be provided to # other functions as dependency. Whenever a new request arrives to a function that includes a dependency, fastAPI runs the dependency function with the corresponding parameters, an...
jcaguirre89/learning-fastapi
another_app/dependency.py
dependency.py
py
1,980
python
en
code
0
github-code
1
[ { "api_name": "fastapi.FastAPI", "line_number": 3, "usage_type": "call" }, { "api_name": "fastapi.Depends", "line_number": 19, "usage_type": "call" }, { "api_name": "fastapi.Depends", "line_number": 25, "usage_type": "call" }, { "api_name": "fastapi.Depends", ...
4832434614
# Always prefer setuptools over distutils from setuptools import setup, find_packages # To use a consistent encoding from codecs import open from os import path here = path.abspath(path.dirname(__file__)) with open(path.join(here, 'README.rst'), encoding='utf-8') as f: long_description = f.read() setup( name=...
csail-csg/pyverilator
setup.py
setup.py
py
1,497
python
en
code
64
github-code
1
[ { "api_name": "os.path.abspath", "line_number": 7, "usage_type": "call" }, { "api_name": "os.path", "line_number": 7, "usage_type": "name" }, { "api_name": "os.path.dirname", "line_number": 7, "usage_type": "call" }, { "api_name": "codecs.open", "line_number":...
24402276077
import os import numpy as np import pandas as pd from catboost import CatBoost, Pool import matplotlib.pylab as plt from model import Model from util import Util class ModelCatBoost(Model): def train(self, tr_x, tr_y, va_x=None, va_y=None): # ハイパーパラメータの設定 params = dict(self.params) cat_...
riron1206/lgb_tuning
src/model_catboost.py
model_catboost.py
py
2,770
python
ja
code
0
github-code
1
[ { "api_name": "model.Model", "line_number": 12, "usage_type": "name" }, { "api_name": "catboost.Pool", "line_number": 22, "usage_type": "call" }, { "api_name": "catboost.Pool", "line_number": 24, "usage_type": "call" }, { "api_name": "catboost.CatBoost", "line...
25623285903
""" Google Forms Interaction Module This module provides functionalities to interact with Google Forms, specifically to fetch responses from a designated form. The primary purpose is to retrieve sign-up responses, which are then used in the main application for sending out notifications. Key Features: - Authentic...
StevenWangler/snow_day_bot
google_functions/google_forms.py
google_forms.py
py
4,128
python
en
code
0
github-code
1
[ { "api_name": "os.path.path.exists", "line_number": 39, "usage_type": "call" }, { "api_name": "os.path.path", "line_number": 39, "usage_type": "attribute" }, { "api_name": "os.path", "line_number": 39, "usage_type": "name" }, { "api_name": "google.oauth2.credentia...
16239780344
import os import sys import PIL import time import random import logging import datetime import os.path as osp import torch import torch.backends import torch.nn as nn import torch.backends.cudnn import torch.distributed as dist from utils.loss import OhemCELoss from utils.utils import prepare_seed from utils.utils i...
NoamRosenberg/autodeeplab
train_distributed.py
train_distributed.py
py
8,976
python
en
code
306
github-code
1
[ { "api_name": "config_utils.re_train_autodeeplab.obtain_retrain_autodeeplab_args", "line_number": 29, "usage_type": "call" }, { "api_name": "torch.cuda.set_device", "line_number": 30, "usage_type": "call" }, { "api_name": "torch.cuda", "line_number": 30, "usage_type": "at...
15616079630
import multiprocessing as processing from multiprocessing import pool,Process import math import numpy as np import gzip import pickle import sys from scipy import integrate import time,random import h5py import threading import os.path import _pickle as cpickle from scipy import spatial from multiprocessing import Pro...
peraktong/Multi_thread_examples
0327_calculate_density_Kd_tree_multi_process_doable_v1.py
0327_calculate_density_Kd_tree_multi_process_doable_v1.py
py
6,624
python
en
code
0
github-code
1
[ { "api_name": "math.log10", "line_number": 19, "usage_type": "call" }, { "api_name": "numpy.inf", "line_number": 21, "usage_type": "attribute" }, { "api_name": "math.exp", "line_number": 26, "usage_type": "call" }, { "api_name": "numpy.inf", "line_number": 28,...
27836865388
import regex as re from bs4 import BeautifulSoup import requests import requests_futures import aiohttp import asyncio from requests_futures.sessions import FuturesSession import tree import json trees = [] valid_regex = r"^https?\:\/\/([\w\.]+)wikipedia.org\/wiki\/([\w]+\_?)+" links = dict() loop = asyncio.get_even...
LyudmilaTretyakova/testtask
script.py
script.py
py
4,831
python
en
code
0
github-code
1
[ { "api_name": "asyncio.get_event_loop", "line_number": 16, "usage_type": "call" }, { "api_name": "regex.split", "line_number": 18, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 19, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", ...
18161161348
import pandas from recordlinkage.preprocessing import clean d = {'col1': ['marry - a', 'kudo::'], 'col2': ['nam vinh', 'okee-']} df = pandas.DataFrame(data=d) s = pandas.Series(df['col1']) df['col1'] = clean(s) print(df) df['col1'][0] = "b" print(df)
aduyphm/data-integration-20212
DataHandle/test.py
test.py
py
252
python
en
code
0
github-code
1
[ { "api_name": "pandas.DataFrame", "line_number": 5, "usage_type": "call" }, { "api_name": "pandas.Series", "line_number": 6, "usage_type": "call" }, { "api_name": "recordlinkage.preprocessing.clean", "line_number": 7, "usage_type": "call" } ]
16547812246
import requests import sys import json def post_predict(host:str): ''' Sends an HTTP POST request to the /predict endpoint. ''' proto = '' if not host.startswith('http'): proto = 'http://' with open('manualtests/manual_predict_data.json', 'r') as f: data = json.loads(f.read...
pugad/ml-golf-demo-app
manualtests/predict_manual.py
predict_manual.py
py
667
python
en
code
0
github-code
1
[ { "api_name": "json.loads", "line_number": 14, "usage_type": "call" }, { "api_name": "requests.post", "line_number": 15, "usage_type": "call" }, { "api_name": "sys.argv", "line_number": 20, "usage_type": "attribute" } ]
37639058519
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import os import re import sys import argparse __author__ = 'menghao' __mail__ = 'haomeng@genome.cn' bindir = os.path.abspath(os.path.dirname(__file__)) pat1 = re.compile('^\s*$') sys.path.append(bindir + '/../lib') from common import parser_fasta complement = {'A':'T','...
whenfree/Rosalind
Locating_Restriction_Sites/Locating_Restriction_Sites.py
Locating_Restriction_Sites.py
py
1,287
python
en
code
0
github-code
1
[ { "api_name": "os.path.abspath", "line_number": 10, "usage_type": "call" }, { "api_name": "os.path", "line_number": 10, "usage_type": "attribute" }, { "api_name": "os.path.dirname", "line_number": 10, "usage_type": "call" }, { "api_name": "re.compile", "line_n...
17446433552
"""Tests for the config API.""" import unittest from pygame_assets.exceptions import NoSuchConfigurationParameterError from pygame_assets.configure import Config, ConfigMeta from pygame_assets.configure import get_config, config_exists, remove_config from pygame_assets.configure import get_environ_config, set_environ...
florimondmanca/pygame-assets
pygame_assets/tests/test_configure.py
test_configure.py
py
6,870
python
en
code
2
github-code
1
[ { "api_name": "unittest.TestCase", "line_number": 12, "usage_type": "attribute" }, { "api_name": "pygame_assets.configure.ConfigMeta.get_class_attributes", "line_number": 25, "usage_type": "call" }, { "api_name": "pygame_assets.configure.ConfigMeta", "line_number": 25, "u...
6048712734
from app.visual_detector.workers import ( FrameReaderThread, TowerDetectorThread, ComponentDetectorThread, DefectDetectorThread, DefectTrackingThread, ResultsProcessorThread, TiltDetectorThread, DumperClassifierThread, WoodCracksDetectorThread ) from app.visual_detector.defect_detectors import ( TowerDe...
EvgeniiTitov/defect_detection
app/visual_detector/model.py
model.py
py
11,192
python
en
code
0
github-code
1
[ { "api_name": "typing.List", "line_number": 26, "usage_type": "name" }, { "api_name": "queue.Queue", "line_number": 45, "usage_type": "call" }, { "api_name": "queue.Queue", "line_number": 46, "usage_type": "call" }, { "api_name": "queue.Queue", "line_number": ...