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
10441407969
import xlwt import csv import requests import pprint class GitClient(object): def __init__(self): self.base_url = 'https://api.github.com/' self.userName = '' self.password = '' self.autorization = False self.notAut = '' self.exporter = [] self.toWrite = {} ...
Delight116/003-004-be-addo-Cmd_and_Html_GitClient
GitClient.py
GitClient.py
py
6,608
python
en
code
0
github-code
36
[ { "api_name": "requests.get", "line_number": 21, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 31, "usage_type": "call" }, { "api_name": "requests.post", "line_number": 48, "usage_type": "call" }, { "api_name": "requests.get", "line_numb...
27275697128
"""Very simple example using a pair of Lennard-Jones particles. This script has several pieces to pay attention to: - Importing the pieces from wepy to run a WExplore simulation. - Definition of a distance metric for this system and process. - Definition of the components used in the simulation: resampler, boundary...
ADicksonLab/wepy
info/examples/Lennard_Jones_Pair/source/we.py
we.py
py
7,753
python
en
code
44
github-code
36
[ { "api_name": "simtk.unit.kelvin", "line_number": 66, "usage_type": "attribute" }, { "api_name": "simtk.unit", "line_number": 66, "usage_type": "name" }, { "api_name": "simtk.unit.picosecond", "line_number": 67, "usage_type": "attribute" }, { "api_name": "simtk.un...
40461953299
import os import gspread from oauth2client.service_account import ServiceAccountCredentials as SAC from linebot import LineBotApi, WebhookParser from linebot.models import MessageEvent, TextMessage, ImageSendMessage, URITemplateAction, TextSendMessage, TemplateSendMessage, ButtonsTemplate, MessageTemplateAction, Carous...
JasperLin0118/linebot
utils.py
utils.py
py
15,459
python
en
code
0
github-code
36
[ { "api_name": "linebot.LineBotApi", "line_number": 20, "usage_type": "call" }, { "api_name": "linebot.models.TextSendMessage", "line_number": 21, "usage_type": "call" }, { "api_name": "linebot.LineBotApi", "line_number": 25, "usage_type": "call" }, { "api_name": "...
9194727466
import unittest import torch import lightly class TestNestedImports(unittest.TestCase): def test_nested_imports(self): # active learning lightly.active_learning.agents.agent.ActiveLearningAgent lightly.active_learning.agents.ActiveLearningAgent lightly.active_learning.config.samp...
tibe97/thesis-self-supervised-learning
tests/imports/test_nested_imports.py
test_nested_imports.py
py
3,548
python
en
code
2
github-code
36
[ { "api_name": "unittest.TestCase", "line_number": 7, "usage_type": "attribute" }, { "api_name": "lightly.active_learning", "line_number": 11, "usage_type": "attribute" }, { "api_name": "lightly.active_learning", "line_number": 12, "usage_type": "attribute" }, { "a...
74328503143
import logging import pandas as pd from openfisca_ceq.tools.data import config_parser, year_by_country from openfisca_ceq.tools.data_ceq_correspondence import ( ceq_input_by_harmonized_variable, ceq_intermediate_by_harmonized_variable, data_by_model_weight_variable, model_by_data_id_variable, mo...
openfisca/openfisca-ceq
openfisca_ceq/tools/data/income_loader.py
income_loader.py
py
5,243
python
en
code
0
github-code
36
[ { "api_name": "logging.getLogger", "line_number": 19, "usage_type": "call" }, { "api_name": "openfisca_ceq.tools.data.year_by_country", "line_number": 42, "usage_type": "name" }, { "api_name": "openfisca_ceq.tools.data.config_parser.get", "line_number": 43, "usage_type": ...
18252810201
from functools import lru_cache from typing import List class Solution: def maxCoins(self, nums: List[int]) -> int: @lru_cache(None) def dfs(l, r): if l > r: return 0 # if (l, r) in dic: # return dic[(l, r)] # dic[(l, r)] = 0 ...
hujienan/Jet-Algorithm
leetcode/312. Burst Balloons/index.py
index.py
py
797
python
en
code
0
github-code
36
[ { "api_name": "typing.List", "line_number": 6, "usage_type": "name" }, { "api_name": "functools.lru_cache", "line_number": 7, "usage_type": "call" } ]
34181109892
#tempurature range is 4-95 degrees C #we use a GEN2 tempurature module #tolerance on read about 5 degrees for heating (at least with IR thermometer) # can hold steady at a tempurature really well though would need to test more at differing tempurature #idling tempurature 55 C can hold within .5 C of tem...
MyersResearchGroup/OpenTrons_OT2_Protocols
temperature_module/tempurature_module.py
tempurature_module.py
py
1,122
python
en
code
0
github-code
36
[ { "api_name": "opentrons.protocol_api.ProtocolContext", "line_number": 22, "usage_type": "attribute" }, { "api_name": "opentrons.protocol_api", "line_number": 22, "usage_type": "name" } ]
14551270733
from io import StringIO from itertools import chain from typing import Any, Dict, List, Union import simplejson as json from jubeatools import song as jbt from jubeatools.formats.filetypes import SongFile from jubeatools.utils import lcm from ..tools import make_memon_dumper from . import schema def _long_note_tai...
Stepland/jubeatools
jubeatools/formats/memon/v0/dump.py
dump.py
py
8,590
python
en
code
4
github-code
36
[ { "api_name": "jubeatools.song.LongNote", "line_number": 15, "usage_type": "attribute" }, { "api_name": "jubeatools.song", "line_number": 15, "usage_type": "name" }, { "api_name": "jubeatools.song.Song", "line_number": 26, "usage_type": "attribute" }, { "api_name"...
35609459703
import streamlit as st import cv2 import time import sys import os import numpy as np import matplotlib.pyplot as plt from PIL import Image from streamlit_lottie import st_lottie # Initialize the parameters confThreshold = 0.2 #Confidence threshold nmsThreshold = 0.4 #Non-maximum suppression threshold inpWidth = 4...
nlkkumar/vehicle-class-yolov4
nlk-vehi-class-classification.py
nlk-vehi-class-classification.py
py
7,582
python
en
code
1
github-code
36
[ { "api_name": "streamlit.set_option", "line_number": 20, "usage_type": "call" }, { "api_name": "streamlit.beta_columns", "line_number": 22, "usage_type": "call" }, { "api_name": "streamlit.text", "line_number": 25, "usage_type": "call" }, { "api_name": "cv2.dnn.re...
30452253568
import pandas as pd import requests from bs4 import BeautifulSoup u = 'https://www.amazon.in/OnePlus-Nord-Gray-128GB-Storage/product-reviews/B08695ZSP6/ref=cm_cr_arp_d_paging_btm_next_2?ie=UTF8&reviewerType=all_reviews&pageNumber=' def amazon(link,Number_of_pages): r={} allreview1 = pd.DataFrame(r)...
SHRIKAR5/Amazon-review-webscraping
amazon_review-webscraping.py
amazon_review-webscraping.py
py
2,060
python
en
code
0
github-code
36
[ { "api_name": "pandas.DataFrame", "line_number": 10, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 22, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_number": 25, "usage_type": "call" } ]
33521363177
import os, re, importlib.util import LogManager from Module import Module from ModuleThreadHandler import ModuleThreadHandler, ThreadTask class ModuleRunner: def __init__(self, parent): self.parent = parent self.logger = LogManager.create_logger('MODULES') self.closing = False self.thread_handler ...
gregormaclaine/AutoHome
ModuleRunner.py
ModuleRunner.py
py
2,346
python
en
code
0
github-code
36
[ { "api_name": "LogManager.create_logger", "line_number": 10, "usage_type": "call" }, { "api_name": "ModuleThreadHandler.ModuleThreadHandler", "line_number": 14, "usage_type": "call" }, { "api_name": "os.path", "line_number": 31, "usage_type": "attribute" }, { "api...
43114992788
""" The codes are heavily borrowed from NeuS """ import os import cv2 as cv import torch import torch.nn as nn import torch.nn.functional as F import numpy as np import logging import mcubes from icecream import ic from models.render_utils import sample_pdf from models.projector import Projector from tsparse.torchspa...
One-2-3-45/One-2-3-45
reconstruction/models/sparse_neus_renderer.py
sparse_neus_renderer.py
py
44,709
python
en
code
1,164
github-code
36
[ { "api_name": "torch.nn.Module", "line_number": 24, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 24, "usage_type": "name" }, { "api_name": "models.projector.Projector", "line_number": 60, "usage_type": "call" }, { "api_name": "models.patch...
20189362717
import argparse from pathlib import Path from os.path import basename, isfile, isdir, splitext import glob def _list_modules(folder_name): modules = glob.glob(str(Path(__file__).resolve().parent / folder_name / '*')) return list( splitext(basename(f))[0] for f in modules if (isfile(f) ...
patli96/COMP9517_20T1
pedestrian_monitor/console_arguments.py
console_arguments.py
py
4,198
python
en
code
1
github-code
36
[ { "api_name": "glob.glob", "line_number": 8, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_number": 8, "usage_type": "call" }, { "api_name": "os.path.splitext", "line_number": 10, "usage_type": "call" }, { "api_name": "os.path.basename", "line_nu...
38642289342
import nltk import pickle from utils import tokenize_document resume_file = open('../assets/resume.txt', 'r') resume = resume_file.read() resume_file.close() tokenizer = nltk.RegexpTokenizer(r'\w+') resume_tokenized = tokenize_document(resume, tokenizer) print(resume_tokenized) pickle.dump(resume_tokenized, open('../...
anishLearnsToCode/stop-words-removal
src/driver.py
driver.py
py
352
python
en
code
0
github-code
36
[ { "api_name": "nltk.RegexpTokenizer", "line_number": 9, "usage_type": "call" }, { "api_name": "utils.tokenize_document", "line_number": 10, "usage_type": "call" }, { "api_name": "pickle.dump", "line_number": 12, "usage_type": "call" } ]
496383977
from dagster_datadog import datadog_resource from dagster import ModeDefinition, execute_solid, solid from dagster.seven import mock @mock.patch('datadog.statsd.timing') @mock.patch('datadog.statsd.timed') @mock.patch('datadog.statsd.service_check') @mock.patch('datadog.statsd.set') @mock.patch('datadog.statsd.distr...
helloworld/continuous-dagster
deploy/dagster_modules/libraries/dagster-datadog/dagster_datadog_tests/test_resources.py
test_resources.py
py
2,747
python
en
code
2
github-code
36
[ { "api_name": "dagster.solid", "line_number": 29, "usage_type": "call" }, { "api_name": "dagster.execute_solid", "line_number": 71, "usage_type": "call" }, { "api_name": "dagster.ModeDefinition", "line_number": 76, "usage_type": "call" }, { "api_name": "dagster_da...
32480271471
from django.urls import include, path from rest_framework.routers import DefaultRouter from .views import (IngredientViewSet, LikedRecipeDetailView, RecipeViewSet, SubscribtionListView, SubscriptionDetailView, TagViewSet) v1_router = DefaultRouter() v1_router.register( 'tags', TagViewSet, ...
JCoffeeYP/foodgram-project-react
backend/cookbook/urls.py
urls.py
py
917
python
en
code
0
github-code
36
[ { "api_name": "rest_framework.routers.DefaultRouter", "line_number": 7, "usage_type": "call" }, { "api_name": "views.TagViewSet", "line_number": 10, "usage_type": "argument" }, { "api_name": "views.RecipeViewSet", "line_number": 15, "usage_type": "argument" }, { "...
74873018984
from flask_wtf import Form from wtforms import StringField,BooleanField,PasswordField,IntegerField,SelectField from wtforms.validators import DataRequired, ValidationError from webapp.Models.db_basic import Session from webapp.Models.prod_cat import Prod_cat from webapp.Models.prod_sub_cat import Prod_sub_cat def lev...
kangnwh/Emall
webapp/viewrouting/admin/forms/category_forms.py
category_forms.py
py
2,511
python
en
code
1
github-code
36
[ { "api_name": "webapp.Models.db_basic.Session", "line_number": 10, "usage_type": "call" }, { "api_name": "webapp.Models.prod_cat.Prod_cat", "line_number": 11, "usage_type": "argument" }, { "api_name": "wtforms.validators.ValidationError", "line_number": 12, "usage_type": ...
5054088480
from abei.implements.service_basic import ServiceBasic from abei.implements.util import ( FileLikeWrapper, LazyProperty, ) from abei.interfaces import ( IProcedure, IProcedureLink, IProcedureFactory, IProcedureJointFactory, IProcedureBuilder, service_entry as _, ) from .procedure_joint_b...
mind-bricks/abei
abei/implements/procedure_builder.py
procedure_builder.py
py
8,029
python
en
code
0
github-code
36
[ { "api_name": "abei.implements.util.LazyProperty", "line_number": 62, "usage_type": "name" }, { "api_name": "abei.implements.service_basic.ServiceBasic", "line_number": 79, "usage_type": "name" }, { "api_name": "abei.interfaces.IProcedureBuilder", "line_number": 79, "usag...
22840734386
from urllib.request import urlopen import json def E(X): ''' :param X: [(xi, pi), ...] :return: int expected value of random variable X ''' return sum([e[0] * e[1] for e in X]) url = 'https://api.blockchain.info/charts/market-price?timespan=1year&format=json' http_file = urlopen(url) lines = ht...
naurlaunim/other
btc_calc.py
btc_calc.py
py
922
python
en
code
0
github-code
36
[ { "api_name": "urllib.request.urlopen", "line_number": 15, "usage_type": "call" }, { "api_name": "json.loads", "line_number": 21, "usage_type": "call" } ]
31453786297
import os, sys, pygame class Animation: def __init__(self, names_files, cd_images, screen, width_screen, height_screen, sounds, colorkey=None, music=None): self.images = [] for elem in names_files: self.images.append(pygame.transform.scale(self.load_image(elem, colorkey=colorkey), (wid...
ScarletFlame611/1984-game
animation_comics.py
animation_comics.py
py
2,789
python
en
code
0
github-code
36
[ { "api_name": "pygame.transform.scale", "line_number": 8, "usage_type": "call" }, { "api_name": "pygame.transform", "line_number": 8, "usage_type": "attribute" }, { "api_name": "os.path.join", "line_number": 16, "usage_type": "call" }, { "api_name": "os.path", ...
31638903937
import json import numpy as np import matplotlib.pyplot as plt def read_file(): # 读取数据 hero_list = json.load(open("./file/heroskin.json", 'r', encoding='utf-8')) hero_skin_data = hero_list["hero_skin_data"] return hero_skin_data def get_hero_skin_count(): hero_skin_data = read_file() # 所有英雄、皮...
N-Wind/League-of-Legends
hero/heroSkinLine.py
heroSkinLine.py
py
2,138
python
en
code
0
github-code
36
[ { "api_name": "json.load", "line_number": 7, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.rcParams", "line_number": 28, "usage_type": "attribute" }, { "api_name": "matplotlib.pyplot", "line_number": 28, "usage_type": "name" }, { "api_name": "matplotlib...
15293966281
# -*- coding:utf-8 -*- import os import sys import time import math import threading import json import random import logging from apscheduler.schedulers.background import BackgroundScheduler sys.path.append('./lib') import mylog mylog.setLog('KD48Monitor', logging.WARNING) loggerInfo = logging.getLogger('mylogger') l...
momo-xii/KD48
KDMonitor.py
KDMonitor.py
py
26,545
python
en
code
1
github-code
36
[ { "api_name": "sys.path.append", "line_number": 12, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 12, "usage_type": "attribute" }, { "api_name": "mylog.setLog", "line_number": 14, "usage_type": "call" }, { "api_name": "logging.WARNING", "lin...
23406422554
# -*- coding: utf-8 -*- import cottonformation as ctf from cottonformation.res import iam, awslambda # create a ``Template`` object to represent your cloudformation template tpl = ctf.Template( Description="Aws Lambda Versioning Example", ) iam_role_for_lambda = iam.Role( "IamRoleForLambdaExecution", rp_...
MacHu-GWU/Dev-Exp-Share
docs/source/01-AWS/01-All-AWS-Services-Root/01-Compute/02-AWS-Lambda-Root/05-Versioning/deploy.py
deploy.py
py
1,506
python
en
code
3
github-code
36
[ { "api_name": "cottonformation.Template", "line_number": 7, "usage_type": "call" }, { "api_name": "cottonformation.res.iam.Role", "line_number": 11, "usage_type": "call" }, { "api_name": "cottonformation.res.iam", "line_number": 11, "usage_type": "name" }, { "api_...
17966322508
"""Config files """ import logging import os import sys from pathlib import Path import torch MAIN_PATH = Path(__file__).resolve().parents[1] DATA_PATH = MAIN_PATH / "data" DEPLOY_PATH = MAIN_PATH / "src" / "deploy" ARTIFACT_PATH = MAIN_PATH / "artifacts" DEVICE = torch.device("cuda") if torch.cuda.is_available() el...
benjaminlq/Image-Generation
src/config.py
config.py
py
1,838
python
en
code
0
github-code
36
[ { "api_name": "pathlib.Path", "line_number": 10, "usage_type": "call" }, { "api_name": "torch.cuda.is_available", "line_number": 15, "usage_type": "call" }, { "api_name": "torch.cuda", "line_number": 15, "usage_type": "attribute" }, { "api_name": "torch.device", ...
27053438479
import pytest from subarraySum import Solution @pytest.mark.parametrize("nums, k, expected", [ ([], 2, 0), ([1, 1, 1], 2, 2), ([1, 1, 1, 1], 2, 3) ]) def test_subarraySum(nums, k, expected): actual = Solution().subarraySum(nums, k) assert actual == expected
ikedaosushi/leetcode
problems/python/tests/test_subarraySum.py
test_subarraySum.py
py
280
python
en
code
1
github-code
36
[ { "api_name": "subarraySum.Solution", "line_number": 11, "usage_type": "call" }, { "api_name": "pytest.mark.parametrize", "line_number": 5, "usage_type": "call" }, { "api_name": "pytest.mark", "line_number": 5, "usage_type": "attribute" } ]
15991381065
import torch.nn as nn try: from .resnet import resnet50_v1b except: from resnet import resnet50_v1b import torch.nn.functional as F import torch class SegBaseModel(nn.Module): r"""Base Model for Semantic Segmentation Parameters ---------- backbone : string Pre-trained dilated backbone...
zyxu1996/Efficient-Transformer
models/danet.py
danet.py
py
7,495
python
en
code
67
github-code
36
[ { "api_name": "torch.nn.Module", "line_number": 10, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 10, "usage_type": "name" }, { "api_name": "resnet.resnet50_v1b", "line_number": 25, "usage_type": "call" }, { "api_name": "torch.nn.Module", ...
26967199764
from flask import Flask, jsonify, request, make_response from functions import calculate_penalty,possession app = Flask(__name__) @app.route('/') def index(): return 'This is index page' @app.route('/penalties', methods={'POST'}) def getpenalities(): drug_class=request.form.get('drug_class') ...
Mubashar2014/penalties
main.py
main.py
py
899
python
en
code
0
github-code
36
[ { "api_name": "flask.Flask", "line_number": 4, "usage_type": "call" }, { "api_name": "flask.request.form.get", "line_number": 16, "usage_type": "call" }, { "api_name": "flask.request.form", "line_number": 16, "usage_type": "attribute" }, { "api_name": "flask.reque...
3202338276
import numpy as np import sys import time sys.path.append("Interface/python/") from init import NeuronLayerBox import cv2 def rgb2gray(rgb): return np.dot(rgb[...,:3], [0.299, 0.587, 0.114]) if __name__ == '__main__': NLB=NeuronLayerBox(step_ms=1,model=1,spike=0,restore=0) input_src=[] img=cv2.i...
Megatron2032/NeuronLayerBox
NeuronLayerBox1.1/main.py
main.py
py
641
python
en
code
0
github-code
36
[ { "api_name": "sys.path.append", "line_number": 4, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 4, "usage_type": "attribute" }, { "api_name": "numpy.dot", "line_number": 9, "usage_type": "call" }, { "api_name": "init.NeuronLayerBox", "line_...
19848816787
import json no = 0 groups = 0 reserve = [] data = { "no": no, "groups": groups, "reserve": reserve } with open("data.json", "w") as f: json.dump(data, f) opend = open("./data.json","r") loaded = json.load(opend) print(loaded) print("no: ", loaded["no"], "groups: ", loaded["groups"])
hmjn023/dev-hmjn
js.py
js.py
py
318
python
en
code
1
github-code
36
[ { "api_name": "json.dump", "line_number": 14, "usage_type": "call" }, { "api_name": "json.load", "line_number": 17, "usage_type": "call" } ]
34181502633
from typing import Dict, Optional, Type, Union, Callable, Any from types import TracebackType from functools import wraps from threading import Lock from qiskit_ibm_provider.utils.converters import hms_to_seconds from qiskit_ibm_runtime import QiskitRuntimeService from .runtime_job import RuntimeJob from .utils.resul...
Qiskit/qiskit-ibm-runtime
qiskit_ibm_runtime/session.py
session.py
py
11,847
python
en
code
106
github-code
36
[ { "api_name": "functools.wraps", "line_number": 19, "usage_type": "call" }, { "api_name": "typing.Optional", "line_number": 57, "usage_type": "name" }, { "api_name": "qiskit_ibm_runtime.QiskitRuntimeService", "line_number": 57, "usage_type": "name" }, { "api_name"...
19033935152
"""Module contains functionality that parses main page for RedHat vulnerabilities.""" import time import lxml import lxml.etree from selenium import webdriver from selenium.common.exceptions import WebDriverException, NoSuchElementException from selenium.webdriver.chrome.options import Options from cve_connector.vend...
CSIRT-MU/CRUSOE
crusoe_observe/cve-connector/cve_connector/vendor_cve/implementation/parsers/vendor_parsers/redhat_parsers/red_hat_main_page_parser.py
red_hat_main_page_parser.py
py
4,549
python
en
code
9
github-code
36
[ { "api_name": "cve_connector.vendor_cve.implementation.parsers.general_and_format_parsers.html_parser.HtmlParser", "line_number": 15, "usage_type": "name" }, { "api_name": "selenium.webdriver.chrome.options.Options", "line_number": 40, "usage_type": "call" }, { "api_name": "selen...
17440403303
from tensorflow.keras import layers, models import glob import numpy as np from PIL import Image from sklearn.model_selection import train_test_split from datetime import datetime width = 75 height = 100 channel = 1 def load_data(): images = np.array([]).reshape(0, height, width) labels = np.array([]) d...
NikolaBrodic/VehicleLicencePlateAndLogoRecognition
character_recognition_cnn.py
character_recognition_cnn.py
py
2,599
python
en
code
1
github-code
36
[ { "api_name": "numpy.array", "line_number": 14, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 15, "usage_type": "call" }, { "api_name": "glob.glob", "line_number": 22, "usage_type": "call" }, { "api_name": "glob.glob", "line_number": 24, ...
6795368681
from django.conf import settings from django.db.models import Q from django_filters import rest_framework as filters from ...models import Event class EventFilterSet(filters.FilterSet): category = filters.MultipleChoiceFilter( method='filter_category', label='Category', choices=settings...
tomasgarzon/exo-services
service-exo-events/event/api/filters/event.py
event.py
py
1,666
python
en
code
0
github-code
36
[ { "api_name": "django_filters.rest_framework.FilterSet", "line_number": 9, "usage_type": "attribute" }, { "api_name": "django_filters.rest_framework", "line_number": 9, "usage_type": "name" }, { "api_name": "django_filters.rest_framework.MultipleChoiceFilter", "line_number": ...
41551040241
import cv2 import os import numpy as np import json import mmcv from matplotlib.collections import PatchCollection from matplotlib.patches import Polygon import matplotlib.pyplot as plt from glob import glob import ast from mmrotate.core import poly2obb_np def poly2obb_np_oc(poly): """Convert polygons to oriented ...
parkyongjun1/rotated_deformabledetr
AO2-DETR/tools/arirang_json_to_txt.py
arirang_json_to_txt.py
py
12,936
python
en
code
0
github-code
36
[ { "api_name": "numpy.array", "line_number": 22, "usage_type": "call" }, { "api_name": "cv2.minAreaRect", "line_number": 23, "usage_type": "call" }, { "api_name": "numpy.pi", "line_number": 34, "usage_type": "attribute" }, { "api_name": "numpy.pi", "line_number...
70970697063
# -*- coding: utf-8 -*- """ Created on Fri Nov 27 07:57:10 2020 @author: KANNAN """ from flask import Flask, render_template, request import pandas as pd #import sklearn import pickle model = pickle.load(open("flight_rf.pkl", "rb")) app = Flask(__name__) @app.route('/') def home(): return r...
GuruYohesh/ML
Flight Fare Prediction/app.py
app.py
py
9,556
python
en
code
0
github-code
36
[ { "api_name": "pickle.load", "line_number": 13, "usage_type": "call" }, { "api_name": "flask.Flask", "line_number": 15, "usage_type": "call" }, { "api_name": "flask.render_template", "line_number": 20, "usage_type": "call" }, { "api_name": "flask.request.method", ...
36538905715
import matplotlib.pyplot as plt from pymol import cmd from multiprocessing import Pool, cpu_count from tqdm import tqdm # Import tqdm for progress bar # Define a function to calculate RMSD for a single frame def calculate_rmsd(frame_number, object_1, reference_object): cmd.frame(frame_number) #cmd.align(objec...
raafik980/charmm-md-analysis-in-pymol
02_rmsd_vs_frame_parallel.py
02_rmsd_vs_frame_parallel.py
py
2,523
python
en
code
0
github-code
36
[ { "api_name": "pymol.cmd.frame", "line_number": 8, "usage_type": "call" }, { "api_name": "pymol.cmd", "line_number": 8, "usage_type": "name" }, { "api_name": "pymol.cmd.rms_cur", "line_number": 10, "usage_type": "call" }, { "api_name": "pymol.cmd", "line_numbe...
29632863333
import discord from discord.ext import commands from datetime import datetime from fun_config import * class Work(commands.Cog): def __init__(self, client: commands.Bot): self.client = client @commands.command() @commands.cooldown(1, 86400, commands.BucketType.user) async def sleep(self, ctx)...
Maghish/HoeX
cogs/work.py
work.py
py
835
python
en
code
1
github-code
36
[ { "api_name": "discord.ext.commands.Cog", "line_number": 6, "usage_type": "attribute" }, { "api_name": "discord.ext.commands", "line_number": 6, "usage_type": "name" }, { "api_name": "discord.ext.commands.Bot", "line_number": 8, "usage_type": "attribute" }, { "api...
9507730487
# -*- coding: utf-8 -*- """ Created on Mon Jan 13 18:52:23 2020 @author: Hasnain Khan """ import numpy as np import cv2 from matplotlib import pyplot as plt # Convolv function for convolving the kernel with real image matrix def convolve_np(image, kernel): X_height = image.shape[0] X_width = im...
HasnainKhanNiazi/Convolutional-Kernels
Sobel_Operator.py
Sobel_Operator.py
py
1,479
python
en
code
1
github-code
36
[ { "api_name": "numpy.zeros", "line_number": 23, "usage_type": "call" }, { "api_name": "numpy.arange", "line_number": 25, "usage_type": "call" }, { "api_name": "numpy.arange", "line_number": 26, "usage_type": "call" }, { "api_name": "numpy.arange", "line_number...
70721444264
import numpy as np import plotly.offline as ply import plotly.graph_objs as go from scipy import stats as st from scipy import signal as sg import source_localization as src file_name = "/home/dima/Projects/Touchdown/Data/test.bin" ch_total = 6 length = 2**15 + 100000 fs = 100e6 t_pulse_width = 100e-6 t_period = 200e-...
DimaZhu/libsource_localization
tests/test_specframewriter.py
test_specframewriter.py
py
2,935
python
en
code
0
github-code
36
[ { "api_name": "scipy.stats.norm.rvs", "line_number": 21, "usage_type": "call" }, { "api_name": "scipy.stats.norm", "line_number": 21, "usage_type": "attribute" }, { "api_name": "scipy.stats", "line_number": 21, "usage_type": "name" }, { "api_name": "scipy.stats.no...
1369587477
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.shortcuts import render from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from models import Company def index(request): companies = Company.objects.all().order_by('name') paginator = Paginator(companies, 10) ...
avallete/ft_companysee
company/views.py
views.py
py
863
python
en
code
0
github-code
36
[ { "api_name": "models.Company.objects.all", "line_number": 9, "usage_type": "call" }, { "api_name": "models.Company.objects", "line_number": 9, "usage_type": "attribute" }, { "api_name": "models.Company", "line_number": 9, "usage_type": "name" }, { "api_name": "dj...
41646833738
import datetime, requests, csv, argparse class MarketwatchScraper(): def __init__(self, stock: str = "AAPL", timeout: int = 1) -> None: self.stock = stock self.timeout = timeout pass def scrape(self) -> None: self.saveToFile(self.getURLS()) def saveToFile(self, ...
chaarlottte/MarketWatch-Scraper
scrape.py
scrape.py
py
2,814
python
en
code
6
github-code
36
[ { "api_name": "requests.get", "line_number": 21, "usage_type": "call" }, { "api_name": "csv.reader", "line_number": 32, "usage_type": "call" }, { "api_name": "csv.writer", "line_number": 36, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_numb...
21683749340
#!/usr/bin/env python3 import os import re import click import json import logging import zipfile import portalocker import contextlib import traceback import imghdr import multiprocessing import functools import threading import time import sys import ctypes import psutil from pathlib import Path from functools impo...
poke1024/origami
origami/batch/core/processor.py
processor.py
py
16,273
python
en
code
69
github-code
36
[ { "api_name": "os.environ", "line_number": 40, "usage_type": "attribute" }, { "api_name": "PySide6.QtGui.QGuiApplication", "line_number": 41, "usage_type": "call" }, { "api_name": "PySide6.QtGui", "line_number": 41, "usage_type": "name" }, { "api_name": "time.time...
29184316598
import sys import numpy as np import pyautogui import win32api, win32con, win32gui import cv2 import time import torch import time class_names = [ 'counter-terrorist', 'terrorist' ] opponent = 'terrorist' opponent_color = (255, 0, 0) ally_color = (0, 128, 255) model_path = 'best-640.pt' image_size = 640 scale_map = { ...
anaandjelic/soft-computing-project
aimbot.py
aimbot.py
py
3,412
python
en
code
1
github-code
36
[ { "api_name": "win32gui.FindWindow", "line_number": 19, "usage_type": "call" }, { "api_name": "win32gui.GetWindowRect", "line_number": 20, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 23, "usage_type": "call" }, { "api_name": "pyautogui.scre...
19130481877
from datetime import datetime import json class Observation(): def __init__(self, observationTime, numericValue, stringValue, booleanValue, sensorId): self.observationTime = observationTime.strftime("%m/%d/%Y, %H:%M:%S") self.Value = numericValue self.valueString = stringValue self....
midcoreboot/RaspberryPiSensors
REC.py
REC.py
py
675
python
en
code
0
github-code
36
[ { "api_name": "json.dumps", "line_number": 18, "usage_type": "call" } ]
16919406854
from rest_framework.parsers import JSONParser from rest_framework.renderers import JSONRenderer from rest_framework.response import Response from rest_framework.decorators import api_view import io from rest_framework import status from todos.models import Task from .serializers import TaskSerializer @api_view(['GET'...
Khot-abhishek/TODO_WITH_API
api/views.py
views.py
py
2,318
python
en
code
0
github-code
36
[ { "api_name": "todos.models.Task.objects.all", "line_number": 13, "usage_type": "call" }, { "api_name": "todos.models.Task.objects", "line_number": 13, "usage_type": "attribute" }, { "api_name": "todos.models.Task", "line_number": 13, "usage_type": "name" }, { "ap...
30504364246
import numpy as np import cv2 from sklearn.cluster import KMeans import pdb from skimage.util import montage import matplotlib.pyplot as plt ''' K means clustering with 30 classes: 26 letters, 1 blank time, 1 double letter, 1 triple letter, 1 empty''' # gather images that have been labelled f = open('labels.txt') d...
meicholtz/scrabble
clustering.py
clustering.py
py
2,242
python
en
code
0
github-code
36
[ { "api_name": "cv2.imread", "line_number": 31, "usage_type": "call" }, { "api_name": "cv2.resize", "line_number": 32, "usage_type": "call" }, { "api_name": "numpy.float32", "line_number": 38, "usage_type": "call" }, { "api_name": "numpy.float32", "line_number"...
33149847347
import argparse import collections from datetime import datetime import matplotlib.pyplot as plt from matplotlib.animation import FuncAnimation import numpy import sys import time import json import zenoh # --- Command line argument parsing --- --- --- --- --- --- parser = argparse.ArgumentParser( prog='z_plot', ...
eclipse-zenoh/zenoh-demos
plotting/zplot/z_plot.py
z_plot.py
py
2,515
python
en
code
27
github-code
36
[ { "api_name": "argparse.ArgumentParser", "line_number": 13, "usage_type": "call" }, { "api_name": "zenoh.config_from_file", "line_number": 30, "usage_type": "call" }, { "api_name": "zenoh.Config", "line_number": 30, "usage_type": "call" }, { "api_name": "zenoh.con...
74477036264
from flask import Flask from flask import render_template, request, jsonify from engine.inv_ind import get_inv_ind from engine.retrieval import get_retrieved_docs app = Flask(__name__) @app.route('/') def hello(): return render_template("default.html") @app.route('/index', methods=["GET", "POST"]) de...
ashishu007/IR-Engine
main.py
main.py
py
1,441
python
en
code
0
github-code
36
[ { "api_name": "flask.Flask", "line_number": 6, "usage_type": "call" }, { "api_name": "flask.render_template", "line_number": 10, "usage_type": "call" }, { "api_name": "flask.request.method", "line_number": 14, "usage_type": "attribute" }, { "api_name": "flask.requ...
16172950617
"""This script creates a regression test over metarl-TRPO and baselines-TRPO. Unlike metarl, baselines doesn't set max_path_length. It keeps steps the action until it's done. So we introduced tests.wrappers.AutoStopEnv wrapper to set done=True when it reaches max_path_length. We also need to change the metarl.tf.sampl...
icml2020submission6857/metarl
tests/benchmarks/metarl/tf/algos/test_benchmark_trpo.py
test_benchmark_trpo.py
py
12,332
python
en
code
2
github-code
36
[ { "api_name": "baselines.bench.benchmarks.get_benchmark", "line_number": 63, "usage_type": "call" }, { "api_name": "baselines.bench.benchmarks", "line_number": 63, "usage_type": "name" }, { "api_name": "datetime.datetime.now", "line_number": 65, "usage_type": "call" }, ...
27550085200
import datetime from imap_tools import EmailAddress DATA = dict( subject='double_fields', from_='kaukinvk@yandex.ru', to=('aa@aa.ru', 'bb@aa.ru'), cc=('cc@aa.ru', 'dd@aa.ru'), bcc=('zz1@aa.ru', 'zz2@aa.ru'), reply_to=('foma1@company.ru', 'petr1@company.ru', 'foma2@company.ru', 'petr2@company.ru...
ikvk/imap_tools
tests/messages_data/double_fields.py
double_fields.py
py
1,917
python
en
code
608
github-code
36
[ { "api_name": "datetime.datetime", "line_number": 11, "usage_type": "call" }, { "api_name": "imap_tools.EmailAddress", "line_number": 17, "usage_type": "call" }, { "api_name": "imap_tools.EmailAddress", "line_number": 18, "usage_type": "call" }, { "api_name": "ima...
27648052145
from sqlalchemy import create_engine, text db_connection_string = "mysql+pymysql://zi6id5p25yfq60ih6t1y:pscale_pw_OG991jS2It86MJJqrCYvCmcJ5psfFaYkxyOLA9GoTwy@ap-south.connect.psdb.cloud/enantiomer?charset=utf8mb4" engine = create_engine(db_connection_string, connect_args={"ssl": { ...
ismaehl-2002/enantiomer-website-v2
database.py
database.py
py
579
python
en
code
1
github-code
36
[ { "api_name": "sqlalchemy.create_engine", "line_number": 5, "usage_type": "call" }, { "api_name": "sqlalchemy.text", "line_number": 13, "usage_type": "call" } ]
24688793907
from typing import Sequence class NetStats: def __init__( self, net, input_shape: Sequence[int], backend: str = "torch", self_defined_imp_class = None ): if self_defined_imp_class is None: if backend == "torch": from reunn.implementation import torch_imp ...
AllenYolk/reusable-nn-code
reunn/stats.py
stats.py
py
954
python
en
code
1
github-code
36
[ { "api_name": "typing.Sequence", "line_number": 7, "usage_type": "name" }, { "api_name": "reunn.implementation.torch_imp.TorchStatsImp", "line_number": 13, "usage_type": "call" }, { "api_name": "reunn.implementation.torch_imp", "line_number": 13, "usage_type": "name" },...
29947905371
import requests class Test_new_joke(): """Создание новой шутки""" def __init__(self): pass def get_categories(self): """Получение категориb шуток""" url_categories = "https://api.chucknorris.io/jokes/categories" print("Получение категорий шуток по ссылке - " + url_categ...
Grassh-str/Test_api_ChuckNorris
api_chuck.py
api_chuck.py
py
2,399
python
ru
code
0
github-code
36
[ { "api_name": "requests.get", "line_number": 16, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 30, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 43, "usage_type": "call" } ]
13866614560
import datetime from sqlalchemy import Column, Integer, String, DateTime, ForeignKey from sqlalchemy.orm import relationship from app.db.base_model import Base class ArticleModel(Base): __tablename__ = "articles" id = Column(Integer, primary_key=True, autoincrement=True) title = Column(String(255)) ...
matheus-feu/FastAPI-JWT-Security
app/models/article.py
article.py
py
753
python
en
code
3
github-code
36
[ { "api_name": "app.db.base_model.Base", "line_number": 9, "usage_type": "name" }, { "api_name": "sqlalchemy.Column", "line_number": 12, "usage_type": "call" }, { "api_name": "sqlalchemy.Integer", "line_number": 12, "usage_type": "argument" }, { "api_name": "sqlalc...
26377040664
import ast import os from django.http import JsonResponse from django.shortcuts import render, HttpResponse from django.conf import settings import json import commons.helper # Create your views here. """ Google Map """ def map_hello_world(request): """ Renders a page with embedded Google map. Passes varia...
TAMUSA-nsf-project/django_smartmap
map/views.py
views.py
py
1,701
python
en
code
2
github-code
36
[ { "api_name": "django.conf.settings.GOOGLE_MAP_API_KEY", "line_number": 23, "usage_type": "attribute" }, { "api_name": "django.conf.settings", "line_number": 23, "usage_type": "name" }, { "api_name": "json.dumps", "line_number": 26, "usage_type": "call" }, { "api_...
41772303500
import glob import json import subprocess from utils import PathUtils from plot_sim_results import plot_multiple_results EXP_CONFIGS = ['ring_local_config', 'ring_consensus_config'] if __name__ == '__main__': ring_configs = glob.glob(str(PathUtils.exp_configs_folder) + '/ring' + '/*.py') for...
matteobettini/Autonomous-Vehicles-Consensus-2021
run_experiments_ring.py
run_experiments_ring.py
py
1,084
python
en
code
0
github-code
36
[ { "api_name": "glob.glob", "line_number": 13, "usage_type": "call" }, { "api_name": "utils.PathUtils.exp_configs_folder", "line_number": 13, "usage_type": "attribute" }, { "api_name": "utils.PathUtils", "line_number": 13, "usage_type": "name" }, { "api_name": "uti...
13966927417
from itertools import combinations def make_combinations_set(order, menu_num): result = set() menus = sorted([ch for ch in order]) comb_menu = combinations(menus, menu_num) for each_comb in comb_menu: result.add(''.join(each_comb)) # print(result) return result def solution(orders, c...
Devlee247/NaverBoostCamp_AlgorithmStudy
week5/P01_myeongu.py
P01_myeongu.py
py
1,634
python
en
code
1
github-code
36
[ { "api_name": "itertools.combinations", "line_number": 7, "usage_type": "call" } ]
32889657187
import math import os from pickle import FALSE, TRUE import nltk import string from nltk.stem import PorterStemmer import json import tkinter as tk from nltk import WordNetLemmatizer lemmatizer=WordNetLemmatizer() remove_punctuation_translator = str.maketrans(string.punctuation, ' '*len(string.punctuation)) def stopWor...
mustafabawani/Vector-Space-Model
ajeeb.py
ajeeb.py
py
4,976
python
en
code
0
github-code
36
[ { "api_name": "nltk.WordNetLemmatizer", "line_number": 10, "usage_type": "call" }, { "api_name": "string.punctuation", "line_number": 11, "usage_type": "attribute" }, { "api_name": "nltk.word_tokenize", "line_number": 45, "usage_type": "call" }, { "api_name": "mat...
38767218323
import streamlit as st import pandas as pd import openai import time import re openai.api_key = st.secrets["openai"] def txt(file): content = file.getvalue().decode('utf-8') documents = content.split("____________________________________________________________") # Removing any empty strings or ones that...
skacholia/AnnotateDemo
main.py
main.py
py
4,539
python
en
code
0
github-code
36
[ { "api_name": "openai.api_key", "line_number": 7, "usage_type": "attribute" }, { "api_name": "streamlit.secrets", "line_number": 7, "usage_type": "attribute" }, { "api_name": "re.search", "line_number": 28, "usage_type": "call" }, { "api_name": "re.search", "l...
27016642063
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Nov 1 17:38:34 2019 @author: Martín Márquez Cervantes """ print("UNion de las tres compuertas, aun por trabajar") import matplotlib.pyplot as plt import numpy as np class MyNeuron: #VAriable w global WG=0 xTestPredic=0 #entrenamie...
MarqCervMartin/RedesNeuronales
Laboratorio5/CompuertaAndOrNot.py
CompuertaAndOrNot.py
py
5,014
python
es
code
0
github-code
36
[ { "api_name": "numpy.random.rand", "line_number": 20, "usage_type": "call" }, { "api_name": "numpy.random", "line_number": 20, "usage_type": "attribute" }, { "api_name": "numpy.append", "line_number": 24, "usage_type": "call" }, { "api_name": "numpy.ones", "li...
14129279608
# -*- coding: utf-8 -*- # Define your item pipelines here # # Don't forget to add your pipeline to the ITEM_PIPELINES setting # See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html import sqlite3 from datetime import datetime db_name = 'dbmovie{0}.db'.format(str(datetime.now())[:10].replace('-', '')) cla...
zenmeder/dbmovie
dbmovie/pipelines.py
pipelines.py
py
1,434
python
en
code
0
github-code
36
[ { "api_name": "datetime.datetime.now", "line_number": 11, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 11, "usage_type": "name" }, { "api_name": "sqlite3.connect", "line_number": 17, "usage_type": "call" }, { "api_name": "sqlite3.Error...
23212333774
from django.test import TestCase from .models import User, Routine, RoutineContent, Task, Advice, Appointment, DayWeek from .get import * from datetime import datetime, timedelta # Create your tests here. class getsFunctionTestCase(TestCase): def setUp(self): user_a = User.objects.create_user(username='u...
eduardofcabrera/CS50-CalendarDay
day_day/tests.py
tests.py
py
6,307
python
en
code
0
github-code
36
[ { "api_name": "django.test.TestCase", "line_number": 7, "usage_type": "name" }, { "api_name": "models.User.objects.create_user", "line_number": 11, "usage_type": "call" }, { "api_name": "models.User.objects", "line_number": 11, "usage_type": "attribute" }, { "api_...
43508294902
import sys from pathlib import Path sys.path.append(Path(__file__).resolve().parents[2]) # rel imports when in package if __name__ == '__main__' and __package__ is None: __package__ = 'kuosc' print(Path(__file__).resolve()) print(__package__) # from kurosc.lib.plotformat import setup
chriswilly/kuramoto-osc
Python/kurosc/kurosc/tests/pathtest.py
pathtest.py
py
293
python
en
code
2
github-code
36
[ { "api_name": "sys.path.append", "line_number": 3, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 3, "usage_type": "attribute" }, { "api_name": "pathlib.Path", "line_number": 3, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_numb...
73679903143
import telebot from telebot import types import firebase_admin from firebase_admin import credentials from firebase_admin import db bot = telebot.TeleBot("") # Замените на свой токен! DB_URL = '' user_dict = {} class User: def __init__(self, tgid): self.tgid = tgid self.fio_name = ...
psshamshin/CuberClub_BOT
tgbotlastfinal.py
tgbotlastfinal.py
py
4,885
python
ru
code
0
github-code
36
[ { "api_name": "telebot.TeleBot", "line_number": 7, "usage_type": "call" }, { "api_name": "telebot.types.ReplyKeyboardMarkup", "line_number": 22, "usage_type": "call" }, { "api_name": "telebot.types", "line_number": 22, "usage_type": "name" }, { "api_name": "telebo...
6689643445
import os import uuid import json import minio import logging class storage: instance = None client = None def __init__(self): try: """ Minio does not allow another way of configuring timeout for connection. The rest of configuration is copied from source code ...
spcl/serverless-benchmarks
benchmarks/wrappers/openwhisk/python/storage.py
storage.py
py
2,464
python
en
code
97
github-code
36
[ { "api_name": "datetime.timedelta", "line_number": 21, "usage_type": "call" }, { "api_name": "urllib3.PoolManager", "line_number": 23, "usage_type": "call" }, { "api_name": "urllib3.util.Timeout", "line_number": 24, "usage_type": "call" }, { "api_name": "urllib3.u...
44647926786
import boto3 import json from decimal import Decimal from boto3.dynamodb.conditions import Key dynamodb = boto3.resource('dynamodb') attendance_table = dynamodb.Table('attendance_table_user') #queryで特定のuser_idの出社予定取ってくる def query_attendance(id): result = attendance_table.query( KeyConditionExpressio...
SOICHI0826/kinikare_server
lambdafunction/get_attendance.py
get_attendance.py
py
957
python
en
code
0
github-code
36
[ { "api_name": "boto3.resource", "line_number": 6, "usage_type": "call" }, { "api_name": "boto3.dynamodb.conditions.Key", "line_number": 12, "usage_type": "call" }, { "api_name": "decimal.Decimal", "line_number": 17, "usage_type": "argument" }, { "api_name": "json....
11210169685
from django.conf import settings from travels import models from django.utils.html import escapejs def project_settings(request): project_settings = models.Settings.objects.all()[0] return { 'project_settings' : project_settings } def settings_variables(request): ''' Provides base URLs for use in templates ''' ...
UNICEF-Youth-Section/Locast-Web-Rio
travels/settings_context_processor.py
settings_context_processor.py
py
754
python
en
code
0
github-code
36
[ { "api_name": "travels.models.Settings.objects.all", "line_number": 6, "usage_type": "call" }, { "api_name": "travels.models.Settings", "line_number": 6, "usage_type": "attribute" }, { "api_name": "travels.models", "line_number": 6, "usage_type": "name" }, { "api_...
947943428
#!/usr/bin/env python3 import requests import bs4 base_url = "https://quotes.toscrape.com/page/{}/" authors = set() quotations = [] for page_num in range(1,2): page = requests.get(base_url.format(page_num)) soup = bs4.BeautifulSoup(page.text,'lxml') boxes = soup.select(".quote") #selected all the qu...
SKT27182/web_scaping
get_quotes_author.py
get_quotes_author.py
py
751
python
en
code
0
github-code
36
[ { "api_name": "requests.get", "line_number": 12, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_number": 13, "usage_type": "call" } ]
29790427487
import json from flask import Flask, request from flask_cors import CORS from queue import Queue from helpers.utils import utils from helpers.db import queries from helpers.algo import boundary from helpers.algo import neighbours from helpers.algo import degrees_count from helpers.algo.new_hex_loc import* app = Flas...
ricksr/cluster-anywhr
cluster/app.py
app.py
py
11,777
python
en
code
1
github-code
36
[ { "api_name": "flask.Flask", "line_number": 14, "usage_type": "call" }, { "api_name": "flask_cors.CORS", "line_number": 15, "usage_type": "call" }, { "api_name": "flask.request.args", "line_number": 25, "usage_type": "attribute" }, { "api_name": "flask.request", ...
70390276585
from flask import Flask,render_template,request,jsonify import utils app = Flask(__name__) @app.route('/') #Base API def home(): print('Testing Home API') return render_template('home.html') @app.route('/predict', methods = ['POST']) def prediction(): print('Testing prediction API') data = request.f...
PrashantBodhe/irisproject1
interface.py
interface.py
py
820
python
en
code
0
github-code
36
[ { "api_name": "flask.Flask", "line_number": 4, "usage_type": "call" }, { "api_name": "flask.render_template", "line_number": 9, "usage_type": "call" }, { "api_name": "flask.request.form", "line_number": 14, "usage_type": "attribute" }, { "api_name": "flask.request...
18190036430
import pandas as pd import Levenshtein import numpy as np from anytree.search import find from utils.category_tree import get_category_tree from utils.io_custom import read_pickle_object from scipy.spatial.distance import cosine import re def find_node(id, tree): return find(tree, lambda node: node.name == id) d...
comptech-winter-school/online-store-redirects
utils/feature_generation.py
feature_generation.py
py
8,101
python
ru
code
3
github-code
36
[ { "api_name": "anytree.search.find", "line_number": 12, "usage_type": "call" }, { "api_name": "re.findall", "line_number": 30, "usage_type": "call" }, { "api_name": "Levenshtein.distance", "line_number": 42, "usage_type": "call" }, { "api_name": "numpy.array", ...
71551898663
from __future__ import annotations import falcon from app.models import Rating from app.schemas.ratings import rating_item_schema class RateResource: deserializers = {"post": rating_item_schema} def on_post(self, req: falcon.Request, resp: falcon.Response, id: int): """ --- summary:...
alysivji/falcon-batteries-included
app/resources/ratings.py
ratings.py
py
1,133
python
en
code
15
github-code
36
[ { "api_name": "app.schemas.ratings.rating_item_schema", "line_number": 10, "usage_type": "name" }, { "api_name": "falcon.Request", "line_number": 12, "usage_type": "attribute" }, { "api_name": "falcon.Response", "line_number": 12, "usage_type": "attribute" }, { "a...
73435015143
import numpy import statsmodels.regression import statsmodels.tools import scipy.optimize as opti import scipy.interpolate as interp import scipy.signal as signal import matplotlib.pyplot as plt class PVP: def __init__(self, sampling_period=0.01): self.sampling_period = sampling_period self._kinem...
jgori-ouistiti/PVPlib
pvplib/core.py
core.py
py
24,949
python
en
code
0
github-code
36
[ { "api_name": "numpy.argmax", "line_number": 55, "usage_type": "call" }, { "api_name": "numpy.argmax", "line_number": 56, "usage_type": "call" }, { "api_name": "numpy.max", "line_number": 57, "usage_type": "call" }, { "api_name": "numpy.argmax", "line_number":...
12220208294
from json import loads from logging_tools import Logger from population import create_sample from requests import get from requests import post from requests.auth import HTTPBasicAuth from string import Template from time import sleep from uuid import uuid1 """ Template for the whisk rest api. """ whisk_rest_api = Tem...
mariosky/ga_action
py_client/evolution.py
evolution.py
py
4,228
python
en
code
1
github-code
36
[ { "api_name": "string.Template", "line_number": 12, "usage_type": "call" }, { "api_name": "uuid.uuid1", "line_number": 20, "usage_type": "call" }, { "api_name": "population.create_sample", "line_number": 66, "usage_type": "call" }, { "api_name": "requests.auth.HTT...
74436411945
import os from pathlib import Path import pandas as pd import numpy as np from matplotlib import pyplot as plt from shutil import copyfile config = { # General 'symbol': 'spy', 'symbol_name': 'S&P500', 'category': {'unespecified': ['spy']}, # 'gld', 'spy','xle', 'emb','dia', 'qqq', 'ewp' 'extensi...
cetrulin/Quant-Quote-Data-Preprocessing
src/select_mahab_series.py
select_mahab_series.py
py
16,131
python
en
code
0
github-code
36
[ { "api_name": "os.sep.join", "line_number": 62, "usage_type": "call" }, { "api_name": "os.sep", "line_number": 62, "usage_type": "attribute" }, { "api_name": "os.sep.join", "line_number": 63, "usage_type": "call" }, { "api_name": "os.sep", "line_number": 63, ...
38625939524
from tkinter import * from tkinter import messagebox from tkinter import ttk #css for tkinter from configparser import ConfigParser # import io # import urllib.request # import base64 import time import ssl ssl._create_default_https_context = ssl._create_unverified_context import requests weather_url = 'http://a...
superduperkevin/WeatherGUI
weather_app.py
weather_app.py
py
3,867
python
en
code
0
github-code
36
[ { "api_name": "ssl._create_default_https_context", "line_number": 14, "usage_type": "attribute" }, { "api_name": "ssl._create_unverified_context", "line_number": 14, "usage_type": "attribute" }, { "api_name": "configparser.ConfigParser", "line_number": 24, "usage_type": "...
16028301314
import pymongo import os import pandas as pd import json def main(): client = pymongo.MongoClient("mongodb://localhost:27017/") databases = client.list_database_names() if "fifa" not in databases: db = client["fifa"] players_collection = db["players"] ultimate_team_collection = db...
wconti27/DS4300_FIFA_Tool
import_data.py
import_data.py
py
2,486
python
en
code
0
github-code
36
[ { "api_name": "pymongo.MongoClient", "line_number": 7, "usage_type": "call" }, { "api_name": "os.listdir", "line_number": 16, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 17, "usage_type": "call" }, { "api_name": "json.loads", "line_...
19982458840
#! /usr/bin/env python # -*- coding: utf-8 -*- from __future__ import unicode_literals import logging import unittest from tutorons.regex.extract import ApacheConfigRegexExtractor, JavascriptRegexExtractor,\ GrepRegexExtractor, SedRegexExtractor from tutorons.common.htmltools import HtmlDocument logging.basicCo...
andrewhead/tutorons-server
tutorons/tests/regex/test_extractor.py
test_extractor.py
py
8,711
python
en
code
6
github-code
36
[ { "api_name": "logging.basicConfig", "line_number": 13, "usage_type": "call" }, { "api_name": "logging.INFO", "line_number": 13, "usage_type": "attribute" }, { "api_name": "unittest.TestCase", "line_number": 24, "usage_type": "attribute" }, { "api_name": "tutorons...
13042186116
#!/usr/bin/env python """ Datapath for QEMU qdisk """ import urlparse import os import sys import xapi import xapi.storage.api.v5.datapath import xapi.storage.api.v5.volume import importlib from xapi.storage.libs.libcow.datapath import QdiskDatapath from xapi.storage import log def get_sr_callbacks(dbg, uri): u ...
xcp-ng/xcp-ng-xapi-storage
plugins/datapath/qdisk/datapath.py
datapath.py
py
2,192
python
en
code
4
github-code
36
[ { "api_name": "urlparse.urlparse", "line_number": 18, "usage_type": "call" }, { "api_name": "sys.path.insert", "line_number": 20, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 20, "usage_type": "attribute" }, { "api_name": "importlib.import_modu...
30844385629
""" USC Spring 2020 INF 553 Foundations of Data Mining Assignment 3 Student Name: Jiabin Wang Student ID: 4778-4151-95 """ from pyspark import SparkConf, SparkContext, StorageLevel from trainAuxiliary import * ''' import os import re import json import time import sys import math import random ...
jiabinwa/DSCI-INF553-DataMining
Assignment-3/task3train.py
task3train.py
py
1,215
python
en
code
0
github-code
36
[ { "api_name": "pyspark.SparkConf", "line_number": 32, "usage_type": "call" }, { "api_name": "pyspark.SparkContext", "line_number": 37, "usage_type": "call" } ]
20851705442
# Take the code from the How To Decode A Website exercise # (if you didn’t do it or just want to play with some different code, use the code from the solution), # and instead of printing the results to a screen, write the results to a txt file. # In your code, just make up a name for the file you are saving to. # E...
ismsadek/python-basics
Ex 21.py
Ex 21.py
py
973
python
en
code
1
github-code
36
[ { "api_name": "requests.get", "line_number": 14, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_number": 15, "usage_type": "call" } ]
69839957223
from django.conf.urls.defaults import * from django.contrib import admin import os.path admin.autodiscover() MEDIA_ROOT = os.path.join(os.path.abspath(os.path.dirname(__file__)), "media") urlpatterns = patterns('', (r'^admin/doc/', include('django.contrib.admindocs.urls')), (r'^admin/', include(admin.site.urls...
friendofrobots/ice-divisi
explore/urls.py
urls.py
py
995
python
en
code
1
github-code
36
[ { "api_name": "django.contrib.admin.autodiscover", "line_number": 4, "usage_type": "call" }, { "api_name": "django.contrib.admin", "line_number": 4, "usage_type": "name" }, { "api_name": "os.path.path.join", "line_number": 5, "usage_type": "call" }, { "api_name": ...
19970778695
import eventlet import msgpack import random from copy import copy from datetime import datetime from . import cmds from . import msgs import os log_file = open(os.path.join(os.getcwd(), 'client.log'), 'w') def write_log(msg): global log_file log_file.write( "{0} - {1}\n".format(datetime.now(), str(...
jason-ni/eventlet-raft
eventlet_raft/client.py
client.py
py
4,133
python
en
code
3
github-code
36
[ { "api_name": "os.path.join", "line_number": 11, "usage_type": "call" }, { "api_name": "os.path", "line_number": 11, "usage_type": "attribute" }, { "api_name": "os.getcwd", "line_number": 11, "usage_type": "call" }, { "api_name": "datetime.datetime.now", "line...
38777184708
#!/usr/bin/python import csv import json import pprint import re import sys def replace_if_not_empty(dict, key, value): if key not in dict or not dict[key]: dict[key] = value def to_float_or_none(value): # lmao lazy try: return float(value) except ValueError: return None d...
penguinuwu/Mousebase
backend/csv_parser/parse_csv.py
parse_csv.py
py
7,636
python
en
code
1
github-code
36
[ { "api_name": "json.dump", "line_number": 37, "usage_type": "call" }, { "api_name": "csv.DictReader", "line_number": 51, "usage_type": "call" }, { "api_name": "re.search", "line_number": 150, "usage_type": "call" }, { "api_name": "sys.argv", "line_number": 249...
13909907482
"""Module with lagrangian decomposition methods.""" # Python packages # Package modules import logging as log from firedecomp.AL import ARPP from firedecomp.AL import ADPP from firedecomp.fix_work import utils as _utils from firedecomp.original import model as _model from firedecomp.classes import problem as _problem ...
jorgerodriguezveiga/firedecomp
firedecomp/AL/AL.py
AL.py
py
22,213
python
en
code
0
github-code
36
[ { "api_name": "time.time", "line_number": 57, "usage_type": "call" }, { "api_name": "firedecomp.fix_work.utils.get_initial_sol", "line_number": 135, "usage_type": "call" }, { "api_name": "firedecomp.fix_work.utils", "line_number": 135, "usage_type": "name" }, { "a...
7952291852
from __future__ import annotations import logbook from discord import Interaction from discord import Message from discord.ext.commands import Context from json import dumps from logging import Logger from time import time from utils import send_response from yt_dlp.YoutubeDL import YoutubeDL from yt_dlp import Downlo...
ruubytes/Maon.py
src/track.py
track.py
py
6,962
python
en
code
0
github-code
36
[ { "api_name": "typing.TYPE_CHECKING", "line_number": 15, "usage_type": "name" }, { "api_name": "logging.Logger", "line_number": 18, "usage_type": "name" }, { "api_name": "logbook.getLogger", "line_number": 18, "usage_type": "call" }, { "api_name": "time.time", ...
24643182429
import pyautogui import time # Locating the game window pyautogui.alert('Put the mouse pointer over the top left corner of the game then press "Enter"') TOP_LEFT = pyautogui.position() pyautogui.alert('Put the mouse pointer over the bottom right corner of the game then press "Enter"') BOT_RIGHT = pyautogui.position...
Furrane/voxelbot
main.py
main.py
py
2,768
python
en
code
0
github-code
36
[ { "api_name": "pyautogui.alert", "line_number": 7, "usage_type": "call" }, { "api_name": "pyautogui.position", "line_number": 8, "usage_type": "call" }, { "api_name": "pyautogui.alert", "line_number": 10, "usage_type": "call" }, { "api_name": "pyautogui.position",...
12080387469
from tinydb import TinyDB, Query, where db = TinyDB("data.json", indent=4) db.update({"score": 10}, where ("name") == "Patrick") db.update({"roles": ["Junior"]}) db.update({"roles": ["Expert"]}, where("name") == "Patrick") db.upsert({"name": "Pierre", "score": 120, "roles": ["Senior"]}, where("name") == "Pierre") d...
yunus-gdk/python_beginner
tiny-db/maj.py
maj.py
py
402
python
en
code
0
github-code
36
[ { "api_name": "tinydb.TinyDB", "line_number": 3, "usage_type": "call" }, { "api_name": "tinydb.where", "line_number": 5, "usage_type": "call" }, { "api_name": "tinydb.where", "line_number": 7, "usage_type": "call" }, { "api_name": "tinydb.where", "line_number"...
28890711101
"""Tool for processing pytd files. pytd is a type declaration language for Python. Each .py file can have an accompanying .pytd file that specifies classes, argument types, return types and exceptions. This binary processes pytd files, typically to optimize them. Usage: pytd_tool [flags] <inputfile> <outputfile> ""...
google/pytype
pytype/pytd/main.py
main.py
py
3,389
python
en
code
4,405
github-code
36
[ { "api_name": "argparse.ArgumentParser", "line_number": 25, "usage_type": "call" }, { "api_name": "pytype.utils.version_from_string", "line_number": 69, "usage_type": "call" }, { "api_name": "pytype.utils", "line_number": 69, "usage_type": "name" }, { "api_name": ...
34887554995
import django_filters from .models import * from django_filters import DateFilter, CharFilter, NumberFilter from django.forms.widgets import TextInput, NumberInput, DateInput, SelectDateWidget # class TitleFilter(django_filters.FilterSet): # title = CharFilter(field_name='title', lookup_expr='icontains', # ...
viginti23/project-home-gardens
home/filters.py
filters.py
py
2,126
python
en
code
0
github-code
36
[ { "api_name": "django_filters.FilterSet", "line_number": 18, "usage_type": "attribute" }, { "api_name": "django_filters.DateFilter", "line_number": 19, "usage_type": "call" }, { "api_name": "django.forms.widgets.SelectDateWidget", "line_number": 20, "usage_type": "call" ...
38242299725
import os, re, math, sys from collections import defaultdict VCF_CONTIG_PATT = re.compile('ID=(\w+),length=(\d+)') PROG_NAME = 'Hycco' DESCRIPTION = 'Hycco is an HMM based method to estimate hybrid chromosomal crossover points using distinguising SNPs from two parental genotypes' FILE_TAG = 'crossover_regions' DEF...
tjs23/hycco
hycco.py
hycco.py
py
16,851
python
en
code
1
github-code
36
[ { "api_name": "re.compile", "line_number": 4, "usage_type": "call" }, { "api_name": "sys.exit", "line_number": 30, "usage_type": "call" }, { "api_name": "os.path.exists", "line_number": 37, "usage_type": "call" }, { "api_name": "os.path", "line_number": 37, ...
932080591
import argparse import sys from FitsToPNG import main_run from FitsMath import calibration_compute_process from JsonConvert import JsonConvert def argument_handling(): """ Method to deal with arguments parsing :return: file path to fits file and path to a new png file """ parser = argparse.Argumen...
AstroPhotometry/AstroPhotometry
python/main.py
main.py
py
1,913
python
en
code
1
github-code
36
[ { "api_name": "argparse.ArgumentParser", "line_number": 13, "usage_type": "call" }, { "api_name": "FitsToPNG.main_run", "line_number": 24, "usage_type": "call" }, { "api_name": "JsonConvert.JsonConvert", "line_number": 50, "usage_type": "call" }, { "api_name": "Fi...
15991432175
"""Point-wise Spatial Attention Network""" import torch import torch.nn as nn up_kwargs = {'mode': 'bilinear', 'align_corners': True} norm_layer = nn.BatchNorm2d class _ConvBNReLU(nn.Module): def __init__(self, in_channels, out_channels, kernel_size, stride=1, padding=0, dilation=1, groups=1, r...
zyxu1996/Efficient-Transformer
models/head/psa.py
psa.py
py
3,539
python
en
code
67
github-code
36
[ { "api_name": "torch.nn.BatchNorm2d", "line_number": 7, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 7, "usage_type": "name" }, { "api_name": "torch.nn.Module", "line_number": 10, "usage_type": "attribute" }, { "api_name": "torch.nn", ...
31167909236
from mpl_toolkits.mplot3d import Axes3D import matplotlib.pyplot as pl n = [] e = [] ep = [] with open('cohesive.txt') as file: next(file) for line in file: value = line.strip().split(' ') n.append(int(value[0])) e.append(float(value[1])) ep.append(float(value[2])) n = [int(i) ...
leschultz/MSE760
hw1/cohesiveplot.py
cohesiveplot.py
py
640
python
en
code
0
github-code
36
[ { "api_name": "matplotlib.pyplot.plot", "line_number": 19, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 19, "usage_type": "name" }, { "api_name": "matplotlib.pyplot.plot", "line_number": 20, "usage_type": "call" }, { "api_name": "matpl...
38230641429
from __future__ import division, print_function import numpy as np import scipy.linalg from MatrixIO import load, store import click def lqr(A,B,Q,R): """Solve the continuous time lqr controller. dx/dt = A x + B u cost = integral x.T*Q*x + u.T*R*u """ #ref Bertsekas, p.151 #fi...
Zomega/thesis
Wurm/Stabilize/LQR/python/LQR.py
LQR.py
py
1,450
python
en
code
0
github-code
36
[ { "api_name": "numpy.matrix", "line_number": 20, "usage_type": "call" }, { "api_name": "scipy.linalg.linalg.solve_continuous_are", "line_number": 20, "usage_type": "call" }, { "api_name": "scipy.linalg.linalg", "line_number": 20, "usage_type": "attribute" }, { "ap...
8639664963
# -*- coding: utf-8 -*- # # Virtual Satellite 4 - FreeCAD module # # Copyright (C) 2019 by # # DLR (German Aerospace Center), # Software for Space Systems and interactive Visualization # Braunschweig, Germany # # This program is free software: you can redistribute it and/or modify # it under the ter...
virtualsatellite/VirtualSatellite4-FreeCAD-mod
VirtualSatelliteCAD/json_io/products/json_product_assembly.py
json_product_assembly.py
py
9,732
python
en
code
9
github-code
36
[ { "api_name": "FreeCAD.Console", "line_number": 38, "usage_type": "attribute" }, { "api_name": "json_io.products.json_product.AJsonProduct", "line_number": 41, "usage_type": "name" }, { "api_name": "json_io.json_definitions.JSON_ELEMNT_CHILDREN", "line_number": 77, "usage...
25450914107
from rest_framework import serializers from taggit.serializers import TagListSerializerField, TaggitSerializer from accounts.models import Profile from ...models import Post, Category class CategorySerializer(serializers.ModelSerializer): class Meta: model = Category fields = ("name", "id") ...
AmirhosseinRafiee/Blog
mysite/blog/api/v1/serializers.py
serializers.py
py
2,319
python
en
code
0
github-code
36
[ { "api_name": "rest_framework.serializers.ModelSerializer", "line_number": 7, "usage_type": "attribute" }, { "api_name": "rest_framework.serializers", "line_number": 7, "usage_type": "name" }, { "api_name": "models.Category", "line_number": 9, "usage_type": "name" }, ...
361601527
import pandas as pd import glob import functools from sklearn.preprocessing import StandardScaler from sklearn.cluster import KMeans from sklearn import decomposition import matplotlib.pyplot as plt import matplotlib.patches as mpatches #from plotnine import * #from matplotlib.mlab import PCA # LOAD THE DATA #data = ...
deprekate/goodorfs_experimental
scripts/pca_all.py
pca_all.py
py
1,954
python
en
code
0
github-code
36
[ { "api_name": "pandas.concat", "line_number": 15, "usage_type": "call" }, { "api_name": "functools.partial", "line_number": 15, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 15, "usage_type": "attribute" }, { "api_name": "glob.glob", ...
20681022248
__author__ = 'elmira' import numpy as np from lxml import etree from collections import Counter from matplotlib import pyplot as plt from matplotlib import mlab def open_corpus(fname): parser = etree.HTMLParser() # создаем парсер хтмл-страниц # скармливаем парсеру майстемовский xml, берем тэг body и все что...
elmiram/homework
seminar9/task2 (4 points)/genre-by-pos.py
genre-by-pos.py
py
3,848
python
ru
code
0
github-code
36
[ { "api_name": "lxml.etree.HTMLParser", "line_number": 11, "usage_type": "call" }, { "api_name": "lxml.etree", "line_number": 11, "usage_type": "name" }, { "api_name": "lxml.etree.parse", "line_number": 13, "usage_type": "call" }, { "api_name": "lxml.etree", "l...
10877583563
import sys import os from tqdm.rich import tqdm import pandas as pd import datetime import tables from pathlib import Path from typing import TypedDict class TrialSummary(TypedDict): subject: str task: str step: str n_trials: int data_path = Path.home() / "Dropbox" / "lab" / "autopilot" / "data" subj...
auto-pi-lot/autopilot-paper
code/log_counting/count_trials.py
count_trials.py
py
1,137
python
en
code
1
github-code
36
[ { "api_name": "typing.TypedDict", "line_number": 10, "usage_type": "name" }, { "api_name": "pathlib.Path.home", "line_number": 17, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_number": 17, "usage_type": "name" }, { "api_name": "tqdm.rich.tqdm", ...