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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
74082112000 | # Created by Hansi at 12/5/2020
from statsmodels.tsa.arima.model import ARIMA
from continuous_prediction.algo.common.util import grouped
def train_model(train, args):
"""
Train ARIMA model
:param train: list or data series
:param args: json
:return: object
Trained model
"""
model... | HHansi/Economic-Prediction | continuous_prediction/algo/arima.py | arima.py | py | 1,287 | python | en | code | 2 | github-code | 97 | [
{
"api_name": "statsmodels.tsa.arima.model.ARIMA",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "continuous_prediction.algo.common.util.grouped",
"line_number": 42,
"usage_type": "call"
}
] |
3688492930 | from __future__ import annotations
import asyncio
import logging
from typing import Any, Callable
from functools import partial
import hikari
from hikari.traits import EntityFactoryAware
from hikari import InteractionCreateEvent
from hikari.interactions.base_interactions import ResponseType
from hikari.embeds import Em... | rmizukam/TanjunBot | barebonesprojects/boobaBot.py | boobaBot.py | py | 7,786 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "functions.unload_csv",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "hikari.messages.ButtonStyle.SECONDARY",
"line_number": 24,
"usage_type": "attribute"
},
{
"api_name": "hikari.messages.ButtonStyle",
"line_number": 24,
"usage_type": "name"
}... |
33069568697 | import pygame
from pygame.sprite import Sprite
from random import randint
class Obstacle(Sprite):
def __init__(self, type):
super().__init__()
if type == 'fly':
self.fly_1 = pygame.image.load('graphics\Fly\Fly1.png').convert_alpha()
self.fly_2 = pygame.image.load(... | regencode/UltimatePygameIntro | obstacle.py | obstacle.py | py | 1,380 | python | en | code | null | github-code | 97 | [
{
"api_name": "pygame.sprite.Sprite",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "pygame.image.load",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "pygame.image",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "pygame.image.... |
38672836090 | import gc, random
import numpy as np
import pandas as pd
from sklearn.preprocessing import StandardScaler
def get_data(path, dataset, predict, model_name, fold=[True]*10):
assert dataset in ('prompt_new', 'displaced', 'prompt_old')
assert predict in ('pT', '1/pT', 'pT_classes')
df = pd.read_csv(p... | lastnameis-borah/CMS_moun_transverse_momentum_estimation | Utils/PreprocessedData.py | PreprocessedData.py | py | 2,539 | python | en | code | 2 | github-code | 97 | [
{
"api_name": "pandas.read_csv",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "sklearn.preprocessing.StandardScaler",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "random.Random",
"line_number": 47,
"usage_type": "call"
},
{
"api_name": "nu... |
19468482241 | import pandas as pd
from os.path import dirname, join
import plotly.express as px
import plotly.graph_objs as go
# ---- Data ----
def load_data(filename):
data = pd.read_csv(filename)
data['Time'] = pd.to_datetime(data['Time'])
cols = data.columns.tolist()
dictionary = {}
for elem in... | csantiestebantoca/solarplan | controllers/timeSeriesTracker.py | timeSeriesTracker.py | py | 2,744 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "pandas.read_csv",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "pandas.to_datetime",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "os.path.dirname",
... |
2824416556 | import numpy as np
from PIL import Image
import matplotlib.pyplot as plt
# import matplotlib.image as plt_img
from collections import Counter
# from flask import request
import cv2
def invert():
image = cv2.imread("static/img/img_now.jpg")
new_image = cv2.bitwise_not(image)
cv2.imwrite("static/img/img_now... | phamtrantriem/Image-Processing | image_processing.py | image_processing.py | py | 12,401 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "cv2.imread",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "cv2.bitwise_not",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "cv2.imwrite",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "cv2.imread",
"line_number"... |
11307288547 | from datetime import timedelta
from typing import List, Dict
from hypothesis import given, HealthCheck, settings, Phase
from hypothesis.strategies import integers
from tests.base_test_case import BaseTestCase
from electionguard.ballot import CiphertextBallot
from electionguard.decrypt_with_secrets import decrypt_bal... | microsoft/electionguard-python | tests/property/test_encrypt_hypotheses.py | test_encrypt_hypotheses.py | py | 7,126 | python | en | code | 155 | github-code | 97 | [
{
"api_name": "electionguard_tools.factories.election_factory.ElectionFactory.get_encryption_device",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "electionguard_tools.factories.election_factory.ElectionFactory",
"line_number": 26,
"usage_type": "name"
},
{
"api_name"... |
44271013880 | import sys
import os
from PyQt6.QtGui import QKeySequence
from PyQt6.QtWidgets import QApplication
from toolbaricons import ToolbarIcons
class StatusShortcuts(ToolbarIcons):
def __init__(self):
super(StatusShortcuts, self).__init__()
self.setWindowTitle("Python Status Bar & Shortcuts"... | krunapon/interaction-demo-codes | pyqt6/toolbars/status_shortcuts.py | status_shortcuts.py | py | 1,136 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "toolbaricons.ToolbarIcons",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "PyQt6.QtGui.QKeySequence",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "PyQt6.QtWidgets.QApplication",
"line_number": 30,
"usage_type": "call"
},
{
"ap... |
10193832906 | from django.contrib import admin
from django.contrib.auth.models import Group
from django.contrib.auth.admin import UserAdmin
from django.utils.translation import ugettext_lazy as _
from users.models import UserProfile, MyGroup, Discount, DoctorMain
# Register your models here.
class UserAdmin(UserAdmin):
fields... | AsuraBot/klinika | users/admin.py | admin.py | py | 1,258 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "django.utils.translation.ugettext_lazy",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "django.utils.translation.ugettext_lazy",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "django.utils.translation.ugettext_lazy",
"line_number": 19,
... |
38771155592 | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Wed Mar 22 19:04:10 2017
@author: bernier2
"""
from __future__ import print_function
import os
import multiprocessing
import numpy as np
from scipy import ndimage
try:
import dill as cpl
except(ImportError):
import cPickle as cpl
import yaml
... | joelvbernier/hexrd-sandbox | multipanel_ff/dexela_scripts/find_orientations_script.py | find_orientations_script.py | py | 7,388 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "cPickle.load",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "hexrd.imageseries.open",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "hexrd.imageseries",
"line_number": 45,
"usage_type": "name"
},
{
"api_name": "yaml.load",
... |
25901345515 | from datetime import datetime
from django.contrib.auth.forms import UserCreationForm
from django import forms
from django.contrib.auth.models import User
from django.core.exceptions import ValidationError
from .models import Profile
class CustomUserCreationForm(UserCreationForm):
class Meta:
model = User... | ec18130/group-projectEECS | djnews/forms.py | forms.py | py | 1,173 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "django.contrib.auth.forms.UserCreationForm",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "django.contrib.auth.models.User",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "django.contrib.auth.models.User.objects.filter",
"line_number": 17... |
2080650338 | from pathlib import Path
from typing import List, Optional, Union
from .commons import ModelOption
from .faceswap_cv2 import FaceswapCVOption
from .fomm import FOMMOption
from .simswap import SimswapOption
AVAILABLE_SWAP_TYPES = ["simswap", "fomm", "faceswap_cv2"]
class DOT:
"""Main DOT Interface.
Supporte... | sensity-ai/dot | src/dot/dot.py | dot.py | py | 6,727 | python | en | code | 3,574 | github-code | 97 | [
{
"api_name": "pathlib.Path",
"line_number": 52,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
"line_number": 53,
"usage_type": "call"
},
{
"api_name": "commons.ModelOption",
"line_number": 79,
"usage_type": "name"
},
{
"api_name": "commons.ModelOption",
... |
40752208695 | #
# python driver for Fischertechnik RoboLT
#
import os
import usb.core
import usb.backend.libusb1
import logging
logger = logging.getLogger('robolt')
ID_VENDOR = 0x146a
ID_PRODUCT = 0x000a
# limit the visibility to simplify the usage
__all__ = ["scan_for_devices", "RoboLT"]
def scan_for_devices(... | ftCommunity/python-robolt | robolt/__init__.py | __init__.py | py | 5,461 | python | en | code | 2 | github-code | 97 | [
{
"api_name": "logging.getLogger",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "usb.core.backend.libusb1.get_backend",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "usb.core.backend",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_... |
38007311181 | #!/usr/bin/python3
'''Test reading and writing binary.'''
import logging
logging.basicConfig(level=logging.DEBUG)
def write_binary_file(filename: str, data):
logging.debug('data.__class__=%s', data.__class__)
fd = open(filename, 'wb')
fd.write(data)
fd.close()
def write_binary_file_with_bytearray(f... | hauva69/python-testing | accented_characters/binary.py | binary.py | py | 826 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "logging.basicConfig",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "logging.DEBUG",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "logging.debug",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "logging.debug",
... |
74395227840 | from django.conf.urls import url,include
from pupil import views
app_name = 'pupil'
urlpatterns = [
url(r'^$',views.IndexView.as_view(),name='index'),
url(r'^new/$',views.NewVisual.as_view(), name = 'newvisual'),
url(r'^history/',views.history.as_view(),name='history'),
url(r'^visual/(?P<pk>[0-9]+)... | bhavyajain464/Age-Gender-Race-Prediction | pupil/urls.py | urls.py | py | 552 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "django.conf.urls.url",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "pupil.views.IndexView.as_view",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "pupil.views.IndexView",
"line_number": 10,
"usage_type": "attribute"
},
{
"api... |
6569313536 | #!/usr/bin/env python3.6
import os
import sys
import time
from abc import ABCMeta, abstractproperty
from io import BytesIO
from mmap import mmap, PROT_READ
from pathlib import Path
from PIL import Image
from packed_struct import F, Struct
MAX_MMAP = 2 * 1024 * 1024
OUT_DIR = Path("out").resolve()
class Command(St... | ptramsey/star | parser.py | parser.py | py | 2,863 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "pathlib.Path",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "packed_struct.Struct",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "abc.ABCMeta",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "abc.abstractproperty",
... |
74812590397 | import json
from typing import Dict, List, Set
import requests
WIKIPEDIA_REQUEST_URL = "http://en.wikipedia.org/w/api.php?action=query"
def _get_wikipedia_title(request_token: List[str]) -> Dict[str, str]:
'''
Returns Dict with <pageid>: title
'''
out_format = "json"
srprop = "sectiontitle"
... | zushicat/text-topics | _request_wikipedia.py | _request_wikipedia.py | py | 1,954 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "typing.List",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "typing.Dict",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "requests.get",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "typing.Dict",
"line_number":... |
22849718093 | from django.shortcuts import render, redirect #Son los accesos directos y la redirección
from django.views import generic #importa listas genericas
from django.contrib.messages.views import SuccessMessageMixin
from django.urls import reverse_lazy #Crea la URL cuando es necesario
from django.contrib.auth.decorators imp... | JAZM14/J | Solicitudes comenta/views.py | views.py | py | 7,932 | python | es | code | 0 | github-code | 97 | [
{
"api_name": "django.views.generic.ListView",
"line_number": 30,
"usage_type": "attribute"
},
{
"api_name": "django.views.generic",
"line_number": 30,
"usage_type": "name"
},
{
"api_name": "models.Solicitud",
"line_number": 31,
"usage_type": "name"
},
{
"api_name... |
15192081640 | """View module for handling requests about categories"""
from django.http import HttpResponseServerError
from rest_framework.viewsets import ViewSet
from rest_framework.response import Response
from rest_framework import serializers, status
from solehubapi.models import Order, User
class OrderView(ViewSet):
"""Lev... | drodemby/SoleHub-server | solehubapi/views/order.py | order.py | py | 3,229 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "rest_framework.viewsets.ViewSet",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "solehubapi.models.User.objects.get",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "solehubapi.models.User.objects",
"line_number": 18,
"usage_type": "attr... |
10918583511 | import tkinter as tk
from PIL import Image, ImageTk
class Img_Window ():#tk.Toplevel):
def __init__(self, master, data):
#tk.Toplevel.__init__(self, master)
self.img_index = 0
self.img_list = data
self.create_window()
self.window.mainloop()
def create_window(self):
... | ray0426/Image-processor | imgs/src/show_img.py | show_img.py | py | 2,106 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "tkinter.Toplevel",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "tkinter.Frame",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "tkinter.Frame",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "tkinter.BOTTOM",
"li... |
3828459053 | from util import database
from functools import wraps
import flask
CS542_TOKEN_COOKIE = 'CS542_TOKEN_COOKIE'
CS542_TOKEN_COOKIE_EXPIRY = 86400
def current_user():
if flask.has_request_context() and CS542_TOKEN_COOKIE in flask.request.cookies:
db = database.get_db()
if 'current_user' not in flask.g... | ryodine/cs542 | app/accounts/session.py | session.py | py | 2,368 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "flask.has_request_context",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "flask.request",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "util.database.get_db",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "util.... |
8579225012 | import torch
import torch.nn.functional as F
from mmdet.core.evaluation.panoptic_utils import INSTANCE_OFFSET
from mmdet.core.mask import mask2bbox
from mmdet.models.builder import HEADS
from .base_panoptic_fusion_head import BasePanopticFusionHead
@HEADS.register_module()
class MaskFormerFusionHead(BasePanopticFusi... | susaha/edaps | mmdet/models/seg_heads/panoptic_fusion_heads/maskformer_fusion_head.py | maskformer_fusion_head.py | py | 15,125 | python | en | code | 24 | github-code | 97 | [
{
"api_name": "base_panoptic_fusion_head.BasePanopticFusionHead",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "torch.nn.functional.softmax",
"line_number": 53,
"usage_type": "call"
},
{
"api_name": "torch.nn.functional",
"line_number": 53,
"usage_type": "name... |
74245238718 | import argparse, os
from PIL import Image, ImageDraw, ImageFont
parser = argparse.ArgumentParser(description='image watermarking')
parser.add_argument("path", help="path of input file or directory",
type=str)
parser.add_argument("-opacity", "--opacity", type=int, default = 40, help="opacity value o... | arpanghosh8453/public-programs | archived/myprojects-Python_3/watermark image/watermark_image_argparse.py | watermark_image_argparse.py | py | 3,552 | python | en | code | 87 | github-code | 97 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "PIL.ImageFont.truetype",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "PIL.ImageFont",
"line_number": 30,
"usage_type": "name"
},
{
"api_name": "PIL.Image... |
26067170522 | from scipy.io import loadmat
from scipy.signal import butter, lfilter
import numpy as np
import math
from pyriemann.estimation import Covariances, Coherences
from pyriemann.tangentspace import TangentSpace, FGDA
sample_rate = 512 #in Hz
num_channels = 12
path = './db/'
# load train data
def load_train_data(path_to... | achrisk/WCCI2020-BCI-Challenge | data_utils.py | data_utils.py | py | 6,724 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "scipy.io.loadmat",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "scipy.io.loadmat",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "pyriemann.estimation.Coherences",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "pyr... |
73400538240 | import os
import numpy as np
import cv2
import csv
from keras.preprocessing.image import ImageDataGenerator
from tqdm import tqdm
import random
import argparse
src_path = os.path.dirname(os.path.abspath(__file__))
input_path = os.path.dirname(src_path)
data_path = os.path.join(input_path, 'plant-pathology-2021-fgvc8')... | HaoZhu10015/plant-pathology-2021-fgvc8 | src/img_aug_step1.py | img_aug_step1.py | py | 4,300 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "os.path.dirname",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "os.path.abspath",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "os.path.dirname",
"l... |
73917391998 | import os
from PIL import Image as im_open, ImageDraw
from keras.preprocessing import image as Image
from keras.applications.resnet50 import preprocess_input, decode_predictions
from keras.models import load_model
import numpy as np
#model.save('my_model.h5') # creates a HDF5 file 'my_model.h5'
#del model # de... | yustiks/master_project | draw_prediction.py | draw_prediction.py | py | 1,657 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "keras.models.load_model",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "os.listdir",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "PIL.Image.open",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "PIL.Image",
"li... |
849951130 | import pygame
import os
SCREEN_WIDTH=300
SCREEN_HEIGHT=240
pygame.init()
clock=pygame.time.Clock()
screen=pygame.display.set_mode((SCREEN_WIDTH,SCREEN_HEIGHT))
pygame.display.set_caption('NarutoTrial')
sprite_sheet_image=pygame.image.load(os.path.join('assets','kakashi.png')).convert_alpha()
isGameRunning=True
B... | kendad/naruto-animations | testing_playground/basic_animation1.py | basic_animation1.py | py | 1,740 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "pygame.init",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "pygame.time.Clock",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "pygame.time",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "pygame.display.set_mode",... |
21429174741 | from __future__ import (absolute_import, division,
print_function)
import numpy as np
from collections import OrderedDict
import copy
import os
import re
from atom.api import (Atom, Str, observe, Dict, List, Int, Bool)
from skbeam.fluorescence import XrfElement as Element
from skbeam.core.fit... | dmgav/test_doc | pyxrf/model/setting.py | setting.py | py | 16,808 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "logging.getLogger",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "atom.api.Atom",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "atom.api.Str",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "atom.api.Int",
"line... |
2850399219 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
""" system """
import logging as log
import collections
""" package """
import lib.yaml as yaml
configs = {}
def add(config_file):
global configs
log.debug('config.add %s',config_file)
f = open(config_file)
config = yaml.safe_load(f)
f.close()
update(config)
... | Larpon/pyClickTrack | config.py | config.py | py | 1,055 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "logging.debug",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "lib.yaml.safe_load",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "lib.yaml",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "logging.debug",
"line_n... |
30685825280 | """ForgeRock Identity Management storage layer for Gafaelfawr."""
from __future__ import annotations
from httpx import AsyncClient, BasicAuth, HTTPError
from structlog.stdlib import BoundLogger
from ..config import ForgeRockConfig
from ..exceptions import ForgeRockError, ForgeRockWebError
__all__ = ["ForgeRockStora... | lsst-sqre/gafaelfawr | src/gafaelfawr/storage/forgerock.py | forgerock.py | py | 2,829 | python | en | code | 5 | github-code | 97 | [
{
"api_name": "config.ForgeRockConfig",
"line_number": 30,
"usage_type": "name"
},
{
"api_name": "httpx.AsyncClient",
"line_number": 31,
"usage_type": "name"
},
{
"api_name": "structlog.stdlib.BoundLogger",
"line_number": 32,
"usage_type": "name"
},
{
"api_name": ... |
26333222324 | from typing import List, Optional
import pytest
from tests.integration.dev_server import DevServer
from tests.integration.robot_client import RobotClient
@pytest.mark.parametrize(
("num_to_configure_as_maximum", "num_to_upload", "num_to_expect"),
[
(None, 25, 20), # Test that the server enforces a ... | Opentrons/opentrons | robot-server/tests/integration/http_api/runs/test_auto_deletion.py | test_auto_deletion.py | py | 1,977 | python | en | code | 363 | github-code | 97 | [
{
"api_name": "typing.Optional",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "tests.integration.robot_client.RobotClient.make",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "tests.integration.robot_client.RobotClient",
"line_number": 22,
"usage_ty... |
11770412399 | import torch
import torch.nn as nn
import torch.optim
from tensorboardX import SummaryWriter
import os
import numpy as np
import glob
import shutil
import dataset
import unet
import copy
import torchvision
WATERSHED_ENDPOINTS = [0, 1, 2, 3, 4, 5, 6, 7, 10, 15, 25, 35, 55, 100, 200, 362]
# neural net will classify pixe... | timothyn617/watershed-transform | train.py | train.py | py | 7,457 | python | en | code | 5 | github-code | 97 | [
{
"api_name": "numpy.array",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "numpy.float32",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "copy.deepcopy",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "unet.unet_model.UNet",
... |
35749871293 | import math
from flask import Flask
from flask import request
from flask_cors import CORS
from pandas import DataFrame
from src.classifiers.models.model import Model
from src.classifiers.models.dataset import Dataset
from src.classifiers.models.data_leakages_clearer import DataLeakagesClearer
from src.classifiers.model... | alex-robert888/bachelor-project-bias-and-fake-news-prediction | fake-news-classifiers/src/api/main.py | main.py | py | 2,505 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "flask.Flask",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "flask_cors.CORS",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "flask.request.args.get",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "flask.request.args... |
39433110704 | from enum import Enum
from composer_utils import Config
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from ..pie_widget import PieWidget
class EditMode:
"""
Descriptor that handles the edit mode of PieWidget.
When red from, it returns a bool telling whether the Pie is in edit mode.
When mode... | V-YOP/yuuki-krita-config | pykrita/yuuki_helper/templates/pie_menu_utils/widget_utils/edit_mode.py | edit_mode.py | py | 1,494 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "typing.TYPE_CHECKING",
"line_number": 4,
"usage_type": "name"
},
{
"api_name": "enum.Enum",
"line_number": 41,
"usage_type": "argument"
},
{
"api_name": "composer_utils.Config.format_enums",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "... |
37743806927 | from tkinter import *
import time, threading, random
from english_words import english_words_alpha_set
from tkinter import messagebox as mb
class WordleClass():#main class
def __init__(self):
self.score = 0
self.words = []
self.enteredWords = []
self.timeLeft = 50
... | JiteshNayak2004/WORD-RUSH | wordrush.py | wordrush.py | py | 3,758 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "threading.Thread",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "random.sample",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "random.sample",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_n... |
12191862691 | from flask import Flask, render_template, redirect
from pymongo import MongoClient
import scrape_mars
# Use flask_pymongo to set up mongo connection
mongo = MongoClient("mongodb://localhost:27017/marsmission_app")
# Create an instance of Flask
app = Flask(__name__)
@app.route("/")
def index():
ma... | 1Swimmer/web-scraping-challenge | app.py | app.py | py | 677 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "pymongo.MongoClient",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "flask.Flask",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "flask.render_template",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "scrape_mars.scra... |
5899056996 | from kiteconnect import KiteConnect, KiteTicker
import pandas as pd
import datetime
from itertools import cycle, islice
import re
# Exhaustive list of all the stocks for which data is needed
STOCK_LIST = \
["NIFTY", "BANKNIFTY", "FINNIFTY","AARTIIND","ACC","ADANIENT"
,"ADANIPORTS","ALKEM","AMARAJABAT","AMBUJACEM","APL... | gunnerVivek/Automated-Shares | main/stock_instruments.py | stock_instruments.py | py | 12,015 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "kiteconnect.KiteConnect",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 46,
"usage_type": "call"
},
{
"api_name": "itertools.cycle",
"line_number": 68,
"usage_type": "call"
},
{
"api_name": "itertools.is... |
958764363 | # from API import flight_db
import secrets
from datetime import datetime,date
from flask import request
from functools import wraps
class Admin():
def __init__(self,admin,admin_session,flight_details,bookings):
self.admin=admin
self.admin_session=admin_session
self.flight_details=flight_de... | MSHRISH/FlightX | API/admin_operations.py | admin_operations.py | py | 4,249 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "secrets.token_urlsafe",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.utcnow",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 26,
"usage_type": "name"
},
{
"api_name": "date... |
22599634134 | import random
import hangman_words
import hangman_art
from replit import clear
print(hangman_art.logo)
end_of_game = False
lives = 6
chosen_word = random.choice(hangman_words.word_list)
word_length = len(chosen_word)
#Initialize display
display = []
for _ in range (word_length):
display.append("_")
while not ... | diacarcor/Day-7-Hangman-1-Start | main.py | main.py | py | 1,280 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "hangman_art.logo",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "random.choice",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "hangman_words.word_list",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "repli... |
37223090093 | import os
import cv2
import numpy as np
from PIL import Image
recognizer= cv2.face.createLBPHFaceRecognizer()
path='dataSet_LBPHF'
def getImages_And_ID (path):
''' crée une liste avec les chemin relatif des différentes images '''
imagePaths=[os.path.join(path,f) for f in os.listdir(path)]
faces=[]
IDs=[... | rolandus10/Projet_miroir | project2/face-reco/LBPHF_BDD_INCLUDED/trainner_LBPHF.py | trainner_LBPHF.py | py | 1,559 | python | fr | code | 0 | github-code | 97 | [
{
"api_name": "cv2.face.createLBPHFaceRecognizer",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "cv2.face",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "os.path",
... |
3290962080 | from datetime import date
from views import Index, Page, Contact, Examples, Another_page
# front controller
def secret_front(request):
request['date'] = date.today()
def other_front(request):
request['header_menu'] = [
{'name': "Home", 'link': "/", 'selected': False},
{'name': "Examples", 'l... | visor517/GB_architecture | urls.py | urls.py | py | 771 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "datetime.date.today",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "datetime.date",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "views.Index",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "views.Page",
"line_nu... |
14158139712 | from typing import List
def maxSubarraySumCircular(nums:List[int]) -> int:
if len(nums) == 1:
return nums[0]
s = sum(nums)
curr_max = max_so_far = curr_min = min_so_far = nums[0]
for i in range(1, len(nums)):
# Kadane's algorithm to find maximum subarray sum.
curr_max = max(cur... | abhash896/Data-structures-and-algorithm | Maximum_sum_circular_subarray.py | Maximum_sum_circular_subarray.py | py | 645 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "typing.List",
"line_number": 4,
"usage_type": "name"
}
] |
28768699941 | from typing import List
class TreeNode:
def __init__(self, val=0, left=None, right=None):
self.val = val
self.left = left
self.right = right
class Solution:
def buildTree(self, preorder: List[int], inorder: List[int]) -> TreeNode:
dic = {}
for i in range(len(inorder)):
... | AllenZB/Leetcode | leetcode and algorithm/Tree/Constrct tree from inorder and preorder.py | Constrct tree from inorder and preorder.py | py | 1,007 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "typing.List",
"line_number": 9,
"usage_type": "name"
}
] |
25541176071 | import pandas as pd
import requests
import streamlit as st
DATASET_URL = "https://raw.githubusercontent.com/Lexie88rus/bank-marketing-analysis/master/bank.csv"
@st.experimental_memo
def fetch_data() -> pd.DataFrame:
"""_summary_
:return: _description_
:rtype: pd.DataFrame
"""
return pd.read_csv(... | sthenkel23/weisshorn-marine | consumer/src/marine/data/api.py | api.py | py | 1,276 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "pandas.read_csv",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "streamlit.experimental_memo",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "pandas.DataFrame",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "... |
19873012512 | import requests
import time
import os
obslist_dir = '/Users/mike_e_dubs/MWA/Obs_Lists/'
GC_dir = '/Users/mike_e_dubs/MWA/Catalogs/Grand_Catalog/'
GS_outdir = GC_dir + 'Golden_Set_8s_Autos/Skymaps/'
LR_outdir = GC_dir + 'Long_Run_8s_Autos/Skymaps/'
S2_outdir = GC_dir + 'S2_Zenith_8s_Autos/Skymaps/'
DS_outdir = GC_dir ... | mwilensky768/MJW-MWA | Auxiliary_Scripts/img_get.py | img_get.py | py | 1,145 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "requests.get",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 39,
"usage_type": "call"
}
] |
17352361376 | from suds.client import Client
client = Client('http://localhost:3333/calculadora?wsdl')
def tensao():
amperes = input("Amperes: ")
ohms = input("Ohms: ")
result = client.service.tensao(amperes, ohms)
print (result)
def corrente():
volts = input("Volts: ")
ohms = input("Ohms: ")
result = c... | gabrielemartins/trab-webservice | index.py | index.py | py | 734 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "suds.client.Client",
"line_number": 2,
"usage_type": "call"
}
] |
12103517756 | import pygame
import sys
import time
import config
from config import parsestory
import textwrap
# Colors
BLACK = (0, 0, 0)
GRAY = (180, 180, 180)
WHITE = (255, 255, 255)
HEIGHT = 500
WIDTH = HEIGHT
LINEHEIGHT = 30
TEXTHEIGHT = 200
# Create game
pygame.init()
size = width, height = WIDTH, HEIGHT+TEXTHEIGHT
screen = ... | gingeredtech/ai-created-children-book | main.py | main.py | py | 1,976 | python | en | code | 2 | github-code | 97 | [
{
"api_name": "pygame.init",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "pygame.display.set_mode",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "pygame.display",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "pygame.displa... |
34589241199 | """Check that the original SAS i94 data input rows match the output us_visitors parquet rows
The count of input rows is read from the rowcount_udacitysas*.csv file for
the relevant month and year.
The sum of visitorcount column in the parquet data for the relevant year and month is
selected from the dataset.
Parame... | dysartcoal/DataPipeline_AirflowSparkEMR | ETL/etl/checkrowsandcounts_sas_parquet.py | checkrowsandcounts_sas_parquet.py | py | 6,323 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "pyspark.sql.SparkSession.builder.config",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "pyspark.sql.SparkSession.builder",
"line_number": 37,
"usage_type": "attribute"
},
{
"api_name": "pyspark.sql.SparkSession",
"line_number": 37,
"usage_type":... |
33290961080 | import torch
from gui.kogpt_model.kogpt2 import DialogKoGPT2
from jman.kogpt2_transformers import get_kogpt2_tokenizer
class answer_generator:
def __init__(self):
self.root_path = '/Users/mac/git/Capstone_2022/gui'
self.checkpoint_path = f"{self.root_path}/kogpt_model/checkpoint"
self.save_ckpt_path =... | jiminAn/Capstone_2022 | gui/kogpt2_transformers/text_generator.py | text_generator.py | py | 2,162 | python | en | code | 2 | github-code | 97 | [
{
"api_name": "torch.cuda.is_available",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "torch.cuda",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "torch.device",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "torch.load",
... |
17947798254 | # -*- coding: utf-8 -*-
"""
Created on Wed Oct 13 17:20:16 2021
@author: annas
This script creates a plot of Jaccard indexes relative to number of
investigated gene pairs
"""
import matplotlib
#matplotlib.use('Agg')
import matplotlib.pyplot as plt
def x_y_std(infile):
x = []
y = []
std = [... | AnnaSHessevik/Consensus_CSD | method_development/comparisons/jaccard_indexes/plot_jaccards.py | plot_jaccards.py | py | 2,351 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "matplotlib.pyplot.subplots",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 25,
"usage_type": "name"
},
{
"api_name": "matplotlib.pyplot.rcParams",
"line_number": 39,
"usage_type": "attribute"
},
{
"api_... |
71131296960 | from bets.graphql.input import (
AffairCreationInput,
AffairUpdateInput,
EventCreationInput,
EventUpdateInput,
QuotaCreationInput,
QuotaUpdateInput,
)
from bets.graphql.types import AffairType, BetType, EventType, QuotaType
from bets.models import Affair, Bet, Event, Quota, Tag, Transaction
from... | jcdelgadoramos/j8bet_backend | bets/graphql/mutations.py | mutations.py | py | 9,735 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "graphene.Mutation",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "graphene.Field",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "bets.graphql.types.AffairType",
"line_number": 24,
"usage_type": "argument"
},
{
"api_name": "be... |
5279006539 | #%%
import numpy as np
import matplotlib.pyplot as plt
from scipy.ndimage.filters import gaussian_filter
INPUT_FOLDER = "../data/"
train_loss = np.load(INPUT_FOLDER + "train_loss.npy")
val_loss = np.load(INPUT_FOLDER + "val_loss.npy")
train_raw_acc = np.load(INPUT_FOLDER + "train_raw_accuracy.npy")
val_raw_acc = np.... | theodormoroianu/ThirdYearCourses | Licenta/code/generate_train_graphs.py | generate_train_graphs.py | py | 1,743 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "numpy.load",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "numpy.load",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "numpy.load",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "numpy.load",
"line_number": 12,
... |
42793770794 | # -*- coding: utf-8 -*-
import sys
import re
from .report import Reporter
from .utils import getlogger, CommandWrapper
logger = getlogger(__name__)
logger.setLevel(10)
class STARLogger(object):
def __init__(self, star_log, picard_log, sample):
self.star_log = star_log
self.picard_log = picard_lo... | SingleronBio/SCOPE-tools | scopetools/star.py | star.py | py | 4,007 | python | en | code | 14 | github-code | 97 | [
{
"api_name": "utils.getlogger",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "re.compile",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "re.S",
"line_number": 27,
"usage_type": "attribute"
},
{
"api_name": "re.compile",
"line_number": 2... |
70104725438 | import statistics
import numpy as np
from state import State
from math import inf
def run(data, num_groups):
d = data.to_numpy()
val, opt = metaheuristic(num_groups, d.shape[0], d)
d = {i: [] for i in range(num_groups)}
for i, item in enumerate(opt.st):
d[item].append(i)
return d
def met... | anoppa/Proyecto-Matematica-Aplicada | backend/metaheuristic_solution.py | metaheuristic_solution.py | py | 2,846 | python | en | code | 3 | github-code | 97 | [
{
"api_name": "math.inf",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "state.State.random_state",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "state.State",
"line_number": 22,
"usage_type": "name"
},
{
"api_name": "numpy.array",
"line... |
12852798380 | """
データ探索を行う
"""
import os
from glob import glob
import csv
import pandas as pd
import numpy as np
from collections import Counter
import re
from pathlib import Path
LAG_NUM = 5
def bname(object_name):
return os.path.basename(object_name.rstrip(os.sep))
def make_data(path,bssid_list):
# WAYPOINT: 1列目TYPE_WA... | ryuhhhh/indoor-location-navigator | search_data/search_data_lag_wifi_1000.py | search_data_lag_wifi_1000.py | py | 7,101 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "os.path.basename",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "os.sep",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "pandas.DataFrame",
"lin... |
17293783939 | import pika
from pika.exchange_type import ExchangeType
def callback(ch, method, properties, body):
print(f" [x] Received {body.decode()}")
connection_params = pika.ConnectionParameters(host='localhost')
connection = pika.BlockingConnection(connection_params)
channel = connection.channel()
channel.exchange_declar... | kaluzny-konrad/kaluzny-konrad | rabbitMq/dead-exchange - move to del timeout/producer.py | producer.py | py | 675 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "pika.ConnectionParameters",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "pika.BlockingConnection",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "pika.exchange_type.ExchangeType.fanout",
"line_number": 10,
"usage_type": "attribute"
}... |
38839156022 | import copy
import random
import numpy as np
from collections import defaultdict
__author__ = 'Riccardo Guidotti'
def entropy_cluster(cluster_info, N):
n = cluster_info['n']
if n == 0:
return 0.0
item_freq = cluster_info['item_freq']
entropy_cluster_val = 0
for item in range(0, len(item_f... | riccotti/TX-Means | code/algorithms/coolcat.py | coolcat.py | py | 8,447 | python | en | code | 17 | github-code | 97 | [
{
"api_name": "numpy.log2",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "numpy.sum",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "random.sample",
"line_number": 117,
"usage_type": "call"
},
{
"api_name": "collections.defaultdict",
"li... |
34227619157 | import torch
import torch.nn as nn
import torch.optim as optim
import pdb
import random
import numpy as np
import quadprog
import miosqp
import scipy as sp
import scipy.sparse as spa
from .common import MLP, ResNet18
class Net(nn.Module):
def __init__(self,
n_inputs,
n_outputs,
... | LuckyLYM/Incremental-Learning | model/old_model/new_MOF.py | new_MOF.py | py | 9,995 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "torch.nn.Module",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "common.ResNet18",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "common.MLP",
"line_... |
6722890980 | from chat.models import ChatRoom
from competitions import design
from competitions.forms import CreateCompetitionForm, EditCompetitionForm, TimeUnit
from competitions.models import Competition, Entry, ThumbsUp
from datetime import datetime, timedelta
from django.conf import settings
from django.contrib.auth.decorators ... | andrewrk/solidcomposer | competitions/views.py | views.py | py | 19,629 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "main.common.get_obj_from_request",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "competitions.models.Competition",
"line_number": 21,
"usage_type": "argument"
},
{
"api_name": "main.common.json_failure",
"line_number": 23,
"usage_type": "call"
... |
20639662472 | import pygame
from pygame.image import load_extended
import ticks
import gui
import yaml
import math
import languages
_font_code: pygame.font.Font
_font_victory: pygame.font.Font
def init():
global _font_code, _font_victory
_font_code = pygame.font.Font("src/res/font/JetBrainsMono-Bold.ttf", 25)
_font_vi... | TP-Coltec-UFMG/2020-303-CodeBot | src/game.py | game.py | py | 33,067 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "pygame.font",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "pygame.font",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "pygame.font.Font",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "pygame.font",
"... |
39746022347 | # ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distrib... | michielkleinnijenhuis/NeuroBlender | animations.py | animations.py | py | 54,360 | python | en | code | 5 | github-code | 97 | [
{
"api_name": "bpy.types.Operator",
"line_number": 48,
"usage_type": "name"
},
{
"api_name": "bpy.data",
"line_number": 63,
"usage_type": "attribute"
},
{
"api_name": "bpy.data",
"line_number": 79,
"usage_type": "attribute"
},
{
"api_name": "bpy.types.Operator",
... |
74774219750 | import numpy as np
import pdb
import pickle
from numpy import random
import random
import skimage
from skimage import transform
import os
import platform
import matplotlib.pyplot as plt
import click
import glob
defaultParams = {
'no_classes': 5, # Number of classes in the N-way K-shot learning case
'no_shot... | Nu-AI/Neuromodulatory_OneShotLearning | hardware_emulated/input_generator.py | input_generator.py | py | 5,251 | python | en | code | 1 | github-code | 71 | [
{
"api_name": "glob.glob",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "glob.glob",
"line_number": 48,
"usage_type": "call"
},
{
"api_name": "glob.glob",
"line_number": 52,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.imread",
"line_nu... |
18145297458 | import warnings
from flask import Flask, request, jsonify
from python.predict import role_infer
from predict import role_predict
warnings.filterwarnings('ignore')
app = Flask(__name__)
@app.route("/keyword", methods=["GET", "POST"])
def info_test():
"""
url: http://172.19.164.120:5000/keyword
返回标签和实体,支持... | jasonvanf/event-extraction | api.py | api.py | py | 1,546 | python | en | code | 2 | github-code | 71 | [
{
"api_name": "warnings.filterwarnings",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "flask.Flask",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "flask.request.method",
"line_number": 35,
"usage_type": "attribute"
},
{
"api_name": "flask.req... |
20436574713 | # -*- coding: utf-8 -*-
"""Application filter for `datetime`_ 24 hours.
.. _datetime: https://docs.python.org/2/library/datetime.html
"""
from django import template
register = template.Library()
@register.filter(name='format_time')
def format_datetime(value):
hours, rem = divmod(value.seconds, 3600)
minut... | rubenvanerk/finswimmingrankings | rankings/templatetags/datetime_filter.py | datetime_filter.py | py | 571 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "django.template.Library",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "django.template",
"line_number": 9,
"usage_type": "name"
}
] |
6351748163 | import sys
from collections import deque
while True:
line = sys.stdin.readline()
if line.isspace():
continue
else:
L, R, C = map(int, line.split())
if L == 0 and R == 0 and C == 0:
break
graph = []
start = None
end = None
for l in range(L):
graph.append([... | jmkim0/algorithm_study | weekly_study_group/Week 9/06-큐브_미로.py | 06-큐브_미로.py | py | 1,590 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "sys.stdin.readline",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "sys.stdin",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "sys.stdin.readline",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "sys.stdin",
"l... |
43303506141 | import re
import base64
from .common import InfoExtractor
class WimpIE(InfoExtractor):
_VALID_URL = r'(?:http://)?(?:www\.)?wimp\.com/([^/]+)/'
_TEST = {
u'url': u'http://www.wimp.com/deerfence/',
u'file': u'deerfence.flv',
u'md5': u'8b215e2e0168c6081a1cf84b2846a2b5',
u'info_d... | fdanesse/JAMediaSuite | JAMediaTube/gtk3/youtube_dl/extractor/wimp.py | wimp.py | py | 1,302 | python | en | code | 4 | github-code | 71 | [
{
"api_name": "common.InfoExtractor",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "re.match",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "base64.b64decode",
"line_number": 25,
"usage_type": "call"
}
] |
72628728231 | from nets.yolo3 import yolo_body
from keras.layers import Input
from yolo import YOLO
from PIL import Image
import tqdm
yolo = YOLO()
test_file = "test_imglist.txt"
img_file = "./img"
with open(test_file) as f:
lines = f.readlines()
n_test = len(lines)
print("num of test images:",n_test)
output_csv =... | CodingChaozhang/yolo3-keras-breath_mask | predict_imgs.py | predict_imgs.py | py | 907 | python | en | code | 49 | github-code | 71 | [
{
"api_name": "yolo.YOLO",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "PIL.Image.open",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "PIL.Image",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "yolo.detect_images",
"line_numb... |
12487331600 | import requests
from dotenv import load_dotenv
import os
from freeGPT import gpt3
load_dotenv(r"..\.env")
batch_size = os.getenv("BATCH_SIZE")
temperature = os.getenv("TEMPERATURE")
top_k = os.getenv("TOP_K")
top_p = os.getenv("TOP_P")
n_keep = os.getenv("N_KEEP")
n_predict = os.getenv("N_PREDICT")
stop = os.getenv("... | Shreyas-ITB/Jarvis | libs/communicate.py | communicate.py | py | 1,969 | python | en | code | 4 | github-code | 71 | [
{
"api_name": "dotenv.load_dotenv",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number": 10... |
37762837814 | # -*- coding: utf-8 -*-
"""
Created on Tue Jul 23 13:18:02 2019
@author: jacqueline.cortez
Capítulo 1. Classification
Introduction:
In this chapter, you will be introduced to classification problems and learn how to solve them using supervised learning techniques.
Classification problems are prevale... | jacesca/python_ds | Supervised Learning with scikit-learn/01_Classification.py | 01_Classification.py | py | 10,117 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "pandas.read_csv",
"line_number": 70,
"usage_type": "call"
},
{
"api_name": "sklearn.datasets.load_iris",
"line_number": 81,
"usage_type": "call"
},
{
"api_name": "sklearn.datasets",
"line_number": 81,
"usage_type": "name"
},
{
"api_name": "pandas.Da... |
28818388940 | import pytest
import allure
from common.checkers import check_failure_reason_no_required_field
from common.checkers import check_failure_reason_wrong_data_type
from common.checkers import check_failure_reason_wrong_param_data_type
from common.constants import DELETE_REQUIRED_PARAMS
from common.constants import STRING_... | brrcdz/QA-Automation-project | tests/test_delete_method.py | test_delete_method.py | py | 3,034 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "common.helpers.run",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "schemas.response.DeleteResponse",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "allure.epic",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "allure... |
27645583815 | import numpy as np
import cv2
import math as m
import utils
"""
Take an absolute value of passed Sobel and apply a threshold.
"""
def abs_sobel_threshold(sobel, thresh=(0, 255)):
# Take the absolute value of the derivative or gradient
abs_sobel = np.absolute(sobel)
# Scale to 8-bit (0 - 255) then convert ... | amemetov/sdc-term1-prj4-adv-lane-lines | threshold.py | threshold.py | py | 6,750 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "numpy.absolute",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "numpy.uint8",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "numpy.max",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "numpy.zeros_like",
"line_num... |
37957128632 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Apr 25 14:45:36 2017
@author: elizabethsizemore
"""
from math import sin
import numpy as np
from numpy import *
import matplotlib.pyplot as plt
#given information
l=.12 #arm length (m)
g=9.8 #gravity (m/s^2)
initial_t=0.0 #initial time seconds
final_t... | esizemore/Homework-6 | Sizemore_hw6_probA.py | Sizemore_hw6_probA.py | py | 1,010 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "math.sin",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "numpy.pi",
"line_number": 26,
"usage_type": "attribute"
},
{
"api_name": "numpy.array",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "numpy.pi",
"line_number": 27,
... |
11079501359 | import os
import glob
from setuptools import setup, find_packages
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
def package_files(directory):
paths = []
for (path, directories, filenames) in os.walk(directory):
for filename in filenames:
paths.ap... | Teichlab/bracer | setup.py | setup.py | py | 1,538 | python | en | code | 33 | github-code | 71 | [
{
"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.dirname",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "os.walk",
"line_number": 1... |
28164578881 | """Lilac CLI."""
from os.path import abspath
from typing import Literal, Optional, Union
import click
from . import __version__
from .concepts.db_concept import DISK_CONCEPT_DB
from .deploy import deploy_project
from .env import env, get_project_dir
from .hf_docker_start import hf_docker_start
from .load import load... | lilacai/lilac | lilac/cli.py | cli.py | py | 6,658 | python | en | code | 312 | github-code | 71 | [
{
"api_name": "project.project_dir_from_args",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "project.dir_is_project",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "click.prompt",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "os.... |
22575278228 | """Base Class for all Models in our System."""
from __future__ import annotations
# IMPORT STANDARD LIBRARIES
from datetime import date, datetime, time, timedelta
from typing import Any, Callable, ClassVar, Optional, Type, TypeVar
# IMPORT THIRD PARTY LIBRARIES
import pydantic
from pydantic.datetime_parse import pars... | gitarrg/lorgs | lorgs/models/base/base.py | base.py | py | 3,215 | python | en | code | 7 | github-code | 71 | [
{
"api_name": "typing.TypeVar",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "typing.Callable",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "datetime.datetime",
"line_number": 23,
"usage_type": "name"
},
{
"api_name": "datetime.date",
... |
28612563411 | from google.cloud import texttospeech
import vlc
import time
import os
os.environ['GOOGLE_APPLICATION_CREDENTIALS'] = 'secrets/text2speech_token.json'
def narrate(text):
client = texttospeech.TextToSpeechClient()
synthesis_input = texttospeech.SynthesisInput(text=text)
voice = texttospeech.VoiceSelecti... | aneeshsharma/Webscraping-Wikipedia | narrate.py | narrate.py | py | 910 | python | en | code | 2 | github-code | 71 | [
{
"api_name": "os.environ",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "google.cloud.texttospeech.TextToSpeechClient",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "google.cloud.texttospeech",
"line_number": 10,
"usage_type": "name"
},
{
... |
36750114683 | # -*- coding: utf-8 -*-
"""
Created on Wed Feb 10 20:48:46 2021
@author: backp
"""
import sqlite3
import mysql.connector
class Database:
def __init__(self,typeOfDatabase = "sqllite"):
if (typeOfDatabase == "sqllite"):
print("sqlite")
self.__conn = sqlite3.connect('MountainWeather... | dlund9182/MountainWeatherTracker | Database.py | Database.py | py | 4,437 | python | en | code | 1 | github-code | 71 | [
{
"api_name": "sqlite3.connect",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "mysql.connector.connector.connect",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "mysql.connector.connector",
"line_number": 21,
"usage_type": "attribute"
},
{
"... |
24442033230 | import numpy as np
import pyglet
import sys
sys.path.append('../')
import colors
class Geometry():
""" Base class for objects defined by sets of vertices. """
def __init__(self, vertices, color=colors.WHITE):
# vertices are a numpy array where each row is the coordinates of one vertex
self.ve... | alexkoziell/AniMath | geometry/shape.py | shape.py | py | 4,070 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "sys.path.append",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "colors.WHITE",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "numpy.asarray",
"li... |
19481686586 | import socket
import select
import sys
import instantmessage_pb2
import argparse
import struct
if __name__ == "__main__":
# Code from tutorial
parser = argparse.ArgumentParser()
parser.add_argument('-s', dest='servername', help='your client\'s hostname', required=True)
parser.add_argument('-n', dest='n... | fzEro555/basicIM | basicIMclient.py | basicIMclient.py | py | 2,708 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "socket.socket",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "socket.AF_INET",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "socket.SOCK... |
12756188941 | from bs4 import BeautifulSoup
import botogram
import requests
import urllib
from . import models
REQUESTS_HEADERS = {
"User-Agent": "Mozilla/5.0 (compatible; TelegramSchoolBot/2.0; "
"+https://github.com/paolobarbolini/TelegramSchoolBot)",
}
class Tasks(botogram.components.Component):
"""... | paolobarbolini/TelegramSchoolBot | telegramschoolbot/tasks.py | tasks.py | py | 8,846 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "botogram.components",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "requests.get",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "urllib.parse.... |
32577330286 | import PIL
from PIL import Image
import os
from array import *
from random import shuffle
import re
basewidth = 32
#Names = [['./training-images','train'], ['./test-images','test']]
name = "C:\\Projects\\REAS\\GLAS\\origin_images"
des_name = "C:\\Projects\\REAS\\GLAS\\32x32"
if not os.path.exists(des_name):
os.ma... | DuongTK/image_classification_CNN | resize_image(1).py | resize_image(1).py | py | 1,369 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "os.path.exists",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "os.makedirs",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "os.listdir",
"line_number... |
21460216556 | import pytest
from unsonic.views.rest.getalbumlist import GetAlbumList
from unsonic.views.rest.getalbumlist2 import GetAlbumList2
from unsonic.views.rest import Command
from . import buildCmd, checkResp
@pytest.fixture(scope="function", params=[GetAlbumList, GetAlbumList2])
def album_list(request):
yield request... | redshodan/unsonic | test/tests/rest/testgetalbumlist.py | testgetalbumlist.py | py | 2,765 | python | en | code | 24 | github-code | 71 | [
{
"api_name": "pytest.fixture",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "unsonic.views.rest.getalbumlist.GetAlbumList",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "unsonic.views.rest.getalbumlist2.GetAlbumList2",
"line_number": 9,
"usage_type"... |
74976025829 |
import numpy as np
from scipy import sparse, fft
from scipy.signal import fftconvolve
from astropy.io import fits
from lentils.operators import Operator, CompositeOperatorProduct, DiagonalOperator
from lentils.common import VisibilitySpace, FourierSpace, ImageSpace
from lentils.backend import libnufft, c_nufft
clas... | devonmpowell/Lentils | lentils/operators/fourier_operators.py | fourier_operators.py | py | 8,241 | python | en | code | 1 | github-code | 71 | [
{
"api_name": "lentils.operators.Operator",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "lentils.common.FourierSpace",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "scipy.fft.rfft2",
"line_number": 19,
"usage_type": "call"
},
{
"api_name":... |
36706851420 | import requests
from pymodm import connect, MongoModel, fields
import base64
import patientMonitoringServer
import ssl
patientMonitoringServer.initialize_server()
connect("mongodb+srv://dessertgrace:"
"youcan@bme547.allsv.mongodb."
"net/myFirstDatabase?retryWrites"
"=true&w=majority", ssl_cert... | dessertgrace/Patient-Monitor | patient_client.py | patient_client.py | py | 1,534 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "patientMonitoringServer.initialize_server",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "pymodm.connect",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "ssl.CERT_NONE",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_nam... |
37838343517 | """
The BluePill agent process.
"""
import random
import sqlite3
import logbook
from .rpcproxy import RPCProxy
log = logbook.Logger(__name__)
def get_prev_state(con, agent_id):
"""
Get the last known state of the agent.
"""
sql = """
select state
from event
where
... | NSSAC/socioneticus-matrix | matrix/client/bluepill_agent.py | bluepill_agent.py | py | 2,626 | python | en | code | 4 | github-code | 71 | [
{
"api_name": "logbook.Logger",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "random.choice",
"line_number": 46,
"usage_type": "call"
},
{
"api_name": "rpcproxy.RPCProxy",
"line_number": 79,
"usage_type": "call"
},
{
"api_name": "sqlite3.connect",
... |
18661788040 | """Created StatHistory model
Revision ID: b62395581615
Revises: 672fc4e15fc5
Create Date: 2019-03-14 22:37:57.524571
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
# revision identifiers, used by Alembic.
revision = 'b62395581615'
down_revision = '672fc4e15fc5'
branch_l... | jhonnold/fndash-flask | migrations/versions/b62395581615_created_stathistory_model.py | b62395581615_created_stathistory_model.py | py | 1,244 | python | en | code | 1 | github-code | 71 | [
{
"api_name": "alembic.op.create_table",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "alembic.op",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "sqlalchemy.Column",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.Integ... |
2821661354 | import collections
import functools
class memoized(object):
# Thanks to @delton137 for providing this function!
# Source: http://www.moreisdifferent.com/2016/02/08/recursion-is-slow/
'''Decorator. Caches a function's return value each time it is called.
If called later with the same arguments, the cache... | dtemkin/magicwand | magicwand/itertoolsx.py | itertoolsx.py | py | 2,836 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "collections.Hashable",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "functools.partial",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "collections.Counter",
"line_number": 52,
"usage_type": "attribute"
},
{
"api_name": "... |
19755800281 | #coding=utf-8
# File : test_sox_speed_aug.py
# Time : 2022/08/09 11:12:10
# Author : Jinghan Peng
# Desciption:
import os, sys
import sox
import torchaudio
import time
import torch
def main():
in_path = "/data3/pengjinghan/test_wav/AfQGUOMKCAQ.wav"
out_path = "/data3/pengjinghan/test_wav... | NeoBryant/audio_tools | data/test_sox_speed_aug.py | test_sox_speed_aug.py | py | 2,911 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "torchaudio.backend.sox_io_backend.load",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "torchaudio.backend",
"line_number": 27,
"usage_type": "attribute"
},
{
"api_name": "time.time",
"line_number": 35,
"usage_type": "call"
},
{
"api_name... |
74837611429 | """
@autor: chenzf
@file: chinese_ner_model.py
@time: 2019/4/9 1:08 PM
"""
import torch
from torch import nn
from pytorch_pretrained_bert.modeling import BertPreTrainedModel,BertModel
class BertChineseNER(BertPreTrainedModel):
def __init__(self,config,num_labels):
super(BertChineseNER,self).__init__(confi... | ZephyrChenzf/Chinese-NER-With-Bert | chinese_ner/chinese_ner_model.py | chinese_ner_model.py | py | 1,417 | python | en | code | 7 | github-code | 71 | [
{
"api_name": "pytorch_pretrained_bert.modeling.BertPreTrainedModel",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "pytorch_pretrained_bert.modeling.BertModel",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "torch.nn.Dropout",
"line_number": 16,
"us... |
72883517031 | """Extract labeling data from the question labeling HITs.
See ``python extractlabels.py --help`` for more information.
"""
import ast
import collections
import json
import logging
import click
from scripts import _utils
logger = logging.getLogger(__name__)
# constants
EXPECTED_NUM_LABELS = 3
KEY_SCHEMA = {
... | allenai/twentyquestions | scripts/extractlabels.py | extractlabels.py | py | 3,863 | python | en | code | 13 | github-code | 71 | [
{
"api_name": "logging.getLogger",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "ast.literal_eval",
"line_number": 27,
"usage_type": "attribute"
},
{
"api_name": "scripts._utils.extract_xml_dir",
"line_number": 81,
"usage_type": "call"
},
{
"api_name":... |
4667280927 | from django.urls import path
from . import views
urlpatterns = [
path('', views.blogPage, name = 'blog-home' ),
path('createBlog/', views.createBlog, name = 'createBlog' ),
path('updateBlog/<int:pk>', views.updateBlog, name = 'updateBlog'),
path('deleteBlog/<int:pk>', views.deleteBlog, name = 'delete... | Faheem-Khan97/Alumni_management | blog/urls.py | urls.py | py | 977 | python | en | code | 3 | github-code | 71 | [
{
"api_name": "django.urls.path",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
... |
3321309933 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Oct 16 16:54:13 2019
@author: kshama
"""
import csv
import matplotlib.pyplot as plt
import numpy as np
import scipy.stats as scst
with open("DataX.csv",mode="r") as f:
csvreader = csv.reader(f)
all_records = list(csvreader)
maxf1_array = []
m... | varsh2506/Handheld-Doppler-Analysis | Correlation.py | Correlation.py | py | 7,506 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "csv.reader",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "numpy.asarray",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "numpy.float32",
"line_number": 45,
"usage_type": "attribute"
},
{
"api_name": "numpy.asarray",
"line... |
16504324739 | from hostopen.arg_handler import parse_client
import json
import logging
import os
import socket
import sys
from hostopen import utils
def get_synced_folders():
""" Reads the appropriate file to get the synced_folder
information so filepaths can be converted.
Will look for the file 'synced_folder' in '/.... | jaketreacher/hostopen | hostopen/client.py | client.py | py | 3,593 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "os.path.join",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 25,
"usage_type": "attribute"
},
{
"api_name": "json.load",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "socket.socket",
"line_number"... |
31860934872 | import logging
from collections import namedtuple
from .kepler import Kepler
from .keplernum import KeplerNum
__all__ = ["SoIAnalytical", "SoINumerical"]
log = logging.getLogger(__name__)
SOI = namedtuple("SOI", "radius frame")
class _SoI:
SOIS = {
"Mercury": SOI(112408000, "Mercury"),
"Venus... | galactics/beyond | beyond/propagators/soi.py | soi.py | py | 7,041 | python | en | code | 44 | github-code | 71 | [
{
"api_name": "logging.getLogger",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "collections.namedtuple",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "kepler.Kepler",
"line_number": 89,
"usage_type": "name"
},
{
"api_name": "keplernum.Keple... |
17189163678 | from mpi4py import MPI
import time
import spykshrk.realtime.realtime_logging as rt_logging
import spykshrk.realtime.realtime_base as realtime_base
import spykshrk.realtime.datatypes as datatypes
import spykshrk.realtime.simulator.nspike_data as nspike_data
import spykshrk.realtime.simulator.sim_databuffer as sim_datab... | daliu87/spykshrk_realtime | spykshrk/realtime/simulator/simulator_process.py | simulator_process.py | py | 17,068 | python | en | code | 4 | github-code | 71 | [
{
"api_name": "spykshrk.realtime.realtime_logging.PrintableMessage",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "spykshrk.realtime.realtime_logging",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "spykshrk.realtime.realtime_logging.PrintableMessage",... |
7825709454 | import pandas as pd
from sklearn import cross_validation, metrics
from sklearn.cross_validation import cross_val_score
from sklearn.ensemble import RandomForestClassifier, GradientBoostingRegressor, GradientBoostingClassifier, \
RandomForestRegressor
import numpy as np
from sklearn.datasets import load_iris
... | knighk/Data_Analysis | k6_wz.py | k6_wz.py | py | 8,401 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "numpy.random.seed",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "numpy.random.permutation",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "numpy.ra... |
12929121149 |
import skimage.io
import skimage.viewer as skview
filename='movie.tif'
data = skimage.io.imread(filename)
for k in range(64):
frame= data[k,:,:,:]
print('dimension frame',frame.shape)
# tranpose 5,2,512,512 5 to 5,512,512,2
transpose_frame = np.transpose(frame, (0, 2,3,1))
print('dimension tranpos... | Foetus-Pieces-Thesis/ImgProc | loadmovie.py | loadmovie.py | py | 1,172 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "skimage.io.io.imread",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "skimage.io.io",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "skimage.io",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "skimage.io.io.imsave"... |
33910276487 | from time import sleep
from requests import Session
from stdiomask import getpass
from sys import argv, exit
from random import getrandbits
# Define the functions here
def remove():
sleep(2)
input("Press enter to continue or ctrl+c to quit")
file = open('userinfo.cfg', 'r')
userdata = file.read()
... | RhinosF1/PublicTestWiki-Inactive-Auto | main.py | main.py | py | 6,676 | python | en | code | 1 | github-code | 71 | [
{
"api_name": "time.sleep",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "requests.Session",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 52,
"usage_type": "call"
},
{
"api_name": "stdiomask.getpass",
"line_... |
36710483008 | import threading
from VideoPartFileSaver import *
import requests
class dowloadThread (threading.Thread):
def __init__(self, startNumber, endNumber, base_link):
threading.Thread.__init__(self)
self.startNumber = startNumber
self.endNumber = endNumber
self.base_link = base_link
... | Kutsoloshchenko/TwitchVodDownload | MultiThreadSupport.py | MultiThreadSupport.py | py | 583 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "threading.Thread",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "threading.Thread.__init__",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "threading.Thread",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "re... |
33665088191 | # app.py
from flask import Flask, request, jsonify
import pandas as pd
import openpyxl
import reader as R
app = Flask(__name__)
@app.route('/')
def index():
"""
Display a message when the root URL is accessed.
"""
return "<h1>use '/pull_data' to pull info from sheet</h1>"
@app.route("/pull_data", met... | Proteseus/g-sheets-client-api | app.py | app.py | py | 1,094 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "flask.Flask",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "flask.jsonify",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "reader.dictify",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "flask.request.environ.get",
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.