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
20106916376
import itertools def solution(numbers): answer = set() arr = list(itertools.combinations(numbers,2)) print(arr) for a in arr: answer.add(sum(a)) answer = list(answer) answer.sort() return answer
yuiseo/ProblemSolving
프로그래머스/lv1/68644. 두 개 뽑아서 더하기/두 개 뽑아서 더하기.py
두 개 뽑아서 더하기.py
py
251
python
en
code
0
github-code
18
[ { "api_name": "itertools.combinations", "line_number": 6, "usage_type": "call" } ]
13260680764
import xml.etree.ElementTree as ET class SubjectClass(): def __init__(self, name, Tasks, TD): self.Name = name self.Task = int(Tasks) self.TaskDone = int(TD) class student(): Surname = str() Midame = str() ID = str() SubjectList = [] def __init__(self, name...
BoneSAWcoder/LABSINF1Kurs
Lab3/L3EX2.py
L3EX2.py
py
2,335
python
en
code
0
github-code
18
[ { "api_name": "xml.etree.ElementTree.parse", "line_number": 26, "usage_type": "call" }, { "api_name": "xml.etree.ElementTree", "line_number": 26, "usage_type": "name" } ]
7173977586
import numpy as np import torch import pytest from torch import tensor, cuda from mrphy import γH, dt0, π from mrphy import beffective, slowsims class Test_slowsims: device = torch.device('cuda' if cuda.is_available() else 'cpu') # device = torch.device('cpu') # dtype, atol = torch.float32, 1e-4 dty...
tianrluo/MRphy.py
tests/test_slowsims.py
test_slowsims.py
py
4,193
python
en
code
3
github-code
18
[ { "api_name": "torch.device", "line_number": 12, "usage_type": "call" }, { "api_name": "torch.cuda.is_available", "line_number": 12, "usage_type": "call" }, { "api_name": "torch.cuda", "line_number": 12, "usage_type": "name" }, { "api_name": "torch.float64", "...
1196173404
import re import time from bs4 import BeautifulSoup from scrapy.http import Request from scrapy.linkextractors import LinkExtractor from scrapy.spiders import CrawlSpider, Rule from scrapy_statis.items import Item from scrapy_statis.settings import year_settings if year_settings == "all": year_pat = r'[0-9]{1,4}...
soaringsoul/stats_spider
scrapy_statis/spiders/statis_gov_spider.py
statis_gov_spider.py
py
8,860
python
en
code
16
github-code
18
[ { "api_name": "scrapy_statis.settings.year_settings", "line_number": 12, "usage_type": "name" }, { "api_name": "scrapy_statis.settings.year_settings", "line_number": 15, "usage_type": "name" }, { "api_name": "scrapy.spiders.CrawlSpider", "line_number": 18, "usage_type": "...
34557346278
import start_main import sys import time from tkinter import * from PySide6.QtWidgets import QApplication, QVBoxLayout, QMainWindow, QWidget, QPushButton, QLabel from PySide6.QtGui import QIcon from PySide6.QtCore import Qt, QTimer, Slot class Start(QMainWindow): ''' This is the main window that appears when...
ivanneto02/Zendocs
open_main.py
open_main.py
py
1,759
python
en
code
1
github-code
18
[ { "api_name": "PySide6.QtWidgets.QMainWindow", "line_number": 11, "usage_type": "name" }, { "api_name": "PySide6.QtCore.QTimer.singleShot", "line_number": 21, "usage_type": "call" }, { "api_name": "PySide6.QtCore.QTimer", "line_number": 21, "usage_type": "name" }, { ...
23734255114
from typing import List, Any from random import random import math import numpy as np from sklearn.decomposition import PCA from math import sqrt d = 50 def CalcDistant(vec1, vec2): vec = np.multiply(np.array(vec1 - vec2), np.array(vec1 - vec2)) return vec.sum() #text is a tokenized list of words def vector...
rainbowbrained/NLP_FFNN
classifier_ffnn_.py
classifier_ffnn_.py
py
8,941
python
en
code
0
github-code
18
[ { "api_name": "numpy.multiply", "line_number": 11, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 11, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_number": 16, "usage_type": "call" }, { "api_name": "numpy.linalg.norm", "line_...
7662583634
import cx_Oracle import os import pandas as pd import geopy from geopy.geocoders import Nominatim from datetime import datetime, timedelta import geocoder os.environ["NLS_LANG"] = ".AL32UTF8" location_list = ['경기', '강원', '경상남도', '경상북도', '충청남도', '충청북도', '전라남도', '전라북도', '제주특별자치도', '대전', '광주', '부산', '울산', '대구', '인천'] #...
jaewoo3231/mySSIS
application/ml/Database.py
Database.py
py
4,245
python
en
code
0
github-code
18
[ { "api_name": "os.environ", "line_number": 9, "usage_type": "attribute" }, { "api_name": "cx_Oracle.connect", "line_number": 42, "usage_type": "call" }, { "api_name": "geocoder.ip", "line_number": 46, "usage_type": "call" }, { "api_name": "geopy.geocoders.Nominati...
21100769324
from logging import getLogger import numpy as np from fusion_base import Fusion from onnx import TensorProto, helper from onnx_model import OnnxModel logger = getLogger(__name__) class FusionReshape(Fusion): def __init__(self, model: OnnxModel): super().__init__(model, "Reshape", "Reshape") self...
microsoft/onnxruntime
onnxruntime/python/tools/transformers/fusion_reshape.py
fusion_reshape.py
py
5,981
python
en
code
9,700
github-code
18
[ { "api_name": "logging.getLogger", "line_number": 8, "usage_type": "call" }, { "api_name": "fusion_base.Fusion", "line_number": 11, "usage_type": "name" }, { "api_name": "onnx_model.OnnxModel", "line_number": 12, "usage_type": "name" }, { "api_name": "numpy.asarra...
14405571830
from __future__ import print_function import argparse import json import logging import os import pickle as pkl import pandas as pd import xgboost as xgb from sagemaker_containers import entry_point from sagemaker_xgboost_container import distributed # from sagemaker_xgboost_container.data_utils import get_dmatrix im...
rapidsai/cloud-ml-examples
aws/gpu_tree_shap/train.py
train.py
py
9,385
python
en
code
131
github-code
18
[ { "api_name": "os.path.exists", "line_number": 37, "usage_type": "call" }, { "api_name": "os.path", "line_number": 37, "usage_type": "attribute" }, { "api_name": "logging.info", "line_number": 38, "usage_type": "call" }, { "api_name": "shutil.rmtree", "line_nu...
32616419815
"""Robot_controller controller.""" import logging import math import controller import numpy as np from calculations import * from reroute import reroute_after_collision_prevention from field import Field from instrumentation import trace from robot import Robot np.set_printoptions(suppress=True) DEBUG_PID = False ...
antroseco/idp
IDP_simulation/controllers/Robot_controller/Robot_controller.py
Robot_controller.py
py
25,190
python
en
code
3
github-code
18
[ { "api_name": "numpy.set_printoptions", "line_number": 14, "usage_type": "call" }, { "api_name": "robot.Robot.DEBUG_COLLISIONS", "line_number": 20, "usage_type": "attribute" }, { "api_name": "robot.Robot", "line_number": 20, "usage_type": "name" }, { "api_name": "...
31535636922
from flask import Flask from spider import get_weather app = Flask(__name__) @app.route('/') def weather(): try: resp = get_weather() except Exception as e: return "" return resp if __name__ == '__main__': app.run(debug=True)
siliconx/smart_mirror
server.py
server.py
py
261
python
en
code
1
github-code
18
[ { "api_name": "flask.Flask", "line_number": 4, "usage_type": "call" }, { "api_name": "spider.get_weather", "line_number": 9, "usage_type": "call" } ]
27013978433
import sys, requests, argparse import urllib3 urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) s = requests.session() proxies = { "http": "http://127.0.0.1:8080", "https": "http://127.0.0.1:8080", } def delivery(ip, lhost): print("\n[+] Crafting payload") query = "CREATE OR REPLACE FUNCTION d...
Xcatolin/OSWE-Prep
ManageEngine/udf_rce.py
udf_rce.py
py
1,106
python
en
code
1
github-code
18
[ { "api_name": "urllib3.disable_warnings", "line_number": 3, "usage_type": "call" }, { "api_name": "urllib3.exceptions", "line_number": 3, "usage_type": "attribute" }, { "api_name": "requests.session", "line_number": 5, "usage_type": "call" }, { "api_name": "argpar...
27508922294
# -*- coding: UTF8 -*- from operator import mul from random import randrange from django.test import TestCase from django.utils import simplejson class PagesTest(TestCase): """Math engine app tests""" def test_math_engine_exists(self): """GET math engine exists?""" values = [randrange(-10,...
morenopc/dimagi
nosetests/math_engine_test.py
math_engine_test.py
py
1,006
python
en
code
0
github-code
18
[ { "api_name": "django.test.TestCase", "line_number": 10, "usage_type": "name" }, { "api_name": "random.randrange", "line_number": 16, "usage_type": "call" }, { "api_name": "random.randrange", "line_number": 24, "usage_type": "call" }, { "api_name": "django.utils.s...
3941089683
from django.contrib.auth.models import ( AbstractUser, UserManager as DjangoUserManager, ) from django.db import models # 프록시 모델에서 사용했던 프록시 모델 매니저 from rest_framework.authtoken.models import Token class UserManager(DjangoUserManager): def create_superuser(self, *args, **kwargs): return super().c...
huskyhoochu/instagram
instagram/member/models.py
models.py
py
2,814
python
en
code
0
github-code
18
[ { "api_name": "django.contrib.auth.models.UserManager", "line_number": 12, "usage_type": "name" }, { "api_name": "django.contrib.auth.models.AbstractUser", "line_number": 17, "usage_type": "name" }, { "api_name": "django.db.models.CharField", "line_number": 25, "usage_typ...
73519592361
#%% import gensim import os import collections import smart_open import random import pickle import time import sys from gensim.test.utils import get_tmpfile from callback import EpochLogger, EpochSaver data_prefix = ''.join(sys.argv[1:]) rela_path = 'dataset/jp/' + data_prefix text_path, dic_path = rela_path + '.txt...
coooola-lzh/similarity-search
doc2vec_jp.py
doc2vec_jp.py
py
2,450
python
en
code
0
github-code
18
[ { "api_name": "sys.argv", "line_number": 14, "usage_type": "attribute" }, { "api_name": "time.time", "line_number": 20, "usage_type": "call" }, { "api_name": "pickle.load", "line_number": 22, "usage_type": "call" }, { "api_name": "time.time", "line_number": 24...
9789577468
import genanki import random from datetime import datetime from ..shared.date_core import format_dt from .templates import to_base_template, to_base_highlight_template from .question_type import QuestionType from .parse_type import ParseType def generate_anki(words_or_questions, parse_type): date = format_dt(date...
obaranovskyi/cmdenglishassist
cmdenglishassist/anki/anki_generator.py
anki_generator.py
py
4,195
python
en
code
3
github-code
18
[ { "api_name": "shared.date_core.format_dt", "line_number": 11, "usage_type": "call" }, { "api_name": "datetime.datetime.now", "line_number": 11, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 11, "usage_type": "name" }, { "api_name": "ge...
36747003589
''' Galavantria created by SentientDragon5 started March 2019 Art credit to - scratch.com users gamerkeep & ninja545 - FangTrooper56 ''' import pyglet; import keyboard; import time clock = 0 #window init winW = 600; winH = 600 window = pyglet.window.Window(winW + 300,winH) window.set_caption('Gallivantria') window.se...
SentientDragon5/Galavantria
_Galavantria.pyw
_Galavantria.pyw
pyw
25,289
python
en
code
0
github-code
18
[ { "api_name": "pyglet.window.Window", "line_number": 13, "usage_type": "call" }, { "api_name": "pyglet.window", "line_number": 13, "usage_type": "attribute" }, { "api_name": "pyglet.image.load", "line_number": 15, "usage_type": "call" }, { "api_name": "pyglet.imag...
70628046439
from datasets import load_dataset from tqdm import tqdm from random import randint, shuffle import pandas as pd import string from corruption import Corrupter def rand_ind(num_of_idx: int, u_range: int, verbose = False) -> list: out_list = list() if verbose: print(f'\nSTARTING...\n') for i in tqdm(range(num_...
eistakovskii/NLP_Toolbox
DATA_AUGMENTATION/СoLa_artificial/prep_cola_art_dataset.py
prep_cola_art_dataset.py
py
4,266
python
en
code
2
github-code
18
[ { "api_name": "tqdm.tqdm", "line_number": 14, "usage_type": "call" }, { "api_name": "random.randint", "line_number": 16, "usage_type": "call" }, { "api_name": "random.randint", "line_number": 22, "usage_type": "call" }, { "api_name": "tqdm.tqdm", "line_number"...
22145909644
import streamlit as st from PIL import Image img = Image.open("employee.jpg") st.set_page_config( page_title='Employee Churn Prediction', page_icon=img ) st.text('This is a web app to predict employee churn.') ''' ## WELCOME! Welcome to the "***Employee Churn Analysis Project***". This is t...
RNG94/Churn_Prediction_for_AWS
1_🤗_Welcome.py
1_🤗_Welcome.py
py
1,274
python
en
code
0
github-code
18
[ { "api_name": "PIL.Image.open", "line_number": 4, "usage_type": "call" }, { "api_name": "PIL.Image", "line_number": 4, "usage_type": "name" }, { "api_name": "streamlit.set_page_config", "line_number": 6, "usage_type": "call" }, { "api_name": "streamlit.text", ...
18471522806
import boto3 import sys profile = sys.argv[1] bucket_name = sys.argv[2] object_key = sys.argv[3] session = boto3.Session(profile_name=profile) try: s3=session.resource("s3") obj = s3.Object(bucket_name, object_key) body = obj.get()['Body'].read().decode('utf-8') print(body) except Exception as e: print(e) ...
PJ64/python_scripts_for_aws
s3/read_s3_object.py
read_s3_object.py
py
321
python
en
code
0
github-code
18
[ { "api_name": "sys.argv", "line_number": 4, "usage_type": "attribute" }, { "api_name": "sys.argv", "line_number": 5, "usage_type": "attribute" }, { "api_name": "sys.argv", "line_number": 6, "usage_type": "attribute" }, { "api_name": "boto3.Session", "line_numb...
24128205615
import json # 配置文件路径 ConfigJsonFile = "Umi-OCR_config.json" # 配置项 ConfigDict = { # 忽略区域设置 "ignoreArea": None, # 忽略区域 # "ignoreAreaPreset": [], # 忽略区域预设列表 # 输出文件设置 "isOutputFile": True, # T时输出内容写入本地文件 "outputFilePath": "", # 输出文件目录 "outputFileName": "", # 输出文件名称 # 输出格式设置 "isO...
moodykeke/Umi-OCR
config.py
config.py
py
2,687
python
zh
code
null
github-code
18
[ { "api_name": "json.load", "line_number": 48, "usage_type": "call" }, { "api_name": "json.JSONDecodeError", "line_number": 52, "usage_type": "attribute" }, { "api_name": "json.dumps", "line_number": 70, "usage_type": "call" } ]
71006585959
import os import unittest from copy import copy from PIL import Image from flask.ext.imagine.filters.crop import CropFilter class TestCropFilter(unittest.TestCase): image_png = None image_jpg = None image_tif = None image_bmp = None def setUp(self): assets_path = os.path.abspath(os.path.d...
FlaskGuys/Flask-Imagine
tests/filters/test_crop.py
test_crop.py
py
4,703
python
en
code
0
github-code
18
[ { "api_name": "unittest.TestCase", "line_number": 8, "usage_type": "attribute" }, { "api_name": "os.path.abspath", "line_number": 15, "usage_type": "call" }, { "api_name": "os.path", "line_number": 15, "usage_type": "attribute" }, { "api_name": "os.path.dirname", ...
17226652840
from django.urls import path from blog.views import ( blog_home_view, create_blog_view, detail_blog_view, edit_blog_view, ) # Whenever url file is created that is not in the main url file (i.e. its in an app like 'blog'), it must have an 'app_name' parameter app_name = 'blog' urlpatterns = [ pat...
Earthman12/wild_west_cowboy_store_site
blog/urls.py
urls.py
py
601
python
en
code
0
github-code
18
[ { "api_name": "django.urls.path", "line_number": 13, "usage_type": "call" }, { "api_name": "blog.views.blog_home_view", "line_number": 13, "usage_type": "argument" }, { "api_name": "django.urls.path", "line_number": 14, "usage_type": "call" }, { "api_name": "blog....
42370873705
""" unit tests for eval.py """ from typing import List import pytest from text_classification.dataset_utils import InputMultilabelExample, OutputMultilabelExample from ood_transformers import eval @pytest.mark.usefixtures("input_multilabel_examples") def test_incorrect_prediction_aucs( input_multilabel_example...
prolego-team/ood-transformers
unit_tests/tests_eval.py
tests_eval.py
py
1,307
python
en
code
0
github-code
18
[ { "api_name": "typing.List", "line_number": 15, "usage_type": "name" }, { "api_name": "text_classification.dataset_utils.InputMultilabelExample", "line_number": 15, "usage_type": "name" }, { "api_name": "text_classification.dataset_utils.InputMultilabelExample", "line_number"...
10702813730
from django.conf.urls import url from django.shortcuts import redirect from django.views.decorators.csrf import csrf_exempt from django.contrib.auth.views import login, logout from app.views import send_morsel, start_hunt, MorselList, MorselDetailView,\ register, create_morsel, HomePageView, FAQPageView, AboutPageView,...
kiniadit/morsels
app/urls.py
urls.py
py
1,249
python
en
code
0
github-code
18
[ { "api_name": "django.conf.urls.url", "line_number": 11, "usage_type": "call" }, { "api_name": "app.views.HomePageView.as_view", "line_number": 11, "usage_type": "call" }, { "api_name": "app.views.HomePageView", "line_number": 11, "usage_type": "name" }, { "api_na...
6289093914
import mmcv import os.path as osp import numpy as np import sys from transforms3d.axangles import axangle2mat import torch cur_dir = osp.dirname(osp.abspath(__file__)) sys.path.insert(0, osp.join(cur_dir, "../../../../")) from core.utils.utils import allocentric_to_egocentric from lib.egl_renderer.egl_renderer_v3 imp...
shanice-l/gdrnpp_bop2022
core/gdrn_modeling/tools/lm/7_vis_allo_vs_ego.py
7_vis_allo_vs_ego.py
py
3,167
python
en
code
145
github-code
18
[ { "api_name": "os.path.dirname", "line_number": 8, "usage_type": "call" }, { "api_name": "os.path", "line_number": 8, "usage_type": "name" }, { "api_name": "os.path.abspath", "line_number": 8, "usage_type": "call" }, { "api_name": "sys.path.insert", "line_numb...
34783997704
# O(m+n) """ Algoritmi pentru grafuri orientate fără circuite (cu ponderi reale) -> DAGs = Directed Acyclic Graphs Pentru drumuri minime de sursa unica in grafuri aciclice. Daca vrem drumuri maxime in grafuri aciclice modificam initializarea distantelor la -inf si schimbam semnul comparatiei. """ from collections impo...
hutanmihai/FMI
Anul II/Semestrul I/AlgoritmiFundamentali/Laborator/PregatireColocviu/DAG.py
DAG.py
py
1,398
python
en
code
1
github-code
18
[ { "api_name": "collections.deque", "line_number": 13, "usage_type": "call" } ]
4491630459
import pickle import argparse import cv2 import os from pysensor.localbinarypatterns import LocalBinaryPatterns from imutils import paths ap = argparse.ArgumentParser() ap.add_argument("-p", "--pickle" , required=True, help ="Pickle model treinado") ap.add_argument("-e", "--testing", required=True, help ="Path para pr...
LLealL/ParkingSensor
executeModel.py
executeModel.py
py
949
python
en
code
0
github-code
18
[ { "api_name": "argparse.ArgumentParser", "line_number": 8, "usage_type": "call" }, { "api_name": "pysensor.localbinarypatterns.LocalBinaryPatterns", "line_number": 14, "usage_type": "call" }, { "api_name": "pickle.load", "line_number": 19, "usage_type": "call" }, { ...
8587916735
import itertools def kadane(arr, func): a = b = 0 for element in arr: if func == 'max_subarray': a = max(a + element, 0) b = max(a, b) elif func == 'house_robber': a, b = max(a, b + house), a if func == 'max_subarray': answer = 'b' return b i...
ljeng/cheat-sheet
dynamic_programming.py
dynamic_programming.py
py
3,155
python
en
code
605
github-code
18
[ { "api_name": "itertools.product", "line_number": 41, "usage_type": "call" } ]
10827449409
import discord from discord.ext import commands import random import json import io import aiohttp import asyncio SECRET_CHANNEL_ID = 757398739223576646 class DictSpeak(commands.Cog): """ Facilitates the managment of reaction images, gifs and so on. """ def __init__(self, bot, command_prefix, dict_...
circicircorum/lomsbot
cogs/dictspeak.py
dictspeak.py
py
10,693
python
en
code
0
github-code
18
[ { "api_name": "discord.ext.commands.Cog", "line_number": 12, "usage_type": "attribute" }, { "api_name": "discord.ext.commands", "line_number": 12, "usage_type": "name" }, { "api_name": "discord.ext.commands.Cog.listener", "line_number": 28, "usage_type": "call" }, { ...
26516597335
from typing import Callable, Optional, Iterable, Tuple from acme import specs from acme import types from acme.adders.reverb import base from acme.adders.reverb import utils import dm_env import numpy as np import reverb import tensorflow as tf import tree _PaddingFn = Callable[[Tuple[int, ...], np.dtype], np.ndarra...
deepmind/acme
acme/adders/reverb/episode.py
episode.py
py
4,739
python
en
code
3,100
github-code
18
[ { "api_name": "typing.Callable", "line_number": 14, "usage_type": "name" }, { "api_name": "typing.Tuple", "line_number": 14, "usage_type": "name" }, { "api_name": "numpy.dtype", "line_number": 14, "usage_type": "attribute" }, { "api_name": "numpy.ndarray", "li...
73137709480
import tensorflow as tf import numpy as np import matplotlib.pyplot as plt initial_learning_rate = 1e-9 iterations = 100000 # data x_list = [1, 1.6, 3, 4.1, 5.2, 5.9, 6.8, 8.1, 8.7, 9.2, 9.9] y_list = [27, 32.5, 30, 37.3, 36.4, 32.4, 28.5, 30, 34.1, 39, 36] x_data = np.asarray(x_list, dtype=np.float32) y_data = np.a...
fong5855/regression_practice
hw3_3.py
hw3_3.py
py
2,227
python
en
code
0
github-code
18
[ { "api_name": "numpy.asarray", "line_number": 12, "usage_type": "call" }, { "api_name": "numpy.float32", "line_number": 12, "usage_type": "attribute" }, { "api_name": "numpy.asarray", "line_number": 13, "usage_type": "call" }, { "api_name": "numpy.float32", "l...
25216665602
# https://leetcode.com/problems/search-in-rotated-sorted-array-ii/ # tags: #array, #binary_search # # Solution: Binary Search # Problem similar to "33. Search in Rotated Sorted Array" dealing with duplicates # We can have nums[left] == nums[mid] and in that case, the first half could be out of order # (i.e. NOT in the ...
ronelzb/leetcode
binary_search/0081_search_in_rotated_array_ii.py
0081_search_in_rotated_array_ii.py
py
1,926
python
en
code
0
github-code
18
[ { "api_name": "typing.List", "line_number": 16, "usage_type": "name" } ]
3569242988
#!/usr/bin/python3 """Program which auto-connects to USB serial devices. This program waits for the device to be connected and when the device is disconnected, then it will go back to waiting for a device to once again be connected. """ from __future__ import print_function import select import pyudev import seria...
dhylands/usb-ser-mon
usb_ser_mon/usb_ser_mon.py
usb_ser_mon.py
py
13,049
python
en
code
45
github-code
18
[ { "api_name": "sys.__stdout__.write", "line_number": 58, "usage_type": "call" }, { "api_name": "sys.__stdout__", "line_number": 58, "usage_type": "attribute" }, { "api_name": "time.time", "line_number": 63, "usage_type": "call" }, { "api_name": "time.strftime", ...
16790897053
from typing import Any, Text, Dict, List from rasa_sdk import Action, Tracker from rasa_sdk.executor import CollectingDispatcher import logging import requests import json from slackclient import SlackClient SLACK_BOT_TOKEN = "xoxb-774540282707-788506962980-1iINzBjbDwHzDA7y439nIDol" API_URL = "http://xhub.ddns.net:838...
mehdiHadji/rasa-bot
actions.py
actions.py
py
1,310
python
en
code
0
github-code
18
[ { "api_name": "slackclient.SlackClient", "line_number": 11, "usage_type": "call" }, { "api_name": "rasa_sdk.Action", "line_number": 26, "usage_type": "name" }, { "api_name": "typing.Text", "line_number": 27, "usage_type": "name" }, { "api_name": "requests.get", ...
22951193327
from gevent import monkey monkey.patch_socket() monkey.patch_ssl() import time # import graphitesend import datetime # extend ulimit opened files import resource resource.setrlimit(resource.RLIMIT_NOFILE, (65536, 65536)) import sys sys.path.append('.') import settings import netflix_metrics current_timestamp = int...
Aquarius888/metrological_api
daily_exec.py
daily_exec.py
py
6,539
python
en
code
0
github-code
18
[ { "api_name": "gevent.monkey.patch_socket", "line_number": 2, "usage_type": "call" }, { "api_name": "gevent.monkey", "line_number": 2, "usage_type": "name" }, { "api_name": "gevent.monkey.patch_ssl", "line_number": 3, "usage_type": "call" }, { "api_name": "gevent....
25991280615
from django.db.models import query from django.shortcuts import redirect, render from .models import Image, Category from django.core.exceptions import ObjectDoesNotExist from django.http import Http404 from .forms import PhotoCreateForm from django.shortcuts import get_object_or_404 from django.db.models import Q from...
obewas/photo-gallery
gallery/views.py
views.py
py
4,228
python
en
code
0
github-code
18
[ { "api_name": "models.Image.objects.all", "line_number": 12, "usage_type": "call" }, { "api_name": "models.Image.objects", "line_number": 12, "usage_type": "attribute" }, { "api_name": "models.Image", "line_number": 12, "usage_type": "name" }, { "api_name": "djang...
19714859706
import utils.xml_utils from . import components as cmp from . import run import utils.general import toml import logging from pkg_resources import parse_version import dill import os from time import gmtime, strftime import re COMPONENTS = {'atmosphere': cmp.Atmosphere, 'phase': cmp.Phase, 'directions': cmp.Directi...
ARRRRGH/dartpy
simulation/simulation.py
simulation.py
py
13,419
python
en
code
0
github-code
18
[ { "api_name": "logging.warning", "line_number": 59, "usage_type": "call" }, { "api_name": "toml.load", "line_number": 70, "usage_type": "call" }, { "api_name": "utils.xml_utils.general.merge_dicts", "line_number": 71, "usage_type": "call" }, { "api_name": "utils.x...
41494248430
from typing import Dict, Any, Optional # noinspection PyProtectedMember from spark_pipeline_framework.utilities.capture_parameters import capture_parameters from pyspark.ml.param import Param from pyspark.sql.dataframe import DataFrame from pyspark.sql.functions import col from pyspark.sql.types import StructType, Str...
icanbwell/SparkPipelineFramework
spark_pipeline_framework/transformers/framework_apply_schema_transformer/v1/framework_apply_schema_transformer.py
framework_apply_schema_transformer.py
py
2,256
python
en
code
10
github-code
18
[ { "api_name": "spark_pipeline_framework.transformers.framework_transformer.v1.framework_transformer.FrameworkTransformer", "line_number": 16, "usage_type": "name" }, { "api_name": "typing.Optional", "line_number": 23, "usage_type": "name" }, { "api_name": "typing.Optional", "...
371180090
import matplotlib.cm as cmx import matplotlib import matplotlib.pyplot as plt import pandas as pd from mpl_toolkits import mplot3d def scatter3d(name, x, y, z, cs, colorsMap='jet'): fig = plt.figure() ax1 = fig.add_subplot(111,projection='3d') ax1.plot3D(x,y,z,'--g') X = [x[0],x[-1]] Y = [y[0],y[-1...
plc1220/Spraying-Mission-Generator
3D_plot.py
3D_plot.py
py
1,368
python
en
code
0
github-code
18
[ { "api_name": "matplotlib.pyplot.figure", "line_number": 8, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 8, "usage_type": "name" }, { "api_name": "matplotlib.pyplot.title", "line_number": 19, "usage_type": "call" }, { "api_name": "matp...
29089334853
import datetime from django.conf import settings from django.db import models from django.urls import reverse from django.utils.timezone import make_aware class Expert(models.Model): # user editable fields name = models.CharField(max_length=100, null=False, blank=False) friends = models.ManyToManyField('...
doganmeh/ThetaCoreChallenge
expert/models.py
models.py
py
4,237
python
en
code
0
github-code
18
[ { "api_name": "django.db.models.Model", "line_number": 9, "usage_type": "attribute" }, { "api_name": "django.db.models", "line_number": 9, "usage_type": "name" }, { "api_name": "django.db.models.CharField", "line_number": 11, "usage_type": "call" }, { "api_name": ...
32534732584
from uniklinik.forms import BootstrapModelFormMixin from proposal.models import Type, Proposal from uniklinik.utils import send_push_notifications from django.contrib.auth.models import User from account.models import Profile from django.db.models import F class TypeForm(BootstrapModelFormMixin): class Meta: ...
memobijou/clinic-app
proposal/forms.py
forms.py
py
1,953
python
en
code
0
github-code
18
[ { "api_name": "uniklinik.forms.BootstrapModelFormMixin", "line_number": 9, "usage_type": "name" }, { "api_name": "proposal.models.Type", "line_number": 11, "usage_type": "name" }, { "api_name": "uniklinik.forms.BootstrapModelFormMixin", "line_number": 20, "usage_type": "n...
17937122025
import jwt from jwt import DecodeError def create_token(data, secret): try: jwt_encoded = jwt.encode(data, secret, algorithm="HS256") return jwt_encoded except Exception as error: return error def verify_signature(token): try: secret = 'acelera' jwt_dec...
joaomxm/DesafiosAceleradevPython-Codenation
aceleradevPython_Desafio4/main.py
main.py
py
533
python
en
code
0
github-code
18
[ { "api_name": "jwt.encode", "line_number": 7, "usage_type": "call" }, { "api_name": "jwt.decode", "line_number": 19, "usage_type": "call" }, { "api_name": "jwt.DecodeError", "line_number": 28, "usage_type": "name" } ]
12631839629
import cv2 import numpy as np import argparse import os def getArguments(): parser = argparse.ArgumentParser(description='Shrink image down') parser.add_argument('-D','--DEBUG', action='store_true') parser.add_argument('input_img_file') parser.add_argument('output_img_file') return(parser.parse_ar...
johnrad/jagbots_opencv
util/shrinkImage.py
shrinkImage.py
py
1,073
python
en
code
1
github-code
18
[ { "api_name": "argparse.ArgumentParser", "line_number": 8, "usage_type": "call" }, { "api_name": "os.path.isfile", "line_number": 15, "usage_type": "call" }, { "api_name": "os.path", "line_number": 15, "usage_type": "attribute" }, { "api_name": "cv2.imread", "...
23585871850
# from urllib import response import scrapy from news_parse.news_parse.items import NewsParseItem from scrapy.loader import ItemLoader class LinksSpider(scrapy.Spider): name = "links" trashbox = '' start_urls = ['https://trashbox.ru/texts/' + trashbox, ] def parse(self, response): self.tr...
fckscl/news_feeder
news_parse/news_parse/spiders/links_spider.py
links_spider.py
py
846
python
en
code
0
github-code
18
[ { "api_name": "scrapy.Spider", "line_number": 7, "usage_type": "attribute" }, { "api_name": "scrapy.loader.ItemLoader", "line_number": 19, "usage_type": "call" }, { "api_name": "news_parse.news_parse.items.NewsParseItem", "line_number": 19, "usage_type": "call" } ]
35848678008
"""Stats functions for binomial distributions with tricky/confusing math.""" from typing import Tuple, Union import numpy as np from scipy import stats def binomial_jeffreys_interval(p: float, n: int, tail: str, z: float = 1.96): """Use compute a jeffrey's interval via beta distirbution CDF.""" alpha = stats...
nolanbconaway/binoculars
lib/binoculars/__init__.py
__init__.py
py
3,379
python
en
code
3
github-code
18
[ { "api_name": "scipy.stats.norm.sf", "line_number": 10, "usage_type": "call" }, { "api_name": "scipy.stats.norm", "line_number": 10, "usage_type": "attribute" }, { "api_name": "scipy.stats", "line_number": 10, "usage_type": "name" }, { "api_name": "scipy.stats.bet...
3704972409
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import smart_selects.db_fields class Migration(migrations.Migration): dependencies = [ ('property', '0001_initial'), ] operations = [ migrations.AlterField( model_name='l...
dmitryro/zrealtycorp.com
property/migrations/0002_auto_20141111_2356.py
0002_auto_20141111_2356.py
py
854
python
en
code
1
github-code
18
[ { "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" }, {...
34848202531
# Current module provides an ability to get the data from the spotify api. # For each operation exists corresponding function. Functions basically # write responds to the specified .csv files. Some of them may use the output # of other functions as input. It is assumend to implement this by writing an # output to and ...
Kramoykin/spotilyse
tools/getters.py
getters.py
py
25,057
python
en
code
0
github-code
18
[ { "api_name": "os.path.expanduser", "line_number": 17, "usage_type": "call" }, { "api_name": "os.path.expanduser", "line_number": 60, "usage_type": "call" }, { "api_name": "os.path.expanduser", "line_number": 108, "usage_type": "call" }, { "api_name": "os.path.exp...
9866670102
#Goes together with visualiseNeuralLearning.py import pickle import matplotlib.pyplot as plt gen = pickle.load(open("generationsSave","rb")) bir = pickle.load(open("birthsSave","rb")) for nam in gen: b = bir[nam] l = gen[nam] if len(l)>12: plt.plot(range(b,b+len(l)), l, label=nam.split()[0]+" tase...
stargateprovider/ids-stone-age-ai
plotFromFile.py
plotFromFile.py
py
407
python
en
code
0
github-code
18
[ { "api_name": "pickle.load", "line_number": 5, "usage_type": "call" }, { "api_name": "pickle.load", "line_number": 6, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.plot", "line_number": 12, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", ...
36449094082
""" 1 2 3 4 5 6 7 [1,3,6,7] q:- [1] [2,3] [4,5,6] [7] """ from collections import deque class Tree: def __init__(self,val): self.val = val sel...
ajinkyaaa/Leetcode_DSA
Tests/rightSideTree.py
rightSideTree.py
py
1,139
python
en
code
0
github-code
18
[ { "api_name": "collections.deque", "line_number": 26, "usage_type": "call" }, { "api_name": "collections.deque", "line_number": 34, "usage_type": "call" } ]
33858253028
from colorama import init,Fore from menu import main_menu,clearConsole from controllers.listaController import ListaController init() listaCtrl = ListaController() flag = True option = None while(flag != False): main_menu() option = int(input(Fore.LIGHTGREEN_EX+'\tSeleccionar una opcion:\t'+Fore.RESET)) if...
nicoescudero/PythonOOP_UNSJ
Unidad3/Ejercicio7/main.py
main.py
py
1,074
python
es
code
0
github-code
18
[ { "api_name": "colorama.init", "line_number": 5, "usage_type": "call" }, { "api_name": "controllers.listaController.ListaController", "line_number": 6, "usage_type": "call" }, { "api_name": "menu.main_menu", "line_number": 10, "usage_type": "call" }, { "api_name":...
32431684064
import os import torch def maybe_launch_distributed(): world_size = int(os.environ.get('WORLD_SIZE', 1)) rank = 0 device_id = 0 if world_size > 1: torch.distributed.init_process_group(backend='nccl', init_method='env://') assert world_size == torch.distributed.get_world_size() ...
activatedgeek/tight-pac-bayes
pactl/distributed.py
distributed.py
py
756
python
en
code
12
github-code
18
[ { "api_name": "os.environ.get", "line_number": 6, "usage_type": "call" }, { "api_name": "os.environ", "line_number": 6, "usage_type": "attribute" }, { "api_name": "torch.distributed.init_process_group", "line_number": 10, "usage_type": "call" }, { "api_name": "tor...
21496664690
import numpy as np from chaco.api import ArrayPlotData, Plot, gray from enable.component_editor import ComponentEditor from traits.api import Enum, HasTraits, Instance, Array, Bool, \ DelegatesTo, Int,Range, CInt, Property, Tuple, CBool, CArray from traitsui.api import Group, HGroup, Item, View, RangeEditor cla...
mattcieslak/DSI2
dsi2/ui/chaco_slice.py
chaco_slice.py
py
6,150
python
en
code
1
github-code
18
[ { "api_name": "traits.api.HasTraits", "line_number": 10, "usage_type": "name" }, { "api_name": "chaco.api.ArrayPlotData", "line_number": 12, "usage_type": "name" }, { "api_name": "traits.api.Instance", "line_number": 13, "usage_type": "call" }, { "api_name": "chac...
8605200061
from bs4 import BeautifulSoup import requests import json response=requests.get("https://www.digitalspy.com/movies/a34901966/the-100-greatest-blockbusters-of-the-21st-century/") webpage=response.text soup=BeautifulSoup(webpage,"html.parser") print(soup.title) movie = soup.find_all(name="h2",class_= "body-h2" ) movies...
amanguptak/top100movies_picker_of21st_cent
top_100movies_piker.py
top_100movies_piker.py
py
603
python
en
code
0
github-code
18
[ { "api_name": "requests.get", "line_number": 4, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_number": 6, "usage_type": "call" }, { "api_name": "json.dump", "line_number": 15, "usage_type": "call" } ]
28806887551
from pyautogui import * import pyautogui import time import keyboard import random import win32api, win32con time.sleep(3) def click(x, y): win32api.SetCursorPos((x, y)) win32api.mouse_event(win32con.MOUSEEVENTF_LEFTDOWN, 0, 0) time.sleep(0.1) # This pauses the script for 0.1 seconds win...
Marcus8009/Python-Game-bot-for-Tinyshop
autoclicker.py
autoclicker.py
py
953
python
en
code
0
github-code
18
[ { "api_name": "time.sleep", "line_number": 8, "usage_type": "call" }, { "api_name": "win32api.SetCursorPos", "line_number": 11, "usage_type": "call" }, { "api_name": "win32api.mouse_event", "line_number": 12, "usage_type": "call" }, { "api_name": "win32con.MOUSEEV...
11428185683
from sqlalchemy import create_engine from barlibrary.models.meta import Base def main(): engine = create_engine('sqlite:///recipeDB.db', echo=True) Base.metadata.create_all(engine) if __name__ == '__main__': main()
JakeHuneau/BarLibrary-old
barlibrary/scripts/update_db.py
update_db.py
py
231
python
en
code
2
github-code
18
[ { "api_name": "sqlalchemy.create_engine", "line_number": 6, "usage_type": "call" }, { "api_name": "barlibrary.models.meta.Base.metadata.create_all", "line_number": 7, "usage_type": "call" }, { "api_name": "barlibrary.models.meta.Base.metadata", "line_number": 7, "usage_ty...
72390792359
# encoding=utf-8 from selenium import webdriver import random,time,os import urllib.request import base64 from selenium.common.exceptions import TimeoutException from selenium.webdriver.common.by import By import selenium.webdriver.support.expected_conditions as EC import selenium.webdriver.support.ui as ui ...
leena201818/GoogleImageLoader
FBUserlogoDownload.py
FBUserlogoDownload.py
py
5,096
python
en
code
0
github-code
18
[ { "api_name": "selenium.webdriver.Firefox", "line_number": 16, "usage_type": "call" }, { "api_name": "selenium.webdriver", "line_number": 16, "usage_type": "name" }, { "api_name": "selenium.webdriver.support.ui.WebDriverWait", "line_number": 21, "usage_type": "call" }, ...
130901055
from django.db import models # Create your models here. class Customer(models.Model): dept = models.CharField(max_length=100) emp_id = models.IntegerField() class Meta: db_table='customer' managed = False # Create your models here. class Pasenger(models.Model): dept = mode...
sunil36broman/django-multidb
dfs/models.py
models.py
py
1,072
python
en
code
0
github-code
18
[ { "api_name": "django.db.models.Model", "line_number": 4, "usage_type": "attribute" }, { "api_name": "django.db.models", "line_number": 4, "usage_type": "name" }, { "api_name": "django.db.models.CharField", "line_number": 5, "usage_type": "call" }, { "api_name": "...
40382952774
import os from flask import Flask, render_template, request from flask_bootstrap import Bootstrap from classifier import inference app = Flask(__name__) bootstrap = Bootstrap(app) """ Routes """ @app.route('/', methods=['GET', 'POST']) def index(): if request.method == 'POST': uploaded_file = request....
exequielmoneva/cats-vs-dogs
classifier/app.py
app.py
py
975
python
en
code
0
github-code
18
[ { "api_name": "flask.Flask", "line_number": 8, "usage_type": "call" }, { "api_name": "flask_bootstrap.Bootstrap", "line_number": 9, "usage_type": "call" }, { "api_name": "flask.request.method", "line_number": 18, "usage_type": "attribute" }, { "api_name": "flask.r...
72822387561
from soarsdk.objects import Container from soarsdk.client import PhantomClient from behave.runner import Context from behave.model import Scenario, Step import steps.utility_functions as utils import re # Optional configuration step # def after_scenario(context, scenario): # if scenario.status == "failed" and cont...
tylerjchuba/soar-behaviors
features/environment.py
environment.py
py
1,179
python
en
code
7
github-code
18
[ { "api_name": "behave.runner.Context", "line_number": 14, "usage_type": "name" }, { "api_name": "behave.runner.Context", "line_number": 18, "usage_type": "name" }, { "api_name": "behave.model.Scenario", "line_number": 18, "usage_type": "name" }, { "api_name": "beh...
39222459876
import pyaudio import yaml import threading import os import copy import audioop import webrtcvad import wave import time from queue import deque cache_file_list = deque() cache_raw_data_list = deque() cache_raw_data_int_list = deque() worker_stop_flag = False mutex = threading.Lock() global_ticker = 0 class Stre...
GGzhangBOY/GRPCDataRouter
StreamingAudio.py
StreamingAudio.py
py
6,043
python
en
code
0
github-code
18
[ { "api_name": "queue.deque", "line_number": 13, "usage_type": "call" }, { "api_name": "queue.deque", "line_number": 14, "usage_type": "call" }, { "api_name": "queue.deque", "line_number": 15, "usage_type": "call" }, { "api_name": "threading.Lock", "line_number...
43231539200
from urllib import request from django import forms from django.core.files.base import ContentFile from django.utils.text import slugify from .models import Image # Submit image form class ImageCreateForm(forms.ModelForm): class Meta: model = Image fields = ( 'title', 'url...
josephdubon/boilerplate_image_share_app
images/forms.py
forms.py
py
1,762
python
en
code
0
github-code
18
[ { "api_name": "django.forms.ModelForm", "line_number": 10, "usage_type": "attribute" }, { "api_name": "django.forms", "line_number": 10, "usage_type": "name" }, { "api_name": "models.Image", "line_number": 12, "usage_type": "name" }, { "api_name": "django.forms.Hi...
17014457575
""" 2. Написать программу сложения и умножения двух шестнадцатеричных чисел. При этом каждое число представляется как массив, элементы которого это цифры числа. Например, пользователь ввёл A2 и C4F. Сохранить их как [‘A’, ‘2’] и [‘C’, ‘4’, ‘F’] соответственно. Сумма чисел из примера: [‘C’, ‘F’, ‘1’], произведение ...
gkitg/edu_tmp
Python/0_algorithms/hw_4/2_deque.py
2_deque.py
py
1,242
python
ru
code
2
github-code
18
[ { "api_name": "collections.deque", "line_number": 11, "usage_type": "call" }, { "api_name": "collections.deque", "line_number": 12, "usage_type": "call" }, { "api_name": "collections.deque", "line_number": 19, "usage_type": "call" }, { "api_name": "collections.deq...
30916748788
"""Troy URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.2/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based vi...
soheeeeP/troy-ptservice-drf-backend
Troy/urls.py
urls.py
py
2,248
python
en
code
0
github-code
18
[ { "api_name": "drf_yasg.views.get_schema_view", "line_number": 31, "usage_type": "call" }, { "api_name": "drf_yasg.openapi.Info", "line_number": 32, "usage_type": "call" }, { "api_name": "drf_yasg.openapi", "line_number": 32, "usage_type": "name" }, { "api_name": ...
23244037408
''' Please ensure deepspeed version >= 0.7.1. Launch with the following command: $ deepspeed --num_gpus 8 infer_deepspeed.py ''' import os import torch import deepspeed import time from transformers import OPTForCausalLM, AutoTokenizer, OPTConfig from transformers.models.opt.modeling_opt import OPTDecoderLayer de...
FMInference/DejaVu
Decentralized_FM_alpha/unit_tests/infer_deepspeed.py
infer_deepspeed.py
py
1,784
python
en
code
86
github-code
18
[ { "api_name": "os.getenv", "line_number": 19, "usage_type": "call" }, { "api_name": "os.getenv", "line_number": 20, "usage_type": "call" }, { "api_name": "transformers.AutoTokenizer.from_pretrained", "line_number": 29, "usage_type": "call" }, { "api_name": "transf...
22671675525
#! /usr/bin/env python3 import pyaudio import wave FNAME = 'audio-recording.wav' SECONDS = 2 RATE = 48000 CHANNELS = 2 FORMAT = pyaudio.paInt16 FRAMES_PER_BUFFER = 1024 """print some info about the environment""" #print(pyaudio.get_portaudio_version()) pa = pyaudio.PyAudio() #print(pa.get_default_host_api_info()) #...
tnibert/playing-with-audio
python/record_audio.py
record_audio.py
py
2,106
python
en
code
0
github-code
18
[ { "api_name": "pyaudio.paInt16", "line_number": 9, "usage_type": "attribute" }, { "api_name": "pyaudio.PyAudio", "line_number": 15, "usage_type": "call" }, { "api_name": "wave.open", "line_number": 46, "usage_type": "call" } ]
6536073575
#!/usr/bin/env python3 # 创建6种交易格式输出 p2pkh\p2sh\p2wpkh\p2wsh\p2wpkh-p2sh\p2wsh-p2sh import decimal import hashlib from binascii import hexlify, unhexlify from bitcoinrpc.authproxy import AuthServiceProxy #pip install python-bitcoinrpc from bitcoin.transaction import serialize # pip install python-bitcoinlib from bitco...
ccconnor/misc-scripts
all_types_txs.py
all_types_txs.py
py
7,271
python
en
code
0
github-code
18
[ { "api_name": "bitcoinrpc.authproxy.AuthServiceProxy", "line_number": 16, "usage_type": "call" }, { "api_name": "binascii.hexlify", "line_number": 35, "usage_type": "call" }, { "api_name": "binascii.unhexlify", "line_number": 39, "usage_type": "call" }, { "api_nam...
1126064035
""" Generator for carbon nano ribbons with zig-zag edges (ZGNRs). """ import textwrap import argparse import numpy as np import lattice def _define_parser(): "Define command line argument parser for AGNRgen." parser = argparse.ArgumentParser(prog="latgraph --generate agnr", ...
jl-wynen/latgraph
zgnrgen.py
zgnrgen.py
py
5,551
python
en
code
0
github-code
18
[ { "api_name": "argparse.ArgumentParser", "line_number": 13, "usage_type": "call" }, { "api_name": "argparse.RawDescriptionHelpFormatter", "line_number": 14, "usage_type": "attribute" }, { "api_name": "textwrap.dedent", "line_number": 15, "usage_type": "call" }, { ...
14951160231
#A part of NonVisual Desktop Access (NVDA) #Copyright (C) 2006-2009 NVDA Contributors <http://www.nvda-project.org/> #This file is covered by the GNU General Public License. #See the file COPYING for more details. from ctypes import * from ctypes.wintypes import * from typing import Optional shell32 = wind...
nvaccess/nvda
source/shellapi.py
shellapi.py
py
2,047
python
en
code
1,802
github-code
18
[ { "api_name": "typing.Optional", "line_number": 39, "usage_type": "name" }, { "api_name": "typing.Optional", "line_number": 40, "usage_type": "name" }, { "api_name": "typing.Optional", "line_number": 42, "usage_type": "name" }, { "api_name": "typing.Optional", ...
24497784538
import os import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torch.utils.tensorboard import SummaryWriter from src.models.network import Net from src.constants import MODEL_DIR_PATH from src.utils.image import plot_classes_preds from src.data.preprocess import trainset...
BeomyoungKim/ml-tdd-tutorial
src/models/trainer.py
trainer.py
py
2,123
python
en
code
0
github-code
18
[ { "api_name": "src.models.network.Net", "line_number": 18, "usage_type": "call" }, { "api_name": "torch.nn.CrossEntropyLoss", "line_number": 20, "usage_type": "call" }, { "api_name": "torch.nn", "line_number": 20, "usage_type": "name" }, { "api_name": "torch.optim...
38235875549
from unittest import main from tornado.escape import json_encode, json_decode from labman.gui.testing import TestHandlerBase class TestLibraryPrep16SProcessHandlers(TestHandlerBase): def test_get_library_prep_16s_process_handler(self): response = self.get('/process/library_prep_16S') self.assertE...
mortonjt/labman
labman/gui/handlers/process_handlers/test/test_library_prep_16s_process.py
test_library_prep_16s_process.py
py
1,213
python
en
code
null
github-code
18
[ { "api_name": "labman.gui.testing.TestHandlerBase", "line_number": 7, "usage_type": "name" }, { "api_name": "tornado.escape.json_encode", "line_number": 25, "usage_type": "call" }, { "api_name": "tornado.escape.json_decode", "line_number": 28, "usage_type": "call" }, ...
38918842335
from aiogram.types import BotCommand, BotCommandScopeChat import config from core import bot START = 'start' USDT_TO_RUB = 'usdt_to_rub' USDT_TO_KZT = 'usdt_to_kzt' RUB_TO_KZT = 'rub_to_kzt' USER_COMMANDS = [ BotCommand(START, 'Установить желаемый курс'), BotCommand(RUB_TO_KZT, 'Курс RUB/KZT'), BotComman...
LDmitriy7/BinanceBot
src/assets/commands.py
commands.py
py
594
python
en
code
0
github-code
18
[ { "api_name": "aiogram.types.BotCommand", "line_number": 12, "usage_type": "call" }, { "api_name": "aiogram.types.BotCommand", "line_number": 13, "usage_type": "call" }, { "api_name": "aiogram.types.BotCommand", "line_number": 14, "usage_type": "call" }, { "api_na...
110104741
import pandas as pd import statistics as st a = pd.read_csv("/home/rndlwjs/multi.csv", sep=",") #("/home/rndlwjs/vox1.csv", sep=",") b = a[["spk1", "duration1"]] c = a[["spk2", "duration2"]] #name has to be same in order to concatenate b = b.rename(columns={'spk1':'spk', 'duration1':'duration'}) c = c.rename(columns...
rndlwjs/speaker
duration/duration_print.py
duration_print.py
py
691
python
en
code
0
github-code
18
[ { "api_name": "pandas.read_csv", "line_number": 4, "usage_type": "call" }, { "api_name": "pandas.concat", "line_number": 14, "usage_type": "call" }, { "api_name": "statistics.mean", "line_number": 20, "usage_type": "call" }, { "api_name": "statistics.median", ...
34332580729
import os import sys import tempfile from unittest import TestCase, skipIf from magrathea.cli.logger import Logger class TestMagratheaCliLogger(TestCase): """ Unit tests for :py:mod:`magrathea.cli.logger` """ @skipIf(sys.version_info < (3, 0, 0), "Singleton instance recognition only works in Python 3...
RootForum/magrathea
test/t_cli/test_logger.py
test_logger.py
py
1,323
python
en
code
1
github-code
18
[ { "api_name": "unittest.TestCase", "line_number": 8, "usage_type": "name" }, { "api_name": "magrathea.cli.logger.Logger.get_instance", "line_number": 21, "usage_type": "call" }, { "api_name": "magrathea.cli.logger.Logger", "line_number": 21, "usage_type": "name" }, { ...
30430431669
import imp from django.contrib import messages from .models import Message from django.shortcuts import redirect, render from django.views import View from .models import Project # Create your views here. class HomePage(View): def get(self, request): projects = Project.objects.all()[:6] project_li...
adaksritiman24/PortoFolio-Website
home/views.py
views.py
py
1,178
python
en
code
0
github-code
18
[ { "api_name": "django.views.View", "line_number": 10, "usage_type": "name" }, { "api_name": "models.Project.objects.all", "line_number": 12, "usage_type": "call" }, { "api_name": "models.Project.objects", "line_number": 12, "usage_type": "attribute" }, { "api_name...
2476150654
from typing import List, Dict, Union import tensorflow as tf from ants_ai.training.neural_network.sequences.file_system_sequence import FileSystemSequence from ants_ai.training.neural_network.factories.hyper_parameter_factory import HyperParameterFactory from ants_ai.training.neural_network.factories.model_factory imp...
Jason-Turan0/ants
ants_ai/training/neural_network/factories/combined_model_factory.py
combined_model_factory.py
py
3,885
python
en
code
1
github-code
18
[ { "api_name": "ants_ai.training.neural_network.factories.model_factory.ModelFactory", "line_number": 22, "usage_type": "name" }, { "api_name": "ants_ai.training.neural_network.factories.model_hyper_parameter.ModelHyperParameter", "line_number": 25, "usage_type": "call" }, { "api_...
39107758347
""" Author: Dario Borrelli Date: July 2019 """ import numpy as np import pandas as pd import re import string import glob import pickle import string import warnings import seaborn as sns import matplotlib.pyplot as plt import gzip import urllib.request as urllib from tqdm import tqdm warnings.filterwarnings("ignore")...
batrakunal/nlp_ui
components/unsupervised_chunking.py
unsupervised_chunking.py
py
18,213
python
en
code
1
github-code
18
[ { "api_name": "warnings.filterwarnings", "line_number": 19, "usage_type": "call" }, { "api_name": "nltk.download", "line_number": 22, "usage_type": "call" }, { "api_name": "urllib.request.urlretrieve", "line_number": 53, "usage_type": "call" }, { "api_name": "urll...
13257361470
# TensorFlow Tutorial #01 Simple Linear Model # by Magnus Erik Hvass Pedersen http://www.hvass-labs.org/ # imports ############################### # %matplotlib inline # import matplotlib.pyplot as plt import tensorflow as tf import numpy as np from sklearn.metrics import confusion_matrix # load data ###############...
wgong/open_source_learning
learn_stem/machine_learning/tensorflow/01_Simple_Linear_Model.py
01_Simple_Linear_Model.py
py
4,497
python
en
code
1
github-code
18
[ { "api_name": "tensorflow.examples.tutorials.mnist.input_data.read_data_sets", "line_number": 17, "usage_type": "call" }, { "api_name": "tensorflow.examples.tutorials.mnist.input_data", "line_number": 17, "usage_type": "name" }, { "api_name": "numpy.array", "line_number": 24,...
6218489487
import os from enum import Enum from dataflow.pizza_settings import ( BASE_BKSQL_URL, BASE_DATABUS_URL, BASE_STREAM_URL, FLINK_CODE_VERSION, FLINK_VERSION, JOBNAVI_STREAM_CLUSTER_ID, KAFKA_OP_ROLE_NAME, METRIC_KAFKA_TOPIC, REDIS_INFO, RELEASE_ENV, RELEASE_ENV_TGDP, RUN_V...
Tencent/bk-base
src/api/dataflow/stream/settings.py
settings.py
py
3,888
python
en
code
85
github-code
18
[ { "api_name": "os.path.abspath", "line_number": 29, "usage_type": "call" }, { "api_name": "os.path", "line_number": 29, "usage_type": "attribute" }, { "api_name": "os.path.join", "line_number": 29, "usage_type": "call" }, { "api_name": "os.path.dirname", "line...
72156857640
from time import sleep import daemon import socket import subprocess import os import json import sys from sliding_window import sliding_window import glob import nest_asyncio from utils import index_list_by_key MAXIMUM_FAILED_ATTEMPTS = 30 HOST = "172.17.0.1" # The server's hostname or IP address PORT = 65432 # Th...
giossa94/tscf-2021
node_daemon_exp3.py
node_daemon_exp3.py
py
3,379
python
en
code
0
github-code
18
[ { "api_name": "subprocess.run", "line_number": 23, "usage_type": "call" }, { "api_name": "subprocess.PIPE", "line_number": 23, "usage_type": "attribute" }, { "api_name": "os.path.join", "line_number": 24, "usage_type": "call" }, { "api_name": "os.path", "line_...
23158385122
import numpy as np import cv2 maskMode = [[([[1, 1], [1, 0]], [[1, 0], [1, 0]]), ([[1, 1], [1, 0]], [[1, 1], [0, 0]])], [([[1, 1], [1, 0]], [[0, 0], [1, 1]]), ([[1, 1], [1, 0]], [[0, 1], [0, 1]])]] def pixilated(img): tmp = cv2.resize(img, (256, 256), interpolation=cv2.INTER_A...
lingzii/Rotating-Visual-Cryptography
rotating-vc-source-code/rvc_v2.py
rvc_v2.py
py
3,073
python
en
code
0
github-code
18
[ { "api_name": "cv2.resize", "line_number": 11, "usage_type": "call" }, { "api_name": "cv2.INTER_AREA", "line_number": 11, "usage_type": "attribute" }, { "api_name": "cv2.threshold", "line_number": 12, "usage_type": "call" }, { "api_name": "cv2.THRESH_BINARY", ...
27069908815
import numpy as np from utils.compute_challenge_metric_custom import compute_challenge_metric_custom from bayes_opt import BayesianOptimization from config import Config def aply_ts(res_all,ts): res_binar=np.zeros(res_all.shape,dtype=np.bool) for class_num in range(len(ts)): res_binar[:,class_num]...
tomasvicar/BUTTeam
utils/optimize_ts.py
optimize_ts.py
py
1,438
python
en
code
6
github-code
18
[ { "api_name": "numpy.zeros", "line_number": 10, "usage_type": "call" }, { "api_name": "numpy.bool", "line_number": 10, "usage_type": "attribute" }, { "api_name": "utils.compute_challenge_metric_custom.compute_challenge_metric_custom", "line_number": 25, "usage_type": "cal...
70197449962
import logging import os from logging.handlers import RotatingFileHandler from typing import Optional from codemonkeys.defs import STOR_PATH from codemonkeys.types import OStr class Log: """ A centralized logger utility class. This class is a singleton that provides a global logging interface. It ma...
cooleydw494/codemonkeys
codemonkeys/utils/misc/log.py
log.py
py
4,908
python
en
code
14
github-code
18
[ { "api_name": "typing.Optional", "line_number": 39, "usage_type": "name" }, { "api_name": "codemonkeys.types.OStr", "line_number": 41, "usage_type": "name" }, { "api_name": "logging.INFO", "line_number": 41, "usage_type": "attribute" }, { "api_name": "logging.getL...
70248594920
""" The container template tags are automatically included as builtins if :mod:`philo` is an installed app. """ from django import template from django.conf import settings from django.contrib.contenttypes.models import ContentType from django.core.exceptions import ObjectDoesNotExist from django.db.models import Q f...
ithinksw/philo
philo/templatetags/containers.py
containers.py
py
4,276
python
en
code
49
github-code
18
[ { "api_name": "django.template.Library", "line_number": 14, "usage_type": "call" }, { "api_name": "django.template", "line_number": 14, "usage_type": "name" }, { "api_name": "django.contrib.contenttypes.models.ContentType.objects.get_for_id", "line_number": 32, "usage_typ...
34674937030
# images.py # work with images, including embedding images into # Paragraph flowables from electos.ballotmaker.ballots.files import FileTools # from reportlab.platypus import Image from reportlab.lib import utils PROJECT_NAME = "ballotlab" class EmbeddedImage: """ EmbeddedImage creates a text string with ...
ion-oset/ballot-lab
src/electos/ballotmaker/ballots/images.py
images.py
py
1,651
python
en
code
null
github-code
18
[ { "api_name": "electos.ballotmaker.ballots.files.FileTools", "line_number": 24, "usage_type": "call" }, { "api_name": "reportlab.lib.utils.ImageReader", "line_number": 28, "usage_type": "call" }, { "api_name": "reportlab.lib.utils", "line_number": 28, "usage_type": "name"...
39998366240
import pygame import copy import ruleschk class Sudoku_board: def __init__(self,x,y,width,height,vel,board): self.x=x self.y=y self.width=width self.height=height self.vel=vel self.board=board self.row=0 self.col=0 self.strike=0 se...
kaviraja81/sudokupygame
sudokugame.py
sudokugame.py
py
8,893
python
en
code
0
github-code
18
[ { "api_name": "copy.deepcopy", "line_number": 16, "usage_type": "call" }, { "api_name": "copy.deepcopy", "line_number": 17, "usage_type": "call" }, { "api_name": "pygame.draw.rect", "line_number": 26, "usage_type": "call" }, { "api_name": "pygame.draw", "line_...
25701169664
import numpy as np import os import warnings from pymbd import mbd_energy as MBDcalc_Py, from_volumes from ase import atoms from ase.units import Bohr, Hartree from ase.calculators.calculator import Calculator def _warnonlywarning(message, category=UserWarning, filename='', lineno=-1, file=None, line=None): print...
martin-stoehr/ase-devel
ase/calculators/libmbd.py
libmbd.py
py
12,162
python
en
code
2
github-code
18
[ { "api_name": "warnings.showwarning", "line_number": 13, "usage_type": "attribute" }, { "api_name": "warnings.warn", "line_number": 21, "usage_type": "call" }, { "api_name": "warnings.warn", "line_number": 27, "usage_type": "call" }, { "api_name": "warnings.warn",...
74216613481
from django.contrib import admin from .models import * class MaterialInline(admin.TabularInline): model = Material fields = ['tipoMaterial','autor','titulo','año','status'] extra = 0 class PersonaInline(admin.TabularInline): model = Persona fields = ['tipoPersona','nombre','apellido','correo...
LucasPasolli/EjDjango3
Django3/biblioteca/admin.py
admin.py
py
3,025
python
es
code
0
github-code
18
[ { "api_name": "django.contrib.admin.TabularInline", "line_number": 4, "usage_type": "attribute" }, { "api_name": "django.contrib.admin", "line_number": 4, "usage_type": "name" }, { "api_name": "django.contrib.admin.TabularInline", "line_number": 11, "usage_type": "attribu...
34255853693
import logging import json from datetime import datetime, timedelta from django import forms from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager from django.contrib.auth.models import PermissionsMixin from django.core.mail import send_mail from django.core.validators import MaxValueValidator, Mi...
shusaku-ishikawa/cryptordering
backend/core/models.py
models.py
py
22,858
python
en
code
0
github-code
18
[ { "api_name": "re.findall", "line_number": 32, "usage_type": "call" }, { "api_name": "json.loads", "line_number": 34, "usage_type": "call" }, { "api_name": "django.core.files.storage.FileSystemStorage", "line_number": 40, "usage_type": "name" }, { "api_name": "uni...
13543335279
# -*-coding:utf-8 -*- from openstack import connection import requests import sys from openstack import utils # open debug mode # utils.enable_logging(debug=True, stream=sys.stdout) # igore ssl warnning requests.packages.urllib3.disable_warnings() domain = "myhuaweicloud.com" # cdn use: domain = "myhu...
lucky110100/function-market
python27/com/huaweicloud/sample/demo.py
demo.py
py
2,604
python
en
code
0
github-code
18
[ { "api_name": "requests.packages.urllib3.disable_warnings", "line_number": 12, "usage_type": "call" }, { "api_name": "requests.packages", "line_number": 12, "usage_type": "attribute" }, { "api_name": "openstack.connection.Connection", "line_number": 34, "usage_type": "cal...
1114504930
from django.db import models import idutils # for DOI validation: https://idutils.readthedocs.io/en/latest/ from django.core.exceptions import ValidationError from django.utils.translation import gettext_lazy as _ from django.core.validators import MaxValueValidator, MinValueValidator from django.contrib.auth import ge...
towen/dfndb
dfndb_django/dfndb/models.py
models.py
py
5,528
python
en
code
0
github-code
18
[ { "api_name": "django.db.models.Model", "line_number": 12, "usage_type": "attribute" }, { "api_name": "django.db.models", "line_number": 12, "usage_type": "name" }, { "api_name": "django.db.models.CharField", "line_number": 13, "usage_type": "call" }, { "api_name"...
2996689861
"""add column confirmed to users Revision ID: 92b13a79f1f1 Revises: 7031cf389ed4 Create Date: 2023-04-26 17:41:44.423409 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '92b13a79f1f1' down_revision = '7031cf389ed4' branch_labels = None depends_on = None def u...
IhorVoitiuk/goit-homework
py_web/lesson17/Task1/migrations/versions/92b13a79f1f1_add_column_confirmed_to_users.py
92b13a79f1f1_add_column_confirmed_to_users.py
py
688
python
en
code
0
github-code
18
[ { "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.Boolean...
10054873342
#!/usr/bin/python2.7 #DIGITAL TWIN MOBILE ROBOT #Modelo processamento de imagens para OpenCV - Canny Edge Detection import rospy from sensor_msgs.msg import Image import cv2 import numpy as np #biblioteca para computacao cientifica import time #ROS image message -> OpenCV2 image converter from cv_bridge import CvBr...
VRI-UFPR/dtmr
Computer Science/ROS/csf_robotCS_cannyKinect.py
csf_robotCS_cannyKinect.py
py
1,779
python
en
code
0
github-code
18
[ { "api_name": "cv_bridge.CvBridge", "line_number": 20, "usage_type": "call" }, { "api_name": "rospy.logger", "line_number": 25, "usage_type": "call" }, { "api_name": "sys.exit", "line_number": 26, "usage_type": "call" }, { "api_name": "signal.signal", "line_nu...
14041983362
import scrapy import json from pbl.items import ShopCard class SpidereuroSpider(scrapy.Spider): name = 'spiderEuro' allowed_domains = ['www.trobos.lt'] start_urls = [] for page in range(1,82): url=f'https://trobos.lt/prekes?vendor=eurovaistine&page={page}' start_urls.append(url) ite...
mrghosti3/cheaper-marketplace
src/crawler/pbl/spiders/spiderEuro.py
spiderEuro.py
py
2,000
python
en
code
4
github-code
18
[ { "api_name": "scrapy.Spider", "line_number": 5, "usage_type": "attribute" }, { "api_name": "scrapy.Request", "line_number": 32, "usage_type": "call" }, { "api_name": "pbl.items.ShopCard", "line_number": 35, "usage_type": "call" }, { "api_name": "json.dump", "...
12979382153
#GUI which configures settings import sys import json import PySimpleGUI as sg import name_generator layout = [ #Name entry [sg.Text("Welcome! There's just a few more details you have to enter before you can get some silly names\n")], [sg.Text("Enter your name. If you don't have an middle name, leave the fiel...
Agroovy/name-generator
settings_gui.py
settings_gui.py
py
2,734
python
en
code
0
github-code
18
[ { "api_name": "PySimpleGUI.Text", "line_number": 10, "usage_type": "call" }, { "api_name": "PySimpleGUI.Text", "line_number": 11, "usage_type": "call" }, { "api_name": "PySimpleGUI.Text", "line_number": 13, "usage_type": "call" }, { "api_name": "PySimpleGUI.In", ...
24485111951
from selenium import webdriver from fake_useragent import UserAgent from selenium.webdriver.common.by import By from selenium.common.exceptions import NoSuchElementException from colorama import Fore from time import sleep import os magenta = Fore.BLUE red = Fore.RED green = Fore.GREEN reset = Fore.RESET ...
melroy89/MoonPayAutoReg
main.py
main.py
py
2,355
python
en
code
0
github-code
18
[ { "api_name": "colorama.Fore.BLUE", "line_number": 9, "usage_type": "attribute" }, { "api_name": "colorama.Fore", "line_number": 9, "usage_type": "name" }, { "api_name": "colorama.Fore.RED", "line_number": 10, "usage_type": "attribute" }, { "api_name": "colorama.F...
5664989635
import json import uuid from django.core.serializers import serialize from django.db import IntegrityError from django.test import TestCase import pytest from django_uuid_pk.fields import StringUUID from django_uuid_pk.tests.models import (AutoUUIDFieldModel, ManualUUIDFieldModel, NamespaceUUIDFieldModel, ...
saxix/django-uuid-pk
django_uuid_pk/tests/tests.py
tests.py
py
3,869
python
en
code
5
github-code
18
[ { "api_name": "json.loads", "line_number": 18, "usage_type": "call" }, { "api_name": "django.test.TestCase", "line_number": 25, "usage_type": "name" }, { "api_name": "django_uuid_pk.tests.models.ModelUUIDField.objects.create", "line_number": 27, "usage_type": "call" }, ...
72390812839
# encoding=utf-8 import time import xmlrpc.client import logging,sys import common from common import * import FBLandmarkHelper from utility import OurFBAccount # from utility import FBHelper,FBBaseUser from loghelper.loghelper import logHelper #远程服务代理 serverconfig = common.getDispatchServerConfig() # 3...
leena201818/FacebookCrawl
FBLandmarkSpider.py
FBLandmarkSpider.py
py
4,659
python
en
code
0
github-code
18
[ { "api_name": "common.getDispatchServerConfig", "line_number": 14, "usage_type": "call" }, { "api_name": "xmlrpc.client.client.ServerProxy", "line_number": 15, "usage_type": "call" }, { "api_name": "xmlrpc.client.client", "line_number": 15, "usage_type": "attribute" }, ...
1538777116
from __future__ import print_function, division import argparse import random import numpy as np from sklearn.cluster import KMeans from sklearn.metrics.cluster import normalized_mutual_info_score as nmi_score from sklearn.metrics import adjusted_rand_score as ari_score from sklearn.metrics import silhouette_score imp...
hafizrauf/dc_data-integration
DC/SDCN/sdcn.py
sdcn.py
py
6,348
python
en
code
1
github-code
18
[ { "api_name": "torch.nn.Module", "line_number": 27, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 27, "usage_type": "name" }, { "api_name": "torch.nn.Linear", "line_number": 32, "usage_type": "call" }, { "api_name": "torch.nn.Linear", "...
6578110210
import pygame from classes.window import Window class Tutorial(Window): def __init__(self, bg_image_path, caption, text) -> None: self.text = text super().__init__(bg_image_path, caption=caption) def blit_rect(self) -> None: x = 1 / 8 * self.WIDTH y = 1 / 8 * self.HEIGHT ...
ricardofig016/tog-game
classes/window_tutorial.py
window_tutorial.py
py
1,873
python
en
code
0
github-code
18
[ { "api_name": "classes.window.Window", "line_number": 5, "usage_type": "name" }, { "api_name": "pygame.draw.rect", "line_number": 15, "usage_type": "call" }, { "api_name": "pygame.draw", "line_number": 15, "usage_type": "attribute" }, { "api_name": "pygame.draw.li...