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
74899513641
## imaging_360.py # This example demonstrates how to read all 4 csi cameras and display in a single openCV window. If you encounter any errors, # use the hardware_test_csi_camera_single.py script to find out which camera is giving you trouble. from pal.utilities.vision import Camera2D import time import struct impor...
calvinlee326/Quanser
Lab/cameraTest.py
cameraTest.py
py
6,548
python
en
code
0
github-code
18
[ { "api_name": "time.time", "line_number": 13, "usage_type": "call" }, { "api_name": "time.time", "line_number": 15, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_number": 27, "usage_type": "call" }, { "api_name": "numpy.uint8", "line_number": 27, ...
71803601319
import random import chaos import rune weapon_enchantment_dict = { '1': 'Additional Damage', '2': 'Characteristic Gain', '3': 'Characteristic Drain', '4': 'Bane Weapon', '5': 'Flame Attack', '6': 'Poison Attack', '7': 'Degeneration Attack', '8': 'Freeze Attack', '9': 'W...
jdougnac/WFRP-Magic-Item-Generator
weapon.py
weapon.py
py
13,903
python
en
code
1
github-code
18
[ { "api_name": "random.randint", "line_number": 106, "usage_type": "call" }, { "api_name": "rune.pick_weapon", "line_number": 108, "usage_type": "call" }, { "api_name": "chaos.pick_weapon_chaos", "line_number": 110, "usage_type": "call" }, { "api_name": "random.ran...
9705044220
from astropy.nddata import support_nddata from astropy import log import numpy as np from astropy.wcs import wcs import craspy.axes as axes from .index import _slab from .homogen import synthesize_bubbles import matplotlib.pyplot as plt def _draw_spectra(data, wcs=None, unit=None,velocities=False): try: ...
maray/craspy
craspy/display.py
display.py
py
11,719
python
en
code
0
github-code
18
[ { "api_name": "craspy.axes._get_axis", "line_number": 15, "usage_type": "call" }, { "api_name": "astropy.wcs.wcs", "line_number": 15, "usage_type": "argument" }, { "api_name": "craspy.axes", "line_number": 15, "usage_type": "name" }, { "api_name": "astropy.log.war...
72301560361
from enum import Enum from collections import namedtuple import re class Transação(object): """docstring for Transação""" # Estados possíveis em que uma transação pode estar (INICIADA, LENDO, COMMITED) = (1, 2, 3) def __init__(self, identificador, operações): super(Transação, self).__init__() self.identificad...
carolhmj/escalonamentoValidacao
transação.py
transação.py
py
3,936
python
pt
code
0
github-code
18
[ { "api_name": "re.findall", "line_number": 92, "usage_type": "call" }, { "api_name": "collections.namedtuple", "line_number": 114, "usage_type": "call" } ]
5792985292
import vision import telebot import os import time # Так делать не стоит: токены/пароли и прочее стоит хранить в переменных окружения или конфигурационных файлах. # Я не буду это исправлять потому что мне лень # bot = telebot.TeleBot("1918344985:AAFnF5zliY0ULGMLxXE0X4WxXb69aJzDzc8") # Так наверно можно писать, но на...
overman05/Floor-bot
all_vision.py
all_vision.py
py
1,777
python
ru
code
0
github-code
18
[ { "api_name": "telebot.TeleBot", "line_number": 25, "usage_type": "call" }, { "api_name": "vision.save_image_from_camera", "line_number": 30, "usage_type": "call" }, { "api_name": "vision.count_faces", "line_number": 33, "usage_type": "call" }, { "api_name": "time...
74597976040
from typing import List import mido def get_midi_notes(msg_list: List): cache = [] notes = [] for msg in msg_list: if msg.is_meta or (msg.type != 'note_on' and msg.type != 'note_off'): continue if cache: chord = [(MidiNote(cache[0][0], cache[0][1], msg.time))] ...
calclark/PyMidiMind
midimind/model/midi_note.py
midi_note.py
py
2,473
python
en
code
0
github-code
18
[ { "api_name": "typing.List", "line_number": 5, "usage_type": "name" }, { "api_name": "mido.Message", "line_number": 48, "usage_type": "call" }, { "api_name": "mido.Message", "line_number": 51, "usage_type": "call" } ]
30423386651
import argparse import os import sys from importlib import metadata from typing import Callable, Optional from jmeslog import core, model from jmeslog.constants import DEFAULT_RENDER_TEMPLATE from jmeslog.errors import NoChangesFoundError, ValidationError SUB_CMD_FUNC = Callable[[argparse.Namespace], int] def cmd_n...
jamesls/jmeslog
src/jmeslog/cli.py
cli.py
py
5,461
python
en
code
8
github-code
18
[ { "api_name": "typing.Callable", "line_number": 11, "usage_type": "name" }, { "api_name": "argparse.Namespace", "line_number": 11, "usage_type": "attribute" }, { "api_name": "argparse.Namespace", "line_number": 14, "usage_type": "attribute" }, { "api_name": "jmesl...
9801437600
import os import sys import random import itertools import numpy as np import datetime import tensorflow as tf os.environ['CUDA_VISIBLE_DEVICES'] = '0' gpus = tf.config.experimental.list_physical_devices('GPU') for gpu in gpus: tf.config.experimental.set_memory_growth(gpu, True) def main(): BASE_MODEL_NAMES ...
NahyeKim/DeepBE
DeepBE-Web/bin/DeepBE.py
DeepBE.py
py
10,547
python
en
code
2
github-code
18
[ { "api_name": "os.environ", "line_number": 9, "usage_type": "attribute" }, { "api_name": "tensorflow.config.experimental.list_physical_devices", "line_number": 11, "usage_type": "call" }, { "api_name": "tensorflow.config", "line_number": 11, "usage_type": "attribute" },...
75457527719
import XSSSD import asyncio import tkinter as tk from tkinter import * import sys #sys.setrecursionlimit(10000) class App: async def exec(self): self.window = Window(asyncio.get_event_loop()) await self.window.show() class Window(Tk): def __init__(self, loop): ...
Danekar/Proyectos-Unversitarios
XSSSD/XSSSD/XSSSD-Interface.py
XSSSD-Interface.py
py
4,386
python
en
code
0
github-code
18
[ { "api_name": "asyncio.get_event_loop", "line_number": 11, "usage_type": "call" }, { "api_name": "tkinter.StringVar", "line_number": 20, "usage_type": "call" }, { "api_name": "tkinter.StringVar", "line_number": 21, "usage_type": "call" }, { "api_name": "tkinter.La...
3625160114
import torch.nn.functional as F import torch, torch.nn as nn from ._head import Detect from ._blocks import MLP, Conv from .yolov5.models.yolo import check_anchor_order """ just another bad model """ class BlockMLPv2(nn.Module): def __init__(self, ch_in, ch_out, mlp_size=5): super().__init__() se...
thomasreolon/svs_detection
models/mlp_v2.py
mlp_v2.py
py
4,375
python
en
code
0
github-code
18
[ { "api_name": "torch.nn.Module", "line_number": 12, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 12, "usage_type": "name" }, { "api_name": "_blocks.MLP", "line_number": 16, "usage_type": "call" }, { "api_name": "torch.nn.Sequential", "...
74416756519
from typing import List class Solution: def wordBreak(self, s: str, wordDict: List[str]) -> bool: def isSubstring(s:str, t:str): return s[:len(t)] == t dp = [False] * (len(s) + 1) dp[len(s)] = True for i in range(len(s), -1, -1): for word in wordDic...
ryanchua00/Blind75
1-D Dynamic Programming/wordBreak.py
wordBreak.py
py
757
python
en
code
0
github-code
18
[ { "api_name": "typing.List", "line_number": 5, "usage_type": "name" } ]
43491315097
#!/usr/bin/env python # -*- coding: UTF-8 -*- import os from glob import glob from Bio.Blast import NCBIWWW def parse_fasta(filename): # f = open(filename, 'r') sequences = {} for line in filename: if line.startswith(">"): name = line.rstrip("\n") sequences[name] = "" ...
programing-basic-Tutor/python_database
blast_seq.py
blast_seq.py
py
1,071
python
en
code
0
github-code
18
[ { "api_name": "glob.glob", "line_number": 20, "usage_type": "call" }, { "api_name": "Bio.Blast.NCBIWWW.qblast", "line_number": 29, "usage_type": "call" }, { "api_name": "Bio.Blast.NCBIWWW", "line_number": 29, "usage_type": "name" } ]
19838822977
""" Dataset class adapted from https://github.com/nmhkahn/MemN2N-pytorch/blob/master/memn2n/dataset.py """ import torch import torch.utils.data as data from data_utils import *#load_task, vectorize_data class bAbIDataset(data.Dataset): def __init__(self, dataset_dir, task_id=1, memory_size=70, train=True): ...
anantzoid/Recurrent-Entity-Networks-pytorch
dataset.py
dataset.py
py
2,184
python
en
code
2
github-code
18
[ { "api_name": "torch.utils.data.Dataset", "line_number": 8, "usage_type": "attribute" }, { "api_name": "torch.utils.data", "line_number": 8, "usage_type": "name" }, { "api_name": "torch.utils.data", "line_number": 15, "usage_type": "name" }, { "api_name": "torch.L...
31806495791
import ntpath import os import re import sys import time if os.name == 'nt': import win32clipboard as wincb wincb_formats = {val: name for name, val in vars(wincb).items() if name.startswith('CF_')} import pyperclip SIDEBAR_ROW_HEIGHT = 25 CUT_ENABLED = None def get_os_type(): if sys.platform.startswit...
bussierem/Osmium
utils/utilities.py
utilities.py
py
3,437
python
en
code
1
github-code
18
[ { "api_name": "os.name", "line_number": 7, "usage_type": "attribute" }, { "api_name": "sys.platform.startswith", "line_number": 18, "usage_type": "call" }, { "api_name": "sys.platform", "line_number": 18, "usage_type": "attribute" }, { "api_name": "os.name", "...
21119432444
""" Given an array, for each element find the value of nearest element to the right which is having frequency greater than as that of current element. If there does not exist an answer for a position, then make the value ‘-1’. """ from collections import defaultdict def next_greater_freq_element(elements: list) -> li...
rrwt/daily-coding-challenge
gfg/stack/next_greater_freq_element.py
next_greater_freq_element.py
py
991
python
en
code
1
github-code
18
[ { "api_name": "collections.defaultdict", "line_number": 16, "usage_type": "call" } ]
72403027559
from flask import Flask, request import os import json app = Flask(__name__) app.debug = True app.config["UPLOAD_PATH"] = "/Users/sameal/Documents/PROJECT/zombie_enterprise/web/uploads" @app.route("/") def hello_world(): return "Hello World!" @app.route("/upload", methods=["GET", "POST"]) def upload(): f = r...
gfdskl/zombie-enterprise
web/upload.py
upload.py
py
847
python
en
code
2
github-code
18
[ { "api_name": "flask.Flask", "line_number": 5, "usage_type": "call" }, { "api_name": "flask.request.files", "line_number": 15, "usage_type": "attribute" }, { "api_name": "flask.request", "line_number": 15, "usage_type": "name" }, { "api_name": "os.path.join", ...
8094912361
import requests from bs4 import BeautifulSoup from data_crawler.utils import load_json_file, save_list_to_file from data_crawler.data_prep import CodePreprocess from selenium import webdriver import traceback from time import sleep from selenium.webdriver.firefox.options import Options import os options = Options() op...
ltkk/programing-language-identify
data_crawler/get_code_by_tag.py
get_code_by_tag.py
py
2,039
python
en
code
13
github-code
18
[ { "api_name": "selenium.webdriver.firefox.options.Options", "line_number": 11, "usage_type": "call" }, { "api_name": "data_crawler.utils.load_json_file", "line_number": 16, "usage_type": "call" }, { "api_name": "data_crawler.utils.load_json_file", "line_number": 18, "usag...
5963090056
from django.db.models import Q, Sum, F, Func, Max, Min from rest_framework import filters from rest_framework import viewsets from rest_framework.response import Response from time_tracker.models import TimeReport from time_tracker.serializers import TimeReportSerializer from time_tracker.permissions import TimeRepor...
mtrdesign/mtr-time-tracker
rest/time_tracker/views/time_report.py
time_report.py
py
2,798
python
en
code
1
github-code
18
[ { "api_name": "rest_framework.viewsets.ModelViewSet", "line_number": 16, "usage_type": "attribute" }, { "api_name": "rest_framework.viewsets", "line_number": 16, "usage_type": "name" }, { "api_name": "time_tracker.models.TimeReport.objects.all", "line_number": 40, "usage_...
29580937831
import librosa.display import numpy as np import matplotlib.pyplot as plt y,sr = librosa.load(r'D:\数据集\EmoDB\03a01Fa.wav') plt.figure() D = librosa.amplitude_to_db(np.abs(librosa.stft(y)),ref=np.max) # stft短时傅里叶变换,复数的实部:np.abs(D(f,t))频率的振幅 # 幅度转为分贝,ref为参考值 plt.subplot(2,1,1) librosa.display.specshow(D,y_axis='linear')...
luozhan-jn/my_repository
08--标准频谱.py
08--标准频谱.py
py
649
python
en
code
0
github-code
18
[ { "api_name": "librosa.display.load", "line_number": 5, "usage_type": "call" }, { "api_name": "librosa.display", "line_number": 5, "usage_type": "name" }, { "api_name": "matplotlib.pyplot.figure", "line_number": 6, "usage_type": "call" }, { "api_name": "matplotlib...
8778519444
import pygame import random # Initialize Pygame pygame.init() # Set the window size WINDOW_SIZE = (1000, 700) # Create the window screen = pygame.display.set_mode(WINDOW_SIZE) # Set the title of the window pygame.display.set_caption('Circle Collision') # Set the default background color screen.fill((255, 255, 255)...
RaxMoth/RockPagerScissorsSimulator
RockPaperScissorsGame.py
RockPaperScissorsGame.py
py
8,287
python
en
code
0
github-code
18
[ { "api_name": "pygame.init", "line_number": 5, "usage_type": "call" }, { "api_name": "pygame.display.set_mode", "line_number": 11, "usage_type": "call" }, { "api_name": "pygame.display", "line_number": 11, "usage_type": "attribute" }, { "api_name": "pygame.display...
43556778941
#!/usr/bin/env python """ Echo transforms to terminal and publish to tf. Based on source code by Shuo Han. https://github.com/hanshuo/ros_rigit.git SCL; 5 Jun 2014 """ import roslib; roslib.load_manifest('ptrack') import rospy import tf from geometry_msgs.msg import Pose2D from ptrack.msg import pose_objects import...
slivingston/ptrack
nodes/pose_listener.py
pose_listener.py
py
1,641
python
en
code
0
github-code
18
[ { "api_name": "roslib.load_manifest", "line_number": 11, "usage_type": "call" }, { "api_name": "rospy.init_node", "line_number": 23, "usage_type": "call" }, { "api_name": "rospy.Subscriber", "line_number": 24, "usage_type": "call" }, { "api_name": "ptrack.msg.pose...
21580191710
import logging import time import json import os from arena_wrapper.arena_orchestrator import ArenaOrchestrator from arena_wrapper.enums.object_output_wrapper import ObjectOutputType from modeling.inference.model_executors.placeholder_model_executor import ArenaPHModel BASE_DIR = os.environ['SUBMISSIONS_DIR_PATH'] ...
amazon-science/alexa-arena
eval_ai/run_evalai_test.py
run_evalai_test.py
py
4,721
python
en
code
75
github-code
18
[ { "api_name": "os.environ", "line_number": 10, "usage_type": "attribute" }, { "api_name": "arena_wrapper.arena_orchestrator.ArenaOrchestrator", "line_number": 15, "usage_type": "call" }, { "api_name": "modeling.inference.model_executors.placeholder_model_executor.ArenaPHModel", ...
37704409479
import numpy as np from matplotlib import pyplot as plt def draw_histogram(bins: np.ndarray, histogram: np.ndarray, title=None, xlabel=None, ylabel=None, style='g:'): plt.figure(num=None, figsize=(16, 5), dpi=80, facecolor='w', edgecolor='k') plt.plot(bins[:-1], histogram, style) plt.title(title) plt.y...
MargaritaBelova/eeg_demo
draw_graphs.py
draw_graphs.py
py
3,703
python
en
code
0
github-code
18
[ { "api_name": "numpy.ndarray", "line_number": 4, "usage_type": "attribute" }, { "api_name": "matplotlib.pyplot.figure", "line_number": 5, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 5, "usage_type": "name" }, { "api_name": "matplotlib...
9769230233
import asyncio import datetime import random import websockets print(' ========= websocket is going to run =========') async def livereload(websocket, path): while True: now = datetime.datetime.utcnow().isoformat() + "U" await websocket.send(now) await asyncio.sleep(random.random() * 3) ...
iii706/examazon
websocket_server.py
websocket_server.py
py
529
python
en
code
1
github-code
18
[ { "api_name": "datetime.datetime.utcnow", "line_number": 11, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 11, "usage_type": "attribute" }, { "api_name": "asyncio.sleep", "line_number": 13, "usage_type": "call" }, { "api_name": "random....
33969312369
import cv2 import numpy as np import math import time from statistics import stdev # Constant XCAM_WIDTH = 32 XCAM_HEIGHT = 32 VIDEO_WIDTH = XCAM_WIDTH * 6 # Defined from firmware VIDEO_HEIGHT = XCAM_HEIGHT * 6 # Video device has to be in global scope np.set_printoptions(threshold=np.nan) np.set_printoptions(pr...
jacksonlau-mi/MI_XCAM_Test
MI_XCAMtest.py
MI_XCAMtest.py
py
7,508
python
en
code
0
github-code
18
[ { "api_name": "numpy.set_printoptions", "line_number": 15, "usage_type": "call" }, { "api_name": "numpy.nan", "line_number": 15, "usage_type": "attribute" }, { "api_name": "numpy.set_printoptions", "line_number": 16, "usage_type": "call" }, { "api_name": "cv2.Vide...
29365597786
from design_patterns.factory import Factory from paramiko import AutoAddPolicy, SSHClient, SSHException, AuthenticationException from socket import error import json from os import chmod ''' Classes that tests servers in search for non-protected services ''' class CrawlerInterface: def __init__(self): self...
OlivierKessler01/ip-network-crawler
crawler/crawler.py
crawler.py
py
4,377
python
en
code
0
github-code
18
[ { "api_name": "paramiko.SSHClient", "line_number": 67, "usage_type": "call" }, { "api_name": "paramiko.AutoAddPolicy", "line_number": 68, "usage_type": "argument" }, { "api_name": "paramiko.AuthenticationException", "line_number": 83, "usage_type": "name" }, { "ap...
42157825699
import pytest from dbinspector.utils import determine_identifier_type, format_list_entry, check_data_age, clear_dir from dbinspector.utils import get_ncbi, get_uniprot from dbinspector.exceptions import FileMissingError import os import os.path as osp from pathlib import Path HOME = str(Path.home()) TEST = osp.join(H...
laurendelong21/DBInspector
dbi_pkg/tests/test_utils.py
test_utils.py
py
2,905
python
en
code
0
github-code
18
[ { "api_name": "pathlib.Path.home", "line_number": 10, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_number": 10, "usage_type": "name" }, { "api_name": "os.path.join", "line_number": 11, "usage_type": "call" }, { "api_name": "os.path", "line_numbe...
4819146032
""" 88. Merge Sorted Array You are given two integer arrays nums1 and nums2, sorted in non-decreasing order, and two integers m and n, representing the number of elements in nums1 and nums2 respectively. Merge nums1 and nums2 into a single array sorted in non-decreasing order. The final sorted array should not be ret...
tkwang0530/LeetCode
0088.py
0088.py
py
3,558
python
en
code
4
github-code
18
[ { "api_name": "typing.List", "line_number": 50, "usage_type": "name" }, { "api_name": "typing.List", "line_number": 65, "usage_type": "name" }, { "api_name": "unittest.TestCase", "line_number": 88, "usage_type": "attribute" }, { "api_name": "unittest.main", "l...
25578812149
# REになる...なぜ import sys read = sys.stdin.readline from functools import reduce class SqrtDecomposedList: def __init__(self, ls, segfunc, identity_element): from math import sqrt, ceil from copy import copy self.f = segfunc # queryのfunction self.ide = identity_element self....
masakiaota/kyoupuro
practice/C_ARC/arc033_3/arc033_3_SqrtDecompose.py
arc033_3_SqrtDecompose.py
py
2,880
python
en
code
1
github-code
18
[ { "api_name": "sys.stdin", "line_number": 3, "usage_type": "attribute" }, { "api_name": "copy.copy", "line_number": 14, "usage_type": "call" }, { "api_name": "math.ceil", "line_number": 15, "usage_type": "call" }, { "api_name": "math.sqrt", "line_number": 15, ...
23819380063
from base64 import encode import re from unittest.mock import patch import numpy as np import torch from torch.utils.data import Dataset,DataLoader from torch.nn.utils.rnn import pad_sequence import os import pickle import numpy as np from torch.autograd import Variable import csv import itertools,argparse from collect...
ggkong/tfCompared
Script/charnn_Script/step1_get_Vocab.py
step1_get_Vocab.py
py
2,312
python
en
code
0
github-code
18
[ { "api_name": "re.split", "line_number": 32, "usage_type": "call" }, { "api_name": "argparse.ArgumentParser", "line_number": 45, "usage_type": "call" }, { "api_name": "csv.DictReader", "line_number": 56, "usage_type": "call" }, { "api_name": "itertools.chain", ...
22536083384
import tensorflow as tf import numpy as np from PIL import Image import io import os import shutil import json class Logger(object): def __init__(self, log_dir, suffix=None): try: self.writer = tf.summary.FileWriter(log_dir, filename_suffix=suffix) except AttributeError: # l...
zilongzheng/CycleCoopNets
utils/logger.py
logger.py
py
2,858
python
en
code
3
github-code
18
[ { "api_name": "tensorflow.summary.FileWriter", "line_number": 12, "usage_type": "call" }, { "api_name": "tensorflow.summary", "line_number": 12, "usage_type": "attribute" }, { "api_name": "os.path.exists", "line_number": 18, "usage_type": "call" }, { "api_name": "...
38921236360
# -*- coding: utf-8 -*- import os import yaml import json import random import logging import requests import traceback from flask import Response, Flask from flask import request from subprocess import Popen from ppyappLib import ppyHandler from baseappLib import baseHandler from commLib import appTools ...
huhuibin147/interbotAPI
app/apiapp.py
apiapp.py
py
3,473
python
en
code
19
github-code
18
[ { "api_name": "yaml.load", "line_number": 17, "usage_type": "call" }, { "api_name": "flask.Flask", "line_number": 19, "usage_type": "call" }, { "api_name": "flask.request.args.get", "line_number": 24, "usage_type": "call" }, { "api_name": "flask.request.args", ...
40411875821
import os import numpy as np import flask import pickle from flask import Flask, render_template, request import pandas as pd app=Flask(__name__) @app.route('/') @app.route('/index') def index(): return flask.render_template('index.html') def addfeatures(data): if data.Name.str.contains('((?:Mr\.|Mrs\.|Miss\....
bhbharat/Titanic-Survival-prediction-webapp
WebApp/main.py
main.py
py
1,556
python
en
code
0
github-code
18
[ { "api_name": "flask.Flask", "line_number": 8, "usage_type": "call" }, { "api_name": "flask.render_template", "line_number": 13, "usage_type": "call" }, { "api_name": "pandas.DataFrame.from_dict", "line_number": 27, "usage_type": "call" }, { "api_name": "pandas.Da...
35101880285
import numpy as np import matplotlib.pyplot as plt import matplotlib.cm as cm import itertools # Read in string N = [20, 50, 100, 200, 250] sigma = [0.05, 0.08, 0.1] coordVals = [] eigVals = [] marker = itertools.cycle(('o', 'v', '^', 'h', 'd', 'p')) colors = cm.jet(np.linspace(0, 1, len(N))) fig, axs = plt.subplot...
quang-ha/dec_parallel_project
plot_scripts/noise_conv_3.py
noise_conv_3.py
py
1,172
python
en
code
0
github-code
18
[ { "api_name": "itertools.cycle", "line_number": 13, "usage_type": "call" }, { "api_name": "matplotlib.cm.jet", "line_number": 14, "usage_type": "call" }, { "api_name": "matplotlib.cm", "line_number": 14, "usage_type": "name" }, { "api_name": "numpy.linspace", ...
18588258046
print(__doc__) # =========================================================================== # # Imports # =========================================================================== # # Critical Imports # --------------------------------------------------------------------------- # import warnings; warnings.filterwa...
franec94/Pittsburgh-Bridge-Dataset
pittsburgh-bridges-data-set-analysis/project_stats/utils_stats/fit_utils.py
fit_utils.py
py
9,231
python
en
code
0
github-code
18
[ { "api_name": "warnings.filterwarnings", "line_number": 9, "usage_type": "call" }, { "api_name": "seaborn.set", "line_number": 34, "usage_type": "call" }, { "api_name": "numpy.newaxis", "line_number": 72, "usage_type": "attribute" }, { "api_name": "sklearn.model_s...
12191039920
from typing import Type, Dict from asyncio import StreamReader, StreamWriter from ..FileManager import FileManager from ..Response import Response from ..Database import Database from .baseRequest import Request from .requestHeader import RequestHeader from .requestHeader import RequestCode class Re...
Styxer/DefensiveSystemsOpenUin
ממן15/Maman15/Server/Requet/requestHandler.py
requestHandler.py
py
1,497
python
en
code
0
github-code
18
[ { "api_name": "Response.Response", "line_number": 14, "usage_type": "name" }, { "api_name": "typing.Dict", "line_number": 15, "usage_type": "name" }, { "api_name": "requestHeader.RequestCode", "line_number": 15, "usage_type": "name" }, { "api_name": "typing.Type",...
8488828060
# The code is modified from https://github.com/Stanou01260/chessbot_python/blob/master/code/chessboard_detection.py import numpy as np import cv2 # OpenCV import pyautogui # Used to take screenshots and move the mouse import mss # Used to get superfast screenshots import game_state_classes def find_chess...
karayaman/voice-to-chess-notation
chessboard_detection.py
chessboard_detection.py
py
2,556
python
en
code
6
github-code
18
[ { "api_name": "numpy.array", "line_number": 12, "usage_type": "call" }, { "api_name": "pyautogui.screenshot", "line_number": 12, "usage_type": "call" }, { "api_name": "mss.mss", "line_number": 14, "usage_type": "call" }, { "api_name": "numpy.array", "line_numb...
14643217024
import tkinter as tk import pyperclip import subprocess import pytesseract from PIL import ImageGrab from AnswerFromOpenAI import * from config import line class ClipboardWatcher: def __init__(self): # 创建窗口 self.root = tk.Tk() # 创建字符串变量并设置初始值 self.clipboard_var = tk.StringVar...
cobingx/ExperimentDemo
src/python/监听剪切板并从GPT获得回答.py
监听剪切板并从GPT获得回答.py
py
2,393
python
zh
code
0
github-code
18
[ { "api_name": "tkinter.Tk", "line_number": 14, "usage_type": "call" }, { "api_name": "tkinter.StringVar", "line_number": 17, "usage_type": "call" }, { "api_name": "pyperclip.paste", "line_number": 18, "usage_type": "call" }, { "api_name": "tkinter.Label", "lin...
40202542715
#!/usr/bin/env python ''' Matplotlib [Python] Ejemplos de clase --------------------------- Autor: Inove Coding School Version: 1.1 Descripcion: Programa creado para mostrar ejemplos prácticos de los visto durante la clase ''' __author__ = "Inove Coding School" __email__ = "alumnos@inove.com.ar" __version__ = "1.1" ...
InoveAlumnos/matplotlib_python
anexo/ejemplos_ppt.py
ejemplos_ppt.py
py
5,396
python
es
code
1
github-code
18
[ { "api_name": "numpy.linspace", "line_number": 26, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.figure", "line_number": 29, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 29, "usage_type": "name" }, { "api_name": "matplotlib....
37734795722
import openpyxl from openpyxl import Workbook import datetime from tkinter import messagebox from tkinter import * import os jzr = Tk() jzr.title('Ledger') jzr.geometry('300x120+700+300') label1 = Label(jzr, text='Types of consumption:', font=('Microsoft Yahei', 10), fg='green') label1.grid(row=0, column=0) label2 ...
Dixon3220/PythonProgramming
origin/Ledger.py
Ledger.py
py
2,228
python
en
code
0
github-code
18
[ { "api_name": "tkinter.messagebox.showinfo", "line_number": 30, "usage_type": "call" }, { "api_name": "tkinter.messagebox", "line_number": 30, "usage_type": "name" }, { "api_name": "tkinter.messagebox.showinfo", "line_number": 32, "usage_type": "call" }, { "api_na...
70985166439
# -*- coding: utf-8 -*- from PySide6.QtCore import QSettings from scihub_eva.globals.versions import * from scihub_eva.utils.sys_utils import * class Preferences(object): if is_macos(): QSettings.setDefaultFormat(QSettings.Format.NativeFormat) SETTINGS = QSettings( QSettings.NativeFo...
leovan/SciHubEVA
scihub_eva/utils/preferences_utils.py
preferences_utils.py
py
1,346
python
en
code
941
github-code
18
[ { "api_name": "PySide6.QtCore.QSettings.setDefaultFormat", "line_number": 11, "usage_type": "call" }, { "api_name": "PySide6.QtCore.QSettings", "line_number": 11, "usage_type": "name" }, { "api_name": "PySide6.QtCore.QSettings.Format", "line_number": 11, "usage_type": "at...
35277591083
#!/usr/bin/env python # coding: utf-8 import numpy as np import pandas as pd import matplotlib.pyplot as plt from sklearn.model_selection import StratifiedKFold import time import zipfile from PIL import Image import torch import torch.nn as nn import torchvision import torch.backends.cudnn as cudnn import torch.opti...
PeiHuaWu/2021VRDL_HW1
ResNet50.py
ResNet50.py
py
14,499
python
en
code
0
github-code
18
[ { "api_name": "warnings.filterwarnings", "line_number": 29, "usage_type": "call" }, { "api_name": "torch.device", "line_number": 30, "usage_type": "call" }, { "api_name": "torch.cuda.is_available", "line_number": 30, "usage_type": "call" }, { "api_name": "torch.cu...
74518546598
from django.conf import settings from django.conf.urls import include, url from django.conf.urls.static import static from django.contrib import admin from django.views.generic import TemplateView from django.views import defaults as default_views from rest_framework_jwt.views import obtain_jwt_token from space_manager...
yoojat/Space-Manager
config/urls.py
urls.py
py
2,500
python
en
code
0
github-code
18
[ { "api_name": "django.conf.urls.url", "line_number": 12, "usage_type": "call" }, { "api_name": "django.conf.settings.ADMIN_URL", "line_number": 12, "usage_type": "attribute" }, { "api_name": "django.conf.settings", "line_number": 12, "usage_type": "name" }, { "api...
7111330078
from nltk.tree import * from fastapi import FastAPI from itertools import * def flatten_nested_list(lst): if not any((type(i) == list) for i in lst): return [lst] result = [] for position, item in enumerate(lst): if type(item) == list: for nested_item in item: ...
dmytromk/test_syntax
app.py
app.py
py
3,219
python
en
code
0
github-code
18
[ { "api_name": "fastapi.FastAPI", "line_number": 95, "usage_type": "call" } ]
72345087401
#指先を検出するプログラム import cv2 import numpy as np import sys from scipy.spatial import distance import time def main(): # 入力画像の取得 t1 = time.time() im = cv2.imread("%s"%param[1]) height,width = im.shape[:2] gray = cv2.cvtColor(im, cv2.COLOR_BGR2GRAY) gray = cv2.threshold(gray, 0, 255, cv2.THRESH_BINA...
uni4/research
yubisaki_test.py
yubisaki_test.py
py
2,513
python
en
code
0
github-code
18
[ { "api_name": "time.time", "line_number": 10, "usage_type": "call" }, { "api_name": "cv2.imread", "line_number": 11, "usage_type": "call" }, { "api_name": "cv2.cvtColor", "line_number": 13, "usage_type": "call" }, { "api_name": "cv2.COLOR_BGR2GRAY", "line_numb...
7175258026
from opensearchpy import OpenSearch host = 'localhost' port = 9200 auth = ('admin', 'admin') # For testing only. Don't store credentials in code. # ca_certs_path = '/full/path/to/root-ca.pem' # Provide a CA bundle if you use intermediate CAs with your root CA. # Optional client certificates if you don't want to use H...
tianrking/t_ad_help_data-1
demo/add_data.py
add_data.py
py
1,524
python
en
code
0
github-code
18
[ { "api_name": "opensearchpy.OpenSearch", "line_number": 13, "usage_type": "call" }, { "api_name": "sentence_transformers.SentenceTransformer", "line_number": 37, "usage_type": "call" } ]
71294955239
""" Filename: pca_tryme Purpose: Test the pca_tools module Author: John Weaver Date created: 02.05.18 Possible problems: """ # ------------------------------------------------------------------------------ # Standard Packages # ------------------------------------------------------------------------------ import nu...
astroweaver/pygappy
pca_tryme.py
pca_tryme.py
py
3,737
python
en
code
2
github-code
18
[ { "api_name": "numpy.random.seed", "line_number": 54, "usage_type": "call" }, { "api_name": "numpy.random", "line_number": 54, "usage_type": "attribute" }, { "api_name": "pygappy.pca_projection.eigenbasis", "line_number": 61, "usage_type": "call" }, { "api_name": ...
17686258174
from django.db import models from django.conf import settings from django.contrib.auth.models import User from django.utils import timezone from django.urls import reverse # Create your models here. #Quiz Model class Quiz(models.Model): title = models.CharField(max_length=100, verbose_name="Quiz Title") slug =...
WhizzyDoc/mediquiz
quiz/models.py
models.py
py
6,702
python
en
code
0
github-code
18
[ { "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": ...
20701944545
import json from datetime import datetime import pymysql import requests from dotenv import dotenv_values from fastapi import HTTPException from pymysql import MySQLError config_env = dotenv_values(".env") def replace_none_with_empty_string(data): if isinstance(data, list): return [replace_none_with_emp...
yuinakorn/send_ddc
send_ddc_controller.py
send_ddc_controller.py
py
9,731
python
en
code
0
github-code
18
[ { "api_name": "dotenv.dotenv_values", "line_number": 10, "usage_type": "call" }, { "api_name": "pymysql.cursors", "line_number": 103, "usage_type": "attribute" }, { "api_name": "datetime.datetime.now", "line_number": 108, "usage_type": "call" }, { "api_name": "dat...
33983146943
#!/usr/bin/env python # WS server example that synchronizes state across clients import asyncio import json import logging import websockets from definitions import WEBSOCKET_IP, WEBSOCKET_PORT logging.basicConfig() STATE = {"task": None, "parameters": None} USERS = set() def parameters_event(): if ...
Neuro-Mechatronics-Interfaces/JSON_Parameters_Exporter
server.py
server.py
py
3,043
python
en
code
0
github-code
18
[ { "api_name": "logging.basicConfig", "line_number": 11, "usage_type": "call" }, { "api_name": "json.dumps", "line_number": 20, "usage_type": "call" }, { "api_name": "json.dumps", "line_number": 22, "usage_type": "call" }, { "api_name": "json.dumps", "line_numb...
16877926449
# createmasks stage import argparse from functools import partial from pathlib import Path from typing import Iterable, Union import psutil from pygeos.set_operations import union import geopandas as gpd import numpy as np import pandas as pd import rioxarray import xarray as xr from shapely.geometry import Polygon ...
cwerner/deadtrees
scripts/createmasks.py
createmasks.py
py
6,931
python
en
code
5
github-code
18
[ { "api_name": "pandas.Series", "line_number": 20, "usage_type": "attribute" }, { "api_name": "shapely.geometry.Polygon", "line_number": 24, "usage_type": "call" }, { "api_name": "shapely.geometry.Polygon", "line_number": 20, "usage_type": "name" }, { "api_name": "...
18073545539
from PyQt5 import QtCore, QtGui, QtWidgets from module import Ui_module import glob from pathlib import Path import os __copyright__ = "Copyright 2019, RISE Research Institutes of Sweden" __author__ = "Naveed Anwar Bhatti and Martina Brachmann" class mainmodule(QtWidgets.QDialog): def __init__(self, parent=None...
martinabr/Smart-Implicit-Hub
SmartImplicitHub/mainmodule.py
mainmodule.py
py
1,698
python
en
code
1
github-code
18
[ { "api_name": "PyQt5.QtWidgets.QDialog", "line_number": 12, "usage_type": "attribute" }, { "api_name": "PyQt5.QtWidgets", "line_number": 12, "usage_type": "name" }, { "api_name": "PyQt5.QtWidgets.QDialog.__init__", "line_number": 14, "usage_type": "call" }, { "api...
40541138226
from pymatgen.analysis.adsorption import AdsorbateSiteFinder from pymatgen.core.structure import Structure from pymatgen.core.surface import Slab, SlabGenerator import numpy as np # struct = Structure.from_file("POSCAR") # asf = AdsorbateSiteFinder(struct) def slab_from_structure(miller, structure): return Slab(...
fyalcin/CAMD2022
main.py
main.py
py
1,800
python
en
code
0
github-code
18
[ { "api_name": "pymatgen.core.surface.Slab", "line_number": 11, "usage_type": "call" }, { "api_name": "numpy.eye", "line_number": 17, "usage_type": "call" }, { "api_name": "numpy.int", "line_number": 17, "usage_type": "attribute" }, { "api_name": "pymatgen.ext.matp...
21382732336
from django.conf.urls import url from . import views # mysite/urls.py 에서 url(r'', include('blog.urls')) 했어서 # Django will redirect everything that comes into htp://127.0.0.1:8000/ # to blog.urls and look for further instructions there. urlpatterns = [ url(r'^$', views.home, name='home'), url(r'^category/([0-9...
BowonY/django-tutorial
blog/urls.py
urls.py
py
556
python
en
code
0
github-code
18
[ { "api_name": "django.conf.urls.url", "line_number": 9, "usage_type": "call" }, { "api_name": "django.conf.urls.url", "line_number": 10, "usage_type": "call" }, { "api_name": "django.conf.urls.url", "line_number": 11, "usage_type": "call" }, { "api_name": "django....
37870589612
import csv import datetime import os import re import titlecase from beancount.core import amount from beancount.core import data from beancount.core import flags from beancount.core import number as beancount_number from beancount.ingest import importer _COLUMN_DATE = 'Posting Date' _COLUMN_PAYEE = 'Description' _CO...
mtlynch/beancount-chase-bank
beancount_chase/checking.py
checking.py
py
4,885
python
en
code
9
github-code
18
[ { "api_name": "re.compile", "line_number": 17, "usage_type": "call" }, { "api_name": "re.IGNORECASE", "line_number": 18, "usage_type": "attribute" }, { "api_name": "beancount.ingest.importer.ImporterProtocol", "line_number": 21, "usage_type": "attribute" }, { "api...
42781017827
from modules.menu import Menu from modules.pizza import Pizza menu = Menu() def saveMenu(file_path, menu): ##sauvegarder le menu dans le fichier file_path fichier = open(file_path, 'w') fichier.write("menu :\n") fichier.write(str(menu)) fichier.close() def getMenuFromFile(file_path): ##recu...
badre-Idrissi/tpPython
pizzeria_python_poo.py
pizzeria_python_poo.py
py
2,862
python
fr
code
0
github-code
18
[ { "api_name": "modules.menu.Menu", "line_number": 4, "usage_type": "call" }, { "api_name": "modules.pizza.Pizza", "line_number": 33, "usage_type": "call" } ]
560978255
from typing import Optional import tokenizers # toks from https://github.com/facebookresearch/esm/blob/main/esm/constants.py#L7 # prepend/append toks from https://github.com/facebookresearch/esm/blob/main/esm/data.py#L153 PROTEINSEQ_TOKS = { "toks": [ "L", "A", "G", "V", "S...
irhum/esmjax
esmjax/tokenizer.py
tokenizer.py
py
2,696
python
en
code
13
github-code
18
[ { "api_name": "typing.Optional", "line_number": 43, "usage_type": "name" }, { "api_name": "tokenizers.Tokenizer", "line_number": 57, "usage_type": "call" }, { "api_name": "tokenizers.models.WordLevel", "line_number": 58, "usage_type": "call" }, { "api_name": "toke...
12460174596
from data import windows, signal, WINDOW_SIZE, fs from matplotlib import pyplot as plt from matplotlib import transforms from matplotlib.gridspec import GridSpec from numpy import fft from waterfall_plot import plot_waterfall import numpy as np spectral_content = fft.rfft(windows, axis=0) normed_spectral_content = np....
ccsf18-flow/dsp-blog
beat_detector.py
beat_detector.py
py
1,819
python
en
code
0
github-code
18
[ { "api_name": "numpy.fft.rfft", "line_number": 9, "usage_type": "call" }, { "api_name": "data.windows", "line_number": 9, "usage_type": "argument" }, { "api_name": "numpy.fft", "line_number": 9, "usage_type": "name" }, { "api_name": "numpy.abs", "line_number":...
3360625344
from datetime import datetime import sqlite3 as sql con = sql.connect("bank_data.db") cur = con.cursor() import traceback global account_no global cust_id def change_addr(): address = input("Enter address : ") cur.execute('UPDATE customer SET address = (?) WHERE cust_id = (?);',(address, cust_id)) ...
pranjali97/Bank-management-cli-based
profile.py
profile.py
py
7,102
python
en
code
0
github-code
18
[ { "api_name": "sqlite3.connect", "line_number": 3, "usage_type": "call" }, { "api_name": "traceback.print_exc", "line_number": 48, "usage_type": "call" } ]
4003040454
import argparse import sys from absl import app from google.protobuf import message from google.protobuf import text_format from tensorflow.core.framework import graph_pb2 from tensorflow.core.protobuf import config_pb2 from tensorflow.core.protobuf import meta_graph_pb2 from tensorflow.core.protobuf import saved_mod...
tensorflow/tensorflow
tensorflow/python/grappler/cost_analyzer_tool.py
cost_analyzer_tool.py
py
4,250
python
en
code
178,918
github-code
18
[ { "api_name": "tensorflow.python.platform.gfile.GFile", "line_number": 22, "usage_type": "call" }, { "api_name": "tensorflow.python.platform.gfile", "line_number": 22, "usage_type": "name" }, { "api_name": "tensorflow.core.protobuf.saved_model_pb2.SavedModel", "line_number": ...
18044278247
import platform import json from flask import Flask from flask import render_template from cpuinfo import get_cpu_info import os import socket class Machine: # constructor where i get all system information def __init__(self): cpu_data = get_cpu_info() self.type = platform.machine() s...
Snoopyyyyy/3bci-python
Partie3.py
Partie3.py
py
1,309
python
en
code
0
github-code
18
[ { "api_name": "cpuinfo.get_cpu_info", "line_number": 12, "usage_type": "call" }, { "api_name": "platform.machine", "line_number": 14, "usage_type": "call" }, { "api_name": "platform.node", "line_number": 15, "usage_type": "call" }, { "api_name": "platform.system",...
11214174565
import sys import traceback import logging from surprise.model_selection import cross_validate from auto_surprise.algorithms.base import AlgorithmBase from auto_surprise.constants import ( DEFAULT_TARGET_METRIC, CV_N_JOBS, DEFAULT_HPO_ALGO, ) from auto_surprise.context.limits import TimeoutException from a...
ISG-Siegen/Auto-Surprise
auto_surprise/trainer.py
trainer.py
py
4,551
python
en
code
25
github-code
18
[ { "api_name": "auto_surprise.constants.DEFAULT_TARGET_METRIC", "line_number": 23, "usage_type": "name" }, { "api_name": "auto_surprise.constants.DEFAULT_HPO_ALGO", "line_number": 24, "usage_type": "name" }, { "api_name": "logging.getLogger", "line_number": 32, "usage_type...
1995103337
from typing import TypeAlias from foundry import data_dir from foundry.game.Data import Mario3Level from smb3parse.util import hex_int LevelAddress: TypeAlias = int EnemyItemAddress: TypeAlias = int ObjectData: TypeAlias = tuple[LevelAddress, bytearray] EnemyItemData: TypeAlias = tuple[EnemyItemAddress, bytearray] L...
mchlnix/SMB3-Foundry
foundry/game/level/__init__.py
__init__.py
py
1,499
python
en
code
84
github-code
18
[ { "api_name": "typing.TypeAlias", "line_number": 7, "usage_type": "name" }, { "api_name": "typing.TypeAlias", "line_number": 8, "usage_type": "name" }, { "api_name": "typing.TypeAlias", "line_number": 10, "usage_type": "name" }, { "api_name": "typing.TypeAlias", ...
30396658814
import asyncio import Time from db import db from loader import dp, bot from aiogram import types from aiogram.types import Message from aiogram.dispatcher.filters import Command, Text from aiogram.dispatcher import FSMContext from misc.throttling import rate_limit from states import States from aiogram.contrib.fsm_s...
qwetry4444/tgbotAiogram
message_handler.py
message_handler.py
py
5,227
python
en
code
0
github-code
18
[ { "api_name": "aiogram.types.Message", "line_number": 24, "usage_type": "attribute" }, { "api_name": "aiogram.types", "line_number": 24, "usage_type": "name" }, { "api_name": "db.db.user_exists", "line_number": 25, "usage_type": "call" }, { "api_name": "db.db", ...
18144335486
from email.policy import HTTP from rest_framework import status from rest_framework.decorators import api_view from rest_framework.response import Response from django.utils.html import escape from ..business.bcainvdetu import BCaInvDetU from ..business.bcainvcab import BCaInvCab from base.business.bproducto import BP...
vengardus/erdemo01
base/apirest/apirest_view.py
apirest_view.py
py
7,319
python
en
code
0
github-code
18
[ { "api_name": "rest_framework.response.Response", "line_number": 29, "usage_type": "call" }, { "api_name": "rest_framework.decorators.api_view", "line_number": 18, "usage_type": "call" }, { "api_name": "base.business.bproducto.BProducto", "line_number": 33, "usage_type": ...
33848396869
from typing import Dict, Type, NamedTuple, Any, Callable, TypeVar, Union T = TypeVar("T") NamedTuple_T = TypeVar("NamedTuple_T", bound=Type[NamedTuple]) Json_Object = Dict[str, Any] Simple_Type = Union[int, bool, float, str, Json_Object] def unseralize_object(cls: Type[T], value: Simple_Type) -> T: """Convert a ...
Tadaboody/serialize_named_tuple
serialize_named_tuples.py
serialize_named_tuples.py
py
949
python
en
code
2
github-code
18
[ { "api_name": "typing.TypeVar", "line_number": 3, "usage_type": "call" }, { "api_name": "typing.TypeVar", "line_number": 4, "usage_type": "call" }, { "api_name": "typing.Type", "line_number": 4, "usage_type": "name" }, { "api_name": "typing.NamedTuple", "line_...
9756853715
# -*- coding: utf-8 -*- import requests from urllib.parse import urlparse, urlunparse from .message import Message class Session: def __init__(self): self.messages = {} #: my message catalog (message key => Message) self.friends = {} #: my friends, trusted public keys (key => alias) se...
eblade/friendface
friendface/session.py
session.py
py
2,413
python
en
code
0
github-code
18
[ { "api_name": "requests.Session", "line_number": 23, "usage_type": "call" }, { "api_name": "message.key", "line_number": 26, "usage_type": "attribute" }, { "api_name": "message.calculate_key", "line_number": 27, "usage_type": "call" }, { "api_name": "message.in_re...
30581114634
#!/usr/bin/env python3 import plotly as plt import plotly.graph_objs as go from datetime import datetime data_file = '/home/matt/pi_data/temperature.log' dates = [] temps = [] dates_to_graph = [] temps_to_graph = [] try: with open( data_file, 'r' ) as f: for line in f: date = ' '.join( lin...
mmarano25/my-room-temperature
graph_data.py
graph_data.py
py
1,487
python
en
code
0
github-code
18
[ { "api_name": "datetime.datetime.strptime", "line_number": 25, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 25, "usage_type": "name" }, { "api_name": "datetime.datetime.now", "line_number": 27, "usage_type": "call" }, { "api_name": "da...
42044743389
from .Linker import Linker from utils.CommandUtils import CommandUtils class GNULinker(Linker): # 32bit Linux dependent LINKER = "/usr/bin/ld" DYNAMIC_LINKER = "/lib/ld-linux.so.2" C_RUNTIME_INIT = "/usr/lib32/crti.o" C_RUNTIME_START = "/usr/lib32/crt1.o" C_RUNTIME_START_PIE = "/u...
U-Ar/Cpresto
cpc/sysdep/GNULinker.py
GNULinker.py
py
1,849
python
en
code
1
github-code
18
[ { "api_name": "Linker.Linker", "line_number": 4, "usage_type": "name" }, { "api_name": "utils.CommandUtils.CommandUtils.invoke", "line_number": 37, "usage_type": "call" }, { "api_name": "utils.CommandUtils.CommandUtils", "line_number": 37, "usage_type": "name" }, { ...
1205120271
from collections import deque def dfs(list_v, v, visited_dfs): visited_dfs[v] = True print(v, end=' ') for i in list_v[v]: if not visited_dfs[i]: dfs(list_v, i, visited_dfs) def bfs(list_v, v, visited_bfs): queue = deque([v]) visited_bfs[v] = True while queue: resul...
hanuirangroovy/Baekjoon
solved.ac/3/1260.py
1260.py
py
932
python
en
code
0
github-code
18
[ { "api_name": "collections.deque", "line_number": 11, "usage_type": "call" } ]
10424630073
import csv import cv2 from keras.models import load_model import numpy as np from collections import deque import os model = load_model('QuickDraw.h5') names = [ "apple", "bow", "candle", "door", "envelope", "fish", "guitar", "ice-cream", "thunder", "moon", "mountain", ...
SzymonNowak/NewYearsEveChallenge
QuickDraw-master/QuickDrawApp.py
QuickDrawApp.py
py
2,405
python
en
code
1
github-code
18
[ { "api_name": "keras.models.load_model", "line_number": 9, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_number": 33, "usage_type": "call" }, { "api_name": "numpy.uint8", "line_number": 33, "usage_type": "attribute" }, { "api_name": "cv2.line", "l...
23546194430
import json import logging import unittest import mock from osm_mon.plugins.OpenStack.Aodh import alarming as alarm_req from osm_mon.plugins.OpenStack.common import Common log = logging.getLogger(__name__) auth_token = mock.ANY endpoint = mock.ANY class Response(object): """Mock a response message class."""...
usmanjavaiduj/OSM
MON/osm_mon/test/OpenStack/test_alarming.py
test_alarming.py
py
10,326
python
en
code
0
github-code
18
[ { "api_name": "logging.getLogger", "line_number": 12, "usage_type": "call" }, { "api_name": "mock.ANY", "line_number": 14, "usage_type": "attribute" }, { "api_name": "mock.ANY", "line_number": 15, "usage_type": "attribute" }, { "api_name": "json.dumps", "line_...
12537482502
from PIL import Image from pptx import Presentation from pptx.util import Inches, Pt import os import sys import math prs = Presentation() # adjustable, in inches prs.slide_width = Inches(16) prs.slide_height = Inches(9) blank_slide_layout = prs.slide_layouts[6] # an empty slide def get_image_size(image_path): # obt...
iyui1223/AutoPPTX
autoPPTX/insertFigPPT.py
insertFigPPT.py
py
7,168
python
en
code
1
github-code
18
[ { "api_name": "pptx.Presentation", "line_number": 8, "usage_type": "call" }, { "api_name": "pptx.util.Inches", "line_number": 10, "usage_type": "call" }, { "api_name": "pptx.util.Inches", "line_number": 11, "usage_type": "call" }, { "api_name": "PIL.Image.open", ...
29920058064
from sklearn import metrics from Evaluation import eval_util from EvaluateDifficulty import DifficultyEvaluator from TrackDifficulty import TrackDifficulty import slopeMap as sm TEST_TILES_PATH = 'test_tiles\\' def get_model_predictions(tracks: list, shingle_length=1, neighbors=5) -> list: """ Gets the predi...
baraloni/NeedleInDataHaystack
Evaluation/eval_diffuculty.py
eval_diffuculty.py
py
2,523
python
en
code
0
github-code
18
[ { "api_name": "EvaluateDifficulty.DifficultyEvaluator", "line_number": 21, "usage_type": "call" }, { "api_name": "Evaluation.eval_util.get_exp_dataframe", "line_number": 34, "usage_type": "call" }, { "api_name": "Evaluation.eval_util", "line_number": 34, "usage_type": "na...
8493465530
#!/home/claytonblythe/anaconda3/bin/python from PIL import Image import glob from tqdm import tqdm import os import argparse from PIL import ImageFilter def get_args(): '''This function parses and return arguments passed in''' # Assign description to the help doc parser = argparse.ArgumentParser(descriptio...
claytonblythe/movie_colorify
processFrames.py
processFrames.py
py
2,767
python
en
code
3
github-code
18
[ { "api_name": "argparse.ArgumentParser", "line_number": 12, "usage_type": "call" }, { "api_name": "os.system", "line_number": 31, "usage_type": "call" }, { "api_name": "glob.glob", "line_number": 37, "usage_type": "call" }, { "api_name": "PIL.Image.new", "line...
39957817272
#!/usr/bin/env python # tsv2gaussian.py - given a TSV file of a particular shape and an integer, plot Gaussian clusters after doing PCA # configure PCA_COMPONENTS = 3 # require from sklearn.decomposition import PCA from sklearn.mixture import GaussianMixture import matplotlib.pyplot as plt import pandas as pd import...
ericleasemorgan/machine-learning
bin/tsv2gaussian.py
tsv2gaussian.py
py
1,626
python
en
code
2
github-code
18
[ { "api_name": "seaborn.set", "line_number": 13, "usage_type": "call" }, { "api_name": "sys.argv", "line_number": 17, "usage_type": "attribute" }, { "api_name": "sys.stderr.write", "line_number": 18, "usage_type": "call" }, { "api_name": "sys.stderr", "line_num...
36832174363
# -*- coding: utf-8 -*- import requests import json import random lista_cat = ["love","science","art","biographies","fantasy","romance","religion","recipes", "mystery","music", "medicine","history", "chilcren","sci-fi"] print('Dime la categoría') subject= raw_input() #selecionar por menus la que sea url = "https:/...
RexusWolf/OLib-Bot
OLib Programa/categorias.py
categorias.py
py
980
python
en
code
5
github-code
18
[ { "api_name": "requests.get", "line_number": 14, "usage_type": "call" }, { "api_name": "random.randrange", "line_number": 32, "usage_type": "call" } ]
37281455400
# This program calculates the Index of Coincidence in a text from collections import Counter import re import unicodedata #regex = re.compile(r"[a-zA-ZΆ-ώ]+") # regular expression: match all latin and greek letters regex = r"[a-zA-ZΆ-ώ]+" # this function removes all diacritics from input_str def remove_accents(inpu...
fotisAnagnostopoulos/CompCrypt
ic.py
ic.py
py
1,642
python
en
code
1
github-code
18
[ { "api_name": "unicodedata.normalize", "line_number": 28, "usage_type": "call" }, { "api_name": "unicodedata.combining", "line_number": 29, "usage_type": "call" }, { "api_name": "re.finditer", "line_number": 47, "usage_type": "call" }, { "api_name": "re.MULTILINE"...
74817359719
# -*- coding: utf-8 -*- from __future__ import print_function from __future__ import absolute_import import os import glob import imageio import scipy.misc as misc import numpy as np import copy as cp import matplotlib.pyplot as plt import matplotlib.image as img import pylab import tensorflow as tf def get_uninit...
falconjhc/W-Net
utilities/utils.py
utils.py
py
5,472
python
en
code
27
github-code
18
[ { "api_name": "tensorflow.errors", "line_number": 24, "usage_type": "attribute" }, { "api_name": "matplotlib.image", "line_number": 45, "usage_type": "name" }, { "api_name": "scipy.misc.imread", "line_number": 50, "usage_type": "call" }, { "api_name": "matplotlib....
20325250222
import math import sympy as sy def sy_func_to_lambda(f): x = sy.Symbol('x') print(f) f = lambda y: f.subs(x, y) return f def fitFunc(val, a, b, func_array): """ :param val: значение функции или х_0 :param a: левый конец отрезка :param b: правый конец отрезка :param func_array: фу...
SashaPavlenko/NumericalAnalys
Anya/funcs.py
funcs.py
py
1,452
python
en
code
0
github-code
18
[ { "api_name": "sympy.Symbol", "line_number": 5, "usage_type": "call" }, { "api_name": "sympy.Symbol", "line_number": 21, "usage_type": "call" } ]
33637527598
# pip install --upgrade python-gitlab import gitlab import os gl = gitlab.Gitlab(private_token="<token-gitlab-com>") glnew = gitlab.Gitlab('<URL-selfhosted-gitlab>', private_token="<token-selfhosted-gitlab>") gl.auth() glnew.auth() groups = gl.groups.list() for x in groups: print(x.id) newgrp = x.name.repl...
mmaks17/gitlab-migration
gtlabmigrator.py
gtlabmigrator.py
py
997
python
en
code
0
github-code
18
[ { "api_name": "gitlab.Gitlab", "line_number": 7, "usage_type": "call" }, { "api_name": "gitlab.Gitlab", "line_number": 8, "usage_type": "call" }, { "api_name": "os.system", "line_number": 24, "usage_type": "call" }, { "api_name": "os.system", "line_number": 25...
21835112255
import json from tuckshop.page.page_base import PageBase, VariableVerificationTypes from tuckshop.core.config import Config from tuckshop.app.models import Inventory, User from tuckshop.core.tuckshop_exception import TuckshopException from tuckshop.core.permission import Permission class Credit(PageBase): """Cla...
MatthewJohn/Tuckshop
tuckshop/page/credit.py
credit.py
py
3,809
python
en
code
3
github-code
18
[ { "api_name": "tuckshop.page.page_base.PageBase", "line_number": 10, "usage_type": "name" }, { "api_name": "tuckshop.core.permission.Permission.ACCESS_CREDIT_PAGE", "line_number": 16, "usage_type": "attribute" }, { "api_name": "tuckshop.core.permission.Permission", "line_numb...
7580869504
from .stats import ( compute_year_histogram, compute_author_histogram, compute_author_affiliation_histogram, compute_language_histogram, compute_number_authors_histogram, compute_source_histogram, compute_source_type_histogram, compute_affiliation_histogram, compute_country_histogram...
NLeSC/litstudy
litstudy/plot.py
plot.py
py
11,826
python
en
code
112
github-code
18
[ { "api_name": "pandas.DataFrame", "line_number": 31, "usage_type": "attribute" }, { "api_name": "matplotlib.pyplot.gca", "line_number": 79, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 79, "usage_type": "name" }, { "api_name": "numpy.a...
38029270093
# import asyncio # import aiomysql # loop = asyncio.get_event_loop() #返回当前 OS 线程中正在运行的事件循环 # async def test_example(): # conn = await aiomysql.connect( # host='127.0.0.1', # port=3306, # user='root', # password='newpassword', # db='demo', # loop=loop) # cur = aw...
leezhijun/python-blog
sqlpool.py
sqlpool.py
py
1,986
python
en
code
0
github-code
18
[ { "api_name": "asyncio.get_event_loop", "line_number": 28, "usage_type": "call" }, { "api_name": "sqlalchemy.MetaData", "line_number": 30, "usage_type": "call" }, { "api_name": "sqlalchemy.Table", "line_number": 31, "usage_type": "call" }, { "api_name": "sqlalchem...
37767761668
from flask import Flask, escape, Response, request app = Flask(__name__) @app.route('/griffon/log', methods=['POST', 'GET']) def logs(): print("{}".format(request.data)) return Response("Received logs successfully") if __name__ == '__main__': app.run(host="10.41.26.183", port=8080)
sarabjit-saini/griffon-poc
provider/src/http_server.py
http_server.py
py
293
python
en
code
0
github-code
18
[ { "api_name": "flask.Flask", "line_number": 2, "usage_type": "call" }, { "api_name": "flask.request.data", "line_number": 6, "usage_type": "attribute" }, { "api_name": "flask.request", "line_number": 6, "usage_type": "name" }, { "api_name": "flask.Response", "...
2317473009
import json import boto3 from datetime import datetime import pandas as pd import os import sys from urllib.parse import unquote_plus s3_client = boto3.client('s3') def lambda_handler(event, context): print("lambda function invoked") for record in event['Records']: bucket = record['s3...
kikiiiiiiiiiiiiiii/ETL-project
lambda_python_s3/lambda.py
lambda.py
py
4,332
python
en
code
0
github-code
18
[ { "api_name": "boto3.client", "line_number": 10, "usage_type": "call" }, { "api_name": "urllib.parse.unquote_plus", "line_number": 16, "usage_type": "call" }, { "api_name": "os.listdir", "line_number": 23, "usage_type": "call" }, { "api_name": "os.listdir", "l...
6226618670
import os import torchvision from tensorboardX import SummaryWriter class Saver(): def __init__(self, opts): """ Saver class for saving 2D model, images, and write losses to tensorboard :param opts: """ self.model_dir = os.path.join(opts.result_dir, opts.name) ...
CherBass/ICAM
saver.py
saver.py
py
2,173
python
en
code
52
github-code
18
[ { "api_name": "os.path.join", "line_number": 11, "usage_type": "call" }, { "api_name": "os.path", "line_number": 11, "usage_type": "attribute" }, { "api_name": "os.path.join", "line_number": 12, "usage_type": "call" }, { "api_name": "os.path", "line_number": 1...
3687218247
""" Unit tests for skycomponents """ import logging import unittest import astropy.units as u import numpy from astropy.coordinates import SkyCoord from rascil.data_models.polarisation import PolarisationFrame from rascil.processing_components.simulation import ( create_low_test_skycomponents_from_gleam, ) from...
NLESC-quantum/rascil
tests/processing_components/test_skycomponent.py
test_skycomponent.py
py
10,260
python
en
code
0
github-code
18
[ { "api_name": "logging.getLogger", "line_number": 33, "usage_type": "call" }, { "api_name": "logging.WARNING", "line_number": 35, "usage_type": "attribute" }, { "api_name": "unittest.TestCase", "line_number": 38, "usage_type": "attribute" }, { "api_name": "rascil....
32940387369
# coding=utf-8 import scipy.io as sio from pylab import * from PIL import Image def code_Sort(code,k): func = lambda x, y: x if y in x else x + [y] codelist = reduce(func, [[], ] + code.tolist()) for i in range(code.shape[0]): for j in range(k): if code[i] == codelist[j]...
jadehh/-Impervious-Surface-Extraction-Algorithm-for-High-Resolution-Remote-Sensing-Image
fenge.py
fenge.py
py
3,010
python
en
code
5
github-code
18
[ { "api_name": "PIL.Image.open", "line_number": 33, "usage_type": "call" }, { "api_name": "PIL.Image", "line_number": 33, "usage_type": "name" }, { "api_name": "PIL.Image.fromarray", "line_number": 81, "usage_type": "call" }, { "api_name": "PIL.Image", "line_nu...
25637483910
import asyncio import json from asyncio import AbstractEventLoop from typing import AsyncIterator, Callable import aioredis import pytest import pytest_asyncio from aioredis import Redis from elasticsearch import AsyncElasticsearch from elasticsearch.helpers import async_bulk from httpx import AsyncClient from db imp...
lizatish/Async_API_sprint_2
tests/functional/conftest.py
conftest.py
py
4,589
python
en
code
0
github-code
18
[ { "api_name": "tests.functional.config.get_settings", "line_number": 24, "usage_type": "call" }, { "api_name": "json.load", "line_number": 31, "usage_type": "call" }, { "api_name": "elasticsearch.AsyncElasticsearch", "line_number": 40, "usage_type": "name" }, { "a...
37772878049
# Author J'yrens Christenvie , Please acknowledge the author if you are using his code for your game import pygame class Ship: """A class to manage a ship behavior """ def __init__(self,tg_game): """Initialize the ship and set its starting position """ # Take the screen settings and ...
christenvie/Target_shoot_game
ship.py
ship.py
py
1,728
python
en
code
2
github-code
18
[ { "api_name": "pygame.image.load", "line_number": 16, "usage_type": "call" }, { "api_name": "pygame.image", "line_number": 16, "usage_type": "attribute" } ]
4162038285
from sklearn.linear_model import ElasticNet from sklearn.model_selection import train_test_split from egeaML.egeaML import DataIngestion from sklearn.pipeline import Pipeline from sklearn.preprocessing import StandardScaler raw_data = DataIngestion( df='/content/drive/MyDrive/Machine Learning/Bocconi - Feb 2021/L...
andreagiussani/amlp-bocconi-2021
miscellanea/elastic_net.py
elastic_net.py
py
976
python
en
code
4
github-code
18
[ { "api_name": "egeaML.egeaML.DataIngestion", "line_number": 8, "usage_type": "call" }, { "api_name": "sklearn.model_selection.train_test_split", "line_number": 18, "usage_type": "call" }, { "api_name": "sklearn.preprocessing.StandardScaler", "line_number": 22, "usage_type...
36271594435
""" @file utils.py @author Jianfei Guo, Shanghai AI Lab @brief Utilities for (voxel)-grid-based neural network modules. """ import numpy as np from enum import Enum from typing import Union from numbers import Number import torch import torch.nn.functional as F def gridsample1d_by2d(input: torch.Tensor, grid: tor...
PJLab-ADG/nr3d_lib
models/grids/utils.py
utils.py
py
7,897
python
en
code
122
github-code
18
[ { "api_name": "torch.Tensor", "line_number": 15, "usage_type": "attribute" }, { "api_name": "torch.stack", "line_number": 31, "usage_type": "call" }, { "api_name": "torch.nn.functional.grid_sample", "line_number": 32, "usage_type": "call" }, { "api_name": "torch.n...
43084966387
from django import forms from .models import Loan class LoanAddForm(forms.ModelForm): class Meta: model = Loan fields = [ 'loan_name', 'loan_start_date', 'loan_starting_principal', 'loan_principal', 'loan_last_action_date', ...
rtanubra/loan_database
mysite/loans/forms.py
forms.py
py
485
python
en
code
0
github-code
18
[ { "api_name": "django.forms.ModelForm", "line_number": 4, "usage_type": "attribute" }, { "api_name": "django.forms", "line_number": 4, "usage_type": "name" }, { "api_name": "models.Loan", "line_number": 7, "usage_type": "name" }, { "api_name": "django.forms.Form",...
37335831228
import numpy as np from enum import IntEnum import matplotlib.pyplot as plt global_variable_counter = 0 class Operation(IntEnum): S_ADD = 0 S_SUB = 1 S_MUL = 2 S_DIV = 3 M_ADD = 4 M_SUB = 5 M_MUL = 6 M_ELM = 7 M_ELD = 8 S_SQR = 9 M_ESQ = 10 M_RDS = 11 M_TNP = 12 ...
AnthonyYao7/AnthonysAutodiff
ad.py
ad.py
py
11,770
python
en
code
0
github-code
18
[ { "api_name": "enum.IntEnum", "line_number": 8, "usage_type": "name" }, { "api_name": "numpy.ndarray", "line_number": 46, "usage_type": "attribute" }, { "api_name": "numpy.array", "line_number": 53, "usage_type": "call" }, { "api_name": "numpy.square", "line_n...
11070776141
from typing import Tuple, List, Dict, Optional, Union from pathlib import Path, PosixPath import math import pandas as pd import numpy as np import matplotlib.pyplot as plt from tqdm import tqdm from scipy.signal import savgol_filter def process_all_dlc_tracking_h5s_with_default_settings(input_directory_with_dlc_trac...
Defense-Circuits-Lab/Gait_Analysis
gait3d/gaitanalysis_with_top_cam.py
gaitanalysis_with_top_cam.py
py
65,484
python
en
code
4
github-code
18
[ { "api_name": "pathlib.Path", "line_number": 11, "usage_type": "name" }, { "api_name": "pathlib.Path", "line_number": 13, "usage_type": "name" }, { "api_name": "tqdm.tqdm", "line_number": 19, "usage_type": "call" }, { "api_name": "typing.List", "line_number": ...
33522990263
from PIL import Image import os from tqdm import tqdm ''' 由于部分的face_dataset的图片的格式是32位位深,但是在我的网络网络卷积中只有三层无法进行4层的卷积。 ''' def convert_to_24bit_depth(input_dir, output_dir): # 确保输出目录存在 if not os.path.exists(output_dir): os.makedirs(output_dir) # 获取输入目录中的图片文件列表 image_files = [f for f in os.listdi...
Cans518/face-yolox
conver.py
conver.py
py
1,175
python
zh
code
1
github-code
18
[ { "api_name": "os.path.exists", "line_number": 12, "usage_type": "call" }, { "api_name": "os.path", "line_number": 12, "usage_type": "attribute" }, { "api_name": "os.makedirs", "line_number": 13, "usage_type": "call" }, { "api_name": "os.listdir", "line_number...
71937973161
import numpy as np import onnxruntime from tqdm import tqdm import os from PIL import Image import argparse import psutil import gpizero import telnetlib as tel import time #argument parser parser = argparse.ArgumentParser(description='EE379K project - Deployment code') parser.add_argument('--model', type...
jacobDeutsch10/EE379K-Project
MC1/delpoy_onnx.py
delpoy_onnx.py
py
3,599
python
en
code
0
github-code
18
[ { "api_name": "argparse.ArgumentParser", "line_number": 13, "usage_type": "call" }, { "api_name": "onnxruntime.InferenceSession", "line_number": 21, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 32, "usage_type": "call" }, { "api_name": "nump...
73341412201
# coding=utf-8 """ @Author:lynn example: python3 terminal_predict.py \ --model_type bert \ --labels ./labels.txt \ --output_dir germeval \ --max_seq_length 128 \ When console displays 'Input chinese sentence:', then you input some sentences and get pos result. More detail see ./example/how_to_us...
grallage/transformers-chinese-pos
terminal_predict.py
terminal_predict.py
py
9,833
python
en
code
1
github-code
18
[ { "api_name": "transformers.TF_MODEL_FOR_TOKEN_CLASSIFICATION_MAPPING.keys", "line_number": 38, "usage_type": "call" }, { "api_name": "transformers.TF_MODEL_FOR_TOKEN_CLASSIFICATION_MAPPING", "line_number": 38, "usage_type": "name" }, { "api_name": "absl.flags.DEFINE_string", ...
21106450604
import unittest import torch import torch.nn as nn import torch.nn.functional as F # Ask lazy backend to use Pytorch's JIT as # lazy backend's executor. from torch._lazy.ts_backend import init as init_ts_backend init_ts_backend() # Handle ORT dependencies. import onnxruntime as ort # noqa: E402 from onnxruntime.ca...
microsoft/onnxruntime
orttraining/orttraining/test/python/orttraining_test_lort.py
orttraining_test_lort.py
py
4,026
python
en
code
9,700
github-code
18
[ { "api_name": "torch._lazy.ts_backend.init", "line_number": 11, "usage_type": "call" }, { "api_name": "onnxruntime.capi._pybind_state.register_ort_as_torch_jit_executor", "line_number": 18, "usage_type": "call" }, { "api_name": "onnxruntime.capi._pybind_state", "line_number":...