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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
73449031678 | #!/usr/bin/env python3
"""
Downloads Alpine latest iso for ARM, and builds a working headless filesystem
for a Raspberry PI, with Ansible.
"""
import argparse
import sys
from elevate import elevate
import logging
import os
import os.path
import re
from urllib.parse import urlparse
import shutil
import tempfile
im... | andersojs/home-play | make_alpine_rpi/make_alpine_rpi.py | make_alpine_rpi.py | py | 13,920 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "logging.getLogger",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "logging.DEBUG",
"line_number": 24,
"usage_type": "attribute"
},
{
"api_name": "logging.StreamHandler",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "logging.DE... |
7625813693 | '''
Methods to load and plot C-Mod Ly-alpha data.
sciortino, August 2020
'''
import matplotlib.pyplot as plt
plt.ion()
import numpy as np
import xarray
from scipy.interpolate import interp1d, interp2d
from omfit_classes import omfit_eqdsk, omfit_mds
import shutil, os, scipy, copy
from IPython import embed
import MDSpl... | Reksoatr/SOLPS_Scripts | SOLPS_Scripts/LyaAnalysis/lyman_data.py | lyman_data.py | py | 55,152 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "matplotlib.pyplot.ion",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "sys.path.append",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "sys.path",
... |
74865654079 | import numpy as np
import time
import pickle
import os
from sklearn.preprocessing import StandardScaler, MinMaxScaler
from sklearn.metrics import mean_squared_error, r2_score, mean_absolute_error
from sklearn.model_selection import KFold, RepeatedKFold, StratifiedKFold, RepeatedStratifiedKFold
from sklearn.pipeline imp... | hiyamgh/Forecasting-Demand-Primary-Health-Care | CodeUbr/cross_validation_smogn_prob.py | cross_validation_smogn_prob.py | py | 127,118 | python | en | code | 3 | github-code | 97 | [
{
"api_name": "matplotlib.use",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "warnings.simplefilter",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "warnings.simplefilter",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "rpy2.robje... |
72667903039 | import json
import os
import shutil
#This script deploys the project to screeps. Its not as quick as using link, but is a nice alternative if the project requires any extra build functionality
def deployDirectory(directory, project):
if (not os.path.isdir(directory)):
print("ERROR: " + directory + " not f... | fishykins/reef | deploy.py | deploy.py | py | 1,021 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "os.path.isdir",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 12... |
24026913202 |
from django.contrib import admin
from django.urls import path
from app import views
# STATIC AND MEDIA
from django.conf import settings
from django.conf.urls.static import static
urlpatterns = [
path('admin/', admin.site.urls),
path('', views.HomePage.as_view(), name='home'),
path('room/new/', views.AddR... | mkwiatek770/Conference_Reservation | conference_reservation/conference_reservation/urls.py | urls.py | py | 899 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "django.urls.path",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "django.contrib.admin.site",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "django.contrib.admin",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "... |
22339718303 | from tinkoff.invest import Quotation
from datetime import timedelta
from dataclasses import asdict
from typing import Union
import math
import numpy as np
def qtof(q: Union[Quotation, dict]) -> float:
if type(q) is dict:
return float(q['units'] + q['nano'] * 10**-9)
elif type(q) is Quotation:
... | stil3t/midnikebot | robot/utils.py | utils.py | py | 1,371 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "typing.Union",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "tinkoff.invest.Quotation",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "tinkoff.invest.Quotation",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "tinkoff.... |
8857782536 | """
Create all table that the project needs
"""
import os
from flask import Flask, render_template, request
from sqlalchemy import create_engine, text
from sqlalchemy.orm import scoped_session, sessionmaker
from env_init import database_flask_env_init
database_flask_env_init()
# Set up database
engine = create_engine... | Brickea/Brickea-learning-records | CS50-s-Web-Programming-with-Python-and-JavaScript/Projects/project1/database/create.py | create.py | py | 1,484 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "env_init.database_flask_env_init",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.create_engine",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "s... |
73860319360 | from django.db import models
from student.models import Student
class Applyleave(models.Model):
id=models.AutoField(primary_key=True)
studentId = models.ForeignKey(
Student,
on_delete=models.CASCADE,
)
startDate= models.DateField()
endDate= models.DateField()
status= models.Bool... | amisha1730/b_student | applyleave/models.py | models.py | py | 332 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "django.db.models.Model",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "django.db.models",
"line_number": 4,
"usage_type": "name"
},
{
"api_name": "django.db.models.AutoField",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "... |
1872907102 | # -*- coding: utf-8 -*-
"""
Created on Mon Oct 24 22:37:16 2016
@author: Abdullah A. Alam
"""
# - ProblemSet4.py *- coding: utf-8 -*-
"""
Problem 4_1:
Write a program that will sort an alphabetic list (or list of words) into
alphabetical order. Make it sort independently of whether the letters are
capital or lowerc... | abdullahaalam/Python-Programming-A-Concise-Introduction | Programming-Assignment/ProblemSet4/ProblemSet4.py | ProblemSet4.py | py | 4,203 | python | en | code | 11 | github-code | 97 | [
{
"api_name": "random.seed",
"line_number": 53,
"usage_type": "call"
},
{
"api_name": "random.random",
"line_number": 55,
"usage_type": "call"
},
{
"api_name": "statistics.mean",
"line_number": 60,
"usage_type": "call"
},
{
"api_name": "statistics.stdev",
"lin... |
73048995519 | import json
import os
def name_to_var(lang_name):
return (
lang_name.upper()
.replace(" ", "_")
.replace("(", "")
.replace(")", "")
.replace("-", "_")
.replace("'", "")
)
def load_json(name):
filepath = os.path.join(os.path.dirname(__file__), "langs_covera... | xhluca/dl-translate | scripts/generate_langs.py | generate_langs.py | py | 979 | python | en | code | 367 | github-code | 97 | [
{
"api_name": "os.path.join",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "os.path.dirname",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_numb... |
29684365176 |
import os
import gensim
import numpy as np
import pandas as pd
import keras
from keras.models import Model
from keras.layers import Input, Conv1D, Dense, Dropout, GlobalMaxPooling1D
from keras.layers.embeddings import Embedding
from keras.preprocessing import sequence, text
from keras.utils.np_utils import to_categor... | alexisthual/posos-data-challenge | cnn_w2vec.py | cnn_w2vec.py | py | 5,266 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "keras.preprocessing.text.Tokenizer",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "keras.preprocessing.text",
"line_number": 32,
"usage_type": "name"
},
{
"api_name": "keras.preprocessing.sequence.pad_sequences",
"line_number": 39,
"usage_type":... |
16779332240 | from fastapi import FastAPI, HTTPException, status
from schema import Orders
from database import Base,engine, SessionLocal
import model
Base.metadata.create_all(engine)
db = SessionLocal()
app = FastAPI()
# OrderAPI
@app.get("/orders",response_model=list[Orders]) #To view all data from database to us... | Jagpreet887/ProductAPI | OrdersAPI/main.py | main.py | py | 1,982 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "database.Base.metadata.create_all",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "database.engine",
"line_number": 6,
"usage_type": "argument"
},
{
"api_name": "database.Base.metadata",
"line_number": 6,
"usage_type": "attribute"
},
{
"ap... |
35698820423 | #!/usr/bin/env python3
from flask import Flask
app = Flask(__name__)
# Route for the home page
@app.route('/')
def index():
return '<h1>Python Operations with Flask Routing and Views</h1>'
# Route for printing a string
@app.route('/print/<string:parameter>')
def print_string(parameter):
print(parameter)
... | Muchai248/python-p4-routing-and-views-lab | server/app.py | app.py | py | 1,039 | python | en | code | null | github-code | 97 | [
{
"api_name": "flask.Flask",
"line_number": 5,
"usage_type": "call"
}
] |
13158885452 | from django.contrib.auth import views
from django.urls import path
from .views import AdminApproveSellerView, UsersListAPIView, LoginView, RegisterUserAPIView, CurrentProfileAPIView, \
ProfileAPIView, UserToBecomeSellerView
urlpatterns = [
path('admin/notice/', AdminApproveSellerView.as_view(), name='admin-no... | Ayturgan/online-shop-drf | apps/users/urls.py | urls.py | py | 889 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "django.urls.path",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "views.AdminApproveSellerView.as_view",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "views.AdminApproveSellerView",
"line_number": 8,
"usage_type": "name"
},
{
"a... |
12781349334 | from collections import deque
dx = [0, 1, 0, -1]
dy = [1, 0, -1, 0]
# 장마에 잠기는 영역
def rain(n):
for i in range(N):
for j in range(N):
if board[i][j] <= n:
save[i][j] = False
#안전구역 계산
def save_area(a, b):
q = deque()
q.append((a, b))
while q:
... | kjskjs356/ALGORITHMS_PRACTICE | 백준/Silver/2468. 안전 영역/안전 영역.py | 안전 영역.py | py | 1,421 | python | ko | code | 0 | github-code | 97 | [
{
"api_name": "collections.deque",
"line_number": 18,
"usage_type": "call"
}
] |
40629439870 | import json
import os
from types import SimpleNamespace
from typing import Callable, Dict, TypeVar
import requests
from cachetools import cached, TTLCache
from requests.auth import HTTPBasicAuth
T = TypeVar("T")
class AZGewinkelClient:
def __init__(self):
key = os.environ.get("AZGEWINKEL_KEY")
s... | spijkercenter/azgewinkel-functions | src/client.py | client.py | py | 1,336 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "typing.TypeVar",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "os.environ.get",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "os.environ.get",
"l... |
7370150747 | """Navigation menu for the netbox_facts plugin."""
from django.utils.translation import gettext_lazy as _
from extras.plugins import PluginMenuButton, PluginMenuItem, get_plugin_config
from extras.plugins.navigation import PluginMenu
from utilities.choices import ButtonColorChoices
macaddress_buttons = [
PluginMen... | jsenecal/netbox-facts | netbox_facts/navigation.py | navigation.py | py | 1,288 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "extras.plugins.PluginMenuButton",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "utilities.choices.ButtonColorChoices.GREEN",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "utilities.choices.ButtonColorChoices",
"line_number": 12,
... |
44828591708 | # Author = Valerii Vorobiov
# Date = 08 December, 2021
from functools import partial
def part_one(_input):
four_digits = [line.split(' | ')[1].split(' ') for line in _input.split('\n')]
length = {
1: 2,
7: 3,
4: 4,
8: 7
}
return sum(1 for digits in four_digits for d in ... | valerii-vorobiov/advent-of-code-2021 | 2021/8/main.py | main.py | py | 2,374 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "functools.partial",
"line_number": 50,
"usage_type": "call"
},
{
"api_name": "functools.partial",
"line_number": 51,
"usage_type": "call"
},
{
"api_name": "functools.partial",
"line_number": 52,
"usage_type": "call"
}
] |
72277553918 | from collections import deque
def bfs(start, visit, route):
count = 0
q = deque([[start, count]]) # [1,0]
while q:
value = q.popleft()
v = value[0] # 시작노드
count = value[1] # 1번노드부터 depth
if visit[v] == -1: # 방문하지 않았을 경우
visit[v] = count
count +=... | ShinhyeongPark/Algorithm | Level3/가장먼노드.py | 가장먼노드.py | py | 1,126 | python | ko | code | 0 | github-code | 97 | [
{
"api_name": "collections.deque",
"line_number": 6,
"usage_type": "call"
}
] |
16303253389 | from typing import Any, Dict, Type, TypeVar
import attr
from ..models.subscr_channel_no_sound_option_type import SubscrChannelNoSoundOptionType
from ..models.subscr_channel_no_sound_option_value import SubscrChannelNoSoundOptionValue
T = TypeVar("T", bound="SubscrChannelNoSoundOption")
@attr.s(auto_attribs=True)
c... | glanch/bahnhofs-abfahrten-client | bahnhofs_abfahrten_client/models/subscr_channel_no_sound_option.py | subscr_channel_no_sound_option.py | py | 1,256 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "typing.TypeVar",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "models.subscr_channel_no_sound_option_type.SubscrChannelNoSoundOptionType",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "models.subscr_channel_no_sound_option_value.SubscrChannel... |
40387353237 | import streamlit as st
import requests
from PIL import Image
from transformers import BlipProcessor, BlipForConditionalGeneration
from sentence_transformers import SentenceTransformer
from sklearn.metrics.pairwise import cosine_similarity
import pandas as pd
import numpy as np
# Function to generate a caption
def gene... | hakancangunerli/image-to-emoji | test.py | test.py | py | 2,213 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "transformers.BlipProcessor.from_pretrained",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "transformers.BlipProcessor",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "transformers.BlipForConditionalGeneration.from_pretrained",
"line_numbe... |
73396932478 | #!/usr/bin/env python3
#import sys
#from os import listdir, mkdir
from os.path import isfile, join, isdir
from collections import defaultdict
#import copy
#import spacy
#import scispacy
import sys, getopt
PROG_NAME = "add-term-from-umls.py"
# all columns values are zero-indexed
INPUT_COL_CONCEPT_ID = 0
UMLS_COL_C... | erwanm/tdc-tools | code/add-term-from-umls.py | add-term-from-umls.py | py | 9,528 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "getopt.getopt",
"line_number": 84,
"usage_type": "call"
},
{
"api_name": "sys.argv",
"line_number": 84,
"usage_type": "attribute"
},
{
"api_name": "getopt.GetoptError",
"line_number": 85,
"usage_type": "attribute"
},
{
"api_name": "sys.stderr",
... |
8853908934 | from gensim.models import FastText
import enchant
import nltk
model_fasttext = FastText.load('fasttext.model')
fasttext_min_similarity = 0.6
enchant_kr = enchant.Dict('ko_KR')
def include_spell_mistake(word, similar_word, score):
edit_distance_threshold = 1 if len(word) <= 4 else 2
score_1 = score > fasttext... | hongju-jeong/nlp-tutorial | ft-tutorial/ft_spell_check.py | ft_spell_check.py | py | 1,001 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "gensim.models.FastText.load",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "gensim.models.FastText",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "enchant.Dict",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "nltk.edi... |
72118207359 | import requests
import time
from bs4 import BeautifulSoup
import json
import csv
import sqlite3
# GRAB LIST OF GROUP'S PUUIDs
# EVERY 30 MINUTES CHECK FOR EVERYONE
def get_all_puuids():
# Connect to the SQLite database
conn = sqlite3.connect('user_data.db')
cursor = conn.cursor()
# Retrieve the puuid... | dakotaPPP/ecotracker-bot | requesta.py | requesta.py | py | 10,916 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "sqlite3.connect",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "json.load",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "sqlite3.connect",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "sqlite3.connect",
"line... |
69932796159 | from django.shortcuts import render, redirect
from django.views.generic import TemplateView, ListView, CreateView
from django.core.files.storage import FileSystemStorage
from django.urls import reverse_lazy
from .forms import StForm
from .models import Storage
class Home(TemplateView):
template_name = 'storage/h... | MakPal5211/mycloud | storage/views.py | views.py | py | 1,594 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "django.views.generic.TemplateView",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "django.core.files.storage.FileSystemStorage",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "django.shortcuts.render",
"line_number": 21,
"usage_type": ... |
4452762276 | ### Goal: Read in an Image an autoamtically detect the Scale used:
## Caveats: Maybe we will need manual input of scale,
##Do we perform this per Image or once provided the person doesn't change the zoom
####
#### Read in all Images and save their respective paths and filenames
def Images_list(path_to_images):
i... | Fipsii/DaphniaDetector | Code_Measure/archive/DpiToMm_APPROACH_WhiteBlack.py | DpiToMm_APPROACH_WhiteBlack.py | py | 16,024 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "os.walk",
"line_number": 12,
"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": "cv2.imread",
"line_number": 40,... |
11048854836 | from builtins import zip
import numpy as np
import healpy as hp
import matplotlib.pyplot as plt
import lsst.sims.maf.metrics as metrics
from .plotHandler import BasePlotter
__all__ = ['FOPlot', 'SummaryHistogram']
class FOPlot(BasePlotter):
"""
Special plotter to generate and label fO plots.
"""
def... | lsst-sims/legacy_sims_maf | python/lsst/sims/maf/plots/specialPlotters.py | specialPlotters.py | py | 8,439 | python | en | code | 13 | github-code | 97 | [
{
"api_name": "plotHandler.BasePlotter",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "matplotlib.pyplot.figure",
"line_number": 46,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 46,
"usage_type": "name"
},
{
"api_name": "he... |
33997594572 | import numpy as np
from random import randint
from keras.utils import to_categorical
np.set_printoptions(threshold=np.nan)
def Create_Features(sample_size, sequence_length, feature_length):
features = []
for i in range(sample_size):
_ = []
for j in range(sequence_length):
... | Pudkip/Iterative-Knockout | Data.py | Data.py | py | 1,578 | python | en | code | 3 | github-code | 97 | [
{
"api_name": "numpy.set_printoptions",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "numpy.nan",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "random.randint",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "numpy.array",
... |
11852180251 | import itertools
import pecan
from oslo_log import log
from pecan import rest
from shadowfiend.api import acl
from shadowfiend.api.controllers.v1 import models
from shadowfiend.common import exception
from shadowfiend.common import policy
from shadowfiend.common import timeutils
from shadowfiend.db import models as d... | rogeroger-yu/shadowfiend | shadowfiend/api/controllers/v1/project.py | project.py | py | 7,526 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "oslo_log.log.getLogger",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "oslo_log.log",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "pecan.request",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "pecan.rest.Res... |
37081208784 | import json
import pathlib
from typing import Set, List
from progress_report import ProgressReport # , ProgressReportSubstep
import bpy
from . import gltftypes
from . import glb
from .import_manager import ImportManager
from .texture_io import load_textures
from .material_io import load_materials
from .m... | ousttrue/iogltf | blender_io/__init__.py | __init__.py | py | 5,207 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "logging.getLogger",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "bpy.types",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "typing.List",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "bpy.types",
"line_nu... |
30493686618 | # coding=utf-8
import logging
import datetime
from dofitariomanager import flaskmongo
import numpy
from flask_restful import Resource
from flask import jsonify
from flask import request
from flask import abort
logger_ = logging.getLogger(__name__)
def make_error(status_code, message):
response = jsonify({
... | uborzz/Dof_Playground | dofitariomanager/resources/generalweek.py | generalweek.py | py | 1,061 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "logging.getLogger",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "flask.jsonify",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "flask_restful.Resource",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "numpy.asarray"... |
16817756157 | from datetime import datetime
import pytest
from tests.assets import POSTS_DICT
class TestSearchPostInReplies:
@pytest.mark.parametrize(
('body', 'result'),
(
(
{'post_id': 2},
{'amount': 0, 'result': []},
),
(
{... | aptmess/mfd-parser-wb-de | tests/app/routes/test_search_in_replies.py | test_search_in_replies.py | py | 811 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "datetime.datetime.strptime",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 29,
"usage_type": "name"
},
{
"api_name": "pytest.mark.parametrize",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "p... |
21055622506 | import os
from django.conf import settings
from django.middleware import cache
from sass import compile
def locate(filename):
for path, dirs, files in os.walk(os.getcwd(), followlinks=True):
for f in files:
if f == filename:
yield os.path.join(path, filename)
class FetchFrom... | rtts/django-simplecms | cms/middleware.py | middleware.py | py | 1,806 | python | en | code | 3 | github-code | 97 | [
{
"api_name": "os.walk",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.getcwd",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 12,
"us... |
10099666851 | import base64
import hashlib
import hmac
import time
from typing import Any, Dict
from pyfs_base import BaseFeishu
class Bot(BaseFeishu):
def __init__(self, hook_id: str = None, key_word: str = None, secret: str = None) -> None:
super(Bot, self).__init__()
self.hook_id = hook_id
self.key_... | feishu-sdk-python/pyfs-bot | pyfs_bot/bot.py | bot.py | py | 4,458 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "pyfs_base.BaseFeishu",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "hmac.new",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "hashlib.sha256",
"line_number": 25,
"usage_type": "attribute"
},
{
"api_name": "base64.b64encode",
... |
43793216118 | import re
import math
import pynbs
import struct
import os
import argparse
_map = 'a_b[cd~e;f1gh2i3jk4l5m6no7p8qr9s0t"uv,w.xy?z'
def getFloat(f):
return struct.pack('<f', f)
def getInt(n):
return struct.pack('<i', n)
def getShort(n):
return struct.pack('<h', n)
def getByte(b):
return bytes([b])... | haveyouwantto/MCSQ | Samples/flash2mcs.py | flash2mcs.py | py | 1,906 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "struct.pack",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "struct.pack",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "struct.pack",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "argparse.ArgumentParser",
"li... |
6730347615 | import selenium
from fixtures import *
from ajax import *
import time
import pytest
URL = 'http://www.yelp.com/biz/lollys-cafe-new-bedford'
InvalidURL = 'http://www.tutorialspoint.com/python/list_len.htm'
@pytest.mark.webtest
def test_setup_selenium_with_invalid_url(setup_selenium):
driver = setup_selenium
... | cclough715/Gist | GistReviewSummarization/tests/test_integration.py | test_integration.py | py | 2,008 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "time.sleep",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "pytest.mark",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "time.sleep",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number"... |
17308011431 | from unittest import TestCase, main
import sys
# ZODB imports
import transaction
from ZODB.FileStorage import FileStorage
from ZODB import DB
from bokeep.book import BoKeepBookSet
from bokeep.util import ends_with_commit
from tests.test_transaction_and_module import Type1Transaction
from test_bokeep_book import BoKee... | paritworkercoop/bokeep-mirror | tests/test_transaction.py | test_transaction.py | py | 1,558 | python | en | code | 2 | github-code | 97 | [
{
"api_name": "test_bokeep_book.BoKeepWithBookSetup",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "test_bokeep_book.BoKeepWithBookSetup.setUp",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "test_bokeep_book.BoKeepWithBookSetup",
"line_number": 16,
... |
41513290482 | # _*_ coding:utf-8 _*_
__author__ = 'meto'
__date__ = '2018/10/30 18:04'
import sys
sys.path.append('G:/study/python3selenium3')
from selenium import webdriver
import time
import random
from PIL import Image
from util.rk import RClient
from Imooc_selenium.find_element import FindElement
class RegisterFunction(objec... | meto001/SeleniumPython | Imooc_selenium/register_function.py | register_function.py | py | 3,005 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "sys.path.append",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "selenium.webdri... |
1800408907 | from APIOpenBD import APIOpenBD
from ElasticsearchWrapper import ElasticsearchWrapper
from flask import Flask, render_template, request, jsonify
import json
from jinja2 import Template, Environment, FileSystemLoader
import re
from jinja2 import evalcontextfilter, Markup, escape
_paragraph_re = re.compile(r'(?:\r\n|\... | asuetomi/BookDB | app.py | app.py | py | 4,153 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "re.compile",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "flask.Flask",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "flask.Flask.jinja_options.copy",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "flask.Flask.jin... |
72505020799 | import sys
sys.path.append("../")
from NLG_BRAZILIAN_PORTUGUESE.geracao_funcoes_por_ordem.ordem_palavra.pal_nominais import *
import argparse
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='Retorna pronomes no caso reto')
parser.add_argument('pessoa_da_interlocucao', type=str)
pa... | AndreRosaLRT/NLG_PT_BR | teste_funcoes/main_pal_nominais.py | main_pal_nominais.py | py | 1,122 | python | pt | code | 0 | github-code | 97 | [
{
"api_name": "sys.path.append",
"line_number": 2,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 2,
"usage_type": "attribute"
},
{
"api_name": "argparse.ArgumentParser",
"line_number": 9,
"usage_type": "call"
}
] |
2573423451 | # simple NN with skorch
# that does balanced dataset at training time
#
from collections import OrderedDict
import numpy as np
import torch
import torch.nn as nn
import torch.optim as optim
import torch.utils.data
import torch.nn.functional as F
import skorch
from sklearn.model_selection import StratifiedKFold
def ... | josepablocam/pdac-diag-model | nn.py | nn.py | py | 4,200 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "torch.nn.Linear",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line_number": 28,
"usage_type": "name"
},
{
"api_name": "torch.nn.Dropout",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line_number... |
13831611366 | # -*- coding: utf-8 -*-
import numpy as np
np.set_printoptions(threshold='nan')
import os
from os import walk
import os.path as osPath
import math
import csv
from PIL import Image, ImageDraw, ImageFont, ImageColor
def generateRandomRule():
myRule = ""
for i in range(0,32):
myRule += str(random.randint... | Spaceific-Studio/_WORK | projects/CA2D-COLOR_ANALYZE/main.py | main.py | py | 12,512 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "numpy.set_printoptions",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "math.trunc",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "os.path.isdir",
"line_number": 59,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_nu... |
16622569841 | from datetime import datetime, timedelta
from airflow import DAG
from airflow.operators.dummy_operator import DummyOperator
from operators.sas_to_redshift import SASfileToRedshiftOperator
from operators.copy_to_redshift import S3ToRedshiftOperator
from operators.load_fact import LoadFactOperator
from operators.clean_ta... | ganegoda/capstone | airflow/dags/etl_dag.py | etl_dag.py | py | 5,625 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "airflow.models.Variable.get",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "airflow.models.Variable",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "airflow.models.Variable.get",
"line_number": 15,
"usage_type": "call"
},
{
"a... |
31179122819 | import pytest
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
@pytest.fixture()
def set_up():
chrome_options = Options()
chrome_options.add_argument("--disable-extensions")
chrome_options.add_argument("--no-sandbox")
pathToChrome = '/Users/bpyronn/Downloads/chromed... | bpyronn/nespressoecom | setup/conftest.py | conftest.py | py | 587 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "selenium.webdriver.chrome.options.Options",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 12,
"usage_type": "name"
},
{
... |
32949796532 | from django.urls import path
from . import views
from django.contrib.auth.forms import AuthenticationForm
from django.contrib.auth import views as auth_view
urlpatterns = [
path('',views.login_page,name='Home'),
#path('/accounts', views.uses, name="users"),
path('users/', views.users, name='users.html'... | pawarde/Ravan | RavantApp/urls.py | urls.py | py | 1,145 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "django.urls.path",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "django.urls.path",... |
86578907294 | import pandas as pd
from pathlib import Path
from sandu.data_types import SensitivityInput
import app.controllers.agents.sensitivity_analysis.sensitivity_model_inventory as inventory
from app.core.settings import DATA_PATH_LIVE
import json
import numpy as np
from typing import List, Tuple
"""
Parse Ensemble Time Serie... | ScottishCovidResponse/rampvis-api | data-api/app/controllers/agents/ents_to_sandu_agent.py | ents_to_sandu_agent.py | py | 6,158 | python | en | code | 6 | github-code | 97 | [
{
"api_name": "pathlib.Path",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "typing.List",
"line_number": 34,
"usage_type": "name"
},
{
"api_name": "pandas.read_csv",
"line_number": 49,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_... |
38382743722 | #!/usr/bin/python
# Classification (U)
"""Program: repair_db.py
Description: Unit testing of repair_db in mongo_db_admin.py.
Usage:
test/unit/mongo_db_admin/repair_db.py
Arguments:
"""
# Libraries and Global Variables
# Standard
import sys
import os
if sys.version_info < (2, 7):
import... | deepcoder42/mongo-db-admin | test/unit/mongo_db_admin/repair_db.py | repair_db.py | py | 2,246 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "sys.version_info",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "sys.path.append",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 30,
"usage_type": "attribute"
},
{
"api_name": "os.getcwd",
"... |
14734482970 | # ***** BEGIN GPL LICENSE BLOCK *****
#
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distribute... | amsaid1989/VisIt | ops/render_all_cams.py | render_all_cams.py | py | 3,075 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "bpy.context",
"line_number": 28,
"usage_type": "attribute"
},
{
"api_name": "bpy.app.handlers.persistent",
"line_number": 26,
"usage_type": "name"
},
{
"api_name": "bpy.types",
"line_number": 30,
"usage_type": "attribute"
},
{
"api_name": "bpy.props... |
31992487365 | import os
import re
from pathlib import Path
import pandas as pd
from dotenv import load_dotenv
BASE_DIR = Path(__file__).resolve().parent.parent
load_dotenv(dotenv_path='.env')
PANDAS_TO_JSON_PARAMS = {'force_ascii': False, 'orient': 'records'}
def clean_bank_name(bank_name):
try:
p = re.compile(r'[農|... | whchi/tools | pytools/tw_institution_code/main.py | main.py | py | 2,664 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "pathlib.Path",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "dotenv.load_dotenv",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "re.compile",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_... |
11140123877 | import requests
import datetime
from db import connect
file = open("API_KEY.txt","r")
API_KEY = file.read()
SYMBOL = 'VALE3'
OUTPUTSIZE = 'compact' # compact: last 100 data points; full: last 20 years
def get_result():
r = requests.get(
'https://www.alphavantage.co/query?function=TIME_SERIES_DAILY&symbo... | byander/predict_stock_market | save_data.py | save_data.py | py | 1,372 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "requests.get",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.strptime",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 25,
"usage_type": "attribute"
},
{
"api_name": "db.con... |
26394236906 | import math
import random
import statistics
import numpy as np
#define points in spherical coordinates
# r is constant (1)
# azimuth (theta), where +X = 0deg
# elevation, ranges from -pi/2 to pi/2 (-90deg to +90deg)
def sph_random_distribution(point_qty, r):
'''
This function returns a list of points on a sph... | johnmoreland/convex_polyhedra | normal_dist.py | normal_dist.py | py | 3,107 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "random.random",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "math.pi",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "random.random",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "math.pi",
"line_number":... |
20405250528 | from django.shortcuts import render
import requests
from rest_framework import status
from rest_framework.parsers import MultiPartParser, FormParser
from rest_framework.response import Response
import json
from rest_framework.views import APIView
from api.serializers import ImageSerializer, Base64ImageSerializer
fro... | pratham-gupta/Dog-Breed-Prediction-API | api/views.py | views.py | py | 3,946 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "PIL.ImageFile.LOAD_TRUNCATED_IMAGES",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "PIL.ImageFile",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "django.conf.settings.BASE_DIR",
"line_number": 20,
"usage_type": "attribute"
},
... |
11429734621 | import os,sys
import cv2
import pandas as pd
import numpy as np
from sklearn.model_selection import train_test_split
from keras.models import Sequential, Model, load_model
from keras.layers import *
from keras.callbacks import *
from keras.utils import np_utils
from keras.optimizers import SGD, Adam
from keras.prepro... | Jack-Learn/computerversion_finalproject | test.py | test.py | py | 1,841 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "os.listdir",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "os.path.abspath",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_numb... |
14612730925 | import itertools as it
#https://jmduke.com/posts/a-gentle-introduction-to-itertools/
letters = ['a', 'b', 'c', 'd', 'e', 'f']
booleans = [1, 0, 1, 0, 0, 1]
numbers = [23, 20, 44, 32, 7, 12]
decimals = [0.1, 0.7, 0.4, 0.4, 0.5]
#print list(it.chain(letters, booleans, decimals))
# print(*array, sep='')
print(*i... | Brandone123/Projet_RO | voyageur.py | voyageur.py | py | 2,121 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "itertools.chain",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "itertools.accumulate",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "itertools.combinations",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "itertools... |
43426776211 | ### 20190430
### resolute binvox to lower resolution
import os
import numpy as np
import binvox_rw
import argparse
import time
def log_error(error_log, f):
"""
log error to a file
:param error_log: path to error log. ends with ".txt"
:param f: obj file name
:return:
"""
with open(error_l... | yuqli/tools | resolute_binvox.py | resolute_binvox.py | py | 3,044 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "numpy.empty",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "numpy.sum",
"line_number": 47,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 58,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 58,
... |
27923297465 | from itertools import accumulate
from typing import AbstractSet
from .parse import coalesce, is_word, lower
from .types import Context, ContextualEdit, Edit
def _match(lhs: bool, existing: str, insertion: str) -> str:
existing, insertion = lower(existing), lower(insertion)
if lhs:
for match in revers... | solomankabir123/coq-nvim-test | coq/shared/trans.py | trans.py | py | 2,312 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "parse.lower",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "itertools.accumulate",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "itertools.accumulate",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "types.Edit",
... |
12446853216 | from flask import Flask, render_template, request, jsonify, g
from jinja_maker import save
app = Flask(__name__)
widget_list = [
"Frame",
"ComboBox",
"ScrollableFrame",
"Textbox",
"Button",
"Label",
"Entry",
"OptionMenu",
"SegmentedButton",
"Switch",
"CheckBox",
"RadioB... | tzebre/tkinter_grid_helper | app/app.py | app.py | py | 4,254 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "flask.Flask",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "flask.render_template",
"line_number": 113,
"usage_type": "call"
},
{
"api_name": "jinja_maker.save",
"line_number": 120,
"usage_type": "call"
},
{
"api_name": "flask.render_temp... |
73102629438 | # Django libs
from django.shortcuts import render
from django.conf import settings
from django.http import StreamingHttpResponse
#Libraries of ourselves
from .form import ImageForm
from .models import Image
from .camera import VideoCamera
from .constants import BASE_URL, MARKET, SA, SA_D, ST_D, HEADER
from .utilities ... | hp77-creator/TUNEX | web/tun/recognise/views.py | views.py | py | 4,360 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "logging.getLogger",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "django.shortcuts.render",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "models.Image",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "form.ImageForm... |
27342174069 | ## For mobile devices ##
from google.cloud import storage
import tensorflow as tf
from PIL import Image
import numpy as np
BUCKET = "boom155" ##google cloud bucket name
CLASS_NAMES = ["Early Blight","Late Blight","Healthy"]
model = None
def download_blob(bucket_name,source_blob_name,destination_file_nam... | vaasu202/Plant-Disease-Detection | gcp/main.py | main.py | py | 1,477 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "google.cloud.storage.Client",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "google.cloud.storage",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "tensorflow.keras.models.load_model",
"line_number": 28,
"usage_type": "call"
},
{
... |
31551378477 | from tqdm import tqdm
from autograd import grad, hessian, jacobian
from copy import copy
import autograd.numpy as np
from libs.operators import positive_definite
from libs.line_search import *
class QuasiNewton:
def __init__(self, func, initialX, interval=[-1e15, 1e15],... | olavosamp/CPE773_OtimConvexa | libs/quasi_newton.py | quasi_newton.py | py | 7,791 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "autograd.grad",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "autograd.hessian",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "autograd.numpy.ndim",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "autograd.numpy",
... |
20760736637 | import logging
import datetime
from pymodbus.client import ModbusTcpClient
from sqlalchemy import (
table,
column,
insert,
MetaData,
Integer,
DateTime,
Boolean,
Column,
String,
Table,
)
class ModbusException(Exception):
pass
def create_table(conn, table_name, schema: str... | Som-Energia/somenergia-plant-reader | plant_reader/modbus_reader.py | modbus_reader.py | py | 3,471 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "sqlalchemy.MetaData",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.Table",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.Column",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.Dat... |
26360810919 | import logging
from odoo import fields, models
_logger = logging.getLogger(__name__)
class AddressAssociateToAddressAux(models.TransientModel):
_description = 'Address Associate to Address (Aux)'
_name = 'clv.address.associate_to_address_aux'
def _default_address_ids(self):
return self._context... | CLVsol/clvsol_odoo_addons | clv_address_aux/wizard/address_associate_to_address_aux.py | address_associate_to_address_aux.py | py | 3,160 | python | en | code | 2 | github-code | 97 | [
{
"api_name": "logging.getLogger",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "odoo.models.TransientModel",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "odoo.models",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "odoo.field... |
274328834 | import abc
from prettytable import PrettyTable
class MonitorMixinBase(object):
"""
Base class for MonitorMixin. Each subclass will be a mixin for a particular
algorithm.
All arguments, variables, and methods in monitor mixin classes should be
prefixed with "mm" (to avoid collision with the classes they mi... | ianatpn/nupictest | nupic/research/monitor_mixin/monitor_mixin_base.py | monitor_mixin_base.py | py | 2,823 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "abc.ABCMeta",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "prettytable.PrettyTable",
"line_number": 53,
"usage_type": "call"
},
{
"api_name": "prettytable.PrettyTable",
"line_number": 74,
"usage_type": "call"
}
] |
432842497 | import numpy as np
import cv2
pic = np.zeros((500, 500, 3), dtype = 'uint8') # Crea una imagen 500x500 fondo negro de int 8
font = cv2.FONT_HERSHEY_COMPLEX
cv2.putText(pic, 'Angel', (100, 100), font, 3, (255,255,255), 4, cv2.LINE_8)
cv2.imshow('Dark', pic)
cv2.waitKey(0)
cv2.destroyAllWindows() | jvngarcia/python-computer-vision | text.py | text.py | py | 300 | python | es | code | 0 | github-code | 97 | [
{
"api_name": "numpy.zeros",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "cv2.FONT_HERSHEY_COMPLEX",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "cv2.putText",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "cv2.LINE_8",
"... |
39721691263 | #!/usr/bin/python3
# Ref: https://srome.github.io/Parsing-HTML-Tables-in-Python-with-BeautifulSoup-and-pandas/
from __future__ import absolute_import, division
import sys
import json
import os
from bs4 import BeautifulSoup, NavigableString
import pandas as pd
import requests
from tabulate import tabulate
from colle... | sksinghgit/covid19 | worldometer_scrapper.py | worldometer_scrapper.py | py | 7,459 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "logging.getLogger",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "logging.getLogger",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "time.strftime",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "time.gmtime",
"... |
28094002171 | from django.conf.urls import url,handler404
from promeds.views import menupage, subcategorypage, addtocartpage
from . import views
#import promeds.views
urlpatterns = [
url(r'^myprofile/$', views.ProfileView, name='profile'),
url(r'^edit/$', views.UserProfileFormView, name='profileedit'),
url(r'^home/$', vie... | vaashvi/first_blog | promeds/urls.py | urls.py | py | 2,193 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "django.conf.urls.url",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "django.conf.urls.url",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "django.conf.urls.url",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "django.... |
13247789990 | from flask import Flask, flash, redirect, render_template, request, url_for, flash
from flask_sqlalchemy import SQLAlchemy
from ProgramCreator import *
# from Conversions import *
from teams import *
app = Flask(__name__)
app.secret_key = "junge"
########################### DATABASES SETUP ###########################... | ucarlos114/RoboTrainer-VThacks | RoboTrainer.py | RoboTrainer.py | py | 6,664 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "flask.Flask",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "flask_sqlalchemy.SQLAlchemy",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "flask.redirect",
"line_number": 64,
"usage_type": "call"
},
{
"api_name": "flask.url_for",... |
651071402 | from gettext import gettext as _
from gi.repository import Gtk
class SettingsDialog(Gtk.Dialog):
SPACING = 5
def __init__(self, top_window):
Gtk.Dialog.__init__(self)
self.set_transient_for(top_window)
self.set_title(_("Settings"))
self.props.modal = True
notebook = ... | manuq/xsheet | settingsdialog.py | settingsdialog.py | py | 4,272 | python | en | code | 6 | github-code | 97 | [
{
"api_name": "gi.repository.Gtk.Dialog",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "gi.repository.Gtk",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "gi.repository.Gtk.Dialog.__init__",
"line_number": 10,
"usage_type": "call"
},
{
"a... |
5507134720 |
import datetime
AVERAGE_LIFESPAN = 80
SMOKER_PENALIZATION = 10
DRINKER_PENALIZATION = 10
SEDENTARY_PENALIZATION = 20
def print_with_underscores(message):
print(message)
print(len(message) * "-")
def ask_yes_or_not(message):
response = None
while response != "S" and response != "N":
respon... | RodrigoGamez/primerprograma | death_date.py | death_date.py | py | 1,069 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "datetime.datetime.strptime",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 29,
"usage_type": "attribute"
},
{
"api_name": "datetime.timedelta",
"line_number": 46,
"usage_type": "call"
}
] |
299698258 |
import subprocess
import os
import unicodedata
import json
import falcon
from datetime import date, datetime
from butterknife.pool import Subvol
class MyEncoder(json.JSONEncoder):
def default(self, obj):
if isinstance(obj, datetime):
return obj.strftime('%Y-%m-%dT%H:%M:%S.%f')[:-3] + "Z"
... | laurivosandi/butterknife | host/butterknife/api.py | api.py | py | 13,227 | python | en | code | 40 | github-code | 97 | [
{
"api_name": "json.JSONEncoder",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "datetime.datetime",
"line_number": 12,
"usage_type": "argument"
},
{
"api_name": "datetime.date",
"line_number": 14,
"usage_type": "argument"
},
{
"api_name": "butterk... |
44046022235 | """
@Author: Swapnil Bhoyar
@Date: 2021-06-30 19:00:00
@Last Modified By: Swapnil Bhoyar
@Last Modified Date: 2021-07-01 17:15:00
@Title: Write a Program to implement addressbook.
"""
import logging
import json
from json import JSONEncoder
class LoggerInfo:
logger = logging.Logger(__name__)
formatter = logging... | SwapnilBhoyar/PythonPrograms | ObjectOrientedPrograms/AddressBookProgram/AddressBook.py | AddressBook.py | py | 8,712 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "logging.Logger",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "logging.Formatter",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "logging.FileHandler",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "logging.basicCon... |
23558151108 | from collections import deque
from aiomysql import create_pool
from aiopyql.utilities import flatten, no_blanks, inner, TableColumn
from aiopyql.exceptions import InvalidColumnType
import json, time
row_return_type = tuple
TRANSLATION = {
'int': int,
'double': float,
'integer': int,
'text': str,
'... | codemation/aiopyql | aiopyql/mysql_connector.py | mysql_connector.py | py | 9,951 | python | en | code | 34 | github-code | 97 | [
{
"api_name": "aiomysql.create_pool",
"line_number": 55,
"usage_type": "call"
},
{
"api_name": "aiopyql.utilities.inner",
"line_number": 92,
"usage_type": "call"
},
{
"api_name": "aiopyql.exceptions.InvalidColumnType",
"line_number": 99,
"usage_type": "call"
},
{
... |
74037583040 | import matplotlib.pyplot as plt
import heartpy as hp
import numpy as np
from scipy.signal import resample
"""
Class: HeartRateHelper
Takes 1D data and returns appropriate data.
"""
class HeartRateHelper:
def __init__(self, framerate, filter=True, resample=-1, show=False, save_path=''):
self.show = show
self.fi... | danny13690/finger-heartrate | heartratehelper.py | heartratehelper.py | py | 1,455 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "scipy.signal.resample",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "matplotlib.pyplot.close",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 29,
"usage_type": "name"
},
{
"api_name": "matpl... |
7415633267 | import boto3
def create_sns_subscription(email):
sns = boto3.client('sns')
response = sns.subscribe(
TopicArn='arn:aws:sns:us-east-1:89898989898:task-memo-topic',
Protocol='email',
Endpoint=email
)
return response
def send_email(email, subject, body):
... | patrickn699/AWS | task-memo/modules/alert.py | alert.py | py | 573 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "boto3.client",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "boto3.client",
"line_number": 16,
"usage_type": "call"
}
] |
41657708426 | import requests
from bs4 import BeautifulSoup
class WebScraper:
def __init__(self):
self.data = list()
URL = 'https://www.esrl.noaa.gov/gmd/aggi/aggi.html' # The url to get info
page = requests.get(URL)
soup = BeautifulSoup(page.content, 'html.parser')
table = soup.findAll(... | sora5801/Lab3_v.1.0 | WebScraper.py | WebScraper.py | py | 635 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "requests.get",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 9,
"usage_type": "call"
}
] |
37221435743 | from source.checker import checker
from scipy import sqrt
from warnings import warn
## linearized bounds
def lbound(vp,klval):
"""
linearized bound that approximates the GO divergence when
the value of the KL divergence is small.
Arguments::
klval: the value of the KL divergence
vp: the corr... | kgourgou/concentration-information-bounds | source/explicit_bounds.py | explicit_bounds.py | py | 2,912 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "warnings.warn",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "warnings.warn",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "scipy.sqrt",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "scipy.sqrt",
"line_number"... |
37780910065 | #!/bin/python
import sys
import notify2
import subprocess
from time import sleep
def notification(message: str):
"""
Display notification to the desktop
Task:
1. show() -> it will generate a complete new pop
2. update() -> it will update the payload part of same notification pop-up, not is... | Himan10/notifywhenLOAD | notifyME.py | notifyME.py | py | 1,283 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "notify2.init",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "notify2.Notification",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "sys.argv",
"line_number": 27,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"line_... |
31268656784 | # %%
import os
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
from norm import read_norm_data, norm
import argparse
#%%
parser = argparse.ArgumentParser()
parser.add_argument("-p", "--path", type=str, default="output/default")
parser.add_argument("-g", "--gen", type=int, default=-1)
parser... | uvm-neurobotics-lab/MOVE | analysis.py | analysis.py | py | 2,417 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.path.exists",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 24,
"usage_type": "attribute"
},
{
"api_name": "os.system",
"... |
35263761350 | #!/usr/bin/env python3
# -*- coding:utf-8 -*-
from urllib.parse import urljoin
from bs4 import BeautifulSoup
from utils import req
from utils.tomongo import insert
from core.crawler import CrawlerBase
from utils.common import format_list
from utils.common import set_data_md5
class SpiderBase(CrawlerBase):
desc ... | supertyper/apt_spider | spider/spider_netlab360.py | spider_netlab360.py | py | 1,972 | python | en | code | 4 | github-code | 97 | [
{
"api_name": "core.crawler.CrawlerBase",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "utils.req.get",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "utils.req",
"line_number": 23,
"usage_type": "name"
},
{
"api_name": "bs4.BeautifulSoup",
... |
71624548159 | import fastText
import numpy as np
from gensim.models import KeyedVectors
from nltk.stem import PorterStemmer, LancasterStemmer, SnowballStemmer
PORTER_STEMMER = PorterStemmer()
LANCASTER_STEMMER = LancasterStemmer()
SNOWBALL_STEMMER = SnowballStemmer("english")
WORD_TRANSFORMERS = [
lambda x: x.lower(),
lam... | iezepov/combat-wombat-bias-in-toxicity | code/toxic/embeddings.py | embeddings.py | py | 2,251 | python | en | code | 88 | github-code | 97 | [
{
"api_name": "nltk.stem.PorterStemmer",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "nltk.stem.LancasterStemmer",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "nltk.stem.SnowballStemmer",
"line_number": 8,
"usage_type": "call"
},
{
"api_nam... |
34772136990 | # -*- coding: utf-8 -*-
"""
Created on Tue Dec 20 11:07:37 2022
@author: JGarciaP
"""
import streamlit as st
import pandas as pd
import numpy as np
import joblib
model_filename = 'rf_model.pkl'
loaded_model = joblib.load(model_filename)
print("Modelo Cargado")
st.title('Status Diabetes')
st.header(... | jaimegarcia2679/diabetes | diabetes.py | diabetes.py | py | 1,646 | python | es | code | 0 | github-code | 97 | [
{
"api_name": "joblib.load",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "streamlit.title",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "streamlit.header",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "streamlit.subheader",
... |
21230588263 | from __future__ import division
from django.db import models
from pixelpuncher.item.models import ItemType
from pixelpuncher.player.models import GENDER, AvatarLayer, Player
TRIGGER_TYPE = (
("ASK", "Ask about",),
("TELL", "Tell about",),
("ACK", "Acknowledge",),
("GRT", "Greeting")
)
RESPONSE_HANDL... | ej2/pixelpuncher | pixelpuncher/npc/models.py | models.py | py | 4,732 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "django.db.models.Model",
"line_number": 57,
"usage_type": "attribute"
},
{
"api_name": "django.db.models",
"line_number": 57,
"usage_type": "name"
},
{
"api_name": "django.db.models.CharField",
"line_number": 58,
"usage_type": "call"
},
{
"api_name"... |
1828392979 | import os
import pandas as pd
from nltk.sentiment import SentimentIntensityAnalyzer
from textblob import TextBlob
# Define the path to the input CSV file
input_file = 'Full Comments.csv'
# Create a folder for the sentiment analysis results
output_folder = 'Sentiment Analysis'
if not os.path.exists(output_fo... | adithya5777/YT_CommentsSentimentAnalysis | testing.py | testing.py | py | 3,449 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "os.path.exists",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "os.makedirs",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_n... |
11276372297 | import sys
from django.apps import apps as django_apps
from django.conf import settings
from django.core.exceptions import ObjectDoesNotExist
from django.db.utils import OperationalError, ProgrammingError
from .get_sites_module import get_sites_module
from .single_site import SiteDomainRequiredError
class InvalidSi... | frdrckaman/edcs | edcs_sites/add_or_update_django_sites.py | add_or_update_django_sites.py | py | 2,873 | python | en | code | 2 | github-code | 97 | [
{
"api_name": "sys.stdout.write",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "sys.stdout",
"line_number": 29,
"usage_type": "attribute"
},
{
"api_name": "django.apps.apps",
"line_number": 30,
"usage_type": "name"
},
{
"api_name": "get_sites_module.ge... |
42745019957 | from __future__ import with_statement
PKG = 'runtime_monitor'
import roslib
roslib.load_manifest(PKG)
import sys
import rospy
from diagnostic_msgs.msg import DiagnosticArray, DiagnosticStatus, KeyValue
import wx
from wx import xrc
from wx import html
import threading, time
import cStringIO
import copy
class Tree... | dbking77/diagnostics_monitors | runtime_monitor/src/runtime_monitor/monitor_panel.py | monitor_panel.py | py | 11,247 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "roslib.load_manifest",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "wx.Panel",
"line_number": 32,
"usage_type": "attribute"
},
{
"api_name": "wx.Panel.__init__",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "wx.Panel",
"l... |
9207907605 | # Python OOP
from calendar import weekday
from hashlib import new
import datetime
import time
from numpy import ix_
import terminal_formatting as tf
class Employee: # Class
numb = 0 # Class variable
raise_amount = 1.04 # Class variable
def __init__(self,first,last,pay): ... | DaltonKipp/personal-repo | python/python_oop_example.py | python_oop_example.py | py | 7,872 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "datetime.date",
"line_number": 82,
"usage_type": "call"
},
{
"api_name": "terminal_formatting.dl",
"line_number": 84,
"usage_type": "call"
},
{
"api_name": "terminal_formatting.g",
"line_number": 108,
"usage_type": "call"
},
{
"api_name": "terminal_... |
7998300719 | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
__author__ = "NeMuX"
__copyright__ = "Copyright 2014"
__credits__ = ["NeMuX"]
__license__ = "GPL"
__version__ = "0.1"
__maintainer__ = "NeMuX"
__email__ = "jaraujo@globalcybersec.com"
__status__ = "Development"
import sys
import csv
import sqlite3
def cargar_vulnerabilida... | nemux/AVAAR | Grouper/GROUPER/GROUPER-GCS/vuln_loader.py | vuln_loader.py | py | 3,185 | python | es | code | 0 | github-code | 97 | [
{
"api_name": "sqlite3.connect",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "csv.reader",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "sys.argv",
"line_number": 68,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"line_number"... |
733423098 | from django.conf.urls import url,include
from django.contrib import admin
from twapp import views
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^accounts/', include('allauth.urls')),
url(r'^about/',views.about_page),
url(r'^$',views.main_page),
url(r'^tweets/',views.twitter_page),
url... | nikhilkumarsingh/whatsupsite | mysite1/urls.py | urls.py | py | 480 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "django.conf.urls.url",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "django.contrib.admin.site",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "django.contrib.admin",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": ... |
73930097919 | '''
Created on 20 Nov 2010
@author: jdrumgoole
'''
import os
import stat
import logging
from itertools import izip
from enum import Enum
from filetools.checksum import Checksum
from basetools.feedback import SimpleFeedback
def normalisePath( p ):
return os.path.normpath( os.path.normcase( p ))... | jdrumgoole/dejooper | filetools/fileutils.py | fileutils.py | py | 12,982 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "os.path.normpath",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "os.path.normcase",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "os.path.split",
"l... |
18907740940 | """mysite URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/4.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based ... | ArnasGvidas/BugReport | mysite/mysite/urls.py | urls.py | py | 1,282 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "django.urls.path",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "checkbug.views.validatelogin",
"line_number": 20,
"usage_type": "argument"
},
{
"api_name": "django.urls.path",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "ch... |
29541921578 | from setuptools import setup, find_packages
from bibtextools import __version__, __author__, __email__
with open("README.md") as rm:
long_desc = rm.read()
#with open("requirements.txt") as req:
# requirements = req.read().splitlines()
setup(
name = "bibtextools",
version = __version__,
author = _... | klb2/bibtex-tools | setup.py | setup.py | py | 1,083 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "setuptools.setup",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "bibtextools.__version__",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "bibtextools.__author__",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "bibte... |
26212129281 | """Racemate URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.1/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-base... | przemyslawkulak/Racemate-aplikacja-biegowa | Racemate/urls.py | urls.py | py | 4,878 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "rest_framework.routers.DefaultRouter",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "rest_framework.routers",
"line_number": 35,
"usage_type": "name"
},
{
"api_name": "api.views.MyUserViewSet",
"line_number": 37,
"usage_type": "argument"
},
... |
35527357138 | import os
import sys
from flask import Flask, jsonify, request, abort, send_file
from dotenv import load_dotenv
from linebot import LineBotApi, WebhookParser
from linebot.exceptions import InvalidSignatureError
from linebot.models import MessageEvent, TextMessage, TextSendMessage, TemplateSendMessage, ButtonsTemplate,... | mchsiao/ToC_Chatbot | app.py | app.py | py | 11,583 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "dotenv.load_dotenv",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "fsm.TocMachine",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "flask.Flask",
"line_number": 153,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_... |
10314102804 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Extrae las lineas de texto como imágenes de un archivo HDF5 generado por el paquete
calamardo y ejecuta el Tesseract sobre ellas, generando una transcripción que
a su vez es almacenada en el HDF5
@author: nacho
"""
#
# paquetes base de Python3 (ya vienen con Python)
#
... | nacho-pancho/luisa-apps | scores/code/correr_tesseract_lineas.py | correr_tesseract_lineas.py | py | 4,556 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "skimage.io.imsave",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "skimage.io",
"line_number": 31,
"usage_type": "name"
},
{
"api_name": "os.path.join",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number"... |
39121821297 | #everyone but freshman
import glob
import pandas as pd
import os
import matplotlib.pyplot as plt
import numpy as np
import seaborn as sns
from scipy import stats
from scipy.stats import f_oneway
from scipy.stats import tukey_hsd
import csv
from scikit_posthocs import posthoc_tukey
from statannotations.Annotator import ... | felix-ab/box_plotting | by_grade_2022_hrv.py | by_grade_2022_hrv.py | py | 15,822 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "pandas.read_excel",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "pandas.read_excel",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 46,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplo... |
42207235124 | from django.contrib import messages
from django.contrib.auth import logout
from django.http import HttpResponseRedirect
from apps.core.defs import is_valid_user
from bluedata.helpers import reverse_url
# Seta o contexto do List
#
def set_context_list(context, self):
# Variables
url = self.base_url
title ... | joaotrevisan/bluedata.framework | defs.py | defs.py | py | 4,549 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "bluedata.helpers.reverse_url",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "bluedata.helpers.reverse_url",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "bluedata.helpers.reverse_url",
"line_number": 52,
"usage_type": "call"
},
{... |
5501501897 | import urwid
import pyfiglet
import PieceRenderer
import generalFunctions
import fenReader
class BoardDrawer:
def __init__(self):
self.pieceTextWidgets = []
self.letterTextWidgets = []
self.numberTextWidgets = []
self.pieceRenderer = PieceRenderer.PieceRenderer(16, 7)
# Cre... | sigurdo/fancySjakk | BoardDrawer.py | BoardDrawer.py | py | 2,292 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "PieceRenderer.PieceRenderer",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "urwid.Text",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "pyfiglet.Figlet",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "urwid.Text",
... |
36958020234 | import curses
class MainScreen(object):
def __init__(self, width, height, EM):
# height+1 because you cannot write to the bottom-right-most
# spot of a pad/window, this is a workaround
self.__scr = curses.newpad(height+1, width)
#self.__EM = EM
self.__coords = (0,0)
self.__size = (width, height)
def up... | LittleCoffeeTables/kdenSteve | main_screen.py | main_screen.py | py | 1,977 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "curses.newpad",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "curses.COLOR_WHITE",
"line_number": 34,
"usage_type": "attribute"
},
{
"api_name": "curses.COLOR_CYAN",
"line_number": 35,
"usage_type": "attribute"
},
{
"api_name": "curses.CO... |
44243809951 | import os
import signal
import subprocess
import sys
import time
import timeit
import logging
import platform
from textwrap import indent, shorten
from maple_test.configs import construct_logger, get_val
from maple_test.utils import PASS, FAIL, UNRESOLVED, NOT_RUN, ENCODING
from maple_test.utils import add_run_path
... | himself65/OpenArkCompiler | test/maple_test/run.py | run.py | py | 5,902 | python | en | code | 687 | github-code | 97 | [
{
"api_name": "maple_test.utils.add_run_path",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "subprocess.Popen",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "subprocess.PIPE",
"line_number": 29,
"usage_type": "attribute"
},
{
"api_name": "s... |
35693101484 | from django.core.management.base import BaseCommand
from ideascube.search.utils import create_index_table
from ideascube.search.models import SEARCHABLE
class Command(BaseCommand):
help = 'Reindex all the searchable objects'
def handle(self, *args, **kwargs):
create_index_table()
for model i... | grouan/ideascube | ideascube/search/management/commands/reindex.py | reindex.py | py | 614 | python | en | code | null | github-code | 97 | [
{
"api_name": "django.core.management.base.BaseCommand",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "ideascube.search.utils.create_index_table",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "ideascube.search.models.SEARCHABLE.values",
"line_number": 1... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.