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
43187154033
''' Created on June 3, 2021 Implementation of crawling the graph information of a certain fund portfolio @author: jasonzheng (jasonccvx@outlook.com) @version: 0.3.2 ''' import requests import json import matplotlib.pyplot as plt import time def get_json_of_graph_info(code): """ get the json string of the com...
jasonccvx/big-v
crawling/v_details_graph.py
v_details_graph.py
py
4,484
python
en
code
0
github-code
18
[ { "api_name": "requests.post", "line_number": 63, "usage_type": "call" }, { "api_name": "json.loads", "line_number": 74, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.figure", "line_number": 97, "usage_type": "call" }, { "api_name": "matplotlib.pyplot",...
74846508201
from init import db from flask import Blueprint, request from models.format import Format, format_schema, formats_schema from flask_jwt_extended import get_jwt_identity, jwt_required from controllers.book_controller import authorise_admin formats_bp = Blueprint('formats', __name__, url_prefix='/formats') @formats_bp....
zakaryjs/CA-T2A2-Webserver_API
controllers/format_controller.py
format_controller.py
py
3,069
python
en
code
0
github-code
18
[ { "api_name": "flask.Blueprint", "line_number": 7, "usage_type": "call" }, { "api_name": "init.db.select", "line_number": 12, "usage_type": "call" }, { "api_name": "models.format.Format", "line_number": 12, "usage_type": "argument" }, { "api_name": "init.db", ...
71813889320
#!/usr/bin/python3 # -*-coding:UTF-8-*- import time import argparse import pickle from model import * from utils import * from torch.utils.data import DataLoader import logging import torch import os from tqdm import tqdm import datetime import numpy as np import random from os.path import join # CUDA_VISIBLE_DEVICES=1...
cyq002/ITR-GNN
generate_high_confidence_data.py
generate_high_confidence_data.py
py
4,977
python
en
code
0
github-code
18
[ { "api_name": "time.time", "line_number": 23, "usage_type": "call" }, { "api_name": "numpy.random.seed", "line_number": 24, "usage_type": "call" }, { "api_name": "numpy.random", "line_number": 24, "usage_type": "attribute" }, { "api_name": "random.seed", "line...
17640202590
import hashlib import asyncio from . import message from . import error from . import interfaces from . import numbers def hashing_etag(request, response): """Helper function for render_get handlers that allows them to use ETags based on the payload's hash value Run this on your request and response befo...
ric1234/intelligent_refrigerator
userRpi/aiocoap/aiocoap/resource.py
resource.py
py
10,899
python
en
code
2
github-code
18
[ { "api_name": "hashlib.sha1", "line_number": 37, "usage_type": "call" }, { "api_name": "asyncio.coroutine", "line_number": 67, "usage_type": "attribute" }, { "api_name": "asyncio.coroutine", "line_number": 71, "usage_type": "attribute" }, { "api_name": "asyncio.co...
3306505237
from pathlib import Path current_wd = Path(__file__).resolve() current_wd = current_wd.parent.parent raw_data_path = current_wd / 'data/raw/SBAnational.csv' split_dir = current_wd / 'data' / 'split' split_train = split_dir / 'train_df.csv' split_test = split_dir / 'test_df.csv' split_test_y_true = split_dir / 'tes...
patrick-potocny/loan_prediction
loan_prediction/config.py
config.py
py
535
python
en
code
0
github-code
18
[ { "api_name": "pathlib.Path", "line_number": 3, "usage_type": "call" } ]
35619807603
import numpy as np from sklearn.neighbors import KDTree, KNeighborsClassifier class TrustScore: """ Trust Score: a measure of classifier uncertainty based on nearest neighbors. """ def __init__(self, k=10, alpha=0.0, filtering="none", min_dist=1e-12): """ k and alpha are the tuning para...
google/TrustScore
trustscore/trustscore.py
trustscore.py
py
4,341
python
en
code
169
github-code
18
[ { "api_name": "numpy.array", "line_number": 22, "usage_type": "attribute" }, { "api_name": "sklearn.neighbors.KDTree", "line_number": 32, "usage_type": "call" }, { "api_name": "numpy.percentile", "line_number": 34, "usage_type": "call" }, { "api_name": "numpy.wher...
71131048359
import numpy as np import pandas as pd import matplotlib.pyplot as plt from sklearn.decomposition import PCA data = pd.read_csv('1KGP.txt', delimiter=' ',header=None) Y = data.iloc[:,3:] labels = data.iloc[:,1].unique() colors = ['b','g','r','c','m','y','k'] modes = Y.mode().iloc[0] Y = (Y!=modes).astype(int) pca = P...
fardinayar/SPR
HW4/4/f.py
f.py
py
446
python
en
code
0
github-code
18
[ { "api_name": "pandas.read_csv", "line_number": 6, "usage_type": "call" }, { "api_name": "sklearn.decomposition.PCA", "line_number": 13, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.scatter", "line_number": 16, "usage_type": "call" }, { "api_name": "ma...
73297841639
""" plots excel file uncertanties """ import pandas as pd import matplotlib.pyplot as plt import numpy as np from matplotlib.pyplot import figure figure(figsize=(10,5)) data=pd.read_csv("/Users/kiern/OneDrive/Desktop/JAM22_PY.csv ") plt.xlabel("Bin Number #",fontsize=14) plt.ylabel("",fontsize=14) plt.plo...
mnycz/Spring_2022_SULI
CSV_Plot.py
CSV_Plot.py
py
1,003
python
en
code
0
github-code
18
[ { "api_name": "matplotlib.pyplot.figure", "line_number": 9, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 10, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.xlabel", "line_number": 11, "usage_type": "call" }, { "api_name": "matp...
73871845800
from rest_framework import serializers from service.models.wedding_hall import Menu, MenuItem, WeddingHall class MenuItemSerializers(serializers.ModelSerializer): class Meta: model = MenuItem fields = ("name", "menu_id") class MenuSerializers(serializers.ModelSerializer): menu_items = MenuI...
yusuf88811/afarmilena
service/serializers/wedding_hall_serializers.py
wedding_hall_serializers.py
py
4,134
python
en
code
0
github-code
18
[ { "api_name": "rest_framework.serializers.ModelSerializer", "line_number": 6, "usage_type": "attribute" }, { "api_name": "rest_framework.serializers", "line_number": 6, "usage_type": "name" }, { "api_name": "service.models.wedding_hall.MenuItem", "line_number": 8, "usage_...
9772073637
import torch import torch.nn.functional as F import matplotlib.pyplot as plt import copy import nn import shuffler class NNTrainer: def __init__(self, num_epochs, learning_rate, loss_function): self.epochs = num_epochs self.lr = learning_rate self.loss_func = loss_function def proces...
JunkyLove/Project_1
trainer.py
trainer.py
py
2,991
python
en
code
0
github-code
18
[ { "api_name": "copy.deepcopy", "line_number": 17, "usage_type": "call" }, { "api_name": "torch.optim.Adam", "line_number": 24, "usage_type": "call" }, { "api_name": "torch.optim", "line_number": 24, "usage_type": "attribute" }, { "api_name": "shuffler.x_y_shuffler...
44174168828
from typing import Callable import numpy as np import copy from functools import reduce from configargparse import ArgumentParser from random import randint from datetime import datetime, timedelta from board import Board from solver import State def main(): options = [ argument( '--file', ...
SteveDraper/sudoku_gen
python/solve.py
solve.py
py
3,585
python
en
code
0
github-code
18
[ { "api_name": "functools.reduce", "line_number": 24, "usage_type": "call" }, { "api_name": "configargparse.ArgumentParser", "line_number": 24, "usage_type": "call" }, { "api_name": "board.Board", "line_number": 45, "usage_type": "call" }, { "api_name": "board.cell...
13040730222
"""I/O module. This module creates a File class that can fetch data and/or plot data. Available classes are one of following: File: MCPDataFile; TESConfigFile; SPECParamFile; ScanFileAPS29; SCanFileSSRL13. """ __author__ = "Yizhi Fang" __version__ = "2017.07.05" import re from os.path import joi...
Yizhi-Fang/data_analysis
file_loader.py
file_loader.py
py
14,195
python
en
code
0
github-code
18
[ { "api_name": "abc.ABCMeta", "line_number": 37, "usage_type": "name" }, { "api_name": "os.path.join", "line_number": 57, "usage_type": "call" }, { "api_name": "re.search", "line_number": 60, "usage_type": "call" }, { "api_name": "re.search", "line_number": 62,...
41642897835
from typing import Tuple, Any, List import pandas as pd from sklearn.feature_selection import SelectKBest, f_regression # vanilla feature selection def select_features( x_train: pd.DataFrame, y_train: pd.DataFrame, x_test: pd.DataFrame, k: Any = "all" ) -> Tuple[pd.DataFrame, pd.DataFrame]: # con...
AlexCawl/DataAnalysisLabs
labs/lab_3/util/regression.py
regression.py
py
1,184
python
en
code
0
github-code
18
[ { "api_name": "pandas.DataFrame", "line_number": 9, "usage_type": "attribute" }, { "api_name": "pandas.DataFrame", "line_number": 10, "usage_type": "attribute" }, { "api_name": "typing.Any", "line_number": 10, "usage_type": "name" }, { "api_name": "sklearn.feature...
26507182432
import pandas as pd import json dataset_path = "../data/accountData.json" #transform json to dataframe def transform_json_to_dataframe(dataset_path): with open(dataset_path) as json_file: data = json.load(json_file) dataset = pd.DataFrame(data) return dataset data = transform_json_to_datafram...
soundbond-team/bond
scripts/cleaning_data.py
cleaning_data.py
py
943
python
en
code
0
github-code
18
[ { "api_name": "json.load", "line_number": 9, "usage_type": "call" }, { "api_name": "pandas.DataFrame", "line_number": 10, "usage_type": "call" } ]
18031309683
from django import forms from library.models import Book from django.forms import NumberInput # LOCATION_CHOICES = [ # ('MG_ROAD', 'MG Road'), # ('Karkhana', 'Karkhana'), # ('Hitech_City', 'Hi-Tech City'), # ] # ISSUE_CHOICES = [ # ('available', 'Available'), # ('issued', 'Issued')...
mayank-gubba/capstone_library_managment_system
crud_project/library/forms.py
forms.py
py
993
python
en
code
0
github-code
18
[ { "api_name": "django.forms.ModelForm", "line_number": 18, "usage_type": "attribute" }, { "api_name": "django.forms", "line_number": 18, "usage_type": "name" }, { "api_name": "django.forms.MultipleChoiceField", "line_number": 29, "usage_type": "call" }, { "api_nam...
15485248896
import requests, os, logging from datetime import date from urllib.parse import urlparse def download_csv(): url = urlConstrutor() try: headers = { 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36'} ...
santhosh6328/bhavcopy
bhavcopy/bhavcopy/app/downloader.py
downloader.py
py
1,315
python
en
code
1
github-code
18
[ { "api_name": "requests.get", "line_number": 11, "usage_type": "call" }, { "api_name": "urllib.parse.urlparse", "line_number": 15, "usage_type": "call" }, { "api_name": "os.path.basename", "line_number": 16, "usage_type": "call" }, { "api_name": "os.path", "li...
7245964577
#!/usr/bin/env python3 #By Marcus Chan #Last Updated 2020-08-20 #Required Libraries: psycopg2 #Purpose:To create a conviennient wrapper for psycopg2 and create a few other functions to interact with observing things # from the database import psycopg2 class db_interactions: """ This class will be ...
MKC-testcase/stock_extract
db_operations/PostgreSQL_analysis.py
PostgreSQL_analysis.py
py
4,819
python
en
code
0
github-code
18
[ { "api_name": "psycopg2.connect", "line_number": 15, "usage_type": "call" }, { "api_name": "psycopg2.connect", "line_number": 99, "usage_type": "call" } ]
26952840019
import abc from pathlib import Path from typing import Dict, List, Optional, Union import numpy as np import pandas as pd from brainstat.stats.SLM import SLM from brainstat.stats.terms import FixedEffect from nilearn.surface import Mesh from clinica.utils.stream import cprint from ._contrast import Contrast from ._u...
aramis-lab/clinica
clinica/pipelines/statistics_surface/surfstat/models/_base.py
_base.py
py
7,598
python
en
code
196
github-code
18
[ { "api_name": "pandas.DataFrame", "line_number": 64, "usage_type": "attribute" }, { "api_name": "typing.Optional", "line_number": 67, "usage_type": "name" }, { "api_name": "typing.Optional", "line_number": 68, "usage_type": "name" }, { "api_name": "typing.Optional...
74595230120
import torch from torch import nn import torch.nn.functional as F import errno import hashlib import os import warnings import re import shutil import sys import tempfile from tqdm import tqdm from urllib.request import urlopen from urllib.parse import urlparse # noqa: F401 def _download_url_to_file(url, dst, hash_p...
CanPeng123/FSCIL_ALICE
alice/model/model_factory.py
model_factory.py
py
9,251
python
en
code
22
github-code
18
[ { "api_name": "urllib.request.urlopen", "line_number": 19, "usage_type": "call" }, { "api_name": "os.path.dirname", "line_number": 31, "usage_type": "call" }, { "api_name": "os.path", "line_number": 31, "usage_type": "attribute" }, { "api_name": "tempfile.NamedTem...
23530078640
from collections import deque from htm.bindings.regions.PyRegion import PyRegion from .import extractList, asBool class RawValues(PyRegion): """ RawValues is a simple region used to send raw scalar values into networks. It accepts data using the command 'addDataToQueue' or through the function addDa...
jgab3103/Jamie-Gabriel
Archived/Notebooks/jovyan/.local/lib/python3.8/site-packages/htm.core-2.1.15-py3.8-linux-x86_64.egg/htm/advanced/regions/RawValues.py
RawValues.py
py
3,547
python
en
code
2
github-code
18
[ { "api_name": "htm.bindings.regions.PyRegion.PyRegion", "line_number": 7, "usage_type": "name" }, { "api_name": "collections.deque", "line_number": 20, "usage_type": "call" } ]
4526616769
import sys import gurobipy as gp from gurobipy import GRB import networkx as nx import numpy as np import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import math import csv import pandas as pd import time """ Parameters: G - edge list of original graph; dtype r - root node size - num...
dominicflocco/Graph_Pebbling
py/tree_opt_sym.py
tree_opt_sym.py
py
12,572
python
en
code
0
github-code
18
[ { "api_name": "matplotlib.use", "line_number": 7, "usage_type": "call" }, { "api_name": "gurobipy.Model", "line_number": 51, "usage_type": "call" }, { "api_name": "gurobipy.GRB.Param", "line_number": 52, "usage_type": "attribute" }, { "api_name": "gurobipy.GRB", ...
73250170600
# -*- coding: utf-8 -*- """ seen plugin: Traks user sightings in MUC. """ __author__ = "Petr Morávek (xificurk@gmail.com)" __copyright__ = ["Copyright (C) 2007 Kevin Smith", "Copyright (C) 2009-2011 Petr Morávek"] __license__ = "GPL 3.0" __version__ = "0.5.0" import logging import time log = logg...
xificurk/keelsbot
plugins/seen.py
seen.py
py
6,357
python
en
code
4
github-code
18
[ { "api_name": "logging.getLogger", "line_number": 18, "usage_type": "call" }, { "api_name": "time.time", "line_number": 66, "usage_type": "call" }, { "api_name": "time.time", "line_number": 73, "usage_type": "call" }, { "api_name": "time.time", "line_number": ...
41953315758
from keras.models import Sequential, load_model from keras.layers.core import Dense, Dropout, Flatten from keras.layers.advanced_activations import LeakyReLU from keras.layers.convolutional import Conv2D from keras.preprocessing.image import ImageDataGenerator from keras.layers.pooling import MaxPooling2D from ke...
baptistepouthier/plancton
CNN/CNN.py
CNN.py
py
5,686
python
en
code
0
github-code
18
[ { "api_name": "keras.models.Sequential", "line_number": 31, "usage_type": "call" }, { "api_name": "keras.layers.convolutional.Conv2D", "line_number": 33, "usage_type": "call" }, { "api_name": "keras.layers.advanced_activations.LeakyReLU", "line_number": 35, "usage_type": ...
32580158614
import os from sqlalchemy import Column, Integer, MetaData, String, Table, create_engine from databases import Database DATABASE_URI = os.getenv("DATABASE_URI") engine = create_engine(DATABASE_URI) metadata = MetaData() authors = Table( "authors", metadata, Column("id", Integer, primary_key=True), Co...
Plaoo/library-microservices-example
author-service/app/api/db.py
db.py
py
538
python
en
code
3
github-code
18
[ { "api_name": "os.getenv", "line_number": 5, "usage_type": "call" }, { "api_name": "sqlalchemy.create_engine", "line_number": 7, "usage_type": "call" }, { "api_name": "sqlalchemy.MetaData", "line_number": 8, "usage_type": "call" }, { "api_name": "sqlalchemy.Table"...
43397689648
import requests from pprint import pprint import json token = '10796cf210796cf210796cf2b9100a74631107910796cf24f6a15c243a53fbe860107c9' version = 5.92 domain = 'aquataz' response = requests.get('https://api.vk.com/method/wall.get', params={ 'access_token' : token, ...
AntonSlivaev/Data_parsing
lesson_1/2_task.py
2_task.py
py
610
python
en
code
0
github-code
18
[ { "api_name": "requests.get", "line_number": 9, "usage_type": "call" }, { "api_name": "pprint.pprint", "line_number": 17, "usage_type": "call" }, { "api_name": "json.dump", "line_number": 20, "usage_type": "call" } ]
4162748545
import numpy as np import numpy.random as npr import matplotlib.pyplot as plt from sklearn.datasets import make_blobs from sklearn.datasets import make_moons from matplotlib.patches import Ellipse from sklearn.mixture import GaussianMixture #source: https://github.com/UBC-CS/cpsc340/blob/master/lectures/L8demo.ipynb d...
MohamedAbdelsalam9/CIE417
Tutorials/Lab8_Clustering/lab8_functions.py
lab8_functions.py
py
2,952
python
en
code
0
github-code
18
[ { "api_name": "numpy.any", "line_number": 12, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.scatter", "line_number": 13, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 13, "usage_type": "name" }, { "api_name": "numpy.any", ...
39904670945
import streamlit as st import pandas as pd import numpy as np st.set_page_config(layout="wide") st.title("Experiment Results using One-class SVM and Gaussian Mixture Model \ from Scikit-learn") select_slide = st.sidebar.selectbox( "Which slide would you like to navigate to?", ("One-class SVM", "Gaussian...
C190194/Streamlit_W7_OCSVM_GMM
slides.py
slides.py
py
2,893
python
en
code
0
github-code
18
[ { "api_name": "streamlit.set_page_config", "line_number": 5, "usage_type": "call" }, { "api_name": "streamlit.title", "line_number": 7, "usage_type": "call" }, { "api_name": "streamlit.sidebar.selectbox", "line_number": 10, "usage_type": "call" }, { "api_name": "s...
27542888829
#第 0014 题: 纯文本文件 student.txt为学生信息, 里面的内容(包括花括号)如下所示: #{ # "1":["张三",150,120,100], # "2":["李四",90,99,95], # "3":["王五",60,66,68] #} #请将上述内容写到 student.xls 文件中,如下图所示: import pandas as pd import json import win32api filepath = "data/Student.txt" f = open(filepath) s = f.read() s = json.loads(s) df = pd.DataFrame(s) df = df....
ga0404/python_project
ex_0014/ex_0014.py
ex_0014.py
py
562
python
zh
code
0
github-code
18
[ { "api_name": "json.loads", "line_number": 14, "usage_type": "call" }, { "api_name": "pandas.DataFrame", "line_number": 15, "usage_type": "call" }, { "api_name": "win32api.ShellExecute", "line_number": 18, "usage_type": "call" } ]
29681019110
from bs4 import BeautifulSoup import re import sys # Check if the start of a post claims it is reserved, then remove that line. def joinPosts(posts): return '<br>'.join([str(tag) for tag in posts]) args = sys.argv html_doc = open(args[1],'rb') text = html_doc.read().decode(errors='replace') text.replace('\uFFFD',...
MarkovChainmail/dnd_3.5_library
scripts/bgparser.py
bgparser.py
py
498
python
en
code
0
github-code
18
[ { "api_name": "sys.argv", "line_number": 9, "usage_type": "attribute" }, { "api_name": "bs4.BeautifulSoup", "line_number": 13, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_number": 16, "usage_type": "call" } ]
27930009415
import collections import sys input = sys.stdin.readline #sys.stdin = open('./input.txt') n, m = map(int, input().split()) num_to_pokemon = collections.defaultdict(str) pokemon_to_num = collections.defaultdict(int) for i in range(1, n + 1): input_pokemon = input().strip() num_to_pokemon[i] = input_poke...
Yuha0123/Algorithm
BOJ/1620.py
1620.py
py
544
python
en
code
0
github-code
18
[ { "api_name": "sys.stdin", "line_number": 4, "usage_type": "attribute" }, { "api_name": "collections.defaultdict", "line_number": 9, "usage_type": "call" }, { "api_name": "collections.defaultdict", "line_number": 10, "usage_type": "call" } ]
15317263848
from collections import deque di = [0,0,1,-1,1,-1,1,-1] dj = [1,-1,0,0,1,-1,-1,1] n, m = map(int,input().split()) a = [list(map(int,input().split())) for _ in range(n)] def solve(x,y): d = [[-1] * m for _ in range(n)] d[x][y] = 0 q = deque() q.append((x,y)) while q: i, j = q.popleft() ...
cldud400/python-coding-test
문제풀이/17086.py
17086.py
py
819
python
en
code
0
github-code
18
[ { "api_name": "collections.deque", "line_number": 11, "usage_type": "call" } ]
33089612264
from __future__ import absolute_import, print_function from django.core import mail from sentry.models import AuthProvider, OrganizationMember from sentry.testutils import TestCase from sentry.tasks.auth import email_missing_links, email_unlink_notifications class EmailMissingLinksTest(TestCase): def setUp(self...
fictional-tribble-2/getsentry--sentry
tests/sentry/tasks/test_auth.py
test_auth.py
py
1,545
python
en
code
1
github-code
18
[ { "api_name": "sentry.testutils.TestCase", "line_number": 10, "usage_type": "name" }, { "api_name": "sentry.models.AuthProvider.objects.create", "line_number": 15, "usage_type": "call" }, { "api_name": "sentry.models.AuthProvider.objects", "line_number": 15, "usage_type":...
72998975720
# -*- coding: utf-8 -*- import os import warnings from Marketingtool.common import path_leaf warnings.filterwarnings("ignore", message=".*The 'nopython' keyword.*") # warnings.simplefilter('ignore', category=NumbaDeprecationWarning) # warnings.simplefilter('ignore', category=NumbaPendingDeprecationWarning) import whis...
robertzengcn/Marketingtool
Marketingtool/modules/audioprocess.py
audioprocess.py
py
2,053
python
en
code
0
github-code
18
[ { "api_name": "warnings.filterwarnings", "line_number": 6, "usage_type": "call" }, { "api_name": "os.path.exists", "line_number": 20, "usage_type": "call" }, { "api_name": "os.path", "line_number": 20, "usage_type": "attribute" }, { "api_name": "os.path.isdir", ...
32639548531
import os.path import serial print(serial.__file__), import pyrebase from time import time, sleep from datetime import datetime config = { #firebase authentification "apiKey": "AIzaSyDEfkwr7Zl5WucXFluMxB8VIlngUnp7aDM", "authDomain": "smv-daq.firebaseapp.com", "databaseURL": "https://smv-daq.firebaseio.com...
Bruin-SuperMileage/EV
daq/panda/test/testScript.py
testScript.py
py
3,896
python
en
code
5
github-code
18
[ { "api_name": "serial.__file__", "line_number": 3, "usage_type": "attribute" }, { "api_name": "pyrebase.initialize_app", "line_number": 16, "usage_type": "call" }, { "api_name": "serial.Serial", "line_number": 29, "usage_type": "call" }, { "api_name": "time.time",...
15784565363
""" Created on Tue Jan 18 15:44:39 2022 Prepare depth-dependent in house sens. and spec. and EPI for cvessel detection (BOLD_mean.nii) @author: apizz """ import os import numpy as np import nibabel as nb import matplotlib.pyplot as plt STUDY_PATH = "D:\\Pilot_Exp_VASO\\pilotAOM" SUBJ = ['sub-02', 'sub-03', 'sub-04...
27-apizzuti/AOM-VASO_project
VASO_analysis/archive/layers_TO_REMOVE/metrics/3_compute_depth_in_house_metrics.py
3_compute_depth_in_house_metrics.py
py
3,504
python
en
code
2
github-code
18
[ { "api_name": "os.path.join", "line_number": 26, "usage_type": "call" }, { "api_name": "os.path", "line_number": 26, "usage_type": "attribute" }, { "api_name": "os.path.join", "line_number": 29, "usage_type": "call" }, { "api_name": "os.path", "line_number": 2...
5043884847
from django.shortcuts import render from django.http import HttpResponse from .models import Post posts = [ { 'author' : 'Jakub Kazimierski', 'title' : 'First post', 'content' : 'First tweet', 'date_posted' : 'January 28 2021', }, { 'author' : 'Jaku...
Sibusiso-Mgidi/PythonPortfolio
Django/Django_blog/blog/views.py
views.py
py
810
python
en
code
null
github-code
18
[ { "api_name": "models.Post.objects.all", "line_number": 30, "usage_type": "call" }, { "api_name": "models.Post.objects", "line_number": 30, "usage_type": "attribute" }, { "api_name": "models.Post", "line_number": 30, "usage_type": "name" }, { "api_name": "django.s...
36519668920
from random import choice, random, sample import numpy as np import networkx as nx from BanditAlg.BanditAlgorithms import ArmBaseStruct import datetime class LinUCBUserStruct: def __init__(self, featureDimension,lambda_, userID, RankoneInverse = False): self.userID = userID self.d = featureDimension self.A = la...
HCDM/BanditLib
OnlineInfluenceMaximization/BanditAlg/DILinUCB.py
DILinUCB.py
py
4,675
python
en
code
314
github-code
18
[ { "api_name": "numpy.identity", "line_number": 11, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_number": 12, "usage_type": "call" }, { "api_name": "numpy.linalg.inv", "line_number": 13, "usage_type": "call" }, { "api_name": "numpy.linalg", "line_...
14458050873
# Ahmed El Fekih # aelfekih # user interface + AI from tkinter import * from chess import Chess import random from tkinter import messagebox LIGHTCOLOR = '#feffed' ## GUI ## User interface test class mainMenu: def __init__(self): self.wnd = Tk() self.wnd.title('Chess Game') ...
ahmed-el-fekih/chess-game
GUI+AI.py
GUI+AI.py
py
19,677
python
en
code
0
github-code
18
[ { "api_name": "chess.Chess", "line_number": 42, "usage_type": "name" }, { "api_name": "chess.Chess.__init__", "line_number": 44, "usage_type": "call" }, { "api_name": "chess.Chess", "line_number": 44, "usage_type": "name" }, { "api_name": "random.randint", "li...
34663254189
import os import click import socket import time import ciphers, packet, mac from sealed_object import SealedObject from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes from cryptography.hazmat.primitives.serialization import load_der_private_key from cryptography.hazmat.backends import default_...
diogom93/ssre
tut8/client.py
client.py
py
3,128
python
en
code
1
github-code
18
[ { "api_name": "socket.socket", "line_number": 22, "usage_type": "call" }, { "api_name": "socket.AF_INET", "line_number": 22, "usage_type": "attribute" }, { "api_name": "socket.SOCK_STREAM", "line_number": 22, "usage_type": "attribute" }, { "api_name": "click.echo"...
70790249960
import cv2 import numpy as np from matplotlib import pyplot as plt from scipy.fftpack import dct, fft from skimage import color, data, restoration def gkern(l=5, sig=1.): """ creates gaussian kernel with side length l and a sigma of sig """ # código sacado de : https://stackoverflow.com/questions/29731...
fprebolledo/procesamiento-imagenes
T3/t3.py
t3.py
py
5,585
python
en
code
0
github-code
18
[ { "api_name": "numpy.linspace", "line_number": 12, "usage_type": "call" }, { "api_name": "numpy.meshgrid", "line_number": 13, "usage_type": "call" }, { "api_name": "numpy.exp", "line_number": 15, "usage_type": "call" }, { "api_name": "numpy.square", "line_numb...
13843404702
# -*- coding: utf-8 -*- import os import pickle import numpy as np import tempfile from cytomine_sldc import TileCache from sklearn.utils import check_random_state from sldc import PolygonClassifier, TileExtractionException, Loggable, SilentLogger, Logger __author__ = "Mormont Romain <romain.mormont@gmail.com>" __ve...
cytomine/Cytomine-python-datamining
cytomine-datamining/algorithms/sldc/examples/with_pyxit/pyxit_classifier.py
pyxit_classifier.py
py
5,219
python
en
code
20
github-code
18
[ { "api_name": "sldc.TileExtractionException", "line_number": 44, "usage_type": "name" }, { "api_name": "sldc.PolygonClassifier", "line_number": 49, "usage_type": "name" }, { "api_name": "sldc.Loggable", "line_number": 49, "usage_type": "name" }, { "api_name": "sld...
42569043137
import os import xlwt #定位到文件所在位置 a = os.getcwd() #获取当前目录 print (a) #打印当前目录 os.chdir('C:/Users/User/OneDrive/Miniature tripod/Test result/autocollimator drifting test') #定位到新的目录 a = os.getcwd() #获取定位之后的目录 print(a) #打印定位之后的目录 input='drifting_data' output='output' dataset='7' #读取目标txt文件里的内容,并且打印出来显示 #with open...
julis-wolala/TextdataHandler
measurement data analysis/measurement data analysis/measurement_data_analysis.py
measurement_data_analysis.py
py
2,151
python
zh
code
2
github-code
18
[ { "api_name": "os.getcwd", "line_number": 4, "usage_type": "call" }, { "api_name": "os.chdir", "line_number": 6, "usage_type": "call" }, { "api_name": "os.getcwd", "line_number": 7, "usage_type": "call" }, { "api_name": "xlwt.Workbook", "line_number": 25, ...
71729218281
from uuid import uuid4 from .mtom_attachment import MtomAttachment from .soap_envelope import SoapEnvelope class XopPackage: def __init__(self, soap_env: SoapEnvelope, files: list[MtomAttachment]) -> None: """Represents the XOP package that is sent as the request body. Args: soap_env...
Gebrel07/pymtom-xop
pymtom_xop/xop_package.py
xop_package.py
py
1,297
python
en
code
0
github-code
18
[ { "api_name": "soap_envelope.SoapEnvelope", "line_number": 8, "usage_type": "name" }, { "api_name": "mtom_attachment.MtomAttachment", "line_number": 8, "usage_type": "name" }, { "api_name": "soap_envelope.SoapEnvelope", "line_number": 15, "usage_type": "name" }, { ...
72655123559
from flask import url_for from pytest import mark FAV_URLS = ("/favicon.png", "/favicon.ico", "/logo.png") @mark.usefixtures("ctx_app") def test_favicon_url(): assert url_for("side.favicon") == FAV_URLS[0] assert url_for("side.logo") == FAV_URLS[-1] def test_favicon_content(client): org = client.get(ur...
spookey/shorter
tests/views/test_side_favicon.py
test_side_favicon.py
py
610
python
en
code
1
github-code
18
[ { "api_name": "flask.url_for", "line_number": 9, "usage_type": "call" }, { "api_name": "flask.url_for", "line_number": 10, "usage_type": "call" }, { "api_name": "pytest.mark.usefixtures", "line_number": 7, "usage_type": "call" }, { "api_name": "pytest.mark", "...
72427094119
from fastapi import FastAPI from fastapi.middleware.cors import CORSMiddleware from .routers import upload_videos, ml_out, download_files from fastapi.staticfiles import StaticFiles from .utils import * app = FastAPI() make_local_dirs("uploads") make_local_dirs("summarized") make_local_dirs("summarized/uploads") make...
anitoanto/alus-package
alus-backend/server/app.py
app.py
py
805
python
en
code
4
github-code
18
[ { "api_name": "fastapi.FastAPI", "line_number": 7, "usage_type": "call" }, { "api_name": "fastapi.middleware.cors.CORSMiddleware", "line_number": 15, "usage_type": "argument" }, { "api_name": "routers.upload_videos.router", "line_number": 22, "usage_type": "attribute" }...
40563634860
# -*- coding: utf-8 -*- """ Created on Thu Oct 29 00:40:22 2020 @author: lenovo """ import unittest from HTMLTestRunner import HTMLTestRunner import time import yagmail #把测试报告作为附件发送到指定邮箱 def send_mail(report): yag=yagmail.SMTP(user="wl15176128570@126.com", password="HGDFAIMHMWDKQYWJ", ...
wangli-wangli/python-test
htmlReport/run_tests.py
run_tests.py
py
1,179
python
en
code
0
github-code
18
[ { "api_name": "yagmail.SMTP", "line_number": 15, "usage_type": "call" }, { "api_name": "unittest.defaultTestLoader.discover", "line_number": 27, "usage_type": "call" }, { "api_name": "unittest.defaultTestLoader", "line_number": 27, "usage_type": "attribute" }, { "...
34614621754
from django.db.models import Count, Min, Sum from datetime import datetime from . import exceptions from wallet.models import AccountEntry def get_account_balance(account_id): debits = AccountEntry.objects.filter( account__id=account_id, transaction__transaction_type="debit" ).values('amount'...
ianbwana/walletcore
wallet/utils.py
utils.py
py
900
python
en
code
0
github-code
18
[ { "api_name": "wallet.models.AccountEntry.objects.filter", "line_number": 9, "usage_type": "call" }, { "api_name": "wallet.models.AccountEntry.objects", "line_number": 9, "usage_type": "attribute" }, { "api_name": "wallet.models.AccountEntry", "line_number": 9, "usage_typ...
16342404111
from . import views from django.urls import path urlpatterns = [ path('home/', views.home, name="home"), path("hotels/", views.getListOfHotels, name="getListOfHotels"), path("reserve/", views.reservationConfirmation, name="reservationConfirmation"), path("hotel_list/<str:pk>", views.Hotels_detail, nam...
A00453840/A00453840_5550
BookMyRoom/BookMyRoomApp/urls.py
urls.py
py
339
python
en
code
0
github-code
18
[ { "api_name": "django.urls.path", "line_number": 6, "usage_type": "call" }, { "api_name": "django.urls.path", "line_number": 7, "usage_type": "call" }, { "api_name": "django.urls.path", "line_number": 8, "usage_type": "call" }, { "api_name": "django.urls.path", ...
42770042703
import bpy from . import overScan from . import tiltshift from . import draw_ui # ----------------------------------------------------------------------------- # 登録クラス名のリスト classes = ( tiltshift.QANIM_OT_tiltshift_vertical_auto_detection, tiltshift.QANIM_OT_tiltshift_horizontal_auto_detection, overScan....
Project-StudioQ/camera_extends
camera.py
camera.py
py
845
python
en
code
2
github-code
18
[ { "api_name": "bpy.utils.register_class", "line_number": 24, "usage_type": "call" }, { "api_name": "bpy.utils", "line_number": 24, "usage_type": "attribute" }, { "api_name": "bpy.utils.unregister_class", "line_number": 34, "usage_type": "call" }, { "api_name": "bp...
34090262744
""" A freely-propagating, premixed hydrogen flat flame with multicomponent transport properties. Requires: cantera >= 2.5.0 """ import cantera as ct try: import pandas as pd import tables except: pd = None # Simulation parameters p = ct.one_atm # pressure [Pa] Tin = 300.0 # unburned gas temperature [K]...
trollchu/cantera
interfaces/cython/cantera/examples/onedim/adiabatic_flame.py
adiabatic_flame.py
py
1,659
python
en
code
null
github-code
18
[ { "api_name": "cantera.one_atm", "line_number": 16, "usage_type": "attribute" }, { "api_name": "cantera.Solution", "line_number": 24, "usage_type": "call" }, { "api_name": "cantera.FreeFlame", "line_number": 28, "usage_type": "call" } ]
5681856009
# -*- coding: cp936 -*- from selenium import webdriver from selenium.common.exceptions import NoSuchElementException,ElementNotVisibleException from selenium.webdriver.common.keys import Keys import time def NewUnloadTask(self,platform,billno,employee): try: self.logger.info("开始测试新增卸车任务......") ...
gaoli11/ssauto
src/Deppon/Web/Business/UnloadManage/NewUnloadTask.py
NewUnloadTask.py
py
2,122
python
en
code
0
github-code
18
[ { "api_name": "time.sleep", "line_number": 13, "usage_type": "call" }, { "api_name": "time.sleep", "line_number": 16, "usage_type": "call" }, { "api_name": "time.sleep", "line_number": 19, "usage_type": "call" }, { "api_name": "selenium.webdriver.common.keys.Keys....
39123446521
import datetime import difflib from django.shortcuts import render_to_response, get_object_or_404, redirect from django.template import RequestContext from django.core.paginator import Paginator, InvalidPage, EmptyPage from django.http import Http404 from django.template.defaultfilters import slugify from django.contr...
kaedroho/Django-Wiki
views.py
views.py
py
4,439
python
en
code
1
github-code
18
[ { "api_name": "django.shortcuts.get_object_or_404", "line_number": 16, "usage_type": "call" }, { "api_name": "models.Page", "line_number": 16, "usage_type": "attribute" }, { "api_name": "django.http.Http404", "line_number": 21, "usage_type": "name" }, { "api_name"...
71427002600
# This Python 3 environment comes with many helpful analytics libraries installed # It is defined by the kaggle/python docker image: https://github.com/kaggle/docker-python # For example, here's several helpful packages to load in import numpy as np # linear algebra import pandas as pd # data processing, CSV fil...
aorursy/new-nb-3
hakabuk_random-forest-with-more-numeric-features.py
hakabuk_random-forest-with-more-numeric-features.py
py
3,467
python
en
code
0
github-code
18
[ { "api_name": "pandas.options", "line_number": 19, "usage_type": "attribute" }, { "api_name": "subprocess.check_output", "line_number": 31, "usage_type": "call" }, { "api_name": "pandas.read_json", "line_number": 32, "usage_type": "call" }, { "api_name": "pandas.t...
43392979458
#!/usr/bin/env python3 from parsl import App, IPyParallelExecutor, DataFlowKernel import os from parsl.dataflow.futures import Future from parsl.execution_provider.midway.slurm import Midway """From now on, the tutorial applications are written to run on Midway, a cluster located at the University of Chicago Research...
benhg/job-classification
data-generation/scripts/p7.py
p7.py
py
2,310
python
en
code
1
github-code
18
[ { "api_name": "parsl.IPyParallelExecutor", "line_number": 18, "usage_type": "call" }, { "api_name": "parsl.DataFlowKernel", "line_number": 19, "usage_type": "call" }, { "api_name": "parsl.execution_provider.midway.slurm.Midway", "line_number": 31, "usage_type": "call" }...
10812390884
import json import onnxruntime as ort import re import numpy as np class Predictor: RE = "[абвгдеёжзийклмнопрстуфхцчшщьыъэюя'\u0301]+" def __init__(self, onnx_model, vocab, data_dict): self._ml_predictor = MLPredictor(onnx_model, vocab) self._vocab_predictor = VocabPredictor(data_dict) de...
slavonic/translator
accentru/predictor.py
predictor.py
py
3,786
python
en
code
5
github-code
18
[ { "api_name": "onnxruntime.InferenceSession", "line_number": 27, "usage_type": "call" }, { "api_name": "json.load", "line_number": 30, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_number": 34, "usage_type": "call" }, { "api_name": "numpy.int32", ...
10361611270
from app.data_managers import places_data_manager, event_data_manager from geojson import Point from app.data_managers.places_data_manager import PlaceDataManager from app.data_managers.event_data_manager import EventDataManager import time def create_place1(): proto = places_data_manager.min_place_dict pla...
waltyellow/project-clipper-2
app/test_data/places and events.py
places and events.py
py
4,654
python
en
code
0
github-code
18
[ { "api_name": "app.data_managers.places_data_manager.min_place_dict", "line_number": 10, "usage_type": "attribute" }, { "api_name": "app.data_managers.places_data_manager", "line_number": 10, "usage_type": "name" }, { "api_name": "geojson.Point", "line_number": 14, "usage...
6221432347
from common.decorators import params_valid from common.transaction import auto_meta_sync from common.views import APIViewSet from rest_framework.response import Response from meta import exceptions as meta_errors from meta.public.models.data_transferring import DataTransferring from meta.public.serializers.common impo...
Tencent/bk-base
src/api/meta/public/views/data_transferring.py
data_transferring.py
py
11,873
python
en
code
85
github-code
18
[ { "api_name": "common.views.APIViewSet", "line_number": 16, "usage_type": "name" }, { "api_name": "meta.utils.basicapi.parseresult.escape_string", "line_number": 81, "usage_type": "call" }, { "api_name": "meta.utils.basicapi.parseresult", "line_number": 81, "usage_type": ...
29487024555
import pygame import os from subprocess import call pygame.init() class Door: def __init__(self, surface, subject, file): self.door_sprite = pygame.image.load(os.path.join("assets", "door_sprite.png")) self.subject = subject self.text = subject self.display_surface = surface ...
gitTanzj/aasta-tegija
game_files/door.py
door.py
py
1,554
python
en
code
0
github-code
18
[ { "api_name": "pygame.init", "line_number": 5, "usage_type": "call" }, { "api_name": "pygame.image.load", "line_number": 8, "usage_type": "call" }, { "api_name": "pygame.image", "line_number": 8, "usage_type": "attribute" }, { "api_name": "os.path.join", "line...
21064701631
from datetime import date from src.lib.parser import MeetupEvent, get_event from telegram import Bot, ChatAction, Message, ParseMode DATE_FORMAT = "%A, %-d %B %Y %-I:%M %p" # e.g. Monday, 7 March 2022 7:00 PM REMINDER_TEMPLATE = """ Please RSVP to the following event: <b>Event:</b> <a href="{url}">{title}</a> ...
zegheim/meetup-reminder-bot
src/lib/bot.py
bot.py
py
2,062
python
en
code
0
github-code
18
[ { "api_name": "telegram.Bot", "line_number": 20, "usage_type": "call" }, { "api_name": "src.lib.parser.MeetupEvent", "line_number": 24, "usage_type": "name" }, { "api_name": "datetime.date", "line_number": 42, "usage_type": "name" }, { "api_name": "src.lib.parser....
23221220836
from models.GridEval import GridEval from sklearn import tree class DecisionTree(GridEval): """run the Decision Tree model """ def decisionRunGrid(self, classWeight = None): """Set the parameters to select from for Random Grid Search Output: the best model returned by random grid s...
regap4693/BINARY-CLASSIFICATION
models/DecisionTree.py
DecisionTree.py
py
1,480
python
en
code
0
github-code
18
[ { "api_name": "models.GridEval.GridEval", "line_number": 3, "usage_type": "name" }, { "api_name": "sklearn.tree.DecisionTreeClassifier", "line_number": 22, "usage_type": "call" }, { "api_name": "sklearn.tree", "line_number": 22, "usage_type": "name" }, { "api_name...
34655646875
""" A confederação de natação precisa de um programa que leia o ano de nascimento e mostre a categoria ate 9 anos Mirim até 14 anos Infantil até 19 anos Junior ate 20 anos Senior acima Master """ import datetime nascimento = int(input('Ano de nascimento:')) ano_atual = datetime.date.today().year idade = ano_atual - nas...
GustinSilva/python
aprendi com guanabara/Ex 041.py
Ex 041.py
py
742
python
pt
code
0
github-code
18
[ { "api_name": "datetime.date.today", "line_number": 11, "usage_type": "call" }, { "api_name": "datetime.date", "line_number": 11, "usage_type": "attribute" } ]
13053327663
from pymongo import MongoClient from bson.objectid import ObjectId import logger2 import random c = MongoClient() db = c['alkows'] # === ADDING === # def add_creature_species(sp): logger2.logger.debug("add_creature_species") db.bestiary.insert_one(sp) def add_flora_species(fsp): logger2.logger.debug("ad...
lmstock/AllCowsEatGrass
bartokmongo.py
bartokmongo.py
py
10,476
python
en
code
0
github-code
18
[ { "api_name": "pymongo.MongoClient", "line_number": 7, "usage_type": "call" }, { "api_name": "logger2.logger.debug", "line_number": 12, "usage_type": "call" }, { "api_name": "logger2.logger", "line_number": 12, "usage_type": "attribute" }, { "api_name": "logger2.l...
27274684990
#!/usr/bin/env python import atexit import csv import inspect import json import logging import os import signal import sys import time import click import panapi from panapi.config import \ iam, \ security, \ identity, \ objects, \ network, \ subscription, \ tenancy, \ mobile __author...
ancoleman/prisma-access-config-exporter
src/main.py
main.py
py
15,074
python
en
code
2
github-code
18
[ { "api_name": "logging.DEBUG", "line_number": 37, "usage_type": "attribute" }, { "api_name": "logging.INFO", "line_number": 37, "usage_type": "attribute" }, { "api_name": "logging.getLogger", "line_number": 38, "usage_type": "call" }, { "api_name": "logging.Format...
35880605789
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.index, name='index'), url(r'^step/', views.physics_step, name='physics_step'), url(r'^engine/', views.fire_engine, name='fire_engine'), url(r'^thruster/', views.fire_thruster, name='fire_thruster'), url(r'^ship/', views.ship_vie...
nthieu173/astraios
astraios (deployment)/asteroid_field/urls.py
urls.py
py
399
python
en
code
0
github-code
18
[ { "api_name": "django.conf.urls.url", "line_number": 5, "usage_type": "call" }, { "api_name": "django.conf.urls.url", "line_number": 6, "usage_type": "call" }, { "api_name": "django.conf.urls.url", "line_number": 7, "usage_type": "call" }, { "api_name": "django.co...
74553119078
from django.contrib.auth.models import AbstractUser from django.db import models from .enums import Role class User(AbstractUser): REQUIRED_FIELDS = ('first_name', 'last_name', 'username',) USERNAME_FIELD = 'email' ROLES = [ ('user', Role.USER), ('admin', Role.ADMIN), ] email = m...
ObdulTipov/foodgram-project-react
backend/users/models.py
models.py
py
1,142
python
en
code
0
github-code
18
[ { "api_name": "django.contrib.auth.models.AbstractUser", "line_number": 7, "usage_type": "name" }, { "api_name": "enums.Role.USER", "line_number": 11, "usage_type": "attribute" }, { "api_name": "enums.Role", "line_number": 11, "usage_type": "name" }, { "api_name":...
32423076063
from enum import Enum from os import getcwd from os.path import expanduser from typing import Union, List, Iterable try: # noinspection PyPackageRequirements import wx # noinspection PyPackageRequirements from wx.lib.agw import multidirdialog as mdd except ImportError: wx, mdd = None, None rais...
Palpatineli/uifunc
uifunc/wxopen.py
wxopen.py
py
3,310
python
en
code
0
github-code
18
[ { "api_name": "wx.lib.agw.multidirdialog", "line_number": 12, "usage_type": "name" }, { "api_name": "enum.Enum", "line_number": 16, "usage_type": "call" }, { "api_name": "typing.Union", "line_number": 17, "usage_type": "name" }, { "api_name": "typing.List", "l...
73026906599
__all__ = ['ANTsImage', 'LabelImage', 'copy_image_info', 'set_origin', 'get_origin', 'set_direction', 'get_direction', 'set_spacing', 'get_spacing', 'image_physical_space_consistency', 'image_type_cast', ...
ANTsX/ANTsPy
ants/core/ants_image.py
ants_image.py
py
33,134
python
en
code
499
github-code
18
[ { "api_name": "numpy.asarray", "line_number": 192, "usage_type": "call" }, { "api_name": "numpy.ndarray", "line_number": 194, "usage_type": "attribute" }, { "api_name": "numpy.asarray", "line_number": 235, "usage_type": "call" }, { "api_name": "numpy.ndarray", ...
23868537052
from collections import deque n, m, v = map(int, input().split()) graph = [[] for _ in range(n)] v = v - 1 for _ in range(m): a, b = map(int, input().split()) graph[a - 1].append(b - 1) graph[b - 1].append(a - 1) for _ in range(n): graph[_].sort() def bfs(v): visited = [0] * n result = [] ...
hipass7/Algorithm_Study
1차 SW 역량 테스트 대비 (220501)/temp.py
temp.py
py
950
python
en
code
0
github-code
18
[ { "api_name": "collections.deque", "line_number": 17, "usage_type": "call" } ]
73034024360
import argparse parser = argparse.ArgumentParser() parser.add_argument("-s", "--solvers", metavar="solvers[latest solver, earlier solver1,...]", action="store", # type = str, dest="solvers", default=[], nargs='+', ...
ConfZ/SPRFinder
src/parser.py
parser.py
py
2,216
python
en
code
0
github-code
18
[ { "api_name": "argparse.ArgumentParser", "line_number": 2, "usage_type": "call" } ]
71731605480
import moment from sqlalchemy.engine import Engine from sqlalchemy.orm import Session from sqlalchemy import insert from model.db.db_orm import ( ContasTipo, Categorias, Contas, Lancamentos, association_lanc_categ, ) class DataLoader: def __init__(self, engine: Engine) -> None: self.eng...
jaymealonso/py-financas
src/model/initial_load/initial_db_data.py
initial_db_data.py
py
5,907
python
pt
code
0
github-code
18
[ { "api_name": "sqlalchemy.engine.Engine", "line_number": 14, "usage_type": "name" }, { "api_name": "sqlalchemy.orm.Session", "line_number": 22, "usage_type": "call" }, { "api_name": "sqlalchemy.insert", "line_number": 24, "usage_type": "call" }, { "api_name": "mod...
36093901103
import numpy as np import torch.nn as nn from mmcv.cnn import normal_init from .anchor_head import AnchorHead from ..registry import HEADS from ..utils import bias_init_with_prob @HEADS.register_module class RetinaHead(AnchorHead): def __init__(self, num_classes, in_channels, ...
shaoqb/multi_scale_booster
mmdet/models/anchor_heads/retina_head.py
retina_head.py
py
3,917
python
en
code
19
github-code
18
[ { "api_name": "anchor_head.AnchorHead", "line_number": 11, "usage_type": "name" }, { "api_name": "numpy.array", "line_number": 27, "usage_type": "call" }, { "api_name": "torch.nn.ReLU", "line_number": 39, "usage_type": "call" }, { "api_name": "torch.nn", "line...
35017209942
from setuptools import setup from setuptools import find_packages import sys with open("README.md", "r") as fh: long_description = fh.read() exec(open("openSAP32/_version.py").read()) setup( name = 'openSAP32', packages = find_packages(), version = __version__, license='New BSD', description = 'openSAP32 ...
dukenmarga/openSAP32
setup.py
setup.py
py
1,312
python
en
code
4
github-code
18
[ { "api_name": "setuptools.setup", "line_number": 9, "usage_type": "call" }, { "api_name": "setuptools.find_packages", "line_number": 11, "usage_type": "call" } ]
40038581662
import re import pickle import io import os.path import base64 from PIL import Image from io import BytesIO import tensorflow as tf import numpy as np import matplotlib.pyplot as plt class Encoder(tf.keras.Model): def __init__(self, embed_dim): super(Encoder, self).__init__() self.den = tf.keras.l...
vladislavalerievich/image-captioner
backend/src/utils/image_captioning.py
image_captioning.py
py
7,074
python
en
code
0
github-code
18
[ { "api_name": "tensorflow.keras", "line_number": 13, "usage_type": "attribute" }, { "api_name": "tensorflow.keras.layers.Dense", "line_number": 16, "usage_type": "call" }, { "api_name": "tensorflow.keras", "line_number": 16, "usage_type": "attribute" }, { "api_nam...
23010836101
import pygame import time # import pygame_functions WIDTH = 1000 HEIGHT = 1000 pygame.init() screenRefresh = True background_image = pygame.image.load("plain_bg.jpg") back_pos = [0,0] screen = pygame.display.set_mode((WIDTH,HEIGHT)) done = False class Button(pygame.sprite.Sprite): def __init__(self,loc): ...
FB-18-19-PreAP-CS/mygame-uwu
game.py
game.py
py
7,253
python
en
code
1
github-code
18
[ { "api_name": "pygame.init", "line_number": 9, "usage_type": "call" }, { "api_name": "pygame.image.load", "line_number": 11, "usage_type": "call" }, { "api_name": "pygame.image", "line_number": 11, "usage_type": "attribute" }, { "api_name": "pygame.display.set_mod...
7580874884
from litstudy.types import Document, DocumentSet, DocumentIdentifier, Author from typing import Optional, List import feedparser # type: ignore from datetime import datetime from urllib.parse import urlencode import time class ArXivAuthor(Author): def __init__(self, entry): self.entry = entry @prope...
NLeSC/litstudy
litstudy/sources/arxiv.py
arxiv.py
py
3,208
python
en
code
112
github-code
18
[ { "api_name": "litstudy.types.Author", "line_number": 9, "usage_type": "name" }, { "api_name": "litstudy.types.Document", "line_number": 18, "usage_type": "name" }, { "api_name": "litstudy.types.DocumentIdentifier", "line_number": 20, "usage_type": "call" }, { "ap...
28365184263
import os.path as osp import os import cv2 import numpy as np import imageio import glob from multiprocessing import Pool from tqdm import tqdm img_suffix = '_leftImg8bit.png' #img seg_map_suffix = '_gtFine_labelTrainIds.png' #label data_root = '/SSD_DISK/datasets/mapillary' destination...
swimmerQAQ/Segformer_with_different_dataset
label_test/trans_map_to_mmseg.py
trans_map_to_mmseg.py
py
2,539
python
en
code
0
github-code
18
[ { "api_name": "cv2.imread", "line_number": 23, "usage_type": "call" }, { "api_name": "imageio.v2.imread", "line_number": 24, "usage_type": "call" }, { "api_name": "imageio.v2", "line_number": 24, "usage_type": "attribute" }, { "api_name": "label_mapping.LMS", ...
23849637110
import logging logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(name)s - %(levelname)s - %(message)s') logger = logging.getLogger(__name__) import os # the secret configuration specific things if bool(os.environ.get("WEBHOOK", False)): from sample_config import Config else: ...
surlogu/mf
bot.py
bot.py
py
904
python
en
code
0
github-code
18
[ { "api_name": "logging.basicConfig", "line_number": 2, "usage_type": "call" }, { "api_name": "logging.DEBUG", "line_number": 2, "usage_type": "attribute" }, { "api_name": "logging.getLogger", "line_number": 4, "usage_type": "call" }, { "api_name": "os.environ.get"...
1895422697
import re import logging import numpy as np from numpy.core.fromnumeric import shape import pandas as pd import matplotlib.pyplot as plt from typing import List, Dict class Ranker(object): def __init__(self, role_vocab_size: int, role_ids: List[int]=None) -> None: self.role_vocab_size = role_vocab_size ...
Buted/RBDEF
code/statistic/rank.py
rank.py
py
4,934
python
en
code
0
github-code
18
[ { "api_name": "typing.List", "line_number": 13, "usage_type": "name" }, { "api_name": "typing.List", "line_number": 45, "usage_type": "name" }, { "api_name": "re.match", "line_number": 54, "usage_type": "call" }, { "api_name": "re.match", "line_number": 63, ...
70674924519
import cv2 cap = cv2.VideoCapture(0) print('Openning Camera ....') while True: ref,frame = cap.read() cv2.imshow("Camera", frame) if cv2.waitKey(1) ==13: break cap.release() cv2.destroyAllWindows() print("finished..")
younisrahman/OpenCvWebCamTest
venv/main.py
main.py
py
240
python
en
code
0
github-code
18
[ { "api_name": "cv2.VideoCapture", "line_number": 4, "usage_type": "call" }, { "api_name": "cv2.imshow", "line_number": 8, "usage_type": "call" }, { "api_name": "cv2.waitKey", "line_number": 9, "usage_type": "call" }, { "api_name": "cv2.destroyAllWindows", "lin...
75446897639
# -*- coding: utf-8 -*- """ Created on Fri Sep 4 11:15:49 2020 @author: adam """ import os import serial import time import dash import dash_core_components as dcc import dash_html_components as html import pandas as pd import plotly.express as px from dash.dependencies import Input, Output, State from...
danammeansbear/OpenCannabisDatabase
PlantProcessingInteractiveDashboard.py
PlantProcessingInteractiveDashboard.py
py
10,065
python
en
code
13
github-code
18
[ { "api_name": "dash.Dash", "line_number": 22, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 25, "usage_type": "call" }, { "api_name": "dash_html_components.Div", "line_number": 28, "usage_type": "call" }, { "api_name": "dash_html_componen...
21728327402
import ipdb import numpy as np import torch import torch.nn as nn import torch.nn.functional as F class Swish(nn.Module): def __init__(self): super().__init__() def forward(self, x): return x * torch.sigmoid(x) def make_mlp(l, act=nn.LeakyReLU(), tail=[], with_bn=False): """makes an MLP...
GFNOrg/EB_GFN
network.py
network.py
py
819
python
en
code
64
github-code
18
[ { "api_name": "torch.nn.Module", "line_number": 8, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 8, "usage_type": "name" }, { "api_name": "torch.sigmoid", "line_number": 13, "usage_type": "call" }, { "api_name": "torch.nn.LeakyReLU", "l...
31631406473
# -*- coding: utf-8 -*- """ A program to develop a ML model to predict which movie will earn more on a particular day after training the model on the given records """ # Importing pandas, numpy, matplotlib import pandas as pd import numpy as np import matplotlib.pyplot as plt # Importing contextlib module to enhance...
piyush546/Machine-Learning-Bootcamp
Machine Learning programs/Supervised ML programs/Linear Regression Programs/Single Variant Linear Regression/BahubaliDangal.py
BahubaliDangal.py
py
2,894
python
en
code
1
github-code
18
[ { "api_name": "contextlib.suppress", "line_number": 23, "usage_type": "call" }, { "api_name": "sklearn.exceptions.NotFittedError", "line_number": 23, "usage_type": "name" }, { "api_name": "pandas.read_csv", "line_number": 27, "usage_type": "call" }, { "api_name": ...
32454344553
from unittest.mock import patch, Mock from snowflake.services.google_auth import UserInfo, get_user_info @patch('snowflake.services.google_auth.verify_oauth2_token') def test_get_user_info_parses_token(mock_verify_outh2_token: Mock, app): with app.app_context(): account_id = 'd8708828-6a01-4b7e-ab15-bc48...
snowflake-app/snowflake
tests/services/test_google_auth.py
test_google_auth.py
py
906
python
en
code
0
github-code
18
[ { "api_name": "unittest.mock.Mock", "line_number": 7, "usage_type": "name" }, { "api_name": "snowflake.services.google_auth.get_user_info", "line_number": 18, "usage_type": "call" }, { "api_name": "snowflake.services.google_auth.UserInfo", "line_number": 20, "usage_type":...
37935230310
from django.urls import path, include from blogttm import views from django.views.generic import RedirectView urlpatterns = [ path('', views.main, name='main'), path('git/', views.Git, name= 'Git'), path('git/<int:pk>/', views.posting, name= 'Gitdetail'), path('DataAnalysis/', views.DataAnalysis, name=...
seongjaeBA/ToTheMoon
blogttm/urls.py
urls.py
py
826
python
en
code
0
github-code
18
[ { "api_name": "django.urls.path", "line_number": 6, "usage_type": "call" }, { "api_name": "blogttm.views.main", "line_number": 6, "usage_type": "attribute" }, { "api_name": "blogttm.views", "line_number": 6, "usage_type": "name" }, { "api_name": "django.urls.path"...
73485386280
#!/usr/bin/env python3 import tensorflow as tf from tensorflow import keras import numpy as np import matplotlib.pyplot as plt import os import cv2 import pygame, sys mnist = keras.datasets.mnist (x_train, y_train), (x_test, y_test) = mnist.load_data() x_train = keras.utils.normalize(x_train, axis=1) x_test = keras....
julian-baumann/number-recognition
drawing.py
drawing.py
py
2,307
python
en
code
0
github-code
18
[ { "api_name": "tensorflow.keras.datasets", "line_number": 11, "usage_type": "attribute" }, { "api_name": "tensorflow.keras", "line_number": 11, "usage_type": "name" }, { "api_name": "tensorflow.keras.utils.normalize", "line_number": 14, "usage_type": "call" }, { "...
15319063550
#!/usr/bin/env python from kivy.app import App from kivy.uix.label import Label from convert import ToolKitms from kivy.uix.button import Button from kivy.uix.scrollview import ScrollView from kivy.uix.gridlayout import GridLayout from kivy.uix.boxlayout import BoxLayout from kivy.config import Config from kivy.uix.che...
Mateusmsouza/PyConnections
main.py
main.py
py
3,796
python
en
code
0
github-code
18
[ { "api_name": "kivy.config.Config.set", "line_number": 17, "usage_type": "call" }, { "api_name": "kivy.config.Config", "line_number": 17, "usage_type": "name" }, { "api_name": "kivy.config.Config.set", "line_number": 18, "usage_type": "call" }, { "api_name": "kivy...
27860596585
""" Script for investigating whether we can find diagnostic ITS2 sequences that can 'predict' host genotypes as determined by Didier First approach is simply to look for single diagnostic sequences. This means that for each ITS2 sequences we look to see if it is present in all samples of a given host grouping but not p...
didillysquat/tara_full_dataset_processing
host_diagnostic_ITS2/host_diagnostic_ITS2.py
host_diagnostic_ITS2.py
py
21,533
python
en
code
1
github-code
18
[ { "api_name": "matplotlib.use", "line_number": 14, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_number": 27, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 28, "usage_type": "call" }, { "api_name": "os.path", "line_number":...
10809706090
#! /usr/bin/env python3 # -*- coding: UTF-8 -*- import json import sys import time class TraceReader: ''' Trace reader just… reads a trace! This is the master class (interface), herited to get events from different sources: serial, gdb, file (json)… It provides a generator to send even...
TrampolineRTOS/trampoline
extra/trace-tools/TraceReader.py
TraceReader.py
py
10,624
python
en
code
549
github-code
18
[ { "api_name": "json.load", "line_number": 120, "usage_type": "call" }, { "api_name": "sys.exit", "line_number": 124, "usage_type": "call" }, { "api_name": "sys.exit", "line_number": 151, "usage_type": "call" }, { "api_name": "threading.Event", "line_number": 1...
71427345960
import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns import plotly_express as px sns.set_palette('husl') sns.set_style("whitegrid") from sklearn.decomposition import PCA from sklearn.preprocessing import MinMaxScaler, StandardScaler, LabelEncoder, PowerTransformer ...
aorursy/new-nb-3
imdevskp_bike-sharing-prediction.py
imdevskp_bike-sharing-prediction.py
py
5,570
python
en
code
0
github-code
18
[ { "api_name": "seaborn.set_palette", "line_number": 15, "usage_type": "call" }, { "api_name": "seaborn.set_style", "line_number": 17, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 42, "usage_type": "call" }, { "api_name": "pandas.to_datet...
72154376361
import dask.dataframe as dd from dask.distributed import Client from dask_cloudprovider.aws import EC2Cluster import pandas as pd import numpy as np import timeit import configparser import os import contextlib from dotenv import load_dotenv load_dotenv() def get_aws_credentials(): parser = configparser.RawConfi...
alejohz/mineria
tests/dask_etl.py
dask_etl.py
py
2,560
python
en
code
0
github-code
18
[ { "api_name": "dotenv.load_dotenv", "line_number": 12, "usage_type": "call" }, { "api_name": "configparser.RawConfigParser", "line_number": 16, "usage_type": "call" }, { "api_name": "os.path.expanduser", "line_number": 17, "usage_type": "call" }, { "api_name": "os...
15646708146
""" author: Roman Kutlak <roman@kutlak.net> Based on the Abstract Argumentation Library by Mikolaj Podlaszewski <mikolaj.podlaszewski@gmail.com> """ import copy import json import logging from collections import defaultdict from .common import IllegalArgument, MethodNotApplicable from .kb import Literal...
roman-kutlak/argulib
argulib/aal.py
aal.py
py
22,575
python
en
code
0
github-code
18
[ { "api_name": "logging.getLogger", "line_number": 18, "usage_type": "call" }, { "api_name": "kb.KnowledgeBase", "line_number": 118, "usage_type": "call" }, { "api_name": "collections.defaultdict", "line_number": 119, "usage_type": "call" }, { "api_name": "signals....
21712294926
import cv2 import numpy as np # 검출할 영역(관심영역)의 가로,세로 크기 지정. <175 x 125 = 21,875 사각형 면적 크기> ROI_w = 175 ROI_h = 125 # ROI 좌표 지정. ROI_list = [ [(1300, 5)], # 까지 첫번째 줄 [(5, 150)], [(250, 150)], [(500, 150)], [(750, 150)], [(990, 150)], [(1235, 150)], # 까지 두번째줄 [(340, 340)], [(620, 34...
lyj911111/OpenCV_Project
_AceVision_testcodes/Bonding_area_detect_본드칠영역탐지_합불여부/detect_green_bondingArea.py
detect_green_bondingArea.py
py
6,482
python
en
code
0
github-code
18
[ { "api_name": "cv2.bitwise_not", "line_number": 40, "usage_type": "call" }, { "api_name": "cv2.threshold", "line_number": 45, "usage_type": "call" }, { "api_name": "cv2.THRESH_BINARY_INV", "line_number": 45, "usage_type": "attribute" }, { "api_name": "cv2.imshow",...
18567641881
import torch class RankSort(torch.autograd.Function): @staticmethod def forward(ctx, logits, targets, delta_RS=0.50, eps=1e-10): classification_grads=torch.zeros(logits.shape).cuda() #Filter fg logits fg_labels = (targets > 0.) fg_logits = logits[fg_labels] fg...
kemaloksuz/RankSortLoss
mmdet/models/losses/ranking_losses.py
ranking_losses.py
py
10,356
python
en
code
233
github-code
18
[ { "api_name": "torch.autograd", "line_number": 3, "usage_type": "attribute" }, { "api_name": "torch.zeros", "line_number": 7, "usage_type": "call" }, { "api_name": "torch.min", "line_number": 17, "usage_type": "call" }, { "api_name": "torch.zeros", "line_numbe...
17716811023
import os,json,csv,re import pandas as pd import xml.etree.ElementTree as et class bcolors: HEADER = '\033[95m' OKBLUE = '\033[94m' OKCYAN = '\033[96m' OKGREEN = '\033[92m' WARNING = '\033[93m' FAIL = '\033[91m' ENDC = '\033[0m' BOLD = '\033[1m' UNDERLINE = '\033[4m' class DISCO_Re...
comacrae/disco-reader
reader.py
reader.py
py
13,087
python
en
code
0
github-code
18
[ { "api_name": "os.path.abspath", "line_number": 45, "usage_type": "call" }, { "api_name": "os.path", "line_number": 45, "usage_type": "attribute" }, { "api_name": "os.path.abspath", "line_number": 50, "usage_type": "call" }, { "api_name": "os.path", "line_numb...
23951822215
from django.db import models from django.contrib.auth.models import User from django.utils.translation import ugettext_lazy as _ class BlackLists(models.Model): user = models.ForeignKey(User, related_name='blacklist', verbose_name=_('user')) shielding = models.ForeignKey(User, related_name='shielding', verbos...
danielliude/reismann_pub
blacklists/models.py
models.py
py
488
python
en
code
0
github-code
18
[ { "api_name": "django.db.models.Model", "line_number": 6, "usage_type": "attribute" }, { "api_name": "django.db.models", "line_number": 6, "usage_type": "name" }, { "api_name": "django.db.models.ForeignKey", "line_number": 7, "usage_type": "call" }, { "api_name": ...
13590668438
from sklearn import linear_model from sklearn.preprocessing import StandardScaler import numpy as np data=np.loadtxt("ex1data1.txt",delimiter=",",dtype=np.float64) X = data[:, 0:-1] # X表示0到倒数第二列 y=data[:,-1] #归一化操作 scaler=StandardScaler() scaler.fit(X) x_train=scaler.transform(X) x_test = scaler.transform(np.array([...
penggan666/ml
linear regression/scikit_learn.py
scikit_learn.py
py
501
python
en
code
1
github-code
18
[ { "api_name": "numpy.loadtxt", "line_number": 6, "usage_type": "call" }, { "api_name": "numpy.float64", "line_number": 6, "usage_type": "attribute" }, { "api_name": "sklearn.preprocessing.StandardScaler", "line_number": 10, "usage_type": "call" }, { "api_name": "n...
27456238545
from PIL import Image from io import BytesIO class ImageProcess(object): """ 图片处理类 将Requests中获取到的二进制图片转换为Pillow可以读取的JPEG图片格式 并对图像进行二值化处理 可使用的成员函数 byte2jpeg(byte)——将二进制格式图片byte转化为Pillow可读取格式 image_binarize(image)——将Pillow格式图片image进行二值化 process(source)——将request返回的二进制图片格式进行二值化 """"" ...
Mundanity-fc/CaptchaReco
ImageProcess.py
ImageProcess.py
py
2,376
python
zh
code
1
github-code
18
[ { "api_name": "PIL.Image.open", "line_number": 22, "usage_type": "call" }, { "api_name": "PIL.Image", "line_number": 22, "usage_type": "name" }, { "api_name": "io.BytesIO", "line_number": 22, "usage_type": "call" }, { "api_name": "PIL.Image", "line_number": 16...
13673899736
from __future__ import annotations from cranet import Tensor from ..parameter import Parameter from typing import ( Iterator, Iterable, Optional, List, Dict, Set, Union, Tuple, Callable, ) from collections import OrderedDict class Module: _version = 1 training: bool ...
shizuku/cranet
src/cranet/nn/modules/module.py
module.py
py
11,445
python
en
code
3
github-code
18
[ { "api_name": "typing.Dict", "line_number": 27, "usage_type": "name" }, { "api_name": "typing.Optional", "line_number": 27, "usage_type": "name" }, { "api_name": "parameter.Parameter", "line_number": 27, "usage_type": "name" }, { "api_name": "collections.OrderedDi...
70235502120
from django.shortcuts import render_to_response, get_object_or_404 from django.template import RequestContext from django.http import HttpResponseRedirect, Http404 from django.core.paginator import Paginator from django.contrib.auth.decorators import login_required, permission_required from django.shortcuts import rend...
Blzn/LavPython
trajeto/views.py
views.py
py
2,702
python
pt
code
2
github-code
18
[ { "api_name": "django.shortcuts.render_to_response", "line_number": 12, "usage_type": "call" }, { "api_name": "django.template.RequestContext", "line_number": 12, "usage_type": "call" }, { "api_name": "django.contrib.auth.decorators.login_required", "line_number": 9, "usa...
12884514026
import sys import os from matplotlib import pyplot as plt import numpy as np import math import pandas as pd sys.path.append(os.path.dirname(os.path.abspath(__file__)) + "/../ModelPredictiveTrajectoryGenerator/") try: import model_predictive_trajectory_generator as planner import motion_model...
furkankocyigit/trajectoryPlanning
StateLatticePlanner/state_lattice_planner.py
state_lattice_planner.py
py
3,603
python
en
code
2
github-code
18
[ { "api_name": "sys.path.append", "line_number": 9, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 9, "usage_type": "attribute" }, { "api_name": "os.path.dirname", "line_number": 9, "usage_type": "call" }, { "api_name": "os.path", "line_number...