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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
20774866134 | import pickle
import numpy as np
import matplotlib.pyplot as plt
'''Read dictionary'''
pickle_in = open("1d_scan_5mm.pickle", "rb")
data5 = pickle.load(pickle_in)
z = np.array([10, 100, 200, 500])
freq = data5['TRACE01'][:, 0]
'''Plots the graph'''
fig, ax0 = plt.subplots()
ax0.plot(1e-3*data5['TRACE01'][:, 0], d... | gotamyers/Flux_concentrator_organized | 1D_scan/Plot_Cleo_5mm_fluxconc_gain_height_freq.py | Plot_Cleo_5mm_fluxconc_gain_height_freq.py | py | 1,536 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "pickle.load",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.subplots",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",... |
9806781117 | # import libraries
import inspect
import logging
class LogGen:
@staticmethod
def log_gen():
logging.basicConfig(filename="A:/AutomationProjects_python/ecommerce_app/logs/online_shop.log",
level=logging.INFO, force=True, format="%(asctime)s: %(levelname)s: %(name)s: %("
... | santoshsharma21/ecommerce--automation-project-python | utilities/custom_logger.py | custom_logger.py | py | 584 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "logging.basicConfig",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "logging.INFO",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "inspect.stack",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "logging.getLogger"... |
21927778547 | import speech_recognition as sr
r = sr.Recognizer()
# mic_list = sr.Microphone.list_microphone_names()
# print(mic_list)
with sr.Microphone(sample_rate=48000, chunk_size=1024)as source:
print("Say...")
audio = r.listen(source)
try:
text = r.recognize_google(audio)
print(text)
except sr.... | MahbinAhmed/Learning | Python/Python Advance (Basic) Practice/Speech_Recognition.py | Speech_Recognition.py | py | 551 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "speech_recognition.Recognizer",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "speech_recognition.Microphone",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "speech_recognition.UnknownValueError",
"line_number": 12,
"usage_type": "attrib... |
9758770115 | import os
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from config.environment import db_URI
from flask_marshmallow import Marshmallow
from flask_bcrypt import Bcrypt
app = Flask(__name__)
from decorators import logging, errors
app.config['SQLALCHEMY_DATABASE_URI'] = db_URI
app.config['SQLALCHEMY... | hannahakhtar/golden-shoes | server/app.py | app.py | py | 1,092 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "flask.Flask",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "config.environment.db_URI",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "flask_sqlalchemy.SQLAlchemy",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "flas... |
27323079338 | # -*- coding: utf-8 -*-
from __future__ import print_function, division, absolute_import, unicode_literals
try:
from inspect import getfullargspec as getargspec # PY3
except ImportError:
from inspect import getargspec # PY2
from copy import deepcopy
from fontTools.misc.py23 import unichr
from fontTools impor... | Torneo-Tipografico-Comunidad/Torneo-2020 | Calmadita /05_SOURCES/sources/venv/lib/python3.7/site-packages/ufo2ft/util.py | util.py | py | 15,336 | python | en | code | 7 | github-code | 6 | [
{
"api_name": "logging.getLogger",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "copy.deepcopy",
"line_number": 59,
"usage_type": "call"
},
{
"api_name": "fontTools.misc.transform.Transform",
"line_number": 69,
"usage_type": "call"
},
{
"api_name": "in... |
40014042085 | from flask import Flask, request
from flask_cors import CORS
from flask_restx import Namespace, Api, Resource
import pandas as pd
from sklearn.cluster import KMeans
app = Flask(__name__)
CORS(app)
calc_ns = Namespace("cluster", description="To Cluster coordinates")
@calc_ns.route("/cluster")
class Cluster(Resourc... | yujiho1910/cluster_backend | app.py | app.py | py | 1,194 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "flask.Flask",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "flask_cors.CORS",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "flask_restx.Namespace",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "flask_restx.Resource... |
71737169148 | from typing import List
from project.movie_specification.movie import Movie
from project.user import User
class MovieApp:
def __init__(self):
self.movies_collection: List[Movie] = []
self.users_collection: List[User] = []
def register_user(self, username, age):
user = self.__find_us... | tonytech83/Python-OOP | OOP_Exams/05_OOP_18_April_2022/movie_app/project/movie_app.py | movie_app.py | py | 4,757 | python | en | code | 4 | github-code | 6 | [
{
"api_name": "typing.List",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "project.movie_specification.movie.Movie",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "typing.List",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "proje... |
38430753813 | import glob, os, re, sys
import kornia
import numpy as np
import torch
import torch.jit
import torch.nn.functional as F
from torch import nn
from torchmore import combos, flex, layers
default_device = torch.device(os.environ.get("device", "cuda:0"))
noutput = 53
def make(name, *args, device=default_device, **kw):
... | ocropus/ocropus4train | ocropus4train/ocrmodels.py | ocrmodels.py | py | 15,970 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "torch.device",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.environ.get",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "re.sub",
"line_number... |
6631072100 | import tweepy
from textblob import TextBlob
consumer_key='LcOC1S1FjfJ3RAhSyIzZxdPUT'
consumer_secret='NUJh5NpvMGYzZfZni6q5bbA7RsxbpsMUWBovjjBfbojWbWke63'
access_token='3298019112-TdaTMoI6fRwR6dkN0jWFoZ3ZsIgCvmbUuyUEnE7'
access_token_secrets='1S3TndMD6cyU03OHMLXID3R5Lr8YpPWGWxQesVWR1Bf94'
auth=tweepy.OAuthHandler(... | nike47/sentiment_analysis | sentiment__.py | sentiment__.py | py | 572 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "tweepy.OAuthHandler",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "tweepy.API",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "textblob.TextBlob",
"line_number": 21,
"usage_type": "call"
}
] |
33068106957 | #!/usr/bin/env python3
import argparse
import datetime
import os
import sys
import xml.etree.ElementTree as ET
from typing import Dict, Tuple, List, Union
import cv2
import numpy as np
from dataclasses import dataclass
ColorMapping = Dict[str, np.ndarray]
@dataclass
class Segment:
x_start: int
y_start: int... | OMMR4all/ommr4all-page-segmentation | ocr4all_pixel_classifier/lib/pc_segmentation.py | pc_segmentation.py | py | 12,433 | python | en | code | 2 | github-code | 6 | [
{
"api_name": "typing.Dict",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "numpy.ndarray",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "numpy.ndarray",
"line_number": 25,
"usage_type": "attribute"
},
{
"api_name": "dataclasses.datacla... |
41415284556 | # -*- coding: utf-8 -*-
# ---
# jupyter:
# jupytext:
# text_representation:
# extension: .py
# format_name: percent
# format_version: '1.3'
# jupytext_version: 1.13.6
# kernelspec:
# display_name: 'Python 3.7.10 64-bit (''multifactor'': conda)'
# name: python3
# ---
# %% [markdo... | etccapital/MultiFactor | scripted_notebook/data_download_and_process.py | data_download_and_process.py | py | 20,133 | python | en | code | 30 | github-code | 6 | [
{
"api_name": "os.chdir",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "src.dataloader.load_industry_mapping",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "src.dataloader",
"line_number": 43,
"usage_type": "name"
},
{
"api_name": "src.data... |
41861254276 | from __future__ import print_function
import numpy as np
import tensorflow as tf
import pygame
import pygame.midi
from pygame.locals import *
from pygame import midi
from pygame.midi import Input
import sample
from sys import exit
import os
pygame.font.init()
background_colour = (255,255,255)
(width, height) = (1280,... | steviemanboypal/Singbot-FYP | singbot/front.py | front.py | py | 2,349 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "pygame.font.init",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "pygame.font",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "pygame.image.load",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "pygame.image",
... |
17953373557 | # -*- coding: utf-8 -*-
import concurrent.futures
from abc import ABCMeta
from concurrent.futures import as_completed
from typing import List
import cgroup_parser
from lichee import plugin
from lichee.dataset.io_reader.io_reader_base import BaseIOReader
class BaseDataset(metaclass=ABCMeta):
def __init__(self, c... | Tencent/Lichee | lichee/dataset/dataloader/dataset_base.py | dataset_base.py | py | 5,435 | python | en | code | 295 | github-code | 6 | [
{
"api_name": "abc.ABCMeta",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "typing.List",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "lichee.plugin.get_plugin",
"line_number": 44,
"usage_type": "call"
},
{
"api_name": "lichee.plugin",
... |
26857165960 | import os
import cv2
import json
import torch
import shutil
import numpy as np
import torch.nn as nn
import matplotlib.pyplot as plt
from torch.utils.tensorboard import SummaryWriter
from torch.utils.data import Dataset, DataLoader
from torchvision import transforms, utils
cwd = os.getcwd()
train_data_dir = f'{cwd}/... | KiranMPrajapati/document_understanding | segmentation_map_mse.py | segmentation_map_mse.py | py | 8,905 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "os.getcwd",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "torch.utils.tensorboard.SummaryWriter",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "torchvision.transforms",
"line_number": 21,
"usage_type": "name"
},
{
"api_name":... |
75146208507 | from spyne import Application, rpc, ServiceBase, \
Integer, Unicode , Decimal, Boolean
from spyne import Iterable
from spyne.protocol.soap import Soap11
from spyne.server.wsgi import WsgiApplication
import decimal
from wsgiref.simple_server import make_server
# Le service va dire autant que fois qu'on le demande n... | blurp748/info802 | soap/api/soapService.py | soapService.py | py | 1,201 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "spyne.ServiceBase",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "spyne.rpc",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "spyne.Unicode",
"line_number": 11,
"usage_type": "argument"
},
{
"api_name": "spyne.Integer",
"li... |
40414429709 | from django.conf.urls import patterns, include, url
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'ecomstore.views.home', name='home'),
# url(r'^ecomstore/', include('ecomstore.foo.urls')),
... | proper337/ecomstore | ecomstore/urls.py | urls.py | py | 1,406 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "django.contrib.admin.autodiscover",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "django.contrib.admin",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "django.conf.urls.patterns",
"line_number": 7,
"usage_type": "call"
},
{
"api... |
34066341750 |
import numpy as np
import cv2
from PIL import Image
#import matplotlib.pyplot as plt
#import matplotlib.gridspec as gridspec
import os
import argparse
Ground_Truth=os.listdir(r'/home/abdelrahman/teest')
Ground_Truth.sort()
Colored=os.listdir(r'/home/abdelrahman/PycharmProjects/VideoCapture/Data-AlSeq2')
Colored.... | AbdelrahmanEldakrony/Video-Manipulation | Final_Segmentation/Final_Seg.py | Final_Seg.py | py | 2,739 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "os.listdir",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "os.listdir",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 25,
... |
20070441217 | import datetime
import hashlib
import random
import re
import struct
import subprocess
import sys
import traceback
import urllib.parse
import dateutil.parser
import dateutil.tz
import requests
import websocket
import command
import config
rs = requests.Session()
rs.headers['User-Agent'] = 'sbot (github.com/raylu/sbo... | raylu/sbot | utils.py | utils.py | py | 6,696 | python | en | code | 8 | github-code | 6 | [
{
"api_name": "requests.Session",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "config.bot",
"line_number": 27,
"usage_type": "attribute"
},
{
"api_name": "sys.version",
"line_number": 43,
"usage_type": "attribute"
},
{
"api_name": "websocket.__version... |
28427916141 | from libs.searchpage import Applitool
from libs.createaccountpage import Createpage
from playwright.sync_api import Page
class Testcreateappliaccount:
def test_createaccountpage(self, page: Page):
search = Applitool(page)
account = Createpage(page)
search.navigate()
search.gotoweb... | Saritha591/applitools_playwrightautomation | tests/test_createaccoutpage.py | test_createaccoutpage.py | py | 358 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "playwright.sync_api.Page",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "libs.searchpage.Applitool",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "libs.createaccountpage.Createpage",
"line_number": 10,
"usage_type": "call"
}
] |
24988764591 | from osv import osv
from mako.template import Template as MakoTemplate
import time
class actions_server(osv.osv):
_inherit = 'ir.actions.server'
def merge_message(self, cr, uid, keystr, action, context):
obj_pool = self.pool.get(action.model_id.model)
id = context.get('active_id')
obj ... | factorlibre/openerp-extra-6.1 | actions_server_mako_email/asme.py | asme.py | py | 631 | python | en | code | 9 | github-code | 6 | [
{
"api_name": "osv.osv.osv",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "osv.osv",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "mako.template.Template",
"line_number": 13,
"usage_type": "call"
}
] |
71811497147 | from PIL import Image
from csv import reader
inputFilename: str = "./dist/flag.csv"
outputFilename: str = "./writeup/flag.png"
with open(inputFilename, "r") as csv_file:
csv_reader = reader(csv_file)
list_of_rows = list(csv_reader)
size = [len(list_of_rows[0]), len(list_of_rows)]
outputImage: Image = Image.n... | ShortArrow/how_to_solve_ctfs | IMCTF 2021/misc/pixcels-equal-cells/writeup/writeup.py | writeup.py | py | 738 | python | en | code | 3 | github-code | 6 | [
{
"api_name": "csv.reader",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "PIL.Image",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "PIL.Image.new",
"line_number": 12,
"usage_type": "call"
}
] |
14756577555 | from django.http import HttpResponse
from django.shortcuts import render_to_response, RequestContext, render, redirect
from TimeTrackingWithDjango.ProjectManagerToolInDjango import models
from django.db.models import Q
from django.views.decorators.csrf import csrf_protect
from django.template import RequestContext
... | ikljucaricek/TimeTrackingWithDjango | TimeTrackingWithDjango/TimeTrackingWithDjango/ProjectManagerToolInDjango/views.py | views.py | py | 3,437 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "django.shortcuts.render",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "TimeTrackingWithDjango.ProjectManagerToolInDjango.models.OsobaProjekt.objects.create",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "TimeTrackingWithDjango.ProjectManage... |
14751934660 | from controller.chain.web3base import Web3Base
from web3.exceptions import ContractLogicError
from controller.chain.util import word2chain
from config import config, BASEDIR
class EtherController(Web3Base):
def __init__(
self,
entrypoint: str = config.ETHER_DOMAIN,
contract_ad... | userpred/oxid | ethereum_controller/ether.py | ether.py | py | 4,334 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "controller.chain.web3base.Web3Base",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "config.config.ETHER_DOMAIN",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "config.config",
"line_number": 11,
"usage_type": "name"
},
{
"a... |
31145055482 | # -*- coding: cp949 -*-
import sys; sys.path.append("dist")
# Use this way
from dist import ffchat
# ...or this way
from dist.ffchat import (
set_embeddings,
download_embeddings,
remove_embeddings,
load_mydata_from_embeddings,
load_mydata_from_source,
)
# Set OPENAI_API_KEY
import... | Jin1025/AI_internship | gradio - ffchat.py | gradio - ffchat.py | py | 1,669 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "sys.path.append",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 3,
"usage_type": "attribute"
},
{
"api_name": "openai.api_key",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "dist.ffchat.is_inform... |
3928848 | from collections import deque
import sys
a = [1000, 9999]
pr_set = [True] * (a[1] + 1)
m = int(a[1] ** 0.5)
for i in range(2, m+1):
if pr_set[i]:
for j in range(2*i,a[1]+1,i):
pr_set[j] = False
pr_set[:1000] = [False] * 1000
test_case = int(input())
for _ in range(test_case):
visit = [Fal... | Winmini/CodingTest | BOJ/1963.py | 1963.py | py | 1,401 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "sys.stdin.readline",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "sys.stdin",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "collections.deque",
"line_number": 18,
"usage_type": "call"
}
] |
19286607541 | import sqlite3
class Database():
def cria(self):
conn = self.conexao()
cur = conn.cursor()
cur.execute ("create table if not exists endereco \
(id integer PRIMARY KEY, \
cep text not null,\
logradouro text,\
bairro text,\
numero t... | viiktordev/python-flask-agenda | api-agenda/database/database.py | database.py | py | 866 | python | pt | code | 0 | github-code | 6 | [
{
"api_name": "sqlite3.connect",
"line_number": 30,
"usage_type": "call"
}
] |
32627993368 | import pandas as pd
import streamlit as st
import matplotlib.pyplot as plt
import utils
# Load Data
df = utils.readCSV()
st.title('Números da COVID-19 no Brasil')
dateEnd = df['data'].iloc[-1].date()
dateStart = df['data'].iloc[0].date()
date = st.date_input('Selecione a Data', dateEnd, dateStart, dateEnd)
# Codig... | lfmaster780/dataCovid | appCovid.py | appCovid.py | py | 2,715 | python | pt | code | 0 | github-code | 6 | [
{
"api_name": "utils.readCSV",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "streamlit.title",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "streamlit.date_input",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
... |
3895075833 | from esdvd import ESCommon
from lru import lru_cache_function
import json
import random
import time
import os
class QueryData(ESCommon):
def __init__(self):
ESCommon.__init__(self)
@staticmethod
@lru_cache_function(max_size=1024*8, expiration=60)
def get_id(q, rindex):
path = q.get_f... | jdgwartney/esdvd | esdvd/query.py | query.py | py | 2,470 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "esdvd.ESCommon",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "esdvd.ESCommon.__init__",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "esdvd.ESCommon",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "lru.lru_cache_fu... |
41584673858 | # colorlog 모듈을 설치한 뒤에 실행해주셔야 합니다
# 오류에서 확인하기 힘듭니다.
"""로그 전용 모듈"""
import logging.config
import settings
def get_my_logger(name):
logging.config.dictConfig(settings.LOGGING_CONF)
return logging.getLogger(name)
logger = get_my_logger(__name__)
if __name__ == '__main__':
"""my_logging를 사용해봅니다... | JSJeong-me/2021-K-Digital-Training | Web_Crawling/python-crawler/chapter_5/my_logging.py | my_logging.py | py | 638 | python | ko | code | 7 | github-code | 6 | [
{
"api_name": "logging.config.config.dictConfig",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "logging.config.config",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "logging.config",
"line_number": 9,
"usage_type": "name"
},
{
"api_name"... |
3525690368 | from kafka import KafkaConsumer
import json
from UserHandler.execution import connect
import threading
import datetime
def insertData(msg):
patient_id = msg.value['patient_id']
heartbeat = msg.value['heartbeat']
sys_bp = msg.value['sys_blood_pressure']
dia_bp = msg.value['dias_blood_pressure']
bod... | Sadat-Shahriyar/Panacea | Panacea/StreamApp/execution.py | execution.py | py | 4,620 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "datetime.datetime.fromtimestamp",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "UserHandler.execution.connect",
"line_number": 18,
"usage_type": "call"
},
{
... |
12555606105 | import os
import sys
import fancypages as fp
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
from fancypages.test import TEMP_MEDIA_ROOT
USE_OSCAR_SANDBOX = bool(os.getenv('USE_OSCAR_SANDBOX', False))
SANDBOX_MODULE = 'fancypages'
if USE_OSCAR_SANDBOX:
SANDBOX_MODULE = '... | socradev/django-fancypages | conftest.py | conftest.py | py | 4,141 | python | en | code | null | github-code | 6 | [
{
"api_name": "os.getenv",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "os.path.dirname",
"line_numbe... |
70093364989 | import csv
import pandas as pd
from konlpy.tag import Okt # Okt(Open Korean Text) 클래스
import nltk # 자연어 처리 패키지 문서탐색용, Test 클래스
import numpy as np # 행렬, 대규모 다차원 배열을 쉽게 처리 할 수 있도록 지원하는 파이썬의 라이브러리
import pickle
COMMENTSFILENAME = "comments"
PUMSALIST = ['Adjective', 'Adverb', 'Alpha', 'Determiner', 'Exclamat... | yoonjaeSong/ICO | ml/ml_by_pumsa/data_preprocessing.py | data_preprocessing.py | py | 5,152 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "pandas.read_csv",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "konlpy.tag.Okt",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "nltk.Text",
"line_number": 80,
"usage_type": "call"
},
{
"api_name": "pickle.dump",
"line_numb... |
74467735546 | import os
from utils.load_data import create_dataloader
import datetime
import argparse
import json
import time
def parse_arguments():
parser = argparse.ArgumentParser(description="Auto-CoT")
parser.add_argument(
"--dataset", type=str, default="aqua",
choices=["aqua", "gsm8k", "commonsensqa",... | Lori10/Master-Thesis-Few-Shot-CoT-Prompting-LLM | src/generate_subset_from_original_data.py | generate_subset_from_original_data.py | py | 2,640 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.now",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 40,
"usage_type": "attribute"
},
{
"api_name": "o... |
42162649943 | import boto3
def create_cluster(cluster_name):
client = boto3.client('eks')
try:
response = client.create_cluster(
name=cluster_name,
# version='string',
roleArn='arn:aws:iam::697508164634:role/eksServiceRole',
resourcesVpcConfig={
'subne... | Shirley-xjh/aws-eks-try | venv/eks/create_eks_cluster.py | create_eks_cluster.py | py | 1,477 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "boto3.client",
"line_number": 5,
"usage_type": "call"
}
] |
3167029979 | #!/usr/bin/env python3
import base64
from typing import Tuple
from functions.aes import gen_random_bytes, AESCipher, pkcs7_pad
RESULT = b"""Rollin' in my 5.0
With my rag-top down so my hair can blow
The girlies on standby waving just to say hi
Did you stop? No, I just drove by
"""
_SECRET = base64.b64decode(
"... | svkirillov/cryptopals-python3 | cryptopals/set2/challenge12.py | challenge12.py | py | 2,275 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "base64.b64decode",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "functions.aes.AESCipher",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "functions.aes.AESCipher.MODE_ECB",
"line_number": 22,
"usage_type": "attribute"
},
{
"ap... |
72741834427 | from fetch_property_data import get_properties_transit_info
from fetch_property_data import get_properties_nearby_transit_locations
from fetch_property_data import get_properties_transit_info_and_locations
from flask import Flask, request, make_response
import json
app = Flask(__name__)
@app.route('/transit', method... | freedom27/hotels_transit | server.py | server.py | py | 1,140 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "flask.Flask",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "flask.request.get_json",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "flask.request",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "fetch_property_data.g... |
4218900678 | from typing import Any, Text, Dict, List
import mysql.connector as mysql
from rasa_sdk import Action, Tracker
from rasa_sdk.executor import CollectingDispatcher
class ActionRecommendByScore(Action):
def name(self) -> Text:
return "action_recomend_by_score"
def run(self, dispatcher: CollectingDispat... | nghiatt26/chatbot | mybot/actions/actions.py | actions.py | py | 3,204 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "rasa_sdk.Action",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "typing.Text",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "rasa_sdk.executor.CollectingDispatcher",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "ras... |
8143425070 | from sys import stdin, stdout
from math import *
import RPi.GPIO as GPIO
import time
import requests
# ang1, ang2, ang3, ang4 -> angle of long rod, angle of small rod, angle of base, angle of string
# EVERYTHING IS IN METRES
#webaddress = 'http://192.168.0.101:8000/coordinates'
webaddress = 'http://192.168.2.48:8000/... | henrytang1/soil-sampler | test2.py | test2.py | py | 10,698 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "requests.get",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 70,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 74,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 83... |
38405717869 | # Data utils
import numpy as np
import pandas as pd
from typing import Tuple
import warnings
import statsmodels.api as sm # type: ignore
from typing import Any
def prob_to_odds(p: Any, clip=True) -> Any:
""" Cast probability into odds """
if isinstance(p, list):
p = np.array(p)
if clip:
... | prio-data/ViEWS_protest_data | predicting_armed_conflict_using_protest_data_utils.py | predicting_armed_conflict_using_protest_data_utils.py | py | 6,445 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "typing.Any",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "numpy.array",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "numpy.clip",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "numpy.any",
"line_number": 25,
... |
22939600641 | import tkinter
from tkinter import messagebox
import csv
import re
import os
from bs4 import BeautifulSoup
import requests
import time
import random
import platform
class DownloadArchiveInTag(object):
def __init__(self):
# 创建主窗口,用于容纳其它组件
self.root = tkinter.Tk()
sel... | LotusBornInSummer/MyGit | lofter_tag_downloader.py | lofter_tag_downloader.py | py | 13,077 | python | en | code | 2 | github-code | 6 | [
{
"api_name": "tkinter.Tk",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "tkinter.StringVar",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "tkinter.Entry",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "tkinter.StringVar",
"l... |
72581138107 | import numpy as np
import matplotlib.colors as colors
import matplotlib.pyplot as plt
from EO_Aberdeen.EO_PointTest import EO
def rosenbrock_2d(x, y, a=1, b=100):
# Minimum at
return (a - x) ** 2 + b * (y - x ** 2) ** 2
def rosensbrock_multi_2d(x_array):
x_array = np.asarray(x_array)
x_array = x_arr... | Fleford/EO_Aberdeen | EO_Aberdeen/EO_PointTest/EOWPP_Rosenbrock_Plot.py | EOWPP_Rosenbrock_Plot.py | py | 3,881 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "numpy.asarray",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.cla",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 37,
"usage_type": "name"
},
{
"api_name": "matplotlib.colo... |
23178448316 | from picar import front_wheels, back_wheels
from picar.SunFounder_PCA9685 import Servo
import picar
from time import sleep
import cv2
import numpy as np
import picar
import os
#/home/pi/small_car/data/left.avi
filename = '/home/pi/small_car/data/left.avi'
picar.setup()
db_file = "/home/pi/small_car/SunFounder_PiCar-V/r... | HaohanZhutcd/Obstacle-avoidance-vehicles-based-on-monocular-cameras-for-depth-estimation | capturevideotoimage.py | capturevideotoimage.py | py | 2,597 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "picar.setup",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "picar.front_wheels.Front_Wheels",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "picar.front_wheels",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "picar.... |
12711577620 | from django.urls import path, include, re_path
from .views import GridView, GridView2, GridView3, grid_config, grid_handler
grid1_patterns = (
[
# Basic Grid
path('', GridView.as_view(), name="json"),
# Data Base Grid
path('2/', GridView2.as_view(), name="database"),
path('3... | mglacayo07/django_grid | grid1/urls.py | urls.py | py | 508 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "django.urls.path",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "views.GridView.as_view",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "views.GridView",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "django.urls.path"... |
34246300102 | import torch
import torch.nn.functional as F
from transformers import AutoModelForCausalLM
import numpy as np
import ml_utils.utils as utils
class SentenceAutoEncoder(torch.nn.Module):
"""
Trains a new token type to compress a sentence into a single vector
representation
"""
def __init__(self, mod... | grantsrb/ctx_cmp | cmpr_prototype/models.py | models.py | py | 29,193 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "torch.nn",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "torch.float32",
"line_number": 63,
"usage_type": "attribute"
},
{
"api_name": "torch.float16",
"line_number": 64,
"usage_type": "attribute"
},
{
"api_name": "transformers.AutoM... |
4163857898 | import argparse
from graphqlclient import GraphQLClient
import roac_client
from OBPBookLoader import OBPBookLoader
from PunctumBookLoader import PunctumBookLoader
publishers = {
"OBP": (OBPBookLoader, "Open Book Publishers"),
"Punctum": (PunctumBookLoader, "Punctum Books")
}
def run(client, data_file, mode,... | mk270/roac-docker | loader/loader.py | loader.py | py | 1,538 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "OBPBookLoader.OBPBookLoader",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "PunctumBookLoader.PunctumBookLoader",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "roac_client.save_publishers",
"line_number": 16,
"usage_type": "call"
}... |
37955320473 | from celery import shared_task
import datetime
from django.core.mail import EmailMultiAlternatives
from django.template.loader import render_to_string
from django.conf import settings
from NewsPortal.settings import DEFAULT_FROM_EMAIL
from news.models import Category, Post
@shared_task
def send_email_post(pk):
po... | DmitryZZZZZZ/Portal | news/tasks.py | tasks.py | py | 1,826 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "news.models.Post.objects.get",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "news.models.Post.objects",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "news.models.Post",
"line_number": 12,
"usage_type": "name"
},
{
"api_n... |
21981013717 | import numpy as np
from matplotlib import pyplot as plt
from matplotlib import font_manager
from matplotlib.pyplot import MultipleLocator
myfont = font_manager.FontProperties(fname="C:\Windows\Fonts\simfang.ttf")
plt.rcParams["font.sans-serif"] = "SimHei" # 修改字体的样式可以解决标题中文显示乱码的问题
plt.rcParams["axes.unicode_minus"] = ... | shang-jun123/time_series | NOx_predict/DBN/NOx_predict.py | NOx_predict.py | py | 3,596 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "matplotlib.font_manager.FontProperties",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "matplotlib.font_manager",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "matplotlib.pyplot.rcParams",
"line_number": 7,
"usage_type": "attribute"
}... |
30354784591 | import inspect
import os
import sys
# Enthought library imports.
from traits.api import HasTraits, Property, List, Str, \
Instance, Button, Int
from traitsui.api import View, Group, Item, EnumEditor,\
ListEditor, TextEditor
from tvtk.api import tvtk
... | enthought/mayavi | tvtk/tools/tvtk_doc.py | tvtk_doc.py | py | 14,301 | python | en | code | 1,177 | github-code | 6 | [
{
"api_name": "tvtk.vtk_module.vtkObject",
"line_number": 34,
"usage_type": "attribute"
},
{
"api_name": "tvtk.vtk_module",
"line_number": 34,
"usage_type": "name"
},
{
"api_name": "sys.stdout",
"line_number": 38,
"usage_type": "attribute"
},
{
"api_name": "sys.st... |
71512991549 | import pygame
from pygame.locals import *
import sys
import time
import os
import random
pygame.init()
pygame.font.init()
WIN_WIDTH = 500
WIN_HEIGHT = 800
BIRD_IMGS = [pygame.transform.scale2x(pygame.image.load('images/bird1.png').convert_alpha()), pygame.transform.scale2x(pygame.image.load('images/bird2.png').conver... | nickribs1/FlappyBird | flappy_game_playable.py | flappy_game_playable.py | py | 6,748 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "pygame.init",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "pygame.font.init",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "pygame.font",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "pygame.transform.scale2x",... |
21337603380 | import triton_python_backend_utils as pb_utils
from ppocr.postprocess import build_post_process
import numpy as np
import json
import os
import logging
class TritonPythonModel:
def initialize(self, args):
self.model_config = json.loads(args["model_config"])
output0_config = pb_utils.get_output_conf... | lakiet1609/Auto-Text-Recognized-and-Summarized-System | triton_models/post_text_rec/1/model.py | model.py | py | 2,975 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "json.loads",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "triton_python_backend_utils.get_output_config_by_name",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "triton_python_backend_utils.triton_string_to_numpy",
"line_number": 12,
... |
2589177560 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from aiohttp import web
from osw.FrameReceiver import FrameReceiver
from osw.FrameSender import FrameSender
from osw.Streamer import Streamer
from osw.Webserver import start_web
try:
import asyncio
except:
import uasyncio as asyncio
from osw.Frame import Frame
fr... | kumy/samsung-ac-wifi-module | firmware/proto2/ac.py | ac.py | py | 2,839 | python | en | code | 7 | github-code | 6 | [
{
"api_name": "osw.Streamer.Streamer",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "osw.Storage.Storage",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "osw.FrameCounter.FrameCounter",
"line_number": 24,
"usage_type": "call"
},
{
"api_name"... |
74403830588 | import datetime
import braintree
from django.db.models import Count
from django.contrib import messages
from django.http import JsonResponse
from UTMS.settings import client
from django.core.exceptions import ObjectDoesNotExist
from django.views.generic import View
from django.shortcuts import render, redirect, get_ob... | Coderknight439/UTMS | ticketing/views.py | views.py | py | 5,026 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "django.views.generic.View",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "models.TicketSale.objects.get",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "models.TicketSale.objects",
"line_number": 20,
"usage_type": "attribute"
},
{... |
11315448794 | from __future__ import print_function
import pyzbar.pyzbar as pyzbar
import numpy as np
import cv2
import csv
import sys
import pytesseract.pytesseract as pt
def decode(im):
# Find barcodes
decodedObjects = pyzbar.decode(im)
return decodedObjects
def lcs(X, Y, m, n):
l = max(m, n) + 5
res = [... | NLPDev/BarcodeOCR | barcodeOCR.py | barcodeOCR.py | py | 2,774 | python | en | code | 6 | github-code | 6 | [
{
"api_name": "pyzbar.pyzbar.decode",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "pyzbar.pyzbar",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "cv2.convexHull",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"... |
17334318413 | import psycopg2
import pandas as pd
import numpy as np
import io
def create_database():
try:
conn = psycopg2.connect("host=127.0.0.1 dbname=postgres user=simon password=")
except psycopg2.Error as e:
print("Connection issue")
print(e)
try:
# Setting autocommit means we ... | simon1287/COVID_data_project | src/COVIDExtraction.py | COVIDExtraction.py | py | 4,336 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "psycopg2.connect",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "psycopg2.Error",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "psycopg2.Error",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "psycopg2.Error... |
70403686587 | import json
import logging
import sqlite3
from array import array
from os import makedirs, path
import requests
class DB:
def initialize_db(self, fname, table_name, columns):
"""
Args:
fname (str): location of the database.
Returns:
db (sqlite3.Connection): a SQLit... | Gamze0309/language-models-are-knowledge-graph | REL/db/base.py | base.py | py | 4,052 | python | en | code | 3 | github-code | 6 | [
{
"api_name": "sqlite3.connect",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "json.dumps",
"line_number": 85,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 91,
"usage_type": "call"
}
] |
72329563389 | # coding=utf-8
"""
Test database methods.
Integration tests: these depend on a local Postgres instance.
"""
from __future__ import absolute_import
import datetime
import pytest
from pathlib import Path
from datacube.index.exceptions import DuplicateRecordError
from datacube.model import Dataset
_telemetry_uuid = '... | ceos-seo/Data_Cube_v2 | agdc-v2/integration_tests/index/test_index_data.py | test_index_data.py | py | 6,278 | python | en | code | 26 | github-code | 6 | [
{
"api_name": "datetime.datetime",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
"line_number": 65,
"usage_type": "call"
},
{
"api_name": "pytest.raises",
... |
16974773080 | import requests
from bs4 import BeautifulSoup
from urllib.parse import urlparse, parse_qs
from datetime import datetime, timedelta
SERVER = 'https://ifc.emlines.com'
DPMP = '/dpmp/'
CARD_NO = 'ctl01_uxMainContentPlaceHolder_ucCardInfo_uxSnrValueLbl'
CREDIT_AMOUNT = 'ctl01_uxMainContentPlaceHolder_ucCardInfo_CardBalan... | prochac/mdpmp.cz | dpmp/card_info.py | card_info.py | py | 4,825 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "requests.get",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "urllib.parse.parse_qs",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "urllib.parse.url... |
30854150813 | from openpyxl.styles import Alignment, Font
from openpyxl.utils import get_column_letter
from openpyxl.drawing.image import Image
from openpyxl.styles import Alignment, Font
from openpyxl import Workbook
from time import strftime, gmtime
class FileFormatting:
def __init__(self, file_name):
"""
In... | MassylHAMDI/Detection_projet | file_formatting.py | file_formatting.py | py | 5,209 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "openpyxl.Workbook",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "openpyxl.utils.get_column_letter",
"line_number": 73,
"usage_type": "call"
},
{
"api_name": "openpyxl.styles.Alignment",
"line_number": 88,
"usage_type": "call"
},
{
"api_... |
22066458809 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.contrib.auth.decorators import user_passes_test, permission_required
from django.shortcuts import render, get_object_or_404
# Stdlib imports
import random
# Core Django imports
from django.utils import timezone
# Third-party app imports
# I... | atmospheresnode/ELSA | blog/views.py | views.py | py | 4,209 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "django.contrib.auth.decorators.user_passes_test",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "models.Post.objects.order_by",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "models.Post.objects",
"line_number": 45,
"usage_type": "attr... |
16110914544 | import requests
from bs4 import BeautifulSoup
import csv
# Function to scrape the additional details from a single product URL
def scrape_product_details(url):
response = requests.get(url)
soup = BeautifulSoup(response.content, 'html.parser')
try:
description = soup.find('div', {'id'... | tanisha3422/Amazon_Product.github.io | Product_Scrape.py | Product_Scrape.py | py | 3,064 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "requests.get",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"li... |
70551136827 | # import json
# import frappe
# import requests
# from requests_oauthlib import OAuth2Session
# @frappe.whitelist(allow_guest=True)
# def google_login():
# client_id = '575964597642-ml5lch91j2ov9r7u3mkmce834op3hdpg.apps.googleusercontent.com'
# client_secret = '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'
# re... | manishthakur37/CarSaleApp | carsale/python_script/google_login_api.py | google_login_api.py | py | 3,907 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "requests.post",
"line_number": 79,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 85,
"usage_type": "call"
},
{
"api_name": "frappe.get_doc",
"line_number": 92,
"usage_type": "call"
},
{
"api_name": "frappe.local.login_manager.... |
21755701935 | #THIS TRAINS A HYDROLOGICAL MODEL LOCALLY, USING EXCUSIVELY DISCHARGE DATA TO PREDICT DISCHARGE DATA
#HYPERPARAMETERS
days_intake_length = 60
forecast_day = 14
#LIBRARY IMPORTS
import xarray as xr
import matplotlib.pyplot as plt
import numpy as np
from dask.distributed import Client, LocalCluster
#Connecting to a... | Gongsta/flood-prediction | pipeline/modelling/sample_hydrological_model/sample_hydrological_model.py | sample_hydrological_model.py | py | 7,792 | python | en | code | 8 | github-code | 6 | [
{
"api_name": "dask.distributed.LocalCluster",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "dask.distributed.Client",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "xarray.open_dataset",
"line_number": 30,
"usage_type": "call"
},
{
"api_nam... |
40215340051 | import requests
import re
from django.test import TestCase
# Create your tests here.
class TestRouting(TestCase):
# Нужно написать view simple_route, которая формирует http ответ с пустым телом со статусом 200 на запрос GET
# (если запросы отличные от GET - возвращать 405) по /routing/simple_route/:
def t... | CrazyDi/Python3 | coursera_assignment/routing/tests.py | tests.py | py | 4,643 | python | ru | code | 0 | github-code | 6 | [
{
"api_name": "django.test.TestCase",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "requests.get",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "requests.post",
"li... |
2901295682 | """
File: server.py
A basic tcp server built using asyncio. Generic enough to be used by both the
node system, and the public facing api.
"""
import asyncio
import socket
import msgpack
import logging
from aiohttp import web
import json
logger = logging.getLogger('counterdb.server')
class HTTPServer(object):
... | rossdylan/counterdb | counterdb/server.py | server.py | py | 3,059 | python | en | code | 2 | github-code | 6 | [
{
"api_name": "logging.getLogger",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "aiohttp.web.Application",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "aiohttp.web",
"line_number": 25,
"usage_type": "name"
},
{
"api_name": "aiohttp.web.Res... |
30118051138 | import random
import numpy as np
import pandas as pd
from sklearn.datasets import fetch_california_housing
from sklearn.model_selection import train_test_split
from sklearn.tree import DecisionTreeRegressor
from treeinterpreter import treeinterpreter as ti
calif_housing = fetch_california_housing()
for line in calif_... | saratagelsir/Fake-News-Prediction | treeinterpreter_exmaple.py | treeinterpreter_exmaple.py | py | 2,036 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "sklearn.datasets.fetch_california_housing",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "sklearn.model_selection.train_test_split",
"line_number": 19,
"usage_type": "c... |
37772803914 | from django.urls import path, include
from . import views
app_name = 'users'
urlpatterns = [
path('', views.index, name='user-index'),
path('notifications/', views.NotificationCenterView.as_view(), name='notifications'),
# path('ship-create-view/', views.CreateView.as_view(), name='ship-create-view'),
] | Dathmar/mors-tyrannis | users/urls.py | urls.py | py | 318 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "django.urls.path",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 8,
"usage_type": "call"
}
] |
1482662271 | # a simple demo for Perceptron
import tensorflow as tf
import numpy as np
import matplotlib.pyplot as plt
def f(x):
return sess.run(Weights)*x + sess.run(biases)
x_data = np.random.rand(200).astype(np.float32)
y_data = x_data * 2.9 + 0.3
Weights = tf.Variable(tf.random_uniform([1], -1.0, 1.0))
biases = tf.Vari... | pcoreLiu/myworkspace | ann/perceptron.py | perceptron.py | py | 1,508 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "numpy.random.rand",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "numpy.float32",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "tensorflow.Var... |
13177536843 | import asyncio
import logging
import os
import disnake
from disnake.ext import commands
from dotenv import load_dotenv
from azuma.database import Guild, Prefix, connect
from azuma.utils import get_prefix
load_dotenv()
intents = disnake.Intents.default()
intents.message_content = True
bot = commands.Bot(intents=int... | neutron-bot/azuma | azuma/launch.py | launch.py | py | 1,346 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "dotenv.load_dotenv",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "disnake.Intents.default",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "disnake.Intents",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "disna... |
29955941046 | import numpy as np
import torch
from transformers import AutoTokenizer
from transformers import AutoModel
class PatentModel():
def __init__(self, pretrained_name:str="anferico/bert-for-patents", use_gpu:bool=True) -> None:
self.device = "cuda:0" if torch.cuda.is_available() and use_gpu else "cpu"
... | YENSTDi/project-nlp-patent-similarity | PatentModel.py | PatentModel.py | py | 2,874 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "torch.cuda.is_available",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "torch.cuda",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "transformers.AutoTokenizer.from_pretrained",
"line_number": 10,
"usage_type": "call"
},
{
"... |
11735629548 | """Fix duplicate mediums and packagings
Revision ID: bc9d617547e6
Revises: 29fa77040244
Create Date: 2022-10-23 15:31:09.856746
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy import orm
from sqlalchemy.orm import relationship, backref
from sqlalchemy.ext.declarative import declarative_base
Base ... | retroherna/rhinventory | alembic/versions/bc9d617547e6_fix_duplicate_mediums_and_packagings.py | bc9d617547e6_fix_duplicate_mediums_and_packagings.py | py | 3,025 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "sqlalchemy.ext.declarative.declarative_base",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.Column",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.Integer",
"line_number": 20,
"usage_type": "attribute"
},
{
... |
39507972265 | from ultralytics import YOLO
import cv2
import cvzone
import math
from sort import *
# Open the video file for processing
cap = cv2.VideoCapture("cars.mp4")
# Load the YOLO model for object detection
model = YOLO("yolov8l.pt")
# Define class names for object detection
classNames = ["person", "bicycle", ... | sanskarmodi8/Car_Counter_YOLOv8 | Car-Counter.py | Car-Counter.py | py | 4,986 | python | en | code | 2 | github-code | 6 | [
{
"api_name": "cv2.VideoCapture",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "ultralytics.YOLO",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "cv2.imread",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "cv2.bitwise_and",
"li... |
33170348482 | from traceback import format_exc
import logging
import socket
import ssl
log = logging.getLogger('irc')
class IRC(object):
def __init__(self, server, nick):
self.server = server
self.nick = nick
self.sock = None
def connect(self):
self.sock = socket.socket()
self.sock... | JeremyGrosser/robokad | irc.py | irc.py | py | 1,995 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "logging.getLogger",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "socket.socket",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "socket.gethostname",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "ssl.wrap_socket",
... |
69016093 | import torch
import torch.nn as nn
import torchvision.models as models
class EncoderCNN(nn.Module):
def __init__(self, embed_size):
super(EncoderCNN, self).__init__()
# load a pre-trained CNN
resnet = models.resnet50(pretrained=True)
# don't compute gradients for the CNN parameters... | RahulRewale/computer-vision | udacity-cvnd/2. Image Captioning/model.py | model.py | py | 3,292 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "torch.nn.Module",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "torchvision.models.resnet50",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "torchvision.m... |
73505368828 | from oauthlib.oauth2 import WebApplicationClient
from http.server import HTTPServer, BaseHTTPRequestHandler
from urllib.parse import parse_qsl
from random import SystemRandom
import base64
import hashlib
import string
import requests
import webbrowser
authorize_uri = "https://twitter.com/i/oauth2/authorize"
client_id ... | akgood/a2councilbot | get_twitter_creds.py | get_twitter_creds.py | py | 2,367 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "random.SystemRandom",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "string.ascii_letters",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "string.digits",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "base... |
14456962671 | import random
import hashlib
import threading
import sys
import os
import socket
import time
import requests, json
from colorama import init , Style,Fore
import http.client
init()
class utils:
# Functions 1to get is right
def __init__(self):
pass
# Simplification print
@staticmethod
def Go... | jofpin/trape | core/utils.py | utils.py | py | 5,566 | python | en | code | 7,770 | github-code | 6 | [
{
"api_name": "colorama.init",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "colorama.Style.NORMAL",
"line_number": 25,
"usage_type": "attribute"
},
{
"api_name": "colorama.Style",
"line_number": 25,
"usage_type": "name"
},
{
"api_name": "colorama.Fore... |
42135085565 | import numpy as np
import matplotlib.pyplot as plt
from scipy.stats import binom, norm
p = 0.1
n = 7
q = 1 - p
y_values = np.arange(0, n + 1, 1)
# Calculate the binomial PMF (probability mass function) for Y
binomial_pmf = binom.pmf(y_values, n, p)
# Calculate the CDF for the binomial distribution
binomial_cdf = np... | gadepall/digital-communication | gate/EC/2022/62/codes/main.py | main.py | py | 1,197 | python | en | code | 7 | github-code | 6 | [
{
"api_name": "numpy.arange",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "scipy.stats.binom.pmf",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "scipy.stats.binom",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "numpy.cumsum",
... |
19625302751 | import cv2
import os
import numpy as np
import pickle
from dataloader import DataLoader
import scripts.segmentation as sgm
import matplotlib.pyplot as plt
import matplotlib.cm as cm
from matplotlib.colors import ListedColormap
if __name__ == "__main__":
# load nmf data
# nmf_data_path = "/work/projects/aim-hi/... | AmanVirmani/libmsi | scripts/draft_plots.py | draft_plots.py | py | 7,964 | python | en | code | 2 | github-code | 6 | [
{
"api_name": "pickle.load",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 44,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 44,
"usage_type": "attribute"
},
{
"api_name": "dataloader.DataLoader",
"li... |
8956289265 | import scrapy
from ..items import QuotetutorialItem
class Quotespider(scrapy.Spider):# have to inherit from scrapy.Spider class
name = 'quotes' #name - of our crawler and start_urls should not change. Must remain intact
page_number = 2
start_urls =[
'http://quotes.toscrape.com/page/2/'
... | Ishanthedev/web-crawling-and-web-scraping | backup_spider.py | backup_spider.py | py | 1,327 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "scrapy.Spider",
"line_number": 3,
"usage_type": "attribute"
},
{
"api_name": "items.QuotetutorialItem",
"line_number": 11,
"usage_type": "call"
}
] |
14758460560 | # coding=utf-8
from __future__ import unicode_literals, absolute_import
import click
from django.core.management import call_command
@click.command()
@click.option('--verbosity', '-v', default=1, help='Verbosity level.')
@click.option('--traceback', default=True, is_flag=True,
help='Raise on exception... | 0x4e3/kickstarter | kickstarter/runner/commands/upgrade.py | upgrade.py | py | 927 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "django.core.management.call_command",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "django.core.management.call_command",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "click.command",
"line_number": 9,
"usage_type": "call"
},
{
... |
69878345469 | import networkx as nx
import matplotlib.pyplot as plt
from scapy.all import *
from scapy.all import Dot11
def check_mesh_network(pcapng_file):
packets = rdpcap(pcapng_file)
mac = []
for packet in packets:
if packet.haslayer(Dot11):
# if packet.addr3 == 'ec:a2:a0:69:b1:f9' or... | Yash-Sakre/MeshHawk | Back-End/pcaptograph.py | pcaptograph.py | py | 1,390 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "scapy.all.Dot11",
"line_number": 11,
"usage_type": "argument"
},
{
"api_name": "networkx.Graph",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "networkx.get_edge_attributes",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "netwo... |
33155190375 | import os
import json
from typing import List, Dict, Tuple, Optional, Union
from collections import defaultdict
import pickle as pkl
import torch
import torch.nn as nn
import torch.nn.functional as F
import pytorch_lightning as pl
from sklearn.cluster import KMeans
import numpy as np
from tqdm import tqdm
from tra... | raspberryice/type-discovery-abs | src/model.py | model.py | py | 31,985 | python | en | code | 12 | github-code | 6 | [
{
"api_name": "common.log.get_logger",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "common.log",
"line_number": 27,
"usage_type": "name"
},
{
"api_name": "time.time",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "time.time",
"line_numb... |
7275687494 | import tensorflow as tf
import tensorflow_probability as tfp
from eeg_to_fmri.layers.resnet_block import ResBlock
na_specification_fmri=([(14, 6, 12), (6, 4, 6), (12, 47, 5)], [(2, 1, 1), (1, 1, 1), (1, 1, 1)], True, (2, 2, 2), (1, 1, 1))
search_space = [{'name': 'learning_rate', 'type': 'continuous',
... | eeg-to-fmri/eeg-to-fmri | src/eeg_to_fmri/models/fmri_ae.py | fmri_ae.py | py | 12,476 | python | en | code | 4 | github-code | 6 | [
{
"api_name": "tensorflow.keras",
"line_number": 44,
"usage_type": "attribute"
},
{
"api_name": "tensorflow.keras.layers.Input",
"line_number": 87,
"usage_type": "call"
},
{
"api_name": "tensorflow.keras",
"line_number": 87,
"usage_type": "attribute"
},
{
"api_nam... |
28541528334 | from PIL import Image
import test_image
import aes_new
#encr params
# A 256 bit (32 byte) key
key = bytes("This_key_for_demo_purposes_only!", 'utf-8')
iv = "InitializationVe"
mode = 'CTR'
#aes = aes_new.AESModeOfOperationECB(key)
#aes = aes_new.AESModeOfOperationCBC(key, iv = iv)
#aes = aes_new.AESModeOfOperationCFB(... | ilshatKam/aes-image-encrypt | imageget.py | imageget.py | py | 818 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "aes_new.Counter",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "aes_new.AESModeOfOperationCTR_fast",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "PIL.Image.open",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "PIL... |
25266173456 | from picamera import PiCamera
from time import sleep
import numpy as np
from PIL import Image, ImageFilter
img_path = r'./0324_stats/5cm.png'
camera = PiCamera()
camera.start_preview()
sleep(5)
camera.capture(img_path)
camera.stop_preview()
img = Image.open(img_path)
print(img.format, img.size, img.mode)
imgdata... | Youssef-Rachad/ESC204-Microscope-Design | camera_tests/picameracode.py | picameracode.py | py | 684 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "picamera.PiCamera",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "PIL.Image.open",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "PIL.Image",
"line_numb... |
74147620348 | # -*- coding: utf-8 -*-
from django.db import migrations, models
import billing.models
class Migration(migrations.Migration):
dependencies = [
('billing', '0005_auto_20171029_2326'),
]
operations = [
migrations.AlterField(
model_name='clientbill',
name='bill_id'... | digitalfox/pydici | billing/migrations/0006_auto_20180713_1851.py | 0006_auto_20180713_1851.py | py | 706 | python | en | code | 122 | github-code | 6 | [
{
"api_name": "django.db.migrations.Migration",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "django.db.migrations",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "django.db.migrations.AlterField",
"line_number": 15,
"usage_type": "call"
},
{... |
16201930699 | import torch
import torch.backends.cudnn as cudnn
import numpy as np
from flags import DATA_FOLDER
from models.invariant_learning import IVR
cudnn.benchmark = True
import tqdm
from tqdm import tqdm
import os
from os.path import join as ospj
from data import dataset as dset
from utils.common import Evaluator
from uti... | PRIS-CV/IVR | test.py | test.py | py | 3,890 | python | en | code | 9 | github-code | 6 | [
{
"api_name": "torch.backends.cudnn.benchmark",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "torch.backends.cudnn",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "torch.cuda.is_available",
"line_number": 20,
"usage_type": "call"
},
{
"ap... |
19136110064 | import sqlite3
# Connect to the database
conn = sqlite3.connect('contacts.db')
# Create a table to store the contacts
conn.execute('''CREATE TABLE contacts (
id INTEGER PRIMARY KEY,
name TEXT NOT NULL,
email TEXT NOT NULL,
phone TEXT NOT NULL)''')
# Fun... | skannanWork/Contact-storage-app | contact.py | contact.py | py | 1,332 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "sqlite3.connect",
"line_number": 4,
"usage_type": "call"
}
] |
16251862521 | import logging
import random
import uuid
from collections import defaultdict
from tornado.web import RequestHandler
from tornado.websocket import WebSocketHandler, WebSocketClosedError
from .deck import StandardDeck, Card, NPair
from .json_util import js
log = logging.getLogger(__name__)
class DontHave(Exception):... | mpharrigan/firstinbattle | firstinbattle/gofish.py | gofish.py | py | 8,067 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "logging.getLogger",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "deck.NPair",
"line_number": 23,
"usage_type": "name"
},
{
"api_name": "collections.defaultdict",
"line_number": 49,
"usage_type": "call"
},
{
"api_name": "uuid.uuid4",
... |
25182062544 | import multiprocessing
import os
import sys
import numpy as np
from rich.progress import track
import amical
from amical.analysis import models
from amical.dpfit import leastsqFit
from amical.tools import mas2rad, roundSciDigit
if sys.platform == "darwin":
multiprocessing.set_start_method(
"fork", force=... | SAIL-Labs/AMICAL | amical/analysis/fitting.py | fitting.py | py | 22,779 | python | en | code | 9 | github-code | 6 | [
{
"api_name": "sys.platform",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "multiprocessing.set_start_method",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "amical.analysis.models.visUniformDisk",
"line_number": 35,
"usage_type": "attribute"
... |
30091035473 | __author__ = 'Ekaterina'
from model.contact import Contact
from model.group import Group
import pymysql
class DBFixture:
def __init__(self, host, name, user, password):
self.host = host
self.name = name
self.user = user
self.password = password
self.connection = pymysql.con... | katevarivoda/pythontraining | fixture/db.py | db.py | py | 2,703 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "pymysql.connect",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "model.group.Group",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "model.contact.Contact",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "model.contact... |
25090398214 | # %%
import torch
import torchvision
from torch.utils.data import Dataset, DataLoader
import numpy as np
# %%
class WineDataset(Dataset):
"""
WineDataset inherits from pytorch's Dataset class
This allows us to load the dataset on initialization, get an iterm, and return the length
"""
def __init__(s... | TylerJost/learnPytorch | pythonEngineer/10-DatasetTransforms.py | 10-DatasetTransforms.py | py | 1,546 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "torch.utils.data.Dataset",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "numpy.loadtxt",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "numpy.float32",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "torch.from_n... |
38272127201 | """Tests for the `tracks` module"""
import os
import numpy as np
import pandas as pd
import xarray as xr
import datetime as dt
import tropycal.tracks as tracks
def read_storm():
"""For functions involving non-internet related functionality, use this function"""
#Read sample subset of HURDATv2 dataset, an... | tropycal/tropycal | tests/tracks/test_storm.py | test_storm.py | py | 6,755 | python | en | code | 116 | github-code | 6 | [
{
"api_name": "os.path.join",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "os.path.dirname",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_nu... |
8639894202 | from pathlib import Path
from IO.db.models import Config, FileToUpload, Compound, LogFile, Daily, DailyFile, Integration, GcRun, OldData
from IO.db.models import Quantification, Standard, SampleQuant, LocalFile, RemoteFile
from IO.db import connect_to_db
from settings import DB_NAME, CORE_DIR
def test_all_common_re... | brendano257/Zugspitze-Schneefernerhaus | tests/reprs.py | reprs.py | py | 1,345 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "IO.db.models.Config",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "IO.db.models.FileToUpload",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "IO.db.conn... |
37601031268 | import json
from sqlwrapper import gensql,dbget,dbput
import datetime
def HOTEL_CAH_POST_POSTING_HISTORY_LOG(request):
res_id = request.json['res_id']
sql_value = json.loads(dbget("SELECT * from cashiering.posting_history_log WHERE cashiering.posting_history_log.res_id="+res_id+""))
sql_valu... | infocuittesting/hotel360-second-version | HOTEL_CAH_POST_POSTING_HISTORY_LOG.py | HOTEL_CAH_POST_POSTING_HISTORY_LOG.py | py | 809 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "json.loads",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "sqlwrapper.dbget",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "sqlwrapper.dbget",
"line_num... |
20649191962 | import pandas as pd
import matplotlib.pyplot as plt
# Zad1
print("Zad1")
miasta = pd.read_csv (r'./miasta.csv')
print(miasta.values)
# Zad2
print("Zad2")
new_row = pd.DataFrame([[2010, 460, 555, 405]],
columns=['Rok', 'Gdansk', 'Poznan', 'Szczecin'])
miasta = pd.concat([miasta, new_row], ignore_i... | igorpustovoy/inteligencja_obliczeniowa | lab01/zad3.py | zad3.py | py | 1,043 | python | pl | code | 0 | github-code | 6 | [
{
"api_name": "pandas.read_csv",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "pandas.concat",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.plot"... |
40758803503 | import pygame
from pygame.draw import circle
from pygame.draw import rect
from random import randint
pygame.init()
pygame.font.init()
FPS = 30
screen = pygame.display.set_mode((1200, 900))
font1 = pygame.font.SysFont('freesanbold.ttf', 50)
text1 = font1.render('score 0', True, (255, 255, 0))
textRect1 = text1.get_re... | ILoveNumericalMethods/infa_2022_lfi | ball/aim_ball.py | aim_ball.py | py | 4,511 | python | ru | code | 0 | github-code | 6 | [
{
"api_name": "pygame.init",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "pygame.font.init",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "pygame.font",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "pygame.display.set_mode",
... |
2358058207 | import mimetypes
from eulfedora.models import DigitalObject, FileDatastream, XmlDatastream, Relation
from bdrxml import rights
from bdrxml import irMetadata
from bdrxml import mods
from bdrxml import mets
from bdrxml import rels
from bdrxml import darwincore
from rdflib import URIRef
from rdflib.namespace import Namesp... | Brown-University-Library/bdrcmodels | bdrcmodels/models.py | models.py | py | 25,119 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "mimetypes.add_type",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "mimetypes.add_type",
"line_number": 46,
"usage_type": "call"
},
{
"api_name": "mimetypes.guess_type",
"line_number": 60,
"usage_type": "call"
},
{
"api_name": "rdflib.nam... |
7194922934 | import speech_recognition as sr
import subprocess
proceso = None
saludos = """
hola hola
"""
from gtts import gTTS
def speak(text):
tts = gTTS(text=text, lang="en")
filename = "voice.mp3"
tts.save(filename)
import playsound
def play(filename):
playsound.playsound(filename)
def ejecutar_comando(comando):
... | AnonymousWebHacker/home_automation | test.py | test.py | py | 1,278 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "gtts.gTTS",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "playsound.playsound",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "subprocess.Popen",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "subprocess.Popen",
... |
71579190587 | """ Preprocesses a raw time-series dataset from a ``.csv`` file. """
import os
import argparse
from typing import List, Set
# pylint: disable=wrong-import-position, ungrouped-imports, bad-continuation
import matplotlib
matplotlib.use("Agg")
import numpy as np
import pandas as pd
import seaborn as sns
import matplotli... | langfield/spred | spred/gpst/prepro.py | prepro.py | py | 5,749 | python | en | code | 3 | github-code | 6 | [
{
"api_name": "matplotlib.use",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "seaborn.set",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "argparse.ArgumentParser",
"line_number": 56,
"usage_type": "attribute"
},
{
"api_name": "argparse.Names... |
45342953556 | import time
import os
import argparse
import pickle
import torch
import numpy as np
from model import RNN
import pandas as pd
from dataloader import ClassDataLoader
from data_utils import pd_to_conll,write_conll
from Edmonds_decoder import parse_proj
np.random.seed(1990)
torch.manual_seed(1990)
parser = argparse.Argu... | makyr90/DL_Syntax_Models | Biaffine_parser_PyTorch/predict.py | predict.py | py | 5,977 | python | en | code | 2 | github-code | 6 | [
{
"api_name": "numpy.random.seed",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "torch.manual_seed",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "argparse.Argume... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.