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
15224340627
import re import requests from json import dumps from .NotifyBase import NotifyBase from ..common import NotifyType from ..utils import is_phone_no from ..utils import parse_phone_no, parse_bool from ..utils import validate_regex from ..AppriseLocale import gettext_lazy as _ class MSG91PayloadField: """ Ident...
caronc/apprise
apprise/plugins/NotifyMSG91.py
NotifyMSG91.py
py
10,917
python
en
code
8,936
github-code
21
[ { "api_name": "NotifyBase.NotifyBase", "line_number": 24, "usage_type": "name" }, { "api_name": "re.compile", "line_number": 52, "usage_type": "call" }, { "api_name": "re.IGNORECASE", "line_number": 53, "usage_type": "attribute" }, { "api_name": "NotifyBase.Notify...
18027783215
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import os import signal import datetime import time import requests import json from bme280 import BME280 try: from smbus2 import SMBus except ImportError: from smbus import SMBus EXIT = False def handler(signum, frame): global EXIT EXIT = True def main(): si...
lets-fiware/lets-fiware.tutorials
raspberrypi/01.context_producer/context_producer.py
context_producer.py
py
2,913
python
en
code
2
github-code
21
[ { "api_name": "signal.signal", "line_number": 23, "usage_type": "call" }, { "api_name": "signal.SIGTERM", "line_number": 23, "usage_type": "attribute" }, { "api_name": "signal.signal", "line_number": 24, "usage_type": "call" }, { "api_name": "signal.SIGINT", "...
38788022220
import pyautogui # Biblioteca para manipulação de tela import time # Biblioteca para manipulação de tempo pyautogui.PAUSE = 1 # tempo de pausa segundos entre tentativas from turtle import position # Biblioteca para manipulação de posição import pandas as pd import tkinter as tk import tkinter.messagebox a...
Leocrs/Trabalhos
bot_formulario_cadastro_de_usuarios.py
bot_formulario_cadastro_de_usuarios.py
py
3,347
python
pt
code
0
github-code
21
[ { "api_name": "pyautogui.PAUSE", "line_number": 3, "usage_type": "attribute" }, { "api_name": "pyautogui.write", "line_number": 10, "usage_type": "call" }, { "api_name": "pyautogui.press", "line_number": 11, "usage_type": "call" }, { "api_name": "pyautogui.press",...
43039917097
import itertools INF = 10**9 def main(): # N <= 10なので、N!ってそんなに大きくない n = int(input()) A = [list(map(int, input().split())) for _ in range(n)] m = int(input()) ng_list = [set() for _ in range(n+1)] for _ in range(m): x, y = map(int, input().split()) x -= 1 y -= 1 ...
batamorphism/coding
Python/AtCoder/old/typical90_af_1114.py
typical90_af_1114.py
py
1,022
python
en
code
0
github-code
21
[ { "api_name": "itertools.permutations", "line_number": 19, "usage_type": "call" } ]
43726792279
''' @package msmscmp.py compoundspectradialog.py was writen by Giuseppe Marco Randazzo <gmrandazzo@gmail.com> and is distributed under LGPL version 3 Geneve August 2017 ''' from PyQt5 import * from PyQt5 import * from gui_msmscomparissondialog import Ui_MSMSComparissonDialog from matplotlib.backends.backend_qt5agg ...
gmrandazzo/MsMsSpectralAnalysis
gui/msmscomparissondialog.py
msmscomparissondialog.py
py
4,465
python
en
code
0
github-code
21
[ { "api_name": "os.path.abspath", "line_number": 23, "usage_type": "call" }, { "api_name": "os.path", "line_number": 23, "usage_type": "attribute" }, { "api_name": "os.path.join", "line_number": 23, "usage_type": "call" }, { "api_name": "os.path.dirname", "line...
18500900414
#串行更新原则+双层模型1 import random import os import numpy as np import matplotlib import matplotlib.pyplot as plt import math import itertools as it from matplotlib.colors import ListedColormap, BoundaryNorm from matplotlib import animation import moviepy.editor as mp import argparse import pandas as pd from matplotlib impor...
fangshuyi/Pedestrian-route-choice
双层模型1/peds_choice1.py
peds_choice1.py
py
27,658
python
en
code
0
github-code
21
[ { "api_name": "matplotlib.use", "line_number": 20, "usage_type": "call" }, { "api_name": "matplotlib.rcParams", "line_number": 21, "usage_type": "attribute" }, { "api_name": "itertools.chain", "line_number": 79, "usage_type": "call" }, { "api_name": "itertools.pro...
17500785316
import pandas as pd import matplotlib.pyplot as plt import seaborn as sns import numpy as np from sklearn import model_selection from tensorflow.keras.models import Sequential from tensorflow.keras.layers import Flatten, Conv1D from tensorflow.keras.layers import Dense, Activation, Dropout from tensorflow.keras.layers ...
Epkkc/II-Lab
Lab4.py
Lab4.py
py
12,285
python
ru
code
0
github-code
21
[ { "api_name": "numpy.random.randint", "line_number": 25, "usage_type": "call" }, { "api_name": "numpy.random", "line_number": 25, "usage_type": "attribute" }, { "api_name": "numpy.arange", "line_number": 29, "usage_type": "call" }, { "api_name": "numpy.zeros", ...
39109832384
from __future__ import annotations import tiledb import logging import logging.config import pandas as pd import numpy as np from adit.config import Config import adit.constants as const from adit.utils import * __all__ = ['TileDBController'] class TileDBController: _INSTANCE = None META_BUCKET = "s3://ad...
trinhtrannp/adit
adit/controllers/tiledb_controller.py
tiledb_controller.py
py
10,218
python
en
code
0
github-code
21
[ { "api_name": "logging.getLogger", "line_number": 34, "usage_type": "call" }, { "api_name": "adit.config.Config.instance", "line_number": 35, "usage_type": "call" }, { "api_name": "adit.config.Config", "line_number": 35, "usage_type": "name" }, { "api_name": "tile...
37713305349
from django.urls import path from . import views urlpatterns = [ path("", views.index, name="index"), path("register", views.register, name="register"), path("login", views.login, name="login"), path("logout", views.logout, name="logout"), path("multiple-datasources", views.data_sources, name="data...
siamtbhuiyan/airstate
air/urls.py
urls.py
py
846
python
en
code
0
github-code
21
[ { "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", ...
34349253223
import numpy as np from flask import Flask from flask import request from flask import jsonify from predict import predict from flask_cors import CORS app = Flask(__name__) CORS(app) @app.route("/", methods=['GET']) def welcome(): return jsonify({ 'result': "Welcome to Them dau cho tieng Viet khong da...
quocthoaitran/themdautiengviet-api
client.py
client.py
py
627
python
en
code
0
github-code
21
[ { "api_name": "flask.Flask", "line_number": 8, "usage_type": "call" }, { "api_name": "flask_cors.CORS", "line_number": 9, "usage_type": "call" }, { "api_name": "flask.jsonify", "line_number": 13, "usage_type": "call" }, { "api_name": "flask.request.get_json", ...
1147586671
# https://school.programmers.co.kr/learn/courses/30/lessons/81302 ''' 거리두기 지키면 1, 한명이라도 안지키면 0 ''' from collections import deque def bfs(place): #check start = [] #p가 있는 위치 for i in range(5): for j in range(5): if place[i][j] == 'P': #응시자가 안은 자리 start.append([i, j]) ...
julia0926/TIL_Algo
Study/KAKAO/Level2/2019_인턴십_거리두기확인하기_2.py
2019_인턴십_거리두기확인하기_2.py
py
1,650
python
en
code
0
github-code
21
[ { "api_name": "collections.deque", "line_number": 20, "usage_type": "call" } ]
30832694228
import numpy as np import statistics as stats from itertools import repeat class Tree(): """ A tree structure with multiple branches at eah node. The default values correspond to the root node. Member Variables ----------------------------- value (float or int) - the data value if a lea...
NicolasHammer/decision-tree-exhibition
from_scratch/decision_tree.py
decision_tree.py
py
9,414
python
en
code
0
github-code
21
[ { "api_name": "numpy.ndarray", "line_number": 38, "usage_type": "attribute" }, { "api_name": "numpy.ndarray", "line_number": 46, "usage_type": "attribute" }, { "api_name": "numpy.ndarray", "line_number": 61, "usage_type": "attribute" }, { "api_name": "numpy.sum", ...
31464524118
#!/usr/bin/python3 """System energy modelling and battery lifetime estimation tool. This is a custom system (and subsystem) energy consumption modelling tool. It takes as an input a YAML file specifying what components and/or subsystems are to be included, as well as what power source is used. Based on that informat...
pipebots/energy_consumption_modelling
scenario_runner.py
scenario_runner.py
py
23,209
python
en
code
0
github-code
21
[ { "api_name": "pint.UnitRegistry", "line_number": 45, "usage_type": "call" }, { "api_name": "yaml.safe_load", "line_number": 74, "usage_type": "call" }, { "api_name": "yaml.YAMLError", "line_number": 79, "usage_type": "attribute" }, { "api_name": "pint.UndefinedUn...
28193677973
#!/usr/bin/env python # encoding: utf-8 ''' @author: Brian @file: ResearchDirectionsByPyEcharts.py @time: 2020/6/27 15:38 @desc: 对每个城市的高校开设的研究方向进行处理 ''' from selenium import webdriver from selenium.webdriver.chrome.options import Options from selenium.webdriver.support.ui import Select from pyecharts.charts import Lin...
BrainLyh/PSCrawler
ResearchDirectionsByPyEcharts.py
ResearchDirectionsByPyEcharts.py
py
15,003
python
zh
code
1
github-code
21
[ { "api_name": "selenium.webdriver.chrome.options.Options", "line_number": 28, "usage_type": "call" }, { "api_name": "selenium.webdriver.Chrome", "line_number": 31, "usage_type": "call" }, { "api_name": "selenium.webdriver", "line_number": 31, "usage_type": "name" }, {...
38594277656
import mpmath import gaussian_quadrature as gq def gauss_legendre_quadrature_exact(M): u = [] c = [] #https://en.wikipedia.org/wiki/Gaussian_quadrature if M == 1: u = [mpmath.mpf(0)] c = [mpmath.mpf(2)] elif M == 2: a = mpmath.fdiv(1, mpmath.sqrt(3)) u = [-a, a] ...
ymkoyama/fcmf
test_gaussian_quadrature.py
test_gaussian_quadrature.py
py
2,886
python
en
code
0
github-code
21
[ { "api_name": "mpmath.mpf", "line_number": 10, "usage_type": "call" }, { "api_name": "mpmath.mpf", "line_number": 11, "usage_type": "call" }, { "api_name": "mpmath.fdiv", "line_number": 13, "usage_type": "call" }, { "api_name": "mpmath.sqrt", "line_number": 13...
25866814348
# -*- coding: utf-8 -*- import scrapy from scrapy import Request import scrapy from scrapy import Request import joblib from extract_historique import dict_of_version dict_of_version=joblib.load("fifa20\\spiders\\date.pkl") class TeamsSpider(scrapy.Spider): name = 'equipes' allowed_domains = ['sofifa.com'] ...
tripaak/extract_retraitement_carriere
fifa20/spiders/equipes.py
equipes.py
py
2,653
python
en
code
0
github-code
21
[ { "api_name": "extract_historique.dict_of_version", "line_number": 8, "usage_type": "name" }, { "api_name": "joblib.load", "line_number": 8, "usage_type": "call" }, { "api_name": "scrapy.Spider", "line_number": 9, "usage_type": "attribute" }, { "api_name": "extrac...
32421714890
import os import io import requests import json from datetime import datetime from PIL import Image, UnidentifiedImageError from io import BytesIO from flask import Flask, render_template, request, send_file from werkzeug.exceptions import BadRequestKeyError from card_generation_functions import create_card, create_pdf...
ganttArt/PWC_Animal_Card_Automation
main.py
main.py
py
3,630
python
en
code
1
github-code
21
[ { "api_name": "flask.Flask", "line_number": 13, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 22, "usage_type": "call" }, { "api_name": "json.loads", "line_number": 23, "usage_type": "call" }, { "api_name": "flask.request.method", "line_...
26809065036
from kwola.config.config import Configuration from kwola.components.agents.DeepLearningAgent import DeepLearningAgent import torch import torch.distributed import traceback def runNeuralNetworkTestOnGPU(gpu, config, verbose=True): try: branchSize = 50 agent = DeepLearningAgent(config=config, whic...
genixpro/kwola-enterprise
kwolaenterprise/bin/optimize_model.py
optimize_model.py
py
2,687
python
en
code
0
github-code
21
[ { "api_name": "kwola.components.agents.DeepLearningAgent.DeepLearningAgent", "line_number": 12, "usage_type": "call" }, { "api_name": "traceback.print_exc", "line_number": 29, "usage_type": "call" }, { "api_name": "kwola.config.config.Configuration.createNewLocalKwolaConfigDir", ...
34699375723
""" Python module to read in VDIF data. This module defines the following classes for storing the VIDF data found in a file: Frame object that contains all data associated with a particular DRX frame. The primary constituents of each frame are: * FrameHeader - the VDIF frame header object and * FramePa...
lwa-project/lsl
lsl/reader/vdif.py
vdif.py
py
19,695
python
en
code
7
github-code
21
[ { "api_name": "sys.version_info", "line_number": 32, "usage_type": "attribute" }, { "api_name": "lsl.misc.telemetry.track_module", "line_number": 48, "usage_type": "call" }, { "api_name": "lsl.misc.telemetry", "line_number": 48, "usage_type": "name" }, { "api_name...
13681692784
import playsound from gtts import gTTS import os location = os.path.dirname(os.path.abspath(__file__)) def speakLine(input_string): tts = gTTS(input_string, lang='fi') audio_file = location + "/s2t-audio.mp3" tts.save(audio_file) playsound.playsound(audio_file) os.remove(audio_file)
vkuosman/SIMA-IPA-Interface
t2s_tester.py
t2s_tester.py
py
305
python
en
code
0
github-code
21
[ { "api_name": "os.path.dirname", "line_number": 5, "usage_type": "call" }, { "api_name": "os.path", "line_number": 5, "usage_type": "attribute" }, { "api_name": "os.path.abspath", "line_number": 5, "usage_type": "call" }, { "api_name": "gtts.gTTS", "line_numbe...
70593675252
""" For panda (two-finger) gripper: pushing, pushing-left, pushing-up, pulling, pulling-left, pulling-up 50% all parts closed, 50% middle (for each part, 50% prob. closed, 50% prob. middle) Simulate until static before starting REPLAY """ import os import sys import shutil import numpy as np f...
daerduoCarey/where2act
code/replay_data.py
replay_data.py
py
6,672
python
en
code
83
github-code
21
[ { "api_name": "sys.argv", "line_number": 25, "usage_type": "attribute" }, { "api_name": "json.load", "line_number": 28, "usage_type": "call" }, { "api_name": "env.Env", "line_number": 33, "usage_type": "call" }, { "api_name": "camera.Camera", "line_number": 38...
27712391065
import json import requests # consumindo o api rest do via cep cep = int(input("Digite um cep: ").strip()) url = 'https://viacep.com.br/ws/'+ str(cep) +'/json/' # url/uri do json (web services) payload = {} headers = {} resultado = '' requisicao = requests.request('GET',url,data = payload, headers = headers) print(re...
Gnsoares22/Python-Dojo-Gabriel
cep_api.py
cep_api.py
py
417
python
en
code
1
github-code
21
[ { "api_name": "requests.request", "line_number": 11, "usage_type": "call" }, { "api_name": "json.loads", "line_number": 13, "usage_type": "call" } ]
20661010851
## Builtin import pathlib ## Builtin: gui import tkinter as tk, tkinter.ttk as ttk, tkinter.filedialog as tkfiledialog, tkinter.messagebox as tkmessagebox ## Custom Module import alcustoms from alcustoms import filemodules from alcustoms.tkinter import smarttkinter, advancedtkinter STYLE = { 'Complete.TLabel':{ ...
AdamantLife/alcustoms
alcustoms/Programs/FileNameRemover.py
FileNameRemover.py
py
8,573
python
en
code
0
github-code
21
[ { "api_name": "alcustoms.tkinter.smarttkinter.GMMixin", "line_number": 19, "usage_type": "attribute" }, { "api_name": "alcustoms.tkinter.smarttkinter", "line_number": 19, "usage_type": "name" }, { "api_name": "tkinter.ttk.Frame", "line_number": 19, "usage_type": "attribut...
33062534933
from collections import Counter from pprint import pprint print("Задание №1") file_name = "recipes.txt" def catalog_reader(file_name): with open(file_name, encoding='utf-8') as file_obj: cook_book = {} dish = {} s = [] keys = ['ingredient_name', 'quantity', 'measure'] for li...
anfilippov7/Homework-7
Home work #7.1-2.py
Home work #7.1-2.py
py
2,784
python
en
code
0
github-code
21
[ { "api_name": "pprint.pprint", "line_number": 32, "usage_type": "call" }, { "api_name": "collections.Counter", "line_number": 63, "usage_type": "call" }, { "api_name": "pprint.pprint", "line_number": 78, "usage_type": "call" } ]
21593674111
import pathlib import sys import pygame from game import * from network_utils import Client, Server def redirect(return_value): if return_value is None: single_game() exit(0) if isinstance(return_value, Client): client_game(return_value) exit(0) if isinstance(return_value...
AshFungor/better-with-your-friend
main.py
main.py
py
1,004
python
en
code
0
github-code
21
[ { "api_name": "network_utils.Client", "line_number": 14, "usage_type": "argument" }, { "api_name": "network_utils.Server", "line_number": 17, "usage_type": "argument" }, { "api_name": "pathlib.Path", "line_number": 24, "usage_type": "call" }, { "api_name": "sys.pa...
17093021583
from decision_tree_from_scratch import DecisionTreeClassifier from decoding_sklearn_functions.helper import accuracy_score from sklearn.datasets import load_iris from sklearn.model_selection import train_test_split import numpy as np from scipy import stats dataset = load_iris() class RandomForestClassifier1: def ...
johnjagu25/ML-Algo-from-scratch
randomforest_from_scratch.py
randomforest_from_scratch.py
py
1,865
python
en
code
0
github-code
21
[ { "api_name": "sklearn.datasets.load_iris", "line_number": 7, "usage_type": "call" }, { "api_name": "numpy.random.randint", "line_number": 16, "usage_type": "call" }, { "api_name": "numpy.random", "line_number": 16, "usage_type": "attribute" }, { "api_name": "deci...
86572321077
from flask import Flask, jsonify, request from transformers import pipeline from youtube_transcript_api import YouTubeTranscriptApi from os import environ summarizer= pipeline('summarization') app = Flask(__name__) def getTranscript(video_id): summarized_text = "Invalid URL" try: transcript = Yo...
AIBrainAISchool/Videosummary
Videosummary/main.py
main.py
py
1,369
python
en
code
0
github-code
21
[ { "api_name": "transformers.pipeline", "line_number": 7, "usage_type": "call" }, { "api_name": "flask.Flask", "line_number": 8, "usage_type": "call" }, { "api_name": "youtube_transcript_api.YouTubeTranscriptApi.get_transcript", "line_number": 14, "usage_type": "call" },...
43876426391
# coding: utf-8 import torch from torch.utils.data import DataLoader import torchvision.transforms as transforms import numpy as np import os from torch.autograd import Variable import torch.nn as nn import torch.nn.functional as F import torch.optim as optim import sys sys.path.append("..") from utils.utils import My...
flyingbird93/Aesthetic-Aessessment
main.py
main.py
py
11,150
python
en
code
1
github-code
21
[ { "api_name": "sys.path.append", "line_number": 13, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 13, "usage_type": "attribute" }, { "api_name": "data.dataset.DogCat", "line_number": 38, "usage_type": "call" }, { "api_name": "torch.utils.data.Da...
2999603347
import torch from torch.autograd import Variable as V import torch.nn.functional as F # Average meter counter class AverageMeter(object): """Computes and stores the average and current value""" def __init__(self): self.reset() def reset(self): self.val = 0 self.avg = 0 sel...
KeremTurgutlu/deeplearning
datasciencebowl2018/model/classifier.py
classifier.py
py
6,020
python
en
code
160
github-code
21
[ { "api_name": "torch.cuda.is_available", "line_number": 35, "usage_type": "call" }, { "api_name": "torch.cuda", "line_number": 35, "usage_type": "attribute" }, { "api_name": "torch.autograd.Variable", "line_number": 53, "usage_type": "call" }, { "api_name": "torch...
24928389103
from pathlib import PosixPath from sqlite3.dbapi2 import Cursor, connect from flask import Flask,render_template,request,redirect,session,url_for import sqlite3 from PIL import Image from datetime import date from recommend import recommendUser from geopy.geocoders import Nominatim from TravelSalesman import fetchTrave...
kabs31/hodomate
main.py
main.py
py
23,002
python
en
code
0
github-code
21
[ { "api_name": "geopy.geocoders.Nominatim", "line_number": 10, "usage_type": "call" }, { "api_name": "flask.Flask", "line_number": 14, "usage_type": "call" }, { "api_name": "sqlite3.connect", "line_number": 18, "usage_type": "call" }, { "api_name": "flask.session",...
38322246114
import numpy as np from dataset import get_dataset, get_handler from network import get_net from torchvision import transforms import torch from train import Strategy class RandomSampling(Strategy): def __init__(self, X, Y, idxs_lb, net, handler, args): super(RandomSampling, self).__init__(X, Y, idxs_lb, n...
Kartos102/artificial-intelligence
goverment_trace/main.py
main.py
py
2,313
python
en
code
0
github-code
21
[ { "api_name": "train.Strategy", "line_number": 8, "usage_type": "name" }, { "api_name": "numpy.random.choice", "line_number": 12, "usage_type": "call" }, { "api_name": "numpy.random", "line_number": 12, "usage_type": "attribute" }, { "api_name": "numpy.where", ...
1325548919
import re from collections import OrderedDict from typing import Union, Pattern, Iterator from nltk import sent_tokenize, word_tokenize from speech.tps.tps.utils import split_to_tokens from speech.tps.tps.modules.ssml.elements import Pause from speech.tps.tps.symbols import separator, shields char_map = OrderedDict...
wladradchenko/wunjo.wladradchenko.ru
portable/src/speech/tps/tps/modules/processor.py
processor.py
py
9,728
python
en
code
404
github-code
21
[ { "api_name": "collections.OrderedDict", "line_number": 12, "usage_type": "call" }, { "api_name": "speech.tps.tps.modules.ssml.elements.Pause.eos", "line_number": 13, "usage_type": "attribute" }, { "api_name": "speech.tps.tps.modules.ssml.elements.Pause", "line_number": 13, ...
30211234376
##These are my personal machine learning import statements, they cover most of what I regularly need for CV import numpy as np import pandas as pd import matplotlib.pyplot as plt import torch import torchvision import torchvision.transforms as transforms import torch.utils.data.dataloader as DataLoader import torch.uti...
brian-loos/Intership-Projects
DCGAN/main.py
main.py
py
8,426
python
en
code
0
github-code
21
[ { "api_name": "torch.device", "line_number": 24, "usage_type": "call" }, { "api_name": "torch.cuda.is_available", "line_number": 24, "usage_type": "call" }, { "api_name": "torch.cuda", "line_number": 24, "usage_type": "attribute" }, { "api_name": "torchvision.tran...
15933825261
import collections import datetime import warnings from bson.code import Code from bson.objectid import ObjectId from bson.py3compat import (_unicode, integer_types, string_type) from bson.raw_bson import RawBSONDocument from bson.codec_options import CodecOption...
Mockingbird01001/NLG-code-generator-LSTM
work/data/data_model/batch_1/167.py.transformed.py.transformed.py
167.py.transformed.py.transformed.py
py
48,657
python
en
code
0
github-code
21
[ { "api_name": "bson.son.SON", "line_number": 34, "usage_type": "name" }, { "api_name": "collections.OrderedDict", "line_number": 34, "usage_type": "name" }, { "api_name": "bson.son.SON", "line_number": 36, "usage_type": "name" }, { "api_name": "pymongo.common.Base...
30126184641
# Decrypts a file using AES GCM (ASE128, 96-bit nonce for NIST SP 800-38D compatibility). # The key will be prompted for if this script is executed directly. The encrypted file # will be removed. # # Usage: python decrypt_file.py <file_name> import os import sys import json from base64 import b64decode from Cryptodome...
tjdistler/dev
file_utils/crypto/decrypt_file.py
decrypt_file.py
py
2,634
python
en
code
0
github-code
21
[ { "api_name": "json.loads", "line_number": 45, "usage_type": "call" }, { "api_name": "base64.b64decode", "line_number": 56, "usage_type": "call" }, { "api_name": "base64.b64decode", "line_number": 57, "usage_type": "call" }, { "api_name": "base64.b64decode", "...
27941259130
#!/usr/bin/env python # -*- coding: utf-8 -* """ properties module """ __author__ = 'Janus Juul Eriksen, Technical University of Denmark, DK' __maintainer__ = 'Janus Juul Eriksen' __email__ = 'janus@kemi.dtu.dk' __status__ = 'Development' import numpy as np from itertools import starmap from pyscf import gto, scf, d...
januseriksen/decodense
decodense/properties.py
properties.py
py
24,914
python
en
code
7
github-code
21
[ { "api_name": "pyscf.gto.Mole", "line_number": 27, "usage_type": "attribute" }, { "api_name": "pyscf.gto", "line_number": 27, "usage_type": "name" }, { "api_name": "typing.Union", "line_number": 27, "usage_type": "name" }, { "api_name": "pyscf.scf.hf", "line_n...
19963913404
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('ships', '0002_auto_20150302_0915'), ] operations = [ migrations.CreateModel( name='Module', fields=[...
ross128/stg
ships/migrations/0003_ship_modules.py
0003_ship_modules.py
py
1,287
python
en
code
0
github-code
21
[ { "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.CreateModel", "line_number": 14, "usage_type": "call" }, ...
40875276696
import sys from collections import deque INT_MAX = sys.maxsize # input and initial condition n, h, m = map(int, input().split()) grid = [ list(map(int, input().split())) for _ in range(n) ] visited = [ [0 for _ in range(n)] for _ in range(n) ] # minimal distance to arrive step = [ [0 for _ in r...
superchd/python
bfs/rain.py
rain.py
py
1,742
python
en
code
0
github-code
21
[ { "api_name": "sys.maxsize", "line_number": 4, "usage_type": "attribute" }, { "api_name": "collections.deque", "line_number": 36, "usage_type": "call" } ]
3579959913
from urllib.error import URLError from urllib.request import urlopen, Request import websockets import asyncio import sys class MissingArguments(Exception): def __init__(self): super().__init__("There are missing arguments. Please use the format:\n cliweb.py [ws/http] [url]") class UnknownURLScheme(Exce...
iiestIT/CLIWeb
CLIWeb/cliweb.py
cliweb.py
py
1,889
python
en
code
0
github-code
21
[ { "api_name": "urllib.request.Request", "line_number": 26, "usage_type": "call" }, { "api_name": "urllib.request.urlopen", "line_number": 28, "usage_type": "call" }, { "api_name": "urllib.error.URLError", "line_number": 29, "usage_type": "name" }, { "api_name": "w...
9667037347
""" Get alternative splicing events. For each splice-site (SD or SA), all paired splice sites are collected. The most abundant is classified as typical, whereas the remaining pairs are either 'short' or 'long' relative to the canonical. usage: python get_alternative_splicing.py -f *.spliced.bed > alternative_splicin...
ncrnalab/pyutils
get_alternative_splicing.py
get_alternative_splicing.py
py
3,074
python
en
code
5
github-code
21
[ { "api_name": "collections.defaultdict", "line_number": 26, "usage_type": "call" }, { "api_name": "collections.defaultdict", "line_number": 27, "usage_type": "call" }, { "api_name": "collections.defaultdict", "line_number": 29, "usage_type": "call" }, { "api_name"...
16322161813
import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns import astropy.units as u models = ["log_uniform", "qcflag_4", "alpha_0.25", "alpha_5"] model_names = ["fiducial", r"q3", r"$\alpha25$", r"$\alpha5$"] colors = sns.color_palette("mako", n_colors=len(models)) Tobs = 4 * u.yr ...
rodluger/Z-dependent-DWDs
src/figures/model_comp.py
model_comp.py
py
3,740
python
en
code
0
github-code
21
[ { "api_name": "seaborn.color_palette", "line_number": 9, "usage_type": "call" }, { "api_name": "astropy.units.yr", "line_number": 11, "usage_type": "attribute" }, { "api_name": "astropy.units", "line_number": 11, "usage_type": "name" }, { "api_name": "matplotlib.p...
6402894500
import json from argparse import ArgumentParser from typing import Any, Dict from loguru import logger from thesaurus.scraper import UNBISThesaurusScraper def main(args: Dict[str, Any]) -> None: """ Main function Parameters ---------- `args` : `Dict[str, Any]` Dictionary of CLI argument...
ClementSicard/un-unbis-thesaurus-scraper
main.py
main.py
py
1,263
python
en
code
0
github-code
21
[ { "api_name": "typing.Dict", "line_number": 10, "usage_type": "name" }, { "api_name": "typing.Any", "line_number": 10, "usage_type": "name" }, { "api_name": "thesaurus.scraper.UNBISThesaurusScraper", "line_number": 19, "usage_type": "call" }, { "api_name": "argpar...
28397426644
#!/usr/bin/env python3 """ File: Destination.py """ from typing import Optional from datetime import datetime try: from common import BASE_URL, __type_error__, convert_to_utc, requests_get import common from Exceptions import DestinationError, ParameterError, InvalidServerResponse except (ModuleNotFound...
pnearing/PyPapertrail
src/PyPapertrail/Destination.py
Destination.py
py
9,272
python
en
code
0
github-code
21
[ { "api_name": "PyPapertrail.common.__version_check__", "line_number": 17, "usage_type": "call" }, { "api_name": "PyPapertrail.common", "line_number": 17, "usage_type": "name" }, { "api_name": "typing_extensions.Self", "line_number": 27, "usage_type": "name" }, { "...
1870050821
from unittest.test.test_result import __init__ from django.test import TestCase from curriculum.models import * import datetime # Create your tests here. class IdentityTestCase(TestCase): def setUp(self): # skill = Skill.objects.create( # sector="Informatica", # skill="Jenkins", ...
danielRamon/CV_Generator
curriculum/tests.py
tests.py
py
1,216
python
en
code
0
github-code
21
[ { "api_name": "django.test.TestCase", "line_number": 9, "usage_type": "name" }, { "api_name": "datetime.date.today", "line_number": 24, "usage_type": "call" }, { "api_name": "datetime.date", "line_number": 24, "usage_type": "attribute" }, { "api_name": "datetime.d...
74943573492
from time import time, sleep from multiprocessing import Process def download_something(file_name): if file_name == 'd1': down_time = 3 elif file_name == 'd2': down_time = 5 else: down_time = 10 sleep(down_time) print(f'下载{file_name},耗时:{down_time}') def downlo...
hanxu11580/pyutils
Multiprocess/test_1.py
test_1.py
py
990
python
en
code
0
github-code
21
[ { "api_name": "time.sleep", "line_number": 12, "usage_type": "call" }, { "api_name": "multiprocessing.Process", "line_number": 26, "usage_type": "call" }, { "api_name": "multiprocessing.Process", "line_number": 28, "usage_type": "call" }, { "api_name": "time.time"...
10869819563
import pandas as pd import subprocess import re import argparse from collections import defaultdict config = { (1, 26): "FR1", (27, 38): "CDR1", (39, 55): "FR2", (56, 65): "CDR2", (66, 104): "FR3", (105, 117): "CDR3", (118, 129): "FR4", } def extract_sequences(input_file): input_excel...
mwangGitHub/CDR_annotation
optimizeScript/June9_results/dump/script.py
script.py
py
2,852
python
en
code
0
github-code
21
[ { "api_name": "pandas.read_excel", "line_number": 19, "usage_type": "call" }, { "api_name": "subprocess.run", "line_number": 34, "usage_type": "call" }, { "api_name": "collections.defaultdict", "line_number": 38, "usage_type": "call" }, { "api_name": "collections....
6206158571
from collections import defaultdict import csv import nltk def get_stopwords(stopwordFile): with open(stopwordFile, 'r') as f: words = f.readlines() stopwords = [word.replace('\n', '') for word in words] return stopwords def read_reviews(reviewsFile): with open(reviewsFile, 'r') as f: ...
rlee21/snippets
python/nltk_adjectives.py
nltk_adjectives.py
py
1,527
python
en
code
0
github-code
21
[ { "api_name": "nltk.word_tokenize", "line_number": 24, "usage_type": "call" }, { "api_name": "nltk.pos_tag", "line_number": 25, "usage_type": "call" }, { "api_name": "collections.defaultdict", "line_number": 28, "usage_type": "call" }, { "api_name": "csv.writer", ...
7539677655
import os, sys, bottle, bottle_session import _thread from bottle import hook, route, request, response, run, get, static_file lib_path = os.path.abspath('../QtWebApp') sys.path.append(lib_path) from WebForm import * class EnableCors(object): name = 'enable_cors' api = 2 def apply(self, fn, context): ...
niconico49/Python
QtWebApp/WebService.py
WebService.py
py
3,496
python
en
code
0
github-code
21
[ { "api_name": "os.path.abspath", "line_number": 5, "usage_type": "call" }, { "api_name": "os.path", "line_number": 5, "usage_type": "attribute" }, { "api_name": "sys.path.append", "line_number": 6, "usage_type": "call" }, { "api_name": "sys.path", "line_number...
5790271036
#! /usr/bin/env python3 # -*- coding: utf-8 -*- # File : inspect-domain-more.py # Author : Jiayuan Mao # Email : maojiayuan@gmail.com # Date : 04/05/2023 # # This file is part of Jacinle. # Distributed under terms of the MIT license. import csv import traceback from dataclasses import dataclass, field import jac...
joyhsu0504/LEFT
scripts/inspect-domain-more.py
inspect-domain-more.py
py
8,420
python
en
code
15
github-code
21
[ { "api_name": "jacinle.JacArgumentParser", "line_number": 22, "usage_type": "call" }, { "api_name": "dataclasses.field", "line_number": 32, "usage_type": "call" }, { "api_name": "dataclasses.dataclass", "line_number": 28, "usage_type": "name" }, { "api_name": "lef...
23149198983
from faker import Faker from app.models import BotUser, Category, Comment, Order, OrderFile, OrderHistory, Subcategory from googletrans import Translator def translate_en_ru(text: str) -> str: translator = Translator() return translator.translate(text, dest='ru').text def translate_en_uz(text: str) -> str: ...
komronbek-tufliyev/xullasdee
app/fake_data_generator.py
fake_data_generator.py
py
4,275
python
en
code
1
github-code
21
[ { "api_name": "googletrans.Translator", "line_number": 7, "usage_type": "call" }, { "api_name": "googletrans.Translator", "line_number": 11, "usage_type": "call" }, { "api_name": "googletrans.Translator", "line_number": 15, "usage_type": "call" }, { "api_name": "g...
74363579252
from mashumaro.mixins.json import DataClassJSONMixin from dataclasses import dataclass from flytekit.types.file import FlyteFile from flytekit.types.directory import FlyteDirectory from flytekit import task from config import base_image, logger from pathlib import Path from typing import List, Union, Any @dataclass c...
unionai-oss/variant-discovery
src/tasks/sample_types.py
sample_types.py
py
4,959
python
en
code
1
github-code
21
[ { "api_name": "mashumaro.mixins.json.DataClassJSONMixin", "line_number": 12, "usage_type": "name" }, { "api_name": "flytekit.types.file.FlyteFile", "line_number": 26, "usage_type": "name" }, { "api_name": "flytekit.types.file.FlyteFile", "line_number": 27, "usage_type": "...
26808492061
import logging from ovs.dal.hybrids.albabackend import AlbaBackend from ovs.dal.hybrids.storagerouter import StorageRouter from ovs.dal.lists.albabackendlist import AlbaBackendList from ovs.dal.lists.storagedriverlist import StorageDriverList from ovs.dal.lists.vpoollist import VPoolList from ovs.extensions.generic.con...
openvstorage/framework-alba-plugin
ovs/lib/albastatsmonkey.py
albastatsmonkey.py
py
18,288
python
en
code
2
github-code
21
[ { "api_name": "ovs_extensions.monitoring.statsmonkey.StatsMonkey", "line_number": 16, "usage_type": "name" }, { "api_name": "logging.getLogger", "line_number": 27, "usage_type": "call" }, { "api_name": "ovs.dal.hybrids.albabackend.AlbaBackend", "line_number": 28, "usage_t...
19533166394
import pyaudio import socket import numpy as np import pickle import time import keyboard class AudioClient: def __init__(self, port, ip, chunk=1024, fs=16000, p=pyaudio.PyAudio): self.port = port self.ip = ip self.client_socket = None self.chunk = 1024 self.fs = 16000 ...
bcw4045/socket_programming_audio
client.py
client.py
py
5,529
python
en
code
0
github-code
21
[ { "api_name": "pyaudio.PyAudio", "line_number": 10, "usage_type": "attribute" }, { "api_name": "pyaudio.PyAudio", "line_number": 17, "usage_type": "call" }, { "api_name": "socket.socket", "line_number": 27, "usage_type": "call" }, { "api_name": "socket.AF_INET", ...
27168134133
import numpy as np #import seaborn as sns import matplotlib import torch from importlib import reload from PIL import Image import pandas as pd import os import sys # use relative imports project_root_dir = '../../' sys.path.append(os.path.join(project_root_dir, 'code')) from make_subset_batches import subset_set, su...
estherrolf/representation-matters
cifar4/scripts/process_cifar4_data.py
process_cifar4_data.py
py
3,333
python
en
code
4
github-code
21
[ { "api_name": "sys.path.append", "line_number": 14, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 14, "usage_type": "attribute" }, { "api_name": "os.path.join", "line_number": 14, "usage_type": "call" }, { "api_name": "os.path", "line_number...
30302818110
# Harris Corner detector # Step 1: which windows has high intesity variation at direction X and Y # Step 2: for each window found, compute a score R # Step 3: apply threshold to each window import cv2 import numpy as np img = cv2.imread('chessboard.png') cv2.imshow('img', img) gray = cv2.cvtColor(img, cv2...
happymondaynkanta/Object-Tracking-and-Detection-Using-OpenCV
Object Detection in Motion/100_harris_corner_detector.py
100_harris_corner_detector.py
py
781
python
en
code
4
github-code
21
[ { "api_name": "cv2.imread", "line_number": 9, "usage_type": "call" }, { "api_name": "cv2.imshow", "line_number": 10, "usage_type": "call" }, { "api_name": "cv2.cvtColor", "line_number": 12, "usage_type": "call" }, { "api_name": "cv2.COLOR_BGR2GRAY", "line_numb...
73547381172
from pymongo import MongoClient from consumers.Consumer import Consumer import time class MongoAgent(Consumer): def __init__(self, sleep_time=0.2): self.client = MongoClient("localhost", 27017) self.db = None self.events = None self.sleep_time = sleep_time def startDB(self, da...
LynosSorien/SpyderPyCollectorEngine
consumers/mongodb/MongoAgent.py
MongoAgent.py
py
1,047
python
en
code
0
github-code
21
[ { "api_name": "consumers.Consumer.Consumer", "line_number": 6, "usage_type": "name" }, { "api_name": "pymongo.MongoClient", "line_number": 8, "usage_type": "call" }, { "api_name": "time.sleep", "line_number": 20, "usage_type": "call" }, { "api_name": "time.sleep",...
33663696137
""" Django settings for nwod_characters project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR,...
AncientSwordRage/nWoD-db
nwod_characters/settings.py
settings.py
py
2,849
python
en
code
1
github-code
21
[ { "api_name": "os.path.dirname", "line_number": 21, "usage_type": "call" }, { "api_name": "os.path", "line_number": 21, "usage_type": "attribute" }, { "api_name": "os.path.join", "line_number": 23, "usage_type": "call" }, { "api_name": "os.path", "line_number"...
33732169912
"""YAML reporters.""" from __future__ import annotations from typing import Any from project_config.reporters.base import BaseColorReporter, BaseReporter from project_config.serializers import yaml class YamlReporter(BaseReporter): """Black/white reporter in YAML format.""" def generate_errors_report(self...
mondeja/project-config
src/project_config/reporters/yaml.py
yaml.py
py
6,858
python
en
code
0
github-code
21
[ { "api_name": "project_config.reporters.base.BaseReporter", "line_number": 11, "usage_type": "name" }, { "api_name": "project_config.serializers.yaml.dumps", "line_number": 19, "usage_type": "call" }, { "api_name": "project_config.serializers.yaml", "line_number": 19, "us...
74980227893
from django.db import models from django.contrib.auth.models import User from django.contrib.contenttypes.fields import GenericForeignKey from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes.fields import GenericRelation from django.contrib.postgres.fields import ArrayField from...
superkingyj/django_blog_project-OneNaBle
blog_project/blog_app/models.py
models.py
py
2,248
python
en
code
0
github-code
21
[ { "api_name": "django.db.models.Model", "line_number": 9, "usage_type": "attribute" }, { "api_name": "django.db.models", "line_number": 9, "usage_type": "name" }, { "api_name": "django.db.models.CharField", "line_number": 10, "usage_type": "call" }, { "api_name": ...
18066425063
import numpy as np from tensorflow.keras.models import load_model from tensorflow.keras.preprocessing import image import cv2 model = load_model("C:/Users/KEREM/Desktop/Python Projects/Projects/Finger_count/my_model.h5") cap = cv2.VideoCapture(0) cv2.namedWindow('Test') cv2.namedWindow('Smaller Test') w...
KeremAydin98/finger-count
finger_count/evaluate-with-video.py
evaluate-with-video.py
py
1,152
python
en
code
2
github-code
21
[ { "api_name": "tensorflow.keras.models.load_model", "line_number": 7, "usage_type": "call" }, { "api_name": "cv2.VideoCapture", "line_number": 9, "usage_type": "call" }, { "api_name": "cv2.namedWindow", "line_number": 10, "usage_type": "call" }, { "api_name": "cv2...
2772451671
import pkgutil import os import re as regex """ Description:: Initialize the blueprints inside in the root folder and sub folder Requirements:: all directories and sub directories must consist of __init__.py to be considered as a package. :: param app = sanic module files are ignore...
aiscenblue/sanic-framework-starterkit
module/__init__.py
__init__.py
py
2,434
python
en
code
1
github-code
21
[ { "api_name": "os.listdir", "line_number": 41, "usage_type": "call" }, { "api_name": "os.path.isdir", "line_number": 52, "usage_type": "call" }, { "api_name": "os.path", "line_number": 52, "usage_type": "attribute" }, { "api_name": "pkgutil.walk_packages", "li...
74987617012
import numpy as np import scipy.stats as stats import scipy.optimize as optimize import matplotlib.pyplot as plt from signaldetection import SignalDetection class Metropolis: def __init__(self, logTarget, initialState): self.logTarget = logTarget self.current = initialState self.samples = ...
kvarieur/cogs106repo
Metropolis.py
Metropolis.py
py
4,645
python
en
code
2
github-code
21
[ { "api_name": "numpy.log", "line_number": 18, "usage_type": "call" }, { "api_name": "numpy.random.uniform", "line_number": 18, "usage_type": "call" }, { "api_name": "numpy.random", "line_number": 18, "usage_type": "attribute" }, { "api_name": "numpy.random.normal"...
8843066130
#!/usr/bin/python from numpy import * import numpy as np from matplotlib.ticker import ScalarFormatter, FormatStrFormatter import matplotlib.gridspec as gridspec import matplotlib.pyplot as plt from pylab import mpl from dolfin import * def update_length(mesh, u, dt): """ evolve the ice length. """ x0 = mes...
pf4d/ice_profile
ice_profile_mm.py
ice_profile_mm.py
py
11,206
python
en
code
1
github-code
21
[ { "api_name": "pylab.mpl.rcParams", "line_number": 19, "usage_type": "attribute" }, { "api_name": "pylab.mpl", "line_number": 19, "usage_type": "name" }, { "api_name": "pylab.mpl.rcParams", "line_number": 20, "usage_type": "attribute" }, { "api_name": "pylab.mpl",...
27532467811
import numpy as np import tensorflow as tf import cv2 def get_dims_x64(dims, multiple=64): dims = dims + (multiple - 1) floor_value = dims // multiple dims = floor_value * multiple return dims def get_transformation_size(input_size, dims1, dims2): ''' Resize the short side of the input image...
Heracraft/paz
examples/human_pose_2d/backend/preprocess.py
preprocess.py
py
3,098
python
en
code
null
github-code
21
[ { "api_name": "numpy.pi", "line_number": 46, "usage_type": "attribute" }, { "api_name": "numpy.sin", "line_number": 47, "usage_type": "call" }, { "api_name": "numpy.cos", "line_number": 47, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 55...
951388749
''' For foreign key. If you need to create a relationship on a model that has not yet been defined, you can use the name of the model, rather than the model object itself: https://docs.djangoproject.com/en/3.2/ref/models/fields/#django.db.models.ForeignKey ''' from django.contrib.auth.models import AbstractUser from ...
ArthurAllilaire/CS50-Web-programming
commerce/auctions/models.py
models.py
py
3,941
python
en
code
0
github-code
21
[ { "api_name": "django.contrib.auth.models.AbstractUser", "line_number": 16, "usage_type": "name" }, { "api_name": "django.db.models.ManyToManyField", "line_number": 17, "usage_type": "call" }, { "api_name": "django.db.models", "line_number": 17, "usage_type": "name" }, ...
4581051565
#!/usr/bin/env python2 import argparse import pandas as pd import re import sys from tabulate import tabulate def display_test_metrics(test_log_path, output_path=None, table=True, table_format='psql'): """ Display the BLEU-4 and the F-Measure of the ROUGE-4 for the input test log file given by the user, ...
nepiskopos/templates_to_language_evaluation
w2b/display_test_metrics.py
display_test_metrics.py
py
3,910
python
en
code
0
github-code
21
[ { "api_name": "re.findall", "line_number": 43, "usage_type": "call" }, { "api_name": "re.split", "line_number": 44, "usage_type": "call" }, { "api_name": "re.split", "line_number": 46, "usage_type": "call" }, { "api_name": "re.findall", "line_number": 49, ...
42099587152
#%% import cv2 import numpy as np import matplotlib.pyplot as plt import math from scipy.ndimage import interpolation as inter def rotation_resize(img): if np.array(img).shape[0] < np.array(img).shape[1]: img = cv2.rotate(img, cv2.ROTATE_90_CLOCKWISE) return cv2.resize(img,dsize=(400,600),interpo...
swha0105/improve_ocr_project
preprocessing.py
preprocessing.py
py
4,427
python
en
code
1
github-code
21
[ { "api_name": "numpy.array", "line_number": 9, "usage_type": "call" }, { "api_name": "cv2.rotate", "line_number": 10, "usage_type": "call" }, { "api_name": "cv2.ROTATE_90_CLOCKWISE", "line_number": 10, "usage_type": "attribute" }, { "api_name": "cv2.resize", "...
24781953577
import imageio import numpy as np Mod = 256 #-------------Decrypting------------- Enc = imageio.imread('Encrypted.png') #Reading Encrypted Image to Decrypt # Loading the key A = imageio.imread('Key.png') l = A[-1][0] * Mod + A[-1][1] # The length of the original image w = A[-1][2] * Mod + A[-...
KhaledMoataz/Hill-Cipher---Image-Encryption
Decrypt.py
Decrypt.py
py
936
python
en
code
3
github-code
21
[ { "api_name": "imageio.imread", "line_number": 5, "usage_type": "call" }, { "api_name": "imageio.imread", "line_number": 7, "usage_type": "call" }, { "api_name": "numpy.matmul", "line_number": 12, "usage_type": "call" }, { "api_name": "numpy.matmul", "line_num...
10350961603
import json import maya.cmds as cmds import math import pymel jsonData = {} jsonData['GameObjects'] = [] selected_obj = cmds.ls(sl=True, type='transform') for x in range(0, len(selected_obj)): node = pymel.core.ls(sl=1)[x] translation = cmds.xform(selected_obj[x], query=True, translation=True, worldSpace=True) ...
xermaster123/Mach-Speed
AssetPipeline/exportGameScene.py
exportGameScene.py
py
1,603
python
en
code
0
github-code
21
[ { "api_name": "maya.cmds.ls", "line_number": 9, "usage_type": "call" }, { "api_name": "maya.cmds", "line_number": 9, "usage_type": "name" }, { "api_name": "pymel.core.ls", "line_number": 11, "usage_type": "call" }, { "api_name": "pymel.core", "line_number": 11...
20582516480
import math import torch import torch_lightning as pl from torch import nn from torch.autograd import Function from torch.nn import functional as F from torch.optim import Adam from torch_lightning import Trainer from ..utils.misc import get_batch # MINE: Mutual Information Neural Estimation # https://arxiv.org/abs/18...
shinobu-x/reinforcement-learning
estimators/mutual_information_Estimatitor.py
mutual_information_Estimatitor.py
py
3,443
python
en
code
0
github-code
21
[ { "api_name": "torch.exp", "line_number": 17, "usage_type": "call" }, { "api_name": "torch.logsumexp", "line_number": 17, "usage_type": "call" }, { "api_name": "math.log", "line_number": 17, "usage_type": "call" }, { "api_name": "torch.autograd.Function", "lin...
2353529811
from threading import Thread from urllib import request import json from time import sleep, localtime, strftime, time from random import random from urllib.parse import urlencode from .config import secret_key import os cwd = os.getcwd() import logging saved_config = ['autostudy','aim','automove','interval', 'weapon'...
mingjun97/jx_game_helper
helper/__init__.py
__init__.py
py
22,259
python
en
code
0
github-code
21
[ { "api_name": "os.getcwd", "line_number": 9, "usage_type": "call" }, { "api_name": "time.time", "line_number": 45, "usage_type": "call" }, { "api_name": "threading.Thread", "line_number": 91, "usage_type": "call" }, { "api_name": "threading.Thread", "line_numb...
19610339720
from os import getenv from pyspark.sql import SparkSession from pyspark.sql.functions import col, to_utc_timestamp, udf from pyspark.sql.types import TimestampType import matplotlib.pyplot as plt import datetime import binance import pandas ApiKey = getenv("BINANCE_API_KEY") ApiSecret = getenv("BINANCE_API_SECRET") ...
mstrielnikov/stock-price-anaysis
main.py
main.py
py
1,851
python
en
code
0
github-code
21
[ { "api_name": "os.getenv", "line_number": 11, "usage_type": "call" }, { "api_name": "os.getenv", "line_number": 12, "usage_type": "call" }, { "api_name": "binance.Client", "line_number": 14, "usage_type": "call" }, { "api_name": "pyspark.sql.SparkSession.builder.a...
8763563091
from imgaug import augmenters as iaa import numpy as np from typing import Tuple from typeguard import typechecked class SegmentationAugmentor: def transform_image(self, image: np.ndarray, masks: np.ndarray) -> \ Tuple[np.ndarray, np.ndarray]: """ Transforms the input image into its a...
NachbarStrom/python-nachbarstrom-dl-unet
nachbarstrom/img_augmentation/segmentation_augmentor.py
segmentation_augmentor.py
py
2,380
python
en
code
0
github-code
21
[ { "api_name": "numpy.ndarray", "line_number": 9, "usage_type": "attribute" }, { "api_name": "typing.Tuple", "line_number": 10, "usage_type": "name" }, { "api_name": "numpy.ndarray", "line_number": 10, "usage_type": "attribute" }, { "api_name": "imgaug.augmenters.S...
26331936950
import os.path from mako.template import Template from crepehat import Kitchen from petrified import Widget class Select(Widget): options = {} def __init__(self, *argc, **argv): self.options = argv.get("options", {}) if 'options' in argv: del argv['options'] Widget.__in...
hyphyphyph/lascaux
petrified/widgets/select.py
select.py
py
805
python
en
code
1
github-code
21
[ { "api_name": "petrified.Widget", "line_number": 9, "usage_type": "name" }, { "api_name": "petrified.Widget.__init__", "line_number": 17, "usage_type": "call" }, { "api_name": "petrified.Widget", "line_number": 17, "usage_type": "name" }, { "api_name": "petrified....
11473135446
import requests from bs4 import BeautifulSoup import re import csv print("************** Step 1 **************") url = "https://en.m.wikipedia.org/wiki/List_of_Internet_top-level_domains" r = requests.get(url) print("Step 1 Status Code: " + str(r.status_code)) print("************** Step 2 **************") soup = Bea...
nprabhu1/2022F-BIA-660-WZ
Assignment2_NP.py
Assignment2_NP.py
py
1,191
python
en
code
0
github-code
21
[ { "api_name": "requests.get", "line_number": 9, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_number": 13, "usage_type": "call" }, { "api_name": "re.findall", "line_number": 16, "usage_type": "call" }, { "api_name": "requests.get", "line_num...
9151022540
from selenium import webdriver import pytest from pages.base_page import BasePage from pages.challenging_dom import ChallengingDomPage @pytest.mark.ui class Test_Challenging_Dom(BasePage): def test_challengin_dom(self): c_d_page = ChallengingDomPage(self.driver) c_d_page.access_url() p_s ...
luxmymenon/internet_herokuapp_selenium_python
tests/test_challenging_dom.py
test_challenging_dom.py
py
674
python
en
code
0
github-code
21
[ { "api_name": "pages.base_page.BasePage", "line_number": 8, "usage_type": "name" }, { "api_name": "pages.challenging_dom.ChallengingDomPage", "line_number": 11, "usage_type": "call" }, { "api_name": "pytest.mark", "line_number": 7, "usage_type": "attribute" } ]
27037233353
import pandas as pd import numpy as np import tensorflow as tf from transformers import BertTokenizer, TFBertModel from tensorflow.keras.layers import Dense, Input from tensorflow.keras.models import Model from tensorflow.keras.optimizers import Adam from sklearn.model_selection import train_test_split from sklearn.pre...
dobbytk/NLP_study
Multicampus/NLP/day40/KorNLI(multilingual).py
KorNLI(multilingual).py
py
4,503
python
en
code
0
github-code
21
[ { "api_name": "pandas.read_csv", "line_number": 13, "usage_type": "call" }, { "api_name": "sklearn.preprocessing.LabelEncoder", "line_number": 17, "usage_type": "call" }, { "api_name": "sklearn.preprocessing.LabelEncoder", "line_number": 22, "usage_type": "call" }, { ...
15684709911
import scipy as sp import numpy as np import sklearn.datasets testinput = "../Data/Test.txt" traininput = "../Data/Train.txt" def load_iris_binary(): D, L = sklearn.datasets.load_iris()['data'].T, sklearn.datasets.load_iris()['target'] D = D[:, L != 0] # We remove setosa from D L = L[L!=0] # We re...
lucaerba/MachineLearningAndPatternRecognition
Project/src/input.py
input.py
py
1,182
python
en
code
0
github-code
21
[ { "api_name": "sklearn.datasets.datasets.load_iris", "line_number": 8, "usage_type": "call" }, { "api_name": "sklearn.datasets.datasets", "line_number": 8, "usage_type": "attribute" }, { "api_name": "sklearn.datasets", "line_number": 8, "usage_type": "name" }, { "...
28287230797
from os.path import join, splitext from os import walk, system from collections import OrderedDict from functools import reduce from itertools import permutations import string import random import pdb INVARIANT_PREFACE = 'for Ashton, Lyla, Neomi, Ruth, and Malakai' INVARIANT_PUBLICATION = 'f379e9385edeef35627a231...
radiganm/arithmetic
generator/pi.py
pi.py
py
2,087
python
en
code
0
github-code
21
[ { "api_name": "itertools.permutations", "line_number": 14, "usage_type": "call" }, { "api_name": "functools.reduce", "line_number": 21, "usage_type": "call" }, { "api_name": "collections.OrderedDict", "line_number": 28, "usage_type": "call" } ]
25962772032
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import six import tensorflow as tf from edward.util import get_dims, get_session from edward.models.random_variables import Normal try: import pystan from collections import Ordered...
leezqcst/edward
edward/models/models.py
models.py
py
13,486
python
en
code
null
github-code
21
[ { "api_name": "pymc3.inputvars", "line_number": 38, "usage_type": "call" }, { "api_name": "pymc3.DictToArrayBijection", "line_number": 41, "usage_type": "call" }, { "api_name": "pymc3.ArrayOrdering", "line_number": 41, "usage_type": "call" }, { "api_name": "six.it...
35308015121
import math from abc import ABC, abstractmethod import torch class BaseStepSchedule(ABC): def __init__(self) -> None: super().__init__() @abstractmethod def __call__(self, iteration: int) -> int: ... class TimestepSchedule(BaseStepSchedule): def __init__( self, train...
ZzAZz4/consistency-point-cloud
src/models/consistency/schedule.py
schedule.py
py
4,647
python
en
code
0
github-code
21
[ { "api_name": "abc.ABC", "line_number": 6, "usage_type": "name" }, { "api_name": "abc.abstractmethod", "line_number": 10, "usage_type": "name" }, { "api_name": "math.sqrt", "line_number": 31, "usage_type": "call" }, { "api_name": "math.ceil", "line_number": 32...
73539982133
###################################### # Import and initialize the librarys # ###################################### import json import time import uuid from code.api.core import os, log, screens, File from code.logic.player import Player from code.logic.board import Board ################# # Setup logging # ########...
benwoo1110/Ratventure
python/code/logic/playerRank.py
playerRank.py
py
5,203
python
en
code
4
github-code
21
[ { "api_name": "code.api.core.os.path.basename", "line_number": 15, "usage_type": "call" }, { "api_name": "code.api.core.os.path", "line_number": 15, "usage_type": "attribute" }, { "api_name": "code.api.core.os", "line_number": 15, "usage_type": "name" }, { "api_na...
16765508870
from django.http import HttpResponseRedirect from django.shortcuts import render from .forms import URLForm from .models import Contributor, Repo import requests def get_url(request): if request.method == 'POST': form = URLForm(request.POST) if form.is_valid(): input_url = form.cleane...
mesodiar/git_project
repo/views.py
views.py
py
2,219
python
en
code
0
github-code
21
[ { "api_name": "forms.URLForm", "line_number": 11, "usage_type": "call" }, { "api_name": "models.Repo.objects.get_or_create", "line_number": 16, "usage_type": "call" }, { "api_name": "models.Repo.objects", "line_number": 16, "usage_type": "attribute" }, { "api_name...
6965069440
from visdom import Visdom import json class Visualizer(object): """ Visualizer """ def __init__(self, port='13579', env='main', id=None): #self.cur_win = {} self.vis = Visdom(port=port, env=env) self.id = id self.env = env # Restore #ori_win = self.vis.get_w...
VainF/DeepLabV3Plus-Pytorch
utils/visualizer.py
visualizer.py
py
2,782
python
en
code
1,491
github-code
21
[ { "api_name": "visdom.Visdom", "line_number": 9, "usage_type": "call" } ]
8306349174
import cv2 import inputs import importlib import pickle import DataTransfer import XboxController import threading import socket from sys import exit exitThread = None def main(): # rover and controller ip address IP = {'rover': 'localhost', 'controller': 'localhost'} # frame and command tr...
mialbro/socket-car-v1
controller.py
controller.py
py
3,739
python
en
code
0
github-code
21
[ { "api_name": "threading.Thread", "line_number": 24, "usage_type": "call" }, { "api_name": "threading.Thread", "line_number": 26, "usage_type": "call" }, { "api_name": "threading.Thread", "line_number": 27, "usage_type": "call" }, { "api_name": "socket.socket", ...
14190928619
# -*- coding: utf-8 -*- import json import redis # pip install redis import pymysql def main(): # 指定redis数据库信息 rediscli = redis.StrictRedis(host='10.11.203.144', port = 6379, db = 0) # 指定mysql数据库 mysqlcli = pymysql.connect(host='127.0.0.1', user='root', passwd='asd19960321', db='my_spider', charset='u...
497025126/job
Bigwork/save2mysql.py
save2mysql.py
py
1,586
python
en
code
0
github-code
21
[ { "api_name": "redis.StrictRedis", "line_number": 8, "usage_type": "call" }, { "api_name": "pymysql.connect", "line_number": 10, "usage_type": "call" }, { "api_name": "json.loads", "line_number": 17, "usage_type": "call" }, { "api_name": "pymysql.Error", "line...
16381909324
from django.shortcuts import render from .models import Personal_info, Profesional_info, educ_info, Projects def index(request): personal = Personal_info.objects.all() info = Profesional_info.objects.all() educ = educ_info.objects.all() project = Projects.objects.all() context = { 'person...
isepulvedamunoz/MyPortfolio
main_page/views.py
views.py
py
484
python
en
code
0
github-code
21
[ { "api_name": "models.Personal_info.objects.all", "line_number": 6, "usage_type": "call" }, { "api_name": "models.Personal_info.objects", "line_number": 6, "usage_type": "attribute" }, { "api_name": "models.Personal_info", "line_number": 6, "usage_type": "name" }, { ...
15405923523
import cv2 import numpy as np import pyautogui cam = cv2.VideoCapture(0) lower_blue = np.array([90, 100, 100]) upper_blue = np.array([130, 255, 255]) lower_red = np.array([0, 100, 100]) upper_red = np.array([10, 255, 255]) lower_green = np.array([35, 100, 100]) upper_green = np.array([85, 255, 255]) # Initialize var...
Rhythmbellic/Computer_vission_mouse
code.py
code.py
py
3,122
python
en
code
0
github-code
21
[ { "api_name": "cv2.VideoCapture", "line_number": 5, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 7, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 8, "usage_type": "call" }, { "api_name": "numpy.array", "line_number"...
8285719478
from fastapi import FastAPI, APIRouter, HTTPException, Request from fastapi.responses import JSONResponse from fastapi.exceptions import RequestValidationError from pydantic.error_wrappers import ValidationError from starlette.middleware.cors import CORSMiddleware from .config.setting import setting from .controller....
Eric54920/download_service
web_api/app.py
app.py
py
2,653
python
en
code
0
github-code
21
[ { "api_name": "util.log_util.LogUtil.get_logger", "line_number": 13, "usage_type": "call" }, { "api_name": "util.log_util.LogUtil", "line_number": 13, "usage_type": "name" }, { "api_name": "fastapi.FastAPI", "line_number": 16, "usage_type": "name" }, { "api_name":...
20277898360
""" This script can be used to check if TM1py can connect to your TM1 instance """ import configparser import requests import sys import json import getpass import geocoder import TM1py from distutils.util import strtobool from TM1py.Services import TM1Service, ElementService from TM1py.Objects import Dimension, Hierar...
cubewise-code/canvas-plus
files/get_weather.py
get_weather.py
py
3,828
python
en
code
4
github-code
21
[ { "api_name": "configparser.ConfigParser", "line_number": 16, "usage_type": "call" }, { "api_name": "distutils.util.strtobool", "line_number": 31, "usage_type": "call" }, { "api_name": "geocoder.ip", "line_number": 40, "usage_type": "call" }, { "api_name": "reques...
4565422754
from os.path import exists import tarfile import gzip import lzma import numpy as np from scipy.optimize import fmin import pytest import astropy.units as u from .. import utils from ..modeling import spectra, photometry, physics from . import settl_cond, mko_filters, hst_calspec from .settl_cond import BT_SETTL, AMES_...
joseph-long/doodads
doodads/ref/test_settl_cond.py
test_settl_cond.py
py
13,623
python
en
code
0
github-code
21
[ { "api_name": "os.path.exists", "line_number": 14, "usage_type": "call" }, { "api_name": "settl_cond.BT_SETTL_CIFIST2011_2015_ARCHIVE", "line_number": 14, "usage_type": "attribute" }, { "api_name": "os.path.exists", "line_number": 15, "usage_type": "call" }, { "ap...
25057221367
#3行おきに空白行を挿入する from openpyxl import load_workbook wb = load_workbook("品目別売上.xlsx") ws = wb.active num = 3 start_row = 3 for row_no in range(ws.max_row - num + 1, num + start_row, -num): ws.insert_rows(row_no) wb.save("品目別売上_空白行挿入.xlsx")
jun-yoshiyoshi/python_for_excel
insert_row.py
insert_row.py
py
314
python
en
code
0
github-code
21
[ { "api_name": "openpyxl.load_workbook", "line_number": 5, "usage_type": "call" } ]
10865399889
# you can write to stdout for debugging purposes, e.g. # print("this is a debug message") import statistics def solution(A): # If there is a statistical mode, USE IT!! try: goal = statistics.mode(A) # Otherwise, try any other number close to the average/mean (simply picking A[0] may fail) excep...
lopecillo/python
test_tasks/task 2b.py
task 2b.py
py
828
python
en
code
0
github-code
21
[ { "api_name": "statistics.mode", "line_number": 8, "usage_type": "call" }, { "api_name": "statistics.mean", "line_number": 11, "usage_type": "call" }, { "api_name": "statistics.median", "line_number": 16, "usage_type": "call" } ]
13413405725
from dataclasses import dataclass, field from pathlib import Path from zipfile import ZipFile from app.data.util import download_file, get_file_name_from_url, validate_file MAX_DOWNLOAD_ATTEMPTS = 5 PARTIAL_FILE_ERROR = "Received fewer bytes than expected" @dataclass(frozen=True) class RemoteFileInfo: url: str ...
a-luna/vig-api
app/data/download_manager.py
download_manager.py
py
5,362
python
en
code
0
github-code
21
[ { "api_name": "pathlib.Path", "line_number": 15, "usage_type": "name" }, { "api_name": "app.data.util.get_file_name_from_url", "line_number": 19, "usage_type": "call" }, { "api_name": "app.data.util.get_file_name_from_url", "line_number": 23, "usage_type": "call" }, {...
2999762057
### IMPORTS print('IMPORT\n') from scipy.io import wavfile from scipy import signal import matplotlib.pyplot as plt import os import shutil import numpy as np import IPython.display as ipd import librosa import librosa.display import pandas as pd ### CREATE TRAIN AND VAL DATA print('CREATE TRAIN AND VAL DATA\n') full...
KeremTurgutlu/deeplearning
tensorflow_speech/scripts/prepare_data.py
prepare_data.py
py
4,132
python
en
code
160
github-code
21
[ { "api_name": "os.makedirs", "line_number": 22, "usage_type": "call" }, { "api_name": "os.makedirs", "line_number": 23, "usage_type": "call" }, { "api_name": "os.listdir", "line_number": 25, "usage_type": "call" }, { "api_name": "os.makedirs", "line_number": 2...
403309403
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="livia-ui", version="0.1.dev62", author="Fernando Campos Tato, Miguel Reboiro-Jato, Daniel Glez-Peña, Florentino Fdez-Riverola, Rubén Domínguez Carbajales, Hugo López-Fdez, Alba Nogueira-Rodríguez"...
sing-group/livia-ui
setup.py
setup.py
py
1,644
python
en
code
1
github-code
21
[ { "api_name": "setuptools.setup", "line_number": 6, "usage_type": "call" }, { "api_name": "setuptools.find_packages", "line_number": 15, "usage_type": "call" } ]
17200411840
import ctypes import pyglet.gl as gl from contextlib import contextmanager def set_flag(name, value, items): for item in items: setattr(item, name, value) @contextmanager def profile(perform=True): if perform: import io import pstats import cProfile s = io.StringIO()...
ranjian0/triggered_python
core/utils.py
utils.py
py
2,724
python
en
code
2
github-code
21
[ { "api_name": "io.StringIO", "line_number": 18, "usage_type": "call" }, { "api_name": "cProfile.Profile", "line_number": 19, "usage_type": "call" }, { "api_name": "pstats.Stats", "line_number": 25, "usage_type": "call" }, { "api_name": "contextlib.contextmanager",...
39365245107
import json import requests import datetime def Valida_Contrato(num_contrato): id_do_cliente = None # esse id é oq vai me permitir fazer alterações em sua conexão no voalle id_cliente_cria_solicitacao = None # verifica se o contrato tem somente numeros valida_numero = str(num_contrato).isnumeric...
strvictor/Projeto_Olt_GBS
voalle.py
voalle.py
py
6,981
python
pt
code
1
github-code
21
[ { "api_name": "json.dumps", "line_number": 26, "usage_type": "call" }, { "api_name": "requests.post", "line_number": 37, "usage_type": "call" }, { "api_name": "json.loads", "line_number": 39, "usage_type": "call" }, { "api_name": "requests.put", "line_number":...
8245283570
import os from decimal import Decimal import numpy as np from lxml import etree from hwr.constants import SPLIT, PATH, DATA from hwr.data.datarep import PointSet, Point from hwr.decoding.mlf import mlf2txt # A sample from the IAM online database class Sample(object): def __init__(self, xml_path, ground_truth): ...
chunkyjasper/IAMhwr
hwr/data/reader.py
reader.py
py
6,044
python
en
code
24
github-code
21
[ { "api_name": "hwr.decoding.mlf.mlf2txt", "line_number": 28, "usage_type": "call" }, { "api_name": "lxml.etree.XML", "line_number": 41, "usage_type": "call" }, { "api_name": "lxml.etree", "line_number": 41, "usage_type": "name" }, { "api_name": "decimal.Decimal", ...
38183511965
from __future__ import division from __future__ import print_function import argparse import numpy as np import torch import cpp.fpemu as fpemu_cpp import mpemu import sys sys.path.append('../../mpemu') # importing from mpemu.qutils import fpemu_device_fn if torch.cuda.is_available(): import cuda.fpemu as fpe...
IntelLabs/FP8-Emulation-Toolkit
mpemu/pytquant/test.py
test.py
py
6,025
python
en
code
50
github-code
21
[ { "api_name": "sys.path.append", "line_number": 11, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 11, "usage_type": "attribute" }, { "api_name": "torch.cuda.is_available", "line_number": 16, "usage_type": "call" }, { "api_name": "torch.cuda", ...