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
33722453713
import secrets from datetime import datetime from typing import List from app import models, schemas from app.database import SessionLocal, engine from app.dependencies import get_token_header from fastapi import APIRouter, Depends, HTTPException from sqlalchemy.orm import Session models.Base.metadata.create_all(bind...
madatbay/jopen
api/app/routers/boards.py
boards.py
py
1,902
python
en
code
0
github-code
21
[ { "api_name": "app.models.Base.metadata.create_all", "line_number": 11, "usage_type": "call" }, { "api_name": "app.models.Base", "line_number": 11, "usage_type": "attribute" }, { "api_name": "app.models", "line_number": 11, "usage_type": "name" }, { "api_name": "a...
74946002292
import pygame as pg from Space import DIMENSIONS, FPS from pygame.locals import * from pygame.sprite import Sprite class Background(Sprite): backgroundList = ["fondo1.png", "fondo2.png", "fondo3.png"] def __init__(self, x, y): pg.sprite.Sprite.__init__(self) self.background = pg.image.load("...
Bitos88/ProyectoInvaders
Space/background.py
background.py
py
959
python
en
code
0
github-code
21
[ { "api_name": "pygame.sprite.Sprite", "line_number": 7, "usage_type": "name" }, { "api_name": "pygame.sprite.Sprite.__init__", "line_number": 11, "usage_type": "call" }, { "api_name": "pygame.sprite", "line_number": 11, "usage_type": "attribute" }, { "api_name": "...
72262090933
""" Author: David Walshe Date: 12 February 2021 """ import logging from collections import namedtuple import click from click.core import Context from src.cli.config import GROUP_CONTEXT_SETTINGS from src.cli.utils import kwargs_to_namedtuple from src.cli.validators import convert_bool_to_lower # Commands...
DavidWalshe93/isic_cli
src/cli/commands/image/image.py
image.py
py
2,707
python
en
code
0
github-code
21
[ { "api_name": "logging.getLogger", "line_number": 23, "usage_type": "call" }, { "api_name": "collections.namedtuple", "line_number": 25, "usage_type": "call" }, { "api_name": "click.core.Context", "line_number": 39, "usage_type": "name" }, { "api_name": "src.api.i...
18205602890
import os from dotenv import load_dotenv import requests import json load_dotenv() def handleError(error): print(error) pass def checkRepoURL(): if "GITHUB_REPO" in os.environ and os.environ["GITHUB_REPO"] != "": return True return False def getRepoURL(): if checkRepoURL(): re...
SocioDroid/leetcode-py-cli
src/config.py
config.py
py
3,419
python
en
code
18
github-code
21
[ { "api_name": "dotenv.load_dotenv", "line_number": 6, "usage_type": "call" }, { "api_name": "os.environ", "line_number": 15, "usage_type": "attribute" }, { "api_name": "os.environ", "line_number": 22, "usage_type": "attribute" }, { "api_name": "os.environ", "l...
1041170364
# -*- coding: utf-8 -*- #Author: Andrea Urgolo import numpy as np import os.path import pandas as pd import random import gc from scipy.sparse import csr_matrix from sklearn import preprocessing class DataManager: """ Dataset manager: contains all function to manipulate and query the dataset """ ...
AndreaUrgolo/machinelearningwebservices
duration_prediction/ws/duration_prediction/model_api/libs/io/data_manager.py
data_manager.py
py
8,471
python
en
code
0
github-code
21
[ { "api_name": "os.path.path.isfile", "line_number": 28, "usage_type": "call" }, { "api_name": "os.path.path", "line_number": 28, "usage_type": "attribute" }, { "api_name": "os.path", "line_number": 28, "usage_type": "name" }, { "api_name": "pandas.read_hdf", "...
4237237282
from django.conf.urls import patterns, url from .views import MailParticipantsView, MailParticipantsCountView urlpatterns = patterns('', url(r'^participants/mail/$', MailParticipantsView.as_view(), name='mail_participants'), url(r'^participants/count/$', MailParticipantsCountView.as_view(), na...
596acres/livinglots-philly
livinglotsphilly/extraadmin/urls.py
urls.py
py
353
python
en
code
3
github-code
21
[ { "api_name": "django.conf.urls.patterns", "line_number": 5, "usage_type": "call" }, { "api_name": "django.conf.urls.url", "line_number": 6, "usage_type": "call" }, { "api_name": "views.MailParticipantsView.as_view", "line_number": 6, "usage_type": "call" }, { "ap...
25064129194
import os from flask import Flask from flask import jsonify import logging import auth import ssl_cert app = Flask(__name__, instance_relative_config=True) app.config.from_mapping( SECRET_KEY='dev', ) # ensure the instance folder exists try: os.makedirs(app.instance_path) except OSError: pass # Save lo...
appseclabepfl/project
webserver/login_server/app.py
app.py
py
720
python
en
code
0
github-code
21
[ { "api_name": "flask.Flask", "line_number": 10, "usage_type": "call" }, { "api_name": "os.makedirs", "line_number": 17, "usage_type": "call" }, { "api_name": "logging.getLogger", "line_number": 22, "usage_type": "call" }, { "api_name": "logging.FileHandler", "...
24649387681
# -*- coding: utf-8 -*- #======================================================================= # General Documentation """ Testing suite for Car objects move function. Tests the cars ability to move and animates the movement """ #-------------------------------------------------...
awsirkis/I_405_ETL
car_move_test.py
car_move_test.py
py
11,378
python
en
code
0
github-code
21
[ { "api_name": "numpy.size", "line_number": 145, "usage_type": "call" }, { "api_name": "numpy.size", "line_number": 164, "usage_type": "call" }, { "api_name": "numpy.size", "line_number": 181, "usage_type": "call" }, { "api_name": "numpy.size", "line_number": 1...
28404186521
from dataset import SplitImages import os import glob import torch import torchvision from tqdm.auto import tqdm import argparse from torch.utils.data import Dataset, DataLoader class Tedd1104Dataset(Dataset): """TEDD1104 dataset.""" def __init__( self, dataset_dir: str, ): self....
ikergarcia1996/Self-Driving-Car-in-Video-Games
calculate_mean_std.py
calculate_mean_std.py
py
3,198
python
en
code
721
github-code
21
[ { "api_name": "torch.utils.data.Dataset", "line_number": 11, "usage_type": "name" }, { "api_name": "torchvision.transforms.Compose", "line_number": 21, "usage_type": "call" }, { "api_name": "torchvision.transforms", "line_number": 21, "usage_type": "attribute" }, { ...
41198676478
import psycopg2 class data_base: def __init__(self): self.connection = psycopg2.connect( host = 'localhost', database = 'bd_superheroes', user = 'postgres', password = 'Contrato455' ) self.cursor = self.connection.cursor() print('co...
AlexisPiracoca/software_construction
bases_de_datos/bd_superheroes/conection.py
conection.py
py
739
python
es
code
0
github-code
21
[ { "api_name": "psycopg2.connect", "line_number": 5, "usage_type": "call" } ]
37443191776
""" Experiments for CartPole """ import gym import sys import numpy as np from tqdm import tqdm from matplotlib import pyplot as plt from Cartpole.agents import QLearningAgent, PolicyGradientAgent from AgentUtils.plots import plot_running_avg sys.path.insert(0, "../Cartpole") def main(): env = gym.make("CartPole-...
zhiyong9654/rl-learning
Simulation/CartPole.py
CartPole.py
py
957
python
en
code
0
github-code
21
[ { "api_name": "sys.path.insert", "line_number": 12, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 12, "usage_type": "attribute" }, { "api_name": "gym.make", "line_number": 15, "usage_type": "call" }, { "api_name": "Cartpole.agents.PolicyGradient...
16776583606
import time from mininet.node import RemoteController, OVSSwitch import networkx as nx from matplotlib import pyplot as plt from mininet.net import Mininet from mininet.topo import Topo class MininetTopoFromNxGraph(Topo): """Construct a mininet topology from a nx graph.""" def build(self, G: nx....
andi-ra/Testi_Mininet
topology-mininet-develop/mininet_files/mininet_driver_topology.py
mininet_driver_topology.py
py
1,878
python
en
code
0
github-code
21
[ { "api_name": "mininet.topo.Topo", "line_number": 10, "usage_type": "name" }, { "api_name": "networkx.Graph", "line_number": 13, "usage_type": "attribute" }, { "api_name": "networkx.erdos_renyi_graph", "line_number": 35, "usage_type": "call" }, { "api_name": "netw...
20898669665
from __future__ import print_function import os import tempfile import copy import numpy as np from pdbparser import pdbparser from pdbparser.log import Logger from pdbparser.Utilities.Database import __ATOM__ from pdbparser.Utilities.Collection import get_path from pdbparser.Utilities.Simulate import Simulation at1...
bachiraoun/pdbparser
Examples/simulationDihedral.py
simulationDihedral.py
py
3,402
python
en
code
3
github-code
21
[ { "api_name": "copy.deepcopy", "line_number": 14, "usage_type": "call" }, { "api_name": "pdbparser.Utilities.Database.__ATOM__", "line_number": 14, "usage_type": "argument" }, { "api_name": "copy.deepcopy", "line_number": 15, "usage_type": "call" }, { "api_name": ...
23511829723
import librosa import noisereduce as nr import os import numpy as np """ Script that preprocesses wav files to npy files usable for the ML models This script does not use the STFT and is meant to be used for the ALTclassificationCONV.py models. """ def save_audionpy(file, name, activity, subject): # read audio ...
99EnriqueD/Bachelor-Thesis-Audio-Recognition
ALTpreprocessing.py
ALTpreprocessing.py
py
1,318
python
en
code
0
github-code
21
[ { "api_name": "librosa.load", "line_number": 15, "usage_type": "call" }, { "api_name": "noisereduce.reduce_noise", "line_number": 19, "usage_type": "call" }, { "api_name": "librosa.effects.trim", "line_number": 23, "usage_type": "call" }, { "api_name": "librosa.ef...
23478567793
import collections import sys input = sys.stdin.readline testCase = int(input()) for _ in range(testCase) : P = input().rstrip() # order # order 간소화, R이 짝수개가 들어오는 것은 의미없음 P = P.replace('RR','') length = int(input()) arr = input().rstrip() # array if arr == '[]' : queue = [] ...
FWWKCS/Coding-Test
백준/Gold/5430. AC/AC.py
AC.py
py
1,398
python
en
code
0
github-code
21
[ { "api_name": "sys.stdin", "line_number": 3, "usage_type": "attribute" }, { "api_name": "collections.deque", "line_number": 16, "usage_type": "call" } ]
27738128985
from time import sleep from log import get_log_channel from workers.redis_pub_sub import publish from .helpers.api import OpenCaseAPI from .last_item_info import LastItemInfo from config import settings_app _log = get_log_channel('Observer') class Observer: WAITING_TIME = settings_app.OBSERVER_WAITING_TIME ...
dimadeck/steam-open-case-calculator
src/core/observer.py
observer.py
py
1,615
python
en
code
1
github-code
21
[ { "api_name": "log.get_log_channel", "line_number": 9, "usage_type": "call" }, { "api_name": "config.settings_app.OBSERVER_WAITING_TIME", "line_number": 13, "usage_type": "attribute" }, { "api_name": "config.settings_app", "line_number": 13, "usage_type": "name" }, { ...
7329152870
import numpy as np from collections import defaultdict import copy try: from tqdm import tqdm except ImportError: tqdm = None class CollapsedGibbs(object): def fit(self, corpus, num_topics, vocab_size, burn_in = 10, lag = 20, num_samp...
aleveren/ucsd-research
simple-hier-topic-model/lda_collapsed_gibbs.py
lda_collapsed_gibbs.py
py
5,183
python
en
code
0
github-code
21
[ { "api_name": "tqdm.tqdm", "line_number": 8, "usage_type": "name" }, { "api_name": "numpy.broadcast_to", "line_number": 21, "usage_type": "call" }, { "api_name": "numpy.broadcast_to", "line_number": 22, "usage_type": "call" }, { "api_name": "numpy.zeros", "lin...
14170022022
import os import ctypes import copy from typing import List import keys class ICueException(RuntimeError): pass class led_color_t(ctypes.Structure): led_id: ctypes.c_int r: ctypes.c_int g: ctypes.c_int b: ctypes.c_int _fields_ = [ ('led_id', ctypes.c_int), ('r', ctypes.c_int...
eliphatfs/kbdmania
icue.py
icue.py
py
4,158
python
en
code
7
github-code
21
[ { "api_name": "ctypes.Structure", "line_number": 13, "usage_type": "attribute" }, { "api_name": "ctypes.c_int", "line_number": 14, "usage_type": "attribute" }, { "api_name": "ctypes.c_int", "line_number": 15, "usage_type": "attribute" }, { "api_name": "ctypes.c_in...
34196469287
import time from collections import namedtuple from threading import Thread from cflib.crazyflie import Crazyflie from cflib.crazyflie.log import LogConfig from cflib.crazyflie.syncCrazyflie import SyncCrazyflie from cflib.crazyflie.syncLogger import SyncLogger SwarmPosition = namedtuple('SwarmPosition', 'x y z') c...
bitcraze/crazyflie-lib-python
cflib/crazyflie/swarm.py
swarm.py
py
8,895
python
en
code
227
github-code
21
[ { "api_name": "collections.namedtuple", "line_number": 10, "usage_type": "call" }, { "api_name": "cflib.crazyflie.syncCrazyflie.SyncCrazyflie", "line_number": 19, "usage_type": "call" }, { "api_name": "cflib.crazyflie.Crazyflie", "line_number": 33, "usage_type": "call" ...
13186095165
from abc import abstractclassmethod from base64 import encode from io import BytesIO from random import randint import time from typing import List, Tuple from src.block.block import Block from src.helper.helper import encode_varint, int_to_little_endian, little_endian_to_int, read_varint TX_DATA_TYPE = 1 BLOCK_DATA_...
euidong/bitcoin
src/network/messages.py
messages.py
py
7,605
python
en
code
0
github-code
21
[ { "api_name": "abc.abstractclassmethod", "line_number": 20, "usage_type": "name" }, { "api_name": "time.time", "line_number": 37, "usage_type": "call" }, { "api_name": "src.helper.helper.int_to_little_endian", "line_number": 50, "usage_type": "call" }, { "api_name...
73786562611
from sklearn.cluster import KMeans import numpy as np import math def kmeans(data, k, index=None): """ :param data: (n_samples, n_features) :param k: cluster number :return: 聚类结果及集群失真 """ model = KMeans(n_clusters=k, random_state=0) model.fit(data) labels = model.labels_ centers = ...
RingBDStack/SR-MARL
src/clusters/xmeans.py
xmeans.py
py
3,957
python
en
code
6
github-code
21
[ { "api_name": "sklearn.cluster.KMeans", "line_number": 12, "usage_type": "call" }, { "api_name": "math.log", "line_number": 43, "usage_type": "call" }, { "api_name": "math.pi", "line_number": 43, "usage_type": "attribute" }, { "api_name": "math.log", "line_num...
3508734175
import logging as _logging import signal as _signal import threading as _threading _OK_HANDLERS = set(( _signal.SIG_DFL, _signal.SIG_IGN, _signal.default_int_handler, )) # Only manipulated on the main thread, so it doesn't need a lock. _PREV_HANDLERS = {} _SET_SIGNALS_LOCK = _threading.Lock() _SET_SIGNAL...
sunny-bay/chromium30
commit-queue/sig_handler.py
sig_handler.py
py
1,086
python
en
code
1
github-code
21
[ { "api_name": "signal.SIG_DFL", "line_number": 6, "usage_type": "attribute" }, { "api_name": "signal.SIG_IGN", "line_number": 7, "usage_type": "attribute" }, { "api_name": "signal.default_int_handler", "line_number": 8, "usage_type": "attribute" }, { "api_name": "...
27030965649
from http.server import HTTPServer, BaseHTTPRequestHandler # запускаем сервер на нашей машине (либо 127.0.0.1) APP_HOST = 'localhost' # порт на котором будет работать сервер APP_PORT = 8000 class SimpleGetHandler(BaseHTTPRequestHandler): # какие заголовки должны быть в запросе def _set_headers(self): ...
StasBobov/Django_Skillbox
Lesson1/simple_http_server.py
simple_http_server.py
py
1,620
python
ru
code
0
github-code
21
[ { "api_name": "http.server.BaseHTTPRequestHandler", "line_number": 9, "usage_type": "name" }, { "api_name": "http.server.HTTPServer", "line_number": 37, "usage_type": "name" }, { "api_name": "http.server.BaseHTTPRequestHandler", "line_number": 37, "usage_type": "name" }...
74155544
from wtforms.fields import SubmitField, StringField, SelectField from wtforms.validators import DataRequired,Email,Regexp from wtforms_tornado import Form from data.user_module import Role role_list = Role.role_list() print(role_list) class AdminForm(Form): """添加管理员表单""" name = StringField( label="管理员...
yishuifengxing/yishuifengxing_weblog_master
files/account/admin_form.py
admin_form.py
py
2,413
python
en
code
1
github-code
21
[ { "api_name": "data.user_module.Role.role_list", "line_number": 6, "usage_type": "call" }, { "api_name": "data.user_module.Role", "line_number": 6, "usage_type": "name" }, { "api_name": "wtforms_tornado.Form", "line_number": 9, "usage_type": "name" }, { "api_name"...
27717865221
from thinc.types import Floats2d, Floats1d from typing import List from thinc.api import Model, chain, with_array from spacy.tokens import Doc from numpy import float32 def build_finder_model( tok2vec: Model[List[Doc], List[Floats2d]], scorer: Model[Floats2d, Floats2d] ) -> Model[List[Doc], Floats2d]: logist...
Lance-Owen/nlp_project
test_code/span_finder_model.py
span_finder_model.py
py
1,321
python
en
code
0
github-code
21
[ { "api_name": "thinc.api.Model", "line_number": 9, "usage_type": "name" }, { "api_name": "typing.List", "line_number": 9, "usage_type": "name" }, { "api_name": "spacy.tokens.Doc", "line_number": 9, "usage_type": "name" }, { "api_name": "thinc.types.Floats2d", ...
30048728702
import os from xml.etree import ElementTree from PyQt5 import QtWidgets, QtCore, QtGui import globals_ from levelitems import SpriteItem, ListWidgetItem_SortsByOther from ui import GetIcon from dirty import SetDirty import common class DualBox(QtWidgets.QWidget): """ A dualbox widget for the sprite data ...
NSMBW-Community/Reggie-Next
spriteeditor.py
spriteeditor.py
py
84,893
python
en
code
39
github-code
21
[ { "api_name": "PyQt5.QtWidgets.QWidget", "line_number": 12, "usage_type": "attribute" }, { "api_name": "PyQt5.QtWidgets", "line_number": 12, "usage_type": "name" }, { "api_name": "PyQt5.QtCore.pyqtSignal", "line_number": 16, "usage_type": "call" }, { "api_name": "...
33249842323
import requests from graia.saya import Channel from graia.ariadne.app import Ariadne from graia.ariadne.model import Group, Member from graia.ariadne.message.chain import MessageChain from graia.ariadne.message.element import Image from graia.ariadne.event.message import GroupMessage from graia.broadcast.exceptions im...
mikezom/bigbedbot-py
libs/function/usr_cmd/four_chan_pic.py
four_chan_pic.py
py
1,444
python
en
code
6
github-code
21
[ { "api_name": "graia.saya.Channel.current", "line_number": 18, "usage_type": "call" }, { "api_name": "graia.saya.Channel", "line_number": 18, "usage_type": "name" }, { "api_name": "graia.ariadne.app.Ariadne", "line_number": 26, "usage_type": "name" }, { "api_name"...
37947340727
from django.shortcuts import render, HttpResponse import razorpay from shop.settings import KEY,SECRET from basket.basket import Basket def index(request): basket = Basket(request) total = str(basket.get_total_price()) total = total.replace('.', '') total = int(total) order_currency =...
allenkiakshay/Ecommerce-store-project
pay/views.py
views.py
py
795
python
en
code
0
github-code
21
[ { "api_name": "basket.basket", "line_number": 9, "usage_type": "name" }, { "api_name": "basket.basket.Basket", "line_number": 9, "usage_type": "call" }, { "api_name": "basket.basket.get_total_price", "line_number": 10, "usage_type": "call" }, { "api_name": "basket...
9680885285
from collections import defaultdict import os from data.dfov_dataset import DfovDataset, get_params, get_transform from PIL import Image from glob import glob import numpy as np import torchvision.transforms as transforms import data.cityscapes_labels as cityscapes_labels import torch class FocalensDataset(DfovDataset...
wecam-skku/Learning-Camera-Parameters-With-Weighted-Edge-Attention-From-Single-View-Images
data/focalens_dataset.py
focalens_dataset.py
py
5,321
python
en
code
0
github-code
21
[ { "api_name": "data.dfov_dataset.DfovDataset", "line_number": 11, "usage_type": "name" }, { "api_name": "data.dfov_dataset.DfovDataset.modify_commandline_options", "line_number": 15, "usage_type": "call" }, { "api_name": "data.dfov_dataset.DfovDataset", "line_number": 15, ...
34191920497
import logging import cfclient from cflib.crazyflie.mem import MemoryElement from PyQt6 import QtWidgets from PyQt6 import uic from PyQt6.QtCore import pyqtSignal __author__ = 'Bitcraze AB' __all__ = ['Cf2ConfigDialog'] logger = logging.getLogger(__name__) service_dialog_class = uic.loadUiType(cfclient.module_path...
bitcraze/crazyflie-clients-python
src/cfclient/ui/dialogs/cf2config.py
cf2config.py
py
2,969
python
en
code
287
github-code
21
[ { "api_name": "logging.getLogger", "line_number": 13, "usage_type": "call" }, { "api_name": "PyQt6.uic.loadUiType", "line_number": 15, "usage_type": "call" }, { "api_name": "PyQt6.uic", "line_number": 15, "usage_type": "name" }, { "api_name": "cfclient.module_path...
31851300471
from app.routes_api.routes import router_bakeshop from fastapi import FastAPI from fastapi.responses import RedirectResponse import uvicorn from fastapi.middleware.cors import CORSMiddleware # Configurando o FAST-API metadata = [{ "name": "API - Roleta Bakeshop", "description": "Backend game roleta bakeshop "...
Juanlimalf/backend_bake
main.py
main.py
py
883
python
en
code
1
github-code
21
[ { "api_name": "app.routes_api.routes", "line_number": 14, "usage_type": "name" }, { "api_name": "fastapi.FastAPI", "line_number": 14, "usage_type": "call" }, { "api_name": "app.routes_api.routes.add_middleware", "line_number": 19, "usage_type": "call" }, { "api_na...
73694956531
from django.db import models # from django.core.exceptions import ValidationError class User(models.Model): first_name = models.CharField(max_length=200) last_name = models.CharField(max_length=200) email = models.EmailField() age = models.IntegerField(blank=True) created_at = models.DateTimeField(...
jawang94/python_repo
django/users/apps/user_login/models.py
models.py
py
578
python
en
code
0
github-code
21
[ { "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": "...
20677987268
from prob1_lru_cache import LRU_Cache import itertools def test_empty_cache(): print("Testing empty cache...") lru_cache = LRU_Cache(5) print(lru_cache.get_value(1)) # Returns -1 because the cache is empty, or rather, 1 is not present in the cache. def test_small_cache(): print("Testing small cache...
mehmetalici/Udacity-Data-Structures-and-Algorithms
data-structures/prob1_lru_cache_test.py
prob1_lru_cache_test.py
py
1,696
python
en
code
2
github-code
21
[ { "api_name": "prob1_lru_cache.LRU_Cache", "line_number": 8, "usage_type": "call" }, { "api_name": "prob1_lru_cache.LRU_Cache", "line_number": 13, "usage_type": "call" }, { "api_name": "prob1_lru_cache.LRU_Cache", "line_number": 34, "usage_type": "call" }, { "api_...
37950221718
#!/usr/bin/env python import sys import subprocess import re import os.path import yaml try: from yaml import CLoader as Loader, CDumper as Dumper except ImportError: from yaml import Loader, Dumper root = os.path.dirname(__file__) servers_yaml_path = os.path.join(root, "servers.yaml") serve...
Dinosauriel/watchcat
watchcat.py
watchcat.py
py
2,308
python
en
code
0
github-code
21
[ { "api_name": "os.path.path.dirname", "line_number": 14, "usage_type": "call" }, { "api_name": "os.path.path", "line_number": 14, "usage_type": "attribute" }, { "api_name": "os.path", "line_number": 14, "usage_type": "name" }, { "api_name": "os.path.path.join", ...
35721454672
# -*- coding: utf-8 -*- ''' 数据 预处理(preprocessing): 缺失值填充 类别标签处理 标签类别化 LabelEncoder 独热编码 OneHotEncoder 特征过程: 生成多项式特征PolynomialFeatures 原始特征:(x1,x2) 转化后(1,x1,x2,x1^2,x2^2,x1x2,x2^2) ''' import pandas as pd from sklearn import preprocessing import datetime # train_all = pd.read_csv("../../data//dataset/feature/train_...
lytforgood/Customer_Flow_Forecasts
python/preprocessing.py
preprocessing.py
py
4,388
python
en
code
6
github-code
21
[ { "api_name": "pandas.read_csv", "line_number": 18, "usage_type": "call" }, { "api_name": "sklearn.preprocessing.LabelEncoder", "line_number": 24, "usage_type": "call" }, { "api_name": "sklearn.preprocessing", "line_number": 24, "usage_type": "name" }, { "api_name...
15224757577
import os from unittest import mock import pytest import requests from datetime import datetime from json import dumps from apprise import Apprise from apprise.plugins.NotifyOffice365 import NotifyOffice365 from helpers import AppriseURLTester # Disable logging for a cleaner testing output import logging logging.disa...
caronc/apprise
test/test_plugin_office365.py
test_plugin_office365.py
py
10,964
python
en
code
8,936
github-code
21
[ { "api_name": "logging.disable", "line_number": 14, "usage_type": "call" }, { "api_name": "logging.CRITICAL", "line_number": 14, "usage_type": "attribute" }, { "api_name": "os.path.join", "line_number": 17, "usage_type": "call" }, { "api_name": "os.path", "lin...
72363889973
from collections import defaultdict class Graph(object): def __init__(self): self.nodes = dict() self.edges = defaultdict(set) def add_connection(self, connection): for n in connection.first: self.nodes[n] = n for n in connection.second: self.nodes[n] =...
jwg4/pyvirgo
virgo/graph.py
graph.py
py
2,650
python
en
code
8
github-code
21
[ { "api_name": "collections.defaultdict", "line_number": 7, "usage_type": "call" }, { "api_name": "collections.defaultdict", "line_number": 65, "usage_type": "call" } ]
12224527858
import numpy as np import pandas as pd import matplotlib.pyplot as plt from matplotlib.ticker import PercentFormatter, ScalarFormatter # https://matplotlib.org/stable/gallery/lines_bars_and_markers/bar_label_demo.html def plot_mean_abv(brewery_count_abv: pd.DataFrame) -> None: x_label = list(brewery_count_ab...
patrick-bedkowski/BeerAdvocate-Data-analysis
plotter.py
plotter.py
py
3,449
python
en
code
0
github-code
21
[ { "api_name": "pandas.DataFrame", "line_number": 8, "usage_type": "attribute" }, { "api_name": "numpy.arange", "line_number": 14, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.subplots", "line_number": 15, "usage_type": "call" }, { "api_name": "matplotl...
21449700025
# history: # 2020/4/18 v1.0 initial # 2020/4/21 v1.1 MAX_BUS_NUM = 16; header first line delete a '/' # 2020/4/24 v1.2 add AIO, DIO pin type # 2020/10/4 v2.0 add verilog output function # 2022/4/20 v3.0 change verilog format, and power info import os import sys import re import msvcrt import datet...
socrates77-sh/toolkit
genlib/genlib.py
genlib.py
py
13,429
python
en
code
0
github-code
21
[ { "api_name": "PyQt5.QtWidgets.QWidget", "line_number": 26, "usage_type": "attribute" }, { "api_name": "PyQt5.QtWidgets", "line_number": 26, "usage_type": "name" }, { "api_name": "myform.Ui_Form", "line_number": 26, "usage_type": "name" }, { "api_name": "PyQt5.QtW...
21163354814
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import re import os import time import asyncio import subprocess import ntplib from datetime import datetime from config.configure import Configure as CFG class NTPDaemon: def __init__(self, ): self.chk = re.compile(r'(0\.\d+)') self.date_chk = re.co...
havah-project/havah-chain-node-docker
ctx/manager/ntp.py
ntp.py
py
4,145
python
en
code
0
github-code
21
[ { "api_name": "re.compile", "line_number": 16, "usage_type": "call" }, { "api_name": "re.compile", "line_number": 17, "usage_type": "call" }, { "api_name": "config.configure.Configure", "line_number": 18, "usage_type": "call" }, { "api_name": "os.getenv", "lin...
4053905717
from typing import Callable from typing import Tuple from urllib.parse import parse_qs import sentry_sdk from framework.dirs import DIR_SRC from framework.util.settings import get_setting from tasks.lesson03 import task303 sentry_sdk.init(get_setting("SENTRY_DSN"), traces_sample_rate=1.0) ResponseT = Tuple[str, str...
Mono20i06/tm123
src/main/wsgi.py
wsgi.py
py
2,313
python
en
code
0
github-code
21
[ { "api_name": "sentry_sdk.init", "line_number": 11, "usage_type": "call" }, { "api_name": "framework.util.settings.get_setting", "line_number": 11, "usage_type": "call" }, { "api_name": "typing.Tuple", "line_number": 13, "usage_type": "name" }, { "api_name": "urll...
38591359094
from datetime import datetime, timedelta import pandas as pd from utils.constants import * def kelvin_to_celsius(kelvin): celsius = kelvin - 273.15 return celsius def transform_load_data(task_instance): data = task_instance.xcom_pull(task_ids="extract_weather_data") city = data["name"] weathe...
Ming5499/Weatherapi-project
etls/weather_etl.py
weather_etl.py
py
2,125
python
en
code
0
github-code
21
[ { "api_name": "datetime.datetime.utcfromtimestamp", "line_number": 22, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 22, "usage_type": "name" }, { "api_name": "datetime.datetime.utcfromtimestamp", "line_number": 23, "usage_type": "call" }, ...
74437710774
from paddle.fluid.optimizer import Optimizer from paddle.fluid import framework from paddle.fluid.framework import Variable from paddle.fluid import core class AdamOptimizer(Optimizer): _moment1_acc_str = "moment1" _moment2_acc_str = "moment2" _beta1_pow_acc_str = "beta1_pow_acc" _beta2_pow_acc_str = ...
chfhf/dmr-paddle
paddtf/train/adam.py
adam.py
py
4,035
python
en
code
1
github-code
21
[ { "api_name": "paddle.fluid.optimizer.Optimizer", "line_number": 7, "usage_type": "name" }, { "api_name": "paddle.fluid.framework.Block", "line_number": 38, "usage_type": "attribute" }, { "api_name": "paddle.fluid.framework", "line_number": 38, "usage_type": "name" }, ...
7482103504
# Humanoid task # Libraries to be imported import gym import numpy as np import tensorflow as tf from numpy import floor, log, eye, zeros, array, sqrt, sum, dot, tile, outer, real from numpy import exp, diag, power, ravel from numpy.linalg import eig, norm from numpy.random import randn import math import random impor...
PaoloP84/EfficacyModernES
modern_es.py
modern_es.py
py
53,673
python
en
code
1
github-code
21
[ { "api_name": "os.path.dirname", "line_number": 25, "usage_type": "call" }, { "api_name": "os.path", "line_number": 25, "usage_type": "attribute" }, { "api_name": "os.path.realpath", "line_number": 25, "usage_type": "call" }, { "api_name": "tensorflow.get_default_...
20583240090
from PIL import Image, ImageDraw, ImageFont IMAGE_FILE = '/home/shinobu/Downloads/sample.jpg' def resize(): image_file = Image.open(IMAGE_FILE, 'r') resized_image = image_file.resize((100, 100)) resized_image.save( '/tmp/resized_image0.jpg', quality = 100, optimize = True) image_file.thumbnail((1...
shinobu-x/cpp
Archives/deep_learning/basic_test/images0.py
images0.py
py
901
python
en
code
1
github-code
21
[ { "api_name": "PIL.Image.open", "line_number": 6, "usage_type": "call" }, { "api_name": "PIL.Image", "line_number": 6, "usage_type": "name" }, { "api_name": "PIL.Image.ANTIALIAS", "line_number": 13, "usage_type": "attribute" }, { "api_name": "PIL.Image", "line...
42748754007
import VoiceRecorder import VoiceVad import ExtractFeatures import sys import argparse import time def check_args(args=None): parser = argparse.ArgumentParser(description="Extract Voice Features") parser.add_argument('-D', '--duration', help="Voice recording duration", ...
hndr91/VoiceIdentification
main.py
main.py
py
2,033
python
en
code
0
github-code
21
[ { "api_name": "argparse.ArgumentParser", "line_number": 10, "usage_type": "call" }, { "api_name": "time.sleep", "line_number": 38, "usage_type": "call" }, { "api_name": "time.sleep", "line_number": 44, "usage_type": "call" }, { "api_name": "VoiceRecorder.voice_rec...
20753223877
from datetime import datetime # from Challege.project_tugas import kembali # date_format = "%m/%d/%Y" # a = datetime.strptime('8/18/2008', date_format) # b = datetime.strptime('9/26/2008', date_format) # delta = b - a # print (delta.days) # that's it date = datetime.today() date_pormat = "%d-%m-%Y" strtr = date.strfti...
flyyhgh25/Python
BASIC/tanggal.py
tanggal.py
py
477
python
en
code
0
github-code
21
[ { "api_name": "datetime.datetime.today", "line_number": 9, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 9, "usage_type": "name" }, { "api_name": "datetime.datetime.strptime", "line_number": 16, "usage_type": "call" }, { "api_name": "da...
21101288360
import math as m import numpy as np import matplotlib.pyplot as plt ##################### Methode d'Euler ##################### def step_euler(y,t,h,f): return(y + h*f(y,t)) def euler_n_step(y0,t0,N,h,f): y = np.array([0.0]*N) y[0] = y0 T = np.array([(t0 + h*i) for i in range(N)]) for k in range (N-1): y[k+1...
nhannoyer/algonum_6
euler.py
euler.py
py
2,880
python
en
code
0
github-code
21
[ { "api_name": "numpy.array", "line_number": 12, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 14, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 17, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": ...
40073990172
from datetime import datetime from distutils.command.upload import upload from urllib import response import boto3 from io import BytesIO from PIL import Image, ImageOps import os import uuid import json s3 = boto3.client('s3') bucket_name = str(os.getenv('BUCKET_NAME')) size = int(os.getenv('THUMBNAIL_SIZE')) dbtable...
Aadityakiran-S/Image-ThumbnailCRUDApp_AWS-SAM_Python
handler/app.py
app.py
py
6,635
python
en
code
0
github-code
21
[ { "api_name": "boto3.client", "line_number": 11, "usage_type": "call" }, { "api_name": "os.getenv", "line_number": 12, "usage_type": "call" }, { "api_name": "os.getenv", "line_number": 13, "usage_type": "call" }, { "api_name": "os.getenv", "line_number": 14, ...
3652603442
import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from torch.utils.data import Dataset from torch.utils.data import DataLoader class Net(nn.Module): def __init__(self, input_size, M, r): super(Net, self).__init__() self.fc1 = nn.Linear(input_size, M) s...
maclin726/MachineLearningTechniques2020spring
coursera_hw4/NNet.py
NNet.py
py
4,888
python
en
code
0
github-code
21
[ { "api_name": "torch.nn.Module", "line_number": 10, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 10, "usage_type": "name" }, { "api_name": "torch.nn.Linear", "line_number": 14, "usage_type": "call" }, { "api_name": "torch.nn", "line_nu...
849467344
#!/usr/bin/env python3 # goes through markdown files updating info, warning, caution, danger, note, and tip flags # FROM: [[ info ]] # TO: :::info # ::: # FROM: [[ info | title ]] # TO: :::info title # ::: # FROM: [[ info ]] # | some text here\n # TO: :::info # some text here # ::: # FROM: [[ info | title ]] # | some ...
eosnetworkfoundation/docsgen
scripts/process_admonitions.py
process_admonitions.py
py
8,175
python
en
code
4
github-code
21
[ { "api_name": "sys.argv", "line_number": 30, "usage_type": "attribute" }, { "api_name": "sys.argv", "line_number": 35, "usage_type": "attribute" }, { "api_name": "re.compile", "line_number": 37, "usage_type": "call" }, { "api_name": "logging.basicConfig", "lin...
44245109548
#!/usr/bin/python3 import glob import inspect import os import re from shutil import copy import stat import subprocess import sys from .utils import execute, execute_call from .src_introspection import RobotpkgSrcIntrospection,RobotpkgPackage def valid_name(name): return name.replace('_', ' ').replace('-', ' ').l...
olivier-stasse/robotpkg_helpers
robotpkg_helpers/dockerfile.py
dockerfile.py
py
10,215
python
en
code
0
github-code
21
[ { "api_name": "src_introspection.RobotpkgSrcIntrospection", "line_number": 37, "usage_type": "call" }, { "api_name": "os.path.isdir", "line_number": 69, "usage_type": "call" }, { "api_name": "os.path", "line_number": 69, "usage_type": "attribute" }, { "api_name": ...
42700971626
#!/usr/bin/env python """ Tally ====== Tally is a simple daily counter API. """ from setuptools import setup, find_packages import os import subprocess # If setup.py is being run from within the git repository (instead of a # tarball, for instance) append the first 10 digits of the head commmit. tally_version = "...
Mapkin/tally
setup.py
setup.py
py
1,363
python
en
code
1
github-code
21
[ { "api_name": "os.path.exists", "line_number": 19, "usage_type": "call" }, { "api_name": "os.path", "line_number": 19, "usage_type": "attribute" }, { "api_name": "subprocess.check_output", "line_number": 20, "usage_type": "call" }, { "api_name": "setuptools.setup"...
40225875642
import cv2 import numpy as np import matplotlib.pyplot as plt # Read Image from file img = cv2.imread("Lenna.jpg", cv2.IMREAD_GRAYSCALE) I = cv2.normalize(img.astype("float"), None, 0.0, 1.0, cv2.NORM_MINMAX) [y, x] = I.shape # Create 2 mask for blurring image Hv = np.ones((9, 1), np.float32) / 9 Hh = np.transpose(Hv)...
Nourollah/Python_ImageProcessing
S06/S06_C09_P240_image_blur_evaluation_measure*.py
S06_C09_P240_image_blur_evaluation_measure*.py
py
1,500
python
en
code
19
github-code
21
[ { "api_name": "cv2.imread", "line_number": 6, "usage_type": "call" }, { "api_name": "cv2.IMREAD_GRAYSCALE", "line_number": 6, "usage_type": "attribute" }, { "api_name": "cv2.normalize", "line_number": 7, "usage_type": "call" }, { "api_name": "cv2.NORM_MINMAX", ...
70147013172
#-*- coding: utf-8 -*- __author__ = 'liyangjin' __time__ = '2018/3/20 11:23' from flask import Flask, render_template,jsonify from flask.ext.socketio import SocketIO import threading app = Flask(__name__) app.debug = True app.config['SECRET_KEY'] = 'my-project' symbols = ["a", "b", "c", "d", "e", "f", "g...
cabbageGG/flask_socketio_websocket
server.py
server.py
py
1,526
python
en
code
0
github-code
21
[ { "api_name": "flask.Flask", "line_number": 10, "usage_type": "call" }, { "api_name": "flask.ext.socketio.SocketIO", "line_number": 15, "usage_type": "call" }, { "api_name": "redis.Redis", "line_number": 18, "usage_type": "call" }, { "api_name": "flask.render_temp...
69816312054
import sys import pytest import unittest from unittest.mock import MagicMock, patch ON = 1 OFF = 0 BOIL_ON = 0 BOIL_OFF = 1 LOW = 0 MED = 1 HIGH = 2 CLOCK = 0 COUNTER = 1 sys.modules["spidev"] = MagicMock() from stmspi.stmspi import RpiController @pytest.fixture def rpi(): return RpiController(0) @pytest.fixt...
brapru/esteban
raspi/tests/test_stmspi.py
test_stmspi.py
py
3,055
python
en
code
2
github-code
21
[ { "api_name": "sys.modules", "line_number": 16, "usage_type": "attribute" }, { "api_name": "unittest.mock.MagicMock", "line_number": 16, "usage_type": "call" }, { "api_name": "stmspi.stmspi.RpiController", "line_number": 22, "usage_type": "call" }, { "api_name": "...
24706614663
import os from loader import DataLoader import numpy as np from time import time, strftime import torch from tqdm import tqdm from model.esim_hardaligner import ESIM_Aligner as ESIM from torch.optim import Adam import pickle import random # code saving and logging dataset = 'snli' # dataset = 'med2hop_bysnli' when yo...
feng-yufei/Neural-Natural-Logic
aligner.py
aligner.py
py
3,454
python
en
code
11
github-code
21
[ { "api_name": "pickle.load", "line_number": 17, "usage_type": "call" }, { "api_name": "model.esim_hardaligner.eval", "line_number": 23, "usage_type": "call" }, { "api_name": "model.esim_hardaligner", "line_number": 23, "usage_type": "name" }, { "api_name": "tqdm.t...
27850549473
from bs4 import BeautifulSoup as bs import requests from pprint import pprint # https://www.kinopoisk.ru/popular/films/?quick_filters=serials&tab=all main_link = 'https://www.kinopoisk.ru' params = { 'quick_filters': 'serials', 'tab': 'all' } headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win6...
aeroswitch/GeekBrains
5_Collecting_data_from_the_web/2_Parsing_HTML_BS/kinopoisk.py
kinopoisk.py
py
1,570
python
en
code
0
github-code
21
[ { "api_name": "requests.get", "line_number": 19, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_number": 20, "usage_type": "call" }, { "api_name": "pprint.pprint", "line_number": 44, "usage_type": "call" } ]
10375715155
import sys from collections import defaultdict input = sys.stdin.readline n, m = map(int, input().split()) dic = defaultdict(int) for _ in range(n): word = str(input().rstrip()) if len(word) >= m: dic[word] += 1 items = sorted(list(dic.items()), key=lambda x: (-x[1], -len(x[0]), x[0])) for...
yejin7211/Algorithm
백준/Silver/20920. 영단어 암기는 괴로워/영단어 암기는 괴로워.py
영단어 암기는 괴로워.py
py
359
python
en
code
0
github-code
21
[ { "api_name": "sys.stdin", "line_number": 3, "usage_type": "attribute" }, { "api_name": "collections.defaultdict", "line_number": 6, "usage_type": "call" } ]
36993200507
import requests from bs4 import BeautifulSoup from urllib.request import urlopen from urllib.error import HTTPError, URLError def getTitle(url): try: html = urlopen(url) except HTTPError as e: return None try: soupObj = BeautifulSoup(html, 'html.parser') title = soupObj.bod...
YeasirArafatRatul/web_scraping
scrapertest.py
scrapertest.py
py
543
python
en
code
1
github-code
21
[ { "api_name": "urllib.request.urlopen", "line_number": 9, "usage_type": "call" }, { "api_name": "urllib.error.HTTPError", "line_number": 10, "usage_type": "name" }, { "api_name": "bs4.BeautifulSoup", "line_number": 13, "usage_type": "call" } ]
26556611221
# -*- coding: utf-8 -*- """ Created on Wed Jan 18 14:30:13 2017 @author: mike """ import sys import spacepy.datamodel from datetime import date, datetime, timedelta import dateutil.parser import datetime import os import numpy as np from crossCorrelationStudy import CrossCorrelateData #sys.path.insert(0, '/home/mike...
mshumko/bouncing_microburst
event0/cross_correlation/crossCorrWrapper.py
crossCorrWrapper.py
py
2,874
python
en
code
0
github-code
21
[ { "api_name": "datetime.date", "line_number": 20, "usage_type": "name" }, { "api_name": "datetime.date", "line_number": 23, "usage_type": "argument" }, { "api_name": "spacepy.datamodel.datamodel.readJSONheadedASCII", "line_number": 26, "usage_type": "call" }, { "a...
10147557424
# -*- coding: utf-8 -*- """ Created on Fri Feb 23 12:47:10 2018 @author: jamontol """ import skfuzzy as fuzz from itertools import islice import numpy as np class Deteccion_Anomalias_FCM: def __init__(self, data, modo, q, r): self.t = data[0] self.y = data[1] ...
jamontol/Anomaly-Detection
Deteccion_Anomalias_FCM.py
Deteccion_Anomalias_FCM.py
py
4,186
python
en
code
6
github-code
21
[ { "api_name": "itertools.islice", "line_number": 45, "usage_type": "call" }, { "api_name": "itertools.islice", "line_number": 51, "usage_type": "call" }, { "api_name": "skfuzzy.cluster.cmeans", "line_number": 72, "usage_type": "call" }, { "api_name": "skfuzzy.clus...
41541901823
from pyspark.sql import SparkSession from pyspark.sql.functions import date_format from pyspark.sql.types import IntegerType session = (SparkSession.builder .appName("LogStatsSQL") .master("local[*]") .getOrCreate()) rawLogsDF = session.read.option("header", True).csv("../resources/bi...
jocelynlecomte/udemy-spark-python
pyspark_tuto/df/log_stats_pivot_df.py
log_stats_pivot_df.py
py
762
python
en
code
0
github-code
21
[ { "api_name": "pyspark.sql.SparkSession.builder.appName", "line_number": 5, "usage_type": "call" }, { "api_name": "pyspark.sql.SparkSession.builder", "line_number": 5, "usage_type": "attribute" }, { "api_name": "pyspark.sql.SparkSession", "line_number": 5, "usage_type": "...
27601103076
from modules.lib.report_repository import ReportRepository class ThingsCloudReportRepository(ReportRepository): def __init__(self, report_queue, device, interval): super().__init__(report_queue, interval) self._enable_posting_multi_measurement = True self.device = device def __create_...
atmark-techno/ThingsCloud-samples
Armadillo-IoT_GW/modules/things_cloud/report_repository.py
report_repository.py
py
1,566
python
en
code
0
github-code
21
[ { "api_name": "modules.lib.report_repository.ReportRepository", "line_number": 4, "usage_type": "name" } ]
32419592482
import datetime import firebase_admin from firebase_admin import credentials, firestore from django.http import HttpResponse, JsonResponse cred = credentials.Certificate("./serviceAccountKey.json") firebase_admin.initialize_app(cred, { 'databaseURL': 'https://fir-project-trungtt.firebaseio.com' }) db = firestore...
trungtranthanh93/djangoChatFile
firebase/views.py
views.py
py
2,153
python
en
code
0
github-code
21
[ { "api_name": "firebase_admin.credentials.Certificate", "line_number": 7, "usage_type": "call" }, { "api_name": "firebase_admin.credentials", "line_number": 7, "usage_type": "name" }, { "api_name": "firebase_admin.initialize_app", "line_number": 8, "usage_type": "call" ...
42753472441
from matplotlib.pyplot import imshow from io import BytesIO from IPython import display import matplotlib.pyplot as plt import PIL.Image import numpy as np def plot(img, scale=1, dpi=80): plt.figure(figsize=(img.shape[0]*scale/dpi, img.shape[1]*scale/dpi), dpi=dpi) imshow(img) # Prepare a tensor to be di...
slavivanov/Style-Tranfer
utils.py
utils.py
py
1,217
python
en
code
100
github-code
21
[ { "api_name": "matplotlib.pyplot.figure", "line_number": 9, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 9, "usage_type": "name" }, { "api_name": "matplotlib.pyplot.imshow", "line_number": 10, "usage_type": "call" }, { "api_name": "num...
70194193654
import logging import os import sys from dynaconf import Dynaconf def check_main_config(): project_path = sys.path[0] if os.path.exists(os.path.join(project_path, 'configs', 'config.toml')): path_config = os.path.join(project_path, 'configs', 'config.toml') envvar_prefix = "API" else...
hellagod/poem_analyzer
configs/config.py
config.py
py
1,006
python
en
code
0
github-code
21
[ { "api_name": "sys.path", "line_number": 9, "usage_type": "attribute" }, { "api_name": "os.path.exists", "line_number": 11, "usage_type": "call" }, { "api_name": "os.path", "line_number": 11, "usage_type": "attribute" }, { "api_name": "os.path.join", "line_num...
2701034867
#!/usr/bin/env python ''' Ground-state and IP/EA-EOM-CCSD for singlet (RHF) and triplet (UHF) O2. ''' from pyscf import gto, scf, cc '''Singlet''' mol = gto.Mole() mol.verbose = 5 mol.atom = 'A' mol.atom = 'O 0 0 0; O 0 0 1.2' mol.basis = 'ccpvdz' mol.build() mf = scf.RHF(mol) mf.verbose = 7 mf.scf() mycc = cc.RC...
sunchong137/pyscf_2017
examples/cc/20-ip_ea_eom_ccsd.py
20-ip_ea_eom_ccsd.py
py
622
python
en
code
1
github-code
21
[ { "api_name": "pyscf.gto.Mole", "line_number": 11, "usage_type": "call" }, { "api_name": "pyscf.gto", "line_number": 11, "usage_type": "name" }, { "api_name": "pyscf.scf.RHF", "line_number": 18, "usage_type": "call" }, { "api_name": "pyscf.scf", "line_number":...
18710451331
import requests src = 'http://ippanel.com/api/select' url = 'ادرس سایت' json_request = { 'op': 'send', 'uname': '09104734870', 'pass': '4400080072', # 'message': 'be emad kir kocholo salam bereson', 'from': '5000125475', # 'to': ['09339192819', ], } def successfully_reserve_sms(phone_number...
rezabhm/Laser-Back-End
SmsService/SMS.py
SMS.py
py
3,756
python
fa
code
0
github-code
21
[ { "api_name": "requests.post", "line_number": 27, "usage_type": "call" }, { "api_name": "requests.post", "line_number": 45, "usage_type": "call" }, { "api_name": "requests.post", "line_number": 63, "usage_type": "call" }, { "api_name": "requests.post", "line_n...
25040018727
# -*- coding: utf-8 -*- __author__ = 'romus' import unittest import datetime from statistic4text.errors.errors import DataNotFound from iRetrieval.errors.errors import ParamError from iRetrieval.test.connection_configs import * from iRetrieval.utils.save_utils import MongoSaveRetrievalUtils class TestMongoSaveRe...
romus/iRetrieval
iRetrieval/test/test_save_utils.py
test_save_utils.py
py
1,397
python
en
code
0
github-code
21
[ { "api_name": "unittest.TestCase", "line_number": 16, "usage_type": "attribute" }, { "api_name": "iRetrieval.utils.save_utils.MongoSaveRetrievalUtils", "line_number": 19, "usage_type": "call" }, { "api_name": "statistic4text.errors.errors.DataNotFound", "line_number": 24, ...
73260761334
import os import sys import pandas as pd from pathlib import Path from GMXMMPBSA.API import MMPBSA_API from GMXMMPBSA.exceptions import NoFileExists def parse_GMXMMPBSA_RESULTS(mmxsafile, outdir='.'): if not isinstance(mmxsafile, Path): fname = Path(mmxsafile) if not fname.exists(): raise NoF...
Aunity/LICkit
lickit/tools.py
tools.py
py
3,714
python
en
code
0
github-code
21
[ { "api_name": "pathlib.Path", "line_number": 10, "usage_type": "argument" }, { "api_name": "pathlib.Path", "line_number": 11, "usage_type": "call" }, { "api_name": "GMXMMPBSA.exceptions.NoFileExists", "line_number": 14, "usage_type": "call" }, { "api_name": "os.ch...
72905332853
from __future__ import print_function import warnings import copy import json import os import numpy as np from . import backend as K from . import optimizers from .utils.io_utils import ask_to_proceed_with_overwrite from .engine.training import Model from .engine.topology import get_source_inputs, Node, Layer, Merge ...
jacoxu/ASAM
software/keras/models.py
models.py
py
45,414
python
en
code
54
github-code
21
[ { "api_name": "numpy.__name__", "line_number": 26, "usage_type": "attribute" }, { "api_name": "os.path.isfile", "line_number": 43, "usage_type": "call" }, { "api_name": "os.path", "line_number": 43, "usage_type": "attribute" }, { "api_name": "utils.io_utils.ask_to...
587870301
from pymongo import MongoClient import json def import_from_postgres(): client = MongoClient('127.0.0.1', 27017, username='admin', password='admin') db = client['movies'] movies_table = db['movies'] f = open('./pg_json/genres_202306212000.json') genres_dataset = json.load(f) f = open('./pg_jso...
ivanandreski/nosql-project
mongo/import_from_postgres.py
import_from_postgres.py
py
3,062
python
en
code
0
github-code
21
[ { "api_name": "pymongo.MongoClient", "line_number": 5, "usage_type": "call" }, { "api_name": "json.load", "line_number": 10, "usage_type": "call" }, { "api_name": "json.load", "line_number": 12, "usage_type": "call" }, { "api_name": "json.load", "line_number":...
1660860280
from azure.cognitiveservices.vision.computervision import ComputerVisionClient from msrest.authentication import CognitiveServicesCredentials from PIL import ImageGrab import io import pyperclip def recognize_printed_text_in_mac_clipboard_image(): """RecognizedPrintedTextUsingOCR_API. This will do an OCR anal...
dss99911/azure-study
recognition/ocr.py
ocr.py
py
991
python
en
code
0
github-code
21
[ { "api_name": "azure.cognitiveservices.vision.computervision.ComputerVisionClient", "line_number": 16, "usage_type": "call" }, { "api_name": "msrest.authentication.CognitiveServicesCredentials", "line_number": 16, "usage_type": "call" }, { "api_name": "PIL.ImageGrab.grabclipboard...
74991344691
from gi.repository import Gdk def mix(src: Gdk.RGBA, dest: Gdk.RGBA, ratio: float) -> Gdk.RGBA: """Mixes two Gdk colours into a result""" ratio = min(1.0, max(0.0, ratio)) inv = 1.0 - ratio return Gdk.RGBA(inv * src.red + ratio * dest.red, inv * src.green + ratio * dest.green, ...
quodlibet/quodlibet
quodlibet/qltk/color.py
color.py
py
430
python
en
code
1,306
github-code
21
[ { "api_name": "gi.repository.Gdk.RGBA", "line_number": 4, "usage_type": "attribute" }, { "api_name": "gi.repository.Gdk", "line_number": 4, "usage_type": "name" }, { "api_name": "gi.repository.Gdk.RGBA", "line_number": 8, "usage_type": "call" }, { "api_name": "gi....
73514610614
import cv2 import pyautogui import numpy as np import time import keyboard # Debug purpose cv2.namedWindow("Threshold Debug") cv2.moveWindow("Threshold Debug", -1000, 300) pre_shopkeeper = True ################### User inputs ####################### seed = '641499' default_interval : float = 0.05 # references prep...
shortcakesweets/Bard-seeded-tas
main.py
main.py
py
10,776
python
en
code
0
github-code
21
[ { "api_name": "cv2.namedWindow", "line_number": 9, "usage_type": "call" }, { "api_name": "cv2.moveWindow", "line_number": 10, "usage_type": "call" }, { "api_name": "cv2.imread", "line_number": 59, "usage_type": "call" }, { "api_name": "cv2.IMREAD_COLOR", "line...
8963540383
from discord.ext import commands import asyncio class timer(commands.Cog): def __init__(self, bot): self.bot = bot @commands.command(aliases=["stimer", "mtimer", "htimer"]) async def _timer(self, ctx, time: float, content=None): zikan = f"{ctx.author.mention}時間です" hu = "数字が負の値です" ...
Budobudou/2rz-bot
cogs/commands/timer.py
timer.py
py
1,502
python
ja
code
null
github-code
21
[ { "api_name": "discord.ext.commands.Cog", "line_number": 5, "usage_type": "attribute" }, { "api_name": "discord.ext.commands", "line_number": 5, "usage_type": "name" }, { "api_name": "asyncio.sleep", "line_number": 25, "usage_type": "call" }, { "api_name": "discor...
3036117230
import bpy from Bonera_Toolkit import Utility_Functions #Editing bone ENUM_Name_Mode = [("PREFIX","Prefix","Prefix"),("SUFFIX","Suffix","Suffix"),("REPLACE","Replace","Replace")] class BONERA_Duplicate_And_Constraint(bpy.types.Operator): """Duplicate and Constraint Bones Object | Pose | Edit Armature""" b...
BlenderBoi/Bonera
Utility_Operator/Duplicate_And_Constraint.py
Duplicate_And_Constraint.py
py
5,408
python
en
code
23
github-code
21
[ { "api_name": "bpy.types", "line_number": 7, "usage_type": "attribute" }, { "api_name": "bpy.props.EnumProperty", "line_number": 14, "usage_type": "call" }, { "api_name": "bpy.props", "line_number": 14, "usage_type": "attribute" }, { "api_name": "bpy.props.StringP...
33126341645
import logging from itertools import chain from typing import Optional from datetime import datetime from sqlalchemy.exc import IntegrityError from sqlalchemy.orm import Session from weedly.db.models import Article, Author, Feed from weedly.errors import AlreadyExistsError, NotFoundError logger = logging.getLogger(_...
kbondar17/pocket-rss
rss-backend/weedly/repos/feeds.py
feeds.py
py
3,741
python
en
code
6
github-code
21
[ { "api_name": "logging.getLogger", "line_number": 12, "usage_type": "call" }, { "api_name": "sqlalchemy.orm.Session", "line_number": 17, "usage_type": "name" }, { "api_name": "typing.Optional", "line_number": 20, "usage_type": "name" }, { "api_name": "weedly.db.mo...
28593374140
""" MAPS score functions from https://github.com/macarthur-lab/gnomad_lof """ import sys from typing import Union, Iterable import hail as hl def downsampling_counts_expr( ht: Union[hl.Table, hl.MatrixTable], pop: str = 'global', variant_quality: str = 'adj', singleton: bool = False, impose_high_a...
populationgenomics/utr-variants
utr3variants/maps.py
maps.py
py
8,190
python
en
code
0
github-code
21
[ { "api_name": "typing.Union", "line_number": 10, "usage_type": "name" }, { "api_name": "hail.Table", "line_number": 10, "usage_type": "attribute" }, { "api_name": "hail.MatrixTable", "line_number": 10, "usage_type": "attribute" }, { "api_name": "hail.zip_with_inde...
21541493492
import argparse import os from torch import nn, optim import lr_schedule, pre_process as prep, network, losssntg import torch import torch.nn import numpy as np from data_list import ImageList from torch.utils.data import DataLoader import network from util import DummyDataset, make_data_loader, get_sampled_data_loa...
zxcvbnmloveu/RBDA-master
pytorch/load_model.py
load_model.py
py
28,767
python
en
code
0
github-code
21
[ { "api_name": "network.Homo_classifier", "line_number": 18, "usage_type": "call" }, { "api_name": "lr_schedule.schedule_dict", "line_number": 28, "usage_type": "attribute" }, { "api_name": "numpy.arange", "line_number": 44, "usage_type": "call" }, { "api_name": "n...
24421859500
import typing from typing import Type import sys import pandas as pd import numpy as np class DOC: """ A script to correct the bond problem in LAMMPS's write_data command and the boundary conditions. These scripts read the data file from write_data, check the distance between particles that have a...
saeed-amiri/pytools
bond_corrections.py
bond_corrections.py
py
22,764
python
en
code
0
github-code
21
[ { "api_name": "typing.Any", "line_number": 186, "usage_type": "attribute" }, { "api_name": "typing.Any", "line_number": 187, "usage_type": "attribute" }, { "api_name": "typing.Any", "line_number": 188, "usage_type": "attribute" }, { "api_name": "typing.Any", "...
2828554228
import cx_Oracle class Bankstmt: def stmt(self,accno): con = cx_Oracle.connect('SYSTEM/pmgkrishna96') cur = con.cursor(); cur.execute("select * from printstmt where accountNumber='"+accno+"'") print("\t\t\t\tBANK STATEMENT\t\t\t\t") for res in cur: print("accno:"+str...
pmgkrishna/BankwithPython
src/BankStatement.py
BankStatement.py
py
444
python
en
code
0
github-code
21
[ { "api_name": "cx_Oracle.connect", "line_number": 5, "usage_type": "call" } ]
610565832
from datetime import datetime class Carrera: def __init__(self, nombre): self.nombre = nombre self.alumnos = [] def agregar_alumno(self, alumno): self.alumnos.append(alumno) class Alumno: def __init__(self, nombre, apellido): self.nombre = nombre self.apellido = ap...
RIKI-MAXI/Notas
Notas.py
Notas.py
py
2,721
python
es
code
0
github-code
21
[ { "api_name": "datetime.datetime.strptime", "line_number": 24, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 24, "usage_type": "name" }, { "api_name": "datetime.datetime.strptime", "line_number": 25, "usage_type": "call" }, { "api_name"...
42952279411
import logging import pathlib import h5py import sys from tqdm import trange sys.path.extend(['../../EarthScienceFaultDetection']) from src.DataPreprocessor.region_dataset import RegionDataset from src.DataPreprocessor.data_generator import DataGenerator import src.config def __generate_data_batch(data_generator, ...
danilkuzin/EarthScienceFaultDetection
src/pipeline/generate_data.py
generate_data.py
py
4,386
python
en
code
0
github-code
21
[ { "api_name": "sys.path.extend", "line_number": 9, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 9, "usage_type": "attribute" }, { "api_name": "src.DataPreprocessor.region_dataset.RegionDataset", "line_number": 35, "usage_type": "call" }, { "api...
29735136568
from django.http import HttpResponseRedirect from django.shortcuts import render from django.core.urlresolvers import reverse from django.contrib import messages from django.contrib.auth.models import User from django.template import RequestContext from django.utils import timezone from django.views.generic import List...
fildred13/hamagic
tourney/views.py
views.py
py
27,622
python
en
code
0
github-code
21
[ { "api_name": "django.views.generic.ListView", "line_number": 16, "usage_type": "name" }, { "api_name": "tourney.models.Tourney.objects.filter", "line_number": 18, "usage_type": "call" }, { "api_name": "tourney.models.Tourney.objects", "line_number": 18, "usage_type": "at...
23854269417
################################################################################################################################ ## ## ## start program: data_prep_for_RF__genes.py ...
victorkleb/scRNAseq_cluster_RF_proximities
example_programs/data_prep_for_RF__genes.py
data_prep_for_RF__genes.py
py
3,640
python
de
code
6
github-code
21
[ { "api_name": "sys.path.append", "line_number": 21, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 21, "usage_type": "attribute" }, { "api_name": "pandas.options", "line_number": 28, "usage_type": "attribute" }, { "api_name": "pandas.set_option",...
19040084104
from django.shortcuts import render, redirect from .models import Employee from.forms import Employee_form def Employee_load(request): if request.method == 'GET': form_list = Employee.objects.all() emp_dict = { 'form_list' : form_list } return render(request,'employee_ap...
vjvijaykumarvj/company_project
EMS_root/employee_apply/views.py
views.py
py
1,567
python
en
code
0
github-code
21
[ { "api_name": "models.Employee.objects.all", "line_number": 7, "usage_type": "call" }, { "api_name": "models.Employee.objects", "line_number": 7, "usage_type": "attribute" }, { "api_name": "models.Employee", "line_number": 7, "usage_type": "name" }, { "api_name": ...
10639983271
from datetime import datetime from playsound import playsound while True: alarm_time = input("Enter the time of alarm to be set:HH:MM:SS:am/pm \n") try: alarm_hour=int(alarm_time[0:2]) alarm_minute=int(alarm_time[3:5]) alarm_seconds=int(alarm_time[6:8]) alarm_period = ...
Praveena-Narala/Python-Practice
Alarm Clock.py
Alarm Clock.py
py
1,336
python
en
code
0
github-code
21
[ { "api_name": "datetime.datetime.now", "line_number": 23, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 23, "usage_type": "name" }, { "api_name": "playsound.playsound", "line_number": 33, "usage_type": "call" } ]
3263726376
from konlpy.tag import Okt import json import os from pprint import pprint import nltk import matplotlib.pyplot as plt from matplotlib import font_manager,rc import numpy as np def read_train_data(filename): with open(filename,'r') as f: data = [line.split(' ',maxsplit=1) for line in f.read().splitlines()]...
wwjdtm/movie_-sentiment_analysis
tokenizing.py
tokenizing.py
py
1,881
python
en
code
0
github-code
21
[ { "api_name": "konlpy.tag.Okt", "line_number": 26, "usage_type": "call" }, { "api_name": "pprint.pprint", "line_number": 47, "usage_type": "call" }, { "api_name": "nltk.Text", "line_number": 51, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.rc", "li...
33850890547
from flask import Flask, jsonify from flask import abort from flask import make_response from flask import request app = Flask(__name__) tasks = [ { 'id': 1, 'title': u'Honda', 'description': u'CBF190', 'done': False }, { 'id': 1, 'title': u'Honda', '...
Trisaa/wanwan_api
class_first/jikexueyuan/flask/rest.py
rest.py
py
1,317
python
en
code
0
github-code
21
[ { "api_name": "flask.Flask", "line_number": 6, "usage_type": "call" }, { "api_name": "flask.jsonify", "line_number": 26, "usage_type": "call" }, { "api_name": "flask.abort", "line_number": 34, "usage_type": "call" }, { "api_name": "flask.jsonify", "line_number...
31241014793
from pymorphy2 import MorphAnalyzer import re def get_pos(word): if re.search('[^А-Яа-яЁё-]', word): return None else: ana = morph.parse(word) pos = [ana[0].tag.POS, ana[0].normal_form] if 'перемес' in word: print(word) print(pos) return pos def save_dictionaries(dicts): for d in dicts: lines =...
ustya-k/hse-python
2 курс/inflection-bot/create_dictionaries.py
create_dictionaries.py
py
1,502
python
en
code
0
github-code
21
[ { "api_name": "re.search", "line_number": 6, "usage_type": "call" }, { "api_name": "pymorphy2.MorphAnalyzer", "line_number": 48, "usage_type": "call" } ]
71395825334
""" Set of programs to read and interact with output from Bifrost """ import numpy as np import os from glob import glob from . import cstagger import numba import scipy as sp from multiprocessing.dummy import Pool as ThreadPool import time class BifrostData(object): """ Reads data from Bifrost simulations i...
Cbaharav/carmel_updates
obsoleteFiles/bifrost.py
bifrost.py
py
68,998
python
en
code
0
github-code
21
[ { "api_name": "os.path.join", "line_number": 70, "usage_type": "call" }, { "api_name": "os.path", "line_number": 70, "usage_type": "attribute" }, { "api_name": "glob.glob", "line_number": 120, "usage_type": "call" }, { "api_name": "glob.glob", "line_number": 1...
1721000529
from django.contrib import admin from tasks.models import Category @admin.register(Category) class CategoryAdmin(admin.ModelAdmin): list_display = ( "id", "name", "color", "user", ) ordering = ("-id",) list_filter = ( "name", "color", ) search...
lsstomas/taskify
categories/admin.py
admin.py
py
528
python
en
code
0
github-code
21
[ { "api_name": "django.contrib.admin.ModelAdmin", "line_number": 6, "usage_type": "attribute" }, { "api_name": "django.contrib.admin", "line_number": 6, "usage_type": "name" }, { "api_name": "django.contrib.admin.register", "line_number": 5, "usage_type": "call" }, { ...
15289960311
""" read_spec.py : python version of Roman's read_spec.m Note: ---- we can add more read_spec functions for different datasets. """ from typing import Tuple from urllib import request import numpy as np from astropy.io import fits file_loader = lambda plate, mjd, fiber_id: "spec-{:d}-{:d}-{:04d}.fits".format( p...
jibanCat/gpy_dla_detection
gpy_dla_detection/read_spec.py
read_spec.py
py
5,276
python
en
code
2
github-code
21
[ { "api_name": "astropy.io.fits.open", "line_number": 37, "usage_type": "call" }, { "api_name": "astropy.io.fits", "line_number": 37, "usage_type": "name" }, { "api_name": "numpy.zeros", "line_number": 60, "usage_type": "call" }, { "api_name": "numpy.nan", "lin...
7367504200
from political_sisterhood.candidate.models import Candidate, College from political_sisterhood.issue.models import Issue, CandidateIssue import pandas as pd import os import logging import csv logger = logging.getLogger(__name__) ROOT_DIR = os.path.dirname(os.path.abspath(__file__)) def run(): data = pd.read_csv(...
2019politicalsisterhood/2019Candidates
scripts/candidate.py
candidate.py
py
1,136
python
en
code
1
github-code
21
[ { "api_name": "logging.getLogger", "line_number": 7, "usage_type": "call" }, { "api_name": "os.path.dirname", "line_number": 9, "usage_type": "call" }, { "api_name": "os.path", "line_number": 9, "usage_type": "attribute" }, { "api_name": "os.path.abspath", "li...
71173833974
#!/usr/bin/env python ''' Author: Curtis Hiscock A Bit-Plane Complexity Segmentation program based on an undergraduate research project at the University of Florida Based on 'Principle of BPCS-Steganography by Eiji Kawguchi and Richard Eason' More Info: http://datahide.org/BPCSe/principle-e.html ''' import sys sys.pa...
CurtisSHiscock/Bit-Plane-Complexity-Segmentation-Steganography
bpcs.py
bpcs.py
py
1,631
python
en
code
2
github-code
21
[ { "api_name": "sys.path.insert", "line_number": 11, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 11, "usage_type": "attribute" }, { "api_name": "argparse.ArgumentParser", "line_number": 17, "usage_type": "call" }, { "api_name": "encode.Encoder"...
29124783722
import json import openai import re import language_tool_python import os from torchtext.data.utils import get_tokenizer #defining constants based on app.config with open(os.getcwd() + "\\app.config") as settings_file: appSettings = json.load(settings_file) TRAINING_FILE_PATH = os.path.abspath(appSettings...
WilliamClarke2/YouthfullyInternship
Ascribe/generateData.py
generateData.py
py
3,094
python
en
code
0
github-code
21
[ { "api_name": "os.getcwd", "line_number": 9, "usage_type": "call" }, { "api_name": "json.load", "line_number": 10, "usage_type": "call" }, { "api_name": "os.path.abspath", "line_number": 11, "usage_type": "call" }, { "api_name": "os.path", "line_number": 11, ...
34905663578
import sqlite3 def load_data(): data = [] with sqlite3.connect("/home/teuffenm/Desktop/waage/weight_20210217") as db: cursor = db.cursor() cursor.execute("SELECT * FROM scaleMeasurements") db_data = cursor.fetchall() for row in db_data: data.append(row) import...
MaTeuff/weather-analysis
files/load_data.py
load_data.py
py
1,178
python
en
code
0
github-code
21
[ { "api_name": "sqlite3.connect", "line_number": 6, "usage_type": "call" }, { "api_name": "numpy.asarray", "line_number": 18, "usage_type": "call" }, { "api_name": "numpy.int32", "line_number": 21, "usage_type": "call" }, { "api_name": "numpy.asarray", "line_nu...
2900821071
from bs4 import BeautifulSoup import requests, sys, re, os, json from urllib.parse import quote from multiprocessing import Pool, freeze_support, cpu_count sys.setrecursionlimit(1000000) def ImageBuilder(ID, headers, image_headers, cache_path): URL = 'https://www.pixiv.net/member_illust.php?mode=medium&illust_id='...
frcskoh/PixivApp
stream.py
stream.py
py
4,485
python
en
code
0
github-code
21
[ { "api_name": "sys.setrecursionlimit", "line_number": 5, "usage_type": "call" }, { "api_name": "requests.Session", "line_number": 9, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_number": 10, "usage_type": "call" }, { "api_name": "os.path.join",...