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
22184040393
import numpy as np import pandas as pd import seaborn as sns from matplotlib import pyplot as plt import scipy.cluster.hierarchy as sch from scipy.cluster.hierarchy import linkage from sklearn.cluster import KMeans from sklearn.preprocessing import StandardScaler from sklearn import preprocessing from skl...
hdcoder/ExcelR-Assignments
Principal Component Analysis/Q1.py
Q1.py
py
3,261
python
en
code
0
github-code
18
[ { "api_name": "pandas.read_csv", "line_number": 15, "usage_type": "call" }, { "api_name": "sklearn.preprocessing.StandardScaler", "line_number": 32, "usage_type": "call" }, { "api_name": "sklearn.decomposition.PCA", "line_number": 36, "usage_type": "name" }, { "ap...
5733329085
''' ## Program: sbrowser.py ## Authors: Arnav Sharma ## ## Date: 19-01-2019 ''' import time import shlex import subprocess from selenium import webdriver from selenium.webdriver.common.keys import Keys from selenium.webdriver.support.ui import Select from selenium.common.exceptions import WebDriverException from selen...
arnav-dev/sanity-tool
sbrowser.py
sbrowser.py
py
9,535
python
en
code
0
github-code
18
[ { "api_name": "selenium.webdriver.Ie", "line_number": 50, "usage_type": "call" }, { "api_name": "selenium.webdriver", "line_number": 50, "usage_type": "name" }, { "api_name": "selenium.webdriver.support.ui.Select", "line_number": 98, "usage_type": "call" }, { "api...
70075346922
import base64 import tkinter as tk def on_button_click(): # Get the hex string from the text entry hex_string = entry.get() # Decode the hex string to a bytes object bytes_obj = bytes.fromhex(hex_string) # Encode the bytes object to a base64 string base64_string = base64.b64encode(bytes_obj)....
ciwen3/Public
Python/ChatGPT/CryptoPals/Set1/Challenge1.py
Challenge1.py
py
940
python
en
code
3
github-code
18
[ { "api_name": "base64.b64encode", "line_number": 12, "usage_type": "call" }, { "api_name": "tkinter.Tk", "line_number": 18, "usage_type": "call" }, { "api_name": "tkinter.Label", "line_number": 22, "usage_type": "call" }, { "api_name": "tkinter.Entry", "line_n...
72646926120
#!/usr/bin/python3 -u # -*- coding: utf-8 -*- __author__ = "Blurgy"; import data import nn_utils as nn import os import sys import numpy as np import click @click.command() @click.argument("model-dump-file") @click.option("--batch-size", type = int, default = 32, help = "Specifies batch size, 32...
blurgyy/kaggle
mnist/nn/conv/validate.py
validate.py
py
1,123
python
en
code
0
github-code
18
[ { "api_name": "data.load_model", "line_number": 17, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 18, "usage_type": "call" }, { "api_name": "data.preprocess_testing_set", "line_number": 18, "usage_type": "call" }, { "api_name": "os.path.exist...
28534624499
import copy import glob import json import os import seaborn as sns import matplotlib.pyplot as plt import pandas as pd import numpy as np import matplotlib.patches as mp from lazygrid.datasets import load_openml_dataset from matplotlib.colors import ListedColormap from sklearn.cluster import KMeans, DBSCAN, Agglomerat...
glubbdubdrib/predictable-feature-elimination
make_figs_clustering.py
make_figs_clustering.py
py
5,789
python
en
code
4
github-code
18
[ { "api_name": "glob.glob", "line_number": 28, "usage_type": "call" }, { "api_name": "lazygrid.datasets.load_openml_dataset", "line_number": 43, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 45, "usage_type": "call" }, { "api_name": "numpy...
35554085349
#Importing required modules import pandas as pd import pandas_profiling as pp import matplotlib.pyplot as plt import seaborn as sns from sklearn import preprocessing from sklearn.linear_model import LinearRegression #reading the train data and test data train = pd.read_csv(r"heart_rate_prediction_train.csv") test = pd...
satyaki2001/Heart-Rate-analysis-and-stress-level-prediction
model.py
model.py
py
2,125
python
en
code
1
github-code
18
[ { "api_name": "pandas.read_csv", "line_number": 10, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 11, "usage_type": "call" }, { "api_name": "sklearn.linear_model.LinearRegression", "line_number": 24, "usage_type": "call" }, { "api_name": ...
27859501755
"""Various filters for Jinja.""" from datetime import datetime as _datetime from calendar import month_name as _month_name __all__ = [ "rating", "article_date", "breaking_spaces", "datetime", "month_name", "suffix", "tagsort_count", "tagsort_name", "custom_strftime", "archive_d...
dflock/duncanlock.net
plugins/jinja_filters/jinja_filters.py
jinja_filters.py
py
5,249
python
en
code
23
github-code
18
[ { "api_name": "calendar.month_name", "line_number": 41, "usage_type": "name" }, { "api_name": "typogrify.filters.amp", "line_number": 75, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 161, "usage_type": "call" }, { "api_name": "datetime...
19657600461
from .Source import Source from .EmotivPacket import EmotivPacket from subprocess import check_output from Crypto.Cipher import AES from Crypto import Random import threading import select import os import code class Emotiv(Source): def __init__(self, headsetId=0, research_headset=True): self.battery = 0 ...
uj-robotics/jasugun
model/Emotiv.py
Emotiv.py
py
5,971
python
en
code
null
github-code
18
[ { "api_name": "Source.Source", "line_number": 11, "usage_type": "name" }, { "api_name": "Crypto.Random.new", "line_number": 92, "usage_type": "call" }, { "api_name": "Crypto.Random", "line_number": 92, "usage_type": "name" }, { "api_name": "Crypto.Cipher.AES.block...
25436107656
# -*- coding: utf-8 -*- import logging from logging import handlers import os from pythonjsonlogger import jsonlogger class Log: __log_level_map = { 'debug' : logging.DEBUG, 'info' : logging.INFO, 'warn' : logging.WARN, 'error' : logging.ERROR, 'critical' : logging.CRITICA...
dodotdo-fms/hims-guest-server
hims_guest/hims_logger.py
hims_logger.py
py
1,757
python
en
code
0
github-code
18
[ { "api_name": "logging.DEBUG", "line_number": 11, "usage_type": "attribute" }, { "api_name": "logging.INFO", "line_number": 12, "usage_type": "attribute" }, { "api_name": "logging.WARN", "line_number": 13, "usage_type": "attribute" }, { "api_name": "logging.ERROR"...
21251734722
import tensorflow.compat.v1 as tf import os import re import time import argparse import datetime import random from socket import gethostname from collections import deque, OrderedDict, namedtuple from contextlib import ExitStack from functools import partial import numpy as np import sys import importlib import valid...
alex-titterton/examples
applications/tensorflow/cnns/training/train.py
train.py
py
38,187
python
en
code
null
github-code
18
[ { "api_name": "Datasets.data.DATASET_CONSTANTS", "line_number": 29, "usage_type": "attribute" }, { "api_name": "Datasets.data", "line_number": 29, "usage_type": "name" }, { "api_name": "collections.namedtuple", "line_number": 32, "usage_type": "call" }, { "api_nam...
39899610955
import cv2 import numpy as np import matplotlib.pyplot as plt img = cv2.imread('ratio.png', 0) headlines = img[295:323, 285:345] cv2.imshow('car', headlines) cv2.imwrite('headlines.jpg', headlines) # grey = cv2.cvtColor(car, cv2.COLOR_BGR2GRAY) w, h = headlines.shape[::-1] res = cv2.matchTemplate(img, headlines, cv2.T...
namdang-exe/Computer_Vision_project
CropImage.py
CropImage.py
py
648
python
en
code
0
github-code
18
[ { "api_name": "cv2.imread", "line_number": 5, "usage_type": "call" }, { "api_name": "cv2.imshow", "line_number": 7, "usage_type": "call" }, { "api_name": "cv2.imwrite", "line_number": 8, "usage_type": "call" }, { "api_name": "cv2.matchTemplate", "line_number":...
22261194800
from flask import Flask, render_template, url_for, flash, redirect, session, request from util import json_response, hash_password import queries as queries import os from datetime import timedelta app = Flask(__name__) app.secret_key = os.environ.get('SECRET_KEY', 'dev') app.permanent_session_lifetime = timedelta(da...
Kakulive/ProMan
main.py
main.py
py
4,498
python
en
code
0
github-code
18
[ { "api_name": "flask.Flask", "line_number": 8, "usage_type": "call" }, { "api_name": "os.environ.get", "line_number": 9, "usage_type": "call" }, { "api_name": "os.environ", "line_number": 9, "usage_type": "attribute" }, { "api_name": "datetime.timedelta", "lin...
73467790440
####import packages import pandas as pd import SD_Project as SD import numpy as np import gsw import seawater as sw import xarray as xr import datetime import matplotlib.pyplot as plt from pandas.plotting import register_matplotlib_converters register_matplotlib_converters() print('loaded packages') #data cleaning #...
HSR-36/Rosenthal_et_al2023
.ipynb_checkpoints/processing_SD_data-checkpoint.py
processing_SD_data-checkpoint.py
py
6,172
python
en
code
0
github-code
18
[ { "api_name": "pandas.plotting.register_matplotlib_converters", "line_number": 12, "usage_type": "call" }, { "api_name": "xarray.open_dataset", "line_number": 24, "usage_type": "call" }, { "api_name": "xarray.open_dataset", "line_number": 28, "usage_type": "call" }, {...
41159779045
# -*- coding: utf-8 -*- import cv2 import numpy as np import os.path import copy from tqdm import tqdm # 椒盐噪声 def SaltAndPepper(src, percetage): SP_NoiseImg = src.copy() SP_NoiseNum = int(percetage * src.shape[0] * src.shape[1]) for i in range(SP_NoiseNum): randR = np.random.randint(0, src.shape[...
4three2one/vit-plant-disease
robust/data_augmentation.py
data_augmentation.py
py
8,521
python
en
code
0
github-code
18
[ { "api_name": "numpy.random.randint", "line_number": 14, "usage_type": "call" }, { "api_name": "numpy.random", "line_number": 14, "usage_type": "attribute" }, { "api_name": "numpy.random.randint", "line_number": 15, "usage_type": "call" }, { "api_name": "numpy.ran...
29962715912
#!/usr/bin/python # -*- coding: UTF-8 -*- import time from datetime import datetime from uuid import uuid4 import bcrypt from Crypto.PublicKey import RSA from Crypto.Cipher import PKCS1_v1_5 as Cipher_pkcs1_v1_5 import base64 import allure from data_etl import etl_process from data_etl.etl_ccl_tag import get_random_...
srui1028/rpa_platform_auto_test-master
test_case/test_requirements_line_for_eight_roles.py
test_requirements_line_for_eight_roles.py
py
23,877
python
en
code
0
github-code
18
[ { "api_name": "project_path.TEST_DATA_PATH", "line_number": 34, "usage_type": "name" }, { "api_name": "utils.common_tools.CommonTool", "line_number": 35, "usage_type": "call" }, { "api_name": "utils.common_tools.CommonTool", "line_number": 39, "usage_type": "call" }, ...
35151370830
import os path_run = '/home/phg17/Documents/Entrainment Experiment/Data Analysis' os.chdir(path_run) import phythm.io as io from phythm.viz import scabox, plot_significance from phythm.stats import stat_effect import numpy as np import matplotlib.pyplot as plt from os.path import join from sklearn.preprocessing impor...
phg17/ATacSy
behaviour_figure_help.py
behaviour_figure_help.py
py
2,718
python
en
code
0
github-code
18
[ { "api_name": "os.chdir", "line_number": 4, "usage_type": "call" }, { "api_name": "phythm.io.compute_data", "line_number": 27, "usage_type": "call" }, { "api_name": "phythm.io", "line_number": 27, "usage_type": "name" }, { "api_name": "numpy.arange", "line_num...
71426880360
# General imports import numpy as np import pandas as pd import os, warnings, datetime, math import matplotlib.pyplot as plt import seaborn as sns from sklearn.preprocessing import LabelEncoder warnings.filterwarnings('ignore') ########################### Helpers #############################################...
aorursy/new-nb-3
govind555_ieee-eda-lgbm.py
govind555_ieee-eda-lgbm.py
py
19,421
python
en
code
0
github-code
18
[ { "api_name": "warnings.filterwarnings", "line_number": 18, "usage_type": "call" }, { "api_name": "numpy.iinfo", "line_number": 49, "usage_type": "call" }, { "api_name": "numpy.int8", "line_number": 49, "usage_type": "attribute" }, { "api_name": "numpy.int8", ...
29766101293
from typing import List ''' 给你一个整型数组 nums ,在数组中找出由三个数组成的最大乘积,并输出这个乘积。 示例 1: 输入:nums = [1,2,3] 输出:6 示例 2: 输入:nums = [1,2,3,4] 输出:24 示例 3: 输入:nums = [-1,-2,-3] 输出:-6 来源:力扣(LeetCode) 链接:https://leetcode-cn.com/problems/maximum-product-of-three-numbers 著作权归领扣网络所有。商业转载请联系官方授权,非商业转载请注明出处。 ''' class Solution: def m...
tyutltf/Leecode
601-700/628-三个数的最大乘积.py
628-三个数的最大乘积.py
py
864
python
zh
code
1
github-code
18
[ { "api_name": "typing.List", "line_number": 25, "usage_type": "name" } ]
34583530662
from collections import defaultdict paths = [] with open("spaths.txt") as f: pathss = f.readlines() for path in pathss: paths.append(path.strip().split("->")) def get_path(src, dst): for path in paths: if src == path[0] and dst == path[-1]: return path def common_sw(path1, pa...
Peterzara/ACN2021
lab3/scripts/get_num_shared_switches.py
get_num_shared_switches.py
py
1,474
python
en
code
0
github-code
18
[ { "api_name": "collections.defaultdict", "line_number": 23, "usage_type": "call" } ]
21250981522
import time import os import sys import math import ctypes import random import datetime from functools import reduce from collections import deque from collections import defaultdict from itertools import chain import logging import socket import popart import numpy as np from torch.utils.tensorboard import SummaryWr...
alex-titterton/examples
applications/popart/bert/bert.py
bert.py
py
46,602
python
en
code
null
github-code
18
[ { "api_name": "logging.getLogger", "line_number": 25, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 27, "usage_type": "call" }, { "api_name": "os.path", "line_number": 27, "usage_type": "attribute" }, { "api_name": "os.path.dirname", "li...
72969400360
""" Definition of Column: class Column: def __init__(self, key, value): self.key = key self.value = value """ from collections import OrderedDict class MiniCassandra: def __init__(self): self.hash = {} """ @param: raw_key: a string @param: column_key: An integer @p...
adityabohra007/Coding
LintCode 502. Mini Cassandra.py
LintCode 502. Mini Cassandra.py
py
1,115
python
en
code
1
github-code
18
[ { "api_name": "collections.OrderedDict", "line_number": 23, "usage_type": "call" }, { "api_name": "collections.OrderedDict", "line_number": 37, "usage_type": "call" } ]
33643257471
import time from appium import webdriver from appium.webdriver.extensions.android.gsm import GsmCallActions class Test_Demo: def setup(self): desired_caps = {} desired_caps['platformName'] = 'Android' desired_caps['platformVersion'] = '10' desired_caps['deviceName'] = '84681e49' ...
chenlei-123/appiumProject
mobile_api/test_mobile_api.py
test_mobile_api.py
py
1,556
python
en
code
0
github-code
18
[ { "api_name": "appium.webdriver.Remote", "line_number": 24, "usage_type": "call" }, { "api_name": "appium.webdriver", "line_number": 24, "usage_type": "name" }, { "api_name": "appium.webdriver.extensions.android.gsm.GsmCallActions.CALL", "line_number": 31, "usage_type": "...
44501283668
# %%%%%%%%%%%%% Machine Learning I %%%%%%%%%%%%%%%%%% # %%%%%%%%%%%%% Authors %%%%%%%%%%%%%%%%%%%%%%%%%%%% # Talal Alzahrani, MD, MPH ------>Email: tsa@gwu.edu # %%%%%%%%%%%%% Date %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% # Final version August - 01 - 2018 # %%%%%%%%%%%%% Exploratory Data Analysis %%%%%%%%%% # Importing the ...
tsa2018/ML1
Final Project_SVM.py
Final Project_SVM.py
py
2,909
python
en
code
0
github-code
18
[ { "api_name": "pandas.set_option", "line_number": 9, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 12, "usage_type": "call" }, { "api_name": "warnings.filterwarnings", "line_number": 47, "usage_type": "call" }, { "api_name": "pandas.read_...
41567752684
from drf_extra_fields.fields import Base64ImageField from recipes.models import Ingredient, Recipe, RecipeIngredient, Tag from rest_framework import serializers from .users import UserSerializer class TagSerializer(serializers.ModelSerializer): """Тэги.""" class Meta: model = Tag fields = ('i...
promodern4/foodgram-project-react
backend/api/serializers/recipes.py
recipes.py
py
4,949
python
en
code
0
github-code
18
[ { "api_name": "rest_framework.serializers.ModelSerializer", "line_number": 8, "usage_type": "attribute" }, { "api_name": "rest_framework.serializers", "line_number": 8, "usage_type": "name" }, { "api_name": "recipes.models.Tag", "line_number": 11, "usage_type": "name" }...
73253653800
import argparse import datetime import json import os import pathlib import platform import shlex import shutil import subprocess import sys import textwrap import requests from urllib.parse import urlparse def parse_arguments(): """ Arguments to be passed into the script """ parser = argparse.Argumen...
arn4v/auto-app-builder
build.py
build.py
py
15,426
python
en
code
0
github-code
18
[ { "api_name": "argparse.ArgumentParser", "line_number": 20, "usage_type": "call" }, { "api_name": "sys.argv", "line_number": 73, "usage_type": "attribute" }, { "api_name": "sys.exit", "line_number": 75, "usage_type": "call" }, { "api_name": "os.getcwd", "line_...
25463860385
import json from mailru_im_async_bot.event import EventType import state as State async def command(bot, event): await bot.send_text(chat_id=event.message_author['user_id'], text=f"command {event.text}") async def run(bot, event): await bot.send_text(chat_id=event.message_author['user_id'], text=f"run") async d...
ICQ-BOTS/tests_bot
event_handlers.py
event_handlers.py
py
2,179
python
en
code
0
github-code
18
[ { "api_name": "json.dumps", "line_number": 26, "usage_type": "call" }, { "api_name": "state.start_session", "line_number": 53, "usage_type": "call" }, { "api_name": "mailru_im_async_bot.event.EventType.CALLBACK_QUERY", "line_number": 59, "usage_type": "attribute" }, {...
25120118804
import pytest @pytest.mark.django_db() class TestSignupPage: def test_log_out(self, client, saved_supplier0): client.force_login(user=saved_supplier0.supplier_account) response = client.get('/logout') assert response.status_code == 302 assert response['Location'] == '/' ass...
redhat-beyond/BuyTogether
buy_together_app/tests/test_logout.py
test_logout.py
py
377
python
en
code
0
github-code
18
[ { "api_name": "pytest.mark.django_db", "line_number": 4, "usage_type": "call" }, { "api_name": "pytest.mark", "line_number": 4, "usage_type": "attribute" } ]
35286758606
from django.shortcuts import render, get_object_or_404 from django.http import HttpResponse, HttpResponseRedirect # Create your views here. from .models import Question # also need to import Choice from .models import Weather # we will need a reverse URL lookup from django.urls import reverse # it's a good idea to pas...
onionmccabbage/djangoTraining
mysite/polls/views_old.py
views_old.py
py
3,517
python
en
code
0
github-code
18
[ { "api_name": "models.Question.objects.order_by", "line_number": 12, "usage_type": "call" }, { "api_name": "models.Question.objects", "line_number": 12, "usage_type": "attribute" }, { "api_name": "models.Question", "line_number": 12, "usage_type": "name" }, { "api...
19257960445
import pytest import pathlib from click.testing import CliRunner from flexmock import flexmock from ibata.CategoriesSummary import CategoriesSummary from ibata.Category import Category from ibata.Transaction import Transaction @pytest.fixture def runner(): return CliRunner() @pytest.fixture def config_dir(): ...
stepa0648/ibata
tests/conftest.py
conftest.py
py
2,487
python
en
code
0
github-code
18
[ { "api_name": "click.testing.CliRunner", "line_number": 13, "usage_type": "call" }, { "api_name": "pytest.fixture", "line_number": 11, "usage_type": "attribute" }, { "api_name": "pathlib.Path", "line_number": 18, "usage_type": "call" }, { "api_name": "pytest.fixtu...
16794668262
import streamlit as st import yfinance as yf import pandas as pd import cufflinks as cf import datetime from fbprophet import Prophet from fbprophet.plot import plot_plotly from plotly import graph_objs as go hide_streamlit_style = """ <style> #MainMenu {visibility: hidden;} .main...
rathaman1711/StockPredictionApp
Stock_Predict.py
Stock_Predict.py
py
3,422
python
en
code
1
github-code
18
[ { "api_name": "streamlit.markdown", "line_number": 34, "usage_type": "call" }, { "api_name": "streamlit.markdown", "line_number": 37, "usage_type": "call" }, { "api_name": "streamlit.sidebar.subheader", "line_number": 44, "usage_type": "call" }, { "api_name": "str...
5064285804
#!/usr/bin/env python3 import os import glob import base64 import pynvim class GossipComment: def __init__(self, path): self.path = path with open(path) as f: self.text = f.read() filename = os.path.basename(path) b64ref, _ = filename.split('.gossip.md',maxsplit=1) ...
dixler/nvim-setup
rplugin/python3/github.py
github.py
py
8,755
python
en
code
0
github-code
18
[ { "api_name": "os.path.basename", "line_number": 13, "usage_type": "call" }, { "api_name": "os.path", "line_number": 13, "usage_type": "attribute" }, { "api_name": "base64.b64decode", "line_number": 15, "usage_type": "call" }, { "api_name": "os.path.abspath", ...
30618715454
import functools import inspect import logging import os import torch import torch.nn as nn from torch.nn import init from .helpers import build_model_with_cfg from .registry import register_model __all__ = ['UnetGenerator'] def _cfg(url='', **kwargs): return { 'url': url, # 'interpolation': 't...
RimeT/ptimz
ptimz/model_zoo/cyclegan2d.py
cyclegan2d.py
py
16,947
python
en
code
0
github-code
18
[ { "api_name": "os.path.join", "line_number": 61, "usage_type": "call" }, { "api_name": "os.path", "line_number": 61, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 62, "usage_type": "attribute" }, { "api_name": "torch.load", "line_number...
3575785071
import pandas as pd import tensorflow as tf from sklearn.model_selection import train_test_split tf.logging.set_verbosity(tf.logging.ERROR) def create_csv(): file = open('offline-train.txt','r') with open('data.csv','w') as fcsv: fcsv.write("Metric,Timestamp,Label,SR,Rate,GR,Load\n") for f in file: ...
yatharth2209/Fault-Diagnostic-Model
dnn.py
dnn.py
py
2,709
python
en
code
3
github-code
18
[ { "api_name": "tensorflow.logging.set_verbosity", "line_number": 5, "usage_type": "call" }, { "api_name": "tensorflow.logging", "line_number": 5, "usage_type": "attribute" }, { "api_name": "pandas.read_csv", "line_number": 38, "usage_type": "call" }, { "api_name":...
39435018363
import json import subprocess import sys from dataclasses import dataclass from functools import cached_property # Gufo Thor modules from .log import logger @dataclass class DockerConfig(object): """ Docker daemon configuration. Attributes: logging_driver: Current logging driver. server_...
gufolabs/gufo_thor
src/gufo/thor/docker.py
docker.py
py
3,457
python
en
code
0
github-code
18
[ { "api_name": "dataclasses.dataclass", "line_number": 11, "usage_type": "name" }, { "api_name": "sys.modules", "line_number": 38, "usage_type": "attribute" }, { "api_name": "functools.cached_property", "line_number": 30, "usage_type": "name" }, { "api_name": "log....
31983479048
import sys import os import socket import logging from typing import Union, Any from pathlib import Path from ast import literal_eval from configparser import ConfigParser, NoSectionError from node import __version__ log = logging.getLogger() class NodeConfig(ConfigParser): _instances = {} def __init__(sel...
OLED1/chia-manager-client
node/NodeConfig.py
NodeConfig.py
py
4,116
python
en
code
0
github-code
18
[ { "api_name": "logging.getLogger", "line_number": 12, "usage_type": "call" }, { "api_name": "configparser.ConfigParser", "line_number": 15, "usage_type": "name" }, { "api_name": "pathlib.Path", "line_number": 21, "usage_type": "call" }, { "api_name": "os.path.real...
13744157229
import time from pathlib import Path import sys import os from src.aligners.barcode_aligner import BarcodeAligner from src.aligners.library_matcher import OligoMatcher # from src.analyzers.deletion_analyzer import DeletionAnalyzer from src.analyzers.deletion_position_per_base_analyzer import DeletionPositionPerBaseAna...
rodanguy1/DNA-storage-web
eitans_files/Library-Analyzer-master/main.py
main.py
py
8,315
python
en
code
0
github-code
18
[ { "api_name": "seaborn.set", "line_number": 25, "usage_type": "call" }, { "api_name": "seaborn.set_palette", "line_number": 26, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.rc", "line_number": 27, "usage_type": "call" }, { "api_name": "matplotlib.pyplo...
6924216296
import cv2 from matplotlib import pyplot as plt #khandane aks img = cv2.imread("images/IMG_2933_resize.jpg",0) #emale filtere gaussian baraye kaheshe noise gaussian = cv2.GaussianBlur(img, (3,3), 0) #emale filtere laplacian bar rooye tasvir hamvar sazi shode LoG = cv2.Laplacian(gaussian, cv2.CV_8UC1, ksize=3) #nama...
ZahraEk/Tahlil_SarSilandr
SarSilandr_EdgeDetection.py
SarSilandr_EdgeDetection.py
py
629
python
en
code
0
github-code
18
[ { "api_name": "cv2.imread", "line_number": 5, "usage_type": "call" }, { "api_name": "cv2.GaussianBlur", "line_number": 8, "usage_type": "call" }, { "api_name": "cv2.Laplacian", "line_number": 11, "usage_type": "call" }, { "api_name": "cv2.CV_8UC1", "line_numbe...
10849943282
from fractions import Fraction x = Fraction(2, 7) * Fraction(5, 6) * Fraction(1, 5) y = Fraction(5, 7) * Fraction(2, 6) * Fraction(1, 5) z = Fraction(5, 7) * Fraction(4, 6) * Fraction(2, 5) p = x + y + z print("show probability: ", p) print(" ------------------------------------ ")
garyhsieh15/testdir
python_math/draw_lots.py
draw_lots.py
py
287
python
en
code
0
github-code
18
[ { "api_name": "fractions.Fraction", "line_number": 4, "usage_type": "call" }, { "api_name": "fractions.Fraction", "line_number": 5, "usage_type": "call" }, { "api_name": "fractions.Fraction", "line_number": 6, "usage_type": "call" } ]
6836920411
#!/usr/bin/env python3 ''' Created on 20190209 Update on 20190209 @author: Eduardo Pagotto ''' #pylint: disable=C0301 #pylint: disable=C0103 #pylint: disable=W0703 #pylint: disable=R0913 import logging import subprocess def execute_conversao(comando): separado = comando.split(' ') proc = subprocess.Popen(sep...
DeveloperBlumenauTeam/csapp
utils/executor.py
executor.py
py
1,248
python
en
code
0
github-code
18
[ { "api_name": "subprocess.Popen", "line_number": 18, "usage_type": "call" }, { "api_name": "subprocess.PIPE", "line_number": 21, "usage_type": "attribute" }, { "api_name": "subprocess.STDOUT", "line_number": 22, "usage_type": "attribute" }, { "api_name": "logging....
18233272359
import torch import torch.nn as nn import torch.nn as nn class Focal2DLoss(nn.Module): def __init__(self, alpha=0.9, gamma=2): super(Focal2DLoss, self).__init__() self.base_criterion = nn.MSELoss() self.alpha = alpha self.gamma = gamma def forward(self, logit, label): ...
czifan/pytorch-ChetPose
chetpose/models/losses.py
losses.py
py
5,737
python
en
code
1
github-code
18
[ { "api_name": "torch.nn.Module", "line_number": 5, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 5, "usage_type": "name" }, { "api_name": "torch.nn.MSELoss", "line_number": 8, "usage_type": "call" }, { "api_name": "torch.nn", "line_numb...
22140158418
#coding:utf-8 import numpy as np import os,pathlib import torch root = pathlib.Path(os.path.abspath(__file__)).parent.parent.parent class TextcnnConfig(object): def __init__(self): self.corpus_path = os.path.join(root,"data","dataset","origin","qa_corpus.xlsx") self.answer_map_path = os.path.join...
DengYangyong/retrieval_chatbot
nlu/textcnn/textcnn_config.py
textcnn_config.py
py
1,488
python
en
code
10
github-code
18
[ { "api_name": "pathlib.Path", "line_number": 6, "usage_type": "call" }, { "api_name": "os.path.abspath", "line_number": 6, "usage_type": "call" }, { "api_name": "os.path", "line_number": 6, "usage_type": "attribute" }, { "api_name": "os.path.join", "line_numbe...
29895092173
import cv2 from os import listdir import numpy as np from datetime import datetime path = 'C:\\Users\\ravel\\Google Drive\\M2\\Projet\\amicorpus\\IS1000a\\video\\IS1000a.C.avi' array = [] #On sauvegarde le nombre de visages detecté def difference(oldFrame,newFrame): print("Difference : ") diff...
masterdcups/team-PAM
opencv2.py
opencv2.py
py
2,916
python
en
code
0
github-code
18
[ { "api_name": "cv2.absdiff", "line_number": 14, "usage_type": "call" }, { "api_name": "numpy.sum", "line_number": 26, "usage_type": "call" }, { "api_name": "cv2.CascadeClassifier", "line_number": 35, "usage_type": "call" }, { "api_name": "cv2.CascadeClassifier", ...
71535360039
from django.urls import path from . import views from .views import DeletePostView, AddDislikes,AddLikes, AddCommentDislikes, AddCommentLikes, CommentReplyView, PostDetailView, EditPostView, ProfileView,ProfileEditView,PostNotificationView urlpatterns = [ path("", views.starting_page_view, name="home-page"), p...
dashney22/Logistics-Conversation
my_site/blog/urls.py
urls.py
py
2,292
python
en
code
0
github-code
18
[ { "api_name": "django.urls.path", "line_number": 6, "usage_type": "call" }, { "api_name": "views.starting_page_view", "line_number": 6, "usage_type": "attribute" }, { "api_name": "django.urls.path", "line_number": 7, "usage_type": "call" }, { "api_name": "views.cr...
27336434021
# Authors: Eric Larson <larson.eric.d@gmail.com> # Sheraz Khan <sheraz@khansheraz.com> # Denis Engemann <denis.engemann@gmail.com> # # License: BSD (3-clause) import numpy as np from ..filter import next_fast_len from ..source_estimate import _BaseSourceEstimate from ..utils import verbose, _check_c...
soheilbr82/BluegrassWorkingMemory
Python_Engine/Lib/site-packages/mne/connectivity/envelope.py
envelope.py
py
5,495
python
en
code
5
github-code
18
[ { "api_name": "utils._check_option", "line_number": 66, "usage_type": "call" }, { "api_name": "utils._check_combine", "line_number": 70, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 72, "usage_type": "attribute" }, { "api_name": "source_esti...
11139946804
import discord import os import gdb import botio from dconsts import DefaultConstants as const, DefaultRegexes as regex from p_action import PlayerAction from keep_alive import keep_alive # editar: TALVEZ transformar usar a propria PlayerAction ao inves de uma instancia da classe bot = discord.Client() cmd = botio.Com...
ngsylar/legendary_discord
src/main.py
main.py
py
3,423
python
pt
code
0
github-code
18
[ { "api_name": "discord.Client", "line_number": 10, "usage_type": "call" }, { "api_name": "botio.CommandAnalyzer", "line_number": 11, "usage_type": "call" }, { "api_name": "botio.AutoResponder", "line_number": 12, "usage_type": "call" }, { "api_name": "gdb.GuildMem...
74599364521
"Functions for cross validation." import os from copy import deepcopy from itertools import combinations from collections import defaultdict import json import numpy as np import pandas as pd import seaborn as sns import matplotlib.pyplot as plt from tabulate import tabulate from radial.batchflow import Dataset, File...
analysiscenter/radial
research/research_utils.py
research_utils.py
py
16,647
python
en
code
1
github-code
18
[ { "api_name": "radial.batchflow.FilesIndex", "line_number": 44, "usage_type": "call" }, { "api_name": "radial.batchflow.Dataset", "line_number": 48, "usage_type": "call" }, { "api_name": "numpy.array_split", "line_number": 52, "usage_type": "call" }, { "api_name":...
29979323968
from looker_sdk import models, error from lmanage.configurator.user_group_configuration.create_role_base import CreateRoleBase from lmanage.utils.errorhandling import return_error_message from tqdm import tqdm from tenacity import retry, wait_random, wait_fixed, stop_after_attempt class CreateInstanceRoles(CreateRole...
looker-open-source/lmanage
lmanage/configurator/user_group_configuration/create_instance_roles.py
create_instance_roles.py
py
4,913
python
en
code
10
github-code
18
[ { "api_name": "lmanage.configurator.user_group_configuration.create_role_base.CreateRoleBase", "line_number": 8, "usage_type": "name" }, { "api_name": "looker_sdk.models.WriteRole", "line_number": 37, "usage_type": "attribute" }, { "api_name": "looker_sdk.models", "line_numbe...
28729555432
#!/usr/bin/python # Support for python2 from __future__ import print_function #Modify system path import sys sys.path.append('../pycThermopack/') # Importing pyThermopack from pyctp import quantum_cubic # Importing Numpy (math, arrays, etc...) import numpy as np # Importing Matplotlib (plotting) import matplotlib.pyplo...
SINTEF/thermopack
addon/pyExamples/quantum_cubic.py
quantum_cubic.py
py
841
python
en
code
40
github-code
18
[ { "api_name": "sys.path.append", "line_number": 6, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 6, "usage_type": "attribute" }, { "api_name": "pyctp.quantum_cubic.qcubic", "line_number": 15, "usage_type": "call" }, { "api_name": "pyctp.quantum_...
11480532911
# -*- coding: utf-8 -*- """ Created on Tue Mar 15 23:18:35 2022 @author: lamya """ from flask import Flask, render_template, request import pickle import re #from farasa.segmenter import FarasaSegmenter from arabert.preprocess import ArabertPreprocessor from pyarabic.araby import strip_tashkeel,strip_tatweel from n...
Lamyaa-Zayed/ArabicDialectsClassification
App.py
App.py
py
4,675
python
en
code
1
github-code
18
[ { "api_name": "arabert.preprocess.ArabertPreprocessor", "line_number": 18, "usage_type": "call" }, { "api_name": "nltk.tokenize.TweetTokenizer", "line_number": 21, "usage_type": "call" }, { "api_name": "re.sub", "line_number": 24, "usage_type": "call" }, { "api_na...
40743361829
# mFLIM dataset synthetic generator import logging as log import numpy as np import scipy.io from scipy import linalg def update_args(kwargs: dict) -> dict: args_given = list(kwargs.keys()) default_args = {'n_order': 2, 'n_samples': 60, 'ts': 0.25e-9, 'snr': 0, 'psnr': 0} for arg in args_given: ...
NoriakiMawatari/EBEAE_Algorithm
mFLIMsynth.py
mFLIMsynth.py
py
9,089
python
en
code
0
github-code
18
[ { "api_name": "logging.info", "line_number": 42, "usage_type": "call" }, { "api_name": "logging.error", "line_number": 57, "usage_type": "call" }, { "api_name": "numpy.arange", "line_number": 60, "usage_type": "call" }, { "api_name": "numpy.meshgrid", "line_nu...
21585028504
from bs4 import BeautifulSoup import requests import re from selenium import webdriver def importUBetNBAPage(): #Opens the page and returns the html inside browser = webdriver.Chrome() url = "https://ubet.com/sports/basketball/nba/nba-matches" browser.get(url) # innerHTML = browser.execute_script(...
cheelees/bettingScraper
ubet.py
ubet.py
py
2,239
python
en
code
1
github-code
18
[ { "api_name": "selenium.webdriver.Chrome", "line_number": 9, "usage_type": "call" }, { "api_name": "selenium.webdriver", "line_number": 9, "usage_type": "name" }, { "api_name": "bs4.BeautifulSoup", "line_number": 28, "usage_type": "call" } ]
16687089952
#!python __author__ = "DMcG" __date__ = "$Jun 23, 2015 10:27:29 AM$" import socket import time from io import BytesIO from opendis.DataOutputStream import DataOutputStream from opendis.dis7 import EntityStatePdu from opendis.RangeCoordinates import * UDP_PORT = 3001 DESTINATION_ADDRESS = "127.0.0.1" udpSocket = s...
open-dis/open-dis-python
examples/dis_sender.py
dis_sender.py
py
1,832
python
en
code
42
github-code
18
[ { "api_name": "socket.socket", "line_number": 18, "usage_type": "call" }, { "api_name": "socket.AF_INET", "line_number": 18, "usage_type": "attribute" }, { "api_name": "socket.SOCK_DGRAM", "line_number": 18, "usage_type": "attribute" }, { "api_name": "socket.SOL_S...
14391045663
import numpy as np import matplotlib.pyplot as plt import h5py def cargar_dataset(): train_dataset = h5py.File('datos/train_gato_vs_otros.h5', "r") # características del conjunto de entrenamiento train_set_x_orig = np.array(train_dataset["train_set_x"][:]) # etiquetas del conjunto de entrenamiento ...
fisico-alienado/TFM
Archivo_4/funciones_redes_neuronales.py
funciones_redes_neuronales.py
py
20,255
python
es
code
0
github-code
18
[ { "api_name": "h5py.File", "line_number": 7, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 9, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 11, "usage_type": "call" }, { "api_name": "h5py.File", "line_number": 13, ...
31342586552
import os import numpy as np from tqdm import tqdm import matplotlib.pyplot as plt from matplotlib.animation import FuncAnimation from data_source import DataSource from settings import videos_folder from util import parseTimestampToDate class DataPlot: """ This class creates the video with plotted data. """ ...
jefmenegazzo/MPU-9250-Data-Plot-Video-Creator
src/data_plot.py
data_plot.py
py
9,301
python
en
code
2
github-code
18
[ { "api_name": "data_source.DataSource", "line_number": 102, "usage_type": "call" }, { "api_name": "numpy.arange", "line_number": 104, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.figure", "line_number": 194, "usage_type": "call" }, { "api_name": "matpl...
40846824614
import os import torch import torch.nn as nn import torch.optim as optim import torchvision import torchvision.models as models import torchvision.transforms as transforms import argparse import importlib from PIL import ImageFile ImageFile.LOAD_TRUNCATED_IMAGES = True def test(model, test_loader, criterion, device,...
acareyup/Image-Classification-using-AWS-SageMaker
train_model.py
train_model.py
py
6,302
python
en
code
1
github-code
18
[ { "api_name": "PIL.ImageFile.LOAD_TRUNCATED_IMAGES", "line_number": 12, "usage_type": "attribute" }, { "api_name": "PIL.ImageFile", "line_number": 12, "usage_type": "name" }, { "api_name": "importlib.import_module", "line_number": 16, "usage_type": "call" }, { "ap...
27538283549
import numpy as np import pandas as pd from os.path import exists, join from sklearn.metrics import mean_squared_error as mse from datasets.dataloading import get_all_datasets from experiments import results_path def scale_loss(L, L_min, L_max): return (L - L_min) / (L_max - L_min) def main(): data = get_a...
g9a78ga0s8f6b/tsms
code/run_evaluation.py
run_evaluation.py
py
2,213
python
en
code
0
github-code
18
[ { "api_name": "datasets.dataloading.get_all_datasets", "line_number": 15, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 16, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_number": 21, "usage_type": "call" }, { "api_name": "os....
20559584363
import requests from datetime import datetime from bs4 import BeautifulSoup def show_definitions(soup): senseList = [] senses = soup.find_all('li', class_='sense') for s in senses: definition = s.find('span', class_='def').text print(definition) word_to_search = 'warp' scrape_u...
77neo/my-repo-zero
python/eve/meaning.py
meaning.py
py
749
python
en
code
0
github-code
18
[ { "api_name": "requests.get", "line_number": 16, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_number": 19, "usage_type": "call" } ]
11460371440
import pandas as pd from selenium import webdriver from selenium.webdriver.chrome.options import Options from webdriver_manager.chrome import ChromeDriverManager from selenium.common.exceptions import NoSuchElementException from selenium.common.exceptions import StaleElementReferenceException from selenium.webdriver....
LuisOlCo/Web-Crawling
depression_users_v2/User.py
User.py
py
10,495
python
en
code
0
github-code
18
[ { "api_name": "selenium.common.exceptions.NoSuchElementException", "line_number": 86, "usage_type": "name" }, { "api_name": "selenium.common.exceptions.StaleElementReferenceException", "line_number": 86, "usage_type": "name" }, { "api_name": "selenium.webdriver.support.ui.WebDriv...
28082271483
import tempfile import unittest import yaml import config_helper import print_config class PrintConfigTest(unittest.TestCase): def test_load_yaml_file(self): schema = config_helper.Schema.load_yaml( """ properties: propertyInt: type: int propertyString: ...
cliveseldon/marketplace-k8s-app-tools
marketplace/deployer_util/print_config_test.py
print_config_test.py
py
2,861
python
en
code
0
github-code
18
[ { "api_name": "unittest.TestCase", "line_number": 10, "usage_type": "attribute" }, { "api_name": "config_helper.Schema.load_yaml", "line_number": 12, "usage_type": "call" }, { "api_name": "config_helper.Schema", "line_number": 12, "usage_type": "attribute" }, { "a...
21736252235
import argparse import sys from sudoku import Sudoku from ac3 import AC3 from backtrack import recursive_backtrack_algorithm from utils import fetch_sudokus, print_grid """ default sudokus' grid """ sudokus = dict( easy = "000079065000003002005060093340050106000000000608020059950010600700600000820390000", medi...
stressGC/Python-AC3-Backtracking-CSP-Sudoku-Solver
solver.py
solver.py
py
3,328
python
en
code
10
github-code
18
[ { "api_name": "utils.print_grid", "line_number": 22, "usage_type": "call" }, { "api_name": "sudoku.Sudoku", "line_number": 29, "usage_type": "call" }, { "api_name": "ac3.AC3", "line_number": 32, "usage_type": "call" }, { "api_name": "sudoku.isFinished", "line_...
27243489059
from cProfile import label import sys,os sys.path.append(os.path.join(os.getcwd(), '.')) import aditofpython.aditofpython as tof import numpy as np import cv2 as cv from enum import Enum import matplotlib.pyplot as plt import time from time import perf_counter from scipy.interpolate import make_inte...
jhndan/Acuesta-Bautista_Internship_2022
tof/fps_times_sample.py
fps_times_sample.py
py
9,360
python
en
code
0
github-code
18
[ { "api_name": "sys.path.append", "line_number": 3, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 3, "usage_type": "attribute" }, { "api_name": "os.path.join", "line_number": 3, "usage_type": "call" }, { "api_name": "os.path", "line_number": ...
3953286214
from collections.abc import Iterator import contextlib import os import random import re import numpy as np from tensorflow.core.framework import types_pb2 from tensorflow.core.protobuf import config_pb2 from tensorflow.core.protobuf import rewriter_config_pb2 from tensorflow.python.client import session from tensorf...
tensorflow/tensorflow
tensorflow/compiler/tests/xla_test.py
xla_test.py
py
12,820
python
en
code
178,918
github-code
18
[ { "api_name": "tensorflow.python.platform.flags.FLAGS", "line_number": 25, "usage_type": "attribute" }, { "api_name": "tensorflow.python.platform.flags", "line_number": 25, "usage_type": "name" }, { "api_name": "tensorflow.python.platform.flags.DEFINE_string", "line_number": ...
16623813081
# coding: utf-8 # Standard Python libraries import io from typing import Optional, Tuple, Union # https://github.com/usnistgov/DataModelDict from DataModelDict import DataModelDict as DM # https://github.com/usnistgov/yabadaba from yabadaba.record import Record class Link(Record): """ Class for describing we...
usnistgov/potentials
potentials/record/Link.py
Link.py
py
5,405
python
en
code
9
github-code
18
[ { "api_name": "yabadaba.record.Record", "line_number": 12, "usage_type": "name" }, { "api_name": "typing.Union", "line_number": 17, "usage_type": "name" }, { "api_name": "io.IOBase", "line_number": 17, "usage_type": "attribute" }, { "api_name": "DataModelDict.Data...
32070621599
from __future__ import annotations __all__ = [ "check_jax", "check_numpy", "check_pandas", "check_polars", "check_torch", "check_xarray", "is_jax_available", "is_numpy_available", "is_pandas_available", "is_polars_available", "is_torch_available", "is_xarray_available", ...
durandtibo/coola
src/coola/utils/imports.py
imports.py
py
4,320
python
en
code
1
github-code
18
[ { "api_name": "importlib.util.find_spec", "line_number": 28, "usage_type": "call" }, { "api_name": "importlib.util.find_spec", "line_number": 53, "usage_type": "call" }, { "api_name": "importlib.util.find_spec", "line_number": 78, "usage_type": "call" }, { "api_na...
14623814221
#!/usr/bin/env python # -*- coding: utf-8 -*- # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed...
vigossjjj/python-client
test/functional/android/appium_tests.py
appium_tests.py
py
5,393
python
en
code
null
github-code
18
[ { "api_name": "unittest.TestCase", "line_number": 27, "usage_type": "attribute" }, { "api_name": "desired_capabilities.get_desired_capabilities", "line_number": 29, "usage_type": "call" }, { "api_name": "appium.webdriver.Remote", "line_number": 30, "usage_type": "call" ...
31127585439
# The goal of this script is to get all the stats from the sensors to: # - print to the epaper screen # - print to plant_stats.csv - you can then use a spreadsheet of choice and draw cool graphs from it. # - Drive the different microcontrolers to control inside climate: turn on/off fans, heat mat (not done), and water ...
user0610/bluebucketpi
print_status_epaper.py
print_status_epaper.py
py
3,431
python
en
code
8
github-code
18
[ { "api_name": "datetime.datetime.now", "line_number": 37, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 37, "usage_type": "attribute" }, { "api_name": "water.get_status", "line_number": 39, "usage_type": "call" }, { "api_name": "water.g...
40203874089
import sys import argparse from taggers import stub from taggers import corenlp from taggers import nltkchunker from taggers import spacy # Download from https://nlp.stanford.edu/software/CRF-NER.html#Download CORENLP_DIR = '../../stanford-ner-2018-02-27' def make_tagger(name): if name == 'stub': return ...
gasani/undergraduate-practice
ner/main.py
main.py
py
1,074
python
en
code
0
github-code
18
[ { "api_name": "taggers.stub.StubNer", "line_number": 14, "usage_type": "call" }, { "api_name": "taggers.stub", "line_number": 14, "usage_type": "name" }, { "api_name": "taggers.corenlp.StanfordNer", "line_number": 16, "usage_type": "call" }, { "api_name": "taggers...
12667950195
from urllib.parse import parse_qs from html import escape import db import http_wsgi as hw import os from string import Template from hashlib import md5 TEMPLATE_DIR = os.path.join(os.path.dirname(__file__), 'templates') def render(template_name): template_path = os.path.join(TEMPLATE_DIR, template_name) mas...
PashaLisovchenko/wsgi-url-shorted
mywsgi.py
mywsgi.py
py
2,192
python
en
code
0
github-code
18
[ { "api_name": "os.path.join", "line_number": 9, "usage_type": "call" }, { "api_name": "os.path", "line_number": 9, "usage_type": "attribute" }, { "api_name": "os.path.dirname", "line_number": 9, "usage_type": "call" }, { "api_name": "os.path.join", "line_numbe...
15208993959
from args import parse_config from utils import * from sklearn.model_selection import train_test_split import pandas as pd import numpy as np import torch from VAE_trainer import VAE_trainer from AE_trainer import AE_trainer from BFM_trainer import BFM_trainer from RBSVD_trainer import RBSVD_trainer from Iter...
xiyichen/collaborative-filtering
main.py
main.py
py
2,547
python
en
code
3
github-code
18
[ { "api_name": "args.get", "line_number": 21, "usage_type": "call" }, { "api_name": "AE_trainer.AE_trainer", "line_number": 23, "usage_type": "call" }, { "api_name": "VAE_trainer.VAE_trainer", "line_number": 25, "usage_type": "call" }, { "api_name": "BFM_trainer.BF...
34617373550
# -*- coding: utf-8 -*- from requests_oauthlib import OAuth1Session import json import datetime, time, sys, calendar import os import codecs import csv import urllib.parse import pandas as pd from abc import ABCMeta, abstractmethod from sub.concat_csv import CSV_CONCAT from sub.shaping_for_fasttext import SHAPING_FOR_F...
iwatashuho/twitter_categorized
learn_fasttext/get_tweet.py
get_tweet.py
py
13,676
python
ja
code
0
github-code
18
[ { "api_name": "os.path.dirname", "line_number": 15, "usage_type": "call" }, { "api_name": "os.path", "line_number": 15, "usage_type": "attribute" }, { "api_name": "os.path.abspath", "line_number": 15, "usage_type": "call" }, { "api_name": "os.path.normpath", "...
71322718441
import numpy as np, pandas as pd, seaborn as sns, dataframe.datagrid as dg import os from sklearn.cluster import KMeans import scipy.cluster.hierarchy as sch from scipy.spatial.distance import squareform from sklearn.utils.testing import all_estimators from sklearn.preprocessing import LabelBinarizer, StandardScaler, M...
clintg105/Catfish-Ultrasound-Classification
DimensionReduction/Python/feature_selection/feature_explore.py
feature_explore.py
py
10,650
python
en
code
1
github-code
18
[ { "api_name": "pandas.DataFrame", "line_number": 26, "usage_type": "attribute" }, { "api_name": "seaborn.heatmap", "line_number": 49, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.show", "line_number": 66, "usage_type": "call" }, { "api_name": "matplotl...
71891864680
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Sep 13 08:59:42 2019 @author: Rajiv Sambasivan """ from math import ceil import numpy as np import pandas as pd import torch from sklearn.preprocessing import StandardScaler from torch.utils import data class CH_Dataset(data.Dataset): "Characteri...
arangoml/arangopipe
arangopipe/tests/pytorch/ch_data_loader.py
ch_data_loader.py
py
2,083
python
en
code
121
github-code
18
[ { "api_name": "torch.utils.data.Dataset", "line_number": 17, "usage_type": "attribute" }, { "api_name": "torch.utils.data", "line_number": 17, "usage_type": "name" }, { "api_name": "pandas.read_csv", "line_number": 23, "usage_type": "call" }, { "api_name": "numpy....
15404619000
import pygame from sys import exit pygame.init() screen = pygame.display.set_mode((800, 400)) pygame.display.set_caption("Platformer Game") clock = pygame.time.Clock() bg = pygame.Surface((800, 400)) ground = pygame.Surface((800, 200)) font = pygame.font.Font('font/nova.ttf', 30) enemy = pygame.Surface((50, 50)) playe...
X0AM/platformer-game
main.py
main.py
py
1,225
python
en
code
0
github-code
18
[ { "api_name": "pygame.init", "line_number": 4, "usage_type": "call" }, { "api_name": "pygame.display.set_mode", "line_number": 5, "usage_type": "call" }, { "api_name": "pygame.display", "line_number": 5, "usage_type": "attribute" }, { "api_name": "pygame.display.s...
34755843993
from collections import deque nums = list(map(int, input().split(","))) nums_list = list(enumerate(nums)) # 队列的使用 queue = deque() for num in nums_list: queue.append((num[0], num[1])) ans, count = list(), 0 while True: if len(queue) <= 1: break task = queue.popleft() cur_max = max(queue, key=l...
haunglai/odpython
11/Python 实现【打印任务排序】/Python 实现【打印任务排序】.py
Python 实现【打印任务排序】.py
py
576
python
en
code
0
github-code
18
[ { "api_name": "collections.deque", "line_number": 7, "usage_type": "call" } ]
5254969239
import numpy as np import os import sys import re import json from scipy.spatial.transform import Rotation as R import shutil import struct ################################# # General Helper Functions # ################################# def rotate_positions_around_z(positions): """ Given a list of coor...
kmshin1397/ETSimulations
src/processors/artiatomi_processor.py
artiatomi_processor.py
py
35,469
python
en
code
0
github-code
18
[ { "api_name": "scipy.spatial.transform.Rotation.from_euler", "line_number": 28, "usage_type": "call" }, { "api_name": "scipy.spatial.transform.Rotation", "line_number": 28, "usage_type": "name" }, { "api_name": "numpy.dot", "line_number": 30, "usage_type": "call" }, {...
12532129308
import click import os import torch import torch.cuda from torch.nn import functional as F from torch.optim import Adam from torch.utils.data import DataLoader from util.dataset import DADataset, load_source_target_datasets from util.io import get_config, save_model from util.net import LenetClassifier, weights_init f...
naoto0804/pytorch-domain-adaptation
train_classifier.py
train_classifier.py
py
2,893
python
en
code
24
github-code
18
[ { "api_name": "torch.backends", "line_number": 15, "usage_type": "attribute" }, { "api_name": "util.io.get_config", "line_number": 24, "usage_type": "call" }, { "api_name": "os.makedirs", "line_number": 30, "usage_type": "call" }, { "api_name": "torch.device", ...
30139053482
from django.shortcuts import render, redirect import asyncio import telethon # from telethon import TelegramClient, events, sync from telethon.tl.functions.channels import JoinChannelRequest # from telegram.client import Telegram import socks # Create your views here. api_id = 111111 api_hash = 'apifromtelegram' # l...
Begzi/Telegram
connection/views.py
views.py
py
9,422
python
en
code
0
github-code
18
[ { "api_name": "asyncio.new_event_loop", "line_number": 154, "usage_type": "call" }, { "api_name": "asyncio.set_event_loop", "line_number": 155, "usage_type": "call" }, { "api_name": "telethon.TelegramClient", "line_number": 156, "usage_type": "call" }, { "api_name...
14317549481
#!/usr/bin/env python import sys from os import remove, path import shutil from setuptools import setup from distutils.command.clean import clean from distutils.extension import Extension # if cythonize is not used - need to use Cython's build_ext # so it autogenerates the C++ code before compiling # look into cython...
sandhujasmine/CythonExample
setup.py
setup.py
py
3,086
python
en
code
1
github-code
18
[ { "api_name": "os.path.dirname", "line_number": 17, "usage_type": "call" }, { "api_name": "os.path", "line_number": 17, "usage_type": "name" }, { "api_name": "os.path.join", "line_number": 20, "usage_type": "call" }, { "api_name": "os.path", "line_number": 20,...
33596569829
from django.db import models from django.utils.translation import ugettext_lazy as _ from django.template.loader import render_to_string from django.core.exceptions import ValidationError from django.conf import settings from cms.models import CMSPlugin from geopy.geocoders import Here def get_geolocation(street: s...
creimers/cmsplugin_multipinmap
cmsplugin_multipinmap/models.py
models.py
py
4,855
python
en
code
1
github-code
18
[ { "api_name": "geopy.geocoders.Here", "line_number": 13, "usage_type": "call" }, { "api_name": "django.conf.settings.HERE_APP_ID", "line_number": 13, "usage_type": "attribute" }, { "api_name": "django.conf.settings", "line_number": 13, "usage_type": "name" }, { "a...
1084793879
import pandas as pd from matplotlib import pyplot from statsmodels.tsa.arima.model import ARIMA from sklearn.metrics import mean_squared_error import warnings warnings.simplefilter('ignore', category=UserWarning) dataset = "Paleo" series = pd.read_csv(f'{dataset}.csv', header=0, index_col=0, parse_dates=Tr...
hej6853/Nutrition-Project
ARIMA_WIP (1).py
ARIMA_WIP (1).py
py
945
python
en
code
1
github-code
18
[ { "api_name": "warnings.simplefilter", "line_number": 7, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 11, "usage_type": "call" }, { "api_name": "statsmodels.tsa.arima.model.ARIMA", "line_number": 15, "usage_type": "call" }, { "api_name":...
31191822814
""" KaznetContentType Serializer """ from django.contrib.contenttypes.models import ContentType from rest_framework import serializers class KaznetContentTypeSerializer(serializers.ModelSerializer): """ Class for KaznetContentTypeSerializer """ # pylint: disable=too-few-public-methods class Meta...
onaio/kaznet-web
kaznet/apps/main/serializers/contenttype.py
contenttype.py
py
520
python
en
code
4
github-code
18
[ { "api_name": "rest_framework.serializers.ModelSerializer", "line_number": 9, "usage_type": "attribute" }, { "api_name": "rest_framework.serializers", "line_number": 9, "usage_type": "name" }, { "api_name": "django.contrib.contenttypes.models.ContentType", "line_number": 19, ...
12262020951
import requests from bs4 import BeautifulSoup import re url = "https://butterfly-conservation.org/uk-butterflies/a-to-z" r = requests.get("https://butterfly-conservation.org/uk-butterflies/a-to-z", verify=False) soup = BeautifulSoup(r.text, features="html.parser") links = soup.find_all("a") # for link in links: ...
jho97/data_analyst_week_5
june_13/personal_work/lab.py
lab.py
py
1,467
python
en
code
0
github-code
18
[ { "api_name": "requests.get", "line_number": 6, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_number": 8, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 31, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "li...
74220366440
# -*- coding: utf-8 -*- __author__ = 'alan' __date__ = '18-3-25 上午10:11' from . import home from flask import render_template, url_for, redirect, flash, request, session from app.home.forms import RegisterForm, LoginForm, UserForm, PwdForm, CommentForm from app.models import User, UserLog, Comment, Movie, Preview, Tag,...
getting/flask_online_video
app/home/views.py
views.py
py
11,438
python
en
code
16
github-code
18
[ { "api_name": "os.path.dirname", "line_number": 20, "usage_type": "call" }, { "api_name": "os.path", "line_number": 20, "usage_type": "attribute" }, { "api_name": "datetime.datetime.now", "line_number": 21, "usage_type": "call" }, { "api_name": "datetime.datetime"...
75253802920
#!/usr/bin/env python3 import random import cv2 import model import numpy as np import warnings import os import glob warnings.filterwarnings("ignore") # Disable futile warnings os.environ.setdefault('TF_CPP_MIN_LOG_LEVEL', '2') BASE_PATH = '/content/gdrive/My Drive/Colab Notebooks/cars_detector/' WEIGHT_PATH = BASE_...
joaovperin/Feevale
Topicos_Avancados_Computacao-IA/cars_detector_yololo/workspace/run.py
run.py
py
7,940
python
en
code
0
github-code
18
[ { "api_name": "warnings.filterwarnings", "line_number": 9, "usage_type": "call" }, { "api_name": "os.environ.setdefault", "line_number": 12, "usage_type": "call" }, { "api_name": "os.environ", "line_number": 12, "usage_type": "attribute" }, { "api_name": "os.path....
29770120058
# -*- coding: utf-8 -*- """ Created on Fri Oct 22 09:55:12 2021 @author: Stefan Salbrechter """ import os import pandas as pd import regex as re import numpy as np import multiprocessing import argparse from datetime import datetime from pathlib import Path from gensim.models import Phrases from gensi...
StefanX007X/Paper-III-GUIDED-TOPIC-CLUSTERING
Textual_Factors/preprocess_data.py
preprocess_data.py
py
13,250
python
en
code
0
github-code
18
[ { "api_name": "pathlib.Path", "line_number": 44, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_number": 45, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_number": 46, "usage_type": "call" }, { "api_name": "datetime.datetime.now", "l...
25580288959
# https://onlinejudge.u-aizu.ac.jp/courses/lesson/1/ALDS1/12/ALDS1_12_C # これに関してもAtCoderではすでにある実装が使える https://note.nkmk.me/python-scipy-shortest-path/ # じゅっぴーさんの記事 https://juppy.hatenablog.com/entry/2019/06/04/scipy%E3%81%AEFloyd-Warshall%E3%81%A8Dijkstra%E3%81%AE%E3%81%99%E3%81%99%E3%82%81_Python_%E7%AB%B6%E6%8A%80%E3...
masakiaota/kyoupuro
practice/algorithm_datastructure_for_programming_contest/309_ALDS1_12_C_AtCoder.py
309_ALDS1_12_C_AtCoder.py
py
1,402
python
ja
code
1
github-code
18
[ { "api_name": "scipy.sparse.lil_matrix", "line_number": 17, "usage_type": "call" }, { "api_name": "scipy.sparse.csgraph.dijkstra", "line_number": 28, "usage_type": "call" } ]
106812273
### Python script to use SNAP as InSAR processor compatible with StaMPS PSI processing # Author Jose Manuel Delgado Blasco # Date: 21/06/2018 # Updated: 01/06/2023 # Version: 2.0 # Step 0 : preparing secondary images in folder structure # Step 1 : Master TOPSAR Splitting (Assembling) and Apply Orbit # Step 2 : TOPSAR ...
mdelgadoblasco/snap2stamps
bin/topsar_step_2_splitting_secondaries.py
topsar_step_2_splitting_secondaries.py
py
9,004
python
en
code
91
github-code
18
[ { "api_name": "sys.stdout.flush", "line_number": 32, "usage_type": "call" }, { "api_name": "sys.stdout", "line_number": 32, "usage_type": "attribute" }, { "api_name": "sys.argv", "line_number": 33, "usage_type": "attribute" }, { "api_name": "warnings.filterwarning...
73652448680
from django.conf.urls import url from .views import (AdicionarReservaView, ListarReservasViews, ReservasFullcalendario, EditarReservaView, EliminarReservasView) urlpatterns = [ url(r'^adicionar/reserva/(?P<pk>\d+)/$', AdicionarReser...
fdzr/modulo-sala-reuniones
sala_reuniones/urls.py
urls.py
py
756
python
en
code
0
github-code
18
[ { "api_name": "django.conf.urls.url", "line_number": 12, "usage_type": "call" }, { "api_name": "views.AdicionarReservaView.as_view", "line_number": 12, "usage_type": "call" }, { "api_name": "views.AdicionarReservaView", "line_number": 12, "usage_type": "name" }, { ...
22987473362
import os from pathlib import Path from dotenv import load_dotenv load_dotenv(dotenv_path=Path(os.path.dirname(__file__)) / "../test-variables.env") def _get_env_or_throw(env_name: str) -> str: env = os.getenv(key=env_name) if env is None: raise ValueError( f"{env_name} environmental var...
software-mansion/starknet.py
starknet_py/tests/e2e/fixtures/constants.py
constants.py
py
2,299
python
en
code
231
github-code
18
[ { "api_name": "dotenv.load_dotenv", "line_number": 6, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_number": 6, "usage_type": "call" }, { "api_name": "os.path.dirname", "line_number": 6, "usage_type": "call" }, { "api_name": "os.path", "line_numb...
12654024062
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import argparse import glob import csv import datetime # IN_CAMERAPOSE_FILENAME = "*_cameraPose.csv" OUT_CAMERAPOSE_FILENAME = "pose.txt" # IN_WIFI_FILENAME = "*_wifi.csv" OUT_WIFI_FILENAME = "wifi.txt" OUT_WIFI_CSV_FILENAME = "wifi_processed.csv" if __name__ ...
iidango/tangologger
misc/convertFormat.py
convertFormat.py
py
4,584
python
en
code
0
github-code
18
[ { "api_name": "argparse.ArgumentParser", "line_number": 18, "usage_type": "call" }, { "api_name": "glob.glob", "line_number": 29, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 29, "usage_type": "call" }, { "api_name": "os.path", "line_nu...
33578530597
from __future__ import print_function import sys from flask import Flask, request, Response from py2neo import Graph sys.path.append("..") from store import Store from graphnodes import GraphNode from query import ClientQuery import cmainit from AssimCtypes import QUERYINSTALL_DIR # These next two imports are actuall...
assimilation/assimilation-official
cma/flask/hello.py
hello.py
py
3,412
python
en
code
49
github-code
18
[ { "api_name": "sys.path.append", "line_number": 6, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 6, "usage_type": "attribute" }, { "api_name": "flask.Flask", "line_number": 21, "usage_type": "call" }, { "api_name": "flask.request.args", "lin...
4451439169
import urllib import urllib2 import uuid import logging logger = logging.getLogger(__name__) # returns something like '[{"call_id_guid": "41e9ebe2-b289-449d-b24b-86a1d14c7ba9", "status": "Pending", "api_key": "<your api key>", "valid":"true"}]' def send_key_api_client(api_key, api_secret, phone_0, phone_1, phone_2 , ...
auth2/auth2_python_django
demo2fa/auth2api_r1.py
auth2api_r1.py
py
2,050
python
en
code
1
github-code
18
[ { "api_name": "logging.getLogger", "line_number": 6, "usage_type": "call" }, { "api_name": "uuid.UUID", "line_number": 12, "usage_type": "call" }, { "api_name": "uuid.UUID", "line_number": 13, "usage_type": "call" }, { "api_name": "urllib2.Request", "line_numb...
22575435296
# -*- coding: utf-8 -*- import scrapy from ..items import ChoutiproItem class ChoutiSpider(scrapy.Spider): name = 'chouti' # allowed_domains = ['www.xx.com'] start_urls = ['https://dig.chouti.com/'] def parse(self, response): div_list=response.xpath('/html/body/main/div/div/div[1]/div/div[2]/d...
ym7/Somecodes
爬虫/choutipro/choutipro/spiders/chouti.py
chouti.py
py
696
python
en
code
0
github-code
18
[ { "api_name": "scrapy.Spider", "line_number": 5, "usage_type": "attribute" }, { "api_name": "items.ChoutiproItem", "line_number": 15, "usage_type": "call" } ]
25988450803
__all__ = ['butter_filter', 'butter_filter_frequency_response', 'apply_butter_filter', 'save_dataset', 'load_dataset', 'dataset_add_chunk_col', 'dataset_add_length_col', 'dataset_add_labels_col', 'dataset_add_mean_col', 'dataset_add_median_col', 'dataset_add_std_col', 'dataset_add_iqr_col', 'datas...
AI4HealthUOL/SSSD
docs/instructions/PTB-XL/clinical_ts/timeseries_utils.py
timeseries_utils.py
py
37,246
python
en
code
183
github-code
18
[ { "api_name": "warnings.filterwarnings", "line_number": 30, "usage_type": "call" }, { "api_name": "pathlib.WindowsPath", "line_number": 41, "usage_type": "attribute" }, { "api_name": "pathlib.PosixPath", "line_number": 41, "usage_type": "attribute" }, { "api_name"...
28147369489
import requests from bs4 import BeautifulSoup from pymongo import MongoClient client = MongoClient("localhost", 27017) db = client.dbsparta headers = { "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64)AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.86 Safari/537.36" } data = requests.get( "http...
nin187/sparta
_sandbox/crawling.py
crawling.py
py
923
python
en
code
0
github-code
18
[ { "api_name": "pymongo.MongoClient", "line_number": 5, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 11, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_number": 16, "usage_type": "call" } ]
10420430815
import os import shutil import argparse def main(src_dir, dest_dir): for filename in os.listdir(src_dir): dest_path = os.path.join(dest_dir, filename) if os.path.exists(dest_path): continue src_path = os.path.join(src_dir, filename) if filename.lower().endswith...
abandonware-magazines/Utilities
OCR/train/copy_rtl_gt.py
copy_rtl_gt.py
py
934
python
en
code
0
github-code
18
[ { "api_name": "os.listdir", "line_number": 6, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 7, "usage_type": "call" }, { "api_name": "os.path", "line_number": 7, "usage_type": "attribute" }, { "api_name": "os.path.exists", "line_number":...
24092643810
from flask_restplus import Resource, fields from flask import request, after_this_request from flask_jwt_extended import create_access_token from datetime import timedelta from ducttapp import models, services, helpers from . import ns _login_req = ns.model( name='login_request', model={ 'username': fi...
anhducc13/flask-app
ducttapp/api/auth/login.py
login.py
py
2,796
python
en
code
0
github-code
18
[ { "api_name": "flask_restplus.fields.String", "line_number": 11, "usage_type": "call" }, { "api_name": "flask_restplus.fields", "line_number": 11, "usage_type": "name" }, { "api_name": "flask_restplus.fields.String", "line_number": 12, "usage_type": "call" }, { "a...
38694714322
import torch import torch.nn.functional as F from typing import Optional, List, Dict, Any, Union, Tuple from rlprompt.models import BaseModel from rlprompt.modules import BaseModule from rlprompt.rewards import BaseReward from rlprompt.utils import utils device = torch.device("cuda" if torch.cuda.is_available() else ...
Shentao-YANG/Preference_Grounded_Guidance
prompt_task/rlprompt/modules/pg_reinforce_module.py
pg_reinforce_module.py
py
5,702
python
en
code
2
github-code
18
[ { "api_name": "torch.device", "line_number": 10, "usage_type": "call" }, { "api_name": "torch.cuda.is_available", "line_number": 10, "usage_type": "call" }, { "api_name": "torch.cuda", "line_number": 10, "usage_type": "attribute" }, { "api_name": "torch.tensor", ...
43220128054
from flask import Flask from backend.data import alchemy, migrate from backend.controller import main def create_app(): app = Flask(__name__) app.config.from_object("config") # Extensions alchemy.configure(app) migrate.configure(app) # Blueprints main.configure(app) return app
andradenatalie/CelticRegister
backend/__init__.py
__init__.py
py
315
python
en
code
0
github-code
18
[ { "api_name": "flask.Flask", "line_number": 7, "usage_type": "call" }, { "api_name": "backend.data.alchemy.configure", "line_number": 11, "usage_type": "call" }, { "api_name": "backend.data.alchemy", "line_number": 11, "usage_type": "name" }, { "api_name": "backen...
16204065315
from fastapi import Request, Body from tortoise import Tortoise from app.hooks.error_hook import register_exception_handler from app.hooks.request_hook import register_request_hook from app.hooks.app_hook import register_app_hook from app.system.forms.job import GetJobForm from app.baseView import FastAPI from app.sys...
zhongyehai/test-platform-fastapi-api
job.py
job.py
py
2,040
python
en
code
3
github-code
18
[ { "api_name": "app.baseView.FastAPI", "line_number": 14, "usage_type": "call" }, { "api_name": "app.hooks.app_hook.register_app_hook", "line_number": 23, "usage_type": "call" }, { "api_name": "app.hooks.request_hook.register_request_hook", "line_number": 24, "usage_type":...