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
71673575399
#!/bin/env python import csv import requests from io import StringIO import difflib url = 'https://docs.google.com/spreadsheet/ccc?key='\ '1H77kqiz1R7xVBRXxjjMCqk_3AMF6P6qIMi6p2FEL_us&output=csv' response = requests.get(url) assert response.status_code == 200, 'Wrong status code' buff = StringIO(response.conten...
colatkinson/axp_lineage
typos.py
typos.py
py
726
python
en
code
1
github-code
18
[ { "api_name": "requests.get", "line_number": 10, "usage_type": "call" }, { "api_name": "io.StringIO", "line_number": 12, "usage_type": "call" }, { "api_name": "csv.reader", "line_number": 16, "usage_type": "call" }, { "api_name": "difflib.get_close_matches", "...
28291725570
import logging from datetime import timedelta from pathlib import Path logging.basicConfig(filename="telescreen.log", level=logging.DEBUG) # -----------Slide Sources----------- # page which lists all the slide-urls wikipedia_list_page = "Benutzer:Meisam/test" wikipedia_lang = "de" # list of the users who are allowed...
meisam-wiki/telescreen
configs.py
configs.py
py
1,227
python
en
code
1
github-code
18
[ { "api_name": "logging.basicConfig", "line_number": 5, "usage_type": "call" }, { "api_name": "logging.DEBUG", "line_number": 5, "usage_type": "attribute" }, { "api_name": "pathlib.Path", "line_number": 15, "usage_type": "call" }, { "api_name": "pathlib.Path", ...
16192783531
#!/usr/bin/env python3 import os,sys,re,yaml,subprocess,pickle import os.path as osp import numpy as np from easydict import EasyDict as edict trainCommandTemplate = "./tools/train_net.py --iters {} --imdb mnist-{}-default --cfg ./experiments/cfgs/cls_mnist_al.yml --solver ./models/mnist/{}/solver.prototxt --solver_st...
PurdueCAM2Project/metaDatasetGenerator
experiments/scripts/mnist_al.py
mnist_al.py
py
8,462
python
en
code
0
github-code
18
[ { "api_name": "easydict.EasyDict", "line_number": 18, "usage_type": "call" }, { "api_name": "yaml.load", "line_number": 18, "usage_type": "call" }, { "api_name": "subprocess.Popen", "line_number": 34, "usage_type": "call" }, { "api_name": "subprocess.PIPE", "l...
74547605481
# -*- coding: utf-8 -*- from odoo import models, fields, api, _ from odoo.exceptions import UserError, ValidationError import odoo.addons.decimal_precision as dp from datetime import datetime from dateutil.relativedelta import relativedelta import math import logging EPS = 0.00001 _logger = logging.getLogger(__name__...
AllianceWebcoop/webcoop_source
wc_upgrade_ver10_0_1_5/b563_b589/deduction.py
deduction.py
py
1,557
python
en
code
0
github-code
18
[ { "api_name": "logging.getLogger", "line_number": 12, "usage_type": "call" }, { "api_name": "odoo.models.Model", "line_number": 15, "usage_type": "attribute" }, { "api_name": "odoo.models", "line_number": 15, "usage_type": "name" }, { "api_name": "odoo.fields.Bool...
43366224720
import os import sys, time, random from zipfile import ZipFile from PyQt6.QtWidgets import QApplication, QWidget, QFileDialog, QMessageBox, QDialog, QVBoxLayout, QLabel from PyQt6.QtGui import QIcon from PyQt6 import uic, QtGui, QtCore, QtWidgets from threading import Thread from pathlib import Path s...
USharma002/py-sudoku
main.py
main.py
py
7,451
python
en
code
0
github-code
18
[ { "api_name": "sys.setrecursionlimit", "line_number": 14, "usage_type": "call" }, { "api_name": "PyQt6.uic.loadUiType", "line_number": 17, "usage_type": "call" }, { "api_name": "PyQt6.uic", "line_number": 17, "usage_type": "name" }, { "api_name": "os.path.isdir", ...
31481689048
from selenium import webdriver from selenium.webdriver.chrome.service import Service from webdriver_manager.chrome import ChromeDriverManager from selenium.webdriver.common.by import By import time # Signup class Quantibly(): def test_signup_valid(self): base_url = 'https://app.quantibly.com/register/' ...
Morshedul530/Quantibly_Test
Authentication/1.Signup/signup_demo.py
signup_demo.py
py
2,285
python
en
code
0
github-code
18
[ { "api_name": "selenium.webdriver.Chrome", "line_number": 12, "usage_type": "call" }, { "api_name": "selenium.webdriver", "line_number": 12, "usage_type": "name" }, { "api_name": "selenium.webdriver.chrome.service.Service", "line_number": 12, "usage_type": "call" }, {...
71210879399
#!/usr/bin/env python # coding: utf-8 #Venn diagrams import pandas as pd ibd_data = pd.read_pickle("datasetspandas/dutch_export_transposed_ibd_binary.pkl") ibd_data.rename(columns={'Unnamed: 0': 'sample_id'}, inplace=True) ibd_data.index.name = 'sample_id' #Fetch cohort ID covariates = pd.read_excel("Covariates/CDvsU...
GRONINGEN-MICROBIOME-CENTRE/Phip-Seq_LLD-IBD
IBD/04_Venndiagrams.py
04_Venndiagrams.py
py
3,699
python
en
code
0
github-code
18
[ { "api_name": "pandas.read_pickle", "line_number": 6, "usage_type": "call" }, { "api_name": "pandas.read_excel", "line_number": 11, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.figure", "line_number": 63, "usage_type": "call" }, { "api_name": "matplotl...
37503254047
""" Example: plotting Zarrow's non-classical Schottky group. Robert Zarrow. "Classical and non-classical Schottky groups". In: Duke Mathematical Journal (42)4, 1975. pp.717--724.' """ from bella import cayley import holoviews as hv hv.extension('bokeh') from mpmath import mp from functools import reduce class Za...
aelzenaar/bella
examples/zarrow.py
zarrow.py
py
2,143
python
en
code
0
github-code
18
[ { "api_name": "holoviews.extension", "line_number": 8, "usage_type": "call" }, { "api_name": "bella.cayley.GroupCache", "line_number": 12, "usage_type": "attribute" }, { "api_name": "bella.cayley", "line_number": 12, "usage_type": "name" }, { "api_name": "mpmath.m...
11770536504
import numpy as np import matplotlib.pyplot as plt from sklearn.datasets import make_blobs # Function: K Means # ------------- # K-Means is an algorithm that takes in a dataset and a constant # k and returns k centroids (which define clusters of data in the # dataset which are similar to one another). # maxIt最大...
owencwl/DemoPython
MachineLearning/K_means.py
K_means.py
py
4,610
python
en
code
1
github-code
18
[ { "api_name": "numpy.zeros", "line_number": 15, "usage_type": "call" }, { "api_name": "numpy.random.randint", "line_number": 21, "usage_type": "call" }, { "api_name": "numpy.random", "line_number": 21, "usage_type": "attribute" }, { "api_name": "numpy.copy", "...
1419954428
import networkx as nx import matplotlib.pyplot as plt import matplotlib.image as mpimg fileWithIps = open("ipList.txt", "r") def getIpList(file): clients = [] servers = [] routers = [] connections = [] for line in file: if line[0:1] == "0" and line[1] == ":": nonZeroLine = lin...
ermilovim/diplom
getIpList.py
getIpList.py
py
4,307
python
en
code
0
github-code
18
[ { "api_name": "matplotlib.image.imread", "line_number": 81, "usage_type": "call" }, { "api_name": "matplotlib.image", "line_number": 81, "usage_type": "name" }, { "api_name": "matplotlib.image.imread", "line_number": 82, "usage_type": "call" }, { "api_name": "matp...
16203917365
from datetime import datetime from app.baseModel import fields, pydantic_model_creator, BaseModel class WeeklyConfigModel(BaseModel): name = fields.TextField(description="名字") parent = fields.IntField(null=True, default=None, description="上一级的id,有上一级则为项目,否则为产品") desc = fields.TextField(description="备注") ...
zhongyehai/test-platform-fastapi-api
app/test_work/models/weekly.py
weekly.py
py
3,312
python
en
code
3
github-code
18
[ { "api_name": "app.baseModel.BaseModel", "line_number": 6, "usage_type": "name" }, { "api_name": "app.baseModel.fields.TextField", "line_number": 7, "usage_type": "call" }, { "api_name": "app.baseModel.fields", "line_number": 7, "usage_type": "name" }, { "api_name...
30063117645
import datetime import sqlalchemy as sa from sqlalchemy.orm import sessionmaker from sqlalchemy.ext.declarative import declarative_base DB_PATH = "sqlite:///sochi_athletes.sqlite3" from datetime import datetime, date, time # базовый класс моделей таблиц Base = declarative_base() class User(Base): """...
solver13/B412
B4_12_athlets.py
B4_12_athlets.py
py
10,991
python
ru
code
0
github-code
18
[ { "api_name": "sqlalchemy.ext.declarative.declarative_base", "line_number": 10, "usage_type": "call" }, { "api_name": "sqlalchemy.Column", "line_number": 19, "usage_type": "call" }, { "api_name": "sqlalchemy.Integer", "line_number": 19, "usage_type": "attribute" }, { ...
6798448104
# from os.path import dirname import urllib.request import base64 import argparse import os.path key = "<your api key>" parser = argparse.ArgumentParser(description="Shrink PNGs with TinyPNG") parser.add_argument("input", type=argparse.FileType("rb"), help="input PNG") args = parser.parse_args() request = urllib.req...
NLZ/TinyPNG-Python
tinypng.py
tinypng.py
py
1,532
python
en
code
0
github-code
18
[ { "api_name": "argparse.ArgumentParser", "line_number": 9, "usage_type": "call" }, { "api_name": "argparse.FileType", "line_number": 10, "usage_type": "call" }, { "api_name": "urllib.request.request.Request", "line_number": 13, "usage_type": "call" }, { "api_name"...
6830268038
from Queues import * from Account import * import json import ConfigParser import couchdb import ast import Pyro4 import random import logging __author__ = 'Stian Stroem Anderssen' class Config: """ This module aims to build and keep track of the manager objet during runtime. Every time a user creation is ...
s177437/uptime_challenge
managers/Config.py
Config.py
py
10,292
python
en
code
0
github-code
18
[ { "api_name": "Pyro4.Proxy", "line_number": 27, "usage_type": "call" }, { "api_name": "json.loads", "line_number": 38, "usage_type": "call" }, { "api_name": "logging.info", "line_number": 117, "usage_type": "call" }, { "api_name": "ConfigParser.SafeConfigParser", ...
1367303063
from turtle import pd import numpy as np import matplotlib.pyplot as plt import pandas as pd # Import the MarkovChain class from markovchain.py from markovchain import MarkovChain import random as random # P = np.array([[0.8, 0.2], [0.1, 0.9]]) # Transition matrix # mc = MarkovChain(P, ['1', '2']) # mc.draw() # Ga...
noorulislam770/stochasticsProcesses
test.py
test.py
py
2,639
python
en
code
0
github-code
18
[ { "api_name": "random.randrange", "line_number": 23, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.plot", "line_number": 31, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 31, "usage_type": "name" }, { "api_name": "matplotlib....
11046028048
import unittest import torch from utils import read_py_config, build_model, check_file_exist class ExportError(Exception): pass class TestONNXExport(unittest.TestCase): def setUp(self): config = read_py_config('./configs/config.py') self.config = config self.model = build_model(conf...
tfygg/light-weight-face-anti-spoofing
tests.py
tests.py
py
907
python
en
code
null
github-code
18
[ { "api_name": "unittest.TestCase", "line_number": 11, "usage_type": "attribute" }, { "api_name": "utils.read_py_config", "line_number": 13, "usage_type": "call" }, { "api_name": "utils.build_model", "line_number": 15, "usage_type": "call" }, { "api_name": "torch.r...
7315288492
from PyQt5.QtCore import pyqtSignal, QObject from PyQt5.QtWidgets import QFileDialog from os import getcwd class OptionsDialogFunctions(QObject): saveSettingsRequest = pyqtSignal(dict) def __init__(self, widget, ui, settings): super(OptionsDialogFunctions, self).__init__(widget.parent()) self....
TheRealBanana/movie_organizer
src/logic/options_dialog_functions.py
options_dialog_functions.py
py
2,449
python
en
code
0
github-code
18
[ { "api_name": "PyQt5.QtCore.QObject", "line_number": 5, "usage_type": "name" }, { "api_name": "PyQt5.QtCore.pyqtSignal", "line_number": 6, "usage_type": "call" }, { "api_name": "PyQt5.QtWidgets.QFileDialog", "line_number": 49, "usage_type": "call" }, { "api_name":...
10370566279
import time import datetime import numpy as np from app.utils import utils from app.utils.portfolio import Portfolio from app.usecases.get_recommended_weights import get_recommended_weights from app.usecases.get_simulation_hull import get_simulation_hull from app.models.sector import GICS_DATA from dateutil.relativedel...
VIVKA/fminvest
app/usecases/get_portfolio.py
get_portfolio.py
py
4,116
python
en
code
0
github-code
18
[ { "api_name": "datetime.datetime.today", "line_number": 15, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 15, "usage_type": "attribute" }, { "api_name": "datetime.datetime.today", "line_number": 18, "usage_type": "call" }, { "api_name":...
961255708
import serial import re import math from openpyxl import * # To get the relative data from the data def get_data(getdata_data,baseline): getdata_result = [0] * 9 for i in range(9): getdata_result[i] = abs(float(getdata_data[i]) - float(baseline[i])) / float(baseline[i]) return getdata_result # ...
benielT/GestAKey
data/data_read.py
data_read.py
py
10,890
python
en
code
1
github-code
18
[ { "api_name": "math.sqrt", "line_number": 139, "usage_type": "call" }, { "api_name": "serial.Serial", "line_number": 222, "usage_type": "call" }, { "api_name": "socket.socket", "line_number": 225, "usage_type": "call" }, { "api_name": "socket.AF_INET", "line_n...
6423744654
#! /usr/bin/env python # coding: utf-8 import json, random from flask import Flask, render_template, request from . import constant as const from gpbapp.classes import LocationSearch, Parser from gpbapp.function import infos_wikipedia app = Flask(__name__) @app.route('/') @app.route('/index/') def index(): ret...
riderflo85/grandpybot
gpbapp/views.py
views.py
py
1,560
python
en
code
0
github-code
18
[ { "api_name": "flask.Flask", "line_number": 11, "usage_type": "call" }, { "api_name": "flask.render_template", "line_number": 17, "usage_type": "call" }, { "api_name": "flask.request.args.get", "line_number": 22, "usage_type": "call" }, { "api_name": "flask.reques...
5751475993
import math from abc import ABC, abstractmethod from dataclasses import dataclass from typing import Callable def print_header(): print("Задание #4_2. Приближённое вычисление интеграла по квадратурным формулам\n") def get_input(value_name: str, msg: str, default_value: float) -> float: try: value = ...
vad-ii-k/Computing_practicum_5th_semester
lw4_2.py
lw4_2.py
py
4,804
python
ru
code
0
github-code
18
[ { "api_name": "abc.ABC", "line_number": 21, "usage_type": "name" }, { "api_name": "typing.Callable", "line_number": 26, "usage_type": "name" }, { "api_name": "abc.abstractmethod", "line_number": 25, "usage_type": "name" }, { "api_name": "dataclasses.dataclass", ...
10759236484
from __future__ import annotations import os from enum import Enum, auto from typing import List, Optional from skytemple_files.common.types.data_handler import DataHandler from skytemple_files.common.util import OptionalKwargs, read_bytes from skytemple_files.compression_container.at3px.handler import At3pxHandler f...
SkyTemple/skytemple-files
skytemple_files/compression_container/common_at/handler.py
handler.py
py
5,549
python
en
code
16
github-code
18
[ { "api_name": "enum.Enum", "line_number": 20, "usage_type": "name" }, { "api_name": "enum.auto", "line_number": 21, "usage_type": "call" }, { "api_name": "skytemple_files.compression_container.at4pn.handler.At4pnHandler", "line_number": 21, "usage_type": "name" }, { ...
29957871297
# -*- coding: utf-8 -*- # --- # jupyter: # jupytext: # text_representation: # extension: .py # format_name: light # format_version: '1.5' # jupytext_version: 1.3.3 # kernelspec: # display_name: Python 3 # language: python # name: python3 # --- import os import pandas as pd f...
sugiyama34/AIciaSolidProject
049.factor analysis - 因子分析/factor analysis.py
factor analysis.py
py
1,553
python
en
code
157
github-code
18
[ { "api_name": "pandas.read_csv", "line_number": 24, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 24, "usage_type": "call" }, { "api_name": "os.path", "line_number": 24, "usage_type": "attribute" }, { "api_name": "pandas_profiling.ProfileRep...
25677185449
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2023/4/21 23:57 # @Author : cap669 # @File : XJob.py # @Software: PyCharm import datetime import traceback from peewee import Model from peewee import fn from playhouse.pool import PooledPostgresqlDatabase from root.base.wrapper.EvsWrapper import EvsWrapper...
niekuiqiang00278/Mantle
root/plux/XJob.py
XJob.py
py
9,707
python
en
code
0
github-code
18
[ { "api_name": "pydantic.BaseModel", "line_number": 19, "usage_type": "name" }, { "api_name": "datetime.datetime", "line_number": 22, "usage_type": "attribute" }, { "api_name": "peewee.Model", "line_number": 31, "usage_type": "name" }, { "api_name": "peewee.Model",...
4119590089
from genericpath import isdir from PIL import Image import numpy as np import os def get_paths(dir): paths = [] for path in os.listdir(dir): if os.path.isdir(dir + '/' + path): print('\rReading {} ...'.format(dir + '/' + path), end = '') paths += get_paths(dir + '/' + ...
windswiii/Programming-python-exercise
week_08/pic_load.py
pic_load.py
py
1,179
python
en
code
0
github-code
18
[ { "api_name": "os.listdir", "line_number": 8, "usage_type": "call" }, { "api_name": "os.path.isdir", "line_number": 9, "usage_type": "call" }, { "api_name": "os.path", "line_number": 9, "usage_type": "attribute" }, { "api_name": "PIL.Image.open", "line_number"...
16378684140
import os from imutils.video import FPS import cv2 import math def video_to_frames(input_loc, output_loc): path=os.listdir(input_loc) count=1 for i in path: try: main_folder=os.path.join(input_loc,i) for folder in os.listdir(main_folder): print(f...
CodeWithEhtisham/vehicle-dataset
videos_to_images.py
videos_to_images.py
py
1,599
python
en
code
0
github-code
18
[ { "api_name": "os.listdir", "line_number": 7, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 11, "usage_type": "call" }, { "api_name": "os.path", "line_number": 11, "usage_type": "attribute" }, { "api_name": "os.listdir", "line_number": 1...
3021459378
# import numpy as np import cv2 import torch try: import toolkit.customsnippets as customsnippets except: import customsnippets try: import toolkit.methodspaths as methodspaths except: import methodspaths hardcodedsize = (640, 640) # yolox specific def preprocess_img(in_img): #hardcodedsize = ...
JoaoPMonteiro/epoche
toolkit/handledetection.py
handledetection.py
py
5,889
python
en
code
0
github-code
18
[ { "api_name": "cv2.resize", "line_number": 21, "usage_type": "call" }, { "api_name": "cv2.INTER_AREA", "line_number": 21, "usage_type": "attribute" }, { "api_name": "numpy.moveaxis", "line_number": 22, "usage_type": "call" }, { "api_name": "numpy.moveaxis", "l...
7256993671
from db_connector import DataBase from queries import * import pandas as pd import numpy as np import matplotlib.pyplot as plt import math import os db = DataBase('results.db') num_targets = [21, 32, 33, 64] num_discretizations = [2, 4, 6] result_category = ['optimal', 'infeasible', 'timed-out'] row_list = [] for t...
sujeevraja/fixed-wing-drone-orienteering
final-results/create_results.py
create_results.py
py
4,587
python
en
code
1
github-code
18
[ { "api_name": "db_connector.DataBase", "line_number": 10, "usage_type": "call" }, { "api_name": "pandas.DataFrame", "line_number": 25, "usage_type": "call" }, { "api_name": "pandas.to_numeric", "line_number": 35, "usage_type": "attribute" }, { "api_name": "pandas....
37678171394
""" - отдельная заметка передаётся на страницу со списком заметок в списке `object_list` в словаре `context`; - в список заметок одного пользователя не попадают заметки другого пользователя; - на страницы создания и редактирования заметки передаются формы. """ from django.shortcuts import reverse from django.test imp...
PracticumGrade/ya_note_with_tests
notes/tests/test_content.py
test_content.py
py
3,032
python
ru
code
null
github-code
18
[ { "api_name": "django.contrib.auth.get_user_model", "line_number": 13, "usage_type": "call" }, { "api_name": "django.test.TestCase", "line_number": 16, "usage_type": "name" }, { "api_name": "notes.models.Note", "line_number": 23, "usage_type": "call" }, { "api_nam...
8907437697
# -*- coding:utf-8 -*- from model_7th import * from Cal_measurement import * from random import random from model_profiler import model_profiler from color_to_gray import * import matplotlib.pyplot as plt import numpy as np import easydict import os FLAGS = easydict.EasyDict({"img_height": 256, ...
Kimyuhwanpeter/Multi-class_marine
train_7th.py
train_7th.py
py
16,197
python
en
code
0
github-code
18
[ { "api_name": "easydict.EasyDict", "line_number": 13, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 47, "usage_type": "call" }, { "api_name": "numpy.uint8", "line_number": 47, "usage_type": "attribute" }, { "api_name": "random.random", "l...
73494232040
from datetime import datetime first_time = str(input('Enter the first date in yyyy-mm-dd hh:mm format: ')) second_time = str(input('Enter the second date in yyyy-mm-dd hh:mm format: ')) avg_value_Grafana = float(input('Enter the numeric average value from Grafana in the time period of interest: ')) print("""Press: 1 ...
filippo14/GB-calculator
calculator.py
calculator.py
py
1,797
python
en
code
0
github-code
18
[ { "api_name": "datetime.datetime.strptime", "line_number": 16, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 16, "usage_type": "name" }, { "api_name": "datetime.datetime.strptime", "line_number": 17, "usage_type": "call" }, { "api_name"...
75107834280
import tensorflow as tf from tensorflow.python.layers.core import Dense from config import global_batch_size, max_line_length def model_inputs(): '''Create palceholders for inputs to the model''' input_data = tf.placeholder(tf.int32, [None, None], name='input') targets = tf.placeholder(tf.int32, [None, No...
EugeneBilenko/lstm_chatter_box_example
core/seq_to_seq.py
seq_to_seq.py
py
9,246
python
en
code
0
github-code
18
[ { "api_name": "tensorflow.placeholder", "line_number": 8, "usage_type": "call" }, { "api_name": "tensorflow.int32", "line_number": 8, "usage_type": "attribute" }, { "api_name": "tensorflow.placeholder", "line_number": 9, "usage_type": "call" }, { "api_name": "tens...
8882385726
from random import randint from itertools import product from argparse import ArgumentParser import pygame as pg SPEED = 3 # the size of a tile TILE_X = 30 TILE_Y = 20 # how many tiles BOARD_WIDTH = 30 BOARD_HEIGHT = 40 COLOR_WHITE = (250, 250, 250) COLOR_BLACK = (240, 240, 240) COLOR_SNAKE = (128, 128, 0) COLOR_F...
ue12-p22/python-solutions
snake.py
snake.py
py
4,186
python
en
code
0
github-code
18
[ { "api_name": "pygame.Rect", "line_number": 46, "usage_type": "call" }, { "api_name": "pygame.draw.rect", "line_number": 52, "usage_type": "call" }, { "api_name": "pygame.draw", "line_number": 52, "usage_type": "attribute" }, { "api_name": "itertools.product", ...
34354563411
import requests from bs4 import BeautifulSoup from random import choice from datetime import datetime, date import json import os #main url to which relative urls will be appended BASE_URL = "http://quotes.toscrape.com/" print("Welcome to the random quote game!\n") #function that scrapes the quotes w...
electrical-breakdown/quote-scraper
quote_scraper.py
quote_scraper.py
py
7,417
python
en
code
0
github-code
18
[ { "api_name": "os.getcwd", "line_number": 23, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 24, "usage_type": "call" }, { "api_name": "os.path", "line_number": 24, "usage_type": "attribute" }, { "api_name": "os.path.join", "line_number":...
74518812198
from rest_framework import serializers from rest_auth.registration.serializers import RegisterSerializer from space_manager.branches import serializers as branch_serializers from allauth.account.adapter import get_adapter from allauth.account.utils import setup_user_email from space_manager.membership import models as ...
yoojat/Space-Manager
space_manager/users/serializers.py
serializers.py
py
5,099
python
en
code
0
github-code
18
[ { "api_name": "rest_framework.serializers.ModelSerializer", "line_number": 11, "usage_type": "attribute" }, { "api_name": "rest_framework.serializers", "line_number": 11, "usage_type": "name" }, { "api_name": "space_manager.branches.serializers.BranchForMembershipSerializer", ...
29729102937
from pydantic import BaseModel, validator from tracardi.domain.named_entity import NamedEntity from typing import Optional from tracardi.service.plugin.domain.config import PluginConfig class Config(PluginConfig): source: NamedEntity project_id: str funnel_id: str from_date: str to_date: Optional[...
Tracardi/tracardi
tracardi/process_engine/action/v1/connectors/mixpanel/fetch_funnel/model/config.py
config.py
py
1,248
python
en
code
430
github-code
18
[ { "api_name": "tracardi.service.plugin.domain.config.PluginConfig", "line_number": 7, "usage_type": "name" }, { "api_name": "tracardi.domain.named_entity.NamedEntity", "line_number": 8, "usage_type": "name" }, { "api_name": "typing.Optional", "line_number": 12, "usage_typ...
14574538630
from flask import Flask, render_template,request, redirect, send_from_directory, abort, Blueprint, g from flask_login import LoginManager, login_required, login_user, current_user,logout_user import pymysql import pymysql.cursors login_manager= LoginManager() app = Flask(__name__) login_manager.init_app(app) app.con...
Cherry342/social-media
main.py
main.py
py
5,674
python
en
code
0
github-code
18
[ { "api_name": "flask_login.LoginManager", "line_number": 7, "usage_type": "call" }, { "api_name": "flask.Flask", "line_number": 9, "usage_type": "call" }, { "api_name": "pymysql.connect", "line_number": 26, "usage_type": "call" }, { "api_name": "pymysql.cursors", ...
29729568307
from datetime import datetime from pydantic import validator from tracardi.domain.profile import Profile from tracardi.service.plugin.domain.config import PluginConfig from tracardi.service.plugin.domain.register import Plugin, Spec, MetaData, Documentation, PortDoc, Form, FormGroup, \ FormField, FormComponent f...
Tracardi/tracardi
tracardi/process_engine/action/v1/segmentation/delete/plugin.py
plugin.py
py
3,152
python
en
code
430
github-code
18
[ { "api_name": "tracardi.service.plugin.domain.config.PluginConfig", "line_number": 14, "usage_type": "name" }, { "api_name": "pydantic.validator", "line_number": 17, "usage_type": "call" }, { "api_name": "tracardi.service.plugin.runner.ActionRunner", "line_number": 28, "u...
40587968434
""" Single positive training label (random choice), multiple label for test labels. """ import argparse from pathlib import Path import random from video_datasets_api.wray_multiverb.beoid import read_all_annotations_thresholded parser = argparse.ArgumentParser( "Generate splits of BEOID dataset (Wray)" ) parser....
kiyoon/PyVideoAI
tools/datasets/beoid_42verb_splits.py
beoid_42verb_splits.py
py
2,996
python
en
code
22
github-code
18
[ { "api_name": "argparse.ArgumentParser", "line_number": 11, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_number": 15, "usage_type": "name" }, { "api_name": "pathlib.Path", "line_number": 18, "usage_type": "name" }, { "api_name": "pathlib.Path", ...
13286929782
from datetime import datetime import logging import pandas as pd __all__ = ('PRT_MSDSFetcher',) from utils.fetcher.base_epidemiology import BaseEpidemiologyFetcher from utils.helper import int_or_none """ site-location: https://github.com/dssg-pt/covid19pt-data COVID19-Portugal Data for Portugal created, maintained...
covid19db/fetchers-python
src/plugins/PRT_MSDS/fetcher.py
fetcher.py
py
3,943
python
en
code
5
github-code
18
[ { "api_name": "logging.getLogger", "line_number": 16, "usage_type": "call" }, { "api_name": "utils.fetcher.base_epidemiology.BaseEpidemiologyFetcher", "line_number": 19, "usage_type": "name" }, { "api_name": "pandas.read_csv", "line_number": 27, "usage_type": "call" }, ...
5772097362
from django.shortcuts import render import json import urllib.request # Create your views here. API_KEY = '4f526819847b8e90e06317f9d335f65b' def index(request): if request.method == 'POST': city = request.POST['city'] res = urllib.request.urlopen('http://api.openweathermap.org/data/2.5/weather?q={...
HarryCheng1110/django_weatherApp
weatherapp/views.py
views.py
py
934
python
en
code
0
github-code
18
[ { "api_name": "urllib.request.request.urlopen", "line_number": 11, "usage_type": "call" }, { "api_name": "urllib.request.request", "line_number": 11, "usage_type": "attribute" }, { "api_name": "urllib.request", "line_number": 11, "usage_type": "name" }, { "api_nam...
37871071121
from rest_framework.test import APIClient from django.urls import reverse import pytest from datetime import datetime from accounts.models import User @pytest.fixture def api_client(): client = APIClient() return client @pytest.fixture def common_user(): user = User.objects.create_user( email="a...
AliBigdeli/Django-Advance-Blog
core/blog/tests/test_post_api.py
test_post_api.py
py
1,837
python
en
code
9
github-code
18
[ { "api_name": "rest_framework.test.APIClient", "line_number": 10, "usage_type": "call" }, { "api_name": "pytest.fixture", "line_number": 8, "usage_type": "attribute" }, { "api_name": "accounts.models.User.objects.create_user", "line_number": 16, "usage_type": "call" }, ...
26161547025
import pandas as pd import numpy as np from selenium import webdriver import time property_name = [] number_of_reviews = [] area = [] link = [] property_rating = [] page = 1 stop_number = 16 webpage = 'https://www.airbnb.com/s/Rwanda/homes?tab_id=home_tab&refinement_paths%5B%5D=%2Fhomes&flexible_trip_' \...
Molo-M/Rwanda-s-Fame-Analysis-
Webscraping Programs/airbnb scraper.py
airbnb scraper.py
py
3,186
python
en
code
0
github-code
18
[ { "api_name": "selenium.webdriver.Chrome", "line_number": 19, "usage_type": "call" }, { "api_name": "selenium.webdriver", "line_number": 19, "usage_type": "name" }, { "api_name": "time.sleep", "line_number": 20, "usage_type": "call" }, { "api_name": "time.sleep", ...
11194836250
from sklearn import preprocessing import pandas as pd import numpy as np race = pd.read_csv('racedata2019.csv') for i, chaku in enumerate(race.着順): if chaku==1: race.at[i, "入賞"] = 0 elif chaku==2: race.at[i, "入賞"] = 0 elif chaku==3: race.at[i, "入賞"] = 0 else: race.at[i,...
thajime0125/keiba
seikika2.py
seikika2.py
py
845
python
en
code
0
github-code
18
[ { "api_name": "pandas.read_csv", "line_number": 5, "usage_type": "call" }, { "api_name": "sklearn.preprocessing.MinMaxScaler", "line_number": 17, "usage_type": "call" }, { "api_name": "sklearn.preprocessing", "line_number": 17, "usage_type": "name" }, { "api_name"...
26517581875
from typing import NamedTuple from .huber import huber import sonnet as snt import tensorflow as tf class QuantileDistribution(NamedTuple): values: tf.Tensor logits: tf.Tensor class NonUniformQuantileRegression(snt.Module): """Compute the quantile regression loss for the distributional TD error.""" def __...
deepmind/acme
acme/tf/losses/quantile.py
quantile.py
py
2,317
python
en
code
3,100
github-code
18
[ { "api_name": "typing.NamedTuple", "line_number": 8, "usage_type": "name" }, { "api_name": "tensorflow.Tensor", "line_number": 9, "usage_type": "attribute" }, { "api_name": "tensorflow.Tensor", "line_number": 10, "usage_type": "attribute" }, { "api_name": "sonnet....
22545073272
from unittest import TestCase from zoo.group_chatbot.skills.message_frequency_restricter import MessageFrequencyRestricter from kaia.eaglesong.drivers.telegram import TelegramScenario as S from kaia.eaglesong.core import Return from datetime import datetime class MessageFrequencyRestricterTestCase(TestCase): def t...
okulovsky/kaia
zoo/group_chatbot/tests/test_message_frequency_restrictor.py
test_message_frequency_restrictor.py
py
999
python
en
code
4
github-code
18
[ { "api_name": "unittest.TestCase", "line_number": 7, "usage_type": "name" }, { "api_name": "zoo.group_chatbot.skills.message_frequency_restricter.MessageFrequencyRestricter", "line_number": 9, "usage_type": "call" }, { "api_name": "kaia.eaglesong.core.Return", "line_number": ...
32475307722
import time # import os # os.environ['NUMEXPR_MAX_THREADS'] = '16' import streamlit as st import numpy as np import pandas as pd st.set_page_config( page_title="测试", page_icon="random", layout="centered", initial_sidebar_state="collapsed", ) st.title('我的第一个应用程序') st.write("尝试创建**表格**:") df = pd...
Tora-hsu/webtest
Home.py
Home.py
py
1,840
python
zh
code
0
github-code
18
[ { "api_name": "streamlit.set_page_config", "line_number": 12, "usage_type": "call" }, { "api_name": "streamlit.title", "line_number": 20, "usage_type": "call" }, { "api_name": "streamlit.write", "line_number": 22, "usage_type": "call" }, { "api_name": "pandas.Data...
23183431708
import requests from os import system import json from tokens import API_TOKEN, API_TOKEN_SECRET import base64 import urllib.parse TOKEN = '' def create_barear_token(): global TOKEN OAUTH2_TOKEN = 'https://api.twitter.com/oauth2/token' consumer_key = urllib.parse.quote(API_TOKEN) consumer_secret = url...
gabibguedes/TwitterAPI
twitterAPI.py
twitterAPI.py
py
3,593
python
en
code
0
github-code
18
[ { "api_name": "urllib.parse.parse.quote", "line_number": 13, "usage_type": "call" }, { "api_name": "tokens.API_TOKEN", "line_number": 13, "usage_type": "argument" }, { "api_name": "urllib.parse.parse", "line_number": 13, "usage_type": "attribute" }, { "api_name": ...
42742117913
import pygame import random import itertools import report import math ''' Define constants ''' SCREEN_WIDTH = 1000 SCREEN_HEIGHT = 500 SCREEN_COLOR = (0, 0, 0) # Black LANE_WIDTH = 19 LANE_COLOR = (220, 220, 220) # Gray LANE_NAME_COLOR = (255, 255, 255) # White HORIZONTAL = 1 VERTICAL = 2 TO_LEFT = 3 TO_RIGHT= 4 TO_...
sihyunglee26/Clustering-Simulation
traffic.py
traffic.py
py
53,750
python
en
code
0
github-code
18
[ { "api_name": "random.randrange", "line_number": 90, "usage_type": "call" }, { "api_name": "itertools.combinations", "line_number": 152, "usage_type": "call" }, { "api_name": "pygame.Surface", "line_number": 191, "usage_type": "call" }, { "api_name": "pygame.Surfa...
9165032019
import logging from . import epdconfig # Display resolution EPD_WIDTH = 640 EPD_HEIGHT = 400 logger = logging.getLogger(__name__) class EPD: def __init__(self): self.reset_pin = epdconfig.RST_PIN self.dc_pin = epdconfig.DC_PIN self.busy_pin = epdconfig.BUSY_PIN self.cs_...
waveshareteam/e-Paper
RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd4in01f.py
epd4in01f.py
py
7,982
python
en
code
1,123
github-code
18
[ { "api_name": "logging.getLogger", "line_number": 8, "usage_type": "call" } ]
12713739277
import shelve import os import csv import urllib from functools import reduce from luigi import format from luigi import Parameter from luigi import Task from luigi import WrapperTask from luigi.task_register import load_task from luigi.task import logger as luigi_logger import requests from lxml import html import p...
ewheeler/make-country-codes
src/make_country_codes/tasks/data.py
data.py
py
14,417
python
en
code
0
github-code
18
[ { "api_name": "luigi.Task", "line_number": 122, "usage_type": "name" }, { "api_name": "luigi.Parameter", "line_number": 126, "usage_type": "call" }, { "api_name": "luigi.Parameter", "line_number": 127, "usage_type": "call" }, { "api_name": "utils.TargetOutput", ...
1560985832
import bpy from bpy.types import AddonPreferences, PropertyGroup from .update import * from bpy.props import ( IntProperty, FloatProperty, BoolProperty, StringProperty, PointerProperty, CollectionProperty, EnumProperty, ) def GetLocationPresets(scene, context): items = [ ...
Takanu/PakPal
properties.py
properties.py
py
14,797
python
en
code
4
github-code
18
[ { "api_name": "bpy.data", "line_number": 24, "usage_type": "attribute" }, { "api_name": "bpy.data", "line_number": 42, "usage_type": "attribute" }, { "api_name": "bpy.types.PropertyGroup", "line_number": 49, "usage_type": "name" }, { "api_name": "bpy.props.BoolPro...
22223733934
import git import sys git_root = git.Repo("", search_parent_directories=True).git.rev_parse("--show-toplevel") sys.path.append(git_root) from models.components.modules import * from tools.pytorch.losses import * from tools.pytorch.pytorch_util import * from tools.pytorch.modules.fDomainHelper import FDomai...
haoheliu/voicefixer_main
models/components/unet_v2.py
unet_v2.py
py
7,369
python
en
code
236
github-code
18
[ { "api_name": "git.Repo", "line_number": 4, "usage_type": "call" }, { "api_name": "sys.path.append", "line_number": 5, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 5, "usage_type": "attribute" }, { "api_name": "tools.pytorch.modules.fDomainHelp...
37120518086
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Jun 7 21:47:45 2017 @author: tam """ import numpy as np from keras.preprocessing.text import Tokenizer from keras.preprocessing.sequence import pad_sequences from keras.utils.np_utils import to_categorical from keras.layers import Dense, Input, Flatte...
nthanhtam/cikmcup2017
src/train_word2vec_models.py
train_word2vec_models.py
py
12,941
python
en
code
9
github-code
18
[ { "api_name": "keras.layers.Embedding", "line_number": 26, "usage_type": "call" }, { "api_name": "keras.layers.Input", "line_number": 34, "usage_type": "call" }, { "api_name": "keras.layers.Conv1D", "line_number": 36, "usage_type": "call" }, { "api_name": "keras.l...
29874473322
from collections import deque for tc in range(10): case = '#' + input() queue = deque(map(int, input().split())) t = 1 while queue[-1] > 0: a = queue.popleft() queue.append(a - t) t = t % 5 + 1 queue[-1] = 0 print('{} {}'.format(case, ' '.join(map(str, queue))))
essk13/Algorithm
02_notion/0826/hws.py
hws.py
py
314
python
en
code
0
github-code
18
[ { "api_name": "collections.deque", "line_number": 5, "usage_type": "call" } ]
27777591424
from PIL import Image, ImageDraw, ImageFont from aiogram.types import input_file def linear_gradient(draw, start_color, end_color): """Функция для создания градиента""" width, height = draw.im.size for y in range(height): r = start_color[0] + (end_color[0] - start_color[0]) * y // height g...
MuRuLOSE/bruh_host_bot
utils/hello.py
hello.py
py
3,251
python
ru
code
0
github-code
18
[ { "api_name": "PIL.Image.open", "line_number": 16, "usage_type": "call" }, { "api_name": "PIL.Image", "line_number": 16, "usage_type": "name" }, { "api_name": "PIL.Image.new", "line_number": 24, "usage_type": "call" }, { "api_name": "PIL.Image", "line_number":...
12471668872
#!pip install llama-index openai pypdf langchain faiss-cpu tiktoken colorama import os import sys import hashlib import json import argparse import subprocess import pkg_resources import glob from colorama import Fore from langchain.document_loaders import PyPDFDirectoryLoader from langchain.embeddings.openai import ...
tabgab/searchPDF
searchPDF.py
searchPDF.py
py
8,546
python
en
code
0
github-code
18
[ { "api_name": "sys.platform", "line_number": 24, "usage_type": "attribute" }, { "api_name": "pkg_resources.get_distribution", "line_number": 53, "usage_type": "call" }, { "api_name": "pkg_resources.DistributionNotFound", "line_number": 56, "usage_type": "attribute" }, ...
40900732114
""" Extracts tweets from specific user and exports them as a .csv Content object includes array of ContentItem objects, but the only required field of the object is 'content' which is the text that needs to be analysed. Therefore, this and other optional fields are detailed below as per https://cloud.ibm.com/docs/ser...
TheDestroyerOfSomeWorlds/msc
helpers/get_user_tweets.py
get_user_tweets.py
py
14,319
python
en
code
0
github-code
18
[ { "api_name": "pandas.read_csv", "line_number": 202, "usage_type": "call" }, { "api_name": "datetime.datetime.now", "line_number": 209, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 209, "usage_type": "name" }, { "api_name": "datetime.d...
36735549493
import cv2 import os import datetime import random cap = cv2.VideoCapture(0) fourcc = cv2.VideoWriter_fourcc(*'XVID') filePath = os.path.dirname(__file__) number = random.randint(1, 100) videoPath = os.path.join(filePath, f"../videos/myVideo{number}.mp4") out = cv2.VideoWriter(videoPath, fourcc, 20.0, (640, 480)) wh...
Arijit02/opencv-start
opencv-start/videos.py
videos.py
py
1,022
python
en
code
0
github-code
18
[ { "api_name": "cv2.VideoCapture", "line_number": 6, "usage_type": "call" }, { "api_name": "cv2.VideoWriter_fourcc", "line_number": 7, "usage_type": "call" }, { "api_name": "os.path.dirname", "line_number": 8, "usage_type": "call" }, { "api_name": "os.path", "l...
18285681633
from flask import Flask, render_template, request import openai app = Flask(__name__) # Replace 'YOUR_OPENAI_API_KEY' with your actual OpenAI API key openai_api_key = 'YOUR_OPENAI_API_KEY' # Function to generate code based on the selected language and problem statement def generate_code(language, problem_statement)...
rishabhthareja/OpenAI_projects
code_generator.py
code_generator.py
py
1,547
python
en
code
0
github-code
18
[ { "api_name": "flask.Flask", "line_number": 4, "usage_type": "call" }, { "api_name": "openai.api_key", "line_number": 12, "usage_type": "attribute" }, { "api_name": "openai.Completion.create", "line_number": 15, "usage_type": "call" }, { "api_name": "openai.Comple...
21226211923
from rest_framework import status from rest_framework.reverse import reverse from .base_test import TestBase class TestArticles(TestBase): def test_get_history(self): """This is the test for getting edited comments.""" res = self.edit_comment() url = self.edit_history_url(res[0], res[1]...
andela/ah-the-unsullied
authors/tests/test_track_history.py
test_track_history.py
py
2,161
python
en
code
3
github-code
18
[ { "api_name": "base_test.TestBase", "line_number": 7, "usage_type": "name" }, { "api_name": "rest_framework.status.HTTP_200_OK", "line_number": 15, "usage_type": "attribute" }, { "api_name": "rest_framework.status", "line_number": 15, "usage_type": "name" }, { "ap...
3677744063
import os import multiprocessing from common.util import get_mac_address from common.logger import Logger INIT_URL = "https://www.hihigo.shop/api/v1/updateGoodsInfo" ORDER_URL = 'https://www.hihigo.shop/api/v1/order' items = { '6921168509256001': dict(name='农夫山泉矿泉水', price=2.0, weight=575.0), '69564162000670...
qqmecl/Farsight
common/settings.py
settings.py
py
4,134
python
en
code
0
github-code
18
[ { "api_name": "common.util.get_mac_address", "line_number": 43, "usage_type": "call" }, { "api_name": "configparser.ConfigParser", "line_number": 48, "usage_type": "call" }, { "api_name": "common.logger.Logger", "line_number": 105, "usage_type": "call" } ]
11980383409
# Django from django.contrib.auth import get_user_model from django.db import models from django.utils.translation import gettext_lazy as _ # Models from core.models import BaseModel from users.models import Address from products.models import ProductPrice User = get_user_model() class Cart(BaseModel): """Supe...
emmanueloctavi0/RaffYou
carts/models/cart.py
cart.py
py
1,295
python
en
code
1
github-code
18
[ { "api_name": "django.contrib.auth.get_user_model", "line_number": 13, "usage_type": "call" }, { "api_name": "core.models.BaseModel", "line_number": 15, "usage_type": "name" }, { "api_name": "django.db.models.OneToOneField", "line_number": 17, "usage_type": "call" }, ...
17489818063
from django.shortcuts import render, redirect from .forms import AddContactForm from .models import AddContact from django.contrib import messages def home_view(request, *args, **kwargs): form = AddContactForm() added_data = AddContact.objects.all().order_by('-id')[:5] if request.method == "POST": ...
vijaysahuofficial/contactbook
mycontactbook/views.py
views.py
py
1,557
python
en
code
1
github-code
18
[ { "api_name": "forms.AddContactForm", "line_number": 8, "usage_type": "call" }, { "api_name": "models.AddContact.objects.all", "line_number": 9, "usage_type": "call" }, { "api_name": "models.AddContact.objects", "line_number": 9, "usage_type": "attribute" }, { "ap...
11324453734
import matplotlib import matplotlib.pyplot as plt import scipy.stats import numpy as np import estimationstatistics as estats def plot_cov_ellipse2d( ax: plt.Axes, mean: np.ndarray = np.zeros(2), cov: np.ndarray = np.eye(2), n_sigma: float = 1, *, edgecolor: "Color" = "C0", facecolor: "Col...
Stens/TTK4250-SensorFusion
Graded_Assignment_1/joyride_runtime.py
joyride_runtime.py
py
10,533
python
en
code
0
github-code
18
[ { "api_name": "matplotlib.pyplot.Axes", "line_number": 9, "usage_type": "attribute" }, { "api_name": "matplotlib.pyplot", "line_number": 9, "usage_type": "name" }, { "api_name": "numpy.ndarray", "line_number": 10, "usage_type": "attribute" }, { "api_name": "numpy....
71427552040
import numpy as np import pandas as pd from sklearn import * from collections import Counter train = pd.read_csv('../input/train.csv') test = pd.read_csv('../input/test.csv') sub = pd.read_csv('../input/sample_submission.csv').rename(columns={'Predicted': 'Predicted2'}) otrain = datasets.fetch_20newsgroups(subset='tra...
aorursy/new-nb-3
jazivxt_enigma-layers-template.py
jazivxt_enigma-layers-template.py
py
4,036
python
en
code
0
github-code
18
[ { "api_name": "pandas.read_csv", "line_number": 6, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 7, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 8, "usage_type": "call" }, { "api_name": "pandas.DataFrame", "...
21732421506
from pathlib import Path from typing_extensions import Literal __all__ = ( # constants "ROOT", "EMPTY", "SPACE", "NEW_LINE", "DOUBLE_NEW_LINE", "HASH", "DOT", "WRITE", # defaults "DEFAULT_QUIET", "DEFAULT_IGNORE_REQUIRED", "DEFAULT_NAME", "DEFAULT_ENCODING", ...
nekitdev/changelogging
changelogging/constants.py
constants.py
py
645
python
en
code
1
github-code
18
[ { "api_name": "pathlib.Path", "line_number": 23, "usage_type": "call" }, { "api_name": "typing_extensions.Literal", "line_number": 36, "usage_type": "name" } ]
34044043258
# -*- coding: UTF-8 -*- import logging import sys import time cwdpath = sys.path[0] def log_init(): """配置日志信息""" # 创建一个handler,用于写入日志文件 logging.basicConfig(level=logging.INFO) # 设置日志级别 file_name = cwdpath + '/log/log_{}.log'.format(time.strftime("%Y%m%d_%H%M%S", time.localtime())) file_handler =...
maxiaoteng001/wechat_articles
utils/log_utils.py
log_utils.py
py
1,005
python
en
code
0
github-code
18
[ { "api_name": "sys.path", "line_number": 6, "usage_type": "attribute" }, { "api_name": "logging.basicConfig", "line_number": 12, "usage_type": "call" }, { "api_name": "logging.INFO", "line_number": 12, "usage_type": "attribute" }, { "api_name": "time.strftime", ...
35252095188
import netCDF4 as nc import numpy as np import matplotlib.pyplot as plt import cartopy.crs as ccrs import cartopy.mpl.ticker as mticker import cartopy.feature from cartopy.util import add_cyclic_point from matplotlib import colors emiss1 = np.zeros([2040,13,192,288]) nc1 = nc.Dataset('/public/home/gaojy/CESM2_MEIC_185...
ChanJeunlam/geoscience-code
vertical-var-contour.py
vertical-var-contour.py
py
4,324
python
en
code
0
github-code
18
[ { "api_name": "numpy.zeros", "line_number": 10, "usage_type": "call" }, { "api_name": "netCDF4.Dataset", "line_number": 11, "usage_type": "call" }, { "api_name": "numpy.mean", "line_number": 18, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_number...
27589791664
import pickle from sklearn.ensemble import ExtraTreesClassifier, RandomForestClassifier import numpy as np import matplotlib.pyplot as plt import pandas as pd import seaborn as sns from sklearn.model_selection import cross_val_score from fastsklearnfeature.interactiveAutoML.new_bench.multiobjective.metalearning.analyse...
BigDaMa/DFS
new_project/fastsklearnfeature/interactiveAutoML/new_bench/multiobjective/metalearning/analyse/check_random_with_evaluations_custom_objective.py
check_random_with_evaluations_custom_objective.py
py
9,210
python
en
code
12
github-code
18
[ { "api_name": "glob.glob", "line_number": 84, "usage_type": "call" }, { "api_name": "pickle.load", "line_number": 90, "usage_type": "call" }, { "api_name": "numpy.min", "line_number": 119, "usage_type": "call" }, { "api_name": "numpy.max", "line_number": 119, ...
39701489770
import os, uuid from flask import Flask, request, render_template from azure.storage.blob import BlobServiceClient, BlobClient, ContainerClient from werkzeug.utils import secure_filename from flask import send_file app = Flask(__name__) # Retrieve the connection string for use with the application. The storage # conn...
akshita316/HCLAzureAPI
app.py
app.py
py
4,327
python
en
code
0
github-code
18
[ { "api_name": "flask.Flask", "line_number": 7, "usage_type": "call" }, { "api_name": "azure.storage.blob.BlobServiceClient.from_connection_string", "line_number": 15, "usage_type": "call" }, { "api_name": "azure.storage.blob.BlobServiceClient", "line_number": 15, "usage_t...
5512377939
import cv2 import utils class Face(object): """Data on facial features: face, eyes, nose, mouth.""" def __init__(self): self.faceRect = None self.EyeRect = None class FaceTracker(object): """A tracker for facial features: face, eyes, nose, mouth""" def __init__(sel...
prateekb1912/face-tracker-and-swapper
trackers.py
trackers.py
py
2,448
python
en
code
0
github-code
18
[ { "api_name": "cv2.CASCADE_SCALE_IMAGE", "line_number": 15, "usage_type": "attribute" }, { "api_name": "cv2.CascadeClassifier", "line_number": 22, "usage_type": "call" }, { "api_name": "cv2.CascadeClassifier", "line_number": 23, "usage_type": "call" }, { "api_name...
10275808342
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from openni import openni2 import platform import numpy as np import cv2 # Initialize OpenNI if platform.system() == "Windows": openni2.initialize("C:/Program Files/OpenNI2/Redist") # Specify path for Redist else: openni2.initialize() # can also accept the path ...
Terabee/python_openni2_samples
display_depth_frame.py
display_depth_frame.py
py
1,643
python
en
code
3
github-code
18
[ { "api_name": "platform.system", "line_number": 9, "usage_type": "call" }, { "api_name": "openni.openni2.initialize", "line_number": 10, "usage_type": "call" }, { "api_name": "openni.openni2", "line_number": 10, "usage_type": "name" }, { "api_name": "openni.openni...
25933811526
#!/usr/bin/env python3 #-*- coding:utf8 -*- # __author__ = "Auther" # Date : 2019/1/22 ''' ''' import hashlib import hmac import random import time import requests secretId = 'AKIDQlwvowGkxT6a6Urp13CLS9LOKAAINHB4' secretKey = '7BkhzCJGHVnWI7rRtdGnFA7oBOQNZir0' data = { 'Action': 'DescribeProject', 'Nonce':...
WnLeon/Python_
2019/01/22_02.py
22_02.py
py
1,157
python
en
code
0
github-code
18
[ { "api_name": "random.randint", "line_number": 20, "usage_type": "call" }, { "api_name": "time.time", "line_number": 23, "usage_type": "call" }, { "api_name": "hmac.new", "line_number": 39, "usage_type": "call" }, { "api_name": "hashlib.sha1", "line_number": 3...
13594004038
from selenium import webdriver from selenium.webdriver.common.keys import Keys import random import time # 启动浏览器 driver = webdriver.Chrome(r"chromedriver.exe") #driver = webdriver.Chrome() driver.get("http://ai.baidu.com/tech/speech/tts") # 获取当前时间 current_time = time.strftime('%H:%M',time.localtime(time.time())) # 输...
pengfen/learn19
test-learn/outo_test/ai.py
ai.py
py
618
python
en
code
0
github-code
18
[ { "api_name": "selenium.webdriver.Chrome", "line_number": 7, "usage_type": "call" }, { "api_name": "selenium.webdriver", "line_number": 7, "usage_type": "name" }, { "api_name": "time.strftime", "line_number": 12, "usage_type": "call" }, { "api_name": "time.localti...
3394317590
import time from selenium import webdriver from selenium.webdriver.common.by import By baseUrl = 'https://www.rokomari.com/book' driverpath = 'J:\Selenium\drivers\chromedriver.exe' class SearchClassTest(): @classmethod def setUpClass(cls): cls.driver = webdriver.Chrome(executable_path = driverpath) ...
ISRAFIL-HOSSAIN/TestAutomation-Python
Rokomari.com/Website_TC_005/Search.py
Search.py
py
1,209
python
en
code
3
github-code
18
[ { "api_name": "selenium.webdriver.Chrome", "line_number": 11, "usage_type": "call" }, { "api_name": "selenium.webdriver", "line_number": 11, "usage_type": "name" }, { "api_name": "time.sleep", "line_number": 17, "usage_type": "call" }, { "api_name": "selenium.webd...
19716503298
import tkinter import joblib import os import sklearn ventana = tkinter.Tk() ventana.title("Predictor del Clima") ventana.geometry("400x400") etiqueta = tkinter.Label(ventana) etiqueta.pack(pady=40) cajaTexto = tkinter.Entry(ventana) cajaTexto.insert(1, "Ingresa tu valor de temperatura.") cajaTexto.pack(fill='x', pa...
gaiborjosue/Temp-Hum-Predictor
Predicciones_Finales/interface_prediction.py
interface_prediction.py
py
1,475
python
es
code
0
github-code
18
[ { "api_name": "tkinter.Tk", "line_number": 6, "usage_type": "call" }, { "api_name": "tkinter.Label", "line_number": 10, "usage_type": "call" }, { "api_name": "tkinter.Entry", "line_number": 13, "usage_type": "call" }, { "api_name": "joblib.load", "line_number"...
70114547881
# # https://leetcode.com/problems/design-hashmap/ # # Design a HashMap without using any built-in hash table libraries. # # Implement the MyHashMap class: # MyHashMap() # initializes the object with an empty map. # void put(int key, int value) # inserts a (key, value) pair into the HashMap. If the key...
CountChu/LeetCodePython
learn_17_hash_table/solutions/0706-hash-map-s1.py
0706-hash-map-s1.py
py
2,541
python
en
code
0
github-code
18
[ { "api_name": "pdb.set_trace", "line_number": 30, "usage_type": "attribute" }, { "api_name": "sys.modules", "line_number": 43, "usage_type": "attribute" } ]
38183848257
import asyncio try: import uvloop asyncio.set_event_loop_policy(uvloop.EventLoopPolicy()) except ImportError: pass import aiohttp import concurrent.futures from concurrent.futures import CancelledError, TimeoutError import threading import numpy as np from tempfile import NamedTemporaryFile from itertools...
DigitalGlobe/pyveda
pyveda/io/remote/client.py
client.py
py
17,231
python
en
code
4
github-code
18
[ { "api_name": "asyncio.set_event_loop_policy", "line_number": 4, "usage_type": "call" }, { "api_name": "uvloop.EventLoopPolicy", "line_number": 4, "usage_type": "call" }, { "api_name": "logging.getLogger", "line_number": 38, "usage_type": "call" }, { "api_name": "...
44073073328
# Description: # Author:朱勇 # Time:2021/3/7 16:01 import pandas as pd import numpy as np from matplotlib import pyplot as plt from scipy.stats import norm import math from matplotlib import cm from mpl_toolkits.mplot3d import Axes3D from sklearn.covariance import EllipticEnvelope data = pd.read_csv('task1_data.csv') f...
zhuyongWillem/pca_ad
anomalyPay.py
anomalyPay.py
py
2,930
python
en
code
0
github-code
18
[ { "api_name": "pandas.read_csv", "line_number": 14, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.figure", "line_number": 15, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 15, "usage_type": "name" }, { "api_name": "matplotlib...
6200773152
import argparse import Models, LoadBatches from keras.models import load_model from keras.callbacks import ModelCheckpoint import matplotlib.pyplot as plt import tensorflow as tf import os from keras import backend as K from keras.losses import categorical_crossentropy from lovasz_loss_keras import lovasz_soft...
sdu2020xzh/sdu2020xzh-Automatic-Mineral-Segmentation
train.py
train.py
py
6,974
python
en
code
2
github-code
18
[ { "api_name": "os.environ", "line_number": 12, "usage_type": "attribute" }, { "api_name": "os.environ", "line_number": 13, "usage_type": "attribute" }, { "api_name": "tensorflow.ConfigProto", "line_number": 14, "usage_type": "call" }, { "api_name": "tensorflow.Ses...
33579205790
from keras.callbacks import EarlyStopping from keras.layers import Dense, Activation, Dropout, Input, BatchNormalization from keras.models import Model, load_model from keras.regularizers import l2 import keras.backend as K import numpy as np import services.ModelPerformanceVisualization as model_visualizer ''' A impr...
qthen/candle
models/regression/ImprovedNN.py
ImprovedNN.py
py
4,517
python
en
code
2
github-code
18
[ { "api_name": "keras.layers.Input", "line_number": 36, "usage_type": "call" }, { "api_name": "keras.layers.Dense", "line_number": 38, "usage_type": "call" }, { "api_name": "keras.regularizers.l2", "line_number": 38, "usage_type": "call" }, { "api_name": "keras.lay...
12749629354
import parse import utils class StopException(Exception): pass def get_points(): data = utils.get_input( cast=lambda x: parse.parse('{:d},{:d}', x), delimiter=' -> ', line_delimiter='\n', ) points = set() for line in data: for i in range(1, len(line)): ...
alexander-yu/adventofcode
problems_2022/14.py
14.py
py
2,023
python
en
code
1
github-code
18
[ { "api_name": "utils.get_input", "line_number": 11, "usage_type": "call" }, { "api_name": "parse.parse", "line_number": 12, "usage_type": "call" }, { "api_name": "utils.part", "line_number": 65, "usage_type": "attribute" }, { "api_name": "utils.part", "line_nu...
14949877101
import os.path from typing import Optional from types import ModuleType import globalVars import config from keyword import iskeyword def initializeModulePackagePaths(): """Initializes the module package paths for drivers and plugins. This ensures that drivers (such as braille display drivers) or plugins (such as a...
nvaccess/nvda
source/addonHandler/packaging.py
packaging.py
py
2,639
python
en
code
1,802
github-code
18
[ { "api_name": "types.ModuleType", "line_number": 30, "usage_type": "name" }, { "api_name": "typing.Optional", "line_number": 30, "usage_type": "name" }, { "api_name": "config.isAppX", "line_number": 36, "usage_type": "attribute" }, { "api_name": "globalVars.appArg...
35786533708
import numpy as np; import pandas as pd # import scipy as sp; import scipy.stats as st import torch; import torch.nn as nn; print(f"using torch version {torch.__version__}") #use numba's just-in-time compiler to speed things up # from numba import njit from sklearn.preprocessing import StandardScaler; from sklearn.mod...
AliAlkadhim/torchQN
JupyterBook/Cluster/EVALUATE/EvaluateMass.py
EvaluateMass.py
py
19,964
python
en
code
0
github-code
18
[ { "api_name": "torch.__version__", "line_number": 4, "usage_type": "attribute" }, { "api_name": "matplotlib.__version__", "line_number": 8, "usage_type": "attribute" }, { "api_name": "matplotlib.rcParams.update", "line_number": 14, "usage_type": "call" }, { "api_n...
15612292216
import os from requests.exceptions import HTTPError from google.cloud import storage class GoogleStorage: file_name = 'poke_spawn_test.xml' def __init__(self, file_name=None): if file_name: self.file_name = file_name self.client = storage.Client.from_service_account_json(os.path.j...
ppQueens/Pokemon_spawn_map
spawns_map/utils/google_storage.py
google_storage.py
py
1,599
python
en
code
0
github-code
18
[ { "api_name": "google.cloud.storage.Client.from_service_account_json", "line_number": 12, "usage_type": "call" }, { "api_name": "google.cloud.storage.Client", "line_number": 12, "usage_type": "attribute" }, { "api_name": "google.cloud.storage", "line_number": 12, "usage_t...
74610654120
import pygame from pygame.locals import * import sys def epaisseur(n): if n<40: return 3 elif 40<=n<100: return 1 elif 100<=n<500: return 1 elif n>=500: return -1 pygame.init() DISPLAYSURF = pygame.display.set_mode((1920,1080), FULLSCREEN) #set the display mode, wi...
GetMoon2EZ/BobDylan
isometric/map.py
map.py
py
1,895
python
en
code
0
github-code
18
[ { "api_name": "pygame.init", "line_number": 15, "usage_type": "call" }, { "api_name": "pygame.display.set_mode", "line_number": 17, "usage_type": "call" }, { "api_name": "pygame.display", "line_number": 17, "usage_type": "attribute" }, { "api_name": "pygame.displa...
74694962279
# import kivy module import kivy # this restrict the kivy version i.e # below this kivy version you cannot # use the app or software kivy.require('1.8.0') # changeable # base Class of your App inherits from the App class. # app:always refers to the instance of your application from kivy.app import App # ...
aunluhisarcikli/image-encryption
main.py
main.py
py
8,120
python
en
code
1
github-code
18
[ { "api_name": "kivy.require", "line_number": 7, "usage_type": "call" }, { "api_name": "kivy.uix.boxlayout.BoxLayout", "line_number": 25, "usage_type": "name" }, { "api_name": "os.path.split", "line_number": 33, "usage_type": "call" }, { "api_name": "os.path", ...
43637236934
from collections import defaultdict import pandas as pd def read_user_facility_data(data_path, reporting_periods): entity_facility_df = pd.DataFrame() for reporting_period in reporting_periods: df = pd.read_excel( data_path + reporting_period + 'compliancereport.xlsx', sheet_n...
carbonplan/compliance-users
scripts/users_and_facilities.py
users_and_facilities.py
py
2,882
python
en
code
0
github-code
18
[ { "api_name": "pandas.DataFrame", "line_number": 7, "usage_type": "call" }, { "api_name": "pandas.read_excel", "line_number": 9, "usage_type": "call" }, { "api_name": "collections.defaultdict", "line_number": 48, "usage_type": "call" }, { "api_name": "collections....
4534498378
from django.shortcuts import render, reverse from django.http import HttpResponse, HttpResponseRedirect import urllib.request import json from collections import OrderedDict from django.template.context_processors import csrf from web_app.forms import RegisterForm, LoginForm, CreateJerseyForm # Create your views here. ...
Michael1009/cs4260_ISA
web/web_app/views.py
views.py
py
10,086
python
en
code
4
github-code
18
[ { "api_name": "urllib.request.request.urlopen", "line_number": 13, "usage_type": "call" }, { "api_name": "urllib.request.request", "line_number": 13, "usage_type": "attribute" }, { "api_name": "urllib.request", "line_number": 13, "usage_type": "name" }, { "api_nam...
29812748484
from selenium.webdriver.common.by import By from test_web_weixin.page.add_member import AddMember from test_web_weixin.page.contact_page import ContactPage from test_web_weixin.page.base_page import BasePage class MainPage(BasePage): _location_goto_member = (By.CSS_SELECTOR, '.ww_indexImg_AddMember') def got...
PAssassiN/hogwarts_ck16
test_web_weixin/page/main_page.py
main_page.py
py
793
python
en
code
0
github-code
18
[ { "api_name": "test_web_weixin.page.base_page.BasePage", "line_number": 7, "usage_type": "name" }, { "api_name": "selenium.webdriver.common.by.By.CSS_SELECTOR", "line_number": 8, "usage_type": "attribute" }, { "api_name": "selenium.webdriver.common.by.By", "line_number": 8, ...
6753003168
from django.contrib.auth import get_user_model from django.db.models import Sum, Count from rest_framework import generics, status from rest_framework.decorators import api_view from rest_framework.permissions import AllowAny from rest_framework.response import Response from books.models import ReadingSession from use...
VTeteruk/reading_time_api
users/views.py
views.py
py
2,377
python
en
code
0
github-code
18
[ { "api_name": "rest_framework.generics.CreateAPIView", "line_number": 13, "usage_type": "attribute" }, { "api_name": "rest_framework.generics", "line_number": 13, "usage_type": "name" }, { "api_name": "users.serializers.UserSerializer", "line_number": 14, "usage_type": "n...
72782950120
from selenium import webdriver from selenium.webdriver.common.keys import Keys import datetime import mysql.connector as mdb driver = webdriver.Chrome("C://tools//chromedriver.exe") ''' #driver = webdriver.PhantomJS("C://Users//marco.zhang//.m2//repository//com//codeborne//phantomjsdriver//1.4.0//phantomjsdriver-1.4.0...
pz0309/lhjy
lesson3/scraper_symbol_sp500.py
scraper_symbol_sp500.py
py
3,750
python
en
code
0
github-code
18
[ { "api_name": "selenium.webdriver.Chrome", "line_number": 6, "usage_type": "call" }, { "api_name": "selenium.webdriver", "line_number": 6, "usage_type": "name" }, { "api_name": "datetime.datetime.utcnow", "line_number": 32, "usage_type": "call" }, { "api_name": "d...
26953111709
import typing as ty from pathlib import PurePath from pydra.mark import annotate, task @task @annotate({"return": {"suvr_pet_path": PurePath}}) def normalize_to_reference_task(pet_image: PurePath, region_mask: PurePath) -> PurePath: """Pydra task for normalizing the provided `pet_image`. .. note:: P...
aramis-lab/clinica
clinica/pydra/pet_volume/tasks.py
tasks.py
py
4,532
python
en
code
196
github-code
18
[ { "api_name": "pathlib.PurePath", "line_number": 9, "usage_type": "name" }, { "api_name": "clinica.pipelines.pet_volume.pet_volume_utils.normalize_to_reference", "line_number": 18, "usage_type": "call" }, { "api_name": "pydra.mark.task", "line_number": 7, "usage_type": "n...
37265331713
import numpy import geopandas import pandas.util.testing def assert_geoframe_almost_equal(left, right): """ Check if left and right are almost equal This is needed because projections may produce tiny errors in the geometries that are not captured by the pandas tools. Parameters ---------- ...
lowerthansound/kag-cpe
cpe_help/util/testing.py
testing.py
py
973
python
en
code
0
github-code
18
[ { "api_name": "geopandas.GeoDataFrame", "line_number": 18, "usage_type": "attribute" }, { "api_name": "geopandas.GeoDataFrame", "line_number": 19, "usage_type": "attribute" }, { "api_name": "numpy.minimum", "line_number": 27, "usage_type": "call" }, { "api_name": ...
44353815098
#!/usr/bin/env python # -*- coding: utf-8; -*- # # (c) 2020 siveo, http://www.siveo.net # # This file is part of Pulse 2, http://www.siveo.net # # Pulse 2 is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either...
medulla-tech/medulla
services/mmc/plugins/xmppmaster/master/pluginsmaster/plugin_reversessh_AM_ARS.py
plugin_reversessh_AM_ARS.py
py
6,307
python
en
code
17
github-code
18
[ { "api_name": "logging.getLogger", "line_number": 32, "usage_type": "call" }, { "api_name": "json.dumps", "line_number": 38, "usage_type": "call" }, { "api_name": "json.loads", "line_number": 50, "usage_type": "call" }, { "api_name": "pulse2.database.xmppmaster.Xm...
1513197982
# Import required libraries import argparse import base64 from datetime import datetime import hashlib import os import socket import subprocess import sys import threading # Create a class for the server (listener) class Server: # Define constructor with port as argument def __init__(self,port): # Set host to ...
aarole/aionet
aionet.py
aionet.py
py
12,810
python
en
code
2
github-code
18
[ { "api_name": "os.getcwd", "line_number": 22, "usage_type": "call" }, { "api_name": "socket.socket", "line_number": 25, "usage_type": "call" }, { "api_name": "socket.AF_INET", "line_number": 25, "usage_type": "attribute" }, { "api_name": "socket.SOCK_STREAM", ...
1839438492
# -*- coding: utf-8 -*- __author__ = 'ivanov' from selenium import webdriver from fixture.session import SessionHelper from fixture.group import GroupHelper from fixture.contact import ContactHelper class Application: def __init__(self, browser, base_url): # конструктор, инициализирует ссылку на драйвер, а зате...
seyros/python_training
fixture/application.py
application.py
py
1,261
python
ru
code
0
github-code
18
[ { "api_name": "selenium.webdriver.Firefox", "line_number": 13, "usage_type": "call" }, { "api_name": "selenium.webdriver", "line_number": 13, "usage_type": "name" }, { "api_name": "selenium.webdriver.Chrome", "line_number": 15, "usage_type": "call" }, { "api_name"...
634923735
import numpy as np import keras from keras.layers import Dense, Conv2D, MaxPooling2D, Flatten from sklearn.utils import shuffle class Model: def __init__(self, name, num_classes, input_shape, activation, loss, optimizer, learning_rate): if optimizer == 'sgd': optimizer = keras.optimizers.SGD(l...
javad-torkzadeh/fed-dnn
model.py
model.py
py
2,207
python
en
code
0
github-code
18
[ { "api_name": "keras.optimizers.SGD", "line_number": 10, "usage_type": "call" }, { "api_name": "keras.optimizers", "line_number": 10, "usage_type": "attribute" }, { "api_name": "keras.optimizers.Adam", "line_number": 12, "usage_type": "call" }, { "api_name": "kera...
32658884078
from django.shortcuts import render from .models import Contact from django.http import HttpResponse from django.core.mail import send_mail # Create your views here. def index(request): if request.method == "POST": contact = Contact() name = request.POST.get('name') email = req...
dhan005/consultant_portfolio
Consultant/myconsultant/views.py
views.py
py
957
python
en
code
0
github-code
18
[ { "api_name": "models.Contact", "line_number": 10, "usage_type": "call" }, { "api_name": "django.core.mail.send_mail", "line_number": 22, "usage_type": "call" }, { "api_name": "django.shortcuts.render", "line_number": 33, "usage_type": "call" } ]