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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
10412589273 | from collections import Counter
import numpy as np
import pandas
import pprint
# noinspection PyUnresolvedReferences
from utils import tokenize
# nltk.download('stopwords')
# importing corpus as resume
resume_file = open('../assets/resume.txt', 'r')
resume = resume_file.read().lower()
resume_file.close()
# tokeniz... | anishLearnsToCode/bow-representation | src/one-hot-vector.py | one-hot-vector.py | py | 1,229 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "utils.tokenize",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "collections.Counter",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "pprint.pp",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"... |
35533985483 | import argparse
import socket
from pretenders.server.base import in_parent_process, save_pid_file
from pretenders.server.log import get_logger
from pretenders.client import BossClient
from pretenders.common.constants import RETURN_CODE_PORT_IN_USE
LOGGER = get_logger("pretenders.server.pretender")
class Pretender(o... | pretenders/pretenders | pretenders/server/pretender.py | pretender.py | py | 2,599 | python | en | code | 108 | github-code | 1 | [
{
"api_name": "pretenders.server.log.get_logger",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "pretenders.client.BossClient",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "pretenders.server.base.in_parent_process",
"line_number": 20,
"usage_type": ... |
12143832924 | import config
import classes.player
import classes.club
def create_players():
'''
ABOUT:
Creates the players for the game.
gametype tells us whether it's a single game or a league so that we can generate the right number of players.
names set to None will allow us to randomly generate them.
... | chimel3/stormbowl | createplayers.py | createplayers.py | py | 3,440 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "config.game",
"line_number": 43,
"usage_type": "attribute"
},
{
"api_name": "config.teams_data",
"line_number": 45,
"usage_type": "attribute"
},
{
"api_name": "config.players_data",
"line_number": 50,
"usage_type": "attribute"
},
{
"api_name": "clas... |
11587990326 | #!/usr/bin/env python3
"""
Solution for embedded items 5x5 matrices
- plot data as grid and average response in each category (col 0)
- compare with random/no-structure model (col 1)
- compare with user-specified model (col 2)
"""
# core
import csv, os, re
# data management
import pandas as pd
# scientific ... | knielbo/survey_visualization | embedded2plot.py | embedded2plot.py | py | 6,395 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "numpy.zeros",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "numpy.isnan",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "numpy.random.randint",
"line_number": 46,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line... |
32437564312 | import pandas as pd
from stable_baselines3.ppo import MlpPolicy
from stable_baselines3.common.callbacks import CheckpointCallback
from stable_baselines3 import PPO
from torch import nn
from tqdm import trange
from golds.contracts import Currency, Stock, Option, OptionFlavor, OptionStyle, Holdings
from golds.en... | fany02656/RL-Finance-FY | main.py | main.py | py | 5,173 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "golds.contracts.Stock",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "golds.contracts.Option",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "golds.contracts.OptionFlavor.CALL",
"line_number": 27,
"usage_type": "attribute"
},
{
... |
35329125934 | #!/usr/bin/env python3
import os
import sys
import json
import re
from argparse import ArgumentParser
import hashlib
import copy
import subprocess
import uuid
import datetime
def get_app_info(wf_name, data_type):
app_info = {
"sanger-wxs": {
"snv": ["CaVEMan"],
"indel": ["Pindel"]... | icgc-argo-workflows/data-processing-utility-tools | tools/payload-generation/payload-generation.py | payload-generation.py | py | 12,859 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "sys.exit",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "os.path.basename",
"line_number": 50,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 50,
"usage_type": "attribute"
},
{
"api_name": "re.match",
"line_number": ... |
73034211233 | # -*- coding: utf-8 -*-
'''
:codeauthor: :email:`Jayesh Kariya <jayeshk@saltstack.com>`
'''
# Import Python libs
from __future__ import absolute_import
# Import Salt Testing Libs
from salttesting import skipIf, TestCase
from salttesting.mock import (
NO_MOCK,
NO_MOCK_REASON,
MagicMock,
patch
)
fro... | shineforever/ops | salt/tests/unit/states/rabbitmq_plugin_test.py | rabbitmq_plugin_test.py | py | 2,591 | python | en | code | 9 | github-code | 1 | [
{
"api_name": "salttesting.helpers.ensure_in_syspath",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "salt.states.rabbitmq_plugin.__opts__",
"line_number": 24,
"usage_type": "attribute"
},
{
"api_name": "salt.states.rabbitmq_plugin",
"line_number": 24,
"usage_t... |
70431605475 | import numpy as np
import matplotlib.pyplot as plt
class Kmeans(object):
def __init__(self, k=1):
self.k = k
def train(self, data, verbose=1):
shape = data.shape
ranges = np.zeros((shape[1], 2))
centroids = np.zeros((shape[1], 2))
for dim in range(shape[1]):
... | divyanshugit/representation_learning | models/classificaton/kMeans.py | kMeans.py | py | 2,669 | python | en | code | 2 | github-code | 1 | [
{
"api_name": "numpy.zeros",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "numpy.min",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "numpy.max",
"line_number": 18,
... |
20969486373 | import math
import sys
import time
from nba_api.stats.static import players
from nba_api.stats.endpoints import playergamelog
from nba_api.stats.library.parameters import SeasonAll
from nba_api.stats.endpoints import leaguegamefinder
import csv
import pandas as pd
from bs4 import BeautifulSoup
import requests
from date... | DanielMillward/NBADataScraper | 1_update_db.py | 1_update_db.py | py | 11,619 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "nba_api.stats.static.players.get_active_players",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "nba_api.stats.static.players",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "csv.DictWriter",
"line_number": 22,
"usage_type": "call"
}... |
704796313 | # --------------
#Importing header files
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
#Reading the file
data=pd.read_csv(path)
#Code starts here
# Step 1
#Reading the file
#Creating a new variable to store the value counts
loan_status=data["Loan_Status"].value_counts()
#Plotting bar pl... | raghulsenthilkumar/greyatom-python-for-data-science | visulization/code.py | code.py | py | 2,181 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "pandas.read_csv",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.xlabel",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 29,
"usage_type": "name"
},
{
"api_name": "matplotlib.... |
27733324416 | import logging
from django.contrib.auth.models import User
from django.db import models
from django.db.models.signals import post_save, post_delete
from django.dispatch import receiver
from timeline.models import Timeline
# Models
class SubscribeRecord(models.Model):
is_read = models.BooleanField(
defau... | Sergey19940808/blog | blog/models.py | models.py | py | 3,771 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "django.db.models.Model",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "django.db.models",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "django.db.models.BooleanField",
"line_number": 13,
"usage_type": "call"
},
{
"api_na... |
43346740956 | import json
from pprint import pprint
from time import ctime
def lambda_response(status_code, message, **kwargs) -> dict:
'''Presents the custom OleTalk API Gateway/server responses in standard HTTP format, for all communications sent
from the API to the client. \n
Parameters:
----------- ... | Gallatin-Engineering/oletalk_response | python/api_response.py | api_response.py | py | 3,907 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "json.dumps",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "time.ctime",
"line_number": 86,
"usage_type": "call"
},
{
"api_name": "json.dumps",
"line_number": 89,
"usage_type": "call"
},
{
"api_name": "json.dumps",
"line_number": 123,... |
31276842685 | """
Fix binary png images so that they're in a consistent binary format
Used for ground truth (_fg) images which can be saved by some image programs as 8 bit RGB pngs
rather than binary ones.
"""
import cv2
import os
import io
for img in os.listdir("/home/carter/Desktop/our-data/training/imgs"):
if "_fg" in img:
... | cpsiff/plant-segmentation | fix_imgs.py | fix_imgs.py | py | 795 | python | en | code | 3 | github-code | 1 | [
{
"api_name": "os.listdir",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "cv2.imread",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "cv2.IMREAD_GRAYSCALE",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "cv2.threshold",
"... |
13255279223 | #! python 3
"""
Program that reads in text files and lets users replace some keywords. Lastly, save as new file
"""
from pathlib import Path
import re
### read in text file
file_name = input("Enter relative path of file (eg. folder/file.txt): ")
p = Path(Path.cwd() / file_name)
input_file = open(p)
txt = input_file.r... | simink/py_automatetheboringstuff | code/madLibs.py | madLibs.py | py | 893 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "pathlib.Path",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "pathlib.Path.cwd",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "re.compile",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "pathlib.Path.cwd",
"line... |
70007433955 | from __future__ import print_function
import wave
import numpy as np
from struct import unpack
class WaveWrap(object):
def __init__(self, filename, output_window_size, window_overlap, unpack_fmt="<{}h"):
self.wav_buffer_size = output_window_size - window_overlap
self.wave_file = wave.open(filename... | lelloman/python-utils | sfft_from_wav.py | sfft_from_wav.py | py | 1,927 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "wave.open",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "numpy.hamming",
"line_number": ... |
24249664220 | import os
from PySide6 import QtWidgets
from PySide6.QtGui import QFont, QIcon
from PySide6.QtWidgets import (
QCheckBox,
QComboBox,
QFileDialog,
QFrame,
QLabel,
QLineEdit,
QPushButton,
QRadioButton,
QSizePolicy,
QSpacerItem,
QTabWidget,
QTextEdit,
QWidget,
)
from n... | Natsume-197/NadeOCR | nadeocr/GUI/widgets/options_widget.py | options_widget.py | py | 10,175 | python | en | code | 2 | github-code | 1 | [
{
"api_name": "os.path.abspath",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 24,
"usage_type": "attribute"
},
{
"api_name": "os.path.dirname",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "PySide6.QtWidgets.QWidge... |
38712381876 | # Imports
import bs4
import requests
from bs4 import BeautifulSoup
# URL Base
url_base = 'https://www.who.int'
def scrapingCovid():
# URL com os dados do COVID-19 (coloque essa URL no seu navegador e compreenda os dados disponíveis)
url = 'https://www.who.int/emergencies/diseases/novel-coronavirus-2019/situati... | AleTavares/scrapingCovid19 | scraping.py | scraping.py | py | 2,144 | python | pt | code | 0 | github-code | 1 | [
{
"api_name": "requests.get",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 16,
"usage_type": "call"
}
] |
42291469922 | import os
from torchvision.transforms import CenterCrop
from PIL import Image
completed_processing = set()
source_dir = "C:/Users/jessi/Documents/Master_Courses/MIE1517_IDL/Project/dataset/dataset/"
output_dir = "C:/Users/jessi/Documents/Master_Courses/MIE1517_IDL/Project/dataset/processed_dataset/"
i = 0
nb_exclude... | ChessieN132D/Self-Supervised-Image-Inpainting | Image Preprocessing/image_center_crop_128.py | image_center_crop_128.py | py | 945 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "os.scandir",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "PIL.Image.open",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "PIL.Image",
"line_number": 22,
"usage_type": "name"
},
{
"api_name": "torchvision.transforms.CenterCrop... |
11350861272 | # -*- coding: utf-8 -*-
"""Home dashboard layout."""
import locale
from apps import utils_dash
import dash_bootstrap_components as dbc
import dash_core_components as dcc
import pandas as pd
import plotly.express as px
import plotly.graph_objects as go
from portfolio.fii import FiiPortfolio
from portfolio.funds i... | thobiast/myinvestments | apps/home_dash.py | home_dash.py | py | 3,748 | python | en | code | 3 | github-code | 1 | [
{
"api_name": "locale.setlocale",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "locale.LC_ALL",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "apps.utils_dash.my_locale",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "ap... |
13839587396 | #################################################################################
# Description: Class for generating augmented data for training of
# neural network and SVM
#
# Authors: Petr Buchal <petr.buchal@lachub.cz>
# Martin Ivanco <ivancom.fr@gmail.... | LachubCz/ItAintMuchButItsHonestWork | src/batch.py | batch.py | py | 6,122 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "random.seed",
"line_number": 48,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.now",
"line_number": 48,
"usage_type": "call"
},
{
"api_name": "datetime.da... |
45290308912 | # -*- coding: utf-8 -*-
import abc
import importlib
from django.core.exceptions import ImproperlyConfigured
from django.conf import settings
class BaseEventsPushBackend(object, metaclass=abc.ABCMeta):
@abc.abstractmethod
def emit_event(self, message:str, *, routing_key:str, channel:str="events"):
pa... | phamhongnhung2501/Taiga.Tina | fwork-backend/tina/events/backends/base.py | base.py | py | 1,213 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "abc.ABCMeta",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "abc.abstractmethod",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "importlib.import_module",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "djan... |
34490854766 | import json
filename = r'/home/xxm/下载/qlora/data/estate_qa.json'
with open(filename, 'r', encoding='utf-8') as f:
lines = f.readlines()
for line in lines:
line = line.strip()
example = json.loads(line)
content = example['output']
if content == '':
print(example)
| xxm1668/qlora_chatglm | data_processon.py | data_processon.py | py | 320 | python | en | code | 4 | github-code | 1 | [
{
"api_name": "json.loads",
"line_number": 8,
"usage_type": "call"
}
] |
5047930515 | from flask import Flask
from flask import render_template, url_for, jsonify, request
from game import Game
app = Flask(__name__)
@app.route('/')
def main():
return render_template('index.html')
game=0
@app.route('/init', methods=['POST'])
def init():
global game
game = Game()
game.start()
# I ha... | Samcfuchs/DataSci | 2048/server.py | server.py | py | 807 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "flask.Flask",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "flask.render_template",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "game.Game",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "game.start",
"line_numb... |
33881354393 | import numpy
from matplotlib import pyplot
from utils import timeit
@timeit
def get_data():
data = []
with open('input.txt') as input_file:
for line in input_file:
points = tuple((int(x), int(y)) for x, y in (point.split(',') for point in line.strip().split(' -> ')))
data.appen... | bdaene/advent-of-code | 2022/day14/solve.py | solve.py | py | 2,337 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "utils.timeit",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "numpy.full",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.imshow",
"line_number": 75,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
... |
70738755233 | import re
import keyword
import os
from collections import Counter
def add_keywords(python_kw, cpp_kw, java_kw):
# keyword.kwlist is a list with python language keywords
python_kw.extend(keyword.kwlist)
# list of cpp keywords: http://www.cplusplus.com/doc/oldtutorial/variables/
cpp_kw.extend... | aaronojeda/language-detector | LangDetector.py | LangDetector.py | py | 4,294 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "keyword.kwlist",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "re.findall",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "collections.Counter",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "os.listdir",
"l... |
21563726124 | import json
from tags.tests.base_test import TagsBaseTestCase
class TagNamespaceTestCase(TagsBaseTestCase):
fixtures = ["test_authentication.yaml", "test_marketplace.yaml"]
def test_create_scoped_namespace(self):
##############################
# Creation of global namespace
self.log... | Mines-Paristech-Students/Portail-des-eleves | backend/tags/tests/test_namespaces.py | test_namespaces.py | py | 5,854 | python | en | code | 23 | github-code | 1 | [
{
"api_name": "tags.tests.base_test.TagsBaseTestCase",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "json.loads",
"line_number": 90,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 98,
"usage_type": "call"
}
] |
73654169633 | import os
from qgis.PyQt import QtWidgets, uic
from qgis.PyQt.QtCore import pyqtSignal
from qgis.PyQt.QtGui import QIcon
from qgis.PyQt.QtWidgets import QApplication
from qgis.utils import iface
from qgis.core import (
QgsProject,
QgsPointXY,
QgsCoordinateReferenceSystem,
QgsCoordinateTransform,
)
fro... | danylaksono/GeoKKP-GIS | modules/draw_nlp.py | draw_nlp.py | py | 8,095 | python | en | code | 2 | github-code | 1 | [
{
"api_name": "qgis.PyQt.uic.loadUiType",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "qgis.PyQt.uic",
"line_number": 31,
"usage_type": "name"
},
{
"api_name": "os.path.join",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "os.path",
"li... |
2299113487 | import os
import json
def get_ground_truth(filename):
#0022000159342.jpg
#0022000159342_1.jpg
if filename.find("_")!=-1:
return filename[0:filename.find("_")]
else:
return filename[0:filename.find(".")]
f = open("single_test.txt","r")
for line in f.readlines():
d... | xulihang/Barcode-Reading-Performance-Test | utils/create_ground_truth_for_barcode_bb.py | create_ground_truth_for_barcode_bb.py | py | 891 | python | en | code | 11 | github-code | 1 | [
{
"api_name": "json.dumps",
"line_number": 35,
"usage_type": "call"
}
] |
29505854194 | '''
Prepare a word sequence (sentence) with padding
- convert a sentence String to list of words in sentence
- convert list of words in sentence to array of word_embedding and padded
'''
import numpy as np
from keras.preprocessing import sequence
from textblob import Sentence
from src.static_variable import loa... | jamemamjame/JameChat | coding_model/preprocess/word_seq_perp.py | word_seq_perp.py | py | 3,013 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "src.static_variable.load_word_embedding",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "textblob.Sentence",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "numpy.full",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "... |
13563725205 | """
the Bot makes everyday posts with some picture+Belarusial legal word and its definition
"""
#!/usr/bin/python3
import telegram
import time
TOKEN = 'your_token_here'
bot = telegram.Bot(token=TOKEN)
chat_id='your_chat_id_here'
f = open('dictionary.txt', 'r', encoding='UTF-8')
words = f.read().split('\n')
f.close()... | HauryDow/bel_legal_lang_bot | Bel_legal_language_bot.py | Bel_legal_language_bot.py | py | 760 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "telegram.Bot",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 28,
"usage_type": "call"
}
] |
8246364725 | import matplotlib.pyplot as plt
from matplotlib import ticker
# taken from https://scikit-learn.org/stable/auto_examples/manifold/plot_compare_methods.html#sphx-glr-auto-examples-manifold-plot-compare-methods-py
def plot_3d(points, points_color, title):
x, y, z = points.T
fig, ax = plt.subplots(
fig... | MoritzM00/Bachelor-Thesis | python/plot_utils.py | plot_utils.py | py | 1,064 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "matplotlib.pyplot.subplots",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "matplotlib.ticker.MultipleLocator",
"line_number": 19,
"usage_type": "call"
},
{
"ap... |
35251753542 | '''PROGRAM DESCRIPITON:
HMTL form for registration is created and after filling the data, the student details like name,email, course are stored in the MongoDB "Registration" database.
'''
# PROGRAMMED BY: PULI SNEHITH REDDY
# MAIL ID : snehithreddyp@gmail.com
# DATE : 23-09-2021
# VERSION : 3.7.9
# ... | SnehithReddy09/Python | Class Assignments/Storing deatils of HTML form in Mongodb/app.py | app.py | py | 2,383 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "pymongo.MongoClient",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.now",
"line_number": 56,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 56,
"usage_type": "attribute"
},
{
"api_name": "flas... |
33283932467 | import datetime
from django.shortcuts import render
from django.db.models import Subquery, Count
from django.http import HttpResponseRedirect
from django.views.decorators.cache import cache_page
from port.models import Port
from stats.models import Submission, PortInstallation
from port.filters import PortFilterByMul... | macports/macports-webapp | app/views.py | views.py | py | 1,811 | python | en | code | 49 | github-code | 1 | [
{
"api_name": "django.http.HttpResponseRedirect",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "utilities.old_search_redirect",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "port.models.Port.objects.filter",
"line_number": 20,
"usage_type": "call"
... |
31623979015 | import socket
import json
import sys # for exit
# Create a UDP socket at client side
UDPClientSocket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
# Initialize variables
udp_port = 1234
local_host = socket.gethostname()
serverAddressPort = (local_host, udp_port)
IPAddr = socket.gethostbyname(local_host)
buffer_... | pmdung2011/Simple_Text_SocketProgramming | client.py | client.py | py | 2,409 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "socket.socket",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "socket.AF_INET",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "socket.SOCK_DGRAM",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "socket.gethostn... |
38806583081 | import pygame
import math
# Define some colors
BLACK = (0, 0, 0)
WHITE = (255, 255, 255)
GREEN = (0, 255, 0)
BLUE = (0, 0, 250)
RED = (255, 0, 0)
pygame.init()
# Set the width and height of the screen [width, height]
size = (800, 700)
screen = pygame.display.set_mode(size)
pygame.display.set_caption("My Game")
# Loop... | omarjcm/p59-programacion_hipermedial | code/rv/caracteristicas/01_taller.py | 01_taller.py | py | 2,876 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "pygame.init",
"line_number": 10,
"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.displa... |
36260433523 | import streamlit as st
import pandas as pd
import pickle
from random import randint
books = pd.read_csv('df_2.csv')
df_1 = pickle.load(open('df_1.pkl', 'rb'))
def recommendation(title):
recommendations = pd.DataFrame(df_1.nlargest(11, title)['title'])
recommendations = recommendations[recommendations['title'... | Hainguyendangduc/BookRecommendation | app.py | app.py | py | 1,748 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "pandas.read_csv",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "pickle.load",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "streamlit.title",
"lin... |
45140457164 | from telebot import types
from datetime import date, timedelta
from ...utils import constants
def get_days(room_name: str) -> types.InlineKeyboardMarkup:
now = date.today()
markup = types.InlineKeyboardMarkup()
for day in range(7):
""" add in InlineKeyboard """
w_day = now + timedelta(days... | BernarBerdikul/mybooking | mybooking/core/bot_services/get_days.py | get_days.py | py | 1,086 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "datetime.date.today",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "datetime.date",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "telebot.types.InlineKeyboardMarkup",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "tel... |
16874544930 | #!/usr/bin/env python3
import argparse
import sys
from KaSaAn.functions import prefixed_snapshot_analyzer
def main(args=None):
if args is None:
args = sys.argv[1:]
parser = argparse.ArgumentParser(
description='Get cumulative and mean distribution of complex sizes, plus distribution of numbe... | yarden/KaSaAn | KaSaAn/scripts/prefixed_snapshot_analyzer.py | prefixed_snapshot_analyzer.py | py | 1,606 | python | en | code | null | github-code | 1 | [
{
"api_name": "sys.argv",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "argparse.ArgumentParser",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "KaSaAn.functions.prefixed_snapshot_analyzer",
"line_number": 27,
"usage_type": "call"
}
] |
23739113062 | import argparse
import pytorch_lightning as pl
import torch
from torch.nn import functional as F
import constants
from lightling_wrapper import BaseTorchLightlingWrapper, SpeechCommandDataModule
from models.bc_resnet.bc_resnet_model import BcResNetModel
from models.bc_resnet.mel_spec_dataset import MelSpecDataSet, me... | egochao/speech_commands_distillation_torch_lightling | test.py | test.py | py | 1,768 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "models.simple_conv.simple_conv_model.SimpleConv",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "constants.N_CHANNEL",
"line_number": 28,
"usage_type": "attribute... |
28993145664 | #!/usr/bin/env python3
from argparse import ArgumentParser
from collections import namedtuple
import hashlib
import json
import os
import shutil
LayerInfo = namedtuple('LayerInfo', ['path', 'metadata', 'contenthash'])
def hash(data):
m = hashlib.sha256()
m.update(bytes(data, 'utf-8'))
return m.hexdigest... | iknow/nix-utils | oci/build-image-manifest.py | build-image-manifest.py | py | 3,280 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "collections.namedtuple",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "hashlib.sha256",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "argparse.ArgumentParser",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "os.path... |
32330400016 | import os
import requests
import time
import pyfiglet
req = requests.get('https://google.com')
os.system('clear')
print ("Fuck Dunia Percintaan")
time.sleep(1)
os.system('clear')
print ("\33[36;1m")
text = pyfiglet.figlet_format("SantriXploiter")
print (text)
print
print ("[1] Tentang SantriXploiter")
pri... | santrixploiter/santri | sx.py | sx.py | py | 1,344 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "requests.get",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "os.system",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "os.system",
"line_number": 9,
... |
37589968716 | '''
Build a tweet sentiment analyzer
'''
from __future__ import print_function
import six.moves.cPickle as pickle
import time
from collections import OrderedDict
import sys
import time
from sys import argv
import numpy
import theano
from theano import config
import theano.tensor as tensor
from theano.sandbox.rng_mrg i... | njustkmg/ACML17_DMS | dms.py | dms.py | py | 33,100 | python | en | code | 4 | github-code | 1 | [
{
"api_name": "imdb.load_data",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "numpy.random.seed",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 27,
"usage_type": "attribute"
},
{
"api_name": "numpy.asarray... |
30294078087 | import retrogamelib as rgl
import pygame, random, sys, os
from retrogamelib.constants import *
from objects import spritesheet, flip_images
class Intro(object):
def __init__(self):
load_image = rgl.util.load_image
self.oldman1 = spritesheet("data/lawn-mower.png", (96, 96))
self.bubbma... | randyheydon/BubbMan2-PND | lib/intro.py | intro.py | py | 3,742 | python | en | code | 4 | github-code | 1 | [
{
"api_name": "retrogamelib.util",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "objects.spritesheet",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "objects.spritesheet",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "object... |
21753112789 | # import the required modules and types for this example...
from typing import Any, Dict, List
# import the paginator and modal...
from discord.ext.modal_paginator import ModalPaginator, PaginatorModal
# import the discord.py module
import discord
from discord.ext import commands
bot = commands.Bot(command_prefix=c... | Soheab/modal-paginator | examples/verify_command.py | verify_command.py | py | 5,303 | python | en | code | 2 | github-code | 1 | [
{
"api_name": "discord.ext.commands.Bot",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "discord.ext.commands",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "discord.ext.commands.when_mentioned",
"line_number": 12,
"usage_type": "attribute"
},
{... |
15066006918 | from setuptools import setup
with open("README.md", "r") as fh:
long_description = fh.read()
setup(name='immudb-py',
version='1.4.0',
license="Apache License Version 2.0",
description='Python SDK for Immudb',
long_description=long_description,
long_description_content_type="text/mark... | codenotary/immudb-py | setup.py | setup.py | py | 1,404 | python | en | code | 40 | github-code | 1 | [
{
"api_name": "setuptools.setup",
"line_number": 6,
"usage_type": "call"
}
] |
6304937748 | import cv2
import math
import numpy as np
import pyautogui as gui
cap = cv2.VideoCapture(1)
while(cap.isOpened()):
ret, img = cap.read()
#cv2.resizeWindow('window1', 768,1366)
cv2.rectangle(img, (0,0), (200,200), (0,255,0),0) ##left hand rectangle
cv2.rectangle(img,(630,200),(430,0),(0,255,0),0) ##rig... | DB11051998/RGBGesture-control | gest.py | gest.py | py | 6,146 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "cv2.VideoCapture",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "cv2.rectangle",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "cv2.rectangle",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "cv2.cvtColor",
"line_... |
7990357254 | import logging
import os
from pprint import pprint
from gensim import corpora, models, similarities
logging.basicConfig(format='%(asctime)s : %(levelname)s : %(message)s', level=logging.INFO)
if (os.path.exists("tmp/mesh.dict")):
dictionary = corpora.Dictionary.load('tmp/mesh.dict')
corpus = corpora.MmCorpus('tm... | meetsha/gensim | test_models.py | test_models.py | py | 918 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "logging.basicConfig",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "logging.INFO",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "os.path.exists",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "os.path",
"line... |
37571536835 | from rest_framework import serializers
from .models import RedditPost, RedditPostSnapshot
class RedditPostSerializer(serializers.HyperlinkedModelSerializer):
# snapshots = serializers.HyperlinkedRelatedField(
# many=True,
# read_only=True,
# view_name='reddit_post_snapshots'
# )
c... | SDupZ/memex | reddit/serializers.py | serializers.py | py | 811 | python | en | code | 2 | github-code | 1 | [
{
"api_name": "rest_framework.serializers.HyperlinkedModelSerializer",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "rest_framework.serializers",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "models.RedditPost",
"line_number": 13,
"usage_type": ... |
1528409753 | import copy
import os
import numpy as np
from metadrive.manager.base_manager import BaseManager
from metadrive.scenario.scenario_description import ScenarioDescription as SD, MetaDriveType
from metadrive.scenario.utils import read_scenario_data, read_dataset_summary
class ScenarioDataManager(BaseManager):
DEFAU... | metadriverse/metadrive | metadrive/manager/scenario_data_manager.py | scenario_data_manager.py | py | 8,264 | python | en | code | 471 | github-code | 1 | [
{
"api_name": "metadrive.manager.base_manager.BaseManager",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "metadrive.engine.engine_utils.get_engine",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "metadrive.scenario.utils.read_dataset_summary",
"line_num... |
11710691906 |
"""
1. Imports and definitions
"""
# i) imports
import matplotlib.pyplot as plt
import torch
import pyro
import pyro.distributions as dist
from pyro.infer import SVI, Trace_ELBO
from pyro.optim import Adam
import seaborn as sns
"""
2. Data & stochastic model
"""
# i) Generate data
true_mean = torch.te... | atlasoptimization/stochastic_modelling | pyro_experiments/pyro_tests_posterior_v_model.py | pyro_tests_posterior_v_model.py | py | 3,463 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "torch.tensor",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "pyro.distributions.Normal",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "pyro.distributions",
"line_number": 27,
"usage_type": "name"
},
{
"api_name": "pyro.distri... |
35668813832 | import spacy
import json
nlp = spacy.load('en')
json_data = open('Book_Data_Set.json',encoding="utf8")
data = json.load(json_data)
title = ""
for i in range (0, 10):
doc = nlp(data[i]['description'])
for np in doc:
if np.pos_ == "NOUN" or np.pos_ == "PROPN":
print (np.text,end='****')
print()
| niraj1997/IT556_Magic-Squad_DA-IICT | Assignment 3/Q1.py | Q1.py | py | 316 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "spacy.load",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "json.load",
"line_number": 5,
"usage_type": "call"
}
] |
22992656893 | # -*- coding: utf-8 -*-
import asyncio
from playwright.async_api import async_playwright
from cf_clearance import async_retry, stealth_async
async def main():
async with async_playwright() as p:
browser = await p.chromium.launch(headless=False, proxy={"server": "socks5://localhost:7890"}, args=[
... | 0therGuys/cf_clearance | tests/test_async_cf.py | test_async_cf.py | py | 1,256 | python | en | code | null | github-code | 1 | [
{
"api_name": "playwright.async_api.async_playwright",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "cf_clearance.stealth_async",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "cf_clearance.async_retry",
"line_number": 25,
"usage_type": "call"
},
... |
70716332195 | from django.shortcuts import render, redirect
from django.contrib.auth.forms import AuthenticationForm # 비어있는 폼 제공
from django.contrib.auth import login as auth_login
from django.contrib.auth import logout as auth_logout
# Create your views here.
def login(request):
if request.method == 'POST': # 로그인폼을 입력하고 로그인을... | ysparrk/Django | 230322/01_auth_template/accounts/views.py | views.py | py | 1,386 | python | ko | code | 0 | github-code | 1 | [
{
"api_name": "django.contrib.auth.forms.AuthenticationForm",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "django.contrib.auth.login",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "django.shortcuts.redirect",
"line_number": 18,
"usage_type": "call... |
73276503395 | """
Microdeploy Configuration manager.
"""
import yaml
import glob
import re
import os
class Config(object):
# config = None
def __init__(self, config_filename=None, default_baudrate=115200, override={}):
if config_filename:
try:
with open(config_filename) as config_fil... | damiencorpataux/microdeploy | microdeploy/config.py | config.py | py | 5,313 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "yaml.load",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "yaml.Loader",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "yaml.scanner",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "yaml.scanner.ScannerErro... |
17715159341 | from django.conf.urls import url
from .views import (
get_articles_list,
home,
search_articles,
)
urlpatterns = [
# url(r'^create$', collection_create, name="create"),
# url(r'^(?P<slug>[\w-]+)/add$', link_add, name='add'),
# url(r'^(?P<slug>[\w-]+)(?:/(?P<tag>[\w-]+))?/$', collection_detail, ... | tohidur/HN_analysis | articles/urls.py | urls.py | py | 1,032 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "django.conf.urls.url",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "views.home",
"line_number": 16,
"usage_type": "argument"
},
{
"api_name": "django.conf.urls.url",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "views.get_ar... |
15891473847 | import os
import cv2 as cv
import numpy as np
imagedb_train = ('imagedb_train')
sift = cv.xfeatures2d_SIFT.create()
folders = os.listdir(imagedb_train)
def extract_local_features(path):
img = cv.imread(path)
kp = sift.detect(img)
desc = sift.compute(img, kp)
desc = desc[1]
retur... | SteliosMouslech/Computer-Vision-Duth | Project 3/CreateVoc_CreateTrainDiscs.py | CreateVoc_CreateTrainDiscs.py | py | 2,340 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "cv2.xfeatures2d_SIFT.create",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "cv2.xfeatures2d_SIFT",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "os.listdir",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "cv2.imr... |
33842505413 | #!/usr/bin/env python
import unittest
import os
import shutil
import multiprocessing
import glob
from matador.scrapers.castep_scrapers import res2dict
ROOT_DIR = os.getcwd()
REAL_PATH = "/".join(os.path.realpath(__file__).split("/")[:-1]) + "/"
TEST_DIR = REAL_PATH + "/tmp_test"
NUM_CORES = multiprocessing.cpu_count(... | ml-evs/ilustrado | ilustrado/tests/test_init.py | test_init.py | py | 3,373 | python | en | code | 2 | github-code | 1 | [
{
"api_name": "os.getcwd",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "os.path.realpath",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "multiprocessing.cpu_count",
... |
2542445603 |
import colors as c
from utils import ask
intro = c.orange + '''
Welcome to the orange quiz game!!!!!!
''' + c.reset
def q1():
color = ask(c.yellow + 'What is the color of an orange?' + c.reset)
if color == 'orange':
return True
print(c.red + 'You have failed' + c.reset)
return False
d... | gorroth1/python-1 | oranges.py | oranges.py | py | 748 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "colors.orange",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "colors.reset",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "utils.ask",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "colors.yellow",
"lin... |
43006106252 | # -*- mode: python ; coding: utf-8 -*-
from PyInstaller.utils.hooks import collect_submodules
hiddenimports = ['scipy.spatial.transform._rotation_groups', 'sqlalchemy.sql.default_comparator', 'sklearn.metrics._pairwise_distances_reduction._datasets_pair', 'sklearn.neighbors._partition_nodes', 'sklearn.metrics._pairwis... | labsyspharm/scope2screen | scope2screen_mac.spec | scope2screen_mac.spec | spec | 1,564 | python | en | code | 13 | github-code | 1 | [
{
"api_name": "PyInstaller.utils.hooks.collect_submodules",
"line_number": 5,
"usage_type": "call"
}
] |
40033104803 | # -*-coding: utf-8 -*-
# Python 3.6
# Author:Zhang Haitao
# Email:13163385579@163.com
# TIME:2018-08-15 16:04
# NAME:zht-wind_api.py
import datetime
import multiprocessing
import pickle
from WindPy import w
from utils.dateu import get_today
import numpy as np
DIR=r'e:\tmp_wind'
w.start()
import pandas as pd
impor... | luilui163/zht | data/wind/wind_api.py | wind_api.py | py | 4,251 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "WindPy.w.start",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "WindPy.w",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "multiprocessing.Pool",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "utils.dateu.get_today",
... |
37658889204 | #!./icao-venv/bin/python3
# needs: opencv2-python
# opencv2-contrib-python
# dlib
import os
from pathlib import Path
import sys
import cv2
import dlib
import numpy as np
import json
show_rectangle = False
# set here, where to look for pretrained models:
datadir = Path("data")
# following fi... | Anaeijon/icao_check | geometry_check/geometry_check.py | geometry_check.py | py | 8,700 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "pathlib.Path",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
"line_number": 28,
"usage_type": "name"
},
{
"api_name": "pathlib.Path",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "sys.stderr",
"line_number"... |
26923650558 | from flask import request, jsonify, Blueprint
from flask_jwt_extended import jwt_required, current_user
from models.Containers_model import Container
from models.Image_model import Image
from models.db import db
from controller import Containers_controller as containerctl
from utils import check_authorization
containe... | abhirambsn/stuniq-web-desktop | backend/routes/Container_routes.py | Container_routes.py | py | 7,313 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "flask.Blueprint",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "models.Image_model.Image.query.filter_by",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "models.Image_model.Image.query",
"line_number": 14,
"usage_type": "attribute"
}... |
29720274088 | from mako import runtime, filters, cache
UNDEFINED = runtime.UNDEFINED
__M_dict_builtin = dict
__M_locals_builtin = locals
_magic_number = 4
_modified_time = 1224684001.22454
_template_filename='/media/disk/Pylons Book/Code/chapter06/FormExample-01/formexample/templates/derived/form.html'
_template_uri='/derived/form.h... | Apress/def-guide-to-pylons | Code/chapter06/FormExample-01/data/templates/derived/form.html.py | form.html.py | py | 5,241 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "mako.runtime.UNDEFINED",
"line_number": 2,
"usage_type": "attribute"
},
{
"api_name": "mako.runtime",
"line_number": 2,
"usage_type": "name"
},
{
"api_name": "mako.cache.Cache",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "mako.cache",
... |
21026304473 | # -*- coding: utf-8 -*-
"""
Created on Wed Apr 12 14:13:33 2017
预处理获取小波系数、重构系数、模极大值
对预处理后的序列进行特征提取,包括能量、归一化能量、能量熵、能量矩、排列熵、近似熵、样本熵、最大Lyapunov指数、灰度矩
分形维数、奇异熵
@author: baishuhua
"""
import pywt
import numpy as np
from scipy import stats
import sys
sys.path.append('E:\\大数据\\基础研究\\HilbertHuang变换')
import HilbertHuang
impor... | baishuhuaGitHub/Transformer-Simulink | DwtFeatureExtraction.py | DwtFeatureExtraction.py | py | 14,858 | python | en | code | 3 | github-code | 1 | [
{
"api_name": "sys.path.append",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "matplotlib.pyplot.rcParams",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "matplot... |
40572030080 | #! /usr/bin/env python
# -*- coding : utf-8 -*-
import os
import re
import ujson
from dotmap import DotMap
from subprocess import check_output
from datetime import datetime, timedelta
# output = '(Connected)' in check_output( "scutil --nc list".split( ' ' ) ).decode( 'utf-8' )
# print( output )
refresh_delt... | subokita/dashboard | api/modules/test.py | test.py | py | 801 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "datetime.timedelta",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.utcnow",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "datetim... |
39624609295 | # author: Jeremy Temple, Eli Manning
import enum
class Tokens(object):
def __init__(self):
self._data = []
def __iter__(self):
return iter(self._data)
def append(self, token):
self._data.append(token)
@property
def lookahead(self):
return self._data[0]
def c... | ECManning/Computer-Testing-Sictc | token_v1.py | token_v1.py | py | 1,593 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "enum.Enum",
"line_number": 27,
"usage_type": "attribute"
},
{
"api_name": "enum.auto",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "enum.auto",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "enum.auto",
"line_number": 30,... |
26355673371 | import importlib
from pathlib import Path, PurePath
import glob
import os
import logging
import numpy as np
from pydub import AudioSegment
import pandas as pd
import cv2
# TODO: General solution
# TODO: Can string_filtering be called by generate_filenames?
# TODO: output only benign file?
# TODO: think about input ... | wdwlinda/Snoring_Detection_full | dataset/dataset_utils.py | dataset_utils.py | py | 23,868 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "os.path.split",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 37,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": ... |
73034200353 | # -*- coding: utf-8 -*-
'''
:codeauthor: :email:`Rahul Handay <rahulha@saltstack.com>`
'''
# Import Python Libs
from __future__ import absolute_import
# Import Salt Testing Libs
from salttesting import TestCase, skipIf
from salttesting.helpers import ensure_in_syspath
from salttesting.mock import (
MagicMock,... | shineforever/ops | salt/tests/unit/states/mdadm_test.py | mdadm_test.py | py | 3,815 | python | en | code | 9 | github-code | 1 | [
{
"api_name": "salttesting.helpers.ensure_in_syspath",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "salt.states.mdadm.__salt__",
"line_number": 25,
"usage_type": "attribute"
},
{
"api_name": "salt.states.mdadm",
"line_number": 25,
"usage_type": "name"
},
... |
4154952558 | #
#
# UtmTrav : calculation of an open and cloded traverse
# projected on planeor UTM projected grid.
#
#
from pygeodesy.dms import toDMS, parseDMS
from pygeodesy import Utm,parseUTM5,Ellipsoids
import pandas as pd
import geopandas as gpd
import matplotlib.pyplot as plt
import numpy as np
import yaml,sys
from... | phisan-chula/Construction_Survey | UtmTraverse/UtmTrav.py | UtmTrav.py | py | 13,935 | python | en | code | 3 | github-code | 1 | [
{
"api_name": "pygeodesy.dms.parseDMS",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "yaml.safe_load",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame.from_dict",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "pand... |
18927725262 | #!/usr/bin/env python3.8
"""
Author : Kashif Khan
This script helps to search Endpoint in following criteria.
1: All results
2: Filter by Node ID
3: Filter by EPG
4: Filter by VLAN ID
5: Filter by Interface Name
6: Filter by Tenant Name
7: Filter by MAC Address
"""
# Imports block
from connectivity import get_aci_tok... | me-kashif/dcops | get_ep_details.py | get_ep_details.py | py | 7,553 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "requests.get",
"line_number": 46,
"usage_type": "call"
},
{
"api_name": "prettytable.PrettyTable",
"line_number": 99,
"usage_type": "call"
},
{
"api_name": "csv.DictWriter",
"line_number": 134,
"usage_type": "call"
},
{
"api_name": "connectivity.get... |
39411332651 | import pyrealsense2 as rs
import numpy as np
from pybot.cmn_structs import *
from pybot.sensor_structs import *
class RealsenseInterface():
def __init__(self):
self.pipeline = rs.pipeline()
config = rs.config()
config.enable_stream(rs.stream.depth,1280, 720, rs.format.z16, 30)
confi... | glebshevchukk/pybot | pybot/interfaces/realsense_interface.py | realsense_interface.py | py | 2,167 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "pyrealsense2.pipeline",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "pyrealsense2.config",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "pyrealsense2.stream",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "pyre... |
23999295068 | import os
import pickle
import numpy as np
import pandas as pd
import sdv
from imblearn.over_sampling import RandomOverSampler
from imblearn.under_sampling import RandomUnderSampler
from scipy.stats import pearsonr
from sklearn import preprocessing
from sklearn.feature_selection import VarianceThreshold
from sklearn.li... | PHAIR-Consortium/POPF-Predictor | utils.py | utils.py | py | 6,758 | python | en | code | 3 | github-code | 1 | [
{
"api_name": "settings.file_extension",
"line_number": 23,
"usage_type": "name"
},
{
"api_name": "settings.file_extension",
"line_number": 25,
"usage_type": "name"
},
{
"api_name": "os.path.exists",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "os.pat... |
16914709414 | import discord
import os
import json
import gspread
from oauth2client.service_account import ServiceAccountCredentials
import asyncio
import random
from keep_alive import keep_alive
scope = ["https://spreadsheets.google.com/feeds",'https://www.googleapis.com/auth/spreadsheets',"https://www.googleapis.com/auth/drive.f... | amberosia/SecretSantaBot2022 | main.py | main.py | py | 12,031 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "oauth2client.service_account.ServiceAccountCredentials.from_json_keyfile_dict",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "oauth2client.service_account.ServiceAccountCredentials",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "json.loads",... |
8139560888 | from collections import defaultdict
class Solution:
def calcEquation(self, equations: list, values: list, queries: list) -> list:
graph = defaultdict(list)
for i in range(len(equations)):
d1, d2 = equations[i]
val = values[i]
graph[d1].append((d2, val))
... | MinecraftDawn/LeetCode | Medium/399. Evaluate Division.py | 399. Evaluate Division.py | py | 902 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "collections.defaultdict",
"line_number": 6,
"usage_type": "call"
}
] |
27863867426 | import torch
import torch.nn as nn
import torch.optim as optim
import torchtext
from torchtext.datasets import SST
from torchtext.data import Field, LabelField, BucketIterator
from torchtext.vocab import Vectors, GloVe, CharNGram, FastText
import time
import torch.nn.functional as F
from network import LSTM
i... | shiml20/Deep-Learning-Basic-Code | NLP/main.py | main.py | py | 6,336 | python | en | code | 3 | github-code | 1 | [
{
"api_name": "warnings.filterwarnings",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "argparse.ArgumentParser",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "torchtext.data.Field",
"line_number": 57,
"usage_type": "call"
},
{
"api_name": "... |
36585832061 | # Idea was thought of back in June of 2016 in regards to creating a way for qvpython script to easily manipulate an excel spreadsheet. After obtaining help from Vaso Vasich, this script was actually made in an effort by Vaso Vasich under the SDEP business, which is a subset of Arce Enterprises.
# 2016
# First Author: V... | serbboy23/SDEP | addProducts.py | addProducts.py | py | 10,350 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "openpyxl.load_workbook",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "openpyxl.styles.Alignment",
"line_number": 68,
"usage_type": "call"
},
{
"api_name": "openpyxl.styles.Alignment",
"line_number": 70,
"usage_type": "call"
},
{
"api_na... |
74540222432 | # coding: utf-8
from traitlets import Type, Instance, default
from .baseapp import NbGrader
from ..plugins import ExportPlugin, CsvExportPlugin
from ..api import Gradebook
aliases = {
'log-level' : 'Application.log_level',
'db': 'CourseDirectory.db_url',
'to' : 'ExportPlugin.to',
'exporter': 'ExportAp... | jupyter/nbgrader | nbgrader/apps/exportapp.py | exportapp.py | py | 2,458 | python | en | code | 1,232 | github-code | 1 | [
{
"api_name": "baseapp.NbGrader",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "traitlets.Type",
"line_number": 56,
"usage_type": "call"
},
{
"api_name": "plugins.CsvExportPlugin",
"line_number": 57,
"usage_type": "argument"
},
{
"api_name": "plugins.E... |
31904422454 | # dash_callbacks.py
from dash.dependencies import Input, Output
from dashboard.dash_app import app
from dashboard.dash_aux import get_pending_html_table
from session.sc_helpers import QuitMode
from dashboard.sc_df_manager import DataframeManager
from binance import enums as k_binance
from datetime import datetime, tim... | xavibenavent/scorpius | src/dashboard/dash_callbacks.py | dash_callbacks.py | py | 20,621 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "dashboard.sc_df_manager.DataframeManager",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.now",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 31,
"usage_type": "name"
},
{
"... |
34576692489 | import argparse
import os
import pickle
from datetime import datetime, timedelta
from matplotlib.dates import YearLocator, DateFormatter, MonthLocator
import numpy
from matplotlib import pyplot as plt
from pandas.io.data import get_data_yahoo
class Investor(object):
"""Represents a single investor with initial c... | wgaggioli/capeval | capeval.py | capeval.py | py | 9,742 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "datetime.datetime.now",
"line_number": 87,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 87,
"usage_type": "name"
},
{
"api_name": "numpy.empty",
"line_number": 97,
"usage_type": "call"
},
{
"api_name": "numpy.empty",
... |
11011921362 | from django.urls import path
from app_feria.views import *
from django.contrib.auth.views import LogoutView
from app_feria import views
"""
urlpatterns = [
path('', inicio, name="Inicio"),
path('vuelo/', vuelo),
path('personal/', personal),
path('pasajero/', pasajero),
path('sobrenostros', sobrenos... | Luciano02-web/feriaweb | app_feria/urls.py | urls.py | py | 6,629 | python | es | code | 0 | github-code | 1 | [
{
"api_name": "django.urls.path",
"line_number": 59,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 60,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 61,
"usage_type": "call"
},
{
"api_name": "django.urls.path",... |
74270410272 | ## modified the code: args.batch_size_val == 1
import os
import random
import numpy as np
import torch
import torch.backends.cudnn as cudnn
import torch.nn as nn
import torch.nn.functional as F
import torch.nn.parallel
import torch.utils.data
from visdom_logger import VisdomLogger
from collections import defaultdict
f... | glbreeze/RePRI_FSS | src/test_ida.py | test_ida.py | py | 12,481 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "argparse.REMAINDER",
"line_number": 33,
"usage_type": "attribute"
},
{
"api_name": "util.load_cfg_from_cfg_file",
"line_number": 36,
"usage_type": "call"
},
{
"api_n... |
37932378891 | import csv
import datetime
FILE_NAME_READ = "Before Eod.csv"
FILE_NAME_WRITE = "After Eod.csv"
FIELDS_NAME = [
"id",
"Nama",
"Age",
"Balanced",
"No 2b Thread-No",
"No 3 Thread-No",
"Previous Balanced",
"Average Balanced",
"No 1 Thread-No",
"Free Transfer",
"No 2a Thread-No",... | ikhwankhaliddd/Test-Techinical-ALAMI-Backend | Python Solution/without_thread.py | without_thread.py | py | 2,404 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "datetime.datetime.now",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 31,
"usage_type": "attribute"
},
{
"api_name": "csv.DictReader",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "datetime.... |
4422201464 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Tests for :mod:`orion.algo.evolution_es`."""
import copy
import hashlib
import numpy as np
import pytest
from orion.algo.evolution_es import BracketEVES, EvolutionES, compute_budgets
from orion.algo.space import Fidelity, Real, Space
@pytest.fixture
def space():
... | lebrice/orion | tests/unittests/algo/test_evolution_es.py | test_evolution_es.py | py | 11,353 | python | en | code | null | github-code | 1 | [
{
"api_name": "orion.algo.space.Space",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "orion.algo.space.Real",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "orion.algo.space.Fidelity",
"line_number": 20,
"usage_type": "call"
},
{
"api_name":... |
30076925049 | from selenium import webdriver
from selenium.webdriver.common.by import By
from web_test_base import WebTestBase
from selenium.common.exceptions import NoSuchElementException
from selenium.webdriver.common.keys import Keys
class TestOrder(WebTestBase):
def test_valid_zipcode_works(self):
driver = self.dr... | NTI-Gymnasieingenjor/pizza | tests/webtests/test_order.py | test_order.py | py | 1,654 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "web_test_base.WebTestBase",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "selenium.webdriver.common.by.By.CLASS_NAME",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "selenium.webdriver.common.by.By",
"line_number": 14,
"usage_type... |
30352443016 | from config import *
from lib import cords, led
from utils.time import sleep_ms
def _is_row(side):
return side == cords.TOP or side == cords.BOTTOM
def lines(gen, source=cords.TOP):
side = DISPLAY_ROWS if _is_row(source) else DISPLAY_COLUMNS
other_side = DISPLAY_COLUMNS if _is_row(source) else DISPLAY_R... | LeLuxNet/GridPy | animations/coded/lines.py | lines.py | py | 714 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "lib.cords.TOP",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "lib.cords",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "lib.cords.BOTTOM",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "lib.cords.TOP",
"... |
44962919854 | from tkinter import *
from tkinter import messagebox
from PIL import ImageTk, Image
import pygame
import time
import threading
import serial
pygame.mixer.init()
arduinoData = serial.Serial('COM3', 9600)
test = False
musica = False
'''
Esta función se encarga de crear la ventana principal, donde se muestra la consola d... | josuect0212/Proyecto-3-Robot-con-Control-CE-1102 | ProyectoIII.py | ProyectoIII.py | py | 8,931 | python | es | code | 0 | github-code | 1 | [
{
"api_name": "pygame.mixer.init",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "pygame.mixer",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "serial.Serial",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "PIL.ImageTk.PhotoImag... |
17847754743 |
from __future__ import nested_scopes
from twisted.internet import defer
import sys
class _DeferredCache:
""" Wraps a call that returns a deferred in a cache. Any subsequent
calls with the same argument will wait for the first call to
finish and return the same result (or errback).
"""
ha... | rcarmo/divmod.org | Sine/xshtoom/defcache.py | defcache.py | py | 3,176 | python | en | code | 10 | github-code | 1 | [
{
"api_name": "twisted.internet.defer.Deferred",
"line_number": 72,
"usage_type": "call"
},
{
"api_name": "twisted.internet.defer",
"line_number": 72,
"usage_type": "name"
},
{
"api_name": "sys.version_info",
"line_number": 89,
"usage_type": "attribute"
}
] |
42698701042 | import socket
from socket import setdefaulttimeout
import ipaddress
import itertools
import json
from multiprocessing.pool import ThreadPool
import subprocess
import argparse
import base64
import os
class IPScan():
def __init__(self):
setdefaulttimeout(0.10)
self.open_ports = []
self.ports ... | JetBlackHackerCat/RedPython | NetworkScan.py | NetworkScan.py | py | 2,104 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "socket.setdefaulttimeout",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "ipaddress.IPv4Address",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "ipaddress.IPv4Address",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "... |
39951557453 | import pygame
import sys
class UI:
def __init__(self, UIdeck):
self.drawMap = {0:self.drawPlayer1, 1:self.drawPlayer2, 2:self.drawPlayer3, 3:self.drawPlayer4}
self.discardMap = {0:self.discardCardP1, 1:self.discardCardP2, 2:self.discardCardP3, 3:self.discardCardP4}
pygame.init()
wi... | mseverinov/Uno | draw.py | draw.py | py | 15,510 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "pygame.init",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "pygame.display.set_mode",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "pygame.display",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "pygame.display... |
10786776517 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import requests
from bs4 import BeautifulSoup as bs
def get_historical_data(name, number_of_days):
data = []
url = "https://finance.yahoo.com/quote/" + name + "/history/"
content = requests.get(url).content
rows = bs(content, 'html.parser').findAll('table... | missweetcxx/fragments | projects/yahoo_finance/get_historical_data.py | get_historical_data.py | py | 658 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "requests.get",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 12,
"usage_type": "call"
}
] |
11131287505 | from urllib.request import Request, urlopen
from fake_useragent import UserAgent
import json
import csv
headers = {"user-agent": UserAgent().chrome, "referer": "https://finance.daum.net/"}
path = "./RPAbasic/crawl/download/"
data = []
try:
url = "https://finance.daum.net/api/search/ranks?limit=10"
res = urlope... | hayeong25/Python_Soldesk | rpa/crawl/urllib/5_daum_kosdaq.py | 5_daum_kosdaq.py | py | 2,167 | python | ko | code | 0 | github-code | 1 | [
{
"api_name": "fake_useragent.UserAgent",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "urllib.request.urlopen",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "urllib.request.Request",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": ... |
16515330397 | import torch
import pytorch_ssim
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
nc = 3
imsize = 256
def ssim(img, ref,weight_ssim):
img = img.reshape(1, nc, imsize, imsize)
img.requires_grad_()
ssim_value = pytorch_ssim.ssim(ref, img)
ssim_loss = pytorch_ssim.SSIM()
... | XG196/MAD613 | ssim.py | ssim.py | py | 885 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "torch.device",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "torch.cuda.is_available",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "torch.cuda",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "pytorch_ssim.ssim",... |
28729835092 | from datetime import timedelta
from random import randint, choices
import faker_commerce
from django.core.management.base import BaseCommand
from django_seed import Seed
from faker import Faker
from catalog.models import Category, Discount, Producer, Promocode, Product
class Command(BaseCommand):
help = "Fillin... | maximchikAlexandr/shop | catalog/management/commands/fakedata.py | fakedata.py | py | 3,802 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "django.core.management.base.BaseCommand",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "django_seed.Seed.seeder",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "django_seed.Seed",
"line_number": 21,
"usage_type": "name"
},
{
"... |
12579239104 | #defino librerias
import csv
import datetime as ti
#constantes y variables
opciones="""
Bienvenido
__________________________
seleccione una opcion
1.Ingresar datos
2.salir
"""
runTime=True
datetime = ti.date.today()
#funciones
"""Recive el nombre del archivo atraves de un input de usuario y si el... | NicolasGabM/Cheques | listado_cheques.py | listado_cheques.py | py | 3,145 | python | es | code | 0 | github-code | 1 | [
{
"api_name": "datetime.date.today",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "datetime.date",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "csv.reader",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "csv.writer",
"l... |
12651433402 | import requests
import re
# Manual PDF: https://www.correios.com.br/a-a-z/pdf/rastreamento-de-objetos/manual_rastreamentoobjetosws.pdf
class Objeto(object):
def __init__(self, *args, **kwargs):
self.cepDestino = ""
self.dataPostagem = ""
self.eventos = list()
self.numero = kwargs.g... | lmassaoy/docker-rastreio-correios | python/external_communication/correios.py | correios.py | py | 5,318 | python | pt | code | 12 | github-code | 1 | [
{
"api_name": "requests.post",
"line_number": 149,
"usage_type": "call"
},
{
"api_name": "re.match",
"line_number": 163,
"usage_type": "call"
},
{
"api_name": "re.match",
"line_number": 169,
"usage_type": "call"
}
] |
26598747074 | import sqlite3 as sql
import json
import os
from datetime import datetime
db = sql.connect('MainScripts/JIRATable.sqlite')
c = db.cursor()
#
# c.execute('drop table if exists JIRAData')
c.execute('''create table if not exists JIRAData (Key text, Status text, Summary text,Reporter text,IssueCreatedOn text, IssueUpdate... | kleban31/Webscrape-JIRA-Python | MainScripts/ins_JIRAData.py | ins_JIRAData.py | py | 1,055 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "sqlite3.connect",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "json.load",
"line_number": 17,
"usage_type": "call"
}
] |
3516381702 | import stanza
import json,re
# # stanza.download('en') # This downloads the English models for the neural pipeline
nlp = stanza.Pipeline('en') # This sets up a default neural pipeline in English
field = "yugioh"
f = open(field+"_entitys.json")
field_entitys = json.load(f)
f.close()
max_num = 5000
def exist(tex... | leezythu/MetaBLINK | pseudo_sample.py | pseudo_sample.py | py | 3,469 | python | en | code | 3 | github-code | 1 | [
{
"api_name": "stanza.Pipeline",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "json.load",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 38... |
15976848887 | #!/usr/bin/env python
# coding: utf-8
import numpy as np
import librosa
from pathlib import Path
from microphone import record_audio
import matplotlib.mlab as mlab
from os import listdir
from os.path import isfile, join
import song_titles_artists as sta
def load_song_from_path(path: str):
"""
Loads a son... | andrewyang89/spectrazam | song_loading.py | song_loading.py | py | 2,915 | python | en | code | 2 | github-code | 1 | [
{
"api_name": "pathlib.Path",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "librosa.load",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "librosa.get_duration",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "numpy.max",
"line_... |
34707682040 | """A Flask webapp.
Application factory.
From the ``Flask`` docs:
Instead of creating a ``Flask`` instance globally, we will create
it inside a function. This function is known as the application
factory. Any configuration, registration, and other set up the
application needs will happen inside the fu... | jshwi/jss | app/__init__.py | __init__.py | py | 1,447 | python | en | code | 4 | github-code | 1 | [
{
"api_name": "flask.Flask",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "app.config.init_app",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "app.config",
"line_number": 42,
"usage_type": "name"
},
{
"api_name": "app.log.init_app",
"li... |
15007520934 | """Handles different kind of browser streams."""
import copy
import logging
from typing import Dict
import cv2
import imutils
import tornado.ioloop
import tornado.web
from tornado.queues import Queue
from viseron.config.config_camera import MJPEG_STREAM_SCHEMA
from viseron.const import TOPIC_FRAME_PROCESSED, TOPIC_S... | patmosxx-v2/viseron | viseron/webserver/stream_handler.py | stream_handler.py | py | 7,556 | python | en | code | null | github-code | 1 | [
{
"api_name": "logging.getLogger",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "tornado.ioloop.web",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "tornado.ioloop",
"line_number": 22,
"usage_type": "name"
},
{
"api_name": "viseron.nvr.... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.