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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
42579037186 | import math
import datetime
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from matplotlib import style
from sklearn import preprocessing, model_selection, svm
from sklearn.linear_model import LinearRegression
style.use('ggplot')
#reading from excel converting into data frame
df=pd.read_excel(... | rajdeep7dev/Prediction-of-stock-prices | ml_1.py | ml_1.py | py | 2,335 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "matplotlib.style.use",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "matplotlib.style",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "pandas.read_excel",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "math.ceil",
... |
9193307146 | import os
import copy
import pytorch_lightning as pl
from pytorch_lightning import profiler
import pytorch_lightning.core.lightning as lightning
from pytorch_lightning.callbacks.model_checkpoint import ModelCheckpoint
import torch.nn as nn
from pytorch_lightning.loggers import WandbLogger
from datetime import dateti... | tibe97/thesis-self-supervised-learning | lightly/embedding/_base.py | _base.py | py | 4,499 | python | en | code | 2 | github-code | 36 | [
{
"api_name": "pytorch_lightning.core.lightning.LightningModule",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "pytorch_lightning.core.lightning",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "os.getcwd",
"line_number": 43,
"usage_type": "call... |
2483212505 | '''
Descripttion:
version:
Author: WGQ
Date: 2021-11-11 14:40:28
LastEditors: WGQ
LastEditTime: 2021-11-12 17:58:46
'''
from . import adminApi
import time
from fastapi import Query, Depends, Body, Form,Request
from playhouse.shortcuts import model_to_dict
from model.RModel import *
from common import Func, Utils
fro... | foreversun52/cgserver | adminapi/Country.py | Country.py | py | 2,267 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "fastapi.Request",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "fastapi.Form",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "fastapi.Depends",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "utils.UserAuthUtil.verif... |
39279563732 | import sys
from PyQt5 import QtCore
from PyQt5.QtWidgets import QDialog, QApplication, QPushButton, QVBoxLayout, QShortcut
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas
import matplotlib.pyplot as plt
import pandas as pd
from readFitsSlim import Spectra
class Window(QDial... | grd349/LearningLAMOST | Chris/Temp_Model/SpectraUI.py | SpectraUI.py | py | 3,429 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "PyQt5.QtWidgets.QDialog",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "PyQt5.QtCore.Qt",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "PyQt5.QtCore",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "PyQt5.QtCor... |
4430086553 | '''Given a string S, you need to remove all the duplicates.
That means, the output string should contain each character only once.
The respective order of characters should remain same, as in the input string.
Sample Input 1 :
ababacd
Sample Output 1 :
abcd
'''
from collections import OrderedDict
def uniqueCh... | Riyachauhan11/Python-learning-Concepts | dictionaries/Extract Unique characters.py | Extract Unique characters.py | py | 553 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "collections.OrderedDict",
"line_number": 20,
"usage_type": "call"
}
] |
35827193676 | """
This is the core file in the `gradio` package, and defines the Interface class, including methods for constructing the
interface using the input and output types.
"""
import tempfile
import traceback
import webbrowser
import gradio.inputs
import gradio.outputs
from gradio import networking, strings
fr... | parvez0722/Sugesstion_of_next_word | venv/Lib/site-packages/gradio/interface.py | interface.py | py | 17,457 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "analytics.write_key",
"line_number": 26,
"usage_type": "attribute"
},
{
"api_name": "requests.get",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "requests.ConnectionError",
"line_number": 30,
"usage_type": "attribute"
},
{
"api_name": "w... |
5818279983 | from Algorithms.Usefull_elements import Step, intersection, addition, get_edges, invert_Graph, vertex_list_to_str, hsv_to_hex, replace_color
import copy
from collections import defaultdict
def algorithm_depth_first_search(matrix):
mass = list() # массив смежных вершин
vertex_mark = dict() # объявление пустого ... | VelandMerl/graph_bauman_centuary_presents | Algorithms/Topological_Sort.py | Topological_Sort.py | py | 21,006 | python | ru | code | 1 | github-code | 36 | [
{
"api_name": "copy.deepcopy",
"line_number": 56,
"usage_type": "call"
},
{
"api_name": "Algorithms.Usefull_elements.Step",
"line_number": 62,
"usage_type": "call"
},
{
"api_name": "Algorithms.Usefull_elements.get_edges",
"line_number": 79,
"usage_type": "call"
},
{
... |
12560528102 | from flask import Flask, jsonify, request, redirect, Response, render_template
import requests
from config import api_key, cam_names, rover_det
app = Flask(__name__)
@app.route('/')
def home():
return render_template("index.html")
@app.route('/rover', methods = ['POST'])
def rover():
rov_name = request.form['optro... | brianr0922/mars_rover | main.py | main.py | py | 2,308 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "flask.Flask",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "flask.render_template",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "flask.request.form",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "flask.request... |
72393817384 | import sys
import time
import random
import pygame as pg
pg.init()
WIDTH, HEIGHT = 800, 600
FPS = 60
window = pg.display.set_mode((WIDTH, HEIGHT))
clock = pg.time.Clock()
"""Добавление иконки и названия игры"""
pg.display.set_caption('Flappy bird')
pg.display.set_icon(pg.image.load(r'images/icon.png'... | ArtemTroshkin/FlappyBird | main.py | main.py | py | 6,760 | python | ru | code | 0 | github-code | 36 | [
{
"api_name": "pygame.init",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "pygame.display.set_mode",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "pygame.display",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "pygame.time.Cl... |
43810341653 | import matplotlib.pyplot as plt
from matplotlib import gridspec
import numpy as np
distance = 40
def create_poles(poles):
y = np.zeros(distance)
for p in poles:
y[p] = 1
x = range(distance)
plt.stem(x, y, use_line_collection=True)
def plot_robot_measurement(poles, pos, gs):
plt.subplot(... | WuStangDan/localization | assignment3/sim/plot.py | plot.py | py | 2,643 | python | en | code | 3 | github-code | 36 | [
{
"api_name": "numpy.zeros",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.stem",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "matplotlib.pyplot... |
73744164585 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals, print_function
from django.db import migrations
import ielex.lexicon.models as models
def forwards_func(apps, schema_editor):
print('Updating clades for all languages..')
Language = apps.get_model('lexicon', 'Language')
for l in Language.obj... | lingdb/CoBL-public | ielex/lexicon/migrations/0049_update_languageClade.py | 0049_update_languageClade.py | py | 748 | python | en | code | 3 | github-code | 36 | [
{
"api_name": "ielex.lexicon.models.Language.updateClades",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "ielex.lexicon.models.Language",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "ielex.lexicon.models",
"line_number": 11,
"usage_type": "na... |
74481651624 | from copy import deepcopy
from config.irl_config import IRLConfig
from config.rl_config import RLConfig
from env_design.envs import ENV_MAKERS
class ConfigBuilder(dict):
def __init__(
self,
num_gpus=0,
num_workers=0,
rl_algo=None,
irl_algo=None,
... | Ojig/Environment-Design-for-IRL | ed_airl/config/builder.py | builder.py | py | 2,019 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "config.rl_config.RLConfig",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "config.irl_config.IRLConfig",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "copy.deepcopy",
"line_number": 80,
"usage_type": "call"
}
] |
15744675717 | import functools
import hashlib
import os
import sys
import time
from typing import NamedTuple
from git_command import git_require
from git_command import GitCommand
from git_config import RepoConfig
from git_refs import GitRefs
_SUPERPROJECT_GIT_NAME = "superproject.git"
_SUPERPROJECT_MANIFEST_NAME = "superproject_... | GerritCodeReview/git-repo | git_superproject.py | git_superproject.py | py | 17,995 | python | en | code | 267 | github-code | 36 | [
{
"api_name": "typing.NamedTuple",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "typing.NamedTuple",
"line_number": 27,
"usage_type": "name"
},
{
"api_name": "typing.NamedTuple",
"line_number": 36,
"usage_type": "name"
},
{
"api_name": "os.path.join",
... |
42778925613 | import json
import logging
from io import BytesIO
from typing import Optional
import pandas as pd
import requests
from pydantic import Field, SecretStr
from toucan_connectors.common import ConnectorStatus
from toucan_connectors.toucan_connector import ToucanConnector, ToucanDataSource
class NetExplorerDataSource(To... | ToucanToco/toucan-connectors | toucan_connectors/net_explorer/net_explorer_connector.py | net_explorer_connector.py | py | 3,536 | python | en | code | 16 | github-code | 36 | [
{
"api_name": "toucan_connectors.toucan_connector.ToucanDataSource",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "typing.Optional",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "toucan_connectors.toucan_connector.ToucanConnector",
"line_number": 19,
... |
25966299187 |
import Tkinter as tk
import ScrolledText
import numpy as np
import matplotlib as mpl
import matplotlib.backends.tkagg as tkagg
from matplotlib.backends.backend_agg import FigureCanvasAgg
import sklearn.gaussian_process as skgp
import evaluatorGUI as eg
import matplotlib.pyplot as plt
import scipy.optimize
import time
... | Hampswitch/ReciprocationGUI | reciprocation/GPvisualizer.py | GPvisualizer.py | py | 8,347 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "matplotlib.backends.backend_agg.FigureCanvasAgg",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "Tkinter.PhotoImage",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "matplotlib.backends.tkagg.blit",
"line_number": 31,
"usage_type": "cal... |
12685763897 | from moduleBaseClass import ModuleBaseClass
from StringIO import StringIO
from PIL import Image
class Module(ModuleBaseClass):
def __init__(self):
self.header = 'x42\x4d'
self.name = 'bmp'
def final_check(self, raw):
try:
Image.open(StringIO(raw))
return True
... | tengwar/xorstuff | modules/bmp.py | bmp.py | py | 360 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "moduleBaseClass.ModuleBaseClass",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "PIL.Image.open",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "PIL.Image",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "StringIO.Stri... |
38192330286 | import os
from django.conf import settings
from django.http import HttpResponse
from django.shortcuts import get_object_or_404
from django.template.loader import get_template
from xhtml2pdf import pisa
from ..models import *
from django.contrib.auth.models import User
from django.contrib.staticfiles import find... | luggiestar/kahama | KCHS/views/download_pdf_files_views.py | download_pdf_files_views.py | py | 2,550 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "django.contrib.staticfiles.finders.find",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "django.contrib.staticfiles.finders",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "os.path.realpath",
"line_number": 21,
"usage_type": "call"
}... |
37373287317 | import math
import torch
from torch import nn
import torch.nn.functional as F
class SelfAttentionLayer(nn.Module):
'''
Self attention layer
'''
def __init__(self, hidden_size, num_attention_heads, dropout_prob):
super().__init__()
self.hidden_size = hidden_size
self.num_att... | ZZR8066/SEMv2 | SEMv2/libs/model/transformer.py | transformer.py | py | 4,423 | python | en | code | 2 | github-code | 36 | [
{
"api_name": "torch.nn.Module",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "torch.nn.Linear",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line_numb... |
44850642568 | #!/usr/bin/env python3
#
# Add metadata from Apple Podcasts to cached mp3s
# so they sync to Garmin Watches with appropriate
# metadata
# ---------------
# Michael Oliver, 2022, MIT License
#
# Standing on the shoulders of giants:
# Modified prior art and inspiration by Douglas Watson
# https://douglas-watson.g... | mcoliver/fixPodcastMetadata | fixPodcastMetadata.py | fixPodcastMetadata.py | py | 2,652 | python | en | code | 4 | github-code | 36 | [
{
"api_name": "os.system",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "sqlite3.connect",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "urllib.parse.parse.unquote",
"line_number": 53,
"usage_type": "call"
},
{
"api_name": "urllib.parse.par... |
41510671413 | #!/usr/bin/env python3
"""
Session Authentication Module
"""
from api.v1.auth.auth import Auth
from api.v1.views.users import User
import uuid
from typing import TypeVar
class SessionAuth(Auth):
"""
Responsible for session Authentication
Inherits From auth class
"""
user_id_by_session_... | tommyokoyo/alx-backend-user-data | 0x02-Session_authentication/api/v1/auth/session_auth.py | session_auth.py | py | 2,157 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "api.v1.auth.auth.Auth",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "uuid.uuid4",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "api.v1.views.users.User.get",
"line_number": 57,
"usage_type": "call"
},
{
"api_name": "api.v1.v... |
26599759147 | from PyQt5 import QtWidgets
from PyQt5 import QtCore
from PyQt5.QtCore import pyqtSlot
from PyQt5.QtWidgets import QHeaderView
from db.models import *
from gui.widgets.custom_widgets import DialogWithDisablingOptions
class MainWidget(QtWidgets.QWidget):
def __init__(self, parent, model):
super().__init__(... | jsaric/quiz-manager | gui/widgets/main_widget.py | main_widget.py | py | 4,612 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "PyQt5.QtWidgets.QWidget",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "PyQt5.QtWidgets",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "PyQt5.QtWidgets.QHBoxLayout",
"line_number": 12,
"usage_type": "call"
},
{
"api_name":... |
3581561120 | # Import necessary libraries
import openai
import subprocess
import sys
import json
import html
import re
import ssl
import os
import math
import glob
import pprint
import nltk
import pdb
import requests
import time
import random
from PIL import Image, ImageDraw, ImageFont
from PIL import UnidentifiedImageError
if not ... | menached/ai_product_updater | t1.py | t1.py | py | 14,935 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "nltk.data.find",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "nltk.data",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "nltk.download",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "sys.argv",
"line_numb... |
15859509196 | # -*- coding: utf-8 -*-
#importando as bibliotecas
from matplotlib.pyplot import text
import yfinance as yf
import pandas as pd
import numpy as np
import os.path
import telegram
pd.options.mode.chained_assignment = None
#escolher uma ação
wege = yf.Ticker('WEGE3.SA')
#escolher inteervalo de dados
wege_dia = weg... | bertuci/compra_e_venda_acoes | bot_MACD/macd_bot.py | macd_bot.py | py | 3,561 | python | pt | code | 1 | github-code | 36 | [
{
"api_name": "pandas.options",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "yfinance.Ticker",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "pandas.to_dateti... |
41737860574 | from functools import cmp_to_key
def custom_split(s):
if s == '': return []
cnt = 0
res = []
last_comma = -1
brackets = 0
while (cnt < len(s)):
if s[cnt] == '[': brackets += 1
if s[cnt] == ']': brackets -= 1
if s[cnt] == ',':
if brackets == 0:
... | Jiggzawyr/advent-of-code-2022 | Day 13 Distress Signal/part2.py | part2.py | py | 2,368 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "functools.cmp_to_key",
"line_number": 74,
"usage_type": "call"
}
] |
6433676498 | import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
import torchvision
import matplotlib
matplotlib.use('agg')
import matplotlib.pyplot as plt
import numpy as np
import math
import yaml
import pickle
import pprint
import os
import logging
import sys
import data_loaders
im... | alluly/ident-latent-sde | train.py | train.py | py | 31,019 | python | en | code | 3 | github-code | 36 | [
{
"api_name": "matplotlib.use",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "torch.device",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "torch.cuda.is_available",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "torch.cuda",
"... |
71738073384 | import unittest
from selenium import webdriver
from data.constants import Constants
from helpers.keywords import Helpers
from pom.pages.login import Login
from pom.pages.project import Project
from pom.locators.base_loc import BaseLoc
from selenium.webdriver.chrome.options import Options
from webdriver_manager.chrome i... | jaime-contreras-98/todoist-python-selenium | tests/e2e/test/test_projects.py | test_projects.py | py | 1,846 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "unittest.TestCase",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "selenium.webdriver.chrome.options.Options",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 20,
"usage_type": "call"
},... |
3650801558 | from flask import Blueprint, jsonify, g, request
from wrappers.auth_required import auth_required, rate_limited
from models.jobs import TOPJob
from utils.json_helper import jsonify_payload
bp = Blueprint("management", __name__, url_prefix="/management")
@bp.route("/jobs", methods=["GET"])
@auth_required
def get_jobs(... | matthewlouisbrockman/the_one_plugin | backend/management/management_routes.py | management_routes.py | py | 1,181 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "flask.Blueprint",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "flask.g.user_id",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "flask.g",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "models.jobs.TOPJob.find_b... |
496529237 | import datetime
import sys
import uuid
import pandas as pd
import pytest
from dagster_gcp import (
bigquery_resource,
bq_create_dataset,
bq_delete_dataset,
bq_solid_for_queries,
import_df_to_bq,
import_gcs_paths_to_bq,
)
from dagster_pandas import DataFrame
from google.cloud import bigquery
fro... | helloworld/continuous-dagster | deploy/dagster_modules/libraries/dagster-gcp/dagster_gcp_tests/bigquery_tests/test_solids.py | test_solids.py | py | 10,520 | python | en | code | 2 | github-code | 36 | [
{
"api_name": "google.cloud.bigquery.Client",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "google.cloud.bigquery",
"line_number": 39,
"usage_type": "name"
},
{
"api_name": "google.cloud.exceptions.NotFound",
"line_number": 45,
"usage_type": "name"
},
{
... |
27370619161 | import matplotlib.pyplot as plt
from random_walk import RandomWalk
# cd Documents/python_work/data_visualization
while True:
# Create instance of RandomWalk.
rw = RandomWalk(5000)
rw.fill_walk()
# Set the size of the interactive window.
plt.figure(dpi=128, figsize=(10, 5))
# Plot random wal... | nazeern/python_crash_course | data_visualization/rw_visual.py | rw_visual.py | py | 923 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "random_walk.RandomWalk",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.figure",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "matp... |
9369243974 | import imaplib
import email
from time import sleep
from random import randint
import importlib
from src.Analyser import mark_email
from src.Email import Email
import numpy as np
from goto import with_goto
from src.save import save
ai = importlib.import_module("Neural_Network", package=None)
"""
Fonction qui efface ... | PtspluS/Phising-Analising | src/Recevoir_email_complet.py | Recevoir_email_complet.py | py | 5,361 | python | fr | code | 1 | github-code | 36 | [
{
"api_name": "importlib.import_module",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "os.path.exists",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 26,
"usage_type": "attribute"
},
{
"api_name": "os.remove",
"... |
28986176573 | # coding: utf-8
"""
Yapily API
To access endpoints that require authentication, use your application key and secret created in the Dashboard (https://dashboard.yapily.com) # noqa: E501
The version of the OpenAPI document: 0.0.358
Generated by: https://openapi-generator.tech
"""
from __future__ imp... | alexdicodi/yapily-sdk-python | sdk/test/test_bulk_user_delete_details.py | test_bulk_user_delete_details.py | py | 2,749 | python | en | code | null | github-code | 36 | [
{
"api_name": "unittest.TestCase",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "yapily.models.bulk_user_delete_details.BulkUserDeleteDetails",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.strptime",
"line_number": 47,
"usag... |
70781957544 | from django.conf.urls import url, include
from rest_framework.urlpatterns import format_suffix_patterns
from devup.views import UpList, UpDetail, UpCreate, UpUpdate
app_name = 'devup'
urlpatterns = [
url(r'^up_list$', UpList.as_view(), name='up_list'),
url(r'^up_create$', UpCreate.as_view(), name='up_create')... | maherrub/aot | devup/urls.py | urls.py | py | 539 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "django.conf.urls.url",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "devup.views.UpList.as_view",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "devup.views.UpList",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "djang... |
71148994983 | from utils import connector
async def declare_queue(queue_name, durable=False):
conct = connector.Connector()
channel = await conct.get_channel()
await channel.queue_declare(
queue=queue_name,
durable=durable,
)
async def bind_queue(queue_name, exchange_name, routing_key):
conct ... | Yuriy-Leonov/python-rabbitmq-example | utils/funcs.py | funcs.py | py | 1,256 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "utils.connector.Connector",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "utils.connector",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "utils.connector.Connector",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "uti... |
24304374080 | from argparse import ArgumentParser
from gitrello import Gitrello
import github
import trello
import settings
if __name__ == "__main__":
parser = ArgumentParser()
parser.add_argument('--pr_id', required=True)
parser.add_argument('--repo', required=True)
args = parser.parse_args()
g = github.Gith... | jakobpederson/gitrello | convert_pr.py | convert_pr.py | py | 667 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "github.Github",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "settings.GITHUB_TOKEN",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "trel... |
13231147951 | import json
import os
import subprocess
import sys
from pathlib import Path
import youtube_dl
ydl_opts_download = {
"format": "bestaudio/best",
"cachedir": False,
"outtmpl": "%(id)s%(ext)s",
"postprocessors": [
{
"key": "FFmpegExtractAudio",
"preferredcodec... | RiccardoPeron/competitions-music-analysis | Functions/downloader.py | downloader.py | py | 2,304 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "youtube_dl.YoutubeDL",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "youtube_dl.YoutubeDL",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "os.chdir",
"line_number": 57,
"usage_type": "call"
},
{
"api_name": "os.mkdir",
"li... |
12673510789 | from pathlib import Path
import numpy as np
import torch
from torch.utils.data import Dataset
from torchvision import transforms
import torchvision.transforms.functional as TF
from PIL import Image
from src.draw_utils import save_img_with_kps
from src.readers.image_reader import ImageReader
from typing import Dict
fro... | AvanDavad/receipt_extractor | src/datasets/phase0points_dataset.py | phase0points_dataset.py | py | 6,430 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "torch.utils.data.Dataset",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "torchvision.transforms.Compose",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "torchvision.transforms",
"line_number": 19,
"usage_type": "name"
},
{
"ap... |
6797727811 | # django imports
from django import template
import itertools
import datetime
import pytz
import dateutil
register = template.Library()
@register.filter
def group_by_date(dates, timezone):
tz = pytz.timezone(timezone)
dates_parser = []
for day in dates:
try:
new_date = pytz.utc.local... | tomasgarzon/exo-services | service-exo-mail/mail/templatetags/group_by.py | group_by.py | py | 747 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "django.template.Library",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "django.template",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "pytz.timezone",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "pytz.utc.localize... |
34682609282 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Jul 16 16:18:01 2019
@author: cacquist
"""
# coding: utf-8
# In[1]:
# ------------------------------------------------------------------------
# date : 12.04.2018
# author : Claudia Acquistapace
# goal : routine to read 1D meteogram fo... | ClauClouds/PBL_paper_repo | f_processModelOutput.py | f_processModelOutput.py | py | 29,461 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "netCDF4.Dataset",
"line_number": 73,
"usage_type": "call"
},
{
"api_name": "netCDF4.num2date",
"line_number": 75,
"usage_type": "call"
},
{
"api_name": "numpy.repeat",
"line_number": 104,
"usage_type": "call"
},
{
"api_name": "numpy.repeat",
"li... |
6783941465 | """Change column distance_bin to distance_cat
Revision ID: 2524785502b4
Revises: c137e7385dd7
Create Date: 2020-03-20 16:47:15.648707
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '2524785502b4'
down_revision = 'c137e7385dd7'
branch_labels = None
depends_on =... | dcjohnson24/gugs_db | migrations/versions/2524785502b4_change_column_distance_bin_to_distance_.py | 2524785502b4_change_column_distance_bin_to_distance_.py | py | 980 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "alembic.op.add_column",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "alembic.op",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "sqlalchemy.Column",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.String"... |
73743833704 | import re
import logging
import ROOT
import plottingConfig as cfg
class Config(cfg.PlottingConfig):
def __init__ (self, options):
self.options = options
super(Config, self).__init__()
sigma = 1 # at mu=1 (arbitrary for AZh)
sigma_units = 'fb'
# self.force_mu = (True, 0.16)... | btannenw/physics-dihiggs | statCode/scripts/VHbbRun2/analysisPlottingConfig.py | analysisPlottingConfig.py | py | 30,133 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "plottingConfig.PlottingConfig",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "logging.DEBUG",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "ROOT.kRed",
"line_number": 36,
"usage_type": "attribute"
},
{
"api_name": "R... |
72640402983 | import os, argparse, traceback, glob, random, itertools, time, torch, threading, queue
import numpy as np
import torch.optim as optim
from models.tacotron import post_CBHG
from torch.nn import L1Loss
from torch.utils.data import Dataset, DataLoader
from torch.nn.utils.rnn import pad_sequence
from util.hparams import *
... | chldkato/Tacotron-pytorch | train2.py | train2.py | py | 3,633 | python | en | code | 6 | github-code | 36 | [
{
"api_name": "glob.glob",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "glob.glob",
"line_number": 13... |
73701609385 | import math
import torch
import torch.nn as nn
import torch.nn.functional as F
class Bottleneck(nn.Module):
def __init__(self, nChannels, growthRate, dropout_rate):
super(Bottleneck, self).__init__()
self.dropout_rate = dropout_rate
interChannels = 4 * growthRate
self.bn1 = nn.Bat... | ikhlestov/caltech-ml-courses | models/model_dense.py | model_dense.py | py | 4,801 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "torch.nn.Module",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "torch.nn.BatchNorm2d",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line... |
23251362882 | import os
from zipfile import ZipFile, ZIP_DEFLATED
class Zip():
"""Zip up all the contents of a directory into the output file."""
def __init__(self, input_directory, output_file):
self.input_directory = input_directory
self.output_file = output_file
def zip(self):
try:
zip_file... | thewtex/odt-respace | source/odt_respace/zip.py | zip.py | py | 809 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "zipfile.ZipFile",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "zipfile.ZIP_DEFLATED",
"line_number": 12,
"usage_type": "argument"
},
{
"api_name": "os.walk",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "os.path.commonprefix... |
3407130666 | #!/usr/bin/env python
"""A script to normalized interview transcripts.
It outputs a single text file with cleaned lines
one sentence per line"""
import argparse
import re
import string
import spacy
fillers = [
"eh",
"m",
"mm",
"mmm",
"ah",
"ahm",
"ehm",
"yy",
"y",
"aha",
"... | zoobereq/He-write-age | data cleaning/normalize.py | normalize.py | py | 4,556 | python | en | code | 3 | github-code | 36 | [
{
"api_name": "spacy.load",
"line_number": 59,
"usage_type": "call"
},
{
"api_name": "string.punctuation",
"line_number": 60,
"usage_type": "attribute"
},
{
"api_name": "re.sub",
"line_number": 98,
"usage_type": "call"
},
{
"api_name": "re.sub",
"line_number":... |
43734774169 | """
@创建日期 :2022/4/25
@修改日期 :2022/4/26
@作者 :jzj
@功能 :模型库,输出统一以字典格式
dqn 输出 value
a2c 输出 policy value
fixme: 可能会抽象为参数构建的模式,不确定
"""
from typing import List
import tensorflow as tf
import tensorflow.keras.layers as layers
import tensorflow.keras.models as models
def make_model(id, args):
if id =... | baichii/inspire | rookie/models.py | models.py | py | 6,872 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "tensorflow.keras.models.Model",
"line_number": 30,
"usage_type": "attribute"
},
{
"api_name": "tensorflow.keras.models",
"line_number": 30,
"usage_type": "name"
},
{
"api_name": "tensorflow.expand_dims",
"line_number": 43,
"usage_type": "call"
},
{
... |
70677287784 | """
Filename: plot_zonal_mean.py
Author: Damien Irving, irving.damien@gmail.com
Description:
"""
# Import general Python modules
import sys, os, pdb
import argparse
import numpy
import matplotlib.pyplot as plt
from matplotlib import gridspec
import iris
import iris.plot as iplt
from iris.experimental.equ... | DamienIrving/ocean-analysis | visualisation/plot_zonal_mean.py | plot_zonal_mean.py | py | 19,621 | python | en | code | 9 | github-code | 36 | [
{
"api_name": "os.getcwd",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 25,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_number":... |
16385745917 | from torch.utils.data import Dataset
import torch
from PIL import Image
from pathlib import Path
import numpy as np
from dataclasses import dataclass
import random
@dataclass
class imageset:
t1: Path
t2: Path
cm: Path
@dataclass
class patch:
imset: imageset
x: tuple
y: tuple
class CDDatase... | fzimmermann89/ml4rs | cd/ds.py | ds.py | py | 6,007 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "pathlib.Path",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "pathlib.Path",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "pathlib.Path",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "dataclasses.dataclass",
"l... |
75174790505 | from vtk import *
# input data, every row is for a different item
positions = [[0, 0, 0],[1.5, 0, 0]]
orientations = [[1.0, 0.0, 0.0],[0.0, 1.0, 1.0]]
colors = [[255, 0, 0],
[0, 255, 255]]
heights = [1,
2]
# rendering of those two defined cylinders
points = vtkPoints()
points.InsertNextPoint(... | squeakus/bitsandbytes | vtk/glyphpos.py | glyphpos.py | py | 1,632 | python | en | code | 2 | github-code | 36 | [
{
"api_name": "vtk.vtkRenderWindow",
"line_number": 56,
"usage_type": "call"
},
{
"api_name": "vtk.vtkRenderWindowInteractor",
"line_number": 58,
"usage_type": "call"
}
] |
39056791379 | from obspy import read
from numpy import r_,ones,zeros
path=u'/Users/dmelgar/Slip_inv/Chiapas_hernandez_new/data/waveforms/before_delta_t/'
outpath='/Users/dmelgar/Slip_inv/Chiapas_hernandez_new/data/waveforms/'
def delay_st(st,delta):
d=st[0].data
npts=int(abs(delta)/st[0].stats.delta)
if delta<0:
... | Ogweno/mylife | chiapas2017/delay_waveforms_tsunami.py | delay_waveforms_tsunami.py | py | 781 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "numpy.r_",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "numpy.ones",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "numpy.r_",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "numpy.ones",
"line_number": 14,
... |
33154135207 | #!/usr/bin/python3
#encoding: UTF-8
import lxml.etree as ET
import markdown as MD
import lib as LIB
#-------------------------------------------------------------------------------
def xpath_list(from_node, xpath):
"""
Return all nodes matching xpath from from_node as dom node list.
"""
if isinstance(fro... | echopen/PRJ-medtec_kit | doc/doc_builder/src/xml_helper.py | xml_helper.py | py | 4,938 | python | en | code | 17 | github-code | 36 | [
{
"api_name": "lxml.etree._Element",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "lxml.etree",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "lib.first",
"line_number": 46,
"usage_type": "call"
},
{
"api_name": "lib.first_str",
"li... |
12171333516 | # 2016년 요일 찾기
# 2016년 1월 1일은 금요일
# SUN,MON,TUE,WED,THU,FRI,SAT
from datetime import datetime
def solution(a, b):
date = '2016-{0}-{1}'.format(a, b) # 날짜
datetime_date = datetime.strptime(date, '%Y-%m-%d') # 날짜의 타입을 datetime형으로 변경
dateDict = {0: 'MON', 1:'TUE', 2:'WED', 3:'THU', 4:'FRI', 5:'SAT', 6:'SUN'}
... | hi-rev/TIL | Programmers/level_1/date.py | date.py | py | 899 | python | ko | code | 0 | github-code | 36 | [
{
"api_name": "datetime.datetime.strptime",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 8,
"usage_type": "name"
}
] |
69905738984 | from django.shortcuts import render, redirect
from django.contrib import messages
from .forms import UserRegisterForm
def register(request):
if request.method =='POST':
form = UserRegisterForm(request.POST)
if form.is_valid():
form.save()
username = form.cleaned_data.get('... | AlekanderOst/python-webstore-drakkar | users/views.py | views.py | py | 648 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "forms.UserRegisterForm",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "django.contrib.messages.success",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "django.contrib.messages",
"line_number": 13,
"usage_type": "name"
},
{
"api... |
70077372585 | import pandas as pd
import lxml.html
import requests
import shelve
import os, sys
import logging
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger()
if not os.path.exists('database'):
os.mkdir('database')
elif not os.path.isdir('database'):
os.remove('database')
os.mkdir('database')
x... | chris-hamberg/springer_books_web | scraper.py | scraper.py | py | 5,483 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "logging.basicConfig",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "logging.INFO",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "logging.getLogger",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "os.path.exists"... |
70809120103 | #!/usr/bin/python3
"""
Started a Flask web application with these scripts
the web apps was listed on 0.0.0.0, port 5000
declare @app.teardown_appcontext and storage.close()
with routes /cities_by_states: display a HTML page:
in my route def option strict_slashes=False was used
"""
from flask import ... | Realyoung1/AirBnB_clone_v2 | web_flask/8-cities_by_states.py | 8-cities_by_states.py | py | 1,054 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "flask.Flask",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "models.storage.all",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "models.state.State",
"line_number": 19,
"usage_type": "argument"
},
{
"api_name": "models.storage"... |
70677233704 | """
Filename: calc_volcello.py
Author: Damien Irving, irving.damien@gmail.com
Description: Calculate the CMIP5 volcello variable
"""
# Import general Python modules
import sys, os, pdb
import argparse
import numpy
import iris
# Import my modules
cwd = os.getcwd()
repo_dir = '/'
for directory in cwd.spli... | DamienIrving/ocean-analysis | data_processing/calc_volcello.py | calc_volcello.py | py | 3,841 | python | en | code | 9 | github-code | 36 | [
{
"api_name": "os.getcwd",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_number":... |
25951961583 | import sys
import base64, time, datetime
callbacks = {
'array': lambda x: [v.text for v in x],
'dict': lambda x:
dict((x[i].text, x[i+1].text) for i in range(0, len(x), 2)),
'key': lambda x: x.text or "",
'string': lambda x: x.text or "",
'data': lambda x: base64.b64decode(x.text),
'dat... | ishikawa/python-plist-parser | tools/performance/etree_parser.py | etree_parser.py | py | 1,444 | python | en | code | 11 | github-code | 36 | [
{
"api_name": "base64.b64decode",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "time.strptime",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "xml.etree.ElementTre... |
32519507649 | from fastapi import FastAPI, Request, HTTPException, status, Depends ,File, UploadFile
from fastapi.templating import Jinja2Templates
from fastapi.security import OAuth2PasswordBearer, OAuth2PasswordRequestForm
from fastapi.staticfiles import StaticFiles
from starlette.responses import HTMLResponse
from tortoise.cont... | AlexBabilya/E-Commerce | main.py | main.py | py | 10,643 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "fastapi.FastAPI",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "fastapi.templating.Jinja2Templates",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "fastapi.security.OAuth2PasswordBearer",
"line_number": 35,
"usage_type": "call"
},
... |
43189726204 | import pyqtgraph as pg
from pyqtgraph.Qt import QtCore, QtGui
from .. import default_config
import numpy
class CustomViewBox(pg.ViewBox):
def __init__(self, *args, **kwds):
pg.ViewBox.__init__(self, *args, **kwds)
self.StromDisplay=None
self.ChannelNum=0
self.ScaleBar = []
s... | KatonaLab/vividstorm | controllers/viewer/CustomViewBox.py | CustomViewBox.py | py | 10,817 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "pyqtgraph.ViewBox",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "pyqtgraph.ViewBox.__init__",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "pyqtgraph.ViewBox",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": ... |
33008270053 | # load the example image and convert it to grayscale
import os
import cv2
import pytesseract
image = "example_01.jpg"
preprocess = "thresh"
image = cv2.imread(image)
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
# check to see if we should apply thresholding to preprocess the
# image
if preprocess == "thresh":
... | Marius-Juston/SonnetGeneratorCombination | ocr.py | ocr.py | py | 1,062 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "cv2.imread",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "cv2.cvtColor",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "cv2.COLOR_BGR2GRAY",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "cv2.threshold",
"... |
29412113956 | import cv2
import numpy as np
import argparse
def main():
parser = argparse.ArgumentParser()
parser.add_argument('-v','--video', type=str)
parser.add_argument('-o','--output', type=str, default=None)
args = parser.parse_args()
vid = cv2.VideoCapture(args.video)
width = int(vid.get(... | flexinai/flexin-ipod-ad | exclusion.py | exclusion.py | py | 2,097 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "cv2.VideoCapture",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "cv2.CAP_PROP_FRAME_WIDTH",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": ... |
8574459364 | from django.shortcuts import render, redirect, get_object_or_404
from users.models import Profile
from .models import *
from addproject.models import *
from datetime import datetime
from django.shortcuts import render, redirect
from addproject.models import *
import json
import datetime
from django.http import JsonResp... | SeongJoon-K/Runningmate | runningmate/mateapp/views.py | views.py | py | 9,157 | python | en | code | null | github-code | 36 | [
{
"api_name": "sys.path.append",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "os.path.dirname",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_num... |
33452924265 | from tkinter import *
from tkinter import ttk
from tkinter import messagebox
import pandas as pd
import matplotlib.pyplot as plt
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg
fcff_df = pd.read_excel('FCFF_analysis_filtered.xlsx', index_col=[0])
sgx_df = pd.read_csv('myData.csv', index_col=[1])
class... | yuliangod/StonksApp | 03_FCFFapp.py | 03_FCFFapp.py | py | 12,301 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "pandas.read_excel",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 26,
"usage_type": "attribute"
},
{
"api_name": "matplotlib.pypl... |
18590413266 | import pytest
from sqlalchemy import create_engine
from rebrickable.data.database import Session
from rebrickable.data.models import *
models = [Color, Inventory, InventorySet,
InventoryPart, Part, PartCategory, Set, Theme]
@pytest.fixture(scope='module')
def session():
engine = create_engine('sqlite:... | rienafairefr/pyrebrickable | tests/data/test_data.py | test_data.py | py | 1,369 | python | en | code | 4 | github-code | 36 | [
{
"api_name": "sqlalchemy.create_engine",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "rebrickable.data.database.Session.configure",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "rebrickable.data.database.Session",
"line_number": 14,
"usage_type":... |
70797390505 | import copy
import matplotlib.colors as colors
import matplotlib.pyplot as plt
import nibabel as nib
import numpy as np
from matplotlib import cm
from util.util import info, crop_center, error, print_timestamped
different_colors = ["#FF0000", "#008000", "#0000FF", "#FFD700", # Red, green, blue, gold
... | giuliabaldini/brainclustering | util/plot_handler.py | plot_handler.py | py | 12,669 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "util.util.info",
"line_number": 61,
"usage_type": "call"
},
{
"api_name": "util.util.crop_center",
"line_number": 85,
"usage_type": "call"
},
{
"api_name": "matplotlib.cm.get_cmap",
"line_number": 88,
"usage_type": "call"
},
{
"api_name": "matplotli... |
29099062357 | from PyQt5.QAxContainer import *
from PyQt5.QtCore import *
from config.errCode import *
from config.kiwoomType import RealType
from config.slack import Slack
from PyQt5.QtTest import *
import os
class Kiwoom(QAxWidget):
def __init__(self):
super().__init__() # == QAxWidget.__init__()
print('class:... | sw-song/kiwoom | test_api/kiwoom.py | kiwoom.py | py | 29,513 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "config.slack.Slack",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "config.kiwoomType.RealType",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "os.path.exists",
"line_number": 431,
"usage_type": "call"
},
{
"api_name": "os.path... |
14231652942 | '''
File name: Isonet_star_app.py
Author: Hui Wang (EICN)
Date created: 4/21/2021
Date last modified: 06/01/2021
Python Version: 3.6.5
'''
import sys,os
import logging
from PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5.QtWidgets import QTableWidgetItem,QMessageBox
from PyQt5.QtCore imp... | IsoNet-cryoET/IsoNet | gui/Isonet_star_app.py | Isonet_star_app.py | py | 43,739 | python | en | code | 49 | github-code | 36 | [
{
"api_name": "IsoNet.gui.isonet_gui.Ui_MainWindow",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "IsoNet.gui.model_star.Model",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "IsoNet.gui.model_star.setTableWidget",
"line_number": 44,
"usage_type": "... |
34287760383 |
import random
from xml.dom.minidom import parseString
file=open('/home/med/Desktop/bioInfo.xml', 'r')
data= file.read()
dom=parseString(data)
f = open('/home/med/Desktop/seedpopulation.txt', "w")
PS=dom.getElementsByTagName('problemSize')[0].toxml()
PopS=dom.getElementsByTagName('populationSize')[0].toxml()
Probl... | dogatuncay/GA_Twister_Hadoop | docs/seedpopulation.py | seedpopulation.py | py | 671 | python | en | code | 4 | github-code | 36 | [
{
"api_name": "xml.dom.minidom.parseString",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "random.randrange",
"line_number": 23,
"usage_type": "call"
}
] |
44034009675 | import sys
from collections import deque
n, k = map(int, sys.stdin.readline().split())
m = 100001
visited = [-1] * m
check = [0] * m
q = deque()
visited[n] = 0
q.append(n)
def path(x):
move = []
temp = x
for _ in range(visited[x] + 1):
move.append(temp)
temp = check[temp]
... | GluteusStrength/Algorithm | 백준/Gold/13913. 숨바꼭질 4/숨바꼭질 4.py | 숨바꼭질 4.py | py | 675 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "sys.stdin.readline",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "sys.stdin",
"line_number": 3,
"usage_type": "attribute"
},
{
"api_name": "collections.deque",
"line_number": 7,
"usage_type": "call"
}
] |
40056650925 | from decouple import config
import os
class HTML_file:
def __init__(self, group_name: str, measure: str) -> None:
self.group_name = group_name
self.measure = measure
self.png_dir = os.path.join(config('root'), 'work/visual_graphs')
def save_directory(self) -> str:
return os.pa... | WMDA/SCN | SCN/visualization/create_html_view.py | create_html_view.py | py | 3,593 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "os.path.join",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "decouple.config",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_numbe... |
73952795302 | from scipy.special import comb
"""
This file contains a set of functions to practice your
probabilities skills.
It needs to be completed with "vanilla" Python, without
help from any library -- except for the bin_dist function.
"""
def head_tails(p, n):
"""
Given a coin that have probability p of ... | ashokpanigrahi88/ashokpython | Exercises/Pre-Maths/probabilities.py | probabilities.py | py | 2,880 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "scipy.special.comb",
"line_number": 52,
"usage_type": "call"
}
] |
74647027303 | import logging
from igraph import Graph as iGraph
from parvusdb import GraphDatabase
from parvusdb.utils.code_container import DummyCodeContainer
from parvusdb.utils.match import Match, MatchException
from .node_matcher import VectorNodeMatcher
_logger = logging.getLogger()
class GraphMatcher:
def __init__(sel... | fractalego/dgt | dgt/graph/graph_matcher.py | graph_matcher.py | py | 1,990 | python | en | code | 2 | github-code | 36 | [
{
"api_name": "logging.getLogger",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "igraph.Graph",
"line_number": 20,
"usage_type": "argument"
},
{
"api_name": "parvusdb.GraphDatabase",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "node_matche... |
10916034260 | import abc
import sys
from importlib import import_module
from typing import TypeVar
import pytest
from sphinx.ext.autodoc.mock import _MockModule, _MockObject, mock
def test_MockModule():
mock = _MockModule('mocked_module')
assert isinstance(mock.some_attr, _MockObject)
assert isinstance(mock.some_meth... | borntocodeRaj/sphinx_configuration | tests/test_ext_autodoc_mock.py | test_ext_autodoc_mock.py | py | 3,242 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "sphinx.ext.autodoc.mock.mock",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "sphinx.ext.autodoc.mock._MockModule",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "sphinx.ext.autodoc.mock._MockObject",
"line_number": 13,
"usage_type": "... |
37225738128 | import nilearn
from nilearn.plotting import plot_carpet, plot_glass_brain, plot_anat, plot_stat_map, plot_design_matrix, plot_epi, plot_contrast_matrix
from nilearn import image, masking, input_data
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from nilearn.glm.first_level import make_first_lev... | tejas-savalia/fmri_project | util.py | util.py | py | 4,890 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "pandas.read_csv",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "nilearn.image.load_img",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "nilearn.image",
"line_number": 28,
"usage_type": "name"
},
{
"api_name": "numpy.arange",
... |
18915198493 | import pytest
from src.maximum_twin_sum_of_a_linked_list import Solution
from src.utils.linked_list import to_linked_list
@pytest.mark.parametrize(
"in_list,expected",
(
([5, 4, 2, 1], 6),
([4, 2, 2, 3], 7),
([1, 100_000], 100_001),
),
)
def test_solution(in_list, expected):
h... | lancelote/leetcode | tests/test_maximum_twin_sum_of_a_linked_list.py | test_maximum_twin_sum_of_a_linked_list.py | py | 398 | python | en | code | 3 | github-code | 36 | [
{
"api_name": "src.utils.linked_list.to_linked_list",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "src.maximum_twin_sum_of_a_linked_list.Solution",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "pytest.mark.parametrize",
"line_number": 7,
"usage_ty... |
26030329346 | import os
import sys
#モジュール探索パス追加
p = ['../','../../']
for e in p: sys.path.append(os.path.join(os.path.dirname(__file__),e))
import discord
from discord.ext import commands
from discord import app_commands
from cmmod.json_module import open_json
from cmmod.time_module import get_currenttime
from cmmod.discord_module... | rich-bread/bmdb_bot | menu/usermenu/apply_team.py | apply_team.py | py | 5,802 | python | ja | code | 0 | github-code | 36 | [
{
"api_name": "sys.path.append",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": ... |
4014271672 | # 문제 출처 : https://programmers.co.kr/learn/courses/30/lessons/12973
from collections import deque
def solution(s):
deq = deque(list(s))
# print(deq)
stack = []
while deq:
stack.append(deq.popleft())
if len(stack) > 1:
if stack[-1] == stack[-2]:
stack.pop()
... | ThreeFive85/Algorithm | Programmers/level2/removePair/remove_pair.py | remove_pair.py | py | 442 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "collections.deque",
"line_number": 7,
"usage_type": "call"
}
] |
23425927839 | import os
from discord.ext import commands, tasks
import motor.motor_asyncio
import util.util
from util.help import HelpCommand
from util.setup import load_text, load_data, mod_data, get_files
import discord
import itertools
bot = commands.Bot(
command_prefix="!", # Change to desired prefix
case_insensitive=T... | gritor111/bhv-bot | bot.py | bot.py | py | 1,424 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "discord.ext.commands.Bot",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "discord.ext.commands",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "discord.Intents.all",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "dis... |
6367637162 | # Look for #IMPLEMENT tags in this file.
'''
All models need to return a CSP object, and a list of lists of Variable objects
representing the board. The returned list of lists is used to access the
solution.
For example, after these three lines of code
csp, var_array = caged_csp_model(board)
solve... | eliasvolonakis/CSC384CourseWork | Constraint Satisfaction Assignment/puzzle_csp.py | puzzle_csp.py | py | 8,422 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "itertools.product",
"line_number": 44,
"usage_type": "call"
},
{
"api_name": "itertools.permutations",
"line_number": 91,
"usage_type": "call"
},
{
"api_name": "itertools.permutations",
"line_number": 97,
"usage_type": "call"
},
{
"api_name": "itert... |
40727926981 | import requests
STEAMDB_SALE_URL = "https://steamdb.info/sales/?merged=true&cc=cn"
class SaleRequester:
def __init__(self):
self.fake_header = {
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
'Accept-Charset': 'UTF-8,*;q=0.5',
'Accept-Enco... | KIDJourney/sbeamhub | crawler/requester.py | requester.py | py | 779 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "requests.get",
"line_number": 18,
"usage_type": "call"
}
] |
19499350817 | from sqlite3 import *
from typing import Union
class DB:
def __init__(self):
self.db = connect("app.db")
self.cr = self.db.cursor()
self.cr.execute("create table if not exists `users`(user_id INTEGER, username TEXT, chat_name TEXT, "
"chat_username TEXT, chat_id INT... | cytoo/TgGroupScanner | bot/mods/sql.py | sql.py | py | 1,485 | python | en | code | 18 | github-code | 36 | [
{
"api_name": "typing.Union",
"line_number": 33,
"usage_type": "name"
},
{
"api_name": "typing.Union",
"line_number": 35,
"usage_type": "name"
}
] |
36407109164 | """
This script is used for 'writing' songs in musical notation form, with recording of key downs and ups being used to define the time durations and delays of notes. Notes are shown line by line and a single key on your keyboard can be used to set the timing for each note in a song - of course, you'll need to know th... | cwylycode/dumptruck | python/musical_timing_recorder.py | musical_timing_recorder.py | py | 4,076 | python | en | code | 4 | github-code | 36 | [
{
"api_name": "pynput.keyboard.Key",
"line_number": 24,
"usage_type": "attribute"
},
{
"api_name": "pynput.keyboard",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "pynput.keyboard.Listener",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "pyn... |
22703377702 | from __future__ import print_function
import sys
import xml.etree.ElementTree as ET
import os
sys.path.extend(['.', '..', './pycparser/'])
from pycparser import c_parser, c_ast
filehandle = open('dummy3.c', 'r')
#filehandle = open('reverse_noinclude.c', 'r')
#filehandle = open('reverse.c', 'r')
text = ''.join(fileha... | lashgar/ipmacc | src/auxilaries/generate_oacc_ast.py | generate_oacc_ast.py | py | 2,204 | python | en | code | 13 | github-code | 36 | [
{
"api_name": "sys.path.extend",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "pycparser.c_parser.CParser",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "pycparser.c_pa... |
40843782656 | from apivk.function_vk import vkinder
from datetime import date
from database.script_bd import check_users_vk, check_search_results, save_users_vk, save_search_results
from botvk.function_botvk import write_msg, send_photo
# определение статуса отношений
def find_relation(search_user_id):
res = vkinder.about_user... | beloglazovpl/VKinder | function_find/func.py | func.py | py | 4,050 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "apivk.function_vk.vkinder.about_user",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "apivk.function_vk.vkinder",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "apivk.function_vk.vkinder.about_user",
"line_number": 20,
"usage_type": "cal... |
17729946892 | import argparse
import glob
import logging
import os
import random
import timeit
import numpy as np
import torch
from torch.utils.data import DataLoader, RandomSampler, SequentialSampler
from torch.utils.data.distributed import DistributedSampler
from tqdm import tqdm, trange
from transformers import (
WEIGHTS_NA... | nict-wisdom/bertac | src/examples.openqa/run_openqa_preprocess.py | run_openqa_preprocess.py | py | 18,692 | python | en | code | 7 | github-code | 36 | [
{
"api_name": "os.environ",
"line_number": 49,
"usage_type": "attribute"
},
{
"api_name": "os.environ",
"line_number": 50,
"usage_type": "attribute"
},
{
"api_name": "os.environ",
"line_number": 51,
"usage_type": "attribute"
},
{
"api_name": "logging.getLogger",
... |
30397052082 | from os.path import join
from typing import Optional
from dagger.dag_creator.airflow.operator_creator import OperatorCreator
from dagger.dag_creator.airflow.operators.redshift_sql_operator import (
RedshiftSQLOperator,
)
class RedshiftLoadCreator(OperatorCreator):
ref_name = "redshift_load"
def __init__... | siklosid/dagger | dagger/dag_creator/airflow/operator_creators/redshift_load_creator.py | redshift_load_creator.py | py | 6,239 | python | en | code | 7 | github-code | 36 | [
{
"api_name": "dagger.dag_creator.airflow.operator_creator.OperatorCreator",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "os.path.join",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 39,
"usage_type": "call"
},
{
... |
9294959555 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""--------------------------------------------------------------------
GENETIC ALGORITHMS EXPERIMENTS
Started on the 2018/01/03
theo.alves.da.costa@gmail.com
https://github.com/theolvs
------------------------------------------------------------------------
"""
from sci... | TheoLvs/reinforcement-learning | 4. Chrome Dino/experiments.py | experiments.py | py | 10,024 | python | en | code | 94 | github-code | 36 | [
{
"api_name": "numpy.random.rand",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 37,
"usage_type": "attribute"
},
{
"api_name": "numpy.random.rand",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "numpy.random",
... |
27688294553 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
('main', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='ima... | seanlinxs/content-console | main/migrations/0002_auto_20151201_1309.py | 0002_auto_20151201_1309.py | py | 681 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "django.db.migrations.Migration",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "django.db.migrations",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "django.db.migrations.AlterField",
"line_number": 15,
"usage_type": "call"
},
{... |
1327922070 | #!/usr/bin/env python
#
"""
Name: Jesus Hernandez Partner: Zechariah Neak
Email: jherna83@ucsc.edu Email: zneak@ucsc.edu
ID: 1420330
Course: CMPM146 Game AI
Professor: Daniel G Shapiro
\\\\\\\ Program 4 ///... | JjayaitchH/BehaviorTrees | behavior_tree_bot/bt_bot.py | bt_bot.py | py | 3,634 | python | en | code | 2 | github-code | 36 | [
{
"api_name": "logging.basicConfig",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "logging.DEBUG",
"line_number": 28,
"usage_type": "attribute"
},
{
"api_name": "os.path.dirname",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "os.path",
... |
39497612599 | """
Module to handle a local InfoKinds with unique name.
NOTE: this is taken from python-common in nomad-lab-base.
It is copied here to remove the dependency from nomad-lab-base.
For more info on python-common visit:
https://gitlab.mpcdf.mpg.de/nomad-lab/python-common
The author of this code is: Dr. Fawzi Roberto Mo... | angeloziletti/ai4materials | ai4materials/external/local_meta_info.py | local_meta_info.py | py | 27,845 | python | en | code | 36 | github-code | 36 | [
{
"api_name": "future.standard_library.install_aliases",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "future.standard_library",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "builtins.object",
"line_number": 28,
"usage_type": "name"
},
{
"a... |
29858374038 | '''
Created on 9 Apr 2019
@author: qubix
'''
from typing import Tuple
import numpy as np
from sklearn.base import BaseEstimator
from modAL.utils.data import modALinput
from math import floor
from asreview.query_strategies.max_sampling import max_sampling
from asreview.query_strategies.random_sampling import rando... | syuanuvt/automated-systematic-review | asreview/query_strategies/rand_max.py | rand_max.py | py | 3,622 | python | en | code | null | github-code | 36 | [
{
"api_name": "sklearn.base.BaseEstimator",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "modAL.utils.data.modALinput",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "numpy.arange",
"line_number": 57,
"usage_type": "call"
},
{
"api_name": "m... |
17134892000 |
# Packages
import pandas as pd
import os
import json
from gensim.utils import simple_preprocess
from gensim.summarization.textcleaner import split_sentences
from functools import reduce
from fuzzywuzzy import fuzz
## Functions
## Returns marked html from iucn notes
def find_country(text, country):
'''Function to id... | ConMine/ConMine | Development/Code/sentence_tagging.py | sentence_tagging.py | py | 4,876 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "fuzzywuzzy.fuzz.token_set_ratio",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "fuzzywuzzy.fuzz",
"line_number": 31,
"usage_type": "name"
},
{
"api_name": "functools.reduce",
"line_number": 72,
"usage_type": "call"
},
{
"api_name": "pand... |
73627488425 | '''
Dependencies: gettext, playsound
installing
$ pip install gTTS pyttsx3 playsound soundfile transformers datasets sentencepiece
$ pip install playsound (may need to use "$ pip install --upgrade wheel" if install fails)
'''
import gtts
from playsound import playsound
with open("sample.ini") as fileDescriptor:
d... | vvMaxwell/U5L2 | audio.py | audio.py | py | 428 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "gtts.gTTS",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "playsound.playsound",
"line_number": 15,
"usage_type": "call"
}
] |
26771069266 | from pyowm import OWM
from pyowm.utils import config
from pyowm.utils import timestamps
from config import owm_key
owm = OWM(owm_key)
mgr = owm.weather_manager()
# info on looking up cities.
#To make it more precise put the city's name, comma, 2-letter country code (ISO3166). You will get all proper cities in chosen ... | shelmus/owm_weather | weather_dictionary.py | weather_dictionary.py | py | 1,164 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "pyowm.OWM",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "config.owm_key",
"line_number": 6,
"usage_type": "argument"
}
] |
40597432388 | """General purpose tools get fenced code blocks from Markdown."""
from dataclasses import dataclass
from operator import attrgetter
from pathlib import Path
from typing import List, Optional
import phmutest.direct
import phmutest.reader
import phmutest.select
from phmutest.direct import Marker
class FCBChooser:
... | tmarktaylor/phmutest | src/phmutest/tool.py | tool.py | py | 5,339 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "phmutest.direct.select.configure_block_roles",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "phmutest.direct.select",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "phmutest.direct",
"line_number": 23,
"usage_type": "name"
},
... |
2698417886 | from django.shortcuts import render
from markdown import markdown
from .models import *
from django.http import HttpResponseRedirect
def forbid_zhihu(request):
return render(request, 'forbidden_zhihu.html')
def index_redirect(request):
return HttpResponseRedirect('http://blog.alphamj.cn/')
def index(reque... | w-mj/cloud-server | blog/views.py | views.py | py | 2,222 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "django.shortcuts.render",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "django.http.HttpResponseRedirect",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "django.shortcuts.render",
"line_number": 18,
"usage_type": "call"
},
{
"a... |
25983391444 | #!/usr/bin/env python3
"""Setup script."""
from setuptools import setup
from setuptools.command.test import test as TestCommand
import sys
class PyTest(TestCommand):
"""Setup the py.test test runner."""
def finalize_options(self):
"""Set options for the command line."""
TestCommand.finalize_o... | schedutron/spaced-repetition | setup.py | setup.py | py | 762 | python | en | code | 11 | github-code | 36 | [
{
"api_name": "setuptools.command.test.test",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "setuptools.command.test.test.finalize_options",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "setuptools.command.test.test",
"line_number": 13,
"usage_type":... |
42926082156 | import tempfile
import unittest
import numpy as np
import pandas as pd
import pysam
from hmnfusion import mmej_deletion
from tests.main_test import Main_test
class TestMmejDeletionMain(Main_test):
@classmethod
def load_records(cls, path: str):
vcf_in = pysam.VariantFile(path)
return [x for x ... | guillaume-gricourt/HmnFusion | tests/unit/test_mmej_deletion.py | test_mmej_deletion.py | py | 9,961 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "tests.main_test.Main_test",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "pysam.VariantFile",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "hmnfusion.mmej_deletion.Value",
"line_number": 19,
"usage_type": "call"
},
{
"api_nam... |
6241790730 | """
PRL 115, 114801 (2015)
Please keep the Python style guide of PEP8: pep8.org.
"""
# %%
import numpy as np
from scipy.special import jv
# %%
# Constants
C = 299792458
EV = 1.60217662e-19
# Machine parameters, to be checked from logbook
C1 = 1
C2 = 0.87
lambdaFEL = 50.52e-9 + 0.07e-9
# Other parameters
E0 = 1.1686... | DaehyunPY/FERMI_20149100 | Scripts/phase_locked.py | phase_locked.py | py | 2,821 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "numpy.pi",
"line_number": 29,
"usage_type": "attribute"
},
{
"api_name": "numpy.log",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "numpy.log",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "numpy.ndarray",
"line_number": ... |
70123923304 | #! /usr/bin/env python
from sortrobot.neural import Classifier, OrientationClassifier
from PIL import Image
import sys, os
from optparse import OptionParser
parser = OptionParser()
parser.add_option("-o", "--outdir", dest="outdir", default=None,
help="Directory to write sorted files. Default: same ... | AaronParsons/sortrobot | scripts/sr_sort_files.py | sr_sort_files.py | py | 1,118 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "optparse.OptionParser",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "sys.argv",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "sortrobot.neural.OrientationClassifier",
"line_number": 16,
"usage_type": "name"
},
{
"api_nam... |
483095221 | import requests
from time import sleep
#听写单词扣词验证PRE环境
header={"Authorization":"Bearer eyJhbGciOiJIUzUxMiJ9.eyJqdGkiOiIxNTYyNjI5MDYwMDc1MTAyMjA5Iiwic3ViIjoie1wiaWRcIjoxNTYyNjI5MDYwMDc1MTAyMjA5LFwibW9iaWxlXCI6XCIrODYxODM4NDI1MzUwNlwifSIsImV4cCI6MTcwMTY3NzU1M30.ByAdhAfbxwS5tTbkbSJIPJXN6bIrzoOjeWMwn6JA8pimm2v1fMTXVJfdX... | wengyuanpei/pandaInterfaceTest | testCase/TingXieWordsCheck.py | TingXieWordsCheck.py | py | 4,624 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "requests.post",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "requests.post",
"line_number"... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.