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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
19040316478 | import argparse
import json
import os
from plotter import plot_functions
from rl_nav import constants
from rl_nav.utils import plot_utils
parser = argparse.ArgumentParser()
parser.add_argument(
"--results_folder", type=str, default="results\HSS9", help="path to results folder to post-process."
)
parser.add_argum... | philshams/Euclidean_Gridworld_RL | rl_nav/experiments/post_process.py | post_process.py | py | 3,470 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 56,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 56,
"usage_type": "attribute"
},
{
"api_name": "os.listdir",
"li... |
72022093947 | import sys
from pyfiglet import Figlet
import random
figlet = Figlet()
fonts = figlet.getFonts()
if len(sys.argv) > 1:
if sys.argv[1] != '-f' and sys.argv[1] != '--font' or not sys.argv[2] in fonts:
sys.exit("USAGE: python figlet.py -f FONT")
else:
figlet.setFont(font=sys.argv[2])
... | lng205/CS50P | lec4/probset4/figlet/figlet.py | figlet.py | py | 465 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "pyfiglet.Figlet",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "sys.argv",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "sys.exit",
"line_number"... |
28712240998 | import requests
from bs4 import BeautifulSoup
if __name__ == '__main__':
categories = {
1: [ 'Murder', 'MURDER & NON-NEGL. MANSLAUGHTE' ],
2: [ 'Rape', 'RAPE', 'FORCIBLE TOUCHING' ],
3: [ 'Robbery', 'ROBBERY' ],
4: [ 'Felony Assault', 'FELONY ASSAULT' ],
5: [ 'Burglary', 'BURGLARY' ],... | MohamedRaffik/SafeZone | app/compstat.py | compstat.py | py | 4,763 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "requests.post",
"line_number": 99,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 119,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 121,
"usage_type": "call"
}
] |
40906818068 | #***********************************************************************************************************************
#***********************************************************************************************************************
# Automatic File Re-director
# Original Creator : Arkaprabho Adhikary
# Origi... | Arka2BR/Auto-File-Redirector | File Redirector.py | File Redirector.py | py | 1,842 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "watchdog.events.FileSystemEventHandler",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "os.listdir",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "os.listdir",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "shutil.m... |
9818937345 | import PySimpleGUI as sg
import threading
import pyttsx3, PyPDF2
import webbrowser
speaker = pyttsx3.init()
def readerPdf(path, pagenum):
file = path
if file != "":
try:
# file = easygui.fileopenbox()
webbrowser.open_new(file)
# book = open('oop.pdf','rb')
... | carozy797/pdfReader | pdfReader.py | pdfReader.py | py | 2,304 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "pyttsx3.init",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "webbrowser.open_new",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "PyPDF2.PdfFileReader",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "PySimpleGUI.them... |
15974160258 | # -*- coding: utf-8 -*-
"""
Created on Sun Sep 16 07:40:40 2018
@author: Marcelo
"""
import numpy as np
from sklearn.cross_validation import train_test_split
from sklearn.ensemble import RandomForestClassifier
from sklearn.metrics import accuracy_score
from sklearn import preprocessing
import pandas as pd... | ViniRinaldis/hackaturing2018-modelo-predicao-glosa | lib/ML/Hackana.py | Hackana.py | py | 3,312 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "pandas.read_csv",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "sklearn.preprocessing.LabelEncoder",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "sklearn.preprocessing",
"line_number": 27,
"usage_type": "name"
},
{
"api_name... |
70732424507 | import json
import random
from django.shortcuts import render, get_object_or_404
from datetime import timedelta
from django.utils import timezone
from .models import Product, ProductCategory
# Create your views here.
MENU_LINKS = [
{'url': 'main', 'active':["main"], 'name': 'домой'},
{'url': 'products:all',... | ChurikovSV/Django | internetshop/views.py | views.py | py | 2,403 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "models.Product.objects.all",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "models.Product.objects",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "models.Product",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": ... |
38514921223 | import logging
import logging.config
import time
from contextlib import contextmanager
from pathlib import Path
from typing import Any, Dict
import yaml
def get_project_root() -> Path:
"""
Return a Path object pointing to the project root directory.
:return: Path
"""
return Path(__file__).parent... | crypto-sentiment/crypto_sentiment_model_fast_api | cryptonews_sentiment_base_model/utils.py | utils.py | py | 1,522 | python | en | code | 2 | github-code | 6 | [
{
"api_name": "pathlib.Path",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "pathlib.Path",
"line_number": 26,
"usage_type": "name"
},
{
"api_name": "typing.Dict",
"line_number... |
28436898095 | import csv
import os
from functools import reduce
import numpy
import pandas as pd
from matplotlib import pyplot as plt
import linear_regression.regression_MCMC as mcmc_regression
import utils
import visuals
from distributions.NormalDistribution import NormalNormalKnownPrecision, NormalLogNormalKnownPrecision
MCMC_R... | matsarou/thesis | problems/predict-success-problem.py | predict-success-problem.py | py | 6,472 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "pandas.read_csv",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame.from_dict",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 36,
"usage_type": "attribute"
},
{
"api_name": "util... |
39348312696 | import logging
import re
from typing import cast
from rebasehelper.logger import CustomLogger
from rebasehelper.plugins.spec_hooks import BaseSpecHook
from rebasehelper.helpers.download_helper import DownloadHelper
logger: CustomLogger = cast(CustomLogger, logging.getLogger(__name__))
class CommitHashUpdater(BaseS... | rebase-helper/rebase-helper | rebasehelper/plugins/spec_hooks/commit_hash_updater.py | commit_hash_updater.py | py | 3,930 | python | en | code | 42 | github-code | 6 | [
{
"api_name": "rebasehelper.logger.CustomLogger",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "typing.cast",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "logging.getLogger",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "rebase... |
33269415730 | from saveImg import saveImg
from writeOutSeparateFDDB import writeOutSeparateFDDB
import cv2 as cv
from viola import viola
from saveImg import saveImg
countArch = 0
while (countArch < 10):
countArch = countArch + 1
roundName ='FDDB/FDDB-fold-' + str(countArch) + '.txt'
with open(roundName, "r") as readF... | lucasff57/Viola_x_Yolo | viola/predictFDDB.py | predictFDDB.py | py | 836 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "cv2.imread",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "viola.viola",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "writeOutSeparateFDDB.writeOutSeparateFDDB",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "save... |
71168738107 | ## Mike Phillips, 6/10/2022
## * critical point & spinodal / binodal solver *
## Simple structure for handling generic approach to LLPS
## - takes some sort of Model object, i.e. 'RPA'
## - Sequence and all details are inherited from the Model
## - Solver holds at least one method (i.e. 'Maxwell' or 'partition')
... | MaxCalLab/IDPTheory | rG-RPA/Solver.py | Solver.py | py | 22,730 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "numpy.random",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "numpy.float64",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "time.perf_counter",
"line_number": 130,
"usage_type": "call"
},
{
"api_name": "scipy.optimiz... |
40702063334 | """empty message
Revision ID: e5d8b22056a
Revises: 41124ac6e47e
Create Date: 2014-12-04 18:00:06.749852
"""
# revision identifiers, used by Alembic.
revision = 'e5d8b22056a'
down_revision = '41124ac6e47e'
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated by Alembic - pl... | StasEvseev/buy_api | migrations/versions/e5d8b22056a_.py | e5d8b22056a_.py | py | 801 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "alembic.op.create_table",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "alembic.op",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "sqlalchemy.Column",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.Integ... |
28156438694 | import dataclasses
import time
from datetime import timedelta
from functools import partial
from pathlib import Path
from typing import Tuple, Dict, Any, Optional, Union, List
import imageio
import lpips
import numpy as np
import torch
import torch.utils.data as torch_data
from matplotlib import pyplot as plt
from ski... | akanimax/3inGAN | thre3d_atom/modules/volumetric_model/volumetric_model.py | volumetric_model.py | py | 75,461 | python | en | code | 3 | github-code | 6 | [
{
"api_name": "dataclasses.dataclass",
"line_number": 71,
"usage_type": "attribute"
},
{
"api_name": "typing.Tuple",
"line_number": 86,
"usage_type": "name"
},
{
"api_name": "typing.Tuple",
"line_number": 88,
"usage_type": "name"
},
{
"api_name": "thre3d_atom.rend... |
34120190103 | __author__ = 'Yves Bonjour'
import ConfigParser
import os
import sys
from Clusterer import create_clusterer
from werkzeug.routing import Map, Rule
from WerkzeugService import WerkzeugService
from WerkzeugService import create_status_ok_response
from WerkzeugService import create_status_error_response
USAGE = "USAGE: ... | ybonjour/nuus | services/clustering/Service.py | Service.py | py | 2,058 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "Clusterer.create_clusterer",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "WerkzeugService.WerkzeugService",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "werkzeug.routing.Map",
"line_number": 22,
"usage_type": "call"
},
{
"a... |
37869165086 | import requests
from datetime import datetime
import streamlit as st
NASA_API_KEY = st.secrets["NASA_API_KEY"]
def fetchAPOD(date):
URL_APOD = "https://api.nasa.gov/planetary/apod"
params = {
'api_key':NASA_API_KEY,
'date':date,
'hd':'True'
}
response = requests.get(URL_APOD... | VPeron/house_app | modules/nasa_api_backend.py | nasa_api_backend.py | py | 1,377 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "streamlit.secrets",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "requests.get",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "streamlit.write",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "streamlit.write",
... |
71236798909 | import typing as ty
import PyQt5.QtGui as qtg
import PyQt5.QtCore as qtc
import uuid
import enum
from mate.ui.views.map.map_painter import Painter
from mate.ui.views.map.layer.layer import Layer
import mate.net.nao as nao
class Roles(enum.Enum):
default = 0
keeper = 1
defender = 2
supporter = 3
s... | humanoid-robotics-htl-leonding/robo-ducks-core | tools/mate/mate/ui/views/map/layer/selfPlayer.py | selfPlayer.py | py | 7,211 | python | en | code | 5 | github-code | 6 | [
{
"api_name": "enum.Enum",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "mate.ui.views.map.layer.layer.Layer",
"line_number": 22,
"usage_type": "name"
},
{
"api_name": "typing.Dict",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "m... |
32726022349 | """Computes shortest path abstractly
"""
from functools import partial
import math
from umcog.memoize import MEMOIZE_METHOD
from umcog.functools import groupby, getitem, head, revargs
class Graph:
def __init__(self, edges):
self.edges = edges
@MEMOIZE_METHOD
def out_adj_list(self):
retur... | wecacuee/floyd-warshal-rl | fwrl/alg/shortest_path.py | shortest_path.py | py | 3,244 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "umcog.functools.groupby",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "functools.partial",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "umcog.functools.getitem",
"line_number": 16,
"usage_type": "argument"
},
{
"api_name": ... |
73730154108 | import torch
import torch.nn as nn
class Model(nn.Module):
def __init__(self, n_obs):
super(Model, self).__init__()
self.encoder = nn.Sequential(
nn.Linear(n_obs, 128),
nn.ELU(),
nn.Linear(128, 64),
nn.ELU()
)
self.mu = nn.Sequential... | BCHoagland/DARLA | beta_vae/model.py | model.py | py | 1,180 | python | en | code | 8 | github-code | 6 | [
{
"api_name": "torch.nn.Module",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 4,
"usage_type": "name"
},
{
"api_name": "torch.nn.Sequential",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line_n... |
36959910235 | import numpy as np
import torch
import dgl
import torch.nn.functional as F
import scipy.sparse as sp
import random
from model import GCN, GAT, SGC, APPNP
class GraphEnv(object):
def __init__(self, dataset, hid_dim, device, backbone='gat'):
if dataset == 'reddit':
self.g = load_npz('reddit') # ... | jumxglhf/G2A2C | attack_utils.py | attack_utils.py | py | 7,486 | python | en | code | 14 | github-code | 6 | [
{
"api_name": "dgl.data.CoraGraphDataset",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "dgl.data",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "dgl.data.CiteseerGraphDataset",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": ... |
2924198296 | import cv2
import numpy as np
from imgaug import augmenters as iaa
import os,glob
import os.path as osp
import yaml
from helper import resize
from warp import wrap_fg_bg
#set up configurations for yaml
cur_dir = os.path.dirname(__file__)
with open(os.path.join(cur_dir,'augmentation_param.yml'), 'r') as ymlfile:
... | vidit09/Grocery-Product-Detection | data-preparation/create_data.py | create_data.py | py | 12,040 | python | en | code | 5 | github-code | 6 | [
{
"api_name": "os.path.dirname",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number"... |
22757726942 | # (C) StackState 2021
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
import os
import json
import jwt
from datetime import datetime, timedelta
from .common import HOST, PORT
from stackstate_checks.base.errors import CheckException
from stackstate_checks.base.utils.common import read... | StackVista/stackstate-agent-integrations | splunk_metric/tests/mock.py | mock.py | py | 7,431 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "stackstate_checks.splunk.client.splunk_client.FinalizeException",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "stackstate_checks.base.errors.CheckException",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 24... |
12495791199 | import argparse
import statistics
import matplotlib.pyplot as plt
from functools import reduce
from tabulate import tabulate
from algorithms import read_dataset
parser = argparse.ArgumentParser()
parser.add_argument("path", help="Absolute path of the dataset")
def dataset_summary(data):
movies = set()
for u... | tt-p/movie-recommender-system | Project/visualization.py | visualization.py | py | 2,770 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "functools.reduce",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "tabulate.tabulate",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "statistics.... |
39095842754 | import logging
import json
from datetime import datetime
from operator import attrgetter
from os import environ, path
import pytz
from azure.common.credentials import (
ServicePrincipalCredentials,
get_azure_cli_credentials,
)
from azure.graphrbac import GraphRbacManagementClient
from prometheus_client.core i... | seanson/azure-ad-monitor | src/creds.py | creds.py | py | 3,227 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "logging.getLogger",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "os.environ.get",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "os.environ.get",
"lin... |
36164894141 | import logging
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.common.exceptions import NoSuchElementException, TimeoutException
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
class GmapsScraper:
de... | framoni/pfm | lib/gmaps_scraper.py | gmaps_scraper.py | py | 2,778 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "selenium.webdriver.ChromeOptions",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 24,
"usage_type": "call"
},
{
"api... |
26247663066 | import hashlib
import six
import json
import requests
import datetime
import time
from oslo_log import log
from oslo_utils import units
from delfin import exception
from delfin import cryptor
from delfin.common import alert_util
from delfin.drivers.utils.rest_client import RestClient
from delfin.drivers.dell_emc.scale... | sodafoundation/delfin | delfin/drivers/dell_emc/scaleio/rest_handler.py | rest_handler.py | py | 19,883 | python | en | code | 201 | github-code | 6 | [
{
"api_name": "oslo_log.log.getLogger",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "oslo_log.log",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "delfin.drivers.utils.rest_client.RestClient",
"line_number": 21,
"usage_type": "name"
},
{
"a... |
8584415595 | import requests, re, sys
import numpy as np
import os
class KAKAO_API():
def __init__(self):
self.api_key = os.environ['kakao_api']
self.address_url = "https://dapi.kakao.com/v2/local/search/address.json?"
def address_query_kakao(self, query):
r = requests.get(self.address_url,... | SangHyung-Jung/spacewalk_internship | architect_owner_pre/api2.py | api2.py | py | 1,942 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "os.environ",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "requests.get",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "re.split",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "numpy.nan",
"line_number": 1... |
36221201263 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
根据参数对磁盘进入扫描,并将其添加到指定数据库中
描述期间,最好不要启动服务,以免相关根目录被修改后,不能及时通知到用户
"""
__author__="Terry<jxd524@163.com>"
import os,sys, getopt, json
import datetime
import defines, unit
import dataManager
from dataManager import DataManager
####################begin ScanDisk############... | jxd524/iSyncServer | scanDisk.py | scanDisk.py | py | 8,760 | python | en | code | 2 | github-code | 6 | [
{
"api_name": "os.path.abspath",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 32,
"usage_type": "attribute"
},
{
"api_name": "os.path.expanduser",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "dataManager.kCatalogF... |
73689189309 | import signal
import threading
from random import randint, sample
from typing import List
global run
class ConsumerQueue(object):
def __init__(self, consumer_list: List):
self.lock = threading.Lock()
self.list = consumer_list
def run_producer_thread(queue1: ConsumerQueue, queue2: ConsumerQueue,... | GodlyDog/Consumer-Producer | main.py | main.py | py | 3,282 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "typing.List",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "threading.Lock",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "random.sample",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "random.randint",
"line_n... |
17668876512 | #!/usr/bin/env python3
# Up / Down ISC graph for ALL bins
# Like SfN Poster Figure 2
# But now for all ROIs in Yeo atlas
import tqdm
import matplotlib.pyplot as plt
import seaborn as sns
import pandas as pd
import deepdish as dd
from HMM_settings import *
ISCdir = ISCpath+'shuff_Yeo_outlier_'
figdir = figurepath+'up... | samsydco/HBN | 10_up_down.py | 10_up_down.py | py | 2,440 | python | en | code | 2 | github-code | 6 | [
{
"api_name": "deepdish.io.load",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "deepdish.io",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "matplotlib.pyplot.rcParams.update",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "m... |
41668701388 | from os import remove
import streamlit as st
from streamlit_chat import message as st_message
from language_chatbot.translate_api import translate
from language_chatbot.detect import detect_language
import requests
#url = "https://chatbot-ni4mcaftla-ew.a.run.app/reply"
st.set_page_config(page_title="Multilingual Cha... | wRajter/language_chatbot | language_chatbot/app.py | app.py | py | 3,161 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "streamlit.set_page_config",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "streamlit.session_state",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "streamlit.session_state",
"line_number": 20,
"usage_type": "attribute"
},
{
... |
27507860750 | # This script is originally coming from https://milovantomasevic.com/blog/stackoverflow/2021-04-21-convert-csv-to-json-file-in-python/ and was adapted
import csv
import json
import time
import argparse
parser = argparse.ArgumentParser(
description="Convert a CSV containing cycle highways into a Meta JSON file. Sp... | FixMyBerlin/rsv-dossier | data/scripts/convert-csv-metajson.py | convert-csv-metajson.py | py | 4,108 | python | en | code | 4 | github-code | 6 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "csv.reader",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "json.dumps",
"line_number": 102,
"usage_type": "call"
},
{
"api_name": "time.perf_counter",
... |
17011416304 | import ROOT as r
import sys, os
sys.path.append("/Users/amizukam/DVJets/atlasstyle")
from AtlasStyle import *
from AtlasLabel import *
import ctypes
import argparse
r.gROOT.SetBatch()
SetAtlasStyle()
parser = argparse.ArgumentParser()
parser.add_argument("-sr", "--SR", required=True, help="Signal region, 'HighPtSR', ... | atsushi0507/dvjets_mergedVertices | data/plottingScript/plotSignificanceAndMass.py | plotSignificanceAndMass.py | py | 32,545 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "sys.path.append",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 3,
"usage_type": "attribute"
},
{
"api_name": "ROOT.gROOT.SetBatch",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "ROOT.gROOT",
"line... |
19757879289 | # storage.tinyDao.py
import pathlib as pl
from abc import ABC
from typing import List, Optional
import tinydb as tdb
import debug.logger as clog
from storage.base import Dao, Connectible, Connection, PathCheckMode
logger = clog.getLogger(__name__)
class TinyConnection(Connection):
def __init__(self, path: pl.... | dbyte/WebtomatorPublicEdition | webtomator/storage/tinyDao.py | tinyDao.py | py | 8,814 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "debug.logger.getLogger",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "debug.logger",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "storage.base.Connection",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "pathlib.P... |
41379927195 | import argparse
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
from model.thirdparty_RAFT.core.update import BasicUpdateBlock
from model.thirdparty_RAFT.core.corr import MaskCorrBlock
from model.thirdparty_RAFT.core.utils.utils import upflow8
from model.thirdparty_RAFT.core.raft ... | Backlory/motionDetection | model/MaskRAFT.py | MaskRAFT.py | py | 7,608 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "torch.cuda",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "model.thirdparty_RAFT.core.raft.RAFT",
"line_number": 27,
"usage_type": "name"
},
{
"api_name": "argparse.ArgumentParser",
"line_number": 35,
"usage_type": "call"
},
{
"api_... |
31126470384 | import tensorflow as tf
from transformers import BertConfig, TFBertModel
# Building the config
config = BertConfig()
# Building the model from the config
model = TFBertModel(config)
print(config)
model.save_pretrained("directory_on_my_computer")
encoded_sequences = [
[101, 7592, 999, 102],
[101, 4658, 1012... | SleepySoft/HuggingFaceStudy | 02.UsingTransformers/03.Models_TF.py | 03.Models_TF.py | py | 449 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "transformers.BertConfig",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "transformers.TFBertModel",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "tensorflow.constant",
"line_number": 20,
"usage_type": "call"
}
] |
30577061975 | import logging
import structlog
import sys
log_format = "%(filename)s:%(lineno)s %(funcName)10s %(message)s"
logging.basicConfig(level='DEBUG',
stream=sys.stdout,
format=log_format)
chain = [
structlog.stdlib.filter_by_level,
structlog.stdlib.add_log_level,
structlog.processors.StackInfoRenderer(),
... | vivek-bombatkar/MyLearningNotes | Python/other/logging_struct_log.py | logging_struct_log.py | py | 787 | python | en | code | 59 | github-code | 6 | [
{
"api_name": "logging.basicConfig",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "sys.stdout",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "structlog.stdlib",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "structlog.std... |
1989853746 | ########################START LIB#########################
import os
from os import system, name
from time import sleep
from verif import *
from var import *
import pygame
from pygame.locals import *
####################Script start######################################
# main()
####################################... | MaximCosta/PythonChess | chess.py | chess.py | py | 5,329 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "pygame.init",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "pygame.display.set_mode",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "pygame.display",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "pygame.image.... |
17704247324 | import pytorch_lightning as pl
from transformers import AutoModelForSeq2SeqLM
from .tokenizer import get_tokenizer
from .argparser import get_args
import torch
import re
import os
import json
from .config import *
from utils.data_process import process_decode_questions
from utils.scorer import setup_scorer,compute_scor... | p208p2002/Neural-Question-Group-Generation | models/naive/model.py | model.py | py | 4,391 | python | en | code | 5 | github-code | 6 | [
{
"api_name": "argparser.get_args",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "pytorch_lightning.LightningModule",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "argparser.get_args",
"line_number": 23,
"usage_type": "call"
},
{
"api_... |
7150858156 | import networkx as nx
import matplotlib.pyplot as plt
import itertools as iter
import numpy as np
import pandas as pd
import xlsxwriter
from pandas import *
import os
# iniciar graph
def initialNetwork (dataf):
G = nx.Graph()
# expandir los autores separados con comas en la hoja original
def explode(... | Avel1956/Pynetwork | main.py | main.py | py | 4,536 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "networkx.Graph",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "numpy.ndarray",
"line_number": 24,
"usage_type": "attribute"
},
{
"api_name": "pandas.Series",
"line_number": 24,
"usage_type": "attribute"
},
{
"api_name": "numpy.repeat",
... |
1165293313 | # Script to train machine learning model.
from sklearn.model_selection import train_test_split
# Add the necessary imports for the starter code.
import joblib
import logging
import pandas as pd
from ml.data import process_data
from ml.model import train_model, compute_model_metrics, inference, evaluate_model_slices
... | rafaelriciardi/udacity-mle-project-3-new-version | starter/train_model.py | train_model.py | py | 1,776 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "logging.basicConfig",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "logging.INFO",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "logging.info",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
... |
28948320847 | import pytest
from src.other import clear_v1
from src.auth import auth_register_v1
from src.channel import channel_join_v1
from src.channels import channels_create_v1, channels_list_v1
from src.error import InputError, AccessError
def test_global_owner():
'''
Test if a global owner can join the private channe... | Amygdala73/CS1531 | project-backend/tests/non_http_tests/channel/channel_join_test.py | channel_join_test.py | py | 3,858 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "src.other.clear_v1",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "src.auth.auth_register_v1",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "src.auth.auth_register_v1",
"line_number": 15,
"usage_type": "call"
},
{
"api_name":... |
35860251685 | from nlp_similarity import main as nlp_similarity_main
import os
import readline
readline.set_completer_delims(' \t\n=')
doc_set = {".docx", ".doc", ".odt", ".pdf", ".txt"}
def split_file_path(file_path):
base_path, file_extension = os.path.splitext(file_path)
return file_extension
def solve(path):
pr... | adityaagg7/Tally-CodeBrewers-INT_WIN | CLI/find_similar_files.py | find_similar_files.py | py | 2,433 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "readline.set_completer_delims",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "os.path.splitext",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "os.walk",
... |
12706593118 | import argparse
import os
import sys
import matplotlib.pyplot as plt
import numpy as np
# import pandas as pd
import csv
from mpl_toolkits.mplot3d import Axes3D
def load_data(csv_path):
with open(csv_path, 'r') as f:
data = csv.reader(f).__next__()
n_states = int(data[0])
n_steps = int(data[1])
... | sandialabs/gate-public | gate/src/plotting/plot.py | plot.py | py | 6,366 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "csv.reader",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "numpy.float64",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "numpy.ceil",
"line_numb... |
20894076175 | import cv2
import math
import kmeans
import numpy as np
import matcompat
from scipy import signal
import matplotlib.pyplot as plt
def monta(imagen):
ret,imagen = cv2.threshold(imagen,0,255,cv2.THRESH_BINARY)
imagen = np.float32(imagen)
P = np.argwhere(imagen>=1)
[x, y] = matcompat.size(imagen)
M = np.zeros((x,y)... | ErickJuarez/AtencionSelectiva | Python/monta.py | monta.py | py | 1,332 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "cv2.threshold",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "cv2.THRESH_BINARY",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "numpy.float32",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "numpy.argwhere",
... |
71470514109 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Mar 5 14:16:33 2019
@author: jacopo
"""
import Fringes_dataset_manager as fdm
from os import listdir
from itertools import product
data_dir = './data/belly/'
proc_dir = './data/processed_qbic/'
names = listdir(data_dir)
names = [name for name in nam... | jacopok/interferometry | analysis/initialization.py | initialization.py | py | 2,594 | python | en | code | 2 | github-code | 6 | [
{
"api_name": "os.listdir",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "Fringes_dataset_manager.dataset",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "itertools.product",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "Fringes_... |
72532833149 | # pylint: disable=redefined-outer-name
# pylint: disable=too-many-arguments
# pylint: disable=unused-argument
# pylint: disable=unused-variable
import contextlib
import re
from collections.abc import AsyncIterator, Awaitable, Callable
from contextlib import AsyncExitStack
from copy import deepcopy
from pathlib import ... | ITISFoundation/osparc-simcore | services/web/server/tests/unit/with_dbs/02/conftest.py | conftest.py | py | 16,001 | python | en | code | 35 | github-code | 6 | [
{
"api_name": "pydantic.parse_obj_as",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "models_library.services_resources.ServiceResourcesDict",
"line_number": 42,
"usage_type": "argument"
},
{
"api_name": "models_library.services_resources.ServiceResourcesDictHelpers.Co... |
8037261530 | from django.db import models
from django.contrib.auth.models import AbstractUser
from django.utils.translation import ugettext_lazy as _
from django.db.models.signals import post_save
from django.dispatch import receiver
from .managers import CustomUserManager
class CustomUser(AbstractUser):
username = None
e... | karyshev63rus/hh | backend/users/models.py | models.py | py | 862 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "django.contrib.auth.models.AbstractUser",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "django.db.models.EmailField",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "django.db.models",
"line_number": 11,
"usage_type": "name"
},
{
... |
30806129042 | import pathlib
import logging
import atomicwrites
from ..exceptions import ExportError
from .base_exporter import BaseExporter
from ...parsers.lock import Lock, SourceLockEntry
logger = logging.getLogger(__name__)
class LockPackratExporter(BaseExporter):
# We create a format without the following keys.
# RV... | AstraZeneca/roo | src/roo/exporters/lock/lock_packrat_exporter.py | lock_packrat_exporter.py | py | 2,098 | python | en | code | 10 | github-code | 6 | [
{
"api_name": "logging.getLogger",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "base_exporter.BaseExporter",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "parsers.lock.Lock",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "pathlib... |
42962959966 | import sys
import os
import codecs
import numpy as np
import pickle
from common_functions import cf
from sklearn.linear_model import RidgeClassifier
from sklearn.linear_model import SGDClassifier
from sklearn.linear_model import Perceptron
from sklearn.linear_model import PassiveAggressiveClassifier
from sklearn.linea... | shaukat-abidi/nlp_related | textclassification/text_classifier_voting_explained.py | text_classifier_voting_explained.py | py | 10,576 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "common_functions.cf.data",
"line_number": 52,
"usage_type": "call"
},
{
"api_name": "common_functions.cf",
"line_number": 52,
"usage_type": "name"
},
{
"api_name": "pickle.load",
"line_number": 55,
"usage_type": "call"
},
{
"api_name": "common_funct... |
37818926764 | from PIL import Image, ImageStat
import glob
import matplotlib
import matplotlib.pyplot as plt
DROP = '/groups/dickson/home/bathd/Dropbox/140827_no_arena_zoom/'
images = sorted(glob.glob(DROP + '*.png'))
medians = []
totals = []
for x in images:
im = Image.open(x)
med = ImageStat.Stat(im).median
total =... | dbath/wahnsinn | flymad_jaaba/zoom_intensity_single_leds.py | zoom_intensity_single_leds.py | py | 807 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "glob.glob",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "PIL.Image.open",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "PIL.Image",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "PIL.ImageStat.Stat",
"line_numb... |
23063986240 | import json
import logging
from base64 import b64encode
import requests
from celery import shared_task
from django.conf import settings
from django.core.exceptions import ObjectDoesNotExist
from django.template.loader import render_to_string
from checks.models import Check, MerchantPoint
log = logging.getLogger(__na... | Truewaydm/gen_checks | checks/tasks.py | tasks.py | py | 1,674 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "logging.getLogger",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "checks.models",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "checks.models.Check.objects.filter",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "ch... |
8853692669 | import scipy.spatial
import pandas as pd
import numpy as np
import general_ontology_tools as got
from numpy.linalg import inv
from sklearn.preprocessing import MultiLabelBinarizer
# calculate embedding
def compute_embedding(Y_df, Z_df, mat4):
Z_df = Z_df
Z_df = Z_df[Z_df.index.isin(Y_df.columns)]
Z_mat ... | Bishop-Laboratory/autoPLIER-analysis | analysis/EDA_Julian/CELLO_multiplier.py | CELLO_multiplier.py | py | 5,071 | python | en | code | 2 | github-code | 6 | [
{
"api_name": "numpy.linalg.inv",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "scipy.spatial.spatial.distance.correlation",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "scipy.spatial.spatial",
"line_number": 39,
"usage_type": "attribute"
},
{... |
41793805214 | #crie um programa que leia o ano de nascimento de sete pessoas
#no final, mostre quantas pessoas ainda nao atingiram a maioridade e quantas já são maiores
from datetime import date
atual = date.today ().year
maioridade = 0
menoridade = 0
for pess in range(1,8):
nasc= int(input(f'Em que ano a {pess}ª nasceu? '))
... | geovananew/python_exercicios | Exercicios/ex054_grupo_maioridade.py | ex054_grupo_maioridade.py | py | 560 | python | pt | code | 0 | github-code | 6 | [
{
"api_name": "datetime.date.today",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "datetime.date",
"line_number": 5,
"usage_type": "name"
}
] |
6197344568 | import scipy.constants as sp
class Material:
def __init__(self, Bandgap_energy, work_function):
"""Attributes from Material
------------------------------
Bandgap_Energy = float
Bandgap_Energy of Material
Work_function = float
Work_func... | Leonhart8902/OOP-CollegeProject | material.py | material.py | py | 1,617 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "scipy.constants.eV",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "scipy.constants",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "scipy.constants.eV",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "scipy... |
32045454970 | # 导入selenium包,webdriver是浏览器对象
from time import sleep
from selenium import webdriver
# 鼠标操作事件 导入动作链类(处理单击,双击,点击鼠标右键,拖拽等事件)
from selenium.webdriver.common.action_chains import ActionChains
# 键盘事件
from selenium.webdriver.common.keys import Keys
'''为了去除以下提示,特加入options
DevTools listening on ws://127.0.0.1:54427/devtools/... | panpanpandududu/probability | test/driver.py | driver.py | py | 2,609 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "selenium.webdriver.ChromeOptions",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 19,
"usage_type": "call"
},
{
"api... |
22535506037 | from django.db.models.signals import post_save
from django.dispatch import receiver
from django.utils import timezone
from apps.users.models import User, UserProfile, UserWallet, UserWalletLog
@receiver(post_save, sender=User)
def create_profile(sender, instance, created, **kwargs):
if created and not instance.... | Abhisheksoni1/pkbpy | application/api/v1/signals/user_profile.py | user_profile.py | py | 1,217 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "apps.users.models.UserProfile.objects.create",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "apps.users.models.UserProfile.objects",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "apps.users.models.UserProfile",
"line_number": 12,
... |
372044591 | # coding=utf-8
# email: lixin@datagrand.com
# create: 2020/4/11-12:32 下午
import json
import typing
from flask_restful import Resource
from app.common.common import StatusEnum
from app.common.log import logger
from app.common.patch import parse, fields
from app.common.utils.status_mapper import status_str2int_mapper... | lixin940207/flask-api-project | app/resource/v2/other/async_mq/view.py | view.py | py | 3,787 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "flask_restful.Resource",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "flask_restful.Resource",
"line_number": 27,
"usage_type": "name"
},
{
"api_name": "typing.Dict",
"line_number": 27,
"usage_type": "attribute"
},
{
"api_name": "app.co... |
13547422557 | import cv2
import glob
import os
import numpy as np
import torch
from torch.utils.data import Dataset, DataLoader
from data import create_imgs
def create_data(size, color, shape, data_size, set_type): # (folder, size='big', color='blue', shape='b')
data_map = {
"big": {
"colors": ['black', 'b... | DavidBChang/Assessing-Abstract-Generalization | create_dataset.py | create_dataset.py | py | 2,767 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "os.listdir",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "data.create_imgs",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "os.listdir",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "cv2.imread",
"line_number"... |
21857236105 | from selenium.webdriver.common.by import By
from lib.base_page import BasePage
class ElementsPage(BasePage):
def __init__(self, driver):
super().__init__(driver)
self.driver = driver
elements_list = ["Text Box", "Check Box", "Radio Button", "Web Tables", "Buttons", "Links",
... | AregAvetisyan82/DemoQa | pages/main/elements_page.py | elements_page.py | py | 600 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "lib.base_page.BasePage",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "selenium.webdriver.common.by.By.ID",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "selenium.webdriver.common.by.By",
"line_number": 15,
"usage_type": "name"
... |
8832718668 | from matplotlib import pyplot as plt
import pandas as pd
import numpy as np
df = pd.DataFrame(
{
'Name': ['Dan', 'Joann', 'Pedro', 'Rosie', 'Ethan', 'Vicky', 'Frederic', 'Jimmie', 'Rhonda', 'Giovanni', 'Francesca', 'Rajab', 'Naiyana', 'Kian', 'Jenny'],
'Salary':[50000, 54000, 50000, 189000, 55000, 400... | drigols/studies | modules/math-codes/modules/statistics-and-probability/comparing-data/src/correlation_sample.py | correlation_sample.py | py | 1,125 | python | pt | code | 0 | github-code | 6 | [
{
"api_name": "pandas.DataFrame",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.plot",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "numpy.unique... |
24430565314 | from layout.settings.settings import Settings
from elements.part.dataClasses import GeneralInformation, Specifications
from elements.part.usage.orderHistory import OrderHistory
from elements.part.usage.usageDataClasses import Date
import xml.etree.ElementTree as et
"""
**TF
----- NOMENCLATURE -----
- SEPXXX... | Sim0nD3p/PySM | elements/part/Part.py | Part.py | py | 13,784 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "elements.part.usage.orderHistory.OrderHistory",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "elements.part.usage.usageDataClasses.Date",
"line_number": 85,
"usage_type": "call"
},
{
"api_name": "xml.etree.ElementTree.ElementTree",
"line_number": 13... |
74493034106 | #!/usr/bin/env python
# pylint: disable=W0201
import sys
import argparse
import yaml
import numpy as np
# torch
import torch
import torch.nn as nn
import torch.optim as optim
# torchlight
import torchlight
from torchlight import str2bool
from torchlight import DictAction
from torchlight import import_class
from .pro... | Powercoder64/TAA-GCN | process/classification.py | classification.py | py | 2,890 | python | en | code | 3 | github-code | 6 | [
{
"api_name": "process.Process",
"line_number": 38,
"usage_type": "name"
},
{
"api_name": "numpy.abs",
"line_number": 52,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 56,
"usage_type": "call"
},
{
"api_name": "numpy.mean",
"line_number":... |
19009238912 | #! python
"""
Converts files into newline separated lists of tokens.
Tokens are represented in Vowpal Wabbit format.
"""
import argparse
from functools import partial
import sys
from random import shuffle
from rosetta.text import filefilter, text_processors
from rosetta.common_abc import SaveLoad
from rosetta.paralle... | columbia-applied-data-science/rosetta | rosetta/cmdutils/files_to_vw.py | files_to_vw.py | py | 5,102 | python | en | code | 204 | github-code | 6 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "argparse.RawDescriptionHelpFormatter",
"line_number": 37,
"usage_type": "attribute"
},
{
"api_name": "sys.stdout",
"line_number": 48,
"usage_type": "attribute"
},
{
... |
40913502717 | from subprocess import PIPE, run
from requests import get
from re import findall
charset = ['1','2','3','4','5','6','7','8','9','0']
keys = []
for i in charset:
keys.append(i*16)
session_cookies = []
for i in keys:
command = "python3 /home/mika/.local/lib/python3.10/site-packages/flask_unsign/__main__.py --si... | bWlrYQ/flagmalo_6 | web/tell_me_your_secret/solve/solve.py | solve.py | py | 770 | python | en | code | 4 | github-code | 6 | [
{
"api_name": "subprocess.run",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "subprocess.PIPE",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "requests.get",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "re.findall",
"line_nu... |
40299122790 | import re
import os
import argparse
from glob import glob
def write_file(file_name, out_file):
out_file.write("#" * 40 + "\n")
out_file.write(
"### " + os.path.splitext(os.path.basename(file_name))[0].upper() + "\n"
)
out_file.write("#" * 40 + "\n")
with open(file_name, "r") as file:
... | w9PcJLyb/HaliteIV-bot | create_submission.py | create_submission.py | py | 1,449 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "os.path.splitext",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "os.path.basename",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "re.match",
"line_n... |
70383318909 | import logging
import pytest
import uuid
from pygame.math import Vector2
import pygame
import numpy as np
import cv2
import time
import copy
from .base_render import BaseRender
from gobigger.utils import FOOD_COLOR, THORNS_COLOR, SPORE_COLOR, PLAYER_COLORS, BACKGROUND, BLACK, WHITE, RED
from gobigger.utils import to_a... | opendilab/GoBigger | gobigger/render/env_render.py | env_render.py | py | 6,054 | python | en | code | 483 | github-code | 6 | [
{
"api_name": "base_render.BaseRender",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "pygame.Surface",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "pygame.surfarray.array3d",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "pygame... |
5328961506 | from selenium import webdriver
from bs4 import BeautifulSoup as SOUP
import re
import urllib.request
import requests as HTTP
import os
import cv2
def Say(y):
import pyttsx3
y = str(y)
engine = pyttsx3.init()
engine.setProperty('voice','HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech\Voi... | hsihsabed/News-headlines-Using-web-scrapping | news.py | news.py | py | 1,450 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "pyttsx3.init",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "re.compile",
"line_nu... |
10442374433 | import json
from typing import Optional, List
import pydantic
class ISBN10FormatError(Exception):
"""Custom error that is raised when ISBN10 doesn't have the right format."""
def __init__(self, value: str, message: str) -> None:
self.value = value
self.message = message
super().__ini... | estraviz/write-better-python-code | src/pydantic-example.py | pydantic-example.py | py | 2,304 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "pydantic.BaseModel",
"line_number": 25,
"usage_type": "attribute"
},
{
"api_name": "typing.Optional",
"line_number": 30,
"usage_type": "name"
},
{
"api_name": "typing.Optional",
"line_number": 31,
"usage_type": "name"
},
{
"api_name": "typing.Option... |
71211180347 | from xml.dom.minidom import parse
import json
dom = parse('govi.kml')
marks = dom.getElementsByTagName('Placemark')
output = []
for mark in marks:
kvid = mark.getAttribute('id')
name = mark.getElementsByTagName('name')[0].childNodes[0].data
coordinates = mark.getElementsByTagName('coordinates'... | MonsterSwell/Glanceable-GVB | static/extractxml.py | extractxml.py | py | 538 | python | en | code | 2 | github-code | 6 | [
{
"api_name": "xml.dom.minidom.parse",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "json.dumps",
"line_number": 21,
"usage_type": "call"
}
] |
16119724230 | from flask import Blueprint, jsonify, request
import traceback
# Services
from services.RucService import RucService
from utils.Security import Security
ruc = Blueprint('ruc_blueprint', __name__)
@ruc.route('/', methods=['GET'])
def get_dataruc():
has_access = Security.verify_token(request.headers)
ruc = request... | edwardoou/wsruc | routes/RucRoutes.py | RucRoutes.py | py | 1,120 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "flask.Blueprint",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "utils.Security.Security.verify_token",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "utils.Security.Security",
"line_number": 12,
"usage_type": "name"
},
{
"api_n... |
73681004028 | from tkinter import *
from web3 import Web3#task1
root = Tk()
root.title("My Ethereum App")
root.geometry("600x200")
root.configure(background="white")
# Setting labels
block_name_label = Label(root, text="Ethereum gas fee in other currencies", font=("Helvetica", 18, 'bold'), bg="white")
block_name_label.pl... | JasPradhan/ADV-C246-ETHER-INTO-CURRENCY | project_246.py | project_246.py | py | 1,982 | python | en | code | 2 | github-code | 6 | [
{
"api_name": "web3.Web3",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "web3.Web3.HTTPProvider",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "web3.eth",
"line_number": 30,
"usage_type": "attribute"
}
] |
18018684113 | # from socket import *
from time import ctime
# import RPi.GPIO as GPIO
import email
import time
import smtplib
import imaplib
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from email.mime.base import MIMEBase
from email import encoders
ctrCmd = [ 'bd1l1_on','bd1l1_off','bd1l2_on'... | chukarupaiya/home-automation | backend/py2.py | py2.py | py | 5,349 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "imaplib.IMAP4_SSL",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "email.message_from_string",
"line_number": 65,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 123,
"usage_type": "call"
}
] |
35322894478 | from rest_framework import serializers
from rest_framework.exceptions import ValidationError
from foodlink_back.apps.authentication.models import CoreUser, UserOtp, PhoneNumber, UserPin
from foodlink_back.apps.common.serializers import ProductSerializer
from foodlink_back.apps.core.models import Address
from foodlink_... | YesseyMelis/foodlink | foodlink_back/apps/authentication/serializers.py | serializers.py | py | 3,898 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "rest_framework.serializers.ModelSerializer",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "rest_framework.serializers",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "rest_framework.serializers.CharField",
"line_number": 11,
"usa... |
8259525467 | # Mostly written by Ninji
# 'Fixes' for the NVIDIA demangler added by RoadrunnerWMC and RootCubed
from typing import Tuple
import re
dem_nvidia = False
dem_corr = False
rem_itanium = False
def parse_numbered(s: str, i: int) -> Tuple[str, int]:
assert(s[i].isdigit())
size = 0
while s[i].isdigit():
... | RootCubed/fpga_nsmbw_hash | demangler.py | demangler.py | py | 13,551 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "typing.Tuple",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "typing.Tuple",
"line_number": 22,
"usage_type": "name"
},
{
"api_name": "typing.Tuple",
"line_number": 94,
"usage_type": "name"
},
{
"api_name": "re.sub",
"line_number": 26... |
19625396901 | import cv2
import numpy as np
import overlay as ov
from sklearn.cluster import KMeans
import copy as cp
def recreate_image(codebook, labels, w, h):
"""Recreate the (compressed) image from the code book & labels"""
return codebook[labels].reshape(w, h, -1)
if __name__=="__main__":
he_gold = "/work/project... | AmanVirmani/libmsi | segmentation.py | segmentation.py | py | 1,755 | python | en | code | 2 | github-code | 6 | [
{
"api_name": "cv2.imread",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "numpy.uint8",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "cv2.imread",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "cv2.GaussianBlur",
"line_number... |
27055757829 | import csv
import click
from flask.cli import with_appcontext
from backend.extensions import db
from backend.models import Hacknight, Participant
@click.command()
@with_appcontext
def import_attendance_list():
"""Import attendance list."""
rows = []
list_of_participants = []
# open file from export... | CodeForPoznan/codeforpoznan.pl_v3 | backend/commands/import_attendance_list.py | import_attendance_list.py | py | 2,752 | python | en | code | 8 | github-code | 6 | [
{
"api_name": "csv.reader",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "click.echo",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "backend.models.Hacknight",
"line_number": 57,
"usage_type": "call"
},
{
"api_name": "backend.extensions.db.... |
15088190040 | from __future__ import annotations
from os import PathLike
from pathlib import Path
from typing import Union
from hypothesis import given
from hypothesis.strategies._internal.numbers import integers
from hypothesis_fspaths import fspaths
from sarada.console.app import filenames
max_value = 1000
@given(fspaths())
... | wikii122/sarada | tests/unit/console/test_app.py | test_app.py | py | 1,907 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "typing.Union",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "os.PathLike",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "pathlib.Path",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "sarada.console.app.filenames",
... |
73026310267 | from typing import DefaultDict
from numpy import product
from src.utilities.post_process import post_proc_timeseries
from src.utilities.tmg import sanitize_magnitude, make_human_readable
from net_sim import Attack_Sim
from time import time
import os
import csv
import json
from multiprocessing import Pool
from itertool... | mattall/topology-programming | scripts/TDSC/legacy/rolling_attack_eval.py | rolling_attack_eval.py | py | 2,541 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "itertools.product",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "time.time",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "net_sim.Attack_Sim",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "csv.writer",
"line... |
4714355635 | """
Signal Processing module.
author : Nishant Baheti <nishantbaheti.it19@gmail.com>
"""
import numpy as np
class FFTMixins:
@staticmethod
def psd(f_hat, l_signal):
"""Power Spectral Density."""
return ((f_hat * np.conjugate(f_hat)) / l_signal).real # type: ignore
@staticmethod
def... | NishantBaheti/mightypy | src/mightypy/signal_processing/_fft.py | _fft.py | py | 3,672 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "numpy.conjugate",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "numpy.abs",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "numpy.ndarray",
"line_number": 57,
"usage_type": "attribute"
},
{
"api_name": "numpy.fft.fft",
"lin... |
20069873627 | #!/usr/bin/env python3
import copy
import enum
import fileinput
import itertools
import queue
import threading
def main():
original_prog = []
for line in fileinput.input():
line = line.rstrip(',\n')
if line:
original_prog.extend(map(int, line.split(',')))
input_queue = queue.Queue(1)
output_queue = queue.... | raylu/advent_of_code | 2019/day9.py | day9.py | py | 2,920 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "fileinput.input",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "queue.Queue",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "queue.Queue",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "copy.copy",
"line_number"... |
28750240054 | import pandas as pd
import numpy as np
# to ignore all future warnings
from warnings import simplefilter
simplefilter(action='ignore', category=FutureWarning)
head_ds = pd.read_csv('dataset/clickBait_Data.csv')
head_ds = head_ds.drop(['index','id'], axis = 1)
fake_raw = pd.read_csv('da... | jasirfayas/Deceptive-Article-Detection | models.py | models.py | py | 7,301 | python | en | code | 3 | github-code | 6 | [
{
"api_name": "warnings.simplefilter",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",... |
10713171304 | import sys
import pytest
from pytest import mark
from pychu.tpattern.multiples import TMultiFinder, TMulti
print(sys.path)
print(sys.executable)
from pychu.tlogic.tcards import tcards
class TestMultiRec():
def test_4simple(self):
cards = tcards('k2 r2 b2 g2')
pr = TMultiFinder(4,True)
... | akkurat/tichu | python/tests/tpattern/test_multiples.py | test_multiples.py | py | 2,844 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "sys.path",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "sys.executable",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "pychu.tlogic.tcards.tcards",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "pychu.tpat... |
16878578612 | #!/usr/python3
import json, logging
from database import stv_mariadb
from recommendation import recommend as stv_rd
class stv_server(object):
def __init__(self, user, password, database):
self.db = stv_mariadb(user, password, database)
self.rd = stv_rd(self.db)
self.rd.train_set()
... | RainMark/KTV | SRC/SVR/lib/server.py | server.py | py | 4,609 | python | en | code | 11 | github-code | 6 | [
{
"api_name": "database.stv_mariadb",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "recommendation.recommend",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "json.dumps",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "json.dumps",
... |
20538474319 | # https://leetcode.com/problems/maximum-sum-circular-subarray/
"""
Time complexity:- O(N)
Space Complexity:- O(1)
"""
"""
Intuition:
The code uses Kadane's algorithm to find the maximum and minimum subarray sums for a non-circular array.
It simultaneously calculates the total sum of the array.
The maximum circular ... | Amit258012/100daysofcode | Day62/max_sum_circular_subarray.py | max_sum_circular_subarray.py | py | 1,666 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "typing.List",
"line_number": 21,
"usage_type": "name"
}
] |
36155834213 | import pandas as pd
import numpy as np
import os
import unicodedata
import re
import json
import nltk
from nltk.tokenize.toktok import ToktokTokenizer
from nltk.corpus import stopwords
########################################################
ADDITIONAL_STOPWORDS = ['r', 'u', '2', 'ltgt']
def clean(text):
'A sim... | CSolitaire/natural-language-processing-exercises | prepare.py | prepare.py | py | 3,996 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "nltk.stem.WordNetLemmatizer",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "nltk.stem",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "nltk.corpus.stopwords",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "nltk... |
26113335275 | __authors__ = ["T. Vincent"]
__license__ = "MIT"
__date__ = "25/07/2016"
import itertools
import weakref
import numpy
from . import event
from . import transform
from .viewport import Viewport
# Nodes #######################################################################
class Base(event.Notifier):
"""A sc... | silx-kit/silx | src/silx/gui/plot3d/scene/core.py | core.py | py | 9,716 | python | en | code | 106 | github-code | 6 | [
{
"api_name": "weakref.ref",
"line_number": 56,
"usage_type": "call"
},
{
"api_name": "viewport.Viewport",
"line_number": 67,
"usage_type": "argument"
},
{
"api_name": "viewport.Viewport",
"line_number": 76,
"usage_type": "argument"
},
{
"api_name": "viewport.View... |
10676452808 | # coding: utf-8
import apache_beam as beam
from apache_beam.options.pipeline_options import PipelineOptions
class TemplateOptions(PipelineOptions):
@classmethod
def _add_argparse_args(cls, parser):
parser.add_value_provider_argument("--input_csv", type=str)
parser.add_value_provider_argument... | sfujiwara/dataflow-gcs2gdrive | pipeline/task.py | task.py | py | 3,088 | python | en | code | 3 | github-code | 6 | [
{
"api_name": "apache_beam.options.pipeline_options.PipelineOptions",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "apache_beam.DoFn",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "csv.reader",
"line_number": 29,
"usage_type": "call"
},
{
... |
1815348061 | import torch as t
from skimage import transform as sktfs
from torchvision import transforms as tvtfs
from data.voc_dataset import VOCDataset
from data import util
import numpy as np
from utils.config import opt
def inverse_normalize(img):
"""
:param img:经过归一化的img(0~1)减去均值除以方差的
:return:
""... | chuliuT/simple-faster-rcnn-annotations | data/dataset.py | dataset.py | py | 4,672 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "torchvision.transforms.Normalize",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "torchvision.transforms",
"line_number": 27,
"usage_type": "name"
},
{
"api_name": "torch.from_numpy",
"line_number": 29,
"usage_type": "call"
},
{
"api_name... |
10786893452 | import os
import subprocess
from rich import print
import glob
import sys
import shutil
def getSamples(p1, p2):
samples_1 = glob.glob(
os.path.join(
p1,
"Sample_*"
)
)
samples_2 = glob.glob(
os.path.join(
p2,
"Sample_*"
)
... | maxplanck-ie/dissectBCL | src/wd40/cat.py | cat.py | py | 1,885 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "glob.glob",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "glob.glob",
"line_number": 16... |
8101869951 | import vtk
import math
import random
from vtk.util.colors import white as color
class Skeleton(object):
def __init__(self):
self.sphereSources = list()
self.sphereMappers = list()
self.sphereActors = list()
self.ellipsoidPara = list()
self.ellipsoidSources = list()
... | ys1998/motion-forecast | visualize/MultiPersonVisualizer/Skeleton.py | Skeleton.py | py | 7,492 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "vtk.vtkSphereSource",
"line_number": 46,
"usage_type": "call"
},
{
"api_name": "vtk.vtkPolyDataMapper",
"line_number": 51,
"usage_type": "call"
},
{
"api_name": "vtk.vtkActor",
"line_number": 54,
"usage_type": "call"
},
{
"api_name": "vtk.util.color... |
38758064825 | import os,glob
import time
import geopandas as gpd
import xarray as xr
from BurnCube import BurnCube
bc = BurnCube()
import argparse
import numpy as np
from BurnCube import create_attributes
def create_empty_dataset(bc,filename,method):
"""make a dataset
takes the BurnCube, file and method """
out = xr.... | GeoscienceAustralia/burn-mapping | BurnCube/burn_mapping_tiles.py | burn_mapping_tiles.py | py | 11,787 | python | en | code | 11 | github-code | 6 | [
{
"api_name": "BurnCube.BurnCube",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "xarray.Dataset",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "numpy.nan",
"line_num... |
30918202468 | import streamlit as st
from supabase import create_client
@st.cache_resource
def init_supabase():
supabase_client = create_client(
supabase_url=st.secrets["SUPABASE_URL"],
supabase_key=st.secrets["SUPABASE_KEY"]
)
return supabase_client
def write_data(target_table, data):
supabase_cl... | yeomko22/mbti_counseling | utils/supabase_util.py | supabase_util.py | py | 982 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "supabase.create_client",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "streamlit.secrets",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "streamlit.secrets",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "str... |
22257882017 | """
Installation file for python pyvista module
"""
import os
# import sys
from io import open as io_open
from setuptools import setup
package_name = 'pyvista'
__version__ = None
filepath = os.path.dirname(__file__)
version_file = os.path.join(filepath, package_name, '_version.py')
with io_open(version_file, mode='r'... | rohankumardubey/pyvista | setup.py | setup.py | py | 3,226 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "os.path.dirname",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number"... |
26203385672 | import subprocess
import sys
from pathlib import Path
import Helper
# encoder specific path variables
vvenc_root = "codecs/vvenc"
vvenc_exe = Helper.getEXE(vvenc_root, "vvencFFapp")
vvenc_encoderCfgPath = "codecs/vvenc/cfg/randomaccess_"
def encode(seqCfg_path, filename, tbr, preset, threads, output_path):
print... | DavidLangmeier/encAlot | VVenC.py | VVenC.py | py | 1,606 | python | en | code | 5 | github-code | 6 | [
{
"api_name": "Helper.getEXE",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
"line_numbe... |
22943826590 | import logging
import os
from package_vcms import record_log, LINUX, CURRENT_DIR, none_null_stringNone
from package_vcms.platform_func import platform_functool
logger = logging.getLogger(__file__)
if LINUX:
try:
from jnius import autoclass
except:
logger.error("jnius not installed !")
@recor... | wfeng888/package_vcms_proj | package_vcms/merge.py | merge.py | py | 882 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "logging.getLogger",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "package_vcms.LINUX",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "package_vcms.LINUX",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "jnius.autoclass... |
14412962268 | from dash import dcc, html, Dash, Input, Output
import pandas as pd
from academic_world_project.dbs.neo4j_utils import get_faculty, get_keywords, get_year
from academic_world_project.dbs.mysql_utils import MYSQL
def publication_citiation(app: Dash) -> list:
@app.callback(
Output("faculty1", "options"),
... | ranranrunforit/Faculty-Analytics | faculty_analytics/widgets/faculty_publication_citiations_figure.py | faculty_publication_citiations_figure.py | py | 7,962 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "dash.Dash",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "academic_world_project.dbs.neo4j_utils.get_faculty",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "dash.Output",
"line_number": 9,
"usage_type": "call"
},
{
"api_name":... |
13486644745 | from collections import defaultdict
a_dir = '../2021-hashcode-practice/input/a_an_example.in.txt'
# a_dir = '../2021-hashcode-practice/input/b_better_start_small.in.txt'
class project:
def __init__(self, d, s, b, r):
self.duration = d
self.score = s
self.bestbefore = b
self.roles = r
contributorDict... | spes2357/2021-hashcode-practice | Yong/qualification2022.py | qualification2022.py | py | 2,859 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "collections.defaultdict",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "collections.defaultdict",
"line_number": 13,
"usage_type": "call"
}
] |
37026939611 | import point as po
import pygame
import random as r
class ConvexHull:
def __init__(self, points):
self.points = points
self.hull = []
def left_index(self):
min_idx = 0
for i in range(1, len(self.points)):
if self.points[i].x < self.points[min_idx].x:
... | MaazKhan3/Geometric_Algorithms | jarvis.py | jarvis.py | py | 3,027 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "random.x",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "random.y",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "pygame.draw.line",
"line_number": 44,
"usage_type": "call"
},
{
"api_name": "pygame.draw",
"line_... |
21299776600 | # -*- coding: utf-8 -*-
"""
Created on Thu Jul 8 14:09:05 2021
@author: Yara
"""
import dash_core_components as dcc
import dash_html_components as html
import dash_bootstrap_components as dbc
from dash.dependencies import Input, Output
from app import app
import pandas as pd
import plotly.express as px
df_raw = p... | yHammoud1/RBA | RBA/Dashboard/apps/raw_energy_data.py | raw_energy_data.py | py | 5,022 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "pandas.read_csv",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "dash_bootstrap_components.Table.from_dataframe",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "dash_bootstrap_components.Table",
"line_number": 33,
"usage_type": "attrib... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.