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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
246092229 | import numpy as np
import matplotlib.image as mping
import matplotlib.pyplot as plt
import matplotlib as mpl
#函数功能:对目标矩阵进行svd分解,提取前n个主成分
#参数说明:n:需要提取前n个特征值,pic:目标矩阵
def image_svd(n, pic):
a, b, c = np.linalg.svd(pic) #分别为原始矩阵经SVD分解后所得:U,σ,V矩阵
svd = np.zeros((a.shape[0],c.shape[1])) #生成所需的图像矩... | huang-jingwei/Statistical-learning-method | chap15:svd/svd.py | svd.py | py | 2,753 | python | zh | code | 3 | github-code | 18 | [
{
"api_name": "numpy.linalg.svd",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "numpy.linalg",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "numpy.zeros",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "numpy.matmul",
"line... |
34138658635 | import json
from flask import Flask, jsonify
from flask_cors import CORS
import os
app = Flask(__name__)
CORS(app, resources={r"/*":{"origins":"*"}})
# Fetch all provinces from the JSON file
def return_dataset():
current_dir = os.path.dirname(os.path.abspath(__file__))
file_path = os.path.join(current_dir, ".... | SylvieMutuyimana/automation-system | backend/api/get/districts.py | districts.py | py | 2,537 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "flask.Flask",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "flask_cors.CORS",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "os.path.dirname",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number"... |
25015926965 | import time
import os
import pyperclip
from PIL import ImageGrab
import pyimgur
# define the t to make the image name
t = time.localtime()
t = time.strftime("%y-%m-%d_%H_%M_%S", t)
CLIENT_ID = "713cacc415ed391"
title = "Uploaded with PyImgur"
image_path = "/Users/mac/Pictures"
# if not(os.path.exists(image_path)):
# ... | htlin222/dotfiles | pyscripts.symlink/imgurVim.py | imgurVim.py | py | 1,090 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "time.localtime",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "time.strftime",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "PIL.ImageGrab.grabclipboard",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "PIL.ImageGrab"... |
16951376899 | import os
import json
from PIL import Image
from model.text2room_pipeline import Text2RoomPipeline
from model.utils.opt import get_default_parser
from model.utils.utils import save_poisson_mesh, generate_first_image
import torch
@torch.no_grad()
def main(args):
# load trajectories
trajectories = json.load(o... | lukasHoel/text2room | generate_scene.py | generate_scene.py | py | 2,282 | python | en | code | 885 | github-code | 18 | [
{
"api_name": "json.load",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "os.path.isfile",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "model.utils.utils.generate_firs... |
28108391310 | #!/usr/bin/env python3
import requests
def encrypt():
url = "http://aes.cryptohack.org/bean_counter/encrypt/"
rsp = requests.get(url)
return rsp.json()['encrypted']
png_hdr = bytes([0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52])
encrypted = bytes.fromhex(e... | onealmond/hacking-lab | cryptohack/bean-counter/bean_counter.py | bean_counter.py | py | 625 | python | en | code | 72 | github-code | 18 | [
{
"api_name": "requests.get",
"line_number": 6,
"usage_type": "call"
}
] |
2054477016 | from typing import List, Dict, Union, Any, Tuple
from loguru import logger
import summa
import yake
try:
import keybert
except ImportError:
logger.info("[KEYWORDS] The KeyBERT keyword extractor is not available.")
keybert = None
METHODS = {"bert", "summa", "yake"}
BERT_EMBEDDINGS = "distilbert-base-nli-... | optimalstrategy/COMP231 | ml/src/tasks/keywords.py | keywords.py | py | 3,249 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "loguru.logger.info",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "loguru.logger",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "typing.Dict",
"line_number": 35,
"usage_type": "name"
},
{
"api_name": "typing.Union",
"line... |
32404899831 | # Configuration file for the Sphinx documentation builder.
import io
import os
import re
from os.path import dirname as up
version_path = os.path.join(up(up(up(os.path.abspath(__file__)))), "pyfdb/version.py")
__version__ = re.search(
r'__version__\s*=\s*[\'"]([^\'"]*)[\'"]', io.open(version_path, encoding="utf_... | ecmwf/pyfdb | docs/source/conf.py | conf.py | py | 977 | python | en | code | 2 | github-code | 18 | [
{
"api_name": "os.path.join",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "os.path.dirname",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "os.path.abspath",
"line_nu... |
16719560774 | #!python3
import json
import requests
import logging
import isodate
from datetime import timedelta
HEADERS = {'Content-type': 'application/json'}
LOGGER = logging.getLogger('REST')
def get(url, params=[]):
"This sends a get to a URL and returns a json"
response = requests.get(url, params=params, headers=HEADERS... | fabricepipart/teknichrono | src/main/client/common/rest.py | rest.py | py | 1,339 | python | en | code | 3 | github-code | 18 | [
{
"api_name": "logging.getLogger",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "json.dumps",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "requests.post",
"line_n... |
31458662738 | import json
import logging
import os
import re
import threading
from time import sleep, time
import requests
import telegram
from telegram import Update
from telegram.ext import Updater, CallbackContext, CommandHandler, Handler, MessageHandler, Filters
from config import *
logging.basicConfig(format='%... | CJReinforce/PikPakAutoOfflineDownloadBot | pikpakTgBot.py | pikpakTgBot.py | py | 61,211 | python | en | code | 365 | github-code | 18 | [
{
"api_name": "logging.basicConfig",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "logging.INFO",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "telegram.ext.Updater",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "telegram.e... |
15880867360 | #!/usr/bin/env python
# coding: utf-8
# In[155]:
## Picks up data from Typeform with a single question & updates a custom user property of the UserID in Clevertap with the answer of typeform
## While testing CT post API, use ?dryRun=1 after the post api url - this will help in checking the response without making t... | GargYatin/Typeform-to-CT | Typeform to CleverTap Connector - Git.py | Typeform to CleverTap Connector - Git.py | py | 3,920 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "requests.get",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "requests.post",
"line_number": 82,
"usage_type": "call"
},
{
"api_name": "requests.post",
"line_number": 89,
"usage_type": "call"
}
] |
73568980201 | from tkinter import filedialog, Tk, Label, Entry, Button, Canvas
from pdf2docx import Converter
from PIL import Image, ImageTk
class PDFtoWordConverter:
def __init__(self, master):
self.master = master
self.master.title("PDF to Word Converter")
# Load logo and resize it to 200x200
... | NguyAnhQuan/PDFtoWord | main.py | main.py | py | 2,351 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "PIL.Image.open",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "PIL.Image",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "PIL.Image.ANTIALIAS",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "PIL.Image",
"li... |
25578922439 | # https://atcoder.jp/contests/abc002/tasks/abc002_4
# お互いに知っているかだから人づてはだめ→unionfindじゃない
# 全結合になっている領域が良い
import sys
read = sys.stdin.readline
def read_ints():
return list(map(int, read().split()))
def iter_p_adic(p, length):
'''
連続して増加するp進数をリストとして返す。lengthはリストの長さ
return
----------
所望のp進数リス... | masakiaota/kyoupuro | practice/D_ABC/abc002_d.py | abc002_d.py | py | 1,273 | python | ja | code | 1 | github-code | 18 | [
{
"api_name": "sys.stdin",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "itertools.product",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "collections.defaultdict",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "itertools.com... |
26723630502 | from django.shortcuts import render
from django.http import HttpResponse
from .models import Curso, Estudiante, Profesor
from django.template import Template, Context, loader
from AppClassBook.forms import CursoForm, EstudianteForm, ProfesorForm
# Create your views here.
def inicio(request):
return render(req... | Caroline4941/TabajoFinalDjango34640 | AppClassBook/views.py | views.py | py | 2,713 | python | es | code | 0 | github-code | 18 | [
{
"api_name": "django.shortcuts.render",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "AppClassBook.forms.CursoForm",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "models.Curso",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "dja... |
41331153732 | import logging
import concurrent.futures
import time
import gc
import os
from shared.csv_editor import CSVEditor
from shared.imports import Importer
class Main:
def __init__(self,name,chunk_size,max_workers,input_file,start_from,count_checkpoint=100,testing=False):
self.name = name
s... | jsxsh/email_checkers | main.py | main.py | py | 3,286 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "os.mkdir",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "logging.basicConfig",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "logging.INFO",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "logging.info",
"li... |
37298469654 | from collections import defaultdict
import heapq
class AllOne:
def __init__(self):
self.ctr = defaultdict(int)
self.deleted = defaultdict(int)
self.minheap = []
self.maxheap = []
def inc(self, key: str) -> None:
self.deleted[(self.ctr[key], key)] += 1
self.delet... | theabbie/leetcode | all-oone-data-structure.py | all-oone-data-structure.py | py | 1,397 | python | en | code | 11 | github-code | 18 | [
{
"api_name": "collections.defaultdict",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "collections.defaultdict",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "heapq.heappush",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "heapq.he... |
17185606039 | # !/usr/bin/env python3
# -*- encoding: utf-8 -*-
'''
@项目 : SignUper
@文件 : Refresh.py
@时间 : 2021/11/07 08:03
@作者 : will
@版本 : 1.0
@说明 :
'''
import json
import os
import time
import requests
from Config import Config
from Utils import traverse_dir_files, read_file, write_file
class Refresh(object):
def... | pgw1315/signuper | Refresh.py | Refresh.py | py | 2,065 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "Utils.traverse_dir_files",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "Config.Config.LINK_PATH",
"line_number": 28,
"usage_type": "attribute"
},
{
"api_name": "Config.Config",
"line_number": 28,
"usage_type": "name"
},
{
"api_name": "t... |
26440306170 | #! /home/daim/plebdev/developing-cln-plugins/venv/bin/python
# copied from https://lnroom.live/2023-03-28-live-0001-understand-cln-plugin-mechanism-with-a-python-example/
import sys
import os
import json
import socket
myplugin_out="/tmp/plugin_out"
if os.path.isfile(myplugin_out):
os.remove(myplugin_out)
def pr... | pleb-devs/developing-cln-plugins | building-a-plugin/basicplugin.py | basicplugin.py | py | 1,258 | python | en | code | 2 | github-code | 18 | [
{
"api_name": "os.path.isfile",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "os.remove",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "sys.stdin.readline",
"line_... |
33533567246 | from .asset import Asset
import pandas as pd
import numpy as np
from datetime import datetime, timedelta
class PreferredStock(Asset):
def __init__(self,name,symbol,description,pvalue,dividend):
super().__init__(name,symbol,description,pvalue,dividend)
self.currentPrice = None
self.type = 1 ... | Spideykk/Proyectos | SSSM-2018/assets/preferred_stock_build.py | preferred_stock_build.py | py | 2,627 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "asset.Asset",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "pandas.DataFrame",
"line_number": 46,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 49,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.now",
... |
17710739860 | import argparse
from functools import partial
from glob import glob
from pathlib import Path
from time import perf_counter
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
from tqdm.contrib.concurrent import process_map
import hgspy
import plotting
import tools
from strategies.config import Config... | N-Wouda/Euro-NeurIPS-2022 | analysis.py | analysis.py | py | 5,702 | python | en | code | 13 | github-code | 18 | [
{
"api_name": "matplotlib.use",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "argparse.ArgumentParser",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
"line_number": 55,
"usage_type": "call"
},
{
"api_name": "tools.read_vrplib... |
11980598609 |
# Django
from django.urls import path
# Views
from products import views
app_name = 'products'
urlpatterns = [
path('', views.ProductsHomeView.as_view(), name='home'),
path('negocios/', views.ProviderListView.as_view(), name='provider-list'),
path('negocio/<int:pk>/', views.ProviderDetailView.as_view()... | emmanueloctavi0/RaffYou | products/urls.py | urls.py | py | 504 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "django.urls.path",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "products.views.ProductsHomeView.as_view",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "products.views.ProductsHomeView",
"line_number": 12,
"usage_type": "attribute"
... |
2887556635 |
import pandas as pd
import requests
class Hefesto():
def __init__(self, path):
# Import CSV using pandas:
self.path = path
self.df = pd.read_csv(path)
# Create an object as dictonary to reduce duplicate calls:
self.reg = dict()
def get_uri(self, col, ont):
... | pabloalarconm/MEDUSA | trialCDE/hefesto/DEPRECATED/hefesto.py | hefesto.py | py | 2,798 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "pandas.read_csv",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 55,
"usage_type": "call"
}
] |
69967435241 | from django.contrib import admin
from django.urls import path, include, re_path
from drf_yasg.views import get_schema_view
from drf_yasg import openapi
from rest_framework import permissions
from SimpleCRM.settings.base import VER
schema_view = get_schema_view(
openapi.Info(
title="Snippets API",
def... | LeperGnome/SimpleCRM | SimpleCRM/urls.py | urls.py | py | 979 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "drf_yasg.views.get_schema_view",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "drf_yasg.openapi.Info",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "drf_yasg.openapi",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": ... |
31170291882 | #!/usr/local/bin/python3
from __future__ import division
import argparse
import os
import numpy as np
from scipy.optimize import curve_fit
import matplotlib.pyplot as plt
import time
from scipy.interpolate import griddata
from scipy.interpolate import CubicSpline, Akima1DInterpolator, PchipInterpolator, CubicHermiteSpl... | irrotational/get_gibbs | get_gibbs.py | get_gibbs.py | py | 33,143 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "time.time",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.rcParams",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "matplotli... |
1061772865 | """`ExportCableInstallation` and related processes."""
__author__ = "Jake Nunemaker"
__copyright__ = "Copyright 2020, National Renewable Energy Laboratory"
__maintainer__ = "Jake Nunemaker"
__email__ = "jake.nunemaker@nrel.gov"
from copy import deepcopy
from math import ceil
from marmot import process
from wisdem.... | WISDEM/WISDEM | wisdem/orbit/phases/install/cable_install/export.py | export.py | py | 13,450 | python | en | code | 125 | github-code | 18 | [
{
"api_name": "wisdem.orbit.phases.install.InstallPhase",
"line_number": 32,
"usage_type": "name"
},
{
"api_name": "common.SimpleCable",
"line_number": 90,
"usage_type": "call"
},
{
"api_name": "common.load_cable_on_vessel",
"line_number": 324,
"usage_type": "call"
},
... |
4002892504 | from absl.testing import parameterized
import numpy as np
from tensorflow.core.framework import full_type_pb2
from tensorflow.python.eager import context
from tensorflow.python.eager import def_function
from tensorflow.python.framework import dtypes
from tensorflow.python.framework import errors
from tensorflow.python... | tensorflow/tensorflow | tensorflow/python/framework/sparse_tensor_test.py | sparse_tensor_test.py | py | 14,403 | python | en | code | 178,918 | github-code | 18 | [
{
"api_name": "tensorflow.python.framework.test_util.TensorFlowTestCase",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "tensorflow.python.framework.test_util",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "tensorflow.python.framework.sparse_tensor.Spa... |
33507253763 | import os
import xml.etree.ElementTree as ET
class XmlGenerator:
"""Responsible for generating an invoice in xml format"""
TEMPLATE_XML = """\
<Invoice SALES_ID="{sales_id}" ORDER_ID ="{order_id}">
<Status>{status}</Status>
<Comment>{comment}</Comment>
<Product>
... | phdepaula/Invoice-Generator-Microservice | resources/xml_generator.py | xml_generator.py | py | 1,862 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "os.path.exists",
"line_number": 50,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 50,
"usage_type": "attribute"
},
{
"api_name": "os.makedirs",
"line_number": 51,
"usage_type": "call"
},
{
"api_name": "xml.etree.ElementTree.fromstr... |
3272304741 | from jax import numpy as np
import jax.numpy as jnp
from jax import jit, device_put
from bench.core.executer import Executer
def bboxes2tblr(priors, gts, normalizer=4.0, normalize_by_wh=True):
# dist b/t match center and prior's center
prior_centers = (priors[:, 0:2] + priors[:, 2:4]) / 2
xmin, ymin, xmax... | DeepLink-org/DLOP-Bench | bench/samples/long_tail/bbox2tblr/jax_impl.py | jax_impl.py | py | 1,194 | python | en | code | 38 | github-code | 18 | [
{
"api_name": "jax.numpy.split",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "jax.numpy",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "jax.numpy.expand_dims",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "jax.numpy",
"line... |
11110819388 | """module: helper_functions
Author: Bill Duncan
This module contains a number of functions to assist with the querying and processing of tabular data.
See `init_graph` for details on functions that get attached to rdflib.Graph.
* `init_graph`: attaches custom functions an rdflib Graph and returns a new graph
* `add_sp... | wdduncan/test-data-field-punning | notebooks/lib/helper_functions.py | helper_functions.py | py | 11,467 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "rdflib.Graph.add_spo",
"line_number": 27,
"usage_type": "attribute"
},
{
"api_name": "rdflib.Graph",
"line_number": 27,
"usage_type": "name"
},
{
"api_name": "rdflib.Graph.add_spv",
"line_number": 28,
"usage_type": "attribute"
},
{
"api_name": "rdfl... |
20764812441 | from django.db import models
from django.utils.encoding import python_2_unicode_compatible
@python_2_unicode_compatible
class SupportedResourceType(models.Model):
resource_name = models.CharField(max_length=256, unique=True,
db_index=True)
json_schema =... | videntity/django-fhir | fhir/models.py | models.py | py | 4,697 | python | en | code | 10 | github-code | 18 | [
{
"api_name": "django.db.models.Model",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "django.db.models",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "django.db.models.CharField",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "... |
32316102762 | # coding: utf-8
"""
api_utils.auth
~~~~~~~~~~~~~~
This module provides API authentication based on Hawk scheme and
Flask-Login extension.
"""
from functools import wraps
from flask import request, session, current_app
from werkzeug.exceptions import BadRequest, Unauthorized
try:
import mohawk
from flask.ext.... | marselester/flask-api-utils | api_utils/auth.py | auth.py | py | 5,398 | python | en | code | 55 | github-code | 18 | [
{
"api_name": "flask.current_app.config",
"line_number": 71,
"usage_type": "attribute"
},
{
"api_name": "flask.current_app",
"line_number": 71,
"usage_type": "name"
},
{
"api_name": "functools.wraps",
"line_number": 65,
"usage_type": "call"
},
{
"api_name": "flask... |
70787238441 | import maya.cmds as cmds
import pymel.core as pm
import pymel.core.datatypes as dt
from tqdm import tqdm, trange
import attachedLocalSpace as als
import importlib
importlib.reload(als)
def connectMeshToTree(meshNode, treeNode, index):
meshNode.outMesh.connect(treeNode.inMeshes[index].inMesh)
meshNode.parent(... | bambooshoot/tree | py/skelTreeCreator.py | skelTreeCreator.py | py | 7,193 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "importlib.reload",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "pymel.core.datatypes.Point",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "pymel.core.datatypes",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "pymel... |
15027849361 | import tkinter as tk
import random
from datetime import *
random_metin = ["ben klavye hız testi yapıyorum", "klavye parmak hızımı öğrenmeye çalışıyorum","kalvyede hızlı olup olmadığımı öğrenmeye çalışıyorum", "on parmak hızımı bulmaya çalışıyorum","hızlı bir şekilde yazıp yazamadığımı öğreniyorum", "klavyede ne kadar h... | erengulmz/python-ile-klavye-hiz-testi-programi | KlavyeHizTesti/arayuzlu.py | arayuzlu.py | py | 1,767 | python | tr | code | 0 | github-code | 18 | [
{
"api_name": "random.choice",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "datetime.now",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "tkinter.Tk",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "tkinter.Label",
"line_number":... |
72580959080 | # -*- coding:UTF-8 -*-
import tensorflow as tf
from tensorflow import keras
import tushare as ts
import numpy as np
import pandas as pd
import os
import time
import sys
import random
from absl import app
from absl import flags
from datetime import datetime
sys.path.append("..")
from common import base_common
from com... | Isaaclin007/tensorflow | regression/stockv2/show.py | show.py | py | 7,947 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "sys.path.append",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "absl.flags.FLAGS",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "absl.flags",
... |
35542088024 | from django.db import models
# Create your models here.
from django.contrib.gis.db import models
COUNTY_LIST = [
'Atlantic County',
'Bergen County',
'Burlington County',
'Camden County',
'Cape May County',
'Cumberland County',
'Essex County',
'Gloucestor County',
'Hudson County',
... | jayapal/FloodData | analyse/models.py | models.py | py | 1,242 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "django.contrib.gis.db.models.Model",
"line_number": 35,
"usage_type": "attribute"
},
{
"api_name": "django.contrib.gis.db.models",
"line_number": 35,
"usage_type": "name"
},
{
"api_name": "django.contrib.gis.db.models.CharField",
"line_number": 36,
"usage_t... |
70839107881 | import os
import re
import json
import random
import warnings
from pathlib import Path
import pandas as pd
import numpy as np
import spacy
from spacy.util import minibatch, compounding
from spacy.matcher import PhraseMatcher
warnings.filterwarnings("ignore")
class NER:
def __init__(
self,
iter=10... | chawla201/Custom-Named-Entity-Recognition | ner.py | ner.py | py | 11,306 | python | en | code | 24 | github-code | 18 | [
{
"api_name": "warnings.filterwarnings",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "os.listdir",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "os.listdir",
"line_number": 44,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
... |
34438208788 | # -*- coding: utf-8 -*-
from __future__ import absolute_import
import string
import sys
import unicodedata
from collections import namedtuple
spectuple = namedtuple('SpecificPlatform', ['dist',
'major_vers',
'full_vers',
... | natefoo/lionshead | lionshead/util.py | util.py | py | 1,063 | python | en | code | 6 | github-code | 18 | [
{
"api_name": "collections.namedtuple",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "sys.version_info",
"line_number": 27,
"usage_type": "attribute"
},
{
"api_name": "string.ascii_letters",
"line_number": 28,
"usage_type": "attribute"
},
{
"api_name":... |
70277515560 | import numpy
import torch
from torchvision import transforms
std = [0.229,0.224,0.225]
mean = [0.485,0.456,0.406]
def encoder(img):
img = img.cuda()
for i in range(0,img.size(0)):
for j in range(0,img.size(1)):
img[i][j] = (img[i][j]-112)/112
return img
def decod... | GeekEagle/Cat-Face-Recognition | bianmajiema.py | bianmajiema.py | py | 729 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "torchvision.transforms.Normalize",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "torchvision.transforms",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "torchvision.transforms.Compose",
"line_number": 26,
"usage_type": "call"
},
{... |
70175032042 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('core', '0013_auto_20150322_0000'),
]
operations = [
migrations.AlterField(
model_name='channel',
nam... | five59/M3U8-Creator | src/core/migrations/0014_auto_20150322_0011.py | 0014_auto_20150322_0011.py | py | 831 | python | en | code | 11 | github-code | 18 | [
{
"api_name": "django.db.migrations.Migration",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "django.db.migrations",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "django.db.migrations.AlterField",
"line_number": 14,
"usage_type": "call"
},
{... |
26701330324 | import scrapy
from lxml import etree
from scrapy.http import Request
from movieSpider.items import MovieSpiderItem
# from movieSpider.movieSpider.pipeLine.MySQLPipeline import MySQLPipeline
# from ..pipeLine.MySQLPipeline import MySQLPipeline
class Myspider(scrapy.Spider):
name = 'movieSpider'
allowed_domains... | jeikerxiao/pythonStudy | movieSpider/movieSpider/spiders/movieSpider.py | movieSpider.py | py | 2,531 | python | en | code | 2 | github-code | 18 | [
{
"api_name": "scrapy.Spider",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "scrapy.http.Request",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "lxml.etree.HTML",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "lxml.etree",
... |
10506820234 |
import pandas as pd
import pandas as pd
import numpy as np
from numpy import array
import matplotlib.pyplot as plt
from sklearn .model_selection import train_test_split
from sklearn .linear_model import LinearRegression
from sklearn.preprocessing import LabelEncoder
from sklearn .metrics import classification_report,... | NirajIngole35/weight-predict-project | p.py | p.py | py | 1,613 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "pandas.read_csv",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "sklearn.preprocessing.LabelEncoder",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "numpy.vstack",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "numpy... |
21211398091 | # 3 Feladat: Guess the number automatizálása
from selenium import webdriver
import time
from selenium.webdriver.chrome.options import Options
from webdriver_manager.chrome import ChromeDriverManager
options = Options()
options.headless = False
driver = webdriver.Chrome(executable_path=ChromeDriverManager().install(),... | leeltib/probazarovizsga2 | testproject/guess_the_number.py | guess_the_number.py | py | 2,319 | python | hu | code | null | github-code | 18 | [
{
"api_name": "selenium.webdriver.chrome.options.Options",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 10,
"usage_type": "name"
},
{
... |
27859378015 | import seaborn as sns
import pandas as pd
import matplotlib.pyplot as plt
from matplotlib.dates import DateFormatter
import matplotlib.dates as mdates
from datetime import datetime
from matplotlib.ticker import MultipleLocator, FuncFormatter
def dateparse(d):
return datetime.strptime(d.strip('" '), "%Y-%m-%d")
... | dflock/duncanlock.net | content/stats/plot_words_per_post.py | plot_words_per_post.py | py | 1,665 | python | en | code | 23 | github-code | 18 | [
{
"api_name": "datetime.datetime.strptime",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "matplotlib.pyplot.xkcd",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "m... |
19096035966 | # -*- coding: utf-8 -*-
"""
Created on Mon Aug 16 13:47:17 2021
@author: Frederik Wieder
"""
from flux_class_vecs import flux_cone,supp
import numpy as np
import random
from multiprocessing import Pool
import tqdm
from scipy.optimize import linprog
class arc:
def __init__(self,start_nodes,target_nodes, consu... | fwieder/fluxcones | random_nets_test_gamma_bound.py | random_nets_test_gamma_bound.py | py | 4,223 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "numpy.arange",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "random.randint",
"line_number": 47,
"usage_type": "call"
},
{
"api_name": "numpy.random.choice",
"li... |
30609744474 |
import cv2
import numpy as np
import urllib.request as urllib
import time
# Goal: from a stream or just a video, cut the silent parts of the input and center the frame if it finds a face
phone_stream_url = 'http://192.168.18.3:8080/shot.jpg'
def main():
# Load trained face recognition classifier
face_casc... | raegnald/opencv_face_detection_cut_and_center | main.py | main.py | py | 1,658 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "cv2.CascadeClassifier",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "urllib.request.urlopen",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "urllib.request",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "numpy.arr... |
23399323121 | """Main view handler"""
import random
import string
import re
from flask import Blueprint, redirect, url_for, request, render_template
from flask_json import json_response
from ..models import Link, db
page = Blueprint("serve", __name__, static_folder="static")
REGEX = re.compile("http[s]?://(?:[a-zA-Z]|[0-... | mlodybercik/urlshortener | app/shortener/views/serve.py | serve.py | py | 2,139 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "flask.Blueprint",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "re.compile",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "flask.render_template",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "models.Link.query.fil... |
9462828551 | import os
from logging import Logger
from typing import Union, Tuple, Sequence
import catboost
import numpy as np
import pandas as pd
from scipy.stats import randint, uniform
from utils.feature_analysis import save_feature_analysis_plots
from utils.func_utils import create_empty_folder
from .predictor import Predicto... | AndreaFalanti/popnas | src/predictors/models/catboost_predictor.py | catboost_predictor.py | py | 7,699 | python | en | code | 2 | github-code | 18 | [
{
"api_name": "predictor.Predictor",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "logging.Logger",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "pandas.DataFrame",
"line_number": 36,
"usage_type": "attribute"
},
{
"api_name": "pandas.DataF... |
1238788392 | import os,sys,time,json,random,re,string,platform,base64,uuid
from bs4 import BeautifulSoup as sop
from bs4 import BeautifulSoup
import requests as ress
from datetime import date
from datetime import datetime
from time import sleep
from os import system as s
from time import sleep as waktu
try:
import req... | OMIdark/clonex1 | clonex.py | clonex.py | py | 9,024 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "os.system",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "os.system",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.now",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"li... |
14329904731 | # Databricks notebook source
# MAGIC %sql
# MAGIC Create database if not exists f1_processed
# MAGIC location '/mnt/processed'
# COMMAND ----------
# MAGIC %run /Users/Saravana_admin@5njbxz.onmicrosoft.com/Include/Config_File
# COMMAND ----------
Circuit_Schema = StructType(fields = [ StructField("circuitId",Intege... | SaravanaKumarRamesh/AzureDatabricks_Proj | notebooks/Users/Formula1_project/Processed/1. Create Ingestion tables.py | 1. Create Ingestion tables.py | py | 12,783 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "pyspark.sql.functions.current_timestamp",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "pyspark.sql.functions.col",
"line_number": 59,
"usage_type": "call"
},
{
"api_name": "pyspark.sql.functions.current_timestamp",
"line_number": 62,
"usage_typ... |
43404602951 | # instance/config.py
# http://exploreflask.com/en/latest/configuration.html
# __file__ --> basic.py where is it in my computer - where do I start and it gives me the full directory path
# the os library saves you to grab that absolute path c://user/bart/something/scripts/program
import os
from dotenv import load_doten... | drmlbrt/az_hornet_mapper | instance/config.py | config.py | py | 938 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "dotenv.load_dotenv",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.path.dirname",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "os.path.realpath",
... |
5554379693 | import pytest
from src.player.ai import AIPlayer
from src.player.human import HumanPlayer
from tests.stubs import ControllerStub
@pytest.fixture()
def setup() -> tuple[HumanPlayer, ControllerStub]:
hp = HumanPlayer()
stub = ControllerStub(hp)
return hp, stub
def test_get_user_input(
monkeypatch: py... | mbalzert1978/rate_zahl | tests/test_player.py | test_player.py | py | 690 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "src.player.human.HumanPlayer",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "tests.stubs.ControllerStub",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "pytest.fixture",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": ... |
42401819465 | import socket
from _thread import *
import enum
import threading
from random import randint
import time
# userId 유저마다 입력한 아이디를 가지고 이미 존재하는경우 a_1 같은방식으로 중복을 방지합니다.
# priorityNum 서버에 접속한 유저마다 우선순위 번호를 받고 3명이상 연결시 누가 먼저 게임을
# 시작하는지를 결정합니다.
# socket은 소켓정보를 저장합니다.
class User:
priorityNumCounter = 0
def __init__(s... | MunoDevelop/problem1 | Server/Server/Server.py | Server.py | py | 12,846 | python | ko | code | 0 | github-code | 18 | [
{
"api_name": "enum.Enum",
"line_number": 32,
"usage_type": "attribute"
},
{
"api_name": "socket.error",
"line_number": 57,
"usage_type": "attribute"
},
{
"api_name": "socket.error",
"line_number": 74,
"usage_type": "attribute"
},
{
"api_name": "socket.socket",
... |
33427565031 | from django.shortcuts import get_object_or_404
from rest_framework import status
from rest_framework.decorators import api_view, permission_classes
from rest_framework.permissions import IsAuthenticated
from rest_framework.response import Response
from medicines.models import Medicine
from orders.models import Cart, O... | serikqaliev/easy-pharm | orders/views.py | views.py | py | 1,629 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "medicines.models.Medicine.objects.get",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "medicines.models.Medicine.objects",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "medicines.models.Medicine",
"line_number": 21,
"usage_type":... |
25210091160 | from flask import (
Blueprint,
render_template,
request,
)
from .models import Books,Author,Tags
from flask_paginate import Pagination,get_page_parameter
import config
# 图书页面的本bp
bp = Blueprint("book",__name__,url_prefix='/book')
# 前台主页
@bp.route('/',endpoint='index')
def index():
page = request.args.... | jiajiabin/bbs_1902 | apps/books/views.py | views.py | py | 1,816 | python | zh | code | 1 | github-code | 18 | [
{
"api_name": "flask.Blueprint",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "flask.request.args.get",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "flask.request.args",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "flask.... |
15600041956 | import requests
import argparse
#getting user inputs
parser = argparse.ArgumentParser()
parser.add_argument('--index', help='Elasticsearch index name"', type=str)
parser.add_argument('--type', help='Elasticsearch type"', type=str)
parser.add_argument('--keywords_list', help='keywords list to query"', type=st... | pptech-ds/PPTech-utilities | python/elasticsearch/elasticsearch_get_data.py | elasticsearch_get_data.py | py | 967 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 20,
"usage_type": "call"
}
] |
33224365289 | import requests
import xml.etree.ElementTree as elemTree
def findStocks(name):
url = 'http://api.seibro.or.kr/openapi/service/StockSvc/getStkIsinByNmN1'
servicekey= requests.utils.unquote('CCyHbj1LLKwj5YjI7ycFHNZJNNlRmz06H4SBg0PHzStJzHDKzYVc%2FqMWsM95qQkuUy90qT7NHjJRxDnL4DdldQ%3D%3D')
secnNm = name
... | valborgs/supy | firstapp/stockapi.py | stockapi.py | py | 1,272 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "requests.utils.unquote",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "requests.utils",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "requests.get",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "xml.etree.Eleme... |
74146755240 | from collections import deque, Counter
from BinTree import *
from RandomForestBase import *
class RandomForestClassifier(RandomForestBase):
"""
Klasa wykonujaca klasyfikacje za pomoca lasu losowego.
"""
def __init__(self, n_features):
super(RandomForestClassifier, self).__init__(n_features)
... | Clara10101/ADPB-zadanie-zaliczeniowe-2 | RandomForest/RandomForestClassifier.py | RandomForestClassifier.py | py | 4,739 | python | pl | code | 0 | github-code | 18 | [
{
"api_name": "collections.deque",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "collections.Counter",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "collections.Counter",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "collections... |
44582091360 | import json
import pycocotools.mask as mask_util
import ast
import cv2
def decoding(rle_json, decode_all):
with open(rle_json, 'r') as f:
targets = json.load(f) # targets: list of string (each string expresses json file as dict)
# print(type(targets), targets, len(targets))
# print(type(t... | ssai-snu/CAPP-VITON | 1.bg_remove/decode_rle_json.py | decode_rle_json.py | py | 3,283 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "json.load",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "ast.literal_eval",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "pycocotools.mask.decode",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "pycocotools.mask",... |
36356090020 | import flask
import pytest
import sys
sys.path.append('../src')
from flask_restful_api import app
def test_endpoint_endpoints():
with app.test_client() as c:
rv = c.get('/endpoints')
json_data = rv.get_json()
assert json_data == {
'endpoints': [
{
... | eduardosmarcal/iclinic-python-challenge | tests/test_flask_restful_api.py | test_flask_restful_api.py | py | 1,593 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "sys.path.append",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "flask_restful_api.app.test_client",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "flask_r... |
16694129685 | import serial
import matplotlib.pyplot as plt
import matplotlib.animation as animation
import numpy as np
import time
# Establish a serial connection
ser = serial.Serial('COM6', 115200) # substitute 'COM3' with your port number and '9600' with your baud rate
time.sleep(1)
# Variables to store data
pitch_a_data = []
r... | KrissiTekkari/allskonar_test | read_accel/real_time_plots/real_time_plot_angles.py | real_time_plot_angles.py | py | 2,580 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "serial.Serial",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.subplots",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",... |
14387745199 | from fastapi import APIRouter, Query, File, UploadFile, HTTPException
from sqlalchemy import Boolean, Column, ForeignKey, Integer, String, PrimaryKeyConstraint
from sqlalchemy import create_engine, Column, Integer, String, ForeignKey, UniqueConstraint
from sqlalchemy.ext.declarative import declarative_base
from sqlalc... | anahopbob/Team-DreamCiti-CitiBank-HackOverflow-2023 | backend/app/services/relationalDatabase.py | relationalDatabase.py | py | 2,938 | python | en | code | 2 | github-code | 18 | [
{
"api_name": "sqlalchemy.ext.declarative.declarative_base",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.create_engine",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.orm.sessionmaker",
"line_number": 28,
"usage_type": "call... |
11197725215 | # Developed by MD-Nazmus Samin Sunbeam
import os
import time
import gym
import numpy as np
import pyautogui
from gym import Env, spaces
class ComputerEnv(gym.Env):
"""Computer Environment that follows the gym template."""
metadata = {'render.modes': ['human']}
def __init__(self):
super(ComputerE... | mdsunbeam/internet-playground | env.py | env.py | py | 5,395 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "gym.Env",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "pyautogui.size",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "gym.spaces.Box",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "gym.spaces",
"line_num... |
35911026904 | import os
import functools
import time
import pandas as pd
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
from sklearn.base import BaseEstimator, TransformerMixin
from constants import PLOTS_DIRECTORY, DIAGNOSTICS_DIRECTORY, FEATURES_TO_DROP, TARGET
def _plot_correlation_matrix(df):
""... | micahmelling/cy-young-voting | helpers/helpers.py | helpers.py | py | 5,783 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "numpy.triu",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "numpy.ones_like",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "numpy.bool",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "seaborn.diverging_palette"... |
35062178573 | import re
from collections import namedtuple
from .headers import DeviceHeader
from .user_agent import UserAgnet
from .constants import MOBILE_HEADERS, TABLET_DEVICES, get_extended_rule, get_mobile_rule
class Detection(object):
# Mobile detection type.
DETECTION_TYPE_MOBILE = 'mobile'
# Extended detectio... | Botir/Django-Mobile-Detector | mobiledetect/detection.py | detection.py | py | 5,302 | python | en | code | 6 | github-code | 18 | [
{
"api_name": "headers.DeviceHeader",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "user_agent.UserAgnet",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "constants.TABLET_DEVICES",
"line_number": 62,
"usage_type": "name"
},
{
"api_name": "co... |
70230959722 | from cmq_rpc import RpcServer, RpcClient, DataPacker
from gui_misc import field2variable, variable2field
import base
import logging
import datetime
import sys
import time
import json
class ProxyRpcServer(RpcServer):
def __init__(self, rep_address, pub_address, config = {}, tday = datetime.date.today()):
su... | harvey1673/pyktrader2 | proxy_rpc_agent.py | proxy_rpc_agent.py | py | 10,042 | python | en | code | 36 | github-code | 18 | [
{
"api_name": "cmq_rpc.RpcServer",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "datetime.date.today",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "datetime.date",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "gui_misc.var... |
40885953179 | import os
import sys
import tensorflow as tf
import argparse
import train
import inference
import dataset_generator
class ConfigInference(object):
if __name__ == '__main__':
print("parser")
parser = argparse.ArgumentParser(
description='Classification Network')
parser.add_arg... | hcw-00/classification_code | run.py | run.py | py | 2,581 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "dataset_generator.Generate_dataset",
"line_number": 44,
"usage_type": "call"
},
{
"api_name": "train.ModelTraining",
"line_number": 50,
"usage_type": "call"
}
] |
28110766580 | # -*- coding: UTF-8 -*-
from random import getrandbits
from Crypto import Random
from Crypto.PublicKey.pubkey import bignum, getPrime
_g = 2
def GetBigPrime(bits = 300):
"获取大素数"
return bignum(getPrime(bits-1, Random.new().read))
class DiffieHellman:
"p大素数,g底数,公钥可以公开,私钥_randnum要保密"
def __init__(self,... | oneApple/ContentThreadPool | CryptoAlgorithms/DiffieHellman.py | DiffieHellman.py | py | 947 | python | en | code | 2 | github-code | 18 | [
{
"api_name": "Crypto.PublicKey.pubkey.bignum",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "Crypto.PublicKey.pubkey.getPrime",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "Crypto.Random.new",
"line_number": 11,
"usage_type": "call"
},
{
... |
23741601505 | # -*- coding: utf-8 -*-
from time import sleep
import pygame_widgets
from pygame_widgets.button import Button
import pygame
import os
import sys
import sqlite3
FPS = 30
# Переменные
moves = 0 # Шаги
level = 0 # Начальный уровень
places = {} # Ключ = координаты Значение = 0/1(бутылка на месте/нет)
tile_width = tile... | Ravil1806/SokobanPygame | main.py | main.py | py | 22,421 | python | ru | code | 1 | github-code | 18 | [
{
"api_name": "pygame.time.Clock",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "pygame.time",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "sqlite3.connect",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "pygame.sprite.Grou... |
35443779383 | import os
import pandas as pd
import yfinance as yf
import datetime as dt
try:
from Features import create_features
except:
from Database.Features import create_features
import traceback
class DATABASE:
def __init__(self):
pass
def update_data(self, ticker):
try:
ticker_... | Rachel0904/Stock-Movement-Prediction | Database/functions.py | functions.py | py | 2,168 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "yfinance.Ticker",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "Database.Features.create_features",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "traceback.print_exc",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": ... |
28957193908 | import argparse
import os
import re
import subprocess
import tempfile
import at28c256
import bootstrap
class Label:
def __init__(self, label):
self.label = label
def __str__(self):
return f'Label[{self.label}]'
class LabelRef:
def __init__(self, label):
self.label = label
... | liamkirton/8bitcpu | assembler/assembler.py | assembler.py | py | 9,538 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "re.match",
"line_number": 215,
"usage_type": "call"
},
{
"api_name": "re.match",
"line_number": 217,
"usage_type": "call"
},
{
"api_name": "re.match",
"line_number": 221,
"usage_type": "call"
},
{
"api_name": "re.match",
"line_number": 241,
... |
16476465640 | # wav, マイク, (gps:未実装)の配信クライアント
# wavファイルのみの配信と、wav+マイクの配信に対応
from pyproj import Transformer
import matplotlib.pyplot as plt
import logging
from subprocess import TimeoutExpired
import math
import numpy as np
import socket
from threading import Thread
from ENV import DISABLE_HIT_JUDGE, MAX_HOST, DEBUG as DEBUG_MODE, D... | yuto-moriizumi/sotuken | Streamer/Viewer.py | Viewer.py | py | 10,169 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "numpy.float64",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "ENV.HOST_ADDRESS_START",
"line_number": 20,
"usage_type": "argument"
},
{
"api_name": "ENV.MAX_HOST",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "socket.soc... |
37038163735 |
# import json
import sys
import os
import re
import gensim
import nltk
import main as MAIN
# import numpy as np
import xlsxwriter
from openpyxl import load_workbook
from keras.preprocessing import sequence
import csv
import xlrd
from gensim.models import Word2Vec
import applying_ML_algorithms
from datetime import date... | ronhadad22/LEVEL-OF-USER-SATISFACTION-FOR-PUBLIC-TRANSPORTATION-USING-DATA-MINING-AND-ML | convert_to_vec.py | convert_to_vec.py | py | 10,948 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "nltk.corpus.stopwords.words",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "nltk.corpus",
"line_number": 27,
"usage_type": "attribute"
},
{
"api_name": "re.compile",
"line_number": 49,
"usage_type": "call"
},
{
"api_name": "re.VERBOSE",
... |
5743661545 | import abc
from typing import Any, Generator, Iterable, List, NamedTuple, Optional, Union
import unittest
from nmigen import *
from nmigen.sim import *
from nmigen_nexys.core import edge
from nmigen_nexys.core import util
from nmigen_nexys.test import test_util
Event = Any # TODO: Maybe a protocol type?
class Ti... | sjolsen/nmigen-nexys | test/event.py | event.py | py | 4,174 | python | en | code | 5 | github-code | 18 | [
{
"api_name": "typing.Any",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "typing.NamedTuple",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "typing.NamedTuple",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "typing.Optional",
... |
14141620867 | import json
from src.services.task_service import TaskService
from src.core_module import core
def resp_ajax_tasks_search(environ, response):
if response is not None:
qs = environ['QUERY_STRING']
# core.dd(qs)
search_str = qs.split("=")[1].replace("%20", " ")
# core.dd(se... | IvanAndonov78/python_jwt_sqlite | src/views/resp_ajax_tasks_search.py | resp_ajax_tasks_search.py | py | 1,083 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "src.services.task_service.TaskService",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "json.dumps",
"line_number": 30,
"usage_type": "call"
}
] |
2654153504 | # Generic
import unittest
# Libs
from flask_testing import TestCase
# Own
from flask import current_app as app
class TestArtificialSongs(TestCase):
def create_app(self):
app.config.from_object('config.default')
app.config.from_object('config.testing')
return app
class TestArtificialSon... | arukavina/baking-lyrics | baking/tests/_test_artificial_songs.py | _test_artificial_songs.py | py | 1,731 | python | en | code | 14 | github-code | 18 | [
{
"api_name": "flask_testing.TestCase",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "flask.current_app.config.from_object",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "flask.current_app.config",
"line_number": 13,
"usage_type": "attribute"
},
... |
40778823927 | # Implementation for
# Comparator-learning Combinatorial Functions (JMLR, 2016)
# @author: Yuhao Wan
import numpy as np
import pandas as pd
from functools import cmp_to_key
import math
import copy
from sklearn.linear_model import perceptron
from sklearn.metrics import accuracy_score
class pairwise_oracle():
# Impl... | Yuhao-Wan/Pairwise-combinatorial-learner | learner.py | learner.py | py | 6,730 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "numpy.array",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "numpy.where",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "numpy.vectorize",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "numpy.random.choice",
"li... |
6541561274 | import os
from dotenv import load_dotenv
from flask import Flask, Blueprint
from google.oauth2 import service_account
import uuid
from flask import Flask, request, jsonify, session,url_for, redirect
from datetime import datetime
import firebase_admin
from firebase_admin import initialize_app, credentials, auth, exce... | williammw/mealmate-api | umami/lib/cms.py | cms.py | py | 12,453 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "flask.Blueprint",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "uuid.uuid4",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "dotenv.load_dotenv",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "os.environ.get",
"l... |
42770048083 | import bpy
# -----------------------------------------------------------------------------
class QANIM_OT_overscan_reset(bpy.types.Operator):
bl_label = "reset_overScan"
bl_idname = "qanim.overscan_reset"
bl_description = ""
bl_options = {'REGISTER', 'UNDO'} # undo効くようにする設定
def resetOverSca... | Project-StudioQ/camera_extends | overScan.py | overScan.py | py | 9,355 | python | en | code | 2 | github-code | 18 | [
{
"api_name": "bpy.types",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "bpy.context",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "bpy.context",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "bpy.ops.wm.redraw_tim... |
416086953 | import logging as lg
from logging import Logger
import datetime
from os import mkdir
from os.path import exists, isdir
import traceback
__all__ = [
'Logger',
'configure_logger',
'create_logger',
'log_exception'
]
if not exists('./logs'):
mkdir('./logs')
elif not isdir('./logs'):
raise Exceptio... | andrii-z4i/xmind-telegram | shared/configuration/logging_configuration.py | logging_configuration.py | py | 1,669 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "os.path.exists",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "os.mkdir",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "os.path.isdir",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.now",
"li... |
23726096170 | import keras
import keras.backend as K
from tqdm import tqdm
import os
class ADAMLearningRateTracker(keras.callbacks.Callback):
"""It prints out the last used learning rate after each epoch (useful for resuming a training)
original code: https://github.com/keras-team/keras/issues/7874#issuecomment-329347949
... | whuyuxia/SMILEcode | utils.py | utils.py | py | 2,332 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "keras.callbacks",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "keras.backend.eval",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "keras.backend",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "keras.backend.ev... |
43336876744 | import asyncio
import dataclasses
import aiohttp
from scrapers.core import aiohelper
from scrapers.core import container
def main():
"""Define the main entrypoint."""
asyncio.run(search_all())
def parse_entry(entry):
org = container.Organization(entry["title"])
org.address = (
f'{entry.get... | rgreinho/vision-zero-assortment | scrapers/scrapers/coc.py | coc.py | py | 2,910 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "asyncio.run",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "scrapers.core.container.Organization",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "scrapers.core.container",
"line_number": 16,
"usage_type": "name"
},
{
"api_name... |
25796723752 | import shutil
from colorama import Fore, Style
FALLBACK_TERMINAL_SIZE = (80, 20)
TERMINAL_COLUMNS = None
def get_console_columns():
"""Returns the number of columns that are in the console"""
global TERMINAL_COLUMNS
# Stops the function from executing needlessly multiple times.
if TERMINAL_COLUMNS:
... | aaron-jencks/emerson_seed_object_detection | PyCharm/EstimatorProject/Display/util.py | util.py | py | 2,644 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "shutil.get_terminal_size",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "colorama.Fore.RED",
"line_number": 89,
"usage_type": "attribute"
},
{
"api_name": "colorama.Fore",
"line_number": 89,
"usage_type": "name"
},
{
"api_name": "coloram... |
7703826786 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Sep 17 13:00:08 2021
@author: louis
"""
import numpy as np
import scipy as sp
import networkx as nx
import scipy.integrate as spode
import matplotlib.pyplot as plt
from matplotlib import cm
from matplotlib.ticker import LinearLocator
import graphSimpl... | louis-auco/thermaNet | graph_sim_simple.py | graph_sim_simple.py | py | 2,492 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "graphProcess.SimGraph",
"line_number": 87,
"usage_type": "call"
},
{
"api_name": "graphSimple.defineGraphBeamSim",
"line_number": 88,
"usage_type": "call"
},
{
"api_name": "numpy.linspace",
"line_number": 96,
"usage_type": "call"
},
{
"api_name": "n... |
26535658675 | import pickle
import os
import re
from itertools import compress
import numpy as np
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.naive_bayes import MultinomialNB
class DumbModel():
"""
NB network class. The class provides a wrapper for sklearn methods
"""
def __init__(self,... | mmarouen/marabou | marabou/train/src/models/sentiment_analysis_tfidf.py | sentiment_analysis_tfidf.py | py | 3,807 | python | en | code | 2 | github-code | 18 | [
{
"api_name": "sklearn.feature_extraction.text.TfidfVectorizer",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "sklearn.naive_bayes.MultinomialNB",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 68,
"usage_type": "call"
... |
13681073964 | import os
import yaml
try:
from yaml import CLoader as Loader, CDumper as Dumper
except ImportError:
from yaml import Loader, Dumper
from google.cloud import dataplex_v1
PROJECT = os.environ.get('PROJECT')
LOCATION = os.environ.get('LOCATION')
DATA_SCAN = os.environ.get('DATA_SCAN')
def get_data_scan(proj... | rocketechgroup/dataplex_auto_dq | main.py | main.py | py | 3,586 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "os.environ.get",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "os.environ.get",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_... |
71492774119 | '''Import all system libraries'''
import time, socket, datetime, os, fcntl, struct, sqlite3 #import time, IP, time and date
from flask import Flask, render_template, request, jsonify, request, send_file, redirect, url_for #import web app
import netifaces as ni
import RPi.GPIO as GPIO
import SystemLibrary as L
G... | AlastairHolland/RPi_SmartRelay_V2 | System.py | System.py | py | 1,050 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "RPi.GPIO.setmode",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "RPi.GPIO",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "RPi.GPIO.BCM",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "RPi.GPIO.setup",
"line_n... |
71381887399 | import random
import pygame
from pygame.locals import *
from sys import exit
pygame.init()
x = 1200
y = 720
tela = pygame.display.set_mode((x, y))
pygame.display.set_caption('TabuadaEspacial')
bg = pygame.image.load('cenario/fundo.jpg').convert_alpha()
bg = pygame.transform.scale(bg, (x, y))
nave... | Tiagolopeslg/GamePca | jogo.py | jogo.py | py | 3,456 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "pygame.init",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "pygame.display.set_mode",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "pygame.display",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "pygame.display... |
70034409002 | import os
import zipfile
import requests
import sys
import time
import argparse
import commands
import urllib3
import concurrent
import logging
from datetime import datetime
from shutil import copy, copytree, rmtree
import cbapi # Used for error handling
from cbapi.response import *
urllib3.disable_warnings(urllib... | frikky/cb-kansa | kansa.py | kansa.py | py | 28,477 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "urllib3.disable_warnings",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "urllib3.exceptions",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "argparse.ArgumentParser",
"line_number": 18,
"usage_type": "call"
},
{
"api_name... |
7388940692 | import json
file = 'users_json.txt'
myfile = open(file, mode = 'w', encoding = 'utf-8')
hero1 = {
'name' : 'Andrey',
'years' : '24',
'games' : [ 'gta', 'withes', 'formula']
}
hero2 = {
'name' : 'Egor',
'years' : '24',
'games' : [ 'heartstone', 'dota2', 'civilization']
}
all_players = []
all... | kirillqq20/Course | Python/11-json/11-json.py | 11-json.py | py | 713 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "json.dump",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "json.load",
"line_number": 25,
"usage_type": "call"
}
] |
36996775560 | # 1.20 合并多个字典或映射
a = {'x':1, 'z':3}
b = {'y':2, 'z':4}
from collections import ChainMap
c = ChainMap(a,b)
print(c['x']) # Outputs 1 (from a)
print(c['y']) # Outputs 2 (from b)
print(c['z']) # Outputs 3 (from a)
print(len(c))
print(list(c.keys()))
print(list(c.values()))
c['z'] = 10
c['w'] = 40
del c['x']
print(a)
##... | XiangyuDing/Beginning-Python | Beginning/python3_cookbook/ch01/20-chainmap.py | 20-chainmap.py | py | 998 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "collections.ChainMap",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "collections.ChainMap",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "collections.ChainMap",
"line_number": 50,
"usage_type": "call"
}
] |
42775008540 | # -*- coding: utf-8 -*-
import numpy as np
from scipy.spatial import distance as dist
class kNN:
def __init__(self, train_x, train_y, test_x, test_y):
self.train_x = train_x
self.train_y = train_y
self.test_x = test_x
self.test_y = test_y
self.condense_idx = None
... | tuc48831/Machine-Learning | hw1/kNN.py | kNN.py | py | 4,308 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "scipy.spatial.distance.cdist",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "scipy.spatial.distance",
"line_number": 22,
"usage_type": "name"
},
{
"api_name": "numpy.array",
"line_number": 59,
"usage_type": "call"
},
{
"api_name": "numpy... |
3087208530 | import os
import logging
from slack_sdk import WebClient
from slack_sdk.errors import SlackApiError
from pathlib import Path
from dotenv import load_dotenv
env_path = Path('.') / '.env'
load_dotenv(dotenv_path=env_path)
from utils.ses_service import SESService, SESInternalException
logger = logging.getLogger(__name... | raviteja2250/tabletop-backend-develop | core/utils/order_notification.py | order_notification.py | py | 1,755 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "pathlib.Path",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "dotenv.load_dotenv",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "logging.getLogger",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "slack_sdk.WebClient",... |
11311380505 | import os
import json
import numpy as np
import torch
import torch.nn.functional as F
from torchvision import datasets, transforms
from lightning.networks import (
DCGenerator64,
DCGeneratorThree,
DCDiscriminatorThree,
InfoDCDiscriminator,
InfoDCDiscriminator64,
)
def create_L_ind(L, cardinality):
... | benbo/WSGAN-paper | lightning/lutils.py | lutils.py | py | 13,498 | python | en | code | 6 | github-code | 18 | [
{
"api_name": "torch.zeros",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "torch.where",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": ... |
6395639367 | """empty message
Revision ID: e8f7da151d15
Revises:
Create Date: 2017-04-25 18:26:57.724863
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'e8f7da151d15'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto gene... | openirc/api | migrations/versions/e8f7da151d15_.py | e8f7da151d15_.py | py | 1,375 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "alembic.op.create_table",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "alembic.op",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "sqlalchemy.Column",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.Integ... |
70686182121 | from django.db.models import Count
from dcim.choices import SiteStatusChoices
from dcim.models import Site
from extras.reports import Report
class VirtualizationReport(Report):
description = "Validate the network virtualization environment for a site"
def test_cluster_exists(self):
"""
Clus... | netbox-community/customizations | reports/virtualization-reports/vm_counts.py | vm_counts.py | py | 2,158 | python | en | code | 163 | github-code | 18 | [
{
"api_name": "extras.reports.Report",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "dcim.models.Site.objects.filter",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "dcim.models.Site.objects",
"line_number": 17,
"usage_type": "attribute"
},
{
... |
18373176403 | import sys
from PySide6.QtWidgets import QApplication, QMessageBox, QMainWindow, QWidget, QGridLayout, QLineEdit, QPushButton, QLabel
from PySide6.QtGui import QPixmap
from PySide6.QtCore import Slot
from matplotlib.figure import Figure
from matplotlib.backends.backend_qtagg import FigureCanvasQTAgg as FigureCanvas
imp... | xomarwaliedx/Master_ICR_Internship | main.py | main.py | py | 7,537 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "PySide6.QtWidgets.QMainWindow",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "PySide6.QtWidgets.QWidget",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "PySide6.QtWidgets.QGridLayout",
"line_number": 14,
"usage_type": "call"
},
{
... |
10942150933 | #
# Base class for active material volume fraction
#
import pybamm
class BaseModel(pybamm.BaseSubModel):
"""Base class for active material volume fraction
Parameters
----------
param : parameter class
The parameters to use for this submodel
domain : str
The domain of the model eit... | Feitumtum/PyBaMM | pybamm/models/submodels/active_material/base_active_material.py | base_active_material.py | py | 4,253 | python | en | code | null | github-code | 18 | [
{
"api_name": "pybamm.BaseSubModel",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "pybamm.x_average",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "pybamm.standard_spatial_vars",
"line_number": 39,
"usage_type": "attribute"
},
{
"api_na... |
6250538072 | import io
import sys
import threading
import functools
import logging
import typing
import queue
import yaml
from pathlib import Path
class Worker(threading.Thread):
def __init__(self, que: queue.Queue):
self.que = que
threading.Thread.__init__(self, daemon=True)
self.start()
def ru... | danielam2358/NoCatPoop | utils.py | utils.py | py | 1,498 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "threading.Thread",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "queue.Queue",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "threading.Thread.__init__",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "thre... |
40618892746 | import collections
import sys
class Loading:
def __init__(self):
self.numbers = []
self.comparision=[]
def loading_inputs(self,amount):
while amount != 0:
row = input("Zadajte cisla: ").split()
if len(row) == self.columns:
if self.c... | PeterKaras/Python | Zmoknuta strecha.py | Zmoknuta strecha.py | py | 3,446 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "sys.maxsize",
"line_number": 32,
"usage_type": "attribute"
},
{
"api_name": "collections.deque",
"line_number": 34,
"usage_type": "call"
}
] |
17942217055 | from pymongo import MongoClient
def exec_update(zone_name, max_car):
client = MongoClient('mongodb://test:test@3.129.66.108', 27017)
# client = MongoClient('localhost', 27017)
db = client.dbteamdi
###구현
db.socarzone.update_one({'zone_name': zone_name},{'$set': {'max_car':max_car}})
print("upd... | Chatti5115/autoendoer | clients/data_update.py | data_update.py | py | 414 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "pymongo.MongoClient",
"line_number": 5,
"usage_type": "call"
}
] |
27795657464 | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect
from django.core.exceptions import MultipleObjectsReturned
from django.shortcuts import render
from django.shortcuts import get_object_or_404
from dj... | murvet/dictionary | dictionary/event/views.py | views.py | py | 1,926 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "dictionary.event.models.Event.objects.all",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "dictionary.event.models.Event.objects",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "dictionary.event.models.Event",
"line_number": 15,
"... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.