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
34825925053
# todo: add hash sum to judge solution file name on web-app side cuz it can break everything import os import shutil import subprocess from typing import List import source.models from .service import sequence_to_dict from .static import * from .config import BUILD_SOURCE_MAX_TIME, SQL_GET_TASK_ATTRIBUTE, SQL_GET_C...
TolimanStaR/AtomicJudge
source/task_manager.py
task_manager.py
py
24,126
python
en
code
0
github-code
6
[ { "api_name": "source.models.models", "line_number": 21, "usage_type": "attribute" }, { "api_name": "source.models", "line_number": 21, "usage_type": "name" }, { "api_name": "os.getcwd", "line_number": 22, "usage_type": "call" }, { "api_name": "source.models.model...
27773611300
import requests import os from telepyrobot.setclient import TelePyroBot from pyrogram import filters from pyrogram.types import Message from telepyrobot import COMMAND_HAND_LER __PLUGIN__ = os.path.basename(__file__.replace(".py", "")) __help__ = f""" Url Shortner Plugin for https://da.gd **Usage:** `{COMMAND_HAND_L...
Divkix/TelePyroBot
telepyrobot/plugins/url_shortner.py
url_shortner.py
py
1,615
python
en
code
40
github-code
6
[ { "api_name": "os.path.basename", "line_number": 8, "usage_type": "call" }, { "api_name": "os.path", "line_number": 8, "usage_type": "attribute" }, { "api_name": "telepyrobot.COMMAND_HAND_LER", "line_number": 14, "usage_type": "name" }, { "api_name": "telepyrobot....
8829027988
######################################################## # Rodrigo Leite - drigols # # Last update: 21/09/2021 # ######################################################## def OLS(dic): from matplotlib import pyplot as plt import pandas as pd df =...
drigols/studies
modules/ai-codes/modules/linear-regression/src/students_ols_bestLineFit.py
students_ols_bestLineFit.py
py
1,511
python
en
code
0
github-code
6
[ { "api_name": "pandas.DataFrame", "line_number": 10, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.figure", "line_number": 24, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 24, "usage_type": "name" }, { "api_name": "matplotli...
41745621937
import os import sqlite3 from bs4 import BeautifulSoup def scan_folder(parentfile, diff): for file_name in os.listdir(parentfile): if "_" in file_name: diff = eachfile(file_name, parentfile, diff) else: current_path = "".join((parentfile, "/", file_na...
22650684/Webscraping-Project
testing/dbMatchFile.py
dbMatchFile.py
py
3,089
python
en
code
0
github-code
6
[ { "api_name": "os.listdir", "line_number": 6, "usage_type": "call" }, { "api_name": "os.path.isdir", "line_number": 13, "usage_type": "call" }, { "api_name": "os.path", "line_number": 13, "usage_type": "attribute" }, { "api_name": "sqlite3.connect", "line_numb...
73118020027
import os import torch import matplotlib.pyplot as plt from config.config import cfg def get_supports(m): """ Returns the number of samples and the percentage of support for each activity in the ground truth data of a given dataset. Args: - m (str): the name of the dataset Returns: - support...
Vito-Scaraggi/mpgnnap
data_info.py
data_info.py
py
3,704
python
en
code
1
github-code
6
[ { "api_name": "config.config.cfg", "line_number": 18, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 26, "usage_type": "call" }, { "api_name": "os.path", "line_number": 26, "usage_type": "attribute" }, { "api_name": "torch.load", "line_nu...
1883485650
import sys import os import pefile # Imprime as seções de um executável def print_sections(directory, executable): pe = pefile.PE(executable if directory is None else directory + "/" + executable) sections = [] for section in pe.sections: sections.append(section.Name.decode('utf-8')) print(e...
kkatzer/CDadosSeg
T2/Parte2/T2P2a.py
T2P2a.py
py
791
python
en
code
0
github-code
6
[ { "api_name": "pefile.PE", "line_number": 7, "usage_type": "call" }, { "api_name": "os.path.isdir", "line_number": 23, "usage_type": "call" }, { "api_name": "os.path", "line_number": 23, "usage_type": "attribute" }, { "api_name": "sys.argv", "line_number": 23,...
19773909067
# -*- coding: utf-8 -*- """ IBEIS CORE Defines the core dependency cache supported by the image analysis api Extracts annotation chips from imaages and applies optional image normalizations. TODO: * interactive callback functions * detection interface * identification interface NOTES: HOW TO DESI...
smenon8/ibeis
ibeis/core_annots.py
core_annots.py
py
57,012
python
en
code
null
github-code
6
[ { "api_name": "utool.inject2", "line_number": 59, "usage_type": "call" }, { "api_name": "ibeis.control.controller_inject.register_preprocs", "line_number": 62, "usage_type": "name" }, { "api_name": "ibeis.control.controller_inject.register_subprops", "line_number": 63, "u...
19314688451
# -*- coding: utf-8 -*- ''' A module for startup settings ''' from __future__ import absolute_import import logging import os.path import sys from requests.structures import CaseInsensitiveDict # pylint: disable=import-error,3rd-party-local-module-not-gated # Import local libs # This file may be loaded out of ...
BKnight760/ubuntu-systemlink-salt-minion
var/lib/salt/minion/extmods/modules/startup_settings.py
startup_settings.py
py
6,757
python
en
code
1
github-code
6
[ { "api_name": "os.path.path.dirname", "line_number": 17, "usage_type": "call" }, { "api_name": "os.path.path", "line_number": 17, "usage_type": "attribute" }, { "api_name": "os.path", "line_number": 17, "usage_type": "name" }, { "api_name": "os.path.path.dirname",...
36525273442
"""Parser object that performs coarse-to-fine and postprocessing. Additionally, a simple command line interface similar to bitpar.""" from __future__ import print_function import io import os import re import sys import time import gzip import codecs import logging import tempfile import traceback import string # pyl...
pombredanne/disco-dop
discodop/parser.py
parser.py
py
27,717
python
en
code
null
github-code
6
[ { "api_name": "sys.version", "line_number": 17, "usage_type": "attribute" }, { "api_name": "sys.argv", "line_number": 72, "usage_type": "attribute" }, { "api_name": "discodop.treebank.WRITERS", "line_number": 72, "usage_type": "argument" }, { "api_name": "getopt.g...
36935275213
# this is focused on speed # it may not run everything import pathlib import numpy as np from tinygrad.ops import MovementOps, ProcessingOps from tinygrad.llops.ops_gpu import require_init_gpu, clbuild, get_cl_queue, get_cl_ctx from tinygrad.llops.ops_gpu import contiguous from tinygrad.llops.ops_gpu import unary_op a...
henrylao/tinygrad
accel/opencl/ops_opencl.py
ops_opencl.py
py
5,655
python
en
code
null
github-code
6
[ { "api_name": "tinygrad.llops.ops_gpu.require_init_gpu", "line_number": 19, "usage_type": "call" }, { "api_name": "tinygrad.shapetracker.ShapeTracker", "line_number": 20, "usage_type": "argument" }, { "api_name": "copy.deepcopy", "line_number": 20, "usage_type": "call" ...
74436640828
import glob import numpy as np import pandas as pd import nibabel as nib import torch from torch.utils.data import Dataset # dataset class for the GenericObjectDecoding dataset class GODData(Dataset): FEATURES_PATH = "data/ds001246/derivatives/preproc-spm/output" TARGETS_PATH = "data/ds001246" TRAIN_CATEG...
v15hv4/ViT-fMRI
dataOLD.py
dataOLD.py
py
2,614
python
en
code
0
github-code
6
[ { "api_name": "torch.utils.data.Dataset", "line_number": 10, "usage_type": "name" }, { "api_name": "glob.glob", "line_number": 27, "usage_type": "call" }, { "api_name": "glob.glob", "line_number": 28, "usage_type": "call" }, { "api_name": "pandas.read_csv", "l...
37256463861
import torch import torch.nn as nn from torch.utils import data from torch.optim import Adam, SGD from tensorboardX import SummaryWriter from tqdm import trange from datetime import datetime import argparse from dataset import LoadADHD200 from model import SpatialActivation def train(lr=0.001, device='cuda', epochs=1...
WhatAboutMyStar/SCAAE
train.py
train.py
py
3,360
python
en
code
4
github-code
6
[ { "api_name": "model.SpatialActivation", "line_number": 17, "usage_type": "call" }, { "api_name": "torch.load", "line_number": 21, "usage_type": "call" }, { "api_name": "torch.nn.DataParallel", "line_number": 24, "usage_type": "call" }, { "api_name": "torch.nn", ...
7897642460
import pygsheets def init(secret_path, sheet_name): # Получение нужной таблицы gc = pygsheets.authorize(client_secret=secret_path) sh = gc.open(sheet_name) wks = sh.sheet1 return wks def get_all_table_data(wks): # Получение всех данных с таблицы data_list = [] for row in wks.get_al...
FMaslina/gsheets
gsheets_integration.py
gsheets_integration.py
py
1,302
python
ru
code
0
github-code
6
[ { "api_name": "pygsheets.authorize", "line_number": 5, "usage_type": "call" } ]
38254642090
from django.test import TestCase from hknweb.candidate.tests.models.utils import ModelFactory class DuePaymentRequirementModelTests(TestCase): def setUp(self): semester = ModelFactory.create_semester( semester="Spring", year=0, ) duepayment = ModelFactory.create_du...
Gabe-Mitnick/hknweb
hknweb/candidate/tests/models/requirements/payment/test_due_payment.py
test_due_payment.py
py
649
python
en
code
null
github-code
6
[ { "api_name": "django.test.TestCase", "line_number": 6, "usage_type": "name" }, { "api_name": "hknweb.candidate.tests.models.utils.ModelFactory.create_semester", "line_number": 8, "usage_type": "call" }, { "api_name": "hknweb.candidate.tests.models.utils.ModelFactory", "line_...
17972375760
import dash from dash import Dash, html, Output, Input, dcc, callback import dash_bootstrap_components as dbc import pandas as pd import plotly.express as px import dash_ag_grid as dag app = dash.Dash(__name__, external_stylesheets=[dbc.themes.LUX], suppress_callback_exceptions=True, meta_tags=[{'name': 'viewport',...
Natcha-Phonkamhaeng/nobel-viz
src/app.py
app.py
py
6,264
python
en
code
1
github-code
6
[ { "api_name": "dash.Dash", "line_number": 8, "usage_type": "call" }, { "api_name": "dash_bootstrap_components.themes", "line_number": 8, "usage_type": "attribute" }, { "api_name": "pandas.read_csv", "line_number": 13, "usage_type": "call" }, { "api_name": "plotly....
7794747310
from flask import Flask, render_template, request import mushroom_data as md import random app = Flask(__name__) @app.route('/', methods=['POST', 'GET']) def main(): if request.method != 'POST': return render_template('index.html', cap_shape=md.cap_shape, ...
sharmas1ddharth/Mushroom_Classification
app.py
app.py
py
4,515
python
en
code
2
github-code
6
[ { "api_name": "flask.Flask", "line_number": 5, "usage_type": "call" }, { "api_name": "flask.request.method", "line_number": 10, "usage_type": "attribute" }, { "api_name": "flask.request", "line_number": 10, "usage_type": "name" }, { "api_name": "flask.render_templ...
43344955993
''' This application service return tracks data to visualisation. ''' import time import math from collections import defaultdict from twisted.application.service import Service from twisted.internet import defer from twisted.python import log import simplejson as json __author__ = 'Boris Tsema' # Select track data...
DmitryLoki/gorynych
gorynych/processor/services/visualization.py
visualization.py
py
10,219
python
en
code
3
github-code
6
[ { "api_name": "twisted.application.service.Service", "line_number": 141, "usage_type": "name" }, { "api_name": "twisted.application.service.Service.startService", "line_number": 149, "usage_type": "call" }, { "api_name": "twisted.application.service.Service", "line_number": 1...
30265323373
import arcade SPACING = 20 MARGIN = 110 arcade.open_window(400, 400, "Square of diamonds") arcade.set_background_color(arcade.color.AMARANTH_PINK) arcade.start_render() for row in range(10): for column in range(10): if (row%2==0 and column%2==0) or (row%2==1 and column%2==1): x = column * S...
maryamsaeedi17/PyLearningWorks1
assignment13/drawsquare.py
drawsquare.py
py
723
python
en
code
6
github-code
6
[ { "api_name": "arcade.open_window", "line_number": 6, "usage_type": "call" }, { "api_name": "arcade.set_background_color", "line_number": 8, "usage_type": "call" }, { "api_name": "arcade.color", "line_number": 8, "usage_type": "attribute" }, { "api_name": "arcade....
32576643958
from django.shortcuts import render, redirect from django.contrib.auth import authenticate, login from django.views.generic import View from django.http import HttpResponse from django.contrib.auth.forms import UserCreationForm from django.contrib.auth.forms import AuthenticationForm from django.contrib.auth import log...
S4ADO/ADW_Django_A1
TaskManager/tasks/views.py
views.py
py
5,269
python
en
code
0
github-code
6
[ { "api_name": "django.shortcuts.redirect", "line_number": 17, "usage_type": "call" }, { "api_name": "models.Task.objects.filter", "line_number": 18, "usage_type": "call" }, { "api_name": "models.Task.objects", "line_number": 18, "usage_type": "attribute" }, { "api...
13109904746
import pandas as pd import yfinance as yf import json #csv_list = pd.read_csv('japan_all_stock.csv') success_list = [] for num in range(1301, 10000): try: stock_data = yf.download(f'{num}.T', period = '1d', interval='1d') success_list.append(f'{num}.T') except: continue with open('jap...
39xdgy/Playground_py
japan_stock_data.py
japan_stock_data.py
py
404
python
en
code
0
github-code
6
[ { "api_name": "yfinance.download", "line_number": 9, "usage_type": "call" }, { "api_name": "json.dump", "line_number": 15, "usage_type": "call" } ]
27125372338
import logging from datetime import datetime import smtplib from notifications import * from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from db.client import db_create_close, r logging.config.fileConfig('/opt/TopPatch/conf/logging.config') logger = logging.getLogger('rvapi') @d...
SteelHouseLabs/vFense
tp/src/emailer/mailer.py
mailer.py
py
10,469
python
en
code
5
github-code
6
[ { "api_name": "logging.config.fileConfig", "line_number": 12, "usage_type": "call" }, { "api_name": "logging.config", "line_number": 12, "usage_type": "attribute" }, { "api_name": "logging.getLogger", "line_number": 13, "usage_type": "call" }, { "api_name": "db.cl...
45308723306
import csv import tqdm import zoomeye.sdk as zoomeye import json import os # 第一步读取文件 # 获得IP地址 # 使用SDK查询信息 # 保存信息 # 过滤信息 INPUT_FILE_NAME = '../csv/firewall_ip.csv' # OUTPUT_FILE_NAME = 'csv/result.csv' def read_csv(ip_list, csv_name): with open(csv_name) as f: f_csv = csv.reader(f) # 获取header ...
Judgegao/bitcoin_data
code/Cyberspace search engine/main.py
main.py
py
2,283
python
en
code
0
github-code
6
[ { "api_name": "csv.reader", "line_number": 18, "usage_type": "call" }, { "api_name": "zoomeye.sdk.ZoomEye", "line_number": 27, "usage_type": "call" }, { "api_name": "zoomeye.sdk", "line_number": 27, "usage_type": "name" }, { "api_name": "json.dump", "line_numb...
26498728774
import sys from typing import Set, TextIO, Any, Tuple from collections import * from functools import * from itertools import * Data = Tuple[Set[Tuple[int, int]], Set[Tuple[int, int]], int, int] Result = int def parse_input(buffer: TextIO) -> Data: east = set() south = set() lines = [line.strip() for lin...
arjandepooter/advent-of-code-2021
python/25/solution.py
solution.py
py
1,697
python
en
code
0
github-code
6
[ { "api_name": "typing.Tuple", "line_number": 7, "usage_type": "name" }, { "api_name": "typing.Set", "line_number": 7, "usage_type": "name" }, { "api_name": "typing.TextIO", "line_number": 11, "usage_type": "name" }, { "api_name": "sys.stdin.isatty", "line_numb...
71522207867
from django.db import models class Home(models.Model): title = models.CharField(max_length = 100) body = models.TextField() decriptions = models.TextField(blank=True) author = models.CharField(max_length = 200,blank=True) img = models.ImageField(upload_to='posts',blank=True) created = models.D...
linux-coffee/web
home/models.py
models.py
py
1,075
python
en
code
0
github-code
6
[ { "api_name": "django.db.models.Model", "line_number": 4, "usage_type": "attribute" }, { "api_name": "django.db.models", "line_number": 4, "usage_type": "name" }, { "api_name": "django.db.models.CharField", "line_number": 5, "usage_type": "call" }, { "api_name": "...
35525386991
""" Module containing ports and adapters for forward curve suppliers. Contains both the abstract interface and concrete implementation. """ import abc import datetime as dt from typing import Collection from volfitter.adapters.option_metrics_helpers import create_expiry from volfitter.adapters.sample_data_loader imp...
docadam78/vf_project
src/volfitter/adapters/forward_curve_supplier.py
forward_curve_supplier.py
py
2,503
python
en
code
2
github-code
6
[ { "api_name": "abc.ABC", "line_number": 16, "usage_type": "attribute" }, { "api_name": "datetime.datetime", "line_number": 23, "usage_type": "attribute" }, { "api_name": "typing.Collection", "line_number": 23, "usage_type": "name" }, { "api_name": "abc.abstractmet...
8019970208
import json from server.nordic import COMMANDS import static.app.instructions.translations as tr # from static.app.instructions.translations import _yes from static.app.instructions.helpers import TXT, NumberedText class NextPrevious: def __init__(self, button_text, goto, active): self.caption = button...
sander76/nordic
static/app/instructions/components.py
components.py
py
8,161
python
en
code
0
github-code
6
[ { "api_name": "server.nordic.COMMANDS.keys", "line_number": 46, "usage_type": "call" }, { "api_name": "server.nordic.COMMANDS", "line_number": 46, "usage_type": "name" }, { "api_name": "server.nordic.COMMANDS.keys", "line_number": 49, "usage_type": "call" }, { "ap...
10251263267
import collections import random import sys from os import path as osp import json import pandas as pd from fol import beta_query_v2 from fol.foq_v2 import parse_formula from utils.util import read_indexing, load_graph, load_data_with_indexing sys.path.append(osp.dirname(osp.dirname(__file__))) stanford_data_path = 'da...
HKUST-KnowComp/EFO-1-QA-benchmark
fol/test_foq_v2.py
test_foq_v2.py
py
6,319
python
en
code
17
github-code
6
[ { "api_name": "sys.path.append", "line_number": 10, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 10, "usage_type": "attribute" }, { "api_name": "os.path.dirname", "line_number": 10, "usage_type": "call" }, { "api_name": "os.path", "line_num...
4552159327
import random import sys sys.path.insert(1, '../') from utils import read_instance, objetive_function, corrent_solution_size import config # Heurística Construtiva 02 # Constructive Heuristic 02 # Random para selecionar o teste e calculado a melhor mesa para aplicá-lo def constructive_heuristic_02(corrent_size): d...
guilhermelange/Test-Assignment-Problem
stage_01/constructive_heuristic_02.py
constructive_heuristic_02.py
py
1,701
python
en
code
0
github-code
6
[ { "api_name": "sys.path.insert", "line_number": 3, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 3, "usage_type": "attribute" }, { "api_name": "utils.objetive_function", "line_number": 20, "usage_type": "call" }, { "api_name": "config.desks", ...
25814086176
from selenium.webdriver import Firefox from selenium.webdriver.common.keys import Keys from selenium.common.exceptions import NoSuchElementException import pytest import time @pytest.mark.needs_server class TestMaxlifeFeature: """ Checks if the maxlife feature is working """ def setup_class(self): ...
bepasty/bepasty-server
src/bepasty/tests/test_website.py
test_website.py
py
4,149
python
en
code
162
github-code
6
[ { "api_name": "selenium.webdriver.Firefox", "line_number": 20, "usage_type": "call" }, { "api_name": "selenium.webdriver.common.keys.Keys.ENTER", "line_number": 26, "usage_type": "attribute" }, { "api_name": "selenium.webdriver.common.keys.Keys", "line_number": 26, "usage...
32043962015
# -*- coding: utf-8 -*- """ Created on Sat Jan 12 02:46:22 2019 @author: Michael """ #importing the necessary libraries import os import shutil from sklearn.preprocessing import LabelBinarizer from sklearn.model_selection import train_test_split from sklearn.metrics import classification_report from kera...
Monarene/CV-Deep-learning-Pracittioner
minivggnet_flower17_data_aug.py
minivggnet_flower17_data_aug.py
py
3,346
python
en
code
0
github-code
6
[ { "api_name": "os.listdir", "line_number": 27, "usage_type": "call" }, { "api_name": "os.makedirs", "line_number": 39, "usage_type": "call" }, { "api_name": "shutil.move", "line_number": 40, "usage_type": "call" }, { "api_name": "imutils.paths.list_images", "l...
12894651014
#!/usr/bin/env python # coding: utf-8 # # # Task 1- Prediction using Supervised ML # # ### Task: Predict the percentage of a student based on the no. of study hours. # ## The Sparks Foundation(GRIP), July 2021 # #### By: Rishi Raj Dhar # In[11]: #importing the required libraries import pandas as pd import num...
Rishirajdhar/griptask1
GRIP_TASK_1_Student_Scores.py
GRIP_TASK_1_Student_Scores.py
py
4,112
python
en
code
0
github-code
6
[ { "api_name": "pandas.read_csv", "line_number": 35, "usage_type": "call" }, { "api_name": "seaborn.scatterplot", "line_number": 90, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.title", "line_number": 91, "usage_type": "call" }, { "api_name": "matplotli...
2615744068
# topics = ["Таѕ"] from typing import List class Solution: def simplifyPath(self, path: str) -> str: st: List[str] = [] for s in path.split('/'): if not s or s == '.': continue if s == '..': if st: st.pop() e...
show-me-code/signInHelper-using-face-
algorithms/[71]简化路径/solution.py
solution.py
py
389
python
en
code
0
github-code
6
[ { "api_name": "typing.List", "line_number": 8, "usage_type": "name" } ]
20299042800
"""crud URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.0/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based vi...
JairoObregon/django
crud/urls.py
urls.py
py
1,405
python
en
code
0
github-code
6
[ { "api_name": "django.urls.path", "line_number": 20, "usage_type": "call" }, { "api_name": "django.contrib.admin.site", "line_number": 20, "usage_type": "attribute" }, { "api_name": "django.contrib.admin", "line_number": 20, "usage_type": "name" }, { "api_name": "...
27127443756
""" 基于Memoization的递归可以大大提升性能,此时可以自定义一个memorize修饰器 author:Andy """ import functools def memorize(fn): # 缓存字典 know = dict() # 为创建修饰器提供便利,保留被修饰函数的__name__和__doc__属性 @functools.wraps(fn) def memoizer(*args): # 如果缓存字典中已经存在 if args in know: return know[args] # 如果缓存字典中不存在 else: know[args] = fn(*args) ...
LiUzHiAn/pythonDesignPatterns
decorate_pattern/my_math.py
my_math.py
py
1,213
python
en
code
0
github-code
6
[ { "api_name": "functools.wraps", "line_number": 13, "usage_type": "call" }, { "api_name": "timeit.Timer", "line_number": 48, "usage_type": "call" } ]
38905374725
from torch import Tensor, LongTensor, max from typing import Dict from sklearn.metrics import accuracy_score def compute_metrics( outputs: Tensor, labels: LongTensor, ) -> Dict[str, float]:\ metrics = {} outputs = outputs.cpu() labels = labels.cpu() _, pred = max(outputs.data, 1) y_true ...
Agiratex/histological-image-classification
utils/compute_metrics.py
compute_metrics.py
py
570
python
en
code
0
github-code
6
[ { "api_name": "torch.Tensor", "line_number": 6, "usage_type": "name" }, { "api_name": "torch.LongTensor", "line_number": 7, "usage_type": "name" }, { "api_name": "torch.max", "line_number": 14, "usage_type": "call" }, { "api_name": "sklearn.metrics.accuracy_score"...
5975605110
from . import sql, chunk, rarity_info, BASE_PATH, Page from datetime import datetime as dt, timedelta as td from io import BytesIO from pandas import DataFrame from PIL import Image from random import choice, choices, random import json import logging import requests as r log = logging.getLogger(__name__) log.setLevel...
austinmh12/DiscordBots
TestBot/test_cogs/pokerouletteFunctions/pokemon.py
pokemon.py
py
20,054
python
en
code
0
github-code
6
[ { "api_name": "logging.getLogger", "line_number": 11, "usage_type": "call" }, { "api_name": "logging.DEBUG", "line_number": 12, "usage_type": "attribute" }, { "api_name": "logging.StreamHandler", "line_number": 13, "usage_type": "call" }, { "api_name": "logging.Fo...
232662350
import os import sys import glob import subprocess import glob from pefile import PE name = "ReBarDxe" version = "1.0" GUID = "a8ee1777-a4f5-4345-9da4-13742084d31e" shell = sys.platform == "win32" buildtype = "RELEASE" def filesub(filep, f, r): # Read in the file with open(filep, 'r') as file : filed...
xCuri0/ReBarUEFI
ReBarDxe/buildffs.py
buildffs.py
py
2,663
python
en
code
562
github-code
6
[ { "api_name": "sys.platform", "line_number": 11, "usage_type": "attribute" }, { "api_name": "sys.argv", "line_number": 39, "usage_type": "attribute" }, { "api_name": "sys.argv", "line_number": 40, "usage_type": "attribute" }, { "api_name": "sys.argv", "line_nu...
23944471661
import json import pytest from deepdiff import DeepDiff from eth_keys.datatypes import PrivateKey from hexbytes import HexBytes from jsonschema import ValidationError from web3 import Web3 from polyswarmtransaction.exceptions import InvalidKeyError, InvalidSignatureError, WrongSignatureError, \ UnsupportedTransac...
polyswarm/polyswarm-transaction
tests/test_transaction.py
test_transaction.py
py
6,888
python
en
code
1
github-code
6
[ { "api_name": "polyswarmtransaction.transaction.Transaction", "line_number": 22, "usage_type": "call" }, { "api_name": "eth_keys.datatypes.PrivateKey", "line_number": 23, "usage_type": "call" }, { "api_name": "web3.Web3.keccak", "line_number": 23, "usage_type": "call" }...
25844066272
"""Test Role""" import unittest import json from flask import url_for from app.test import BaseTest class RolePermissionTests(BaseTest): """ Role Permission Test api class """ def test_insert_update_delete(self): """ insert, update, delete roles permission""" role_url = url_for('auth.role_r...
ekramulmostafa/ms-auth
app/test/test_role_permission.py
test_role_permission.py
py
2,795
python
en
code
0
github-code
6
[ { "api_name": "app.test.BaseTest", "line_number": 9, "usage_type": "name" }, { "api_name": "flask.url_for", "line_number": 15, "usage_type": "call" }, { "api_name": "json.dumps", "line_number": 20, "usage_type": "call" }, { "api_name": "flask.url_for", "line_n...
41957074771
import json import os j = None searchables = {} path = os.path.dirname(os.path.abspath(__file__)) with open (os.path.join(path, 'fhir_parser/downloads/search-parameters.json'), 'r') as f: j = json.loads(f.read()) for entry in j['entry']: resource = entry['resource'] for base in resource['base']: searchabl...
zensoup/fhirbug
tools/get_searchables.py
get_searchables.py
py
420
python
en
code
14
github-code
6
[ { "api_name": "os.path.dirname", "line_number": 8, "usage_type": "call" }, { "api_name": "os.path", "line_number": 8, "usage_type": "attribute" }, { "api_name": "os.path.abspath", "line_number": 8, "usage_type": "call" }, { "api_name": "os.path.join", "line_nu...
23229945677
from django.contrib import admin from django.urls import path, include from django.conf.urls.static import static from django.conf import settings admin.site.site_header = "Адмнистрирование TBO Dashboard" admin.site.site_title = "Адмнистрирование TBO Dashboard" admin.site.index_title = "TBO Dashboard" urlpatterns = ...
alldevic/tbo_dash_old
tbo_dash/urls.py
urls.py
py
875
python
en
code
0
github-code
6
[ { "api_name": "django.contrib.admin.site", "line_number": 6, "usage_type": "attribute" }, { "api_name": "django.contrib.admin", "line_number": 6, "usage_type": "name" }, { "api_name": "django.contrib.admin.site", "line_number": 7, "usage_type": "attribute" }, { "a...
40341366552
import os import re import selenium from selenium import webdriver from time import sleep from openpyxl import load_workbook from selenium.webdriver.common.keys import Keys from selenium.webdriver.support.ui import WebDriverWait # Required for explicit wait from selenium.webdriver.support import expected_conditions as...
Himu1234/web-automation-chandpur
prepaid_token_generation_xlsx.py
prepaid_token_generation_xlsx.py
py
3,524
python
en
code
0
github-code
6
[ { "api_name": "openpyxl.load_workbook", "line_number": 15, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 15, "usage_type": "call" }, { "api_name": "os.path", "line_number": 15, "usage_type": "attribute" }, { "api_name": "os.getcwd", "lin...
25399032626
import re from csv import reader from colorama import init, Fore # Insert the actual exploits in searchsploit in the database def update_database(exploit_database, mycursor): print(Fore.BLUE + "Updating database...") # Read the CSV to get the basic information with open('/usr/share/exploitdb/files_exp...
alvaroreinaa/Can-You-EXPLOIT-It
update_database.py
update_database.py
py
7,870
python
en
code
1
github-code
6
[ { "api_name": "colorama.Fore.BLUE", "line_number": 7, "usage_type": "attribute" }, { "api_name": "colorama.Fore", "line_number": 7, "usage_type": "name" }, { "api_name": "csv.reader", "line_number": 12, "usage_type": "call" }, { "api_name": "colorama.Fore.GREEN", ...
20880620842
#@title Установка модуля УИИ from PIL import Image from pathlib import Path from tensorflow.keras.preprocessing import image from tensorflow.keras.layers import Input, Dense, Conv2D, Flatten from tensorflow.keras.models import Model from tensorflow.keras.optimizers import Adam from IPython import disp...
alexfeklin1234/neural_network
yandex_milk_data/yandex_milk.py
yandex_milk.py
py
26,223
python
uk
code
0
github-code
6
[ { "api_name": "seaborn.set", "line_number": 22, "usage_type": "call" }, { "api_name": "random.seed", "line_number": 24, "usage_type": "call" }, { "api_name": "numpy.random.seed", "line_number": 25, "usage_type": "call" }, { "api_name": "numpy.random", "line_nu...
26632895276
import pygame from setting import * from bullet import Bullet class Player(pygame.sprite.Sprite): #初期化(元グループ、初期位置x、初期位置y) def __init__(self, groups, x, y, enemy_group): super().__init__(groups) #敵グループ self.enemy_group = enemy_group #画面取得 self.screen = py...
shu0411/training
python/trainingEnv/shooting/player.py
player.py
py
5,639
python
ja
code
0
github-code
6
[ { "api_name": "pygame.sprite", "line_number": 5, "usage_type": "attribute" }, { "api_name": "pygame.display.get_surface", "line_number": 15, "usage_type": "call" }, { "api_name": "pygame.display", "line_number": 15, "usage_type": "attribute" }, { "api_name": "pyga...
42060446091
import pygame as pg from settings import * class Bullet(pg.sprite.Sprite): def __init__(self, groups): self.groups = groups pg.sprite.Sprite.__init__(self, self.groups) class PlayerBullet(Bullet): def __init__(self, game, x, y): self.game = game self.groups = self.game.sprite...
soupss/space-invaders
sprites/bullet.py
bullet.py
py
2,099
python
en
code
0
github-code
6
[ { "api_name": "pygame.sprite", "line_number": 5, "usage_type": "attribute" }, { "api_name": "pygame.sprite.Sprite.__init__", "line_number": 8, "usage_type": "call" }, { "api_name": "pygame.sprite", "line_number": 8, "usage_type": "attribute" }, { "api_name": "pyga...
21077625640
import json import os import requests from get_token import GetToken from log_setup import Logging from program_data import PDApi """ NetApp / SolidFire CPE mnode support utility """ """ Package service api calls https://[mnodeip]/package-repository/1 """ # set up logging logmsg = Logging.logmsg() # disabl...
solidfire/mnode-support-util
api_package_service.py
api_package_service.py
py
2,719
python
en
code
0
github-code
6
[ { "api_name": "log_setup.Logging.logmsg", "line_number": 22, "usage_type": "call" }, { "api_name": "log_setup.Logging", "line_number": 22, "usage_type": "name" }, { "api_name": "requests.packages.urllib3.disable_warnings", "line_number": 26, "usage_type": "call" }, { ...
39434540766
# from sklearn.naive_bayes import MultinomialNB # from sklearn.naive_bayes import GaussianNB # from sklearn.cluster import KMeans import pandas as pd # from random import shuffle import numpy as np import os # from sklearn.feature_extraction.text import CountVectorizer # from sklearn.feature_extraction.text import Tfi...
svroo/PNL-Escom
Joder es cine/Modulo/text_proc.py
text_proc.py
py
3,744
python
es
code
0
github-code
6
[ { "api_name": "nltk.corpus.stopwords.words", "line_number": 49, "usage_type": "call" }, { "api_name": "nltk.corpus.stopwords", "line_number": 49, "usage_type": "name" }, { "api_name": "re.sub", "line_number": 52, "usage_type": "call" }, { "api_name": "re.sub", ...
72283436667
import requests import json match = { "Date": "21-01-2023", "Form": "decent", "Opposition": "tough", "season": "middle", "venue": "home", "Previous match": "0", "uEFa": "active" } #url = 'http://localhost:9696/predict' url = 'https://klopp-s-liverp-prod-klopp-s-liverpool-hql7qt.mo4.mogeniu...
Blaqadonis/klopps_liverpool
predict_test.py
predict_test.py
py
416
python
en
code
0
github-code
6
[ { "api_name": "requests.post", "line_number": 16, "usage_type": "call" } ]
13876656972
from fastapi import FastAPI from fastapi.middleware.cors import CORSMiddleware from fastapi.encoders import jsonable_encoder from pydantic import BaseModel import boto3 import json app = FastAPI() origins = [ "https://ai.galaxychain.zone", "https://galaxychain.zone", "http://localhost:3000", "https://...
galaxynetwork/story-ai-supporter
app.py
app.py
py
2,629
python
en
code
1
github-code
6
[ { "api_name": "fastapi.FastAPI", "line_number": 8, "usage_type": "call" }, { "api_name": "fastapi.middleware.cors.CORSMiddleware", "line_number": 19, "usage_type": "argument" }, { "api_name": "boto3.Session", "line_number": 27, "usage_type": "call" }, { "api_name"...
43392192504
import cv2 import numpy as np from matplotlib import pyplot as plt # 模版匹配 img = cv2.imread("fb.png", 0) img2 = img.copy() template = cv2.imread("zdbz.png", 0) w,h = template.shape[::-1] method = eval("cv2.TM_CCOEFF") res = cv2.matchTemplate(img2, template ,method) min_val, max_val, min_loc, max_loc = cv2.minMaxLoc(r...
frebudd/python
阴阳师副本自动化/副本自动化2.py
副本自动化2.py
py
450
python
en
code
2
github-code
6
[ { "api_name": "cv2.imread", "line_number": 7, "usage_type": "call" }, { "api_name": "cv2.imread", "line_number": 9, "usage_type": "call" }, { "api_name": "cv2.matchTemplate", "line_number": 12, "usage_type": "call" }, { "api_name": "cv2.minMaxLoc", "line_numbe...
35426911515
#!/usr/bin/python3 import numpy as np import scipy.integrate import matplotlib.pyplot as plt def vdp(t,y): """calculate Van Der Pol Derivatives""" # y is a tuple (y0,y1) y0dot = y[1] y1dot = (1-y[0]**2)*y[1]-y[0] dydt = ( y0dot, y1dot ) return dydt solution = scipy.integrate.solve_ivp(vdp, t_...
martinaoliver/GTA
ssb/m1a/numeric/Practical_full_solutions_jupyter/python_script_solutions/vanderpol_20191001.py
vanderpol_20191001.py
py
695
python
en
code
0
github-code
6
[ { "api_name": "scipy.integrate.integrate.solve_ivp", "line_number": 15, "usage_type": "call" }, { "api_name": "scipy.integrate.integrate", "line_number": 15, "usage_type": "attribute" }, { "api_name": "scipy.integrate", "line_number": 15, "usage_type": "name" }, { ...
130536507
import numpy as np import matplotlib.pyplot as plt import pyRaven as rav import emcee import corner from scipy.stats import norm import scipy from statistics import mode def fitdata(param,DataPacket,guess): ''' This function fits a set of LSD profiles using scipy's curve fit function. Inputs: param - input...
veropetit/pyRaven
fitparams.py
fitparams.py
py
10,372
python
en
code
0
github-code
6
[ { "api_name": "numpy.log", "line_number": 40, "usage_type": "call" }, { "api_name": "pyRaven.diskint2.analytical", "line_number": 43, "usage_type": "call" }, { "api_name": "pyRaven.diskint2", "line_number": 43, "usage_type": "attribute" }, { "api_name": "numpy.int...
24347584300
# # Categorize all issues # # To use: open with jupyter notebook/lab using jupytext and run all cells # + from getpass import getpass from textwrap import dedent from ipywidgets import Button, ToggleButtons, Output, VBox from IPython.display import display, Markdown import gitlab # - gl = gitlab.Gitlab(url="https:/...
zesje/zesje
label_issues.py
label_issues.py
py
2,370
python
en
code
9
github-code
6
[ { "api_name": "gitlab.Gitlab", "line_number": 15, "usage_type": "call" }, { "api_name": "getpass.getpass", "line_number": 15, "usage_type": "call" }, { "api_name": "ipywidgets.Output", "line_number": 27, "usage_type": "call" }, { "api_name": "ipywidgets.ToggleButt...
508734253
from itertools import permutations import cProfile # #make permutation of array # list = [1,2,3,4] listPermutations = permutations(list) for permutation in listPermutations: print(permutation) # #count number of permutations # listPermutations = permutations(list) count = 0 for permutation in listPermu...
sleevs/JSNSecurity
Permutations.py
Permutations.py
py
695
python
en
code
0
github-code
6
[ { "api_name": "itertools.permutations", "line_number": 10, "usage_type": "call" }, { "api_name": "itertools.permutations", "line_number": 18, "usage_type": "call" }, { "api_name": "cProfile.run", "line_number": 44, "usage_type": "call" } ]
24794059633
#!/usr/bin/env python3 # import sys, argparse import ROOT ROOT.PyConfig.IgnoreCommandLineOptions = True def h2pgf(h): """ Convert TH1 into pgfplot data with error bars input: xmin xmax y ey output: x ex y ey ex = (xmax+xmin)/2 """ nbins = h.GetNbinsX() # print("# \\begin{axis}") # print...
kbat/mc-tools
mctools/common/root2pgf.py
root2pgf.py
py
1,629
python
en
code
38
github-code
6
[ { "api_name": "ROOT.PyConfig", "line_number": 6, "usage_type": "attribute" }, { "api_name": "argparse.ArgumentParser", "line_number": 48, "usage_type": "call" }, { "api_name": "ROOT.TFile", "line_number": 53, "usage_type": "call" }, { "api_name": "sys.exit", "...
74514085946
#!/usr/bin/env python3 from __future__ import print_function from __future__ import division # System level imports import sys import os import argparse import logging import time import math import numpy as np import matplotlib.pyplot as plt from numpy.core.defchararray import index import controller2d #import contro...
AlfonsoCom/AVD_BP
main.py
main.py
py
80,582
python
en
code
0
github-code
6
[ { "api_name": "sys.path.append", "line_number": 30, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 30, "usage_type": "attribute" }, { "api_name": "os.path.abspath", "line_number": 30, "usage_type": "call" }, { "api_name": "os.path", "line_num...
26401762339
# %% import plotly.express as px import plotly.graph_objects as go import os import matplotlib matplotlib.use('TkAgg') import matplotlib.pyplot as plt import numpy as np import pandas as pd import pdb def visualize_map(): # %% map_prefix = "50_10_5_10_5_2" ndf = pd.read_csv("" + map_prefix + "_Nodes.csv")...
pwang649/3D_MAPF
hello_world/core/visualization.py
visualization.py
py
4,687
python
en
code
0
github-code
6
[ { "api_name": "matplotlib.use", "line_number": 6, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 16, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 17, "usage_type": "call" }, { "api_name": "plotly.graph_objects.Sc...
22117461324
import rospy from MyStatics.RealTimePlotter import RealTimePlotter from MyStatics.GaussianPlotter import GaussPlot from FaultDetection import ChangeDetection from geometry_msgs.msg import AccelStamped from dynamic_reconfigure.server import Server from accelerometer_ros.cfg import accelerometerGaussConfig import numpy a...
jcmayoral/collision_detector_observers
collision_observers/accelerometer/accelerometer_ros/src/fault_detection/AccGaussCUSUM.py
AccGaussCUSUM.py
py
2,101
python
en
code
0
github-code
6
[ { "api_name": "matplotlib.use", "line_number": 10, "usage_type": "call" }, { "api_name": "MyStatics.RealTimePlotter.RealTimePlotter", "line_number": 14, "usage_type": "name" }, { "api_name": "FaultDetection.ChangeDetection", "line_number": 14, "usage_type": "name" }, ...
9401341695
# coding: utf-8 import re import requests response = requests.get('http://ads.fraiburgo.ifc.edu.br') if response.status_code == 200: texto = response.content.decode('utf-8') links = re.findall(r'<a href="(.*?)".*>(.*)</a>', texto) for url in links: print(url)
fabricioifc/python_regex_tarefa
exemplos_professor/regex_02.py
regex_02.py
py
266
python
en
code
1
github-code
6
[ { "api_name": "requests.get", "line_number": 5, "usage_type": "call" }, { "api_name": "re.findall", "line_number": 9, "usage_type": "call" } ]
70879484348
import collections import functools from operator import mul def tokenize(s: str): tokens = [] words = s.strip().split() for word in words: if word.startswith("("): tokens.append(word[0]) tokens.extend(tokenize(word[1:])) elif word.endswith(")"): tokens....
cj81499/advent-of-code
src/aoc_cj/aoc2020/day18.py
day18.py
py
2,065
python
en
code
2
github-code
6
[ { "api_name": "collections.deque", "line_number": 44, "usage_type": "call" }, { "api_name": "functools.reduce", "line_number": 68, "usage_type": "call" }, { "api_name": "operator.mul", "line_number": 68, "usage_type": "argument" }, { "api_name": "collections.deque...
10423383033
from __future__ import annotations import copy import dataclasses import json from typing import TYPE_CHECKING import pytest from randovania.game_description.db.node_identifier import NodeIdentifier from randovania.games.prime2.layout.echoes_configuration import EchoesConfiguration from randovania.games.prime2.layou...
randovania/randovania
test/gui/test_tracker_window.py
test_tracker_window.py
py
17,755
python
en
code
165
github-code
6
[ { "api_name": "typing.TYPE_CHECKING", "line_number": 17, "usage_type": "name" }, { "api_name": "copy.copy", "line_number": 25, "usage_type": "call" }, { "api_name": "randovania.games.prime2.layout.translator_configuration.LayoutTranslatorRequirement.RANDOM", "line_number": 27...
74548599546
import boto3 from botocore.exceptions import NoCredentialsError def upload_to_aws(local_file, bucket, s3_file): s3 = boto3.client('s3') try: s3.upload_file(local_file, bucket, s3_file) print("Upload Successful") return True except FileNotFoundError: print("The file was not f...
HULKMARXEL/Group_6_AWS_project
localhost/S3.py
S3.py
py
562
python
en
code
0
github-code
6
[ { "api_name": "boto3.client", "line_number": 5, "usage_type": "call" }, { "api_name": "botocore.exceptions.NoCredentialsError", "line_number": 13, "usage_type": "name" } ]
19399824149
from typing import List # 438. 找到字符串中所有字母异位词 # https://leetcode-cn.com/problems/find-all-anagrams-in-a-string/ class Solution: def findAnagrams(self, s: str, p: str) -> List[int]: p_vec = self.to_vector(p) s_vec = self.to_vector(s[0: len(p) - 1]) # print(s_vec, p_vec) i = 0 ...
Yigang0622/LeetCode
findAnagrams.py
findAnagrams.py
py
1,375
python
en
code
1
github-code
6
[ { "api_name": "typing.List", "line_number": 7, "usage_type": "name" } ]
71643512507
import pygame from pygame.sprite import Sprite class Button(Sprite): def __init__(self, ai_settings, screen, msg, position, function_num): super(Button, self).__init__() self.screen = screen self.screen_rect = screen.get_rect() self.ai_settings = ai_settings sel...
Karllzy/Architect
button.py
button.py
py
3,292
python
en
code
2
github-code
6
[ { "api_name": "pygame.sprite.Sprite", "line_number": 5, "usage_type": "name" }, { "api_name": "pygame.font.SysFont", "line_number": 18, "usage_type": "call" }, { "api_name": "pygame.font", "line_number": 18, "usage_type": "attribute" }, { "api_name": "pygame.Rect"...
41554384385
import sys import nimfa import numpy as np import scipy.sparse as sp import pandas as pd import gc import os import math import mysql.connector import random import collections from scipy.sparse.linalg import svds from sklearn.model_selection import KFold from multiprocessing import Pool # import module import machine...
Saito2982/CrossDomain
plot_domain.py
plot_domain.py
py
22,614
python
en
code
0
github-code
6
[ { "api_name": "scipy.sparse.linalg.svds", "line_number": 31, "usage_type": "call" }, { "api_name": "numpy.savetxt", "line_number": 32, "usage_type": "call" }, { "api_name": "numpy.savetxt", "line_number": 33, "usage_type": "call" }, { "api_name": "numpy.savetxt", ...
12258821097
import math import random import time import carla import cv2 import numpy as np actor_list = [] def pure_pursuit(tar_location, v_transform): L = 2.875 yaw = v_transform.rotation.yaw * (math.pi / 180) x = v_transform.location.x - L / 2 * math.cos(yaw) y = v_transform.location.y - L / 2 * math.sin(yaw...
DYSfu/Carla_demo
demo3.py
demo3.py
py
3,290
python
en
code
4
github-code
6
[ { "api_name": "math.pi", "line_number": 13, "usage_type": "attribute" }, { "api_name": "math.cos", "line_number": 14, "usage_type": "call" }, { "api_name": "math.sin", "line_number": 15, "usage_type": "call" }, { "api_name": "math.sqrt", "line_number": 18, ...
74472010426
import unittest from car_simulation import Car, Field, main from unittest.mock import patch from io import StringIO class TestCar(unittest.TestCase): def test_change_direction(self): car = Car("TestCar", 0, 0, "N", "F") car.change_direction("R") self.assertEqual(car.direction, "E") def...
LiSheng-Chris/car-simulation
car_simulation_test.py
car_simulation_test.py
py
3,835
python
en
code
0
github-code
6
[ { "api_name": "unittest.TestCase", "line_number": 6, "usage_type": "attribute" }, { "api_name": "car_simulation.Car", "line_number": 8, "usage_type": "call" }, { "api_name": "car_simulation.Field", "line_number": 13, "usage_type": "call" }, { "api_name": "car_simu...
7649624460
# convolution 계산 함수 import numpy as np import pycuda.autoinit from pycuda.compiler import SourceModule from pycuda import gpuarray, tools import pycuda.driver as cuda class padding(): # CUDA Limit size cu_lim = 32 def __init__(self,D,K,mode='vaild'): # D : Data, K = kernel, kw = int(K.shap...
JUHYUKo3o/CUDAKernelStudy
padding.py
padding.py
py
1,964
python
en
code
1
github-code
6
[ { "api_name": "numpy.float32", "line_number": 23, "usage_type": "attribute" }, { "api_name": "numpy.zeros", "line_number": 38, "usage_type": "call" }, { "api_name": "numpy.float32", "line_number": 38, "usage_type": "attribute" }, { "api_name": "pycuda.compiler.Sou...
32636741250
import six from c7n_azure.actions.tagging import Tag, AutoTagUser, RemoveTag, TagTrim, TagDelayedAction from c7n_azure.actions.delete import DeleteAction from c7n_azure.filters import (MetricFilter, TagActionFilter, DiagnosticSettingsFilter, PolicyCompliantFilter) from c7n_azure.provider ...
LRuttenCN/cloud-custodian
tools/c7n_azure/c7n_azure/resources/arm.py
arm.py
py
3,163
python
en
code
1
github-code
6
[ { "api_name": "c7n_azure.query.TypeInfo", "line_number": 15, "usage_type": "name" }, { "api_name": "six.add_metaclass", "line_number": 14, "usage_type": "call" }, { "api_name": "c7n_azure.query.TypeMeta", "line_number": 14, "usage_type": "argument" }, { "api_name"...
29579733720
# -*- coding: utf-8 -*- """ Created on Fri Dec 7 15:39:51 2018 @author: Akitaka """ import numpy as np from sklearn.model_selection import cross_val_score from lwpls import LWPLS def psi(xlist,M): """ make a design matrix """ ret = [] for x in xlist: ret.append([x**i for i in rang...
nakanishi-akitaka/python2018_backup
1207/cross_validation_lwpls.py
cross_validation_lwpls.py
py
740
python
en
code
5
github-code
6
[ { "api_name": "numpy.array", "line_number": 17, "usage_type": "call" }, { "api_name": "numpy.random.seed", "line_number": 19, "usage_type": "call" }, { "api_name": "numpy.random", "line_number": 19, "usage_type": "attribute" }, { "api_name": "numpy.linspace", ...
73675812026
import django from django.conf import settings import pandas as pd import os, sys proj_path = "/home/webuser/webapps/tigaserver/" os.environ.setdefault("DJANGO_SETTINGS_MODULE", "tigaserver_project.settings") sys.path.append(proj_path) django.setup() from tigaserver_app.models import Fix FILE = os.path.join(setti...
Mosquito-Alert/mosquito_alert
util_scripts/update_geo_userfixes_static.py
update_geo_userfixes_static.py
py
1,682
python
en
code
6
github-code
6
[ { "api_name": "os.environ.setdefault", "line_number": 8, "usage_type": "call" }, { "api_name": "os.environ", "line_number": 8, "usage_type": "attribute" }, { "api_name": "sys.path.append", "line_number": 9, "usage_type": "call" }, { "api_name": "sys.path", "li...
32731940278
from collections import deque n, m = map(int, input().split()) number = list(map(int, input().split())) deq = deque(i for i in range(1, n+1)) count = 0 for i in range(m): while True: if (deq[0] == number[i]): deq.popleft() break else: if(len(deq) / 2 > deq.ind...
woo222/baekjoon
python/큐,스택/s3_1021_회전하는큐.py
s3_1021_회전하는큐.py
py
505
python
en
code
0
github-code
6
[ { "api_name": "collections.deque", "line_number": 6, "usage_type": "call" } ]
18028370803
import json from logging import info import boto3 from botocore.exceptions import ClientError from lgw.lambda_util import get_lambda_info, grant_permission_to_api_resource def create_rest_api( api_name, api_description, binary_types, lambda_name, resource_path, deploy_stage, integration_ro...
ebridges/lgw
lgw/api_gateway.py
api_gateway.py
py
5,773
python
en
code
0
github-code
6
[ { "api_name": "boto3.client", "line_number": 34, "usage_type": "call" }, { "api_name": "lgw.lambda_util.get_lambda_info", "line_number": 38, "usage_type": "call" }, { "api_name": "boto3.client", "line_number": 56, "usage_type": "call" }, { "api_name": "logging.inf...
32150136387
from collections import deque def solution(queue1, queue2): answer = -1 queue1Sum = sum(queue1) queue2Sum = sum(queue2) sameSum = (queue1Sum + queue2Sum) // 2 queue1Copy = deque(queue1) queue2Copy = deque(queue2) cnt = 0 while cnt < len(queue1) * 3: if sameSum < queue1Sum:...
HS980924/Algorithm
src/8.Queue,Deque/두큐합.py
두큐합.py
py
810
python
en
code
2
github-code
6
[ { "api_name": "collections.deque", "line_number": 8, "usage_type": "call" }, { "api_name": "collections.deque", "line_number": 9, "usage_type": "call" } ]
24362863500
from odoo import models, fields, api from ..tools.nawh_error import NAWHError class NetaddictionWhLocationsLine(models.Model): _name = 'netaddiction.wh.locations.line' _description = "Netaddiction WH Locations Line" _order = 'qty' product_id = fields.Many2one( 'product.product', requi...
suningwz/netaddiction_addons
netaddiction_warehouse/models/netaddiction_wh_locations_line.py
netaddiction_wh_locations_line.py
py
4,531
python
it
code
0
github-code
6
[ { "api_name": "odoo.models.Model", "line_number": 5, "usage_type": "attribute" }, { "api_name": "odoo.models", "line_number": 5, "usage_type": "name" }, { "api_name": "odoo.fields.Many2one", "line_number": 10, "usage_type": "call" }, { "api_name": "odoo.fields", ...
34390260723
from pathlib import Path from datetime import timedelta import environ import os import pymysql pymysql.install_as_MySQLdb() # Build paths inside the project like this: BASE_DIR / 'subdir'. BASE_DIR = Path(__file__).resolve().parent.parent REST_AUTH = { 'SESSION_LOGIN': False } ###### 환경변수 쪽 설정 ###############...
YCWG/YCWG-BackEnd
ycwg/settings.py
settings.py
py
6,231
python
en
code
0
github-code
6
[ { "api_name": "pymysql.install_as_MySQLdb", "line_number": 7, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_number": 10, "usage_type": "call" }, { "api_name": "environ.Env", "line_number": 18, "usage_type": "call" }, { "api_name": "environ.Env.read_e...
29098845226
#!/bin/env python # This script undoes the "WellFolders.py" script, aka it empties all of the well folders out into the parent folder. import os import re import argparse parser = argparse.ArgumentParser(description='Takes a folder formatted by WellFolders and undoes it ', usage='%(p...
jc6213/CRANIUM
UndoWellFolders.py
UndoWellFolders.py
py
1,123
python
en
code
0
github-code
6
[ { "api_name": "argparse.ArgumentParser", "line_number": 9, "usage_type": "call" }, { "api_name": "re.compile", "line_number": 14, "usage_type": "call" }, { "api_name": "os.scandir", "line_number": 15, "usage_type": "call" }, { "api_name": "os.scandir", "line_n...
30003290472
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # @Description: # @File: test.py # @Project: ip_nlp # @Author: Yiheng # @Email: GuoYiheng89@gmail.com # @Time: 7/15/2019 10:30 import time from pymongo import ASCENDING from common import logger_factory from mongo.connect import get_collection from mongo.utils.query_fil...
zhenxun815/ip_nlp
src/mongo/doc_service.py
doc_service.py
py
3,720
python
en
code
0
github-code
6
[ { "api_name": "common.logger_factory.get_logger", "line_number": 18, "usage_type": "call" }, { "api_name": "common.logger_factory", "line_number": 18, "usage_type": "name" }, { "api_name": "pymongo.ASCENDING", "line_number": 21, "usage_type": "name" }, { "api_name...
3477127800
import logging from dvc.cli.command import CmdBase logger = logging.getLogger(__name__) class CmdQueueWorker(CmdBase): """Run the exp queue worker.""" def run(self): self.repo.experiments.celery_queue.worker.start(self.args.name) return 0 def add_parser(experiments_subparsers, parent_pars...
gshanko125298/Prompt-Engineering-In-context-learning-with-GPT-3-and-LLMs
myenve/Lib/site-packages/dvc/commands/experiments/queue_worker.py
queue_worker.py
py
656
python
en
code
3
github-code
6
[ { "api_name": "logging.getLogger", "line_number": 5, "usage_type": "call" }, { "api_name": "dvc.cli.command.CmdBase", "line_number": 8, "usage_type": "name" } ]
2418871084
import torch import numpy as np from copy import deepcopy from typing import List, Optional, Tuple from torch.utils.data import DataLoader from supervised.utils import ids, keys, typeddicts from supervised import saving, data, networks VERBOSE = False # Default: whether the code output should be verbose NR_EPOCHS = ...
doggydigit/Biasadaptation-jureca
supervised/simulate/train.py
train.py
py
17,379
python
en
code
0
github-code
6
[ { "api_name": "supervised.networks.classes", "line_number": 15, "usage_type": "attribute" }, { "api_name": "supervised.networks", "line_number": 15, "usage_type": "name" }, { "api_name": "torch.utils.data.DataLoader", "line_number": 15, "usage_type": "name" }, { "...
40546898692
import json from django.http import JsonResponse from django.shortcuts import render from admin_manage.models import Company from admin_manage.views import method_verify, verify_token from face_machine_client.models import ClientInfo from asgiref.sync import async_to_sync from channels.layers import get_channel_layer ...
hamster1963/face-all-in-one-machine-backend
face_machine_client/views.py
views.py
py
6,512
python
en
code
0
github-code
6
[ { "api_name": "face_machine_client.models.ClientInfo.objects.filter", "line_number": 36, "usage_type": "call" }, { "api_name": "face_machine_client.models.ClientInfo.objects", "line_number": 36, "usage_type": "attribute" }, { "api_name": "face_machine_client.models.ClientInfo", ...
30299002056
import datetime from elasticsearch import Elasticsearch def insertData(): es = Elasticsearch('[localhost]:9200') # index : product_list, type : _doc index = "product_list" doc = { "category": "t-shirt", "price": 16700, "@timestamp": datetime.datetime.now() } es.index(i...
yeahyung/python-flask
study/elastic.py
elastic.py
py
730
python
en
code
0
github-code
6
[ { "api_name": "elasticsearch.Elasticsearch", "line_number": 6, "usage_type": "call" }, { "api_name": "datetime.datetime.now", "line_number": 13, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 13, "usage_type": "attribute" }, { "api_name"...
72787079228
import time import psutil import scapy.interfaces from scapy.all import * from PyQt6.QtCore import QObject, pyqtSignal class GetInterfaceServer(QObject): """捕获网卡信息""" isActive = True bytes_flow = pyqtSignal(dict) interfaces_scapy = scapy.interfaces.get_working_ifaces() interfaces_psutil = psutil....
VanCoghChan/CCSniffer
models/GetInterfaceModel.py
GetInterfaceModel.py
py
1,002
python
en
code
0
github-code
6
[ { "api_name": "PyQt6.QtCore.QObject", "line_number": 9, "usage_type": "name" }, { "api_name": "PyQt6.QtCore.pyqtSignal", "line_number": 12, "usage_type": "call" }, { "api_name": "scapy.interfaces.interfaces.get_working_ifaces", "line_number": 13, "usage_type": "call" },...
8105081811
# coding=utf-8 import os import re import glob import MeCab import torch from torch import nn import pickle import linecache import pandas as pd from sklearn.model_selection import train_test_split import torch.optim as optim import sys sys.path.append(os.path.join('./', '..', '..')) from classification.script.models i...
ys201810/lstm_pytorch
classification/script/train.py
train.py
py
5,357
python
en
code
0
github-code
6
[ { "api_name": "sys.path.append", "line_number": 14, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 14, "usage_type": "attribute" }, { "api_name": "os.path.join", "line_number": 14, "usage_type": "call" }, { "api_name": "os.path", "line_number...
17371125676
from django.contrib import admin from django.contrib.auth import get_user_model User = get_user_model() class UserAdmin(admin.ModelAdmin): list_display = ( 'id', 'first_name', 'last_name', 'username', 'email', 'balance', 'freeze_balance', 'role', ...
vavsar/freelance_t
users/admin.py
admin.py
py
363
python
en
code
1
github-code
6
[ { "api_name": "django.contrib.auth.get_user_model", "line_number": 4, "usage_type": "call" }, { "api_name": "django.contrib.admin.ModelAdmin", "line_number": 7, "usage_type": "attribute" }, { "api_name": "django.contrib.admin", "line_number": 7, "usage_type": "name" }, ...
7938194140
import pytesseract from PIL import Image import cv2 # Path to the Tesseract executable (you might not need this on Ubuntu) # pytesseract.pytesseract.tesseract_cmd = r'/usr/bin/tesseract' # You may need to set the correct path to Tesseract on your system # Open an image file image_path = 'image.jpeg' img = Image.open...
KolKemboi/AiMazing
OCR.py
OCR.py
py
572
python
en
code
0
github-code
6
[ { "api_name": "PIL.Image.open", "line_number": 10, "usage_type": "call" }, { "api_name": "PIL.Image", "line_number": 10, "usage_type": "name" }, { "api_name": "pytesseract.image_to_string", "line_number": 13, "usage_type": "call" }, { "api_name": "cv2.imread", ...
618459417
from typing import List import numpy as np from hakaton.prediction.model import SkyhacksModel from hakaton.util import model_util class WagonDetectorSkyhacksModel(SkyhacksModel): MODEL_STRUCTURE_FILE = "storedmodel/model-next-wagon-structure.json" MODEL_WEIGHTS_FILE = "storedmodel/model-next-wagon-weights.h...
karynabierz/hakaton
hakaton/prediction/wagondetector_skyhacks_model.py
wagondetector_skyhacks_model.py
py
1,623
python
en
code
0
github-code
6
[ { "api_name": "hakaton.prediction.model.SkyhacksModel", "line_number": 9, "usage_type": "name" }, { "api_name": "hakaton.util.model_util.load", "line_number": 14, "usage_type": "call" }, { "api_name": "hakaton.util.model_util", "line_number": 14, "usage_type": "name" },...
45484267256
from setuptools import setup, find_packages __version__ = '0.8.6' with open('README.rst', 'r', encoding='utf-8') as fh: long_description = fh.read() setup( name='LMRt', # required version=__version__, description='LMR turbo', long_description=long_description, long_description_content_type='t...
fzhu2e/LMRt
setup.py
setup.py
py
1,031
python
en
code
9
github-code
6
[ { "api_name": "setuptools.setup", "line_number": 7, "usage_type": "call" }, { "api_name": "setuptools.find_packages", "line_number": 16, "usage_type": "call" } ]
40176969885
from setuptools import setup, find_packages VERSION = "0.0.6" DESCRIPTION = "Investopedia simulator trading API" LONG_DESCRIPTION = ( "An API that allows trading with stock simulator for from Investopedia" ) install_requires = ["selenium", "schedule"] setup( name="simulatorTradingApi", version=VERSION, ...
mchigit/investopedia-simulator-api
setup.py
setup.py
py
752
python
en
code
0
github-code
6
[ { "api_name": "setuptools.setup", "line_number": 11, "usage_type": "call" }, { "api_name": "setuptools.find_packages", "line_number": 18, "usage_type": "call" } ]
37018522643
import numpy as np import statsmodels.api as sm np.random.seed(2021) mu = 0 sigma = 1 # number of observations n = 100 alpha = np.repeat(0.5, n) beta = 1.5 def MC_estimation_slope(M): MC_betas = [] MC_samples = {} for i in range(M): # to make sure the variance in X is bigger than the variance i...
TatevKaren/mathematics-statistics-for-data-science
Statistical Sampling/Monte Carlo Simulation OLS estimate.py
Monte Carlo Simulation OLS estimate.py
py
985
python
en
code
88
github-code
6
[ { "api_name": "numpy.random.seed", "line_number": 4, "usage_type": "call" }, { "api_name": "numpy.random", "line_number": 4, "usage_type": "attribute" }, { "api_name": "numpy.repeat", "line_number": 10, "usage_type": "call" }, { "api_name": "numpy.random.normal", ...
12580230297
from django.shortcuts import render from django.http import JsonResponse import openai # Create your views here. openai_api_key='MI-API-KEY' openai.api_key=openai_api_key def ask_openai(message): response = openai.Completion.create( model = "text-davinci-003", prompt= message, max_tokens=1...
elgualas/MichiAI
chatbot/views.py
views.py
py
880
python
en
code
0
github-code
6
[ { "api_name": "openai.api_key", "line_number": 7, "usage_type": "attribute" }, { "api_name": "openai.Completion.create", "line_number": 10, "usage_type": "call" }, { "api_name": "openai.Completion", "line_number": 10, "usage_type": "attribute" }, { "api_name": "dj...
4728965077
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Sep 11 10:19:22 2018 @author: psanch """ import tensorflow as tf from sklearn.manifold import TSNE import matplotlib.pyplot as plt import numpy as np import utils.utils as utils class BaseVisualize: def __init__(self, model_name, result_dir, fig_...
psanch21/VAE-GMVAE
base/base_visualize.py
base_visualize.py
py
1,607
python
en
code
197
github-code
6
[ { "api_name": "utils.utils.save_img", "line_number": 24, "usage_type": "call" }, { "api_name": "utils.utils", "line_number": 24, "usage_type": "name" }, { "api_name": "sklearn.manifold.TSNE", "line_number": 30, "usage_type": "call" }, { "api_name": "numpy.asarray"...
21816512190
from flask import Flask, request import json app = Flask(__name__) @app.route("/") def api(): x = request.headers.get("Xxx") if x == None: return "missing header" headers = [header for header in request.headers] return json.dumps(headers) if __name__ == "__main__": app.run(host="0.0.0.0",...
mrtc0/abusing-hop-by-hop-header
app/app.py
app.py
py
344
python
en
code
1
github-code
6
[ { "api_name": "flask.Flask", "line_number": 3, "usage_type": "call" }, { "api_name": "flask.request.headers.get", "line_number": 7, "usage_type": "call" }, { "api_name": "flask.request.headers", "line_number": 7, "usage_type": "attribute" }, { "api_name": "flask.r...
2734136284
# -*- coding: utf-8 -*- """ @project ensepro @since 25/02/2018 @author Alencar Rodrigo Hentges <alencarhentges@gmail.com> """ import json import logging from ensepro.constantes import ConfiguracoesConstantes, StringConstantes, LoggerConstantes def __init_logger(): global logger logging.basicConfig( ...
Ensepro/ensepro-core
ensepro/configuracoes/configuracoes.py
configuracoes.py
py
2,135
python
pt
code
1
github-code
6
[ { "api_name": "logging.basicConfig", "line_number": 16, "usage_type": "call" }, { "api_name": "ensepro.constantes.ConfiguracoesConstantes.ENSEPRO_PATH", "line_number": 17, "usage_type": "attribute" }, { "api_name": "ensepro.constantes.ConfiguracoesConstantes", "line_number": ...
40688712803
import logging from feg.protos import s6a_proxy_pb2, s6a_proxy_pb2_grpc from google.protobuf.json_format import MessageToJson from magma.common.rpc_utils import print_grpc from magma.subscriberdb import metrics from magma.subscriberdb.crypto.utils import CryptoError from magma.subscriberdb.store.base import Subscriber...
magma/magma
lte/gateway/python/magma/subscriberdb/protocols/s6a_proxy_servicer.py
s6a_proxy_servicer.py
py
6,492
python
en
code
1,605
github-code
6
[ { "api_name": "feg.protos.s6a_proxy_pb2_grpc.S6aProxyServicer", "line_number": 12, "usage_type": "attribute" }, { "api_name": "feg.protos.s6a_proxy_pb2_grpc", "line_number": 12, "usage_type": "name" }, { "api_name": "logging.info", "line_number": 19, "usage_type": "call" ...
8564353511
import tkinter as tk import random from sql import SqlInject LARGE_FONT = ("Verdana", 12) data = SqlInject() class GuiFood(tk.Tk): def __init__(self, data=data, *args, **kwargs): tk.Tk.__init__(self, *args, **kwargs) container = tk.Frame(self) container.pack(side="top", fill="both", ex...
Bainard/activite5
newgui.py
newgui.py
py
6,917
python
en
code
0
github-code
6
[ { "api_name": "sql.SqlInject", "line_number": 6, "usage_type": "call" }, { "api_name": "tkinter.Tk", "line_number": 9, "usage_type": "attribute" }, { "api_name": "tkinter.Tk.__init__", "line_number": 12, "usage_type": "call" }, { "api_name": "tkinter.Tk", "lin...
34862439177
import datetime import decimal import urllib.parse from typing import Dict, Any from django import template from django.conf import settings from django.template.defaultfilters import date from django.urls import NoReverseMatch, reverse from django.utils import timezone from django.utils.safestring import mark_safe fr...
Status-Page/Status-Page
statuspage/utilities/templatetags/helpers.py
helpers.py
py
10,704
python
en
code
45
github-code
6
[ { "api_name": "django.template.Library", "line_number": 22, "usage_type": "call" }, { "api_name": "django.template", "line_number": 22, "usage_type": "name" }, { "api_name": "utilities.utils.get_viewname", "line_number": 35, "usage_type": "call" }, { "api_name": "...
39275803820
## For random paymentid import re import secrets import sha3 import sys from binascii import hexlify, unhexlify import pyed25519 # byte-oriented StringIO was moved to io.BytesIO in py3k try: from io import BytesIO except ImportError: from StringIO import StringIO as BytesIO b = pyed25519.b q = pyed25519.q l ...
wrkzcoin/TipBot
wrkzcoin_tipbot/cn_addressvalidation.py
cn_addressvalidation.py
py
11,230
python
en
code
137
github-code
6
[ { "api_name": "pyed25519.b", "line_number": 16, "usage_type": "attribute" }, { "api_name": "pyed25519.q", "line_number": 17, "usage_type": "attribute" }, { "api_name": "pyed25519.l", "line_number": 18, "usage_type": "attribute" }, { "api_name": "binascii.unhexlify...
26609155963
import pyautogui import time def click_on_bluestacks(x, y): # Attendez 5 secondes pour vous donner le temps de changer de fenêtre time.sleep(5) # Trouvez la fenêtre Bluestacks bluestacks_windows = pyautogui.getWindowsWithTitle('Bluestacks') # Vérifiez si la fenêtre Bluestacks a été trouvée if...
Edgarflc/Summoners-War-Bot
test.py
test.py
py
941
python
fr
code
0
github-code
6
[ { "api_name": "time.sleep", "line_number": 6, "usage_type": "call" }, { "api_name": "pyautogui.getWindowsWithTitle", "line_number": 9, "usage_type": "call" }, { "api_name": "pyautogui.moveTo", "line_number": 20, "usage_type": "call" }, { "api_name": "pyautogui.cli...