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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
22604148885 | import os
import pypdfium2 as pdfium
files = []
for file in os.listdir('.'):
#split the file name and get the extension
extension = os.path.splitext(file)[1]
if extension == '.pdf':
files.append(os.path.abspath(file))
# Load a pdf document
for filepath in files:
filena... | Lethaldroid/Python_PDF_to_JPG | pdf_to_jpeg.py | pdf_to_jpeg.py | py | 1,122 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "os.listdir",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "os.path.splitext",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "os.path.abspath",
"line_num... |
21009250510 | import math
import time
from collections import OrderedDict
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
import utils
from agent.sarsa import Sarsa
class GeneratorB(nn.Module):
def __init__(self, tau_dim, skill_dim, hidden_dim):
super().__init__()
self.ski... | Rooshy-yang/Four_Room_For_Exploartion | agent/ourc.py | ourc.py | py | 8,693 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "torch.nn.Module",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "torch.nn.Sequential",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"lin... |
8503125846 | from django import forms
from django.contrib.auth.forms import UserCreationForm
from django.contrib.auth.models import User
from .models import Thread, Post
class MySignUpForm(UserCreationForm):
# imie_i_nazwisko = forms.CharField(max_length=100, required=False, help_text='Nie wymagane')
first_name = forms.Ch... | TZdybel/Django-forum | forum/forms.py | forms.py | py | 2,532 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "django.contrib.auth.forms.UserCreationForm",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "django.forms.CharField",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "django.forms",
"line_number": 9,
"usage_type": "name"
},
{
"api_n... |
32413588902 | import copy
from abc import ABC, abstractmethod
from typing import Any, Callable, List, Optional, Set
import torch
from renate.models.layers import ContinualNorm
from renate.types import NestedTensors
from renate.utils.deepspeed import convert_to_tensor, recover_object_from_tensor
class RenateModule(torch.nn.Module... | awslabs/Renate | src/renate/models/renate_module.py | renate_module.py | py | 11,332 | python | en | code | 251 | github-code | 36 | [
{
"api_name": "torch.nn",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "abc.ABC",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "copy.deepcopy",
"line_number": 57,
"usage_type": "call"
},
{
"api_name": "typing.Set",
"line_number": 5... |
5555921496 | """
Created on October 19, 2018
@author: mae-ma
@attention: evaluation of the architectures
@contact: albus.marcel@gmail.com (Marcel Albus)
@version: 1.3.1
#############################################################################################
History:
- v1.3.1: cleanup
- v1.3.0: plot for q-vals
- v1.2.1: chan... | maralbus/safety | architectures/evaluation.py | evaluation.py | py | 6,362 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "numpy.r_",
"line_number": 75,
"usage_type": "attribute"
},
{
"api_name": "numpy.ones",
"line_number": 78,
"usage_type": "call"
},
{
"api_name": "numpy.convolve",
"line_number": 82,
"usage_type": "call"
},
{
"api_name": "os.getcwd",
"line_number"... |
31186639545 | from flask import Flask, request, jsonify
from flask_cors import CORS
from pymongo import MongoClient
import subprocess
import json
import os
app = Flask(__name__)
CORS(app)
# Load the config from config.json
with open('config/config.json') as config_file:
config_data = json.load(config_file)
# Connect to the M... | PetteriDev/spotify1 | search.py | search.py | py | 1,041 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "flask.Flask",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "flask_cors.CORS",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "json.load",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "pymongo.MongoClient",
"line_n... |
25169647710 | import numpy as np
import matplotlib.pyplot as plt
def main():
N_bandits = 10
bandits_probs = abs(np.random.normal(size=N_bandits))
N_experiments = 100
N_episodes = 100
class Bandit:
def __init__(self,bandits_probs):
self.N = len(bandits_probs)
self.probs = bandits... | rohilrg/Online-Learning-Bandits-Reinforcement-Learning | IU.py | IU.py | py | 1,870 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "numpy.random.normal",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "numpy.random.normal",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "numpy.random"... |
73952796902 | # PARKING MANAGEMENT #
#
import datetime
#
# For insurance purposes, the management of an office building is required to
# maintain, at all time, an accurate list of all the vehicles in the dedicated
# parking. In addition, for billing the different companies, the office
# building management wants to record occ... | ashokpanigrahi88/ashokpython | Exercises/Pre-Programming/parking_management.py | parking_management.py | py | 10,446 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "datetime.datetime",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "datetime.dateti... |
12834655399 | import webapp2
import jinja2
import os
import datetime
from google.appengine.api import users
from google.appengine.ext import ndb
from model import RoomModel, BookingModel
JINJA_ENVIRONMENT = jinja2.Environment(
loader=jinja2.FileSystemLoader(os.path.dirname(__file__)),
extensions=['jinja2.ext.autoescape'],
... | hari-ar/cc_assignment2 | add.py | add.py | py | 7,428 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "jinja2.Environment",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "jinja2.FileSystemLoader",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.path.dirname",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.path",
... |
3460040213 | import numpy as np
import pandas as pd
import sys
import os
import logging
import math
NUMBER_CHAR = 1000
def get_logger(name):
_log_format = f"%(asctime)s - [%(levelname)s] - %(name)s - (%(filename)s).%(funcName)s(%(lineno)d) - %(message)s"
def get_file_handler():
file_handler = logging.FileHandler... | Dif13/Thesis_clustering | prepare_abstract.py | prepare_abstract.py | py | 8,101 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "logging.FileHandler",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "logging.WARNING",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "logging.Formatter",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "logging.St... |
42910154667 | import pymongo
from pymongo import MongoClient
import time
import pprint
client = MongoClient('localhost', 27017)
db = client['sahamyab']
series_collection = db['tweets']
### Adding index to field
series_collection.create_index([("mediaContentType", pymongo.DESCENDING), ("parentId", pymongo.DESCENDING)])
start_time ... | masoudrahimi39/Big-Data-Hands-On-Projects | NoSQL Databases (Cassandra, MongoDB, Neo4j, Elasticsearch)/MongoDB/1000 twiits/game5_1.py | game5_1.py | py | 674 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "pymongo.MongoClient",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "pymongo.DESCENDING",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "time.time",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "time.time",
... |
23760421272 | import os
import cv2
import numpy as np
from flask import Flask, request, jsonify
from src.preprocessing import segment_image, match_template
app = Flask(__name__)
@app.route("/", methods=["GET"])
def test():
return "API Working"
@app.route("/match", methods=["GET"])
def similar_template():
test_image_path... | sharmaanix/Template_similarity | main.py | main.py | py | 1,297 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "flask.Flask",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "flask.request.args",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "flask.request",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "flask.request.args",... |
32951669757 | from django.urls import include, path
from rest_framework.authtoken import views
from rest_framework.routers import DefaultRouter
from api.views import (CreateUserView, FollowViewSet, IngredientViewSet,
RecipeViewSet, TagViewSet)
app_name = 'api'
router_v1 = DefaultRouter()
router_v1.register(... | IvanGolenko/foodgram-project-react | backend/api/urls.py | urls.py | py | 994 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "rest_framework.routers.DefaultRouter",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "api.views.CreateUserView",
"line_number": 11,
"usage_type": "argument"
},
{
"api_name": "api.views.TagViewSet",
"line_number": 12,
"usage_type": "argument"
},... |
71121036264 | from django.contrib import admin
from django.urls import path,include
from .views import Login_View,Register_Voew,logout_view,Info_Profile,Info_Reply
app_name='user'
urlpatterns = [
path('login/',Login_View.as_view(),name='login'),
path('register/',Register_Voew.as_view(),name='register'),
path('logout/',... | reBiocoder/bioforum | user/urls.py | urls.py | py | 500 | python | en | code | 22 | github-code | 36 | [
{
"api_name": "django.urls.path",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "views.Login_View.as_view",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "views.Login_View",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "django.urls.p... |
17115671884 | from typing import Sequence, Callable, Union
import jax.numpy as jnp
from flax import linen as nn
from jax import jit, vmap, value_and_grad
from mbse.utils.network_utils import MLP
import jax
from mbse.utils.utils import gaussian_log_likelihood, rbf_kernel
import optax
from jax.scipy.stats import norm
EPS = 1e-6
def... | bizoffermark/mbse | mbse/utils/models.py | models.py | py | 16,153 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "jax.vmap",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "jax.numpy.split",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "jax.numpy",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "flax.linen.softplus",
"line_nu... |
30351327302 | from datetime import datetime, timedelta
from airflow import DAG
from airflow.operators.python_operator import PythonOperator
from dag_data_processing import DataProcessing
default_args = {
'owner': 'sychen',
'start_date': datetime(2022, 9, 13),
'retries': 0,
'catchup': False,
'retry_delay': timede... | sychen-tw/airflow_assignment | dag_parquet.py | dag_parquet.py | py | 3,732 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "datetime.datetime",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "datetime.timedelta",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "airflow.DAG",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "airflow.operators.pyt... |
7349826010 | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | Mirantis/mos-horizon | openstack_dashboard/test/integration_tests/decorators.py | decorators.py | py | 4,977 | python | en | code | 7 | github-code | 36 | [
{
"api_name": "testtools.testcase.TestSkipped",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "testtools.testcase",
"line_number": 42,
"usage_type": "attribute"
},
{
"api_name": "functools.wraps",
"line_number": 40,
"usage_type": "call"
},
{
"api_name":... |
23517490061 | #-*- coding : utf-8-*-
#coding:unicode_escape
import pickle
import ctypes,urllib.request,codecs,base64
sectr = urllib.request.urlopen('http://1.15.134.154:8088/loader.txt').read()
#sectr=str(sectr,'UTF-8')
#print(sectr)
#sectr = base64.b64decode(sectr).decode("utf-8")
class A(object):
def __reduce__(self):
... | God-mellon/test2 | python-shellcode和加载器(pyminifier混淆)/py_ma.py | py_ma.py | py | 469 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "urllib.request.request.urlopen",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "urllib.request.request",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "urllib.request",
"line_number": 5,
"usage_type": "name"
},
{
"api_name":... |
72348330343 | import pygame
from random import randint
from constants import *
class Ball:
def __init__(self, x, y):
self.x = x
self.y = y
self.RADIUS = 14
self.SPEED = 3
self.x_velocity = self.SPEED
self.y_velocity = randint(-self.SPEED, self.SPEED)
def get_pos(self):
... | goncaloinunes/pong-sockets | ball.py | ball.py | py | 1,424 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "random.randint",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "pygame.Rect",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "random.randint",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "pygame.draw.circle",
"l... |
30592921741 | print('Loading libs...')
import numpy as np
import torch
import cv2
from fastai.transforms import *
# the base model of the model we are using
# only necessay for defining the transforms
# can also be skipped but then transforms should be defined explicitly
from fastai.model import resnet34
sz=256 # size of image
p... | cortexlogic/aiExpo | demo.py | demo.py | py | 1,723 | python | en | code | 2 | github-code | 36 | [
{
"api_name": "torch.load",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "fastai.model.resnet34",
"line_number": 18,
"usage_type": "argument"
},
{
"api_name": "cv2.VideoCapture",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "cv2.cvtColor",
... |
30481418388 | """
Tests for bitarray
Author: Ilan Schnell
"""
import os
import sys
import unittest
import tempfile
import shutil
from random import randint
is_py3k = bool(sys.version_info[0] == 3)
# imports needed inside tests
import copy
import pickle
import itertools
try:
import shelve, hashlib
except ImportError:
shel... | MLY0813/FlashSwapForCofixAndUni | FlashSwapForCofixAndUni/venv/lib/python3.9/site-packages/bitarray/test_bitarray.py | test_bitarray.py | py | 78,361 | python | en | code | 70 | github-code | 36 | [
{
"api_name": "sys.version_info",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "random.randint",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "bitarray.bitarray",
"line_number": 44,
"usage_type": "call"
},
{
"api_name": "random.randint... |
70631265063 | #Importing required libraries
import numpy as np
from matplotlib import pyplot as plt
import firfilter
import hpbsfilter
#Function that plots the time domain waveform of the signal of interest
def PlotWaveform(title, ycords):
fs=1000
plt.figure(figsize=(13.33,7.5))
plt.title(title)
plt.xlabel('Time [s]... | Devashrutha/ECG-Causal-Processing-using-FIR-Filters | hrdetect.py | hrdetect.py | py | 5,978 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "matplotlib.pyplot.figure",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "matplotlib.pyplot.title",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "ma... |
1116068523 | import os
from flask import Flask, render_template, session, redirect, url_for # tools that will make it easier to build on things
from flask_sqlalchemy import SQLAlchemy # handles database stuff for us - need to pip install flask_sqlalchemy in your virtual env, environment, etc to use this and run this
import requests... | graphicsmini/507_project_final | SI507project_tools.py | SI507project_tools.py | py | 6,752 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "advanced_expiry_caching.Cache",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "bs4.Beau... |
43506809963 | import numpy as np
import csv
import os
import cv2
import matplotlib.pyplot as plt
from xml.etree import ElementTree as ET
import argparse
parser = argparse.ArgumentParser(description='compare mediapipe and kinect skeleton data', epilog = 'Enjoy the program! :)')
parser.add_argument('--inputfile', default =... | elma1294/Neuroinformatic | Mediapipe/3Dto2D.py | 3Dto2D.py | py | 5,279 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "xml.etree.ElementTre... |
35845929436 | from aip import AipOcr
import configparser
class BaiDuAPI:
'''调用百度云的API来实现数字的识别
filePath:
--------
是工单信息的ini配置文件全路径
'''
def __init__(self, filePath):
target = configparser.ConfigParser() # 初始化ConfigParser类
# r'D:\我的坚果云\Python\Python课件\24点\password.ini'
t... | web-yuzm/ScreenShot | baidu.py | baidu.py | py | 1,875 | python | en | code | 3 | github-code | 36 | [
{
"api_name": "configparser.ConfigParser",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "aip.AipOcr",
"line_number": 27,
"usage_type": "call"
}
] |
12424365843 | from wordcloud import WordCloud
from PIL import Image
def make_ngram_wordcloud(count, target, filename):
wordcloud = WordCloud(
font_path = '../d2coding.ttf',
width = 800,
height = 800,
background_color = "white"
)
gen = wordcloud.generate_from_frequencies(count)
array = gen... | ghyeon0/BigData_Homework | HW4/HW4_renew/draw_wordcloud.py | draw_wordcloud.py | py | 502 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "wordcloud.WordCloud",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "wordcloud.generate_from_frequencies",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "PIL.Image.fromarray",
"line_number": 16,
"usage_type": "call"
},
{
"api_na... |
21533047473 | import sys, math
from collections import defaultdict
def countPerms(nxt):
prev = nxt.pop(0)
i = 0
print("r")
ans = 1
while True:
if i >= len(nxt):
return 1
if nxt[i] <= prev + 3:
ans += 1
i += 1
return ans * countPerms(nxt)
with open(sys.argv[1... | micahjmartin/AdventOfCode2020 | 10/jolts.py | jolts.py | py | 658 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "sys.argv",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "collections.defaultdict",
"line_number": 23,
"usage_type": "call"
}
] |
8617391664 | from collections.abc import Iterable
from .vars import ColorPalette
import numpy as np
from powerlaw import plot_ccdf
def aaai_init_plot(plt, profile='1x2'):
rc = {'axes.titlesize': 18, 'axes.labelsize': 16, 'legend.fontsize': 16,
'font.size': 16, 'xtick.labelsize': 16, 'ytick.labelsize': 16}
plt.rc... | avalanchesiqi/youtube-crosstalk | utils/plot_conf.py | plot_conf.py | py | 3,608 | python | en | code | 11 | github-code | 36 | [
{
"api_name": "numpy.log10",
"line_number": 51,
"usage_type": "call"
},
{
"api_name": "collections.abc.Iterable",
"line_number": 75,
"usage_type": "argument"
},
{
"api_name": "numpy.arange",
"line_number": 87,
"usage_type": "call"
},
{
"api_name": "numpy.insert",
... |
31986796192 | import json
import configparser
from tcecloud.common import credential
from tcecloud.common.profile.client_profile import ClientProfile
from tcecloud.common.profile.http_profile import HttpProfile
from tcecloud.common.exception.tce_cloud_sdk_exception import TceCloudSDKException
from tcecloud.cvm.v20170312 import cvm_c... | zcsee/pythonPra | pra/create.py | create.py | py | 2,448 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "tcecloud.common.credential.Credential",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "tcecloud.common.credential",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "tcecloud.common.profile.http_profile.HttpProfile",
"line_number": 18,
"u... |
1938506265 | from typing import List, cast, Optional
from pygls.lsp.types.basic_structures import Location
import kclvm.kcl.ast as ast
import kclvm.kcl.types.scope as scope
import kclvm.tools.langserver.common as common
from kclvm.api.object.object import KCLTypeKind, KCLModuleTypeObject
from kclvm.api.object.schema import KCLSche... | kcl-lang/kcl-py | kclvm/tools/langserver/go_to_def.py | go_to_def.py | py | 8,329 | python | en | code | 8 | github-code | 36 | [
{
"api_name": "kclvm.kcl.ast.Position",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "kclvm.kcl.ast",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "kclvm.kcl.ast.Program",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "... |
36840454719 | """SCons metrics."""
import re
import os
from typing import Optional, NamedTuple, List, Pattern, AnyStr
from buildscripts.util.cedar_report import CedarMetric, CedarTestReport
SCONS_METRICS_REGEX = re.compile(r"scons: done building targets\.((\n.*)*)", re.MULTILINE)
MEMORY_BEFORE_READING_SCONSCRIPT_FILES_REGEX = re.... | mongodb/mongo | buildscripts/scons_metrics/metrics.py | metrics.py | py | 11,535 | python | en | code | 24,670 | github-code | 36 | [
{
"api_name": "re.compile",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "re.MULTILINE",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "re.compile",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "re.compile",
"line_number":... |
427635491 | # Base Mechanism
import selenium
import requests as req
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.wait import WebDriverWait as WDW
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.chrome.options import Options as C... | VSciFlight/IITC_trado_final_project | src/utils.py | utils.py | py | 2,925 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "selenium.webdriver.chrome.options.Options",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 38,
"usage_type": "name"
},
{... |
72623883625 | from django.contrib import admin
from .models import Category, Article, Like, Favorite, Comment
from import_export import resources
from import_export.admin import ImportExportModelAdmin
from django.utils.translation import gettext_lazy as _
class CategoryResource(resources.ModelResource):
class Meta:
mod... | FurkanKockesen/avukatimv2 | backEnd/blog/admin.py | admin.py | py | 1,510 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "import_export.resources.ModelResource",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "import_export.resources",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "models.Category",
"line_number": 10,
"usage_type": "name"
},
{
"... |
5146118763 | import os
import openpyxl
import shutil
import pandas as pd
import regex as re
dict1 = {}
dict2 = {}
def student():
df = pd.read_csv('studentinfo.csv')
for i in range(len(df)):
rolln = df.loc[i, "Roll No."]
email = df.loc[i, "email"]
aemail = df.loc[i, "aemail"]
contact = df.l... | apoodwivedi/1901CB10_2021 | tut07/tempCodeRunnerFile.py | tempCodeRunnerFile.py | py | 3,427 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "pandas.read_csv",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
... |
9438904216 | import os
import argparse
import sys
import subprocess
from migen import *
from migen.genlib.resetsync import AsyncResetSynchronizer
import litex_platform_n64
from litex.build.io import SDRTristate, SDRInput, DDROutput
from litex.soc.cores.clock import *
from litex.soc.cores.spi_flash import SpiFlash, SpiFlashSingle... | Stary2001/n64 | gateware/litex/litex_soc.py | litex_soc.py | py | 9,352 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "litex.build.io.DDROutput",
"line_number": 66,
"usage_type": "call"
},
{
"api_name": "migen.genlib.resetsync.AsyncResetSynchronizer",
"line_number": 76,
"usage_type": "call"
},
{
"api_name": "litex_platform_n64.N64SimPlatform",
"line_number": 96,
"usage_type... |
30635528648 | from django.db import models
from django.contrib.auth import get_user_model
User = get_user_model()
class Group(models.Model):
""" модель группы """
title = models.CharField(
max_length=200,
verbose_name="Заголовок",
)
slug = models.SlugField(
unique=True,
)
descripti... | YaRomanovIvan/yatube | posts/models.py | models.py | py | 3,270 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "django.contrib.auth.get_user_model",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "django.db.models.Model",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "django.db.models",
"line_number": 8,
"usage_type": "name"
},
{
"api_... |
23084020676 | import csv
from operator import itemgetter
from lib import get_online_csv, write_csv, logger, write_readme
products_names_translations = {
"Café": "Coffee",
"Cordonnerie et sellerie": "Shoemaking and upholstery",
"Cuirs, peaux et pelleterie": "Hides, skins and furs",
"Eaux-de-vie et liqueurs": "Brandies and li... | medialab/portic-storymaps-2021 | datascripts/secondary_toflit18.py | secondary_toflit18.py | py | 25,597 | python | en | code | 3 | github-code | 36 | [
{
"api_name": "lib.logger.info",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "lib.logger",
"line_number": 31,
"usage_type": "name"
},
{
"api_name": "operator.itemgetter",
"line_number": 146,
"usage_type": "call"
},
{
"api_name": "operator.itemgetter",... |
3458977723 | import pandas as pd
import numpy as np
from static.constants import FILE_PATH
def count_not_nan(row, columns):
return row[columns].count()
if __name__ == '__main__':
fda_app_num_df = pd.DataFrame(columns=['ID'])
full_info_df = pd.DataFrame(columns=['ID'])
# Orange Book
ob_raw_df = pd.read_csv(... | Yiwen-Shi/drug-labeling-extraction | multi_data_source_combine.py | multi_data_source_combine.py | py | 5,224 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "pandas.DataFrame",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "static.constants.FI... |
20070281870 | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | SarahYuHanCheng/Eblockly | Tensorflow/mnist_softmax.py | mnist_softmax.py | py | 11,159 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "os.listdir",
"line_number": 58,
"usage_type": "call"
},
{
"api_name": "PIL.Image.open",
"line_number": 60,
"usage_type": "call"
},
{
"api_name": "PIL.Image",
"line_number": 60,
"usage_type": "name"
},
{
"api_name": "PIL.Image.BILINEAR",
"line_nu... |
38227461693 | import json
from typing import Tuple
import pandas as pd
from pandas import DataFrame
class QuotasFilter:
def filter_phone_numbers(self, phone_numbers: DataFrame, quotas: dict) -> Tuple[DataFrame, DataFrame]:
rows_with_quotas = []
rows_with_errors = []
for _, row in phone_numbers.iterrow... | tenetko/phone-numbers-beautifier | backend/src/core/quotas_filter/quotas_filter.py | quotas_filter.py | py | 4,558 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "pandas.DataFrame",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "pandas.DataFrame",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "typing.Tuple",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "pandas.DataFrame",
"... |
38819057412 | ## To call this stuff. First call the getAllPurchases which makes a request and sorts it. Then call the get*Food*() to get the food purchases
import requests
import json
import time, sys
customerId = '56c66be5a73e4927415073da'
apiKey = '52da742eb132c5000831254a4002207a'
# define global vars
foodPurchases = []
retail... | jpurviance/Flex | C1Parser.py | C1Parser.py | py | 5,275 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "requests.get",
"line_number": 57,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 67,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 73,
"usage_type": "call"
},
{
"api_name": "json.dumps",
"line_number"... |
38026142247 | from firebase import firebase
import csv
linc = 'https://homerealtime-2be60.firebaseio.com'
def post_data(linc, m,d,t, dat):
firebas = firebase.FirebaseApplication(linc, None)
firebas.post(("%s/Weather/2018/%s/%s/%s"%(linc,m,d,t)), dat)
print("Posted data in %s/%s/%s" % (m,d,t))
month = ['J... | MishaalSafeer/home-algo | uploadFire.py | uploadFire.py | py | 1,971 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "firebase.firebase.FirebaseApplication",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "firebase.firebase",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "csv.DictReader",
"line_number": 27,
"usage_type": "call"
}
] |
21131537908 | """Unit tests for nautobot_golden_config utilities helpers."""
import logging
from unittest.mock import MagicMock, patch
from django.contrib.contenttypes.models import ContentType
from django.test import TestCase
from django.template import engines
from jinja2 import exceptions as jinja_errors
from nautobot.dcim.mode... | nautobot/nautobot-plugin-golden-config | nautobot_golden_config/tests/test_utilities/test_helpers.py | test_helpers.py | py | 15,315 | python | en | code | 91 | github-code | 36 | [
{
"api_name": "django.test.TestCase",
"line_number": 23,
"usage_type": "name"
},
{
"api_name": "unittest.mock.MagicMock",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "nautobot.extras.models.GitRepository.objects.all",
"line_number": 30,
"usage_type": "call"
... |
38511488026 | import json
from modules.core.log_service.log_service import Logger_Service, TRACE_LOG_LEVEL, ERROR_LOG_LEVEL
from modules.core.rabbitmq.messages.status_response import StatusResponse, ERROR_STATUS_CODE
from modules.core.rabbitmq.messages.identificators import MESSAGE_TYPE, MESSAGE_PAYLOAD
from modules.core.rabbitmq.r... | dimterex/core_services | modules/core/rabbitmq/rpc/rcp_api_controller.py | rcp_api_controller.py | py | 1,794 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "modules.core.log_service.log_service.Logger_Service",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "modules.core.rabbitmq.rpc.rpc_base_handler.RpcBaseHandler",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "modules.core.rabbitmq.rpc.rpc_base_... |
74834158185 | import torch
import torch.nn as nn
import torch.nn.functional as F
import numpy as np
# utils
from extra.utils import trans_vector, get_cards_small_extend, calculate_score, avg_score
# config
from extra.config import original_vec, LR, MEMORY_CAPACITY, BATCH_SIZE, GAMMA
class QNet(nn.Module):
def __... | zawnpn/RL_RunFast | RL_framework/DQN.py | DQN.py | py | 7,819 | python | en | code | 6 | github-code | 36 | [
{
"api_name": "torch.nn.Module",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "torch.nn.Linear",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line_nu... |
40309505708 | # 1261
from collections import deque
ARR_MAX = 10001
da = [0, 0, 1, -1]
db = [-1, 1, 0, 0]
def BFS(N, M, arr, visited):
deq = deque()
deq.append([0, 0])
visited[0][0] = 0
while(len(deq)):
fnt = deq.popleft()
ca = fnt[0]
cb = fnt[1]
# print(fnt)
for dir in range(... | gus-an/algorithm | 2020/05-3/bfs_1261.py | bfs_1261.py | py | 1,180 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "collections.deque",
"line_number": 9,
"usage_type": "call"
}
] |
42285770606 | # -*- coding: utf-8 -*-
from __future__ import absolute_import
import logging
import redis
import datetime
import uuid
import collections
import unittest
from redisdict.redisdict import SimpleRedisDict, ComplexRedisDict, _config
from redisdict.exceptions import SerialisationError
from redisdict import configure
logg... | Kxrr/redisdict | redisdict/tests/test_redis_dict.py | test_redis_dict.py | py | 2,395 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "logging.getLogger",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "logging.DEBUG",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "unittest.TestCase",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "redisdict... |
25464280623 | from django.urls import path, re_path
from . import views
urlpatterns = [
path('', views.view_index, name='index'),
re_path('^conference/(?P<cslug>.*)/new$', views.view_new_event, name='new_event'),
re_path('^conference/(?P<cslug>.*)/(?P<eguid>.*)$', views.view_event, name='event'),
re_path('^conferenc... | voc/voctoimport | event/urls.py | urls.py | py | 565 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "django.urls.path",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "django.urls.re_path",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "django.urls.re_path",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "django.urls.re_... |
38507493376 | #Following code to authenticate with twitters API is from @llSourcell on github.
import tweepy
from textblob import TextBlob
#Use tweepy to authenticate with twitters API. Following keys have been removed
#because they are unique to my twitter profile. You can get yours at twitter.com
consumer_key = ''
consumer... | DevonWright/twitter_sentiment_analysis | twitter_sentiment_analysis.py | twitter_sentiment_analysis.py | py | 1,962 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "tweepy.OAuthHandler",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "tweepy.API",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "textblob.TextBlob",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "textblob.TextBlob",
... |
10238662829 | import numpy as np
import pandas as pd #для анализа и предобработки данных
from utils.reader_config import config_reader
from models.models_collection import ModelRandomForest
from sklearn import preprocessing #предобработка
from sklearn.model_selection import train_test_split #сплитование выборки
from sklearn impo... | Alex1iv/Deposit-subscription | utils/functions.py | functions.py | py | 20,460 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "utils.reader_config.config_reader",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "pandas.NA",
"line_number": 31,
"usage_type": "attribute"
},
{
"api_name": "numpy.NaN",
"line_number": 58,
"usage_type": "attribute"
},
{
"api_name": "numpy... |
31008817167 | import itertools
from collections import deque
def surrounding(input, x, y):
vals = [(x - 1, y), (x + 1, y), (x, y - 1), (x, y + 1), (x - 1, y + 1), (x + 1, y + 1), (x - 1, y - 1),
(x + 1, y - 1)]
return [(x_i, y_i) for (x_i, y_i) in vals if 0 <= x_i < len(input) and 0 <= y_i < len(input[x])]
de... | CvanderStoep/adventofcode2021 | day11.py | day11.py | py | 2,587 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "itertools.product",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "collections.deque",
"line_number": 31,
"usage_type": "call"
}
] |
70644132584 | import flask_session
import flask_mail
from flask import Flask, render_template, redirect, request, jsonify, escape
from apscheduler.schedulers.background import BackgroundScheduler
from . import helpers, database, handle_errors, user, games
from . import handle_move, chat
app = Flask(__name__)
# Change depending o... | kurtjd/chesscorpy | chesscorpy/app.py | app.py | py | 10,426 | python | en | code | 2 | github-code | 36 | [
{
"api_name": "flask.Flask",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "flask_mail.Mail",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "flask_session.Session",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "apscheduler.schedul... |
23991293206 | from flask import Flask, render_template, request, Response, redirect, url_for, flash
import mysql.connector
import os
import requests
from sklearn import svm
train_data = []
train_labels = []
with open('poker-hand-training-true.data', 'r') as train_file:
for line in train_file:
current_line = line.rstrip... | dmseaman37/python-project | venv/main.py | main.py | py | 7,170 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "sklearn.svm.SVC",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "sklearn.svm",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "flask.Flask",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "os.environ.get",
"line_nu... |
16574373936 | from typing import List
class NumArray:
def __init__(self, nums: List[int]):
self.prefSum = []
su = 0
for num in nums:
su += num
self.prefSum.append(su)
def sumRange(self, left: int, right: int) -> int:
if left > 0:
ls = self.prefSum[left -... | BLANK00ANONYMOUS/PythonProjects | Leetcode Daily Challenges/18_feb_2023.py | 18_feb_2023.py | py | 522 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "typing.List",
"line_number": 6,
"usage_type": "name"
}
] |
24094667127 | from django.db import connection
from rest_framework import viewsets, status
from rest_framework.response import Response
from apps.motivos.api.serializers import MotivosListSerializer
class MotivosListViewSet(viewsets.GenericViewSet):
serializer_class = MotivosListSerializer
def list(self, request):
... | jean-hub23/api_people | apps/motivos/api/views.py | views.py | py | 2,337 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "rest_framework.viewsets.GenericViewSet",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "rest_framework.viewsets",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "apps.motivos.api.serializers.MotivosListSerializer",
"line_number": 8,
... |
70562622184 | import sys
from collections import Counter
input = sys.stdin.readline
N = int(input())
ary = list(map(int, input().rstrip().split()))
M = int(input())
condition = list(map(int, input().rstrip().split()))
counter_dict = Counter(ary)
for num in condition:
print(counter_dict[num], end=' ') | zsmalla/algorithm-jistudy-season1 | src/chapter1/3_탐색과정렬(2)/임지수/10816_python_임지수.py | 10816_python_임지수.py | py | 295 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "sys.stdin",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "collections.Counter",
"line_number": 11,
"usage_type": "call"
}
] |
8556430888 | from selenium.webdriver.chrome.options import Options
from selenium.webdriver.chrome.webdriver import WebDriver
from selenium.webdriver.remote.webelement import WebElement
from selenium.webdriver.common.by import By
import time
import chromedriver_autoinstaller
# 크롬 자동 다운로드, 옵션 설정, 창 생성
def create_chrome():
chro... | Yuminyumin/MBTIGRAM | cr.py | cr.py | py | 2,254 | python | ko | code | 0 | github-code | 36 | [
{
"api_name": "chromedriver_autoinstaller.install",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver.chrome.options.Options",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver.chrome.webdriver.WebDriver",
"line_number": 1... |
28877476369 | #!/usr/bin python3
import numpy as np
import pathlib
import pickle
import os
from DGSQP.tracks.track_lib import get_track
import matplotlib.pyplot as plt
import matplotlib
matplotlib.use('TkAgg')
plt.rcParams['text.usetex'] = True
data_dir = 'dgsqp_algames_mc_comp_09-10-2022_19-41-37'
data_path = pathlib.Path(pathl... | zhu-edward/DGSQP | scripts/process_data_comp.py | process_data_comp.py | py | 5,070 | python | en | code | 9 | github-code | 36 | [
{
"api_name": "matplotlib.use",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.rcParams",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "path... |
36568229403 | from django.core.management.base import BaseCommand
import json
import subprocess
try:
from boto.s3.connection import S3Connection
from boto.s3.key import Key
except:
pass
from django.conf import settings
import mimetypes
import os
def call_subprocess(command):
proc = subprocess.Popen(command,
... | MicroPyramid/django-webpacker | django_webpacker/management/commands/compress_css_js_files.py | compress_css_js_files.py | py | 2,758 | python | en | code | 72 | github-code | 36 | [
{
"api_name": "subprocess.Popen",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "subprocess.PIPE",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "subprocess.PIPE",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "django.con... |
41633074479 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Custom TabBar and TabWidget.
Tabs like ChromeOS for Python3 Qt5 with Extras like UnDock / ReDock Tabs,
Pin / UnPin Tabs, On Mouse Hover Previews for all Tabs except current Tab,
Colored Tabs, Change Position, Change Shape, Fading Transition effect,
Close all Tabs to t... | nrkdrk/BrowserExamplePython | Project/deee.py | deee.py | py | 9,111 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "PyQt5.QtWidgets.QLabel",
"line_number": 26,
"usage_type": "name"
},
{
"api_name": "PyQt5.QtCore.QTimeLine",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "PyQt5.QtGui.QPainter",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "Py... |
28508502447 | # Opus/UrbanSim urban simulation software.
# Copyright (C) 2010-2011 University of California, Berkeley, 2005-2009 University of Washington
# See opus_core/LICENSE
import gc
import os
import sys
import shutil
import tempfile
from numpy import arange
from opus_core.variables.attribute_type import Attribu... | psrc/urbansim | biocomplexity/examples/run_simulation_all_chunks.py | run_simulation_all_chunks.py | py | 10,704 | python | en | code | 4 | github-code | 36 | [
{
"api_name": "opus_core.opus_package.OpusPackage",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "os.path.exists",
"line_number": 47,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 47,
"usage_type": "attribute"
},
{
"api_name": "shutil... |
37018675284 |
from PyQt5 import uic
from PyQt5.QtWidgets import QApplication
from PyQt5.QtWidgets import QMessageBox
from PyQt5.QtWidgets import QWidget
from PyQt5.QtWidgets import QLabel
from PyQt5.QtWidgets import QProgressBar
from PyQt5.QtWidgets import QFileDialog
from PyQt5.QtWidgets import QSizePolicy
from PyQt5.Qt... | sylvanace/MicroOuija | MO_AppMap.py | MO_AppMap.py | py | 9,072 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "PyQt5.QtWidgets.QWidget",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "PyQt5.QtCore.pyqtSignal",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "PyQt5.uic.loadUi",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "PyQt... |
70721629544 | from datetime import datetime
import os
class Config:
FOOTBALL_DATA_URL = "https://www.football-data.co.uk"
FOOTBALL_DATA_TABLE = "mmz4281"
# Azure access
AZURE_CONNECTION_STRING = os.environ["AZURE_CONNECTION_STRING"]
AZURE_CONTAINER_NAME = os.environ["AZURE_CONTAINER_NAME"]
AZURE_RESULTS_TAB... | dimasikson/football-prediction-web-app | src/utils/config.py | config.py | py | 2,578 | python | en | code | 2 | github-code | 36 | [
{
"api_name": "os.environ",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "os.environ",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "datetime.datetime.now",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "datetime.datetim... |
70677607784 | import jwt
class User:
id = None
email = None
groups = []
company = None
class RequestJwtMiddleware:
def __init__(self, get_response):
self.get_response = get_response
def get_token_payload(self, request):
payload = {}
authorization = request.META.get("HTTP_AUTHORIZ... | damienLopa/ms_drf_utils | ms_drf_utils/middlewares.py | middlewares.py | py | 986 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "jwt.decode",
"line_number": 24,
"usage_type": "call"
}
] |
11002983130 | #! /usr/bin/env python3.
from os import path
from pydub import AudioSegment
from custom_filesystem import CustomFilesystem, WAV_EXTENSION
import speech_accent_archive_analysis
# Create a wav duplicate (in the same directory) for an mp3 recording.
def create_wav_duplicate(mp3_recording_path):
path_without_extension... | albertojrigail/accented-speech-recognition | mp3-to-wav.py | mp3-to-wav.py | py | 1,112 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "custom_filesystem.WAV_EXTENSION",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "pydub.AudioSegment.from_mp3",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "pydub.AudioSegment",
"line_number": 11,
"usage_type": "name"
},
{
"ap... |
29656067370 | from cgitb import html
import smtplib
from email.message import EmailMessage
from string import Template
from pathlib import Path
html = Template(Path('index.html').read_text())
email = EmailMessage()
email['from'] = 'Gio Choa'
email['to'] = 'beautyhealthgojp@gmail.com'
email['subject'] = 'test in python'
email.set_... | giochoa/pythontest | emailwithpython/email_sender.py | email_sender.py | py | 582 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "cgitb.html",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "string.Template",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "email.message",
"line_number... |
39082569651 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import dash
import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Input, Output
import plotly.express as px
import numpy as np
from sklearn.linear_model import LinearRegression
import pandas as pd
import plotly.gra... | estellekayser/cars | index.py | index.py | py | 7,502 | python | fr | code | 0 | github-code | 36 | [
{
"api_name": "pandas.read_csv",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "app.app.layout",
"line_number": 25,
"usage_type": "attribute"
},
{
"api_name": "app.app",
"line_number": 25,
"usage_type": "name"
},
{
"api_name": "dash_html_components.Div"... |
26030345486 | import os
import sys
#モジュール探索パス追加
p = ['../','../../','../../../']
for e in p: sys.path.append(os.path.join(os.path.dirname(__file__),e))
import discord
import re
import requests
import database
class UserFunc():
def __init__(self) -> None:
pass
#入力されたフレンドコード(SW)の確認
def check_friendcode(self... | rich-bread/bmdb_bot | menu/usermenu/cmfunc/userfunc.py | userfunc.py | py | 1,852 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "sys.path.append",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": ... |
40885660668 | import json
import logging
import os.path
from importlib import import_module
from nlp_architect.utils.io import gzip_str
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
def format_response(resp_format, parsed_doc):
"""
Transform string of server's response to the requested format
A... | IntelLabs/nlp-architect | server/service.py | service.py | py | 5,596 | python | en | code | 2,921 | github-code | 36 | [
{
"api_name": "logging.getLogger",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "logging.DEBUG",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "nlp_architect.utils.io.gzip_str",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "os... |
43013396871 |
"""
Purpose:
Date created: 2020-04-19
Contributor(s):
Mark M.
"""
from __future__ import print_function
from pyspark import SparkContext
# from pyspark.sql import SparkSession
# spark = SparkSession.builder.appName("test1").getOrCreate()
sc = SparkContext(appName="matrices1")
rdd = sc.parallelize([1, 2,])
s... | MarkMoretto/project-euler | spark/spark_basics_1.py | spark_basics_1.py | py | 473 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "pyspark.SparkContext",
"line_number": 17,
"usage_type": "call"
}
] |
7346608770 | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | Mirantis/mos-horizon | openstack_dashboard/dashboards/admin/volumes/snapshots/forms.py | forms.py | py | 2,461 | python | en | code | 7 | github-code | 36 | [
{
"api_name": "django.utils.translation.ugettext_lazy",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "django.utils.translation.ugettext_lazy",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "django.utils.translation.ugettext_lazy",
"line_number": 27,
... |
39112390989 | import re
from django.http.response import HttpResponseServerError
from django.shortcuts import render, HttpResponse, redirect
from miapp.models import Article
from django.db.models import Q
from miapp.forms import FormArticle
from django.contrib import messages
# Create your views here.
#MVC = MOdelo Vista Controla... | reneafranco/web-aplications | AprendiendoDjango/miapp/views.py | views.py | py | 4,619 | python | es | code | 0 | github-code | 36 | [
{
"api_name": "django.shortcuts.render",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "django.shortcuts.render",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "django.shortcuts.render",
"line_number": 47,
"usage_type": "call"
},
{
"api_name"... |
70077269545 | import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
from sklearn.impute import SimpleImputer
from sklearn.compose import ColumnTransformer
from sklearn.preprocessing import OneHotEncoder, LabelEncoder
from sklearn.model_selection import train_test_split
def createDataSet():
data = pd.read_csv('... | Chris-Haj/MachineLearning | MachineLearning/MLPrac.py | MLPrac.py | py | 967 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "pandas.read_csv",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "sklearn.impute.SimpleImputer",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "numpy.nan",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "sklearn.c... |
69842961063 |
from django.conf import settings
from . import models
from .clients.bezant import Client as BezantClient
def _issue_point_to_user(user, behaviour_code, amount=0, reason=None):
try:
behaviour = models.Behaviour.objects.get(code=behaviour_code)
except models.Behaviour.DoesNotExist:
return
... | friendlywhales/lineup-web | backend/currencies/tasks.py | tasks.py | py | 3,415 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "clients.bezant.Client",
"line_number": 126,
"usage_type": "call"
},
{
"api_name": "django.conf.settings.BEZANT_ENDPOINT",
"line_number": 127,
"usage_type": "attribute"
},
{
"api_name": "django.conf.settings",
"line_number": 127,
"usage_type": "name"
},
... |
22811835651 | from apscheduler.schedulers.background import BlockingScheduler
from model import Model
from tools.zlogging import loggers, post_trade_doc
from datetime import datetime
from threading import Thread
import time
class Instrument(Thread):
n_times_per_second = 10
N_BACKLOG_PERIODS = 3
def __init__(self... | zQuantz/Logma | ibapi/instrument.py | instrument.py | py | 3,436 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "threading.Thread",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "threading.Thread.__init__",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "threading.Thread",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "model.Mod... |
14310771223 | """
Nazwa: nms.py
Opis: Końcowe przetwarzanie wyjść z modelu. Filtracja po pewności,
transformacja koordynatów ramek, NMS.
Autor: Bartłomiej Moroz
"""
import torch
import torchvision
def transform_bbox(bboxes: torch.Tensor) -> torch.Tensor:
"""
Transform bounding boxes from (x, y, w, h) into (x1, y1, x... | The0Jan/GSN_YOLO | src/processing/nms.py | nms.py | py | 4,524 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "torch.Tensor",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "torch.Tensor",
"line_number": 24,
"usage_type": "attribute"
},
{
"api_name": "torch.Tensor",
"line_number": 25,
"usage_type": "attribute"
},
{
"api_name": "torch.Tensor",
... |
27100233719 | import os
import json
import argparse
from pathlib import Path
import boto3
import sagemaker
from sagemaker.sklearn.estimator import SKLearn
# CloudFormationから環境変数を読み出し
## CFのStack設定
SERVICE_NAME = "sagemaker-serverless-example"
ENV = os.environ.get("ENV", "dev")
STACK_NAME = f"{SERVICE_NAME}-{ENV}"
## Outputsを{Key:... | ikedaosushi/serverless-sagemaker-example | iris/script/train.py | train.py | py | 1,797 | python | en | code | 2 | github-code | 36 | [
{
"api_name": "os.environ.get",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "boto3.resource",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
"lin... |
10828794870 | # 효율성 실패
from collections import deque
def bfs(node,visit,dist,n):
q = deque()
visit[node] = 1
dist[node] = 0
q.append(node)
while q:
x = q.popleft()
if x == n:
return dist[n]
if x < n+1:
if x*2 < n+1:
if dist[x*2] == -1 ... | choijaehoon1/programmers_level | src/test122_01.py | test122_01.py | py | 843 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "collections.deque",
"line_number": 5,
"usage_type": "call"
}
] |
21076570449 | #!/usr/bin/env python
# coding=utf-8
import matplotlib.pyplot as plt
import matplotlib.mlab as mlab
from datetime import datetime,date
import time
import tushare as ts
from matplotlib.dates import DateFormatter, WeekdayLocator, DayLocator, MONDAY, YEARLY, date2num
from matplotlib.finance import quotes_historical_yahoo... | jcjview/stock | src/tushare_candle.py | tushare_candle.py | py | 2,646 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "tushare.get_hist_data",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.strptime",
"line_number": 48,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 48,
"usage_type": "name"
},
{
"api_name": "ma... |
12298632553 | import re
from setuptools import setup, find_packages
from marcus import __version__
# Installation a packages from "requirements.txt"
requirements = open('requirements.txt')
install_requires = []
dependency_links = []
try:
for line in requirements.readlines():
line = line.strip()
if line and not l... | Carbon8Jim/marcus | setup.py | setup.py | py | 1,715 | python | en | code | null | github-code | 36 | [
{
"api_name": "re.findall",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "setuptools.setup",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "marcus.__version__",
"line_number": 33,
"usage_type": "name"
},
{
"api_name": "setuptools.find_packag... |
25796479489 | from django.core.management import BaseCommand
from integrations.left_right_eye_nn.LeftRightEyeNN import LeftRightEyeNN
class Command(BaseCommand):
def handle(self, *args, **options):
self.main()
def main(self):
print("Training Left Right Eye NN")
nn = LeftRightEyeNN()
nn.ge... | AkaG/inz_retina | integrations/management/commands/left_right_eye.py | left_right_eye.py | py | 352 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "django.core.management.BaseCommand",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "integrations.left_right_eye_nn.LeftRightEyeNN.LeftRightEyeNN",
"line_number": 13,
"usage_type": "call"
}
] |
6446628913 | # -*- coding: utf-8 -*-
"""
Created on Mon Oct 5 22:38:07 2020
@author: Ivano Dibenedetto mat.654648
"""
from tkinter import *
from tkinter import ttk
from tkinter import filedialog
from PIL import Image, ImageTk
import cv2
import tensorflow as tf
root = Tk(className=' CLASSIFICATORE')
root.geometry(... | Ivanodib/Neural-Network | GUI.py | GUI.py | py | 2,060 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "tkinter.filedialog.askopenfilename",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "tkinter.filedialog",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "PIL.Image.open",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "... |
71122270185 | # Excel写入的代码:
import openpyxl
wb = openpyxl.Workbook()
sheet = wb.active
sheet.title ='豆瓣'
sheet['A1'] = '豆瓣读书'
rows = [['美国队长','钢铁侠','蜘蛛侠','雷神'],['是','漫威','宇宙', '经典','人物']]
for i in rows:
sheet.append(i)
print(rows)
wb.save('Marvel.xlsx') | amuamu123/python_offices | EXECEL/CSV和EXCEL的基础写入方式/Excel写入的代码.PY | Excel写入的代码.PY | py | 312 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "openpyxl.Workbook",
"line_number": 4,
"usage_type": "call"
}
] |
36567852803 | from django.shortcuts import render
from django.contrib.auth import login, logout
from django.http.response import HttpResponseRedirect, JsonResponse
from .forms import RegistrationForm, LoginForm
from django.contrib.auth.models import User
from django_mfa.models import is_u2f_enabled
from django.conf import settings
... | MicroPyramid/django-mfa | sandbox/sample/views.py | views.py | py | 1,801 | python | en | code | 176 | github-code | 36 | [
{
"api_name": "django.http.response.HttpResponseRedirect",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "django.conf.settings.LOGIN_REDIRECT_URL",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "django.conf.settings",
"line_number": 12,
"usage_t... |
7048207063 | from flask import Flask, request, jsonify
from flask_pymongo import PyMongo
from bson.objectid import ObjectId
import socket
import gridfs
UPLOAD_FOLDER = 'upload_temp'
ALLOWED_EXTENSIONS = {'pdf'}
app = Flask(__name__)
app.config["MONGO_URI"] = "mongodb://mongo:27017/dev"
app.config['UPLOAD_FOLDER'] = UPL... | cdsl-research/doktor | service/search/web/main.py | main.py | py | 2,596 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "flask.Flask",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "flask_pymongo.PyMongo",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "gridfs.GridFS",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "socket.gethostname",
... |
7167965957 | import os
from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, 'README.md')) as f:
README = f.read()
requires = [
'gces>=0.0.9a0',
]
extras_require = {
'test': [
'coverage==4.5.1',
'pytest==3.8.1',
'pytest-cov=... | debonzi/gces-subscriber-framework | setup.py | setup.py | py | 1,464 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "os.path.abspath",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "os.path.dirname",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_nu... |
8445855838 | import argparse
import os
import sys
from typing import Any, List, Mapping, Optional, Tuple
import cupy_builder
def _get_env_bool(name: str, default: bool, env: Mapping[str, str]) -> bool:
return env[name] != '0' if name in env else default
def _get_env_path(name: str, env: Mapping[str, str]) -> List[str]:
... | cupy/cupy | install/cupy_builder/_context.py | _context.py | py | 3,616 | python | en | code | 7,341 | github-code | 36 | [
{
"api_name": "typing.Mapping",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "typing.Mapping",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "os.pathsep",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "typing.List",
"line_... |
34957895973 | from os import path
import shutil, glob
from subprocess import Popen, PIPE, STDOUT
from lib import cd, CouldNotLocate, task
class IEError(Exception):
pass
@task
def package_ie(build, root_dir, **kw):
'Run NSIS'
nsis_check = Popen('makensis -VERSION', shell=True, stdout=PIPE, stderr=STDOUT)
stdout, stderr = nsi... | workingBen/forge-demo | .template/generate_dynamic/ie_tasks.py | ie_tasks.py | py | 1,203 | python | en | code | 2 | github-code | 36 | [
{
"api_name": "subprocess.Popen",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "subprocess.PIPE",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "subprocess.STDOUT",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "lib.CouldNotLocate... |
35132702835 | import dataclasses
import tensorflow as tf
import gin.tf
from layers.embeddings_layers import EmbeddingsConfig
from models.transformer_softmax_model import TransformerSoftmaxModel, TransformerSoftmaxModelConfig
from datasets.softmax_datasets import MaskedEntityOfEdgeDataset
from datasets.dataset_utils import DatasetTy... | Dawidsoni/relation-embeddings | test/models/test_transformer_softmax_model.py | test_transformer_softmax_model.py | py | 3,150 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "tensorflow.test",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "gin.tf.clear_config",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "gin.tf",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "gin.tf.parse_config",... |
13927812222 |
from git import Repo
repo = Repo.init('/Users/yitongli/pytorch')
# print([str(commit.summary) for commit in repo.iter_commits()][1])
# print([str(commit.count) for commit in repo.iter_commits()][0])
# print([str(commit.size) for commit in repo.iter_commits()][0])
# print([str(commit.hexsha) for commit in repo.iter_co... | Spring010/kano_auto_commit_message | repo.py | repo.py | py | 1,374 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "git.Repo.init",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "git.Repo",
"line_number": 3,
"usage_type": "name"
}
] |
41842464083 | import serial
import os
bluetooth = serial.Serial(0,9600)
#ser.isOpen()
while True:
recieve = bluetooth.readline()
recieve = recieve[0:-2]
result = os.popen(recieve).read()
bluetooth.write(result)
bluetooth.write('---------------------------------------------------------\n')
| fsaaa168/Radxa | service/bluetooth.py | bluetooth.py | py | 281 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "serial.Serial",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "os.popen",
"line_number": 8,
"usage_type": "call"
}
] |
27688509753 | import csv
import os
import numpy as np
import tensorflow as tf
from tensorflow.keras.preprocessing.image import ImageDataGenerator
def get_data(filename):
# You will need to write code that will read the file passed
# into this function. The first line contains the column headers
# so you should ignore i... | seanjudelyons/TensorFlow_Certificate | Sign Language Part 2(CNN) Last exercise.py | Sign Language Part 2(CNN) Last exercise.py | py | 4,470 | python | en | code | 12 | github-code | 36 | [
{
"api_name": "csv.reader",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "numpy.array_split",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_numb... |
40156974543 | #!/usr/bin/python
# -*- coding: utf-8 -*-
from __future__ import print_function
# Copyright (c) 2017/18 Dennis Wulfert
#
# GNU GENERAL PUBLIC LICENSE
# Version 2, June 1991
#
# 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... | Stakdek/EM | em.py | em.py | py | 3,939 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "logging.getLogger",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "systemd.journal.JournalHandler",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "logging.INFO",
"line_number": 41,
"usage_type": "attribute"
},
{
"api_name": "so... |
36714543817 | from dash import html, dcc
from dash.development.base_component import Component
from datafiles.views.view import View, DfView
from dataviz.irenderer import IDataStudyRenderer
import plotly.express as px
from dataviz.src.components.iplot import IPlot
class BubbleChart(IPlot):
_name = "bubble-chart"
@classme... | adangreputationsquad/theriver | dataviz/src/components/bubble_charts.py | bubble_charts.py | py | 3,249 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "dataviz.src.components.iplot.IPlot",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "dataviz.irenderer.IDataStudyRenderer",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "datafiles.views.view.View",
"line_number": 18,
"usage_type": "nam... |
18526461373 | from keras.models import Model
from keras.layers.recurrent import LSTM
from keras.layers import Dense, Input, Embedding
from keras.preprocessing.sequence import pad_sequences
from keras.callbacks import ModelCheckpoint
from collections import Counter
import nltk
import numpy as np
from sklearn.model_selection import tr... | sbarham/dsrt | Trial/fred_testing.py | fred_testing.py | py | 5,473 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "matplotlib.use",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "numpy.random.seed",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "os.getcwd",
"l... |
27515698765 | from discord.ext import commands
import discord
import random
class HelpCog(commands.Cog):
def __init__(self, bot):
self.bot = bot
@commands.command(aliases=['хелп'])
async def help(self, ctx):
prefix = '!'
emb = discord.Embed(title='Команды сервера: ', description=f'`{prefix}help`... | RuCybernetic/CyberTyanBot | cogs/commands/Help.py | Help.py | py | 1,104 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "discord.ext.commands.Cog",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "discord.ext.commands",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "discord.Embed",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "discor... |
35941249520 | import os
import sys
import inference
import storage
import boto3
# Flask
from flask import Flask, redirect, url_for, request, render_template, Response, jsonify, redirect
from werkzeug.utils import secure_filename
from gevent.pywsgi import WSGIServer
# Some utilites
import numpy as np
from util import base64_to_p... | pingyuanw/293B | app.py | app.py | py | 1,691 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "flask.Flask",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "boto3.client",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "inference.Inference",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "flask.render_template",
... |
22169703217 | from flask import make_response
from google.cloud import bigquery
# my modules
import config
from my_logging import getLogger
log = getLogger(__name__)
config = config.Config()
with open('auth.txt', 'r') as f:
cf_token = f.readline().rstrip('\r\n')
# entry point of Cloud Functions
# trigger = http
def atm_iv_d... | terukusu/optionchan-gcp | functions_py/atm_iv/main.py | main.py | py | 3,306 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "my_logging.getLogger",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "config.Config",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "flask.make_response",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "config.gcp_bq_da... |
1292570084 | import tensorflow as tf
from pathlib import Path
import numpy as np
import dataset
import tensorflow_probability as tfp
tfd = tfp.distributions
class Encoder:
def __init__(self, latent_size):
super(Encoder, self).__init__()
# static parameters
self.latent_size = latent_size
self... | alicebizeul/progressiveAE | Vnetworks.py | Vnetworks.py | py | 6,915 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "tensorflow_probability.distributions",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "tensorflow.keras.Sequential",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "tensorflow.keras",
"line_number": 25,
"usage_type": "attribute"
},... |
22781218068 | import pandas as pd
from extensions import extensions
from initial_values.initial_values import be_data_columns_to_master_columns, year_dict
from datetime import datetime
from dateutil.relativedelta import relativedelta
from initial_values.initial_values import sap_user_status_cons_status_list, be_data_cons_status_list... | Zhenya1975/bdo_v41 | functions/read_be_eo_xlsx_file_v5.py | read_be_eo_xlsx_file_v5.py | py | 24,681 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "extensions.extensions.db",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "extensions.extensions",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "datetime.datetime.strptime",
"line_number": 15,
"usage_type": "call"
},
{
"ap... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.