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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
28607227640 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Aug 22 11:13:04 2019
@author: sammirc
"""
import numpy as np
import scipy as sp
import pandas as pd
import mne
from copy import deepcopy
import os
import os.path as op
import sys
from matplotlib import pyplot as plt
#sys.path.insert(0, '/Users/sammi/De... | schekroud/wmconfidence_eeg | analysis_scripts/py/06_WMC_ArrayLocked_VisAnalyse_GLMResults.py | 06_WMC_ArrayLocked_VisAnalyse_GLMResults.py | py | 8,888 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "sys.path.insert",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "sys.path.insert",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_nu... |
36980342219 | from flask import Flask
myobj = Flask(__name__)
name = 'Aaron'
city_names = ['Paris', 'London', 'Rome', 'Tahiti']
@myobj.route("/")
def home():
output_str = f"""
<html>
<head>
<title>CMPE 131 HW 3</title>
</head>
<body>
<h1>Welcome {name}!</h1>
<a href="www.google.com">not... | MrTwist64/CMPE131-HW3 | home.py | home.py | py | 522 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "flask.Flask",
"line_number": 3,
"usage_type": "call"
}
] |
43393070880 | from django.core.management.base import BaseCommand
from mainapp.models import Article
class Command(BaseCommand):
help = 'Create users for testing'
def add_arguments(self, parser):
parser.add_argument('count', type=int)
def handle(self, *args, **options):
Article.objects.all().delete()... | Maxsar-S/Rest-Api | mainapp/management/commands/articles_create.py | articles_create.py | py | 612 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "django.core.management.base.BaseCommand",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "mainapp.models.Article.objects.all",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "mainapp.models.Article.objects",
"line_number": 13,
"usage_type... |
3770105248 | import jieba
f_name = 'info.txt'
with open(f_name, encoding='utf-8') as a:
b = a.read()
words = jieba.lcut(b)
count = {}
for word in words:
if len(word) < 2:
continue
else:
count[word] = count.get(word, 0) + 1
list1 = list(count.items())
list1.sort(key=lambda x: x[1], reverse=True)
fo... | Eason38467/Allinone | read_file.py | read_file.py | py | 425 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "jieba.lcut",
"line_number": 8,
"usage_type": "call"
}
] |
69814484534 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Testing users endpoints of adminv5 API."""
import logging
# import json
def test_find_all(request_helper, base_url):
"""Test find all users on admin API v5"""
query_url = '{baseUrl}/users'.format_map({
'baseUrl': base_url
})
users = request_he... | linagora/linshare-core-tests | linshare_core_tests/admin/v5/test_users.py | test_users.py | py | 1,466 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "logging.getLogger",
"line_number": 16,
"usage_type": "call"
}
] |
5439869122 | import os
import torch
from collections import Counter
class Dictionary(object):
def __init__(self):
self.word2idx = {}
self.idx2word = []
self.counter = Counter()
self.total = 0
def add_word(self, word):
if word not in self.word2idx:
self.idx2word.append(... | samiraabnar/awd-lstm-lm | data.py | data.py | py | 3,057 | python | en | code | null | github-code | 21 | [
{
"api_name": "collections.Counter",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 30,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"lin... |
22479924201 | from django.db import models
from app_overview.models import Printer_Ribbon
from app_printers.models import Printers
class RibbonUsageRecord(models.Model):
STATUS = (
('E', 'Empty'),
('A', 'Active'),
)
ribbon_number = models.IntegerField(
"Ribbon No.",
unique=True
)
... | mldvc/lazy-card | app_ribbons/models.py | models.py | py | 1,002 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "django.db.models.Model",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "django.db.models",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "django.db.models.IntegerField",
"line_number": 12,
"usage_type": "call"
},
{
"api_name... |
73029423733 | import cvxpy.settings as s
import cvxpy.interface as intf
import cvxpy.lin_ops.lin_utils as lu
import cvxpy.lin_ops as lo
from cvxpy.constraints import SOC, SDP, ExpCone, BoolConstr, IntConstr
from toolz.itertoolz import unique
from collections import OrderedDict
import canonInterface
class SymData(object):
"""Th... | LiuFang816/SALSTM_py_data | python/cvxgrp_cvxpy/cvxpy-master/cvxpy/problems/problem_data/sym_data.py | sym_data.py | py | 7,350 | python | en | code | 9 | github-code | 21 | [
{
"api_name": "cvxpy.settings.EQ",
"line_number": 41,
"usage_type": "attribute"
},
{
"api_name": "cvxpy.settings",
"line_number": 41,
"usage_type": "name"
},
{
"api_name": "cvxpy.settings.LEQ",
"line_number": 41,
"usage_type": "attribute"
},
{
"api_name": "cvxpy.s... |
36347433727 | from collections import namedtuple
Property = namedtuple('Property', ['name', 'value', 'expression', 'unit', 'comment'])
def create_property(app, prefix, name, value,
expression=None, unit='cm', comment=''):
expr = expression if expression else str(value)
design = app.activeProduct
pa... | snelweg/TabGen | core/managers/createproperty.py | createproperty.py | py | 593 | python | en | code | null | github-code | 21 | [
{
"api_name": "collections.namedtuple",
"line_number": 3,
"usage_type": "call"
}
] |
7564732310 | import requests
import login as login
import botschutz as botschutz
import planetenListe as planiListe
# from Util import findeKolonisierbarePlanetenMitPunkten as findKoloPlanis
from bs4 import BeautifulSoup
from keep_alive import keep_alive
print("los gehts")
keep_alive()
# Login
sid = login.doLogin()
galaxy = 1
pla... | mitch1985/mitch | ressourcenCheck.py | ressourcenCheck.py | py | 1,112 | python | de | code | 0 | github-code | 21 | [
{
"api_name": "keep_alive.keep_alive",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "login.doLogin",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "planetenListe.allePlanetenIndex",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "r... |
3502888892 | import pyrebase
import ast
import os
from utils import *
from calculations import calculateTIMD
TOTAL_AVERAGE_DATA_FIELDS = {
'avgCellsScoredTele': 'cellsScoredTeleop',
'avgCellsScoredAuto': 'cellsScoredAuto',
'avgCellsScoredHigh': 'cellsScoredHighTeleop',
'avgCellsScoredLow': 'cellsScoredLowTeleop',... | Team-2502/ScoutingServer2020 | calculations/calculateTeam.py | calculateTeam.py | py | 7,228 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "pyrebase.initialize_app",
"line_number": 57,
"usage_type": "call"
},
{
"api_name": "ast.literal_eval",
"line_number": 57,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 57,
"usage_type": "attribute"
},
{
"api_name": "calculations... |
6219059726 | """
This example is a trivial box that must superimpose one of its corner to a marker at the beginning of the movement
and superimpose the same corner to a different marker at the end.
It is designed to show how one can define its own custom dynamics function if the provided ones are not
sufficient.
More specifically ... | Sina-Mehdiz/Bioptim | examples/getting_started/custom_dynamics.py | custom_dynamics.py | py | 4,891 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "typing.Union",
"line_number": 34,
"usage_type": "name"
},
{
"api_name": "casadi.MX",
"line_number": 34,
"usage_type": "name"
},
{
"api_name": "casadi.SX",
"line_number": 34,
"usage_type": "name"
},
{
"api_name": "bioptim.NonLinearProgram",
"line... |
9879523047 | import scipy.io.wavfile
import numpy as np
import matplotlib.pyplot as plt
OUT="graphs"
_, x = scipy.io.wavfile.read("AEIOU.wav")
arr = x[:,0]
groups = []
for i in range(0, len(arr), (len(arr) // 100) // 2):
if i + len(arr)//100 >= len(arr):
continue
groups += [arr[i : i + len(arr)//100 + 1]]
fft_out... | mihai145/laborator_ps | lab_4/ex_6.py | ex_6.py | py | 741 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "scipy.io.wavfile.io.wavfile.read",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "scipy.io.wavfile.io",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "scipy.io.wavfile",
"line_number": 6,
"usage_type": "name"
},
{
"api_name"... |
28271018164 | from django.shortcuts import render
from django.http.response import HttpResponseRedirect
from django.urls import reverse
from .models import Artikel, ArtikelChosen
from .forms import SizeForm
# Create your views here.
def index(request):
return render(request, "klamotten/index.html", {
"artic... | sgluecker/tus-shop | klamotten/views.py | views.py | py | 1,088 | python | de | code | 0 | github-code | 21 | [
{
"api_name": "django.shortcuts.render",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "models.Artikel.objects.all",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "models.Artikel.objects",
"line_number": 12,
"usage_type": "attribute"
},
{
"ap... |
71670858613 | import torch
import torch.nn as nn
from attention import Attention
if torch.backends.mps.is_available():
mps_device = torch.device("mps")
class Decoder(nn.Module):
def __init__(self, vocabulary_size, encoder_dim, tf=False, ado=False):
super(Decoder, self).__init__()
self.use_tf = tf
s... | yvokeller/Show-Attend-and-Tell | decoder.py | decoder.py | py | 8,067 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "torch.backends.mps.is_available",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "torch.backends",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "torch.device",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "torch.n... |
39580240757 | import datetime
def timestamp_to_YYYYMMDD_HHMMSS(epoch):
return datetime.datetime.utcfromtimestamp(int(epoch)).strftime("%Y-%m-%d %H:%M:%S")
MONTH_STR_TO_INT = {
"Jan": "01",
"Feb": "02",
"Mar": "03",
"Apr": "04",
"May": "05",
"Jun": "06",
"Jul": "07",
"Aug": "08",
"Sep": "09... | abiwardani/tugas-3-if4044 | src/utils/date.py | date.py | py | 1,561 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "datetime.datetime.utcfromtimestamp",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "datetime.datetime.strptime",
"line_number": 60,
"usage_type": "call"
},
{
... |
29744842267 | import json
import datetime
from flask import Blueprint, render_template, g, session
from bson.objectid import ObjectId
from views.auth import requires_sso
corp = Blueprint("corp", __name__, template_folder="templates")
@corp.route("/")
@requires_sso("corporation")
def home():
with open("configs/base.json", "r... | tritanium-industries/TITDev | views/corp.py | corp.py | py | 2,663 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "flask.Blueprint",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "json.load",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "flask.g.mongo.db.users.find",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "flask.g.mongo",
... |
751346983 | import sqlite3
import pandas as pd
from nltk.tokenize import sent_tokenize, word_tokenize
from nltk.corpus import stopwords
from nltk.tokenize import RegexpTokenizer
if __name__ == '__main__':
# Create your connection.
con = sqlite3.connect('KIATextInfo.db')
cursor = con.cursor()
cursor.execute("SELECT name FR... | weihuacern/KiaChatBotCarlabs | TestScripts/sqlite3pandasTest.py | sqlite3pandasTest.py | py | 1,025 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "sqlite3.connect",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "pandas.read_sql_query",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "nltk.tokenize.RegexpTokenizer",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "nl... |
73028064373 | # -*- coding: utf-8 -*-
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
... | LiuFang816/SALSTM_py_data | python/apache_incubator-airflow/incubator-airflow-master/tests/operators/sensors.py | sensors.py | py | 5,968 | python | en | code | 9 | github-code | 21 | [
{
"api_name": "airflow.configuration.load_test_config",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "airflow.configuration",
"line_number": 30,
"usage_type": "name"
},
{
"api_name": "datetime.datetime",
"line_number": 32,
"usage_type": "call"
},
{
"ap... |
72675071733 | import os
import torch
from loss import SimpleLossCompute, SimpleLossCompute_tst, Batch_Loss, Test_Loss
from pgportfolio.marketdata.datamatrices import DataMatrices
from pgportfolio.tools.configprocess import parse_time
from rat.rat import make_model
# import matplotlib.pyplot as plt
# import seaborn
# seab... | AbigalChulchill/RAT | main.py | main.py | py | 6,990 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "os.environ",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "argparse.ArgumentParser",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "pgportfolio.tools.configprocess.parse_time",
"line_number": 82,
"usage_type": "call"
},
{
... |
25805875085 | import asyncio
import unittest
from slixmpp import JID
from slixmpp.test.integration import SlixIntegration
class TestUserAvatar(SlixIntegration):
async def asyncSetUp(self):
await super().asyncSetUp()
self.add_client(
self.envjid('CI_ACCOUNT1'),
self.envstr('CI_ACCOUNT1_PA... | poezio/slixmpp | itests/test_user_avatar.py | test_user_avatar.py | py | 2,127 | python | en | code | 108 | github-code | 21 | [
{
"api_name": "slixmpp.test.integration.SlixIntegration",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "asyncio.gather",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "asyncio.gather",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": ... |
10801555514 | """web URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.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-b... | rubinstory/auction | web/web/urls.py | urls.py | py | 3,493 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "django.urls.path",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "django.contrib.admin.site",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "django.contrib.admin",
"line_number": 23,
"usage_type": "name"
},
{
"api_name": "... |
9427266881 | # Import the necessary forms module from Django
from django import forms
# Create a custom form named PredictionForm, which inherits from the Django's base Form class
# Define choices for the 'RM' field, these will be displayed as options in a dropdown menu
class PredictionForm(forms.Form):
RM_choices = (
... | josneto/Django_force_maximale | Force/forms.py | forms.py | py | 1,450 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "django.forms.Form",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "django.forms",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "django.forms.FloatField",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "django.form... |
70430654134 | import os
import torch
import shlex
import random
import subprocess
import numpy as np
import torch.distributed as dist
def tprint(*args):
"""Temporarily prints things on the screen"""
print("\r", end="")
print(*args, end="")
def pprint(*args):
"""Permanently prints things on the screen"""
print... | carolinahiguera/NCF-Policy | NCF_policies/algo2/utils/misc.py | misc.py | py | 3,711 | python | en | code | 9 | github-code | 21 | [
{
"api_name": "subprocess.check_output",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "shlex.split",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "subprocess.check_output",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "shlex.spl... |
12340394316 | import time
import pyautogui
from cicauto.controller import cicauto
from cicauto.strategy import MainWorkshopStrat, EventWorkshopStrat
def position_finder(rel=False, offset=None):
print('Press Ctrl-C to quit.')
offset_x, offset_y = 0, 0
if rel:
offset_x, offset_y = offset[0], offset[1]
try:... | vonpawn/cicauto | main.py | main.py | py | 1,319 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "pyautogui.position",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "pyautogui.FAILSAFE",
"line_number": 38,
"usage_type": "attribute"
},
{
"api_name": "cicauto.strategy.MainWorkshopStrat",
"line_number": 39,
"usage_type": "call"
},
{
"api... |
14575197718 | import Repository
from Git.Git_class import Git
from Git.services import is_branch_synchronized_in_multiple_repos, synchronize_branch_in_multiple_repos, \
create_branch_multiple_repos
import utils
def check_diff_and_synchronize():
while True:
ret_dict = is_branch_synchronized_in_multiple_re... | pasztorb71/scripts | Berci/scripts/Git/check_diff_and_synchronize.py | check_diff_and_synchronize.py | py | 980 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "Git.services.is_branch_synchronized_in_multiple_repos",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "utils.print_sql_result",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "Git.services.synchronize_branch_in_multiple_repos",
"line_number... |
86745517130 | from collections import deque
def solution(s,e):
answer = 0
ch = [0]*10001
Q = deque()
Q.append(s)
ch[s]=1
L=0
while(Q):
length = len(Q)
for _ in range(length):
v = Q.popleft()
for nv in [v-1, v+1, v+5]:
Q.append(nv)
if ... | STkangyh/VacationAlgorithmClass | 5/송아지찾기.py | 송아지찾기.py | py | 550 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "collections.deque",
"line_number": 5,
"usage_type": "call"
}
] |
18288067707 | # from commandChanVim import urwidView
from terminus_browser import urwidView
from commands.system_commands import systemCommands
from frames.reddit.index_frame import RedditIndexFrame
from frames.fchan.index_frame import IndexFrame as fchanIndexFrame
from frames.lchan.index_frame import IndexFrame as lchanIndexFrame
f... | wtheisen/TerminusBrowser | tests/commands/test_system_commands.py | test_system_commands.py | py | 4,280 | python | en | code | 121 | github-code | 21 | [
{
"api_name": "terminus_browser.urwidView",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "pytest.fixture",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "pytest.fixture",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "command... |
24109711901 | import json
import math
import requests
def fda_url(query, database="event", count=False, field_count='', limit=1000):
api_key = '&api_key=WuFW3nIY42Jq1SR9STTbDlQOfYNORGfeHsk5FFU9'
base_url = f'https://api.fda.gov/device/{database}.json?{api_key}&search='
if count:
url = f'{base_url}{quer... | KhalilAMARDJIA/open_FDA | general_openFDA.py | general_openFDA.py | py | 1,800 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "requests.get",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "math.ceil",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number":... |
38799277176 | # Python3
import requests,sqlite3
def get_info(quote):
try:
x = requests.get("https://web.tmxmoney.com/quote.php?qm_symbol=%s&local=EN" % (quote)).content
companyname = str(x.split(b'<div class="quote-name">')[1].split(b'<h2>')[1].split(b'</h2>')[0].decode())
price = float(x.split(b'<div cl... | attackgithub/stocks-api | tsx.py | tsx.py | py | 1,997 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "requests.get",
"line_number": 6,
"usage_type": "call"
}
] |
36066468517 | from plone.dexterity.content import Container, Item
from plone.dexterity.utils import createContentInContainer
from plone.uuid.interfaces import IUUID
from zope.interface import implements
from zope.container.interfaces import IContainerModifiedEvent
from uu.formlibrary.measure.interfaces import IMeasureGroup
from in... | mostscript/uu.chart | uu/chart/styles.py | styles.py | py | 3,145 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "plone.dexterity.content.Container",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "zope.interface.implements",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "interfaces.IChartStyleBook",
"line_number": 19,
"usage_type": "argument"
},... |
37666693202 | """
This is a script calls the tedor_ideal function from tedor_ideal_spinev to run a defined SpinEvolution
simulation and outputs a plot. tedor_ideal also applies phenomenological corrections for t2 relaxation
and scaling (a), along with 13C-13C J coupling if desired.
tedor_ideal uses templates/tedor_ideal_template fo... | kmmccoy/ZFTEDOR_fitting | spinev_tedor_sim.py | spinev_tedor_sim.py | py | 4,203 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 47,
"usage_type": "call"
},
{
"api_name": "tedor_bessel_approx.coupling_strength",
"line_number": 79,
"usage_type": "call"
},
{
"api_nam... |
27158678951 | import msgpack
import re
class InvalidNNOIRData(Exception):
def __init__(self, message):
self.message = message
class NNOIR():
def __init__(self, name, generator_name, generator_version, inputs, outputs, values, functions):
cident = re.compile(rb'^[_A-Za-z][_0-9A-Za-z]*$')
c_keywor... | lflyme/nnoir | nnoir/nnoir/nnoir.py | nnoir.py | py | 3,159 | python | en | code | null | github-code | 21 | [
{
"api_name": "re.compile",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "re.compile",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "msgpack.packb",
"line_number": 67,
"usage_type": "call"
}
] |
9626372435 | #! /usr/bin/python3
import argparse
import plistlib
def byteStringProcessor(_bytes):
print("{ length = ", end="")
length = len(_bytes)
print(length, end=" ")
if length < 32:
print("bytes = 0x", end="")
print(_bytes.hex())
else:
record = _bytes.hex()
print("bytes = ... | zathizh/plutil | plutil.py | plutil.py | py | 1,224 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "plistlib.load",
"line_number": 44,
"usage_type": "call"
}
] |
28364438997 | import requests
from lxml import html
import bs4 as bs
import urllib.request
def main():
url = "http://www.bloomberg.com/quote/SPX:IND"
url2 = "https://pythonprogramming.net/parsememcparseface/"
url3 = "http://www.unc.edu/~mnbr/comp101/extra2/"
url4 = "https://learn.illinois.edu/"
source = url... | WassajaGang/Web-Scraping_Authentication | Basic-Scraping.py | Basic-Scraping.py | py | 640 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "urllib.request.request.urlopen",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "urllib.request.request",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "urllib.request",
"line_number": 12,
"usage_type": "name"
},
{
"api_nam... |
24263574345 | import xmltodict,os
from PIL import Image
path = "/home/qinjianbo/DATA/od_specs/大胡笳_0.xml"
path_specs_p = "/home/qinjianbo/DATA/specs/positive/"
path_specs_n = "/home/qinjianbo/DATA/specs/negetive/"
path_od_specs = "/home/qinjianbo/DATA/od_specs/"
def parse_xml(path):
data_str = open(path).read()
data_dict =... | airqj/od_specs | split_spec.py | split_spec.py | py | 1,976 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "xmltodict.parse",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "PIL.Image.open",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "PIL.Image",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "os.listdir",
"line_numbe... |
7800884728 | import gzip
import tornado.options
import tornado.ioloop
import ztreamy
import ztreamy.client as client
import ztreamy.events as events
import ztreamy.logger as logger
from ztreamy.tools import utils
from ztreamy.tools.bayeux import BayeuxEventPublisher
from ztreamy import split_url
class RelayScheduler(utils.EventSc... | jfisteus/ztreamy | ztreamy/tools/replay.py | replay.py | py | 5,466 | python | en | code | 4 | github-code | 21 | [
{
"api_name": "ztreamy.tools.utils.EventScheduler",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "ztreamy.tools.utils",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "gzip.GzipFile",
"line_number": 28,
"usage_type": "call"
},
{
"api_nam... |
17313391933 |
from rest_framework.serializers import *
from rest_framework import serializers
from apps.users.models import documentos
class SerializerExportDataToCSV(serializers.Serializer):
documento = serializers.CharField(allow_null=False, required=True)
comentario = serializers.CharField(required=False, default... | ManuelCL-jml/Polipay-Backup | apps/transaction/api/web/serializers/serializers_transaction_export_file.py | serializers_transaction_export_file.py | py | 1,633 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "rest_framework.serializers.Serializer",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "rest_framework.serializers",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "rest_framework.serializers.CharField",
"line_number": 11,
"usage_type... |
34832288537 | import imp
from django.db import models
from Doctors.models import DoctorDetails
# Create your models here.
class PatientDetails(models.Model):
patient_id = models.AutoField(primary_key=True)
patient_name = models.CharField(max_length=100, null=False)
patient_age = models.IntegerField(null=False)
patie... | Sritej26/SHS | Patients/models.py | models.py | py | 822 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "django.db.models.Model",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "django.db.models",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "django.db.models.AutoField",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "... |
21176333975 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from datetime import datetime
import aiohttp
import discord
from discord.ext import commands
import settings
image_files = ['.ras', '.xwd', '.bmp', '.jpe', '.jpg', '.jpeg', '.xpm', '.ief', '.pbm', '.tif', '.gif',
'.ppm', '.xbm', '.tiff', '.rgb', '.pgm', '... | Mehvix/synapsbot-rw | reddit.py | reddit.py | py | 3,855 | python | en | code | 7 | github-code | 21 | [
{
"api_name": "discord.ext.commands.Cog",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "discord.ext.commands",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "discord.ext.commands.Bot",
"line_number": 17,
"usage_type": "call"
},
{
"api_n... |
34319579917 | from nltk.lm.preprocessing import flatten, pad_both_ends
text_init = ["Chinese people like food", "people like dogs", "dogs like people and food"]
# bigram
text = [i for i in text_init if i != ""]
preprocessed = [pad_both_ends(s.split(' '), n=2) for s in text]
tokens = list(flatten(preprocessed)) # flatten list of ... | haroldsnyers/microCourses | WordPrediction/Mission2-3/Mission3.py | Mission3.py | py | 769 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "nltk.lm.preprocessing.pad_both_ends",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "nltk.lm.preprocessing.flatten",
"line_number": 9,
"usage_type": "call"
}
] |
3026527380 | import os
import torch
import numpy as np
from tasks.tennis.solutions.utils import get_simulator
from tasks.tennis.solutions.maddpg.train_maddpg import get_solution_brain_set, MAX_T, SOLUTIONS_CHECKPOINT_DIR
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
SAVED_AGENT_0_ACTOR_FP = os.path.join(... | lajd/Udacity-Deep-Reinforcement-Learning | tasks/tennis/solutions/maddpg/eval_maddpg.py | eval_maddpg.py | py | 1,103 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "torch.device",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "torch.cuda.is_available",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "torch.cuda",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
... |
19490804187 | from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOCUMENTATION = r'''
---
module: aws_cloudformation_stack_instance
version_added: 1.0.0
short_description: Manage the deployment of CloudFormation stackset instance(s)
description:
- Creates/updates/deletes AWS CloudFormation ... | harisfauzi/ansible_aws_cloudformation_stack_set | aws_cloudformation_stack_set_instance.py | aws_cloudformation_stack_set_instance.py | py | 32,776 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "ansible.module_utils.ec2.AWSRetry.exponential_backoff",
"line_number": 296,
"usage_type": "call"
},
{
"api_name": "ansible.module_utils.ec2.AWSRetry",
"line_number": 296,
"usage_type": "name"
},
{
"api_name": "botocore.exceptions.exceptions",
"line_number": 306... |
14653907294 | from flask_app.config.mysqlconnection import connectToMySQL
from flask import flash
import re
from flask_app.models import user
SCHEMA = 'users_paintings_schema'
REGEX_TITLE = re.compile(r'^[a-zA-Z]+$')
class Painting:
def __init__(self, data):
self.id = data['id']
self.title ... | Pat-Tee/CodingDojo | PythonMySQL/BeltExam1/flask_app/models/painting.py | painting.py | py | 4,820 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "re.compile",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "flask.flash",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "flask.flash",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "flask.flash",
"line_number": 40... |
35899207011 | # moderator moet inloggen met email en id en dit wordt gecontroleerd met een bestand met de accountgegevens
# lees alle berichten in
# per bericht uit tekstbestand zuil kunnen beoordelen
# deze goed of afkeuren
# de wijziggen en tijd van beoordingen opslaan in database
# beoordeelde berichten verwijderen uit best... | RamonSiers/nszuil | moderator.py | moderator.py | py | 1,876 | python | nl | code | 0 | github-code | 21 | [
{
"api_name": "uuid.uuid4",
"line_number": 46,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.today",
"line_number": 47,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 47,
"usage_type": "name"
},
{
"api_name": "psycopg2.connect... |
74619060853 | import os
import cv2
INPUT_IMAGES_PATH = 'AvecMask'
OUTPUT_DIR = 'out'
RENAME_TO = 'JAUGEY_SUILLOT_'
if not os.path.exists(INPUT_IMAGES_PATH):
print(INPUT_IMAGES_PATH, " not found")
exit(1)
if not os.path.exists(OUTPUT_DIR):
os.makedirs(OUTPUT_DIR)
for i, imagePath in enumerate(os.listdir(INPUT_IMAGES_P... | AdrienJaugey/JAUGEY_SUILLOT-Face-Mask-Detector-Project | Utils/convertAndRename.py | convertAndRename.py | py | 632 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "os.path.exists",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "os.path.exists",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number":... |
72363450933 | import re
from logics.Constants import when_left_regex, when_right_regex
from logics.senteces.Expression import Expression
from logics.senteces.ParseExceptions import ParseException
from utils.Utils import tokenize, get_sentences_key_words
class WhenExpression(Expression):
"""
Class representing the "when Ex... | Blaxzter/Natural-Language-Reasoner | NL-Reasoning/src/logics/senteces/WhenExpression.py | WhenExpression.py | py | 4,709 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "logics.senteces.Expression.Expression",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "logics.Constants.when_left_regex",
"line_number": 28,
"usage_type": "name"
},
{
"api_name": "logics.Constants.when_right_regex",
"line_number": 28,
"usage_type"... |
31942921790 | from enum import Enum
from weaviate import Client
class SchemaOperation(Enum):
GET_CLASS = "GET_CLASS"
GET_CLASS_BY_NAME = "GET_CLASS_BY_NAME"
CREATE_CLASS = "CREATE_CLASS"
DELETE_CLASS = "DELETE_CLASS"
UPDATE_CLASS = "UPDATE_CLASS"
ADD_PROPER = "ADD_PROPER"
async def schema_call(weaviate_cl... | shiqinlong/weaviate-demo | app/src/services/weaviate/schema_operation.py | schema_operation.py | py | 2,009 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "enum.Enum",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "weaviate.Client",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "weaviate.Client",
"line_number": 47,
"usage_type": "name"
}
] |
72308770933 | #Description: Generating a pseudorandom image with prime numbers
#Author(s) : asxyzp
import cv2
import random
import numpy
PrimeArr = [] #Will store prime numbers between 0-255
'''
Name : CheckPrime(num)
Utility : Checks whether the number num is prime
Parameter(s) : num (a positiv... | asxyzp/experiments-in-cs | Image/ImgRandomPrime.py | ImgRandomPrime.py | py | 3,721 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "random.choice",
"line_number": 49,
"usage_type": "call"
},
{
"api_name": "random.choice",
"line_number": 50,
"usage_type": "call"
},
{
"api_name": "random.choice",
"line_number": 51,
"usage_type": "call"
},
{
"api_name": "cv2.imwrite",
"line_num... |
72789179573 | '''
Created on May 24, 2022
@author: David Ariando
'''
#!/usr/bin/python
import os
import time
from datetime import datetime
import pydevd
from scipy import signal
import matplotlib.pyplot as plt
from nmr_std_function.data_parser import parse_csv_float2col
from nmr_std_function.data_parser import parse_simple_inf... | dajoariando/WMPMRI_PCBv11_HDLv2_2022_PyDev | MAIN_nmr_code/obsolete/221016 nmr_cpmg_t2.py | 221016 nmr_cpmg_t2.py | py | 4,357 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "datetime.datetime.now",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 27,
"usage_type": "name"
},
{
"api_name": "os.path.exists",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "os.path",
... |
21111623512 |
from turtle import forward
import cv2
import numpy as np
import mediapipe as mp
import tensorflow as tf
from tensorflow.python.ke... | AYUSH27112021/TELLO_DRONE | gestures/TelloGesture.py | TelloGesture.py | py | 5,024 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "djitellopy.Tello",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "mediapipe.solutions",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "mediapipe.solutions",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "te... |
18322074513 | import pygame
from pygame import time
from engine.draw_engine import DrawEngine
from util.rand import Random
from engine.data.next_state import NextState
from settings.presets import get_all_presets
class ScreenSaver:
def __init__(self, screen, settings):
self.rand = Random()
self.presets = [sett... | atiratree/pv248 | bubbles/engine/screensaver.py | screensaver.py | py | 2,178 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "util.rand.Random",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "settings.presets",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "settings.presets.get_all_presets",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "se... |
24454986857 | # Based on local.py (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
# and chroot.py (c) 2013, Maykel Moya <mmoya@speedyrails.com>
# (c) 2013, Michael Scherer <misc@zarb.org>
# (c) 2015, Toshio Kuratomi <tkuratomi@ansible.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it... | source-foundry/code-corpora | python/ansible/jail.py | jail.py | py | 7,802 | python | en | code | 30 | github-code | 21 | [
{
"api_name": "ansible.plugins.connection.ConnectionBase",
"line_number": 38,
"usage_type": "name"
},
{
"api_name": "os.geteuid",
"line_number": 55,
"usage_type": "call"
},
{
"api_name": "ansible.errors.AnsibleError",
"line_number": 56,
"usage_type": "call"
},
{
"... |
32972317543 | import mock
from sdk.models import Process, Event
from sdk.utils import ExecutionResult
from sdk.process_memory import create_memory
def test_create_memory():
process = {
'id': 'id',
'processId': 'process_id',
}
event = Event(name="event")
with mock.patch('sdk.process_memory.HttpClie... | Forked-ONS/Plataforma-Executor | sdk/tests/test_process_memory.py | test_process_memory.py | py | 792 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "sdk.models.Event",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "mock.patch",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "sdk.utils.ExecutionResult.ok",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "sdk.utils.Ex... |
30475045278 | import json
collections = ['average_stars', 'cool', 'fans', 'funny', 'num_friends', 'review_count', 'useful']
breakdowns = ['average', 'min', 'max', 'median', 'mode', '10', '25', '75', '90']
file_prefix = '../data/clean/'
file_suffix = '.json'
data = {}
for c in collections:
print(c)
print('-----------'... | rahrang/yelp-dataset-project | src/scripts/compile_general.py | compile_general.py | py | 776 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "json.load",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "json.dump",
"line_number": 35,
"usage_type": "call"
}
] |
20948819249 | from tornado.web import url
from controllers import *
route = [
url(r'/signup',handlers.SignupRequestHandler),
url(r'/login',handlers.LoginRequestHandler),
url(r'/logout',handlers.LogoutRequestHandler),
url(r'/games',handlers.GameCRUDRequestHandler),
url(r'/game/download'+r'/(.*)',handlers.DownloadGameRequestHan... | MedAmineFouzai/GameShop_Backend | routes/routes.py | routes.py | py | 374 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "tornado.web.url",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "tornado.web.url",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "tornado.web.url",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "tornado.web.url",
"l... |
73504080371 | import dash
from dash import dcc, html
import dash_bootstrap_components as dbc
from dash.dependencies import Input, Output, State
# from app import app
variant_options = [
{"label": "Вариант из файла от компании 'БА'", "value": "ba_file"},
{"label": "Вариант из файла Excel", "value": "excel_file"},
... | Yellowbaron/dash | price_estimator.py | price_estimator.py | py | 1,625 | python | ru | code | 0 | github-code | 21 | [
{
"api_name": "dash_bootstrap_components.Container",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "dash.html.H1",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "dash.html",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "dash.dcc.R... |
25810684805 | """This file has been ported from fresh library by Azevedo Filippe aka PasNox
See information at https://github.com/pasnox/fresh and
API docks at http://api.monkeystudio.org/fresh/
"""
import os.path
from PyQt5 import uic
from PyQt5.QtCore import QEvent, Qt
from PyQt5.QtWidgets import QDialog, QDialogButtonBox, QHea... | andreikop/enki | enki/plugins/appshortcuts/action_shortcut_editor.py | action_shortcut_editor.py | py | 7,443 | python | en | code | 161 | github-code | 21 | [
{
"api_name": "enki.widgets.lineedit.LineEdit",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "enki.widgets.lineedit.LineEdit.__init__",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "enki.widgets.lineedit.LineEdit",
"line_number": 22,
"usage_type": ... |
71034796214 | '''Breadth-First Search (BFS) Implementation for undirected graph
Problem: Traverse given by BFS algorithm (explores vertices in the order of their distance from the source vertex)
Input: Graph (edges of Graph, number of vertex)
Output: Print the vertex of graph (in BFS algorithm order)
'''
# Idea:
# - Using a queue, ... | deLini1612/Data-Structure-Algorithm | 1. DSA problems/Graph/Graph_6.py | Graph_6.py | py | 3,212 | python | en | code | 2 | github-code | 21 | [
{
"api_name": "collections.deque",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "collections.deque",
"line_number": 75,
"usage_type": "call"
}
] |
74074072693 | """
File: spacy_segmenter.py
Author: Batuhan Erden
"""
import spacy
from src.segmentation.segmenter import Segmenter
class SpacySegmenter(Segmenter):
def __init__(self, corpus, improved=False):
super().__init__(name="Spacy Segmentation (%s)" % ("Naive" if not improved else "Improved"),
... | erdenbatuhan/bva-decision-search-engine | src/segmentation/spacy_segmenter.py | spacy_segmenter.py | py | 1,897 | python | en | code | 2 | github-code | 21 | [
{
"api_name": "src.segmentation.segmenter.Segmenter",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "spacy.load",
"line_number": 18,
"usage_type": "call"
}
] |
26200221190 | import re
import logging
from snueue import app
DEBUG_LOG_FORMAT = (
'%(message)s'
)
if __name__ == '__main__':
config_object = 'snueue.config.development'
app.config.from_object(config_object)
app.logger.addHandler(app.config.get('LOGGING_HANDLER'))
app.logger.handlers[0].setFormatter(logging.Fo... | renfredxh/snueue | app.py | app.py | py | 915 | python | en | code | 2 | github-code | 21 | [
{
"api_name": "snueue.app.config.from_object",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "snueue.app.config",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "snueue.app",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "snueu... |
71553961974 | import pyautogui as pag # <--pyautogui를 줄여서 사용하겠다
import time
login_btn = pag.position(x=906, y=424)
pag.click(login_btn) #로그인 창 띄우기
id_btn = pag.position(x=432, y=364)
my_id = "****" #id
my_pw = "****" #pw
pag.typewrite(my_id,interval=0.5)
pag.press("tab")
pag.typewrite(my_pw,interval=0.2)
login_fina... | ohmanbanja/front-end | macro/pyautogui macro copy.py | pyautogui macro copy.py | py | 646 | python | ko | code | 0 | github-code | 21 | [
{
"api_name": "pyautogui.position",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "pyautogui.click",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "pyautogui.position",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "pyautogui.typewrit... |
73026106933 | #!/usr/bin/env python
# coding=utf-8
from __future__ import division, print_function, unicode_literals
import pytest
import shlex
from sacred.arg_parser import (_convert_value, get_config_updates, parse_args)
@pytest.mark.parametrize("argv,expected", [
('', {}),
('run', {'COMMAN... | LiuFang816/SALSTM_py_data | python/IDSIA_sacred/sacred-master/tests/test_arg_parser.py | test_arg_parser.py | py | 3,466 | python | en | code | 9 | github-code | 21 | [
{
"api_name": "sacred.arg_parser.parse_args",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "shlex.split",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "sacred.arg_parser.parse_args",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": ... |
35381621595 | import matplotlib.pyplot as plt
import numpy as np
import scipy.special as sp
# hydrogen atom orbital
def orbital(n,l,m):
def pdf(x,y,z):
r = (x**2+y**2+z**2)**0.5 #distance
t = np.arccos(z/r) # theta
angular = sp.sph_harm(m,l,0,t).real**2
r = r/n
radial = r**(2*l)*sp.assoc... | hope-lord/ARBITARY_CODES | hydrogen_orbital_visualization.py | hydrogen_orbital_visualization.py | py | 1,770 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "numpy.arccos",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "scipy.special.sph_harm",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "scipy.special",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "scipy.special.assoc_... |
23926366794 | """[MkDocs](https://github.com/mkdocs/mkdocs/) spells: install, build, deploy to GitHub, serve locally."""
from invoke import Context, task
from conjuring.visibility import has_pyproject_toml
SHOULD_PREFIX = True
EXTENSIONS: list[str] = [
"mkdocs-material", # https://github.com/squidfunk/mkdocs-material
"m... | andreoliwa/conjuring | src/conjuring/spells/mkdocs.py | mkdocs.py | py | 1,669 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "invoke.Context",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "conjuring.visibility.has_pyproject_toml",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "invoke.task",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "in... |
34233793039 | import urllib.request, urllib.parse, urllib.error
from bs4 import BeautifulSoup
def retrieve_name(url, position, repetitions):
for _ in range(repetitions):
print("Retrieving:", url)
html = urllib.request.urlopen(url).read()
soup = BeautifulSoup(html, 'html.parser')
# Retrieve all o... | rabayarabu/python-programming-coursera | findlastname.py | findlastname.py | py | 938 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "urllib.request.request.urlopen",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "urllib.request.request",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "urllib.request",
"line_number": 7,
"usage_type": "name"
},
{
"api_name":... |
32410957578 | from __future__ import absolute_import, print_function, division
import weakref
import gevent
from gevent.event import Event, AsyncResult
import gevent.testing as greentest
from gevent.testing.six import xrange
from gevent.testing.timing import AbstractGenericGetTestCase
from gevent.testing.timing import AbstractGe... | ryanmrestivo/red-team | Exploitation-Tools/CrackMapExec/site-packages/gevent/tests/test__event.py | test__event.py | py | 8,771 | python | en | code | 91 | github-code | 21 | [
{
"api_name": "gevent.testing.timing.SMALL_TICK",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "gevent.testing.timing.SMALL_TICK_MAX_ADJ",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "gevent.testing.timing.AbstractGenericWaitTestCase",
"line_number": ... |
25984082213 |
import numpy as np
import tensorflow as tf
from art.estimators.classification import TensorFlowV2Classifier
from keras.applications.vgg16 import preprocess_input, VGG16, decode_predictions
from keras_preprocessing.image import img_to_array, load_img
mean = [0.485*255, 0.456*255, 0.406*255]
std = [0.229*255, 0.224*255... | aliotopal/advesarial-attacks | predicting.py | predicting.py | py | 1,446 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "keras.applications.vgg16.VGG16",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "tensorflow.keras.losses.CategoricalCrossentropy",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "tensorflow.keras",
"line_number": 13,
"usage_type": "attri... |
6501967030 | import logging
from typing import Union, Tuple, Optional, Any
from pyobs.interfaces import IRoof, ITelescope, IAcquisition, IAutoFocus
from pyobs.robotic import TaskRunner
from pyobs.robotic.scripts import Script
from pyobs.utils.enums import ImageType
from pyobs.utils.logger import DuplicateFilter
from pyobs.robotic ... | pyobs/pyobs-core | pyobs/robotic/lco/scripts/autofocus.py | autofocus.py | py | 5,646 | python | en | code | 8 | github-code | 21 | [
{
"api_name": "logging.getLogger",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "logging.getLogger",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "pyobs.utils.logger.DuplicateFilter",
"line_number": 15,
"usage_type": "call"
},
{
"api_name":... |
42134363564 | # IMPORT MODULES + PYGAME
# pygame
import pygame
# settings
from settings import *
# import path from os so all images can be loaded regardless of operating system
from os import path
# setup platforms
class Platform(pygame.sprite.Sprite):
# initialize platform with all attributes
def __init__(self,... | aribhs8/My-Public-Projects | Batman/Batman/Batman/obstacles.py | obstacles.py | py | 10,230 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "pygame.sprite",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "pygame.sprite.Sprite.__init__",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "pygame.sprite",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "p... |
71026687412 | import asyncio
import logging
from datetime import datetime, timedelta
from typing import List
import discord
from discord import app_commands
from discord.ext import commands, tasks
from .utils.common import CommonUtil
from .utils.guild_setting import GuildSettingManager
from .utils.notify_role import Not... | being24/hohumi | cogs/thread_keeper.py | thread_keeper.py | py | 29,929 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "discord.ext.commands.Cog",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "discord.ext.commands",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "discord.ext.commands.Bot",
"line_number": 22,
"usage_type": "attribute"
},
{
"... |
8651059138 | import os
import shutil
import argparse
import requests
from tqdm import tqdm
from biigle.biigle import Api
# TODO:
# - Add possibility to input multiple labels IDs
# Example:
# python pull_patches.py -e charley.gros@gmail.com -t SVRTBSUtVcQXZHjkNOxI29Zg2yu0nuhw -s PS96 -i 474 -o R:\IMAS\An
# tarctic_Seafloor\Cle... | charleygros/biigle_scripts | pull_patches.py | pull_patches.py | py | 8,090 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "argparse.SUPPRESS",
"line_number": 44,
"usage_type": "attribute"
},
{
"api_name": "biigle.biigle.Api",
"line_number": 93,
"usage_type": "call"
},
{
"api_name": "os.p... |
34310374738 | from django.utils import unittest
from django.test import TestCase
from django.test.client import Client
from website.models import Jurisdiction
from django.conf import settings
class AHJUrlsTestCase(TestCase):
def test_ahj_urls(self):
j = Jurisdiction.objects.create(city = "foo city",
... | solarpermit/solarpermit | website/tests/test_ahj_urls.py | test_ahj_urls.py | py | 1,121 | python | en | code | 4 | github-code | 21 | [
{
"api_name": "django.test.TestCase",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "website.models.Jurisdiction.objects.create",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "website.models.Jurisdiction.objects",
"line_number": 9,
"usage_type": "attr... |
10912571810 | # AI for Self Driving agent
# Importing the libraries
import numpy as np
import random
import os
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
import torch.autograd as autograd
from torch.autograd import Variable
# Creating the architecture of the Neural Network
#inh... | mk4dev/dqn_cv_4_autonomous_agent | ai_dqn.py | ai_dqn.py | py | 9,028 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "torch.nn.Module",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "torch.nn.Linear",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line_nu... |
21808957502 | from __future__ import annotations
import string
from typing import Any
from azure.keyvault.secrets import SecretProperties
# from fast_autocomplete import AutoComplete
from rich.console import RenderableType
from rich.padding import Padding
from rich.panel import Panel
from rich.style import Style
from rich.text im... | chelnak/azure-keyvault-browser | src/azure_keyvault_browser/widgets/filter.py | filter.py | py | 11,701 | python | en | code | 5 | github-code | 21 | [
{
"api_name": "textual.widget.Widget",
"line_number": 26,
"usage_type": "name"
},
{
"api_name": "textual.reactive.Reactive",
"line_number": 68,
"usage_type": "name"
},
{
"api_name": "textual.reactive.Reactive",
"line_number": 69,
"usage_type": "name"
},
{
"api_nam... |
1303404924 | import datetime
import math
exec_part = 2 # which part to execute
exec_test_case = 0 # -1 = all test inputs, n = n_th test input; 0 = real puzzle input
# Puzzle input
with open('input/input_test16.txt') as f:
INPUT_TEST = f.read()
with open('input/input16.txt') as f:
INPUT = f.read()
class Packet:
d... | vunguyenq/adventofcode | 2021/16.PacketDecoder.py | 16.PacketDecoder.py | py | 4,308 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "math.prod",
"line_number": 55,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.now",
"line_number": 103,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 103,
"usage_type": "attribute"
},
{
"api_name": "datetime.dat... |
35330581530 | from jinja2 import Template
def images():
with open('images.html') as f:
s = f.read()
return s
def main():
img_lst = [
{'title': 'Simba thrown',
'img': 'https://media.giphy.com/media/DvMHwFYLVHlZe/giphy.gif',
'desc': 'Simba getting thrown'
},
{'title... | Walfzz/my_site | 2020.3.21/images.py | images.py | py | 793 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "jinja2.Template",
"line_number": 23,
"usage_type": "call"
}
] |
33894546376 | from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.wait import WebDriverWait
from webdriver_manager.chrome import ChromeDriverManager
from selenium.webdriver.chrome.options import Options
f... | Gennadii8/Python_training_0 | Python_training/STM/Selenium/Selenium_learning/LearningSelenium/handle_exeption.py | handle_exeption.py | py | 2,703 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "selenium.webdriver.common.by.By.XPATH",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "selenium.webdriver.common.by.By",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "time.sleep",
"line_number": 20,
"usage_type": "call"
},
{
... |
17313572163 | import random
import string
from django.db.models import Q
from rest_framework.serializers import *
from rest_framework import serializers
from MANAGEMENT.Utils.utils import random_password
from apps.transaction.models import transferencia, catMaStatus, transmasivaprod
from apps.users.models import persona, cuenta, g... | ManuelCL-jml/Polipay-Backup | apps/users/api/web/admin/serializers/serializer_admin.py | serializer_admin.py | py | 54,876 | python | es | code | 0 | github-code | 21 | [
{
"api_name": "apps.users.management.filter_object_if_exist",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "apps.users.models.persona",
"line_number": 31,
"usage_type": "argument"
},
{
"api_name": "apps.users.management.filter_object_if_exist",
"line_number": 32,
... |
70104123254 | # coding: utf-8
# ysoftman
# python version : 3.x
'''
word2vec : 구글에서 자연어 처리를 위해 만든 단어들을 벡터에 (수치)표한해 다음에 올 단어를 예측한다.
2013년 발표 논문 : https://papers.nips.cc/paper/5021-distributed-representations-of-words-and-phrases-and-their-compositionality.pdf
프로젝트 : https://code.google.com/archive/p/word2vec/
tensorflow 한글번역 책 : ... | ysoftman/test_code | MachineLearning/word2vec.py | word2vec.py | py | 12,917 | python | en | code | 3 | github-code | 21 | [
{
"api_name": "os.path.dirname",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 33,
"usage_type": "attribute"
},
{
"api_name": "os.path.abspath",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line... |
10928994356 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.http import HttpResponseRedirect
from django.shortcuts import render
from .forms import SignupForm
# Create your views here.
def sign_up(request):
if request.method == "POST":
form = SignupForm(request.POST)
if form.is_val... | programminghubb/DjangoProjects | mywebapplication/registration/views.py | views.py | py | 601 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "forms.SignupForm",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "django.http.HttpResponseRedirect",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "forms.SignupForm",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "dj... |
2004426999 | import numpy as np
import cv2
from PIL import Image
def load_images(filenames):
# Images must all be of same shape.
images = []
for filename in filenames:
temp_image = np.asarray(Image.open(filename))
# Adjust channel dimension to work with torch.
temp_image = np.transpose(... | jacobhallberg/pytorch_stylegan_encoder | utilities/images.py | images.py | py | 1,017 | python | en | code | 204 | github-code | 21 | [
{
"api_name": "numpy.asarray",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "PIL.Image.open",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "PIL.Image",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "numpy.transpose",
"line_numbe... |
8651045866 | # noqa
"""收敛规则定义模块
"""
import json
import random
import time
from sqlalchemy.orm.exc import NoResultFound
from fta import constants
from fta.storage.mysql import orm_2_dict, session
from fta.storage.tables import FtaSolutionsAppIncidentdef
from fta.utils import logging
from fta.utils.decorator import exception_cache... | mycyzs/fta | server/manager/define/incidentdef.py | incidentdef.py | py | 7,009 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "fta.utils.logging.getLogger",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "fta.utils.logging",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "fta.storage.mysql.session.query",
"line_number": 30,
"usage_type": "call"
},
{
"api... |
15236187387 | import numpy as np
import matplotlib.pyplot as plt
import torch
def plot_reconstructed_images(
model,
test_dataset,
device='cpu',
num_labels=10,
savepath=None,
):
"""
Visualize reconstructed images
Args:
model: AutoEncoder
dataset(torchvisio... | caron14/variational_autoencoder | modules/plots/visualize_images.py | visualize_images.py | py | 1,442 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "numpy.where",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.subplots",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 30,
"usage_type": "name"
},
{
"api_name": "torch.no_gra... |
74733369973 | from typing import Dict
from oremda.api import operator
from oremda.typing import JSONType, PortKey, RawPort
DATA_FILE_NAME = "/data.tiff"
@operator
def data_container(
_inputs: Dict[PortKey, RawPort], parameters: JSONType
) -> Dict[PortKey, RawPort]:
with open(DATA_FILE_NAME, "br") as f:
data = f.... | OpenChemistry/oremda | operators/data_container/run.py | run.py | py | 406 | python | en | code | 5 | github-code | 21 | [
{
"api_name": "typing.Dict",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "oremda.typing.PortKey",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "oremda.typing.RawPort",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "oremda.typing... |
35946957195 | import math
from typing import List
def is_tree_visible(tree_map: List[str], x: int, y: int) -> bool:
if (x == 0 or y == 0 or x == (len(tree_map[0])-1) or y == (len(tree_map)-1)):
return True
current_tree = tree_map[y][x]
visibility = {
'west': True,
'east': True,
'north':... | nadege/advent-of-code | src/year_2022/day_8/day_8.py | day_8.py | py | 2,566 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "typing.List",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "typing.List",
"line_number": 40,
"usage_type": "name"
},
{
"api_name": "typing.List",
"line_number": 44,
"usage_type": "name"
},
{
"api_name": "math.prod",
"line_number": 79,... |
2026146059 | import difflib, csv, numpy, time
from basicAlgorithm import baidu_translate, google_translate
import yaml, os
from time import sleep
with open('config.yaml') as fd_conf:
config = yaml.load(fd_conf, Loader = yaml.SafeLoader)
def myCallback(userD, dataD, user_dict_path, data_dict_path):
if not os.path.isfile(... | Husky-in-Wolves/Multilingual-Text-Preprocessing | _1_loadCSV.py | _1_loadCSV.py | py | 4,341 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "yaml.load",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "yaml.SafeLoader",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "os.path.isfile",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_numbe... |
27630338174 | from rest_framework import permissions, viewsets
from rest_framework.decorators import api_view, permission_classes, authentication_classes
from rest_framework.views import APIView
from rest_framework.permissions import AllowAny
from django.views.decorators.csrf import csrf_exempt
from django.http import HttpResponse
... | xiaomensao/questionaire | Questionaires/views.py | views.py | py | 4,940 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "django.http.HttpResponse",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "rest_framework.viewsets.ModelViewSet",
"line_number": 30,
"usage_type": "attribute"
},
{
"api_name": "rest_framework.viewsets",
"line_number": 30,
"usage_type": "name"
},... |
27920954835 | # pygame1.py
# the basic template to draw a picture that is not moving
import pygame
# help(pygame)
pygame.init() # ALL pygame programs need to initialize the pygame engine
# before they can use it
# Defining a colour constant(variables we should not be changing)
RED = (255, 0, 0) # we use ALL CAPS for constants s... | PranavMarthi/Course | Unit 3 - If Statements and Pygame/3-1/3-1 Lesson/Lesson 3-1 Example 1.py | Lesson 3-1 Example 1.py | py | 911 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "pygame.init",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "pygame.display.set_mode",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "pygame.display",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "pygame.draw.li... |
10219641269 | from django.urls import path
from django.views.decorators.csrf import csrf_exempt
from . import views
urlpatterns = [
path('', views.dashboard, name='dashboard'),
path('finances/', views.financials_list, name='financial_list'),
path('financial_form/', views.financial_form, name='financial_form'),
path... | sirthom9123/Church-Manager | base/urls.py | urls.py | py | 1,040 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "django.urls.path",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
... |
43760605668 | # %%
import os
import scipy.io as io
from sklearn.neighbors import NearestNeighbors
import numpy as np
from matplotlib import pyplot as plt
import pandas as pd
import random
# customized
import config as config
from utils.generic import Generic
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("-... | ramdrop/autoplace | preprocess/split.py | split.py | py | 12,897 | python | en | code | 89 | github-code | 21 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "config.load_parameters",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "random.seed",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "numpy.rand... |
33256005026 | import os
from telnetlib import IP
import time
import argparse
import olympe
from olympe.messages import gimbal
TIMEOUT = 120
REAL_IP = "192.168.42.1"
DRONE_IP = os.environ.get("DRONE_IP", REAL_IP)
DRONE_MEDIA_PORT = os.environ.get("DRONE_MEDIA_PORT", "80")
# Set logging level to info
olympe.log.update_config({"log... | mgr098/anafi-ai-survival-kit | src/olympe-scripts/gimbal.py | gimbal.py | py | 1,323 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "os.environ.get",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "os.environ.get",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_... |
25774512552 | """
This script is for assessing the performance of models (or their subparts) AFTER training.
"""
from __future__ import absolute_import, division, unicode_literals
import sys, os, time
import torch
import logging
import pickle
import numpy as np
import pandas as pd
import argparse
from wrap_evaluation import run_a... | florianmai/word2mat | evaluate_word2mat.py | evaluate_word2mat.py | py | 4,545 | python | en | code | 21 | github-code | 21 | [
{
"api_name": "os.path.exists",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 25,
"usage_type": "attribute"
},
{
"api_name": "sys.path.insert",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_numb... |
2628469420 | """autovega
This module provides an IPython/Jupyter notebook widget for quick
visualization of Pandas dataframes using Vega and Altair.
To use the autovega widget whenever Jupyter displays a dataframe, call
the `register_renderer` function at the top of your notebook.
>>> import autovega
>>> autovega.register_render... | baldwint/autovega | autovega.py | autovega.py | py | 5,829 | python | en | code | 16 | github-code | 21 | [
{
"api_name": "ipywidgets.HBox",
"line_number": 27,
"usage_type": "attribute"
},
{
"api_name": "traitlets.Bool",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "traitlets.Any",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "ipywidgets.Dropdown... |
17204592106 | import boto3
import json
import datetime
import time
import sys
import argparse
import aiohttp
import asyncio
from colorama import Fore
#Globals
USER_POOL_ID = ''
LIMIT = 60
MAX_NUMBER_RECORDS = 0 #0 mean all of them
USER_PROPERTIES = ['email']
CSV_FILE_NAME = 'CognitoConfirmedButMyIRInexistentUsers.csv'
DEV_ENDPOINT... | jorgerdzf/cognito-exporter | CognitoMyIRUserCompare.py | CognitoMyIRUserCompare.py | py | 8,361 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "colorama.Fore.WHITE",
"line_number": 29,
"usage_type": "attribute"
},
{
"api_name": "colorama.Fore",
"line_number": 29,
"usage_type": "name"
},
{
"api_name": "argparse.ArgumentParser",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "argpar... |
36094046487 | import json
from datetime import datetime
from optparse import make_option
from django.core.management.base import BaseCommand, CommandError
from twap.twitter.models import Tweet
class Command(BaseCommand):
help = 'Dumps Tweets to a json file.'
def handle(self, *args, **options):
for month in range(... | ecds-archives/Twap | twitter/management/commands/twap_dump_json.py | twap_dump_json.py | py | 1,449 | python | en | code | 3 | github-code | 21 | [
{
"api_name": "django.core.management.base.BaseCommand",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "twap.twitter.models.Tweet.objects.filter",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "twap.twitter.models.Tweet.objects",
"line_number": 20,
"u... |
3654968045 | import pytest
import numpy as np
import cv2 as cv
from lab_5.models.rules import vconcat
from lab_5.models.rules import hconcat
from lab_5.models.bin_sum_check import BinSumCheck
mini_0 = cv.imread("lab_5/data/mini_0.png")[:, :, 0]
mini_1 = cv.imread("lab_5/data/mini_1.png")[:, :, 0]
mini_upper_term = cv.hconcat([m... | dimasimonowich/computer-vision-labs | tests/lab_5/models/test_rules.py | test_rules.py | py | 6,859 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "cv2.imread",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "cv2.imread",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "cv2.hconcat",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "cv2.hconcat",
"line_number": 14,... |
27729475431 | from __future__ import absolute_import, unicode_literals, print_function
from logging import getLogger
log = getLogger('GSSearch')
from sqlalchemy.exc import SQLAlchemyError
from zope.component import createObject
from zope.pagetemplate.pagetemplatefile import PageTemplateFile
from zope.interface import implementer, In... | groupserver/Products.GSSearch | Products/GSSearch/postResultsContentProvider.py | postResultsContentProvider.py | py | 8,890 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "logging.getLogger",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "queries.MessageQuery",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "zope.component.createObject",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "zop... |
27539564034 | import logging
import os
from os import environ
from flask import Flask
from flask_bootstrap import Bootstrap5
from flask_login import LoginManager
from flask_migrate import Migrate
from flask_sqlalchemy import SQLAlchemy
from tracking.navigation.blueprint_registration import blueprint_registration
database = SQLAlc... | wahinipa/cupboard | www/tracking/__init__.py | __init__.py | py | 2,337 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "flask_sqlalchemy.SQLAlchemy",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "flask_migrate.Migrate",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "logging.b... |
1115737073 | from __future__ import division
#!/usr/bin/python
__author__ = 'ytay2'
'''
Builder for File IO
Parser to parse text and csv files from directories
Renamed to corpusBuilder.py to not confuse gensim (it has it's own parser import)
@author - tayyi
'''
#utility class to parse text and csv files
from nltk import word_tok... | brightbird/Youtube2Sentiments | corpusBuilder.py | corpusBuilder.py | py | 7,358 | python | en | code | 5 | github-code | 21 | [
{
"api_name": "sys.setdefaultencoding",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "os.listdir",
"line_number": 44,
"usage_type": "call"
},
{
"api_name": "re.compile",
"line_number": 57,
"usage_type": "call"
},
{
"api_name": "re.compile",
"line_n... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.