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
25914136421
import json from requests import RequestException from urllib3.exceptions import NewConnectionError from healthchecktest import settings import requests import unittest PROTOCOL = 'https' if settings.TARGET_USE_HTTPS else 'http' PORT = settings.TARGET_PORT HOST = settings.TARGET_HOST PATH = settings.TARGET_PATH TIM...
Telmediq/healthcheck-test
healthchecktest/test_healthcheck.py
test_healthcheck.py
py
1,077
python
en
code
0
github-code
97
[ { "api_name": "healthchecktest.settings.TARGET_USE_HTTPS", "line_number": 11, "usage_type": "attribute" }, { "api_name": "healthchecktest.settings", "line_number": 11, "usage_type": "name" }, { "api_name": "healthchecktest.settings.TARGET_PORT", "line_number": 12, "usage_...
38280079946
#!/usr/bin/env python3 from PIL import Image import face_recognition import argparse import os # from face_recognition examples: https://github.com/ageitgey/face_recognition/blob/master/examples/find_faces_in_picture.py # parsing arguments parser = argparse.ArgumentParser() parser.add_argument("-i", "--input", type=s...
ulrikah/imani
find_faces.py
find_faces.py
py
1,711
python
en
code
0
github-code
97
[ { "api_name": "argparse.ArgumentParser", "line_number": 10, "usage_type": "call" }, { "api_name": "face_recognition.load_image_file", "line_number": 20, "usage_type": "call" }, { "api_name": "face_recognition.face_locations", "line_number": 25, "usage_type": "call" }, ...
36365760276
import torch.nn.functional as F def train(model, device, dataloader, optimizer, steps, log_steps, print_flag): """ Train the model. Args: model: Model to train. device: Device to run the model. dataloader: Dataloader of train data. optimizer: Optimizer for training. ...
Ascend/samples
python/level1_single_api/9_amct/amct_pytorch/tensor_decompose/src/common/train.py
train.py
py
1,062
python
en
code
78
github-code
97
[ { "api_name": "torch.nn.functional.nll_loss", "line_number": 24, "usage_type": "call" }, { "api_name": "torch.nn.functional", "line_number": 24, "usage_type": "name" } ]
17987747526
import io import base64 import logging from reportlab.pdfbase import pdfmetrics, ttfonts from reportlab.pdfbase import pdfmetrics from reportlab.pdfgen import canvas from reportlab.lib.units import cm from PyPDF2 import PdfFileWriter, PdfFileReader from odoo import fields, models from io import BytesIO from PIL import ...
13655699934/melon_addons
watermark_design/models/watermark.py
watermark.py
py
6,055
python
en
code
4
github-code
97
[ { "api_name": "logging.getLogger", "line_number": 15, "usage_type": "call" }, { "api_name": "odoo.models.AbstractModel", "line_number": 18, "usage_type": "attribute" }, { "api_name": "odoo.models", "line_number": 18, "usage_type": "name" }, { "api_name": "base64.b...
42216908317
import json import logging import os from functools import partial from pathlib import Path from typing import Optional from mpu.card_market_client import (CardMarketClient, get_conditions, get_language_id) logger = logging.getLogger(__name__) def get_market_extract_path(market_e...
TanguyLe/MagicPriceUpdater
mpu/market_extract.py
market_extract.py
py
6,376
python
en
code
0
github-code
97
[ { "api_name": "logging.getLogger", "line_number": 11, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_number": 14, "usage_type": "name" }, { "api_name": "os.mkdir", "line_number": 17, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_numb...
740182988
""" -*- coding = utf-8 -*- @time:2022-04-11 19:24 @Author:Tony.SeoiHong.AuYeung @File:settings.py @Software:PyCharm """ import torch_geometric as tg import torch tg.seed.seed_everything(2022) epoch = 200 lr = 0.001 dropout = 0. batch_size = None hidden_size = 32 latent_size = 16 num_patches = 10 # mi...
tonyauyeung/Local2GAE2Global
L2G2L/settings.py
settings.py
py
633
python
en
code
0
github-code
97
[ { "api_name": "torch_geometric.seed.seed_everything", "line_number": 10, "usage_type": "call" }, { "api_name": "torch_geometric.seed", "line_number": 10, "usage_type": "attribute" }, { "api_name": "torch.device", "line_number": 24, "usage_type": "call" } ]
12241138192
import pandas as pd import matplotlib.pyplot as plt import numpy as np import PIL import csv import glob def storageImg(files): images = [PIL.Image.open(file) for file in files] return images def csvWriter(fil_name, nparray): example = nparray.tolist() with open(fil_name+'.csv', 'w', newline='') as cs...
nickgs1337/rebornway-nasa
scripts/models/nasa_satelite.py
nasa_satelite.py
py
16,965
python
en
code
0
github-code
97
[ { "api_name": "PIL.Image.open", "line_number": 9, "usage_type": "call" }, { "api_name": "PIL.Image", "line_number": 9, "usage_type": "attribute" }, { "api_name": "csv.writer", "line_number": 15, "usage_type": "call" }, { "api_name": "numpy.array", "line_number...
31135450707
try: from dna.data_base import DataBase except ImportError: print("Need to fix the installation") raise ''' BatchRun Command. command: run <@batch_name> ''' class RunCommand: def __init__(self, args): data_base = DataBase() name = args[0][1:] self.__commands = data_base.get_co...
railadonnebaum/DNA-Analyzer-project
Batch/run_command.py
run_command.py
py
390
python
en
code
5
github-code
97
[ { "api_name": "dna.data_base.DataBase", "line_number": 15, "usage_type": "call" } ]
40748553065
import json import os import requests import logging from datetime import datetime from airflow.utils.email import send_email log = logging.getLogger(__name__) OUTPUT_DIR = os.environ.get("AV_OUTPUT_DIR", default='/opt/output') VIDEO_LIST = os.path.join(OUTPUT_DIR, 'videofiles.json') AMS_API = os.environ.get("AMS_A...
BlinkenOSA/workflows
airflow/dags/av_tasks/push_to_ams.py
push_to_ams.py
py
2,540
python
en
code
4
github-code
97
[ { "api_name": "logging.getLogger", "line_number": 10, "usage_type": "call" }, { "api_name": "os.environ.get", "line_number": 12, "usage_type": "call" }, { "api_name": "os.environ", "line_number": 12, "usage_type": "attribute" }, { "api_name": "os.path.join", "...
72561936640
import io import os from argparse import ArgumentParser from django.core.management import BaseCommand from django.core.management.base import OutputWrapper from django.core.management.color import no_style from django.template.loader import render_to_string from django.utils.translation import gettext as _ from df_c...
d9pouces/df_config
df_config/management/commands/config.py
config.py
py
7,608
python
en
code
5
github-code
97
[ { "api_name": "django.core.management.BaseCommand", "line_number": 23, "usage_type": "name" }, { "api_name": "argparse.ArgumentParser", "line_number": 35, "usage_type": "name" }, { "api_name": "df_config.utils.remove_arguments_from_help", "line_number": 45, "usage_type": ...
2445457462
# -*- coding:UTF-8 -*- """ ------------------------------------------------- File Name: SoldHouseCrawler.py Description : to crawler sold house from http://house.ksou.cn/p.php Author : elvisfang date: 2017/8/2 ------------------------------------------------- Change Activity: ...
elvisfang/PropertyDataAU
Crawler/SoldHouseCrawler.py
SoldHouseCrawler.py
py
9,740
python
en
code
0
github-code
97
[ { "api_name": "basecrawler.BaseCrawler", "line_number": 29, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_number": 55, "usage_type": "argument" }, { "api_name": "re.compile", "line_number": 67, "usage_type": "call" }, { "api_name": "re.compile",...
29255401599
from __future__ import print_function import tifffile import argparse import numpy as np from copy import deepcopy import math import neuroglancer ap = argparse.ArgumentParser() ap.add_argument( '-a', '--bind-address', help='Bind address for Python web server. Use 127.0.0.1 (the default) to restrict acc...
codestorm177/neuroglancer_tools
overlay.py
overlay.py
py
6,306
python
en
code
0
github-code
97
[ { "api_name": "argparse.ArgumentParser", "line_number": 11, "usage_type": "call" }, { "api_name": "neuroglancer.set_server_bind_address", "line_number": 21, "usage_type": "call" }, { "api_name": "neuroglancer.set_static_content_source", "line_number": 23, "usage_type": "c...
8356237497
from django.db.models import Count, Sum from django.utils import timezone from rest_framework.generics import GenericAPIView from rest_framework.response import Response from accounts.models import Group from competitions.api.serializers import CompetitionSerizlizers from competitions.models import (AnswerRecords, Com...
ChenXuFeng/playing
stats/views.py
views.py
py
3,805
python
en
code
0
github-code
97
[ { "api_name": "rest_framework.generics.GenericAPIView", "line_number": 12, "usage_type": "name" }, { "api_name": "competitions.models.get_active_competition", "line_number": 28, "usage_type": "call" }, { "api_name": "competitions.models.Competitions", "line_number": 34, "...
3388757030
############################################################ # #dataAnalyser.py # ############################################################ # # Author: romano <sromanos@cern.ch> # # May 2013 # # Goal: # - Produce the evolution plots for: LV, temp, reference voltage, HV, HVset and DeltaHV # # Input parameters are:...
JackyMYL/Tile-CIS-group
TUCS/workers/HV/dataAnalyser.py
dataAnalyser.py
py
23,719
python
en
code
0
github-code
97
[ { "api_name": "datetime.datetime.now", "line_number": 49, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 49, "usage_type": "attribute" }, { "api_name": "sys.stdout.write", "line_number": 330, "usage_type": "call" }, { "api_name": "sys.st...
30071698248
from Body.listen import Listen from Body.speak import speak from Features.clap import Tester Tester() # speak("Welcome Sohal i am MARK 2.0 ") import speech_recognition as sr import os from mark import MainExe def Listen(): r = sr.Recognizer() with sr.Microphone() as source : pri...
Sohal-Rahaman/Mark-1.0
main.py
main.py
py
807
python
en
code
0
github-code
97
[ { "api_name": "Features.clap.Tester", "line_number": 5, "usage_type": "call" }, { "api_name": "speech_recognition.Recognizer", "line_number": 14, "usage_type": "call" }, { "api_name": "speech_recognition.Microphone", "line_number": 16, "usage_type": "call" }, { "a...
7737768761
import os import tweepy import json from pprint import pprint # fetch the secrets from our virtual environment variables CONSUMER_KEY = os.environ['CONSUMER_KEY'] CONSUMER_SECRET = os.environ['CONSUMER_SECRET'] ACCESS_TOKEN = os.environ['ACCESS_TOKEN'] ACCESS_SECRET = os.environ['ACCESS_SECRET'] # authenticate to th...
rlpmeredith/CNCapstone
hashtagmap/tweetstosql.py
tweetstosql.py
py
745
python
en
code
0
github-code
97
[ { "api_name": "os.environ", "line_number": 8, "usage_type": "attribute" }, { "api_name": "os.environ", "line_number": 9, "usage_type": "attribute" }, { "api_name": "os.environ", "line_number": 10, "usage_type": "attribute" }, { "api_name": "os.environ", "line_...
73843165438
from datetime import timedelta from ebedke.utils.date import on_workdays, days_lower_ascii from ebedke.utils.http import get_dom from ebedke.utils.text import remove_accents, pattern_slice from ebedke.pluginmanager import EbedkePlugin URL = "http://www.magyarqtr.com/index.php?option=com_k2&view=item&layout=item&id=13...
ijanos/ebedke
ebedke/plugins/magyarqtr.py
magyarqtr.py
py
1,249
python
en
code
34
github-code
97
[ { "api_name": "ebedke.utils.http.get_dom", "line_number": 13, "usage_type": "call" }, { "api_name": "ebedke.utils.text.remove_accents", "line_number": 20, "usage_type": "call" }, { "api_name": "ebedke.utils.text.pattern_slice", "line_number": 21, "usage_type": "call" },...
43334019667
import os import sys import argparse from pathlib import Path from pdf2image import convert_from_path from shutil import copyfile def convert(input_pdf_path, output_images_dir_path): print(input_pdf_path, output_images_dir_path) # poppler/binを環境変数PATHに追加する # poppler_dir = Path(__file__).parent.absolut...
xinii/src-python-tool
convert_pdf_jpg.py
convert_pdf_jpg.py
py
1,561
python
en
code
0
github-code
97
[ { "api_name": "pathlib.Path", "line_number": 16, "usage_type": "call" }, { "api_name": "pdf2image.convert_from_path", "line_number": 19, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_number": 22, "usage_type": "call" }, { "api_name": "argparse.Argume...
17105005162
from datetime import datetime import os import configparser import sys import shutil from requests_oauthlib import OAuth1Session from distutils.dir_util import copy_tree # 現ディレクトリ os.chdir(os.path.dirname(os.path.abspath(__file__))) # config.ini読み込み config = configparser.ConfigParser() config.read("config.ini") # ファ...
Qman11010101/FakeBlogGenerator
main.py
main.py
py
4,175
python
ja
code
0
github-code
97
[ { "api_name": "os.chdir", "line_number": 10, "usage_type": "call" }, { "api_name": "os.path.dirname", "line_number": 10, "usage_type": "call" }, { "api_name": "os.path", "line_number": 10, "usage_type": "attribute" }, { "api_name": "os.path.abspath", "line_num...
11589332281
""" 直接在 ipython 里复制输出结果 参考: https://blog.michaelyin.info/send-content-to-clipboard-in-ipython/ https://gist.github.com/bwagner/270da7c7d31af7ffaca32674557fc172 Add copy to clipboard from IPython! To install, just copy it to your profile/startup directory, typically: ~/.ipython/profile_default/startup/ Example usa...
PegasusWang/linux_config
ipython/clip_magic.py
clip_magic.py
py
2,378
python
en
code
213
github-code
97
[ { "api_name": "sys.platform.startswith", "line_number": 45, "usage_type": "call" }, { "api_name": "sys.platform", "line_number": 45, "usage_type": "attribute" }, { "api_name": "subprocess.Popen", "line_number": 47, "usage_type": "call" }, { "api_name": "subprocess...
9747895510
import pandas as pd import cv2 import numpy as np import time import mpi4py.MPI rank = mpi4py.MPI.COMM_WORLD.Get_rank() size = mpi4py.MPI.COMM_WORLD.Get_size() q=pd.read_csv('eeg_raw_values.csv').to_numpy() #print(q) task_list = range(len(q)) z=time.time() def fft_v(task,i): x=q[i] x = np.asarray(x, dtype=float) N...
AT1693/HPC_SurveyPaper_Clustering
HPC_SurveyPaper_ClusterComputing/codes/fft.py
fft.py
py
1,923
python
en
code
1
github-code
97
[ { "api_name": "mpi4py.MPI.MPI.COMM_WORLD.Get_rank", "line_number": 6, "usage_type": "call" }, { "api_name": "mpi4py.MPI.MPI", "line_number": 6, "usage_type": "attribute" }, { "api_name": "mpi4py.MPI", "line_number": 6, "usage_type": "name" }, { "api_name": "mpi4py...
39770269929
#!/usr/bin/env python # coding: utf-8 import datetime import time import numpy as np import pandas as pd import warnings import os import xlwings as xw import function warnings.filterwarnings("ignore") # 取消警告 data_path = os.getcwd() + "/Data" PCMapping = pd.read_excel(data_path + "/Profit Center Hierarchy Flattened ...
xinyuanma/pop
createpop.py
createpop.py
py
7,095
python
en
code
0
github-code
97
[ { "api_name": "warnings.filterwarnings", "line_number": 12, "usage_type": "call" }, { "api_name": "os.getcwd", "line_number": 14, "usage_type": "call" }, { "api_name": "pandas.read_excel", "line_number": 15, "usage_type": "call" }, { "api_name": "function.confirmv...
39491830799
#!/bin/env python # -*- coding: utf-8 -*- ## chart_window ## import gtk from cairo_canva import cairo_canva from background_plotter import background_plotter from legend_plotter import legend_plotter from mesh_plotter import mesh_plotter from charts_plotter import charts_plotter from complex_plotter import complex_plo...
s9gf4ult/track-deal
src/chart_window.py
chart_window.py
py
4,726
python
en
code
2
github-code
97
[ { "api_name": "gtk.Dialog", "line_number": 19, "usage_type": "call" }, { "api_name": "gtk.STOCK_CLOSE", "line_number": 19, "usage_type": "attribute" }, { "api_name": "gtk.RESPONSE_CANCEL", "line_number": 19, "usage_type": "attribute" }, { "api_name": "gtk.WIN_POS_...
1758939785
#! /usr/bin/env python """ Various stat functions. """ __author__ = 'Carlos Alberto Gomez Gonzalez' __all__ = ['descriptive_stats', 'frame_basic_stats', 'cube_basic_stats'] import numpy as np from matplotlib.pyplot import boxplot from matplotlib import pyplot as plt from ..var import get_annul...
vortex-exoplanet/VIP
vip_hci/stats/utils_stats.py
utils_stats.py
py
7,978
python
en
code
67
github-code
97
[ { "api_name": "numpy.mean", "line_number": 24, "usage_type": "call" }, { "api_name": "numpy.median", "line_number": 25, "usage_type": "call" }, { "api_name": "numpy.min", "line_number": 26, "usage_type": "call" }, { "api_name": "numpy.max", "line_number": 27, ...
26594332558
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Comment', fields=[ ...
RealGeeks/django-modelclone
sampleproject/posts/migrations/0001_initial.py
0001_initial.py
py
2,197
python
en
code
56
github-code
97
[ { "api_name": "django.db.migrations.Migration", "line_number": 8, "usage_type": "attribute" }, { "api_name": "django.db.migrations", "line_number": 8, "usage_type": "name" }, { "api_name": "django.db.migrations.CreateModel", "line_number": 14, "usage_type": "call" }, ...
31625275415
import serial # Import the serial module to communicate with Arduino import customtkinter as ctk # Import the customtkinter module to make the GUI look better #Appearance of GUI-------------------------------------------------- ctk.set_appearance_mode("system") ctk.set_default_color_theme("green") window = ctk.C...
Fledtrain/GripperGUIV2
GUI.py
GUI.py
py
2,696
python
en
code
0
github-code
97
[ { "api_name": "customtkinter.set_appearance_mode", "line_number": 4, "usage_type": "call" }, { "api_name": "customtkinter.set_default_color_theme", "line_number": 5, "usage_type": "call" }, { "api_name": "customtkinter.CTk", "line_number": 6, "usage_type": "call" }, {...
18755973836
import datetime import os import json def getCurrent_time(): current_time = str(datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')).replace(' ', '-').replace(':', '-') return current_time def run_observerWard(alive_Web): observerWardVul_list = [] observerWardFolder = "./Plugins/Vul/ObserverWard" ...
0x727/ShuiZe_0x727
Plugins/Vul/ObserverWard/ObserverWardApi.py
ObserverWardApi.py
py
2,025
python
en
code
3,283
github-code
97
[ { "api_name": "datetime.datetime.now", "line_number": 6, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 6, "usage_type": "attribute" }, { "api_name": "os.makedirs", "line_number": 16, "usage_type": "call" }, { "api_name": "os.system", ...
4824931933
import logging import time from os import environ as env, path from telegram import Update, InlineKeyboardMarkup, InlineKeyboardButton from telegram.ext import Updater, CommandHandler, MessageHandler, Filters, CallbackContext, CallbackQueryHandler, \ PicklePersistence import Lang import Tools import Styles from Ac...
chiririll/AchievementsBot
Bot/telegram_bot.py
telegram_bot.py
py
8,413
python
en
code
0
github-code
97
[ { "api_name": "logging.basicConfig", "line_number": 15, "usage_type": "call" }, { "api_name": "logging.INFO", "line_number": 15, "usage_type": "attribute" }, { "api_name": "logging.getLogger", "line_number": 16, "usage_type": "call" }, { "api_name": "time.time", ...
11613738730
from django.urls import path from . import views # register app here app_name = "education" urlpatterns = [ path('', views.index, name="index"), path('about_us/', views.about_us, name="about_us"), path('courses/', views.courses, name="courses"), path('contact/', views.contact, name="contact"), pat...
FAbrickA/django-pet-above
above/education/urls.py
urls.py
py
492
python
en
code
1
github-code
97
[ { "api_name": "django.urls.path", "line_number": 8, "usage_type": "call" }, { "api_name": "django.urls.path", "line_number": 9, "usage_type": "call" }, { "api_name": "django.urls.path", "line_number": 10, "usage_type": "call" }, { "api_name": "django.urls.path", ...
70272583680
import streamlit as st import pytesseract import openai from pytesseract import Output, TesseractError from functions import convert_pdf_to_txt_file, displayPDF from openai.embeddings_utils import get_embedding from sklearn.metrics.pairwise import cosine_similarity import numpy as np from streamlit_chat import message ...
majiajue/PDF-text-embeddings-chatgpt3.5-turbo
main.py
main.py
py
4,254
python
en
code
0
github-code
97
[ { "api_name": "openai.api_key", "line_number": 11, "usage_type": "attribute" }, { "api_name": "openai.Embedding.create", "line_number": 19, "usage_type": "call" }, { "api_name": "openai.Embedding", "line_number": 19, "usage_type": "attribute" }, { "api_name": "ope...
5945171634
import json try: import importlib.resources as importlib_resources except ImportError: import importlib_resources from .colors import Color class InvalidHexCodeError(Exception): pass def get_color(name): return palette.get(name) def rgb(r, g, b): return Color(rgb=(r, g, b)) def hsl(h, s, l)...
mrz1988/lilies
lilies/style/palette.py
palette.py
py
1,925
python
en
code
0
github-code
97
[ { "api_name": "colors.Color", "line_number": 19, "usage_type": "call" }, { "api_name": "colors.Color", "line_number": 23, "usage_type": "call" }, { "api_name": "json.load", "line_number": 43, "usage_type": "call" }, { "api_name": "importlib_resources.path", "l...
2178450747
from PIL import Image import os, re background='BSIS_2' project='BSIS_2' filenames = next(os.walk(f'result/{project}/'), (None, None, []))[2] # [] if no file # 打开所有PNG图像并将它们添加到一个列表中 images = [] for file_name in filenames: img = Image.open(f'result/{project}/{file_name}') images.append(img) # 保存为GIF动画 output...
Joe0120/AR-Augmentation-BBOX-Data-Generator
merge_img/merge2gif.py
merge2gif.py
py
599
python
en
code
0
github-code
97
[ { "api_name": "os.walk", "line_number": 6, "usage_type": "call" }, { "api_name": "PIL.Image.open", "line_number": 11, "usage_type": "call" }, { "api_name": "PIL.Image", "line_number": 11, "usage_type": "name" } ]
42144864821
import os import pathlib import time import numpy as np import pandas as pd import wandb from bowel.controller import Controller from bowel.data.data_loader import DataLoader from bowel.data.label_creator import LabelCreator from bowel.factories import instantiate_normalizers from bowel.utils.io import silence_libros...
adam-narozniak/BowelSoundsDetection
bowel/utils/measure_performance.py
measure_performance.py
py
2,787
python
en
code
0
github-code
97
[ { "api_name": "bowel.utils.reproducibility_utils.setup_seed", "line_number": 19, "usage_type": "call" }, { "api_name": "bowel.utils.io.silence_librosa_userwarnings", "line_number": 20, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_number": 22, "usage_type": ...
22009988860
import pytest import src.channel from src.auth import auth_register_v2 from src.channels import channels_create_v2 from src.other import clear_v1 from src.helper import load_data import src.error #channels_create_v1(auth_user_id, name, is_public) def test_token_invalid(): clear_v1() user1 = auth_register_v2('v...
merzmerz/UNSW-Dream
UNSW Dream/tests/channels_create_test.py
channels_create_test.py
py
1,587
python
en
code
0
github-code
97
[ { "api_name": "src.other.clear_v1", "line_number": 11, "usage_type": "call" }, { "api_name": "src.auth.auth_register_v2", "line_number": 12, "usage_type": "call" }, { "api_name": "pytest.raises", "line_number": 15, "usage_type": "call" }, { "api_name": "src.channe...
28347378649
import lib, libnat from random import random from lib import mcarlo from math import e, factorial, sqrt, pi, exp from itertools import chain from functools import partial def ej1_play(): perm = lib.permutacion(list(range(1, 101))) return sum(1 for (i, c) in enumerate(perm) if i + 1 == c) def ej1(n): """ https:/...
lucasea777/mys
g4.py
g4.py
py
1,822
python
en
code
1
github-code
97
[ { "api_name": "lib.permutacion", "line_number": 9, "usage_type": "call" }, { "api_name": "lib.media", "line_number": 20, "usage_type": "call" }, { "api_name": "lib.varianza", "line_number": 21, "usage_type": "call" }, { "api_name": "math.exp", "line_number": 2...
29390073802
from __future__ import print_function import sys import os import importlib import click import numpy as np import timeit import ast import sklearn.metrics.regression as reg import sklearn.model_selection._validation as skv import mlxtend.feature_selection.sequential_feature_selector as SFS # Infer the name of this p...
ADACS-Australia/ADACS-SS18B-EvdVelden
python/prism_adacs/prism_adacs/scripts/mlxtend_cuda_test.py
mlxtend_cuda_test.py
py
7,822
python
en
code
0
github-code
97
[ { "api_name": "os.path.abspath", "line_number": 15, "usage_type": "call" }, { "api_name": "os.path", "line_number": 15, "usage_type": "attribute" }, { "api_name": "os.path.join", "line_number": 15, "usage_type": "call" }, { "api_name": "os.path.dirname", "line...
74961267520
from collections import deque import sys, os, io, atexit input = lambda: sys.stdin.readline().rstrip('\r\n') stdout = io.BytesIO() sys.stdout.write = lambda s: stdout.write(s.encode("ascii")) atexit.register(lambda: os.write(1, stdout.getvalue())) # 230619 28069 김밥천국의 계단 # 정답코드 N, K = map(int, input().split()) cur...
Bluuubery/TIL
algorithm/boj/28069.py
28069.py
py
1,057
python
en
code
3
github-code
97
[ { "api_name": "sys.stdin.readline", "line_number": 4, "usage_type": "call" }, { "api_name": "sys.stdin", "line_number": 4, "usage_type": "attribute" }, { "api_name": "io.BytesIO", "line_number": 5, "usage_type": "call" }, { "api_name": "sys.stdout", "line_numb...
73439354880
# -*- coding: utf-8 -*- """ @JackeyGao Create at 2018-12-18 """ import json import traceback import os import jinja2 import arrow import shutil from urllib.parse import unquote from md import get_markdown loader = jinja2.FileSystemLoader(searchpath="templates") env = jinja2.Environment(loader=loader) def l...
jackeyGao/dayone2PDF
render.py
render.py
py
2,719
python
en
code
2
github-code
97
[ { "api_name": "jinja2.FileSystemLoader", "line_number": 17, "usage_type": "call" }, { "api_name": "jinja2.Environment", "line_number": 18, "usage_type": "call" }, { "api_name": "urllib.parse.unquote", "line_number": 34, "usage_type": "call" }, { "api_name": "json....
8240510971
#!env python3 import sys import os import re import time import json, yaml import subprocess import threading import codecs import traceback import string import xml.etree.ElementTree as ET from datetime import datetime from queue import Queue, Empty SCRIPT_PATH = os.path.dirname(os.path.abspath(__file__)) CONFIG_PATH...
LianKee/StrawFuzzer
StrawFuzzer/scripts/client.py
client.py
py
39,306
python
en
code
63
github-code
97
[ { "api_name": "os.path.dirname", "line_number": 16, "usage_type": "call" }, { "api_name": "os.path", "line_number": 16, "usage_type": "attribute" }, { "api_name": "os.path.abspath", "line_number": 16, "usage_type": "call" }, { "api_name": "os.path.join", "line...
11119720151
# coding: utf-8 """ Launch StaSh in a more flexible and reliable way. """ import sys import argparse module_names = ( 'stash', 'system.shcommon', 'system.shstreams', 'system.shscreens', 'system.shui', 'system.shui.base', 'system.shio', 'system.shiowrapper', 'system.shparsers', '...
ywangd/stash
launch_stash.py
launch_stash.py
py
3,116
python
en
code
1,864
github-code
97
[ { "api_name": "sys.modules", "line_number": 25, "usage_type": "attribute" }, { "api_name": "sys.modules.pop", "line_number": 27, "usage_type": "call" }, { "api_name": "sys.modules", "line_number": 27, "usage_type": "attribute" }, { "api_name": "argparse.ArgumentPa...
75027486400
import netCDF4 as nc4 import numpy as np from collections import OrderedDict from geo_Collection import geo_web as gs from geo_Collection import geo_self as gss from QAAV6GOCI import QAAv6 import os import glob import datetime import warnings import concurrent.futures import math from deco import * import multiprocessi...
lifeodyssey/RTDetection
geo_Collection/bbp_base.py
bbp_base.py
py
4,171
python
en
code
0
github-code
97
[ { "api_name": "warnings.filterwarnings", "line_number": 17, "usage_type": "call" }, { "api_name": "os.environ", "line_number": 18, "usage_type": "attribute" }, { "api_name": "os.chdir", "line_number": 24, "usage_type": "call" }, { "api_name": "glob.glob", "lin...
27538821101
from time import time from Crypto.Hash import SHA256 import json import requests class Blockchain(object): current_difficulty = 5 def __init__(self): self.current_transactions = [] self.chain = [] self.peers = [] self.peer_chains = [] self.transaction_pool = [] #...
hcyang1012/Blockchain_From_Zero
ch7_proof_of_work/Blockchain.py
Blockchain.py
py
3,948
python
en
code
0
github-code
97
[ { "api_name": "Crypto.Hash.SHA256.new", "line_number": 19, "usage_type": "call" }, { "api_name": "Crypto.Hash.SHA256", "line_number": 19, "usage_type": "name" }, { "api_name": "json.dumps", "line_number": 29, "usage_type": "call" }, { "api_name": "json.dumps", ...
18298030920
from scipy.io import wavfile from scipy import signal import dspalgorithm as dsp import numpy as np import matplotlib.pyplot as plt fs,x=wavfile.read('for1.wav') x=np.double(x) fp=1500 fs=3000 ap=3 as1=10 F=8000 N,wc=dsp.buttord(fp,fs,ap,as1,F) print(N) print(wc) b,a=signal.butter(N,wc) print(b) print...
karthikbgithub/filter-
pgm8.py
pgm8.py
py
473
python
en
code
0
github-code
97
[ { "api_name": "scipy.io.wavfile.read", "line_number": 6, "usage_type": "call" }, { "api_name": "scipy.io.wavfile", "line_number": 6, "usage_type": "name" }, { "api_name": "numpy.double", "line_number": 7, "usage_type": "call" }, { "api_name": "dspalgorithm.buttord...
1885143912
from django.conf.urls import patterns, url urlpatterns = patterns( 'logopedasur.facturacion.views', # url (<patron>, funcion, url) url(r'^facturas/add/$', 'facturas_add', name='facturas_add'), url(r'^facturas/edit/(?P<facturasitem_pk>\d+)/$', 'facturas_edit', name='facturas_edit'), url(r'^facturas...
acgallardo/logopedasur
logopedasur/logopedasur/facturacion/urls.py
urls.py
py
367
python
es
code
0
github-code
97
[ { "api_name": "django.conf.urls.patterns", "line_number": 4, "usage_type": "call" }, { "api_name": "django.conf.urls.url", "line_number": 7, "usage_type": "call" }, { "api_name": "django.conf.urls.url", "line_number": 8, "usage_type": "call" }, { "api_name": "djan...
39420532350
from __future__ import annotations from io import BufferedIOBase from pathlib import Path import socket from typing import BinaryIO, Optional, Union, overload @overload def get_bytes(_: None) -> None: ... @overload def get_bytes(_: "Union[bytes, str, Path, BinaryIO]") -> bytes: ... def get_bytes(src): ...
digital-asset/dazl-client
python/dazl/util/io.py
io.py
py
2,470
python
en
code
10
github-code
97
[ { "api_name": "typing.overload", "line_number": 9, "usage_type": "name" }, { "api_name": "typing.overload", "line_number": 14, "usage_type": "name" }, { "api_name": "pathlib.Path", "line_number": 31, "usage_type": "argument" }, { "api_name": "io.BufferedIOBase", ...
1971293770
import random import secrets import lxml.etree file = 'file.rbxlx' doc = lxml.etree.parse(file) def uniqueId(): print('UniqueId Unpatched') for el in doc.xpath("//UniqueId[@name='UniqueId']"): el.text = f'ILlmaijji{secrets.token_hex(110)}' doc.write(file) def referentt(): print('Referent Unpa...
hqnt/roblox-condo-discord-bot
condo uploader bot discord/unblacklister.py
unblacklister.py
py
691
python
en
code
1
github-code
97
[ { "api_name": "lxml.etree.etree.parse", "line_number": 8, "usage_type": "call" }, { "api_name": "lxml.etree.etree", "line_number": 8, "usage_type": "attribute" }, { "api_name": "lxml.etree", "line_number": 8, "usage_type": "name" }, { "api_name": "secrets.token_he...
43062421051
from __future__ import print_function, division from datetime import datetime import pprint import os import cPickle import sys import time import random import numpy as np import torch import torch.nn as nn import torch.nn.init import argparse import subprocess import utils from models import Seq2Seq, Searcher fro...
j-luo93/nmt
main.py
main.py
py
12,266
python
en
code
0
github-code
97
[ { "api_name": "utils.corpus.Corpus", "line_number": 26, "usage_type": "call" }, { "api_name": "utils.corpus", "line_number": 26, "usage_type": "attribute" }, { "api_name": "utils.vocab.Dictionary", "line_number": 32, "usage_type": "call" }, { "api_name": "utils.vo...
18197301219
import sys sys.path.append("..") from mathogen.mathogen import Surface, Rect, BLUE, RoundRect from typing import List ''' Test for the creating, and rendering of a rectangle ''' class RectTest(Surface): def construct(self): self.init(200, 200, "test.svg") rectangle: Rect = Rect({"p...
YummyOreo/mathogen
tests/objects/rect.py
rect.py
py
756
python
en
code
0
github-code
97
[ { "api_name": "sys.path.append", "line_number": 2, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 2, "usage_type": "attribute" }, { "api_name": "mathogen.mathogen.Surface", "line_number": 11, "usage_type": "name" }, { "api_name": "mathogen.mathog...
73355634878
# -*- coding: UTF-8 -*- from neo4j.v1 import GraphDatabase from com.neo4j.neo4j_phone import write_data def write_to_neo4j(id_list): uri = "bolt://localhost:11004" driver = GraphDatabase.driver(uri, auth=("neo4j", "123456")) my_neo4j = write_data.Neo4jHandler(driver) # node 节点写入 cypher_gephi = "ma...
tianjiansmile/ML_filght
com/neo4j/neo4j_phone/neo4j_to_gephi.py
neo4j_to_gephi.py
py
595
python
en
code
0
github-code
97
[ { "api_name": "neo4j.v1.GraphDatabase.driver", "line_number": 7, "usage_type": "call" }, { "api_name": "neo4j.v1.GraphDatabase", "line_number": 7, "usage_type": "name" }, { "api_name": "com.neo4j.neo4j_phone.write_data.Neo4jHandler", "line_number": 8, "usage_type": "call"...
27770917072
"""Weapon Info Revision ID: 47e613bcadac Revises: 294f1652fbb3 Create Date: 2021-10-09 22:38:38.674710 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic revision = '47e613bcadac' down_revision = '294f1652fbb3' branch_labels = None depends_on = None def upgrade() -> None: # ...
nicleary/MakeUC2021
app/db/migrations/versions/47e613bcadac_weapon_info.py
47e613bcadac_weapon_info.py
py
3,361
python
en
code
0
github-code
97
[ { "api_name": "alembic.op.create_table", "line_number": 16, "usage_type": "call" }, { "api_name": "alembic.op", "line_number": 16, "usage_type": "name" }, { "api_name": "sqlalchemy.Column", "line_number": 17, "usage_type": "call" }, { "api_name": "sqlalchemy.Integ...
3929839809
#For Google Colab Version #https://colab.research.google.com/drive/1oz8shKHjbXwDdqui_GtvQKvmT3vesTZW?usp=share_link from keras.models import Sequential from keras.layers import Input, Dense from keras.utils import to_categorical from sklearn.metrics import confusion_matrix import numpy as np #Create model by using se...
neokarn/computer_vision
example6_3_sequential_structure.py
example6_3_sequential_structure.py
py
1,174
python
en
code
4
github-code
97
[ { "api_name": "keras.models.Sequential", "line_number": 11, "usage_type": "call" }, { "api_name": "keras.layers.Dense", "line_number": 12, "usage_type": "call" }, { "api_name": "keras.layers.Dense", "line_number": 13, "usage_type": "call" }, { "api_name": "keras.l...
5263754237
from dash.dependencies import Input, Output, State import flask import os from app import dash_app import json import dash_dangerously_set_inner_html import dash_html_components as html from utils import makeJokeOrder, update_rating, create_connection from appConfig import jokes_folder, sqlite3_db from flask import Ses...
kennyrooney/recomBasic
callbacks.py
callbacks.py
py
3,153
python
en
code
0
github-code
97
[ { "api_name": "json.loads", "line_number": 20, "usage_type": "call" }, { "api_name": "dash_html_components.P", "line_number": 25, "usage_type": "call" }, { "api_name": "dash_dangerously_set_inner_html.DangerouslySetInnerHTML", "line_number": 29, "usage_type": "call" }, ...
16604969084
from datetime import datetime def insertionSort(a): #print("Previous: ",a) for i in range(1,len(a)): # iterate the array a from 2nd position to 2nd last element of the array key=a[i] j=i-1 while j>=0 and a[j]>key: # compare key with previous elements until the key is less #print("in while") a[j+1]=a[j] #...
nehaparbate/Algorithms
insertionSort.py
insertionSort.py
py
836
python
en
code
0
github-code
97
[ { "api_name": "datetime.datetime.now", "line_number": 17, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 17, "usage_type": "name" }, { "api_name": "datetime.datetime.now", "line_number": 19, "usage_type": "call" }, { "api_name": "datetim...
40485118644
import pytest try: from mindquantum.experimental import symengine except ImportError: pytest.skip("MindQuantum experimental C++ module not present", allow_module_level=True) def _ids(x): if isinstance(x, type): return x if isinstance(x, str): return f'{x}' if isinstance(x, set): ...
mindspore-ai/mindquantum
tests/st/test_experimental/test_symengine.py
test_symengine.py
py
1,857
python
en
code
48
github-code
97
[ { "api_name": "pytest.skip", "line_number": 6, "usage_type": "call" }, { "api_name": "mindquantum.experimental.symengine.symbols", "line_number": 27, "usage_type": "call" }, { "api_name": "mindquantum.experimental.symengine", "line_number": 27, "usage_type": "name" }, ...
45049263201
import discord from discord.ext import commands from discord.utils import get import json with open('config.json', 'r') as detailsFile: details_data = json.load(detailsFile) prefix_list = details_data['prefix_list'] main_prefix = details_data['main_prefix'] token = details_data['token'] status_link...
Mahas1/BotMan.py-rewritten
Scripts/Cogs/welcome.py
welcome.py
py
2,305
python
en
code
0
github-code
97
[ { "api_name": "json.load", "line_number": 7, "usage_type": "call" }, { "api_name": "discord.ext.commands.Cog", "line_number": 15, "usage_type": "attribute" }, { "api_name": "discord.ext.commands", "line_number": 15, "usage_type": "name" }, { "api_name": "json.dump...
34920888566
#!/usr/bin/python3 """gathers data from an API and exports it to CSV file""" if __name__ == "__main__": import requests import sys import csv user_req = requests.get("https://jsonplaceholder.typicode.com/users/{}". format(sys.argv[1])) user_name = user_req.json().get("...
Monange1/alx-system_engineering-devops
0x15-api/1-export_to_CSV.py
1-export_to_CSV.py
py
1,030
python
en
code
0
github-code
97
[ { "api_name": "requests.get", "line_number": 10, "usage_type": "call" }, { "api_name": "sys.argv", "line_number": 11, "usage_type": "attribute" }, { "api_name": "requests.get", "line_number": 13, "usage_type": "call" }, { "api_name": "sys.argv", "line_number":...
2467179209
from nsetools import Nse from bsedata.bse import BSE import json from conf import constants as const from classes import OLHBasicClass from datetime import datetime,date,timedelta from pprint import pprint nse = Nse() bse= BSE() ol_stocks = dict() oh_stocks = dict() for nse_stk,bse_stk in const.NSE_BSE_SYMBOLS.ite...
rajavaraparla1/Screener
testnsetools.py
testnsetools.py
py
4,541
python
en
code
1
github-code
97
[ { "api_name": "nsetools.Nse", "line_number": 11, "usage_type": "call" }, { "api_name": "bsedata.bse.BSE", "line_number": 12, "usage_type": "call" }, { "api_name": "conf.constants.NSE_BSE_SYMBOLS.items", "line_number": 17, "usage_type": "call" }, { "api_name": "con...
1427730893
# -*- coding: utf-8 -*- """ =============================================== 08. Epoching raw data based on conditions This code will epoch continuous MEG signal based on conditions saved in stim channel and generates an HTML report about epochs. written by Tara Ghafari adapted from flux pipeline ====================...
tghafari/mTBI-predict
MEG-analysis/Preprocessing/08_epoching.py
08_epoching.py
py
6,258
python
en
code
0
github-code
97
[ { "api_name": "mne_bids.BIDSPath", "line_number": 52, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 55, "usage_type": "call" }, { "api_name": "os.path", "line_number": 55, "usage_type": "name" }, { "api_name": "os.path.join", "line_numbe...
29504210459
from abc import ABC, abstractmethod import sqlite3 from sqlite3 import Error import random import os import mysql.connector class CoursesDatabase: """Initializes MySQL to connect to courses database""" def __init__(self): self.cnx = mysql.connector.connect( host = "localhost", ...
asriram1/Object-Oriented-Programming-College-Course-Reservation-Application
courses.py
courses.py
py
11,321
python
en
code
0
github-code
97
[ { "api_name": "mysql.connector.connector.connect", "line_number": 12, "usage_type": "call" }, { "api_name": "mysql.connector.connector", "line_number": 12, "usage_type": "attribute" }, { "api_name": "mysql.connector", "line_number": 12, "usage_type": "name" }, { "...
33138486539
from flask import request, jsonify, Flask import pickle import time import requests import pandas as pd import datetime from sklearn.model_selection import train_test_split from sklearn.ensemble import RandomForestRegressor from sklearn.metrics import mean_absolute_error # import tweepy app = Flask(__name__) # run th...
DevPriSha/Raksh
Machine Learning/app.py
app.py
py
4,931
python
en
code
1
github-code
97
[ { "api_name": "flask.Flask", "line_number": 12, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 24, "usage_type": "call" }, { "api_name": "datetime.datetime.now", "line_number": 24, "usage_type": "call" }, { "api_name": "datetime.datetime", ...
18414268547
from selenium import webdriver import time driver = webdriver.Firefox() driver.get("http://www.santostang.com/2018/07/04/hello-world/") time.sleep(3) driver.switch_to.frame(driver.find_element_by_css_selector("iframe[title='livere']")) comments = driver.find_elements_by_css_selector('div.reply-content') for eachc...
xiaoxuesheng-ok/learnpy
03python网络爬虫从入门到实践当当/第四章-动态网页抓取/3-selenium.py
3-selenium.py
py
1,171
python
en
code
0
github-code
97
[ { "api_name": "selenium.webdriver.Firefox", "line_number": 4, "usage_type": "call" }, { "api_name": "selenium.webdriver", "line_number": 4, "usage_type": "name" }, { "api_name": "time.sleep", "line_number": 8, "usage_type": "call" }, { "api_name": "time.sleep", ...
5125431827
from utils import db_connection from bson.objectid import ObjectId mongo_db = "domain_pulse_domains" mongo_collection = "domains" db = db_connection.get_db_handle(mongo_db) def get_source(source_id): collection = db[mongo_collection] query = {"sources.source_id": ObjectId(source_id)} resul...
COS301-SE-2023/Domain-Pulse-A-Sentiment-Analysis-Platform
backend/domains/utils/domainscrud.py
domainscrud.py
py
7,069
python
en
code
24
github-code
97
[ { "api_name": "utils.db_connection.get_db_handle", "line_number": 7, "usage_type": "call" }, { "api_name": "utils.db_connection", "line_number": 7, "usage_type": "name" }, { "api_name": "bson.objectid.ObjectId", "line_number": 13, "usage_type": "call" }, { "api_na...
5817953466
from configparser import ConfigParser from pathlib import Path import click ROOT = Path(__file__).parent @click.group() def config(): pass @config.command() @click.option('-t', '--token', prompt=True, hide_input=True, help='An explicit api token') @click.option('-c', '--config', default='~/.flagrc', help='fla...
mgerst/flag-slurper
flag_slurper/config.py
config.py
py
689
python
en
code
3
github-code
97
[ { "api_name": "pathlib.Path", "line_number": 6, "usage_type": "call" }, { "api_name": "click.group", "line_number": 9, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_number": 18, "usage_type": "call" }, { "api_name": "click.echo", "line_number": 1...
72821614720
import json from MyMQTT import * import random import time class My_heart_publisher(): def __init__(self, clientID, topic, broker, port): self.topic=topic self.client=MyMQTT(clientID, broker, port) self.__message={ "bn":"MQ5_sensor", "e":[{"n":"glass_infraction","u":...
jacopobr/car-2-smart
_test_publisher_/test_publisher_damages.py
test_publisher_damages.py
py
1,218
python
en
code
2
github-code
97
[ { "api_name": "random.randint", "line_number": 21, "usage_type": "call" }, { "api_name": "time.time", "line_number": 26, "usage_type": "call" }, { "api_name": "json.load", "line_number": 32, "usage_type": "call" }, { "api_name": "time.time", "line_number": 38,...
41732261826
#!/usr/bin/env python # coding=utf-8 from torchvision.ops import MultiScaleRoIAlign from torchvision.ops import roi_align class NewMultiScaleRoIAlign(MultiScaleRoIAlign): def __init__(self, featmap_names, output_size, sampling_ratio): super(NewMultiScaleRoIAlign, self).__init__( featmap_names...
Chrisa142857/PolarNet-GCdet
Faster RCNN/utils/pooler.py
pooler.py
py
1,147
python
en
code
9
github-code
97
[ { "api_name": "torchvision.ops.MultiScaleRoIAlign", "line_number": 7, "usage_type": "name" }, { "api_name": "torchvision.ops.roi_align", "line_number": 29, "usage_type": "call" } ]
14920558380
import pygame from pygame.sprite import Sprite import random from vector import Vector class Asteroid(Sprite): """A class to respresent a single asteroid""" def __init__(self, as_settings, screen, size, x, y): """Initialize the asteroid and its starting position""" super(Asteroid, self).__init...
adyoungblood/asteroids-APCSP
asteroid.py
asteroid.py
py
2,352
python
en
code
0
github-code
97
[ { "api_name": "pygame.sprite.Sprite", "line_number": 6, "usage_type": "name" }, { "api_name": "pygame.image.load", "line_number": 17, "usage_type": "call" }, { "api_name": "pygame.image", "line_number": 17, "usage_type": "attribute" }, { "api_name": "random.choice...
36169624274
from django import forms #from tinymce.widgets import TinyMCE from ckeditor.widgets import CKEditorWidget from .models import Post, Comment, CustomUser, ContactModel from django.contrib.auth.forms import UserCreationForm, UserChangeForm class CustomUserCreationForm(UserCreationForm): class Meta: model = C...
menhior/my_final_blog
main/forms.py
forms.py
py
5,210
python
en
code
0
github-code
97
[ { "api_name": "django.contrib.auth.forms.UserCreationForm", "line_number": 7, "usage_type": "name" }, { "api_name": "models.CustomUser", "line_number": 10, "usage_type": "name" }, { "api_name": "django.forms.Form", "line_number": 14, "usage_type": "attribute" }, { ...
28421090035
import numpy as N import tables as T import re import pymses from tempfile import mkstemp from os import listdir from os.path import basename, dirname from time import time from pymses.utils import constants as C from pymses.sources.ramses.output import RamsesOutput from pymses.sources.ramses.octree import CameraOctree...
samgeen/pymses_python3
pymses/analysis/visualization/AMRViewer/model/ramses.py
ramses.py
py
23,701
python
en
code
0
github-code
97
[ { "api_name": "pymses.utils.constants.year", "line_number": 24, "usage_type": "attribute" }, { "api_name": "pymses.utils.constants", "line_number": 24, "usage_type": "name" }, { "api_name": "pymses.utils.constants.Myr", "line_number": 24, "usage_type": "attribute" }, ...
42372758893
import re import logging from virttest import utils_config from virttest import utils_libvirtd from autotest.client import utils from autotest.client.shared import error def run(test, params, env): """ Test seccomp_sandbox parameter in qemu.conf. 1) Change seccomp_sandbox in qemu.conf; 2) Restart lib...
will-Do/tp-libvirt_v2v
libvirt/tests/src/conf_file/qemu_conf/seccomp_sandbox.py
seccomp_sandbox.py
py
3,253
python
en
code
0
github-code
97
[ { "api_name": "autotest.client.utils.run", "line_number": 31, "usage_type": "call" }, { "api_name": "autotest.client.utils", "line_number": 31, "usage_type": "name" }, { "api_name": "re.search", "line_number": 34, "usage_type": "call" }, { "api_name": "logging.deb...
18494328298
from __future__ import unicode_literals import datetime import os import subprocess def get_version(version=None): """Returns a PEP 440-compliant version number from VERSION.""" version = get_complete_version(version) # Now build the two parts of the version number: # main = X.Y[.Z] # sub = .dev...
benbaptist/minecraft-wrapper
wrapper/utils/version.py
version.py
py
3,368
python
en
code
73
github-code
97
[ { "api_name": "core.buildinfo.__version__", "line_number": 46, "usage_type": "argument" }, { "api_name": "core.buildinfo.__version__", "line_number": 47, "usage_type": "name" }, { "api_name": "core.buildinfo.__version__", "line_number": 49, "usage_type": "name" }, { ...
16528546188
# -*- coding: utf-8 -*- """ Created on Tue May 17 16:00:59 2022 @author: reinhardt """ import pandas as pd import os import matplotlib.pyplot as plt import numpy as np from os.path import dirname as up cwd = os.getcwd() wdir = up(cwd) os.chdir(wdir) import tools path = r'W:\users\reinhardt\RESI\locmofit-avg\250122...
jungmannlab/resi
model_free_avg/Increase_loc_prec.py
Increase_loc_prec.py
py
733
python
en
code
2
github-code
97
[ { "api_name": "os.getcwd", "line_number": 15, "usage_type": "call" }, { "api_name": "os.path.dirname", "line_number": 16, "usage_type": "call" }, { "api_name": "os.chdir", "line_number": 17, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": ...
20329118071
bl_info = { "name": "Filter Tracks", "author": "Sebastian Koenig, Andreas Schuster", "version": (1, 0), "blender": (2, 7, 2), "location": "Clip Editor > Filter Tracks", "description": "Filter out spikes in tracker curves", "warning": "", "wiki_url": "", "tracker_url": "", "category": "Movie Tracking...
sebastian-k/scripts
filter_tracks.py
filter_tracks.py
py
4,479
python
en
code
18
github-code
97
[ { "api_name": "mathutils.Vector", "line_number": 24, "usage_type": "call" }, { "api_name": "mathutils.Vector", "line_number": 38, "usage_type": "call" }, { "api_name": "bpy.ops.clip.clean_tracks", "line_number": 41, "usage_type": "call" }, { "api_name": "bpy.ops",...
37768390836
import os from flask import Flask, render_template from app.routes.home import home from app.routes.api import api def create_app(test_config=None): """Create and configure an instance of the Flask application.""" app = Flask(__name__, instance_relative_config=True) app.config.from_mapping( # a ...
Huarcaya/httpstatuscodes.org
app/__init__.py
__init__.py
py
989
python
en
code
1
github-code
97
[ { "api_name": "app.routes.home", "line_number": 11, "usage_type": "name" }, { "api_name": "flask.Flask", "line_number": 11, "usage_type": "call" }, { "api_name": "app.routes.home.config.from_mapping", "line_number": 12, "usage_type": "call" }, { "api_name": "app.r...
17752859417
from .admin import ContributionAdmin from .admin import ContributionResource from .admin import PrimaryFilter from .admin import ProgramResource from .admin import WeekFilter from .admin import YearFilter from .disa_import import _check_title from .disa_import import disa_import from .disa_import import validate from ....
Offener-Kanal-Merseburg-Querfurt/ok_tools
contributions/contributions_tests.py
contributions_tests.py
py
21,900
python
en
code
0
github-code
97
[ { "api_name": "django.contrib.auth.get_user_model", "line_number": 34, "usage_type": "call" }, { "api_name": "ok_tools.testing.DOMAIN", "line_number": 36, "usage_type": "name" }, { "api_name": "django.urls.reverse_lazy", "line_number": 36, "usage_type": "call" }, { ...
74936192317
import logging from abc import ABCMeta, abstractmethod from eth_abi import decode_abi from eth_abi.exceptions import InsufficientDataBytes from hexbytes import HexBytes from polyswarmartifact import ArtifactType from polyswarmclient.utils import int_to_bool_list, guid_as_string, sha3 logger = logging.getLogger(__nam...
CalebFenton/polyswarm-client
src/polyswarmclient/verifiers.py
verifiers.py
py
11,780
python
en
code
0
github-code
97
[ { "api_name": "logging.getLogger", "line_number": 11, "usage_type": "call" }, { "api_name": "hexbytes.HexBytes", "line_number": 53, "usage_type": "call" }, { "api_name": "hexbytes.HexBytes", "line_number": 55, "usage_type": "call" }, { "api_name": "polyswarmclient...
15254226020
# -*- coding: utf-8 -*- from bottle import ( route, run, template, view, request, post, get, redirect, abort ) import redis, random import datetime, time import json import func, mail, mail_deal r = redis.StrictRedis() @route('/') @view('templates/test') def main(): # 判断是否按访问量排序,0否 order_by = req...
ElevenDDH/GitTest
python/article-list/main.py
main.py
py
4,599
python
en
code
0
github-code
97
[ { "api_name": "redis.StrictRedis", "line_number": 21, "usage_type": "call" }, { "api_name": "bottle.request.query", "line_number": 27, "usage_type": "attribute" }, { "api_name": "bottle.request", "line_number": 27, "usage_type": "name" }, { "api_name": "bottle.req...
72621661120
import os import slack import logging from enum import Enum logger = logging.getLogger(__name__) def verify_priorities(channel_id, priorities, user_id): """ Changes the priority of a Google Cloud Support case. Parameters ---------- channel_id : str unique string used to idenify a Slack cha...
GoogleCloudPlatform/professional-services
tools/google-cloud-support-slackbot/verify_priorities.py
verify_priorities.py
py
1,519
python
en
code
2,602
github-code
97
[ { "api_name": "logging.getLogger", "line_number": 6, "usage_type": "call" }, { "api_name": "enum.Enum", "line_number": 30, "usage_type": "call" }, { "api_name": "slack.WebClient", "line_number": 31, "usage_type": "call" }, { "api_name": "os.environ.get", "line...
24868339742
""" PyTorch modules that have a custom backward pass. The forward pass is re-implemented in NumPy, since the modules here do not expose the stored results of the forward pass. """ from abc import ABC, abstractmethod from typing import Tuple import numpy as np import torch from scipy.special import expit from torch imp...
yidinghao/interpreting-nlp
interpret_nlp/modules/backprop_module.py
backprop_module.py
py
11,260
python
en
code
15
github-code
97
[ { "api_name": "abc.ABC", "line_number": 15, "usage_type": "name" }, { "api_name": "torch.Tensor", "line_number": 57, "usage_type": "attribute" }, { "api_name": "torch.Tensor", "line_number": 61, "usage_type": "attribute" }, { "api_name": "torch.Tensor", "line_...
31451926479
""" Callback HTTP server to handle Azure logins """ from http.server import HTTPServer, BaseHTTPRequestHandler from urllib.parse import urlparse, parse_qs class CallbackServer(HTTPServer): """ HTTP Server to handle OAuth callbacks """ timeout = 60 class CallbackHandler(BaseHTTPRequestHandler): ...
Bugzey/Resource-Allocator-Client
resource_allocator_client/callback.py
callback.py
py
1,471
python
en
code
0
github-code
97
[ { "api_name": "http.server.HTTPServer", "line_number": 9, "usage_type": "name" }, { "api_name": "http.server.BaseHTTPRequestHandler", "line_number": 16, "usage_type": "name" }, { "api_name": "urllib.parse.urlparse", "line_number": 23, "usage_type": "call" }, { "ap...
16054581722
from sympy import Sum n = int(input()) arr = sorted(list(map(int, input().split()))) start = 0 end = len(arr)-1 min = 1e9 while start < end: Sum = arr[start] + arr[end] # -2 4 -99 -1 98 -> -99 -2 -1 4 98 if abs(Sum) < min: min = abs(Sum) answer = arr[start], arr[end] if Sum == 0: ...
yuseok0215/Algorithm
Algorithm/정유석/정렬/백준/두용액.py
두용액.py
py
442
python
en
code
0
github-code
97
[ { "api_name": "sympy.Sum", "line_number": 12, "usage_type": "name" }, { "api_name": "sympy.Sum", "line_number": 13, "usage_type": "argument" }, { "api_name": "sympy.Sum", "line_number": 14, "usage_type": "argument" }, { "api_name": "sympy.Sum", "line_number": ...
39656318836
from flask import Flask, render_template, redirect, url_for, request app = Flask(__name__) @app.route('/') def welcome(): return render_template('index.html') @app.route('/success/<int:number>') def success(number): res="" if number>=50: res="PASS" else: res="FAIL" ...
Ayush-Balodi/Flask
Flask/app.py
app.py
py
898
python
en
code
0
github-code
97
[ { "api_name": "flask.Flask", "line_number": 2, "usage_type": "call" }, { "api_name": "flask.render_template", "line_number": 6, "usage_type": "call" }, { "api_name": "flask.render_template", "line_number": 18, "usage_type": "call" }, { "api_name": "flask.request.m...
32830306698
from django.shortcuts import render from . models import Eventform from . models import eventphoto from . models import calender from django.http import HttpResponse # Create your views here. def eve(request): return render(request, "Event.html") #this "eve" fuction is to recieve web request from user and redirec...
rokesh27/wadd
Eventp/views.py
views.py
py
1,904
python
en
code
0
github-code
97
[ { "api_name": "django.shortcuts.render", "line_number": 8, "usage_type": "call" }, { "api_name": "models.calender.objects.all", "line_number": 12, "usage_type": "call" }, { "api_name": "models.calender.objects", "line_number": 12, "usage_type": "attribute" }, { "a...
71729286079
import numpy as np import cv2 import math from scipy import ndimage img_before = cv2.imread('C:/Users/Dero/Desktop/baidu_captcha/vcode-spin-img108.png') cv2.imshow("Before", img_before) key = cv2.waitKey(0) img_gray = cv2.cvtColor(img_before, cv2.COLOR_BGR2GRAY) cv2.imshow("gray", img_gray) key = cv2.waitKey(0) img_...
DeroMadrid/New-Visual-Reasoning-Captcha
selenium_pa/rotation.py
rotation.py
py
1,097
python
en
code
3
github-code
97
[ { "api_name": "cv2.imread", "line_number": 6, "usage_type": "call" }, { "api_name": "cv2.imshow", "line_number": 8, "usage_type": "call" }, { "api_name": "cv2.waitKey", "line_number": 9, "usage_type": "call" }, { "api_name": "cv2.cvtColor", "line_number": 11, ...
9977890515
#!bin/python import json, logging, email, urllib import klein from twisted.web.client import getPage from twisted.internet.defer import inlineCallbacks logging.basicConfig(level=logging.WARN) CHECKVIST = "http://checkvist.com" config = json.load(open("config.json")) def tasksUri(): return CHECKVIST + "/checklist...
drewp/checkvistpost
checkvistpost.py
checkvistpost.py
py
1,454
python
en
code
0
github-code
97
[ { "api_name": "logging.basicConfig", "line_number": 6, "usage_type": "call" }, { "api_name": "logging.WARN", "line_number": 6, "usage_type": "attribute" }, { "api_name": "json.load", "line_number": 10, "usage_type": "call" }, { "api_name": "twisted.web.client.getP...
1334385207
# tweet collector class for pulling data from the rest API and writing to a SQLite database import logging import tweepy # initialize logger and set level logger = logging.getLogger(__name__) logger.setLevel(logging.INFO) # format of the logger formatter = logging.Formatter('%(levelname)s:%(name)s:%(message)s') # add ...
MLBurnham/covid_threat
twitter_api/tweet_collector.py
tweet_collector.py
py
3,360
python
en
code
1
github-code
97
[ { "api_name": "logging.getLogger", "line_number": 6, "usage_type": "call" }, { "api_name": "logging.INFO", "line_number": 7, "usage_type": "attribute" }, { "api_name": "logging.Formatter", "line_number": 9, "usage_type": "call" }, { "api_name": "logging.FileHandle...
6085815633
import logging import requests from nakhll.settings import KAVENEGAR_KEY from sms.models import SMS, SMSRequest logger = logging.getLogger(__name__) # only for test purposes def count_sms(): return SMS.objects.all().count() def create_sms(**kwargs): SMS.objects.create(**kwargs) def send_sms(Title, Descrip...
likecodingloveproblems/Nakhll
sms/services.py
services.py
py
3,420
python
en
code
2
github-code
97
[ { "api_name": "logging.getLogger", "line_number": 5, "usage_type": "call" }, { "api_name": "sms.models.SMS.objects.all", "line_number": 10, "usage_type": "call" }, { "api_name": "sms.models.SMS.objects", "line_number": 10, "usage_type": "attribute" }, { "api_name"...
30291247971
from pyVmomi import vim from vmwarelib import inventory from vmwarelib import checkinputs from vmwarelib.actions import BaseAction class VMCreateBareBones(BaseAction): def run(self, vm_name, cluster, datastore_cluster, datastore, resourcepool, cpu_size, ram_size, guestos, version, descrip...
StackStorm/st2contrib
packs/vsphere/actions/vm_hw_barebones_create.py
vm_hw_barebones_create.py
py
4,747
python
en
code
154
github-code
97
[ { "api_name": "vmwarelib.actions.BaseAction", "line_number": 8, "usage_type": "name" }, { "api_name": "vmwarelib.checkinputs.one_of_two_strings", "line_number": 37, "usage_type": "call" }, { "api_name": "vmwarelib.checkinputs", "line_number": 37, "usage_type": "name" },...
44256786476
# Save split data of train-test import os import numpy as np import matplotlib.pyplot as plt import sklearn from sklearn.model_selection import train_test_split # Read the input data dirname = os.path.dirname(__file__) input_data = dirname + '/energy-data.txt' ip_file = np.loadtxt(input_data) # Random...
graylevel255/Deep_Learning
Assign-1_BackPropagation/Backprop_multiLabel/split_Data.py
split_Data.py
py
730
python
en
code
0
github-code
97
[ { "api_name": "os.path.dirname", "line_number": 10, "usage_type": "call" }, { "api_name": "os.path", "line_number": 10, "usage_type": "attribute" }, { "api_name": "numpy.loadtxt", "line_number": 12, "usage_type": "call" }, { "api_name": "sklearn.model_selection.tr...
33262145881
import os import discord from discord.ext import commands from dotenv import load_dotenv load_dotenv() import pyrebase TOKEN = os.getenv('TOKEN') class announce(commands.Cog): def __init__(self, bot): self.bot = bot @commands.Cog.listener() async def on_ready(self): print("ann cog is onl...
TofuBoy02/AB-rewrite
cogs/ann.py
ann.py
py
830
python
en
code
0
github-code
97
[ { "api_name": "dotenv.load_dotenv", "line_number": 5, "usage_type": "call" }, { "api_name": "os.getenv", "line_number": 7, "usage_type": "call" }, { "api_name": "discord.ext.commands.Cog", "line_number": 11, "usage_type": "attribute" }, { "api_name": "discord.ext....
24586898534
import warnings warnings.filterwarnings('ignore') import sys sys.path.insert(0, "../../") import argparse import pandas as pd from numpy import save import load_data import joblib from sklearn.pipeline import FeatureUnion, Pipeline import build_library.utils class Data: """ Loads data, samp...
mfalila/backorder_analytics_mlops
src/data/transform_data.py
transform_data.py
py
5,836
python
en
code
2
github-code
97
[ { "api_name": "warnings.filterwarnings", "line_number": 2, "usage_type": "call" }, { "api_name": "sys.path.insert", "line_number": 5, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 5, "usage_type": "attribute" }, { "api_name": "pandas.read_csv", ...
39822127748
import os import jieba import jieba.posseg as pseg from util import sopen, uutf8, rstr class Jieba(object): def __init__(self, default_path, HMM=False): self.pseg = pseg self.HMM = HMM jieba.load_userdict(os.path.join( default_path, "segmenter_dicts/default.dict")) se...
ne7ermore/nlp-force
python/synonym/segmenter.py
segmenter.py
py
684
python
en
code
4
github-code
97
[ { "api_name": "jieba.posseg", "line_number": 10, "usage_type": "name" }, { "api_name": "jieba.load_userdict", "line_number": 12, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 12, "usage_type": "call" }, { "api_name": "os.path", "line_num...
20329661529
# -*- coding: utf-8 -*- # snapshottest: v1 - https://goo.gl/zC4yUc from __future__ import unicode_literals from snapshottest import Snapshot snapshots = Snapshot() snapshots["test_schema_creator 1"] = [ """ name: string . """, """ is_person: bool . """, """ estate: string . """, """ is_lawsuit: b...
ramonmoraes/dbsBenchMark
tests/dbs/dgraph/snapshots/snap_test_schema_screator.py
snap_test_schema_screator.py
py
565
python
en
code
0
github-code
97
[ { "api_name": "snapshottest.Snapshot", "line_number": 8, "usage_type": "call" } ]
37959961799
from asyncio import exceptions from scripts.helpful_scripts import get_account, encode_data, upgrade from brownie import ( Box, ProxyAdmin, TransparentUpgradeableProxy, Contract, exceptions, BoxV2, ) import pytest ##this script tests the upgrading of the box contract both locally and on testnet...
Rasta669/TransparentProxyBox
tests/test_upgrade.py
test_upgrade.py
py
1,225
python
en
code
0
github-code
97
[ { "api_name": "scripts.helpful_scripts.get_account", "line_number": 18, "usage_type": "call" }, { "api_name": "brownie.Box.deploy", "line_number": 19, "usage_type": "call" }, { "api_name": "brownie.Box", "line_number": 19, "usage_type": "name" }, { "api_name": "br...
34450388781
from argparse import ArgumentParser import pandas as pd import numpy as np from pascal_voc_writer import Writer import yaml from xml_utils import parse_xml classes = yaml.load(open("classes.yaml"))["classes"] def load_xml(xml_path): schema = ["class","x1","y1", "x2", "y2"] lst = parse_xml(xml_path) df =...
UW-COSMOS/proposal_matcher
process.py
process.py
py
3,307
python
en
code
1
github-code
97
[ { "api_name": "yaml.load", "line_number": 8, "usage_type": "call" }, { "api_name": "xml_utils.parse_xml", "line_number": 14, "usage_type": "call" }, { "api_name": "pandas.DataFrame", "line_number": 15, "usage_type": "call" }, { "api_name": "numpy.genfromtxt", ...
32932405600
""" Write a function converting a Roman numeral from a given string N into an Arabic numeral. Values may range from 1 to 100 and may contain invalid symbols. Invalid symbols and numerals out of range should raise ValueError. Numeral / Value: I: 1 V: 5 X: 10 L: 50 C: 100 Example: N = 'I'; result = 1 N = 'XIV'; result ...
Pythonierista/EPAM_hometasks
task_3_ex_2.py
task_3_ex_2.py
py
1,208
python
en
code
0
github-code
97
[ { "api_name": "argparse.ArgumentParser", "line_number": 25, "usage_type": "call" } ]
20660929652
import logging from rq import Worker, Connection from conn import r listen = ["default"] if __name__ == '__main__': logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(levelname)s - %(filename)s - %(lineno)d - %(message)s') with Connection(r): logging.debug(list...
devinmcgloin/advent
worker.py
worker.py
py
378
python
en
code
0
github-code
97
[ { "api_name": "logging.basicConfig", "line_number": 10, "usage_type": "call" }, { "api_name": "logging.DEBUG", "line_number": 10, "usage_type": "attribute" }, { "api_name": "rq.Connection", "line_number": 12, "usage_type": "call" }, { "api_name": "conn.r", "li...
33458860164
# Implements SynthesisGraph, a data-structure that encodes results of multiple # synthesis tasks import argparse import tempfile as tf from collections import defaultdict import re import uuid import itertools from loguru import logger import numpy as np import pandas as pd import networkx as nx import yaml from ...
FPSG-UIUC/synthCT
synthesis/synthgraph.py
synthgraph.py
py
27,620
python
en
code
8
github-code
97
[ { "api_name": "networkx.MultiDiGraph", "line_number": 31, "usage_type": "call" }, { "api_name": "collections.defaultdict", "line_number": 34, "usage_type": "call" }, { "api_name": "collections.defaultdict", "line_number": 35, "usage_type": "call" }, { "api_name": ...
16829968755
import unittest import logging import numpy as np from h5py import special_dtype from h5py import check_dtype from h5py import Reference from h5py import RegionReference from h5json import hdf5dtype class Hdf5dtypeTest(unittest.TestCase): def __init__(self, *args, **kwargs): super(Hdf5dtypeTest, self).__i...
HDFGroup/hdf5-json
test/unit/hdf5dtype_test.py
hdf5dtype_test.py
py
24,554
python
en
code
67
github-code
97
[ { "api_name": "unittest.TestCase", "line_number": 11, "usage_type": "attribute" }, { "api_name": "logging.getLogger", "line_number": 15, "usage_type": "call" }, { "api_name": "logging.INFO", "line_number": 16, "usage_type": "attribute" }, { "api_name": "numpy.dtyp...
73443715520
#!/usr/bin/python2.7 # -*- coding: latin-1 -*- import keras.optimizers as optimizers import numpy as np import pandas as pd try: reload # Python 2.7 except NameError: try: from importlib import reload # Python 3.4+ except ImportError: from imp import reload # Python 3.0 - 3.3 import mat...
nsaura/ML
codes_python/keras/brgrs_beta1D.py
brgrs_beta1D.py
py
8,183
python
en
code
1
github-code
97
[ { "api_name": "os.path.abspath", "line_number": 26, "usage_type": "call" }, { "api_name": "os.path", "line_number": 26, "usage_type": "name" }, { "api_name": "os.path.dirname", "line_number": 26, "usage_type": "call" }, { "api_name": "sys.path.append", "line_n...
12194533938
import json def read(file): with open(file) as file: data = json.load(file) city = data["city"] bots = data["bots"] population = data["population"] print(f"\nCity Name: {city}") print(f"\nPopulation Size: {population}") for bot in bots: bot_name...
quinntoye0/com411
data/files/json/read_json.py
read_json.py
py
664
python
en
code
0
github-code
97
[ { "api_name": "json.load", "line_number": 6, "usage_type": "call" } ]