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
6655501967
from functools import partial from typing import Callable import numpy as np import rospy from stable_baselines3.common.vec_env import VecNormalize from supersuit.vector import ConcatVecEnv, MarkovVectorEnv from supersuit.vector.sb3_vector_wrapper import SB3VecEnvWrapper class MarkovVectorEnv_patched(MarkovVectorEnv...
ignc-research/arena-marl
arena_navigation/arena_local_planner/learning_based/arena_local_planner_drl/rl_agent/utils/supersuit_utils.py
supersuit_utils.py
py
3,409
python
en
code
11
github-code
36
[ { "api_name": "supersuit.vector.MarkovVectorEnv", "line_number": 11, "usage_type": "name" }, { "api_name": "numpy.array", "line_number": 28, "usage_type": "call" }, { "api_name": "numpy.float32", "line_number": 30, "usage_type": "attribute" }, { "api_name": "numpy...
29550581614
# -*- coding: utf-8 -*- """ Created on Wed Jun 13 15:41:54 2018 @author: usuario """ import pandas as pd import numpy as np from keras.models import load_model from collections import Counter import time from datetime import datetime def runClassifier (current_batch, clf): current_batch=np.array(c...
palomadominguez/TFG-pulseras
src/classify.py
classify.py
py
2,435
python
en
code
0
github-code
36
[ { "api_name": "numpy.array", "line_number": 16, "usage_type": "call" }, { "api_name": "numpy.argmax", "line_number": 19, "usage_type": "call" }, { "api_name": "collections.Counter", "line_number": 21, "usage_type": "call" }, { "api_name": "time.time", "line_nu...
15865559103
import argparse if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument("--physics", help="physics marks") parser.add_argument("--chemistry", help="chemistry marks") parser.add_argument("--maths", help="maths marks") args = parser.parse_args() print(args.physics) ...
codebasics/py
Basics/Exercise/24_argparse/24_argparse.py
24_argparse.py
py
527
python
en
code
6,422
github-code
36
[ { "api_name": "argparse.ArgumentParser", "line_number": 4, "usage_type": "call" } ]
16845647150
from django.urls import path from . import views app_name = 'main' urlpatterns = [ # not logged in path('', views.index, name="index"), path('search/', views.search, name="search"), # logged in path('home/', views.home, name="home"), path('post/', views.addWord, name="post"), path('resul...
Leomhango/ndamvesta2.0
backend/main/urls.py
urls.py
py
597
python
en
code
1
github-code
36
[ { "api_name": "django.urls.path", "line_number": 9, "usage_type": "call" }, { "api_name": "django.urls.path", "line_number": 10, "usage_type": "call" }, { "api_name": "django.urls.path", "line_number": 13, "usage_type": "call" }, { "api_name": "django.urls.path", ...
73257029225
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ @author: williamhadnett D00223305 """ import pymongo import os os.chdir('/Users/williamhadnett/Documents/Data_Science/Data_Science_CA3_William_Hadnett') import atlasCredentials # ============================================================================= # Connect...
hadnett/Data_Science_Ecommerce_Performance
section2_CA3_William_Hadnett.py
section2_CA3_William_Hadnett.py
py
7,432
python
en
code
0
github-code
36
[ { "api_name": "os.chdir", "line_number": 11, "usage_type": "call" }, { "api_name": "atlasCredentials.username", "line_number": 17, "usage_type": "attribute" }, { "api_name": "atlasCredentials.password", "line_number": 17, "usage_type": "attribute" }, { "api_name":...
32842087226
import cv2 as cv import os def YOLO(): dir = os.path.dirname(__file__) net = cv.dnn.readNetFromDarknet(dir + "/models/yolov3-tiny.cfg", dir + "/models/yolov3-tiny.weights") blob_options = {"scale": 1/255.0, "MeanSubtraction": (0, 0, 0)} labels = open(dir + "/data/coco2014.names").read().strip().split...
adagun/detector
models.py
models.py
py
1,137
python
en
code
1
github-code
36
[ { "api_name": "os.path.dirname", "line_number": 7, "usage_type": "call" }, { "api_name": "os.path", "line_number": 7, "usage_type": "attribute" }, { "api_name": "cv2.dnn.readNetFromDarknet", "line_number": 8, "usage_type": "call" }, { "api_name": "cv2.dnn", "l...
70096896743
# -*- coding: utf-8 -*- """Example script to show how to use mcetl.launch_main_gui with defined DataSource objects. @author: Donald Erb Created on Aug 22, 2020 """ import itertools import mcetl import numpy as np import pandas as pd from scipy import optimize def offset_data(df, target_indices, calc_indices, exc...
derb12/mcetl
examples/use_main_gui.py
use_main_gui.py
py
29,127
python
en
code
0
github-code
36
[ { "api_name": "numpy.where", "line_number": 33, "usage_type": "call" }, { "api_name": "numpy.isnan", "line_number": 33, "usage_type": "call" }, { "api_name": "numpy.where", "line_number": 74, "usage_type": "call" }, { "api_name": "numpy.isnan", "line_number": ...
2305398126
from sqlalchemy.orm import sessionmaker import sqlalchemy as db from models.model import Base from models.team_models import NCAATeam from models.team_models import NBATeam from models.oddshark_models import OddSharkNCAA from models.oddshark_models import OddSharkNBA from models.hasla_metrics_model import HaslaMetrics...
happy-ruby/SportsBettingAnalysis
database.py
database.py
py
3,793
python
en
code
3
github-code
36
[ { "api_name": "config.SERVER_ENVIRONMENT", "line_number": 21, "usage_type": "attribute" }, { "api_name": "sqlalchemy.create_engine", "line_number": 22, "usage_type": "call" }, { "api_name": "config.SERVER_DATABASE_URI", "line_number": 22, "usage_type": "attribute" }, ...
4509215591
from __future__ import absolute_import, division, print_function import torch import torch.nn as nn from torch.autograd import Variable import os, sys, errno import argparse import time import numpy as np import cv2 import matplotlib.pyplot as plt from tqdm import tqdm from utils import post_process_depth, flip_lr f...
surajiitd/jetson-documentation
model_compression/pixelformer/test.py
test.py
py
13,368
python
en
code
0
github-code
36
[ { "api_name": "numpy.min", "line_number": 33, "usage_type": "call" }, { "api_name": "numpy.max", "line_number": 34, "usage_type": "call" }, { "api_name": "numpy.mean", "line_number": 35, "usage_type": "call" }, { "api_name": "numpy.median", "line_number": 36, ...
20491810241
import re from django import template register = template.Library() @register.simple_tag(takes_context=True) def active(context, pattern): path = context['request'].path if re.search(pattern, path): return 'active' return ''
sirodoht/avocado-jobs
main/templatetags/app_filters.py
app_filters.py
py
248
python
en
code
1
github-code
36
[ { "api_name": "django.template.Library", "line_number": 5, "usage_type": "call" }, { "api_name": "django.template", "line_number": 5, "usage_type": "name" }, { "api_name": "re.search", "line_number": 10, "usage_type": "call" } ]
2808266661
from __future__ import absolute_import from __future__ import division from __future__ import print_function __version__ = "0.1.0" __author__ = "Abien Fred Agarap" import argparse from normalize_data import list_files import numpy as np import os import pandas as pd def csv_to_npy(csv_path, npy_path, npy_filename):...
AFAgarap/gru-svm
dataset/csv_to_npy.py
csv_to_npy.py
py
1,586
python
en
code
136
github-code
36
[ { "api_name": "normalize_data.list_files", "line_number": 16, "usage_type": "call" }, { "api_name": "pandas.DataFrame", "line_number": 18, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 21, "usage_type": "call" }, { "api_name": "numpy.arra...
10358623287
import asyncio import io import pickle import discord from pgbot import common # Store "name: pickled data" pairs as cache. Do not store unpickled data db_obj_cache: dict[str, bytes] = {} # Optimisation: store per-db bool on whether it got updated or not db_changed: dict[str, bool] = {} # store per-resource lock d...
gresm/PygameCommunityBot
pgbot/db.py
db.py
py
3,779
python
en
code
null
github-code
36
[ { "api_name": "asyncio.Lock", "line_number": 16, "usage_type": "attribute" }, { "api_name": "pgbot.common.TEST_MODE", "line_number": 29, "usage_type": "attribute" }, { "api_name": "pgbot.common", "line_number": 29, "usage_type": "name" }, { "api_name": "pgbot.comm...
6249836683
from trytond.model import fields from trytond.pool import PoolMeta from trytond.i18n import gettext from trytond.exceptions import UserError __all__ = ['BOMInput'] class BOMInput(metaclass=PoolMeta): __name__ = 'production.bom.input' use_lot = fields.Boolean('Use Lot') @classmethod def validate(cls,...
NaN-tic/trytond-production_output_lot
bom.py
bom.py
py
736
python
en
code
0
github-code
36
[ { "api_name": "trytond.pool.PoolMeta", "line_number": 9, "usage_type": "name" }, { "api_name": "trytond.model.fields.Boolean", "line_number": 11, "usage_type": "call" }, { "api_name": "trytond.model.fields", "line_number": 11, "usage_type": "name" }, { "api_name":...
35026404794
from google.api_core import retry from loguru import logger from pkg.utils.mongo_utils import get_db from pkg.project.validate import validate from bson.objectid import ObjectId @logger.catch def delete_project(request): db = get_db() request_data = request.json logger.debug(request_data["_id"]...
rayjan0114/infra
gcp/main/gcpFunction/functions/pkg/project/delete_project.py
delete_project.py
py
757
python
en
code
1
github-code
36
[ { "api_name": "pkg.utils.mongo_utils.get_db", "line_number": 10, "usage_type": "call" }, { "api_name": "loguru.logger.debug", "line_number": 12, "usage_type": "call" }, { "api_name": "loguru.logger", "line_number": 12, "usage_type": "name" }, { "api_name": "pkg.pr...
18631976524
import numpy as np from sklearn.preprocessing import StandardScaler from sklearn.metrics import precision_score, recall_score from scipy.stats import norm import plotly.graph_objects as go from libs.Models.ModelParent import ModelParent import itertools class STD(ModelParent): def __init__(self, trainX: np.arra...
xorbey/CATS_public
libs/Models/Anomaly/STD.py
STD.py
py
5,909
python
en
code
0
github-code
36
[ { "api_name": "libs.Models.ModelParent.ModelParent", "line_number": 12, "usage_type": "name" }, { "api_name": "numpy.array", "line_number": 13, "usage_type": "attribute" }, { "api_name": "numpy.asarray", "line_number": 50, "usage_type": "call" }, { "api_name": "sk...
41748486239
from flask import Flask, request, jsonify import producer as p import time import metricas as m app = Flask(__name__) @app.route('/', methods=['POST']) def index(): if request.method == 'POST': data = request.form tiempo_inicio = time.time() # Registrar el tiempo de inicio m.tiem...
cesarlmt27/CIT2011
tarea2/inscripcion/api.py
api.py
py
1,077
python
es
code
0
github-code
36
[ { "api_name": "flask.Flask", "line_number": 6, "usage_type": "call" }, { "api_name": "flask.request.method", "line_number": 11, "usage_type": "attribute" }, { "api_name": "flask.request", "line_number": 11, "usage_type": "name" }, { "api_name": "flask.request.form...
40892463582
import io from datetime import datetime import cv2 from django.http import FileResponse from pdf2image import convert_from_bytes from PIL import Image from rest_framework import mixins, permissions, viewsets from rest_framework.decorators import (action, api_view, authentication_...
pierrotlemekcho/exaged
sifapi/planning/views.py
views.py
py
8,175
python
en
code
0
github-code
36
[ { "api_name": "rest_framework.response.Response", "line_number": 39, "usage_type": "call" }, { "api_name": "rest_framework.decorators.api_view", "line_number": 31, "usage_type": "call" }, { "api_name": "rest_framework.decorators.permission_classes", "line_number": 32, "us...
43507385682
# MODULE IMPORTS # Flask modules from flask import Flask, render_template, request, url_for, request, redirect, abort from flask_login import LoginManager, login_user, logout_user, login_required, current_user from flask_talisman import Talisman from flask_pymongo import PyMongo from flask_bcrypt import Bcrypt from fl...
chriswilson1982/flask-mongo-app
run.py
run.py
py
10,514
python
en
code
20
github-code
36
[ { "api_name": "flask.Flask", "line_number": 28, "usage_type": "call" }, { "api_name": "configparser.ConfigParser", "line_number": 31, "usage_type": "call" }, { "api_name": "os.environ.get", "line_number": 35, "usage_type": "call" }, { "api_name": "os.environ", ...
24108741135
# Generating images of handwritten digits using a Deep Convolutional Generative Adversarial Network import numpy as np import tensorflow as tf from tensorflow.layers import batch_normalization from tensorflow.keras.layers import UpSampling2D import matplotlib.pyplot as plt class DCGAN: def __init__...
ShankulShukla/Generative-Modeling
DC-GAN.py
DC-GAN.py
py
7,046
python
en
code
0
github-code
36
[ { "api_name": "tensorflow.variable_scope", "line_number": 21, "usage_type": "call" }, { "api_name": "tensorflow.Variable", "line_number": 22, "usage_type": "call" }, { "api_name": "tensorflow.random_normal", "line_number": 22, "usage_type": "call" }, { "api_name":...
31045215488
import os import logging import boto3 import json import io import pandas as pd logger = logging.getLogger() logger.setLevel(logging.INFO) s3 = boto3.client("s3") iam = boto3.client("iam") personalizeRt = boto3.client("personalize-runtime") solution_arn = os.environ["SOLUTION_ARN"] campaign_arn = os.environ["CAMPAIG...
ryankarlos/AWS-ML-services
lambdas/realtimepersonalize/lambda_function.py
lambda_function.py
py
2,097
python
en
code
1
github-code
36
[ { "api_name": "logging.getLogger", "line_number": 9, "usage_type": "call" }, { "api_name": "logging.INFO", "line_number": 10, "usage_type": "attribute" }, { "api_name": "boto3.client", "line_number": 11, "usage_type": "call" }, { "api_name": "boto3.client", "l...
44292327781
from collections import namedtuple import hashlib from itertools import product from typing import TYPE_CHECKING, Optional import uuid import pytest from pynenc import Pynenc from pynenc.broker.base_broker import BaseBroker from pynenc.orchestrator.base_orchestrator import BaseOrchestrator from pynenc.runner.base_run...
pynenc/pynenc
tests/integration/apps/mem_combinations/conftest.py
conftest.py
py
4,473
python
en
code
1
github-code
36
[ { "api_name": "typing.TYPE_CHECKING", "line_number": 17, "usage_type": "name" }, { "api_name": "collections.namedtuple", "line_number": 23, "usage_type": "call" }, { "api_name": "typing.Optional", "line_number": 46, "usage_type": "name" }, { "api_name": "itertools...
42504873893
import random as rnd import matplotlib.pyplot as plt from matplotlib.ticker import MultipleLocator p_show = lambda x: rnd.uniform(0.907, 0.968) def show_up(p): if rnd.random() <= p: return True return False def flight(num_tix, tix_price, comp_cost, capacity): p = p_show(0) shows = sum([1 fo...
behtashgolshani/Monte-Carlo-simulation-airline-overbooking
simulation.py
simulation.py
py
1,991
python
en
code
0
github-code
36
[ { "api_name": "random.uniform", "line_number": 5, "usage_type": "call" }, { "api_name": "random.random", "line_number": 9, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.subplots", "line_number": 50, "usage_type": "call" }, { "api_name": "matplotlib.pypl...
72734245545
from neo4j import GraphDatabase from lxml import etree, objectify import mwparserfromhell import spacy import re import sys import math import enchant import argparse """ The interface to the Neo4J database. """ class Neo4JInterface: def __init__(self, uri, user, password): self.driver = GraphDatabase.dri...
arrivance/wiki-to-neo4j
wiki4j.py
wiki4j.py
py
10,651
python
en
code
0
github-code
36
[ { "api_name": "neo4j.GraphDatabase.driver", "line_number": 16, "usage_type": "call" }, { "api_name": "neo4j.GraphDatabase", "line_number": 16, "usage_type": "name" }, { "api_name": "mwparserfromhell.parse", "line_number": 63, "usage_type": "call" }, { "api_name": ...
13938469838
from analysers.WarningAnalyser import WarningAnalyser from auto_editor.StructuredProjectSource_Recommendation import StructuredProjectSource_Recommendation from enums import RecommendationItem from typing import List class WarningRecommendationAnalyser(WarningAnalyser): """ Basically, the same as the pre-anal...
UCL-oneAPI/CTA-oneAPI
analysers/WarningRecommendationAnalyser.py
WarningRecommendationAnalyser.py
py
2,371
python
en
code
3
github-code
36
[ { "api_name": "analysers.WarningAnalyser.WarningAnalyser", "line_number": 7, "usage_type": "name" }, { "api_name": "auto_editor.StructuredProjectSource_Recommendation.StructuredProjectSource_Recommendation", "line_number": 24, "usage_type": "call" }, { "api_name": "enums.Recommen...
23363352897
import torch import torch.nn as nn import math class GlobalReinitNet(nn.Module): def __init__(self): super(GlobalReinitNet, self).__init__() # Spatial transformer localization-network self.localization = nn.Sequential( nn.Conv2d(3, 8, kernel_size=5, stride=2, padding=0), ...
shaoxiaohu/Face_Alignment_DPR
networks/ReinitNet.py
ReinitNet.py
py
3,833
python
en
code
11
github-code
36
[ { "api_name": "torch.nn.Module", "line_number": 6, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 6, "usage_type": "name" }, { "api_name": "torch.nn.Sequential", "line_number": 10, "usage_type": "call" }, { "api_name": "torch.nn", "line_...
27337201293
from flask import Flask, render_template, redirect, request, session, url_for, send_file import sqlite3 from datetime import datetime, timedelta, date from werkzeug.security import check_password_hash, generate_password_hash from io import BytesIO import openpyxl as xl from openpyxl.styles import Font from os import pa...
weien0905/drcr
app.py
app.py
py
34,057
python
en
code
0
github-code
36
[ { "api_name": "flask.Flask", "line_number": 10, "usage_type": "call" }, { "api_name": "datetime.timedelta", "line_number": 13, "usage_type": "call" }, { "api_name": "os.path.dirname", "line_number": 15, "usage_type": "call" }, { "api_name": "os.path", "line_nu...
10062739523
from django.http import HttpResponse, JsonResponse from django.utils.decorators import method_decorator from django.views import View from django.views.decorators.csrf import csrf_exempt from rest_framework.parsers import JSONParser, FormParser,MultiPartParser from rest_framework.renderers import JSONRenderer, Browsabl...
hongdy-python/03drf
prapp/views.py
views.py
py
3,368
python
en
code
0
github-code
36
[ { "api_name": "django.http.HttpResponse", "line_number": 17, "usage_type": "call" }, { "api_name": "django.http.HttpResponse", "line_number": 20, "usage_type": "call" }, { "api_name": "django.http.HttpResponse", "line_number": 23, "usage_type": "call" }, { "api_na...
24458145308
import time import os import requests from sense_hat import SenseHat updateInterval = 300 # update once every 5 minutes writeAPIkey = 'OY8DUS7XDPAU2KTT' # write API key for the channel readAPIkey = 'TXI2BWJFGPTIVELP' # read API key for the channel channelID = '2003669' # channel ID def sensorData(): """Funct...
jycal/iot-temps-rpi
temps_monitor.py
temps_monitor.py
py
2,180
python
en
code
0
github-code
36
[ { "api_name": "sense_hat.SenseHat", "line_number": 14, "usage_type": "call" }, { "api_name": "os.popen", "line_number": 20, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 31, "usage_type": "call" }, { "api_name": "requests.post", "line_nu...
26428963144
import sys from flask import Flask, render_template, request, jsonify from clusterization import clusterize app = Flask(__name__) app.config["TEMPLATES_AUTO_RELOAD"] = True app.config['SEND_FILE_MAX_AGE_DEFAULT'] = 0 @app.route("/test-action", methods=["POST", "GET"]) def test_btn_handle(): data = request.get_j...
alt2019/SRW-visualization
flask-proj/app-python-mcs.py
app-python-mcs.py
py
1,187
python
en
code
0
github-code
36
[ { "api_name": "flask.Flask", "line_number": 6, "usage_type": "call" }, { "api_name": "flask.request.get_json", "line_number": 13, "usage_type": "call" }, { "api_name": "flask.request", "line_number": 13, "usage_type": "name" }, { "api_name": "clusterization.cluste...
29984268730
import cv2 import torch from .flowers_dataset import FlowersDataset import warnings warnings.filterwarnings("ignore") def prepare_data_for_model(path_to_image, transform=None, use_descriptors_as_features=False, features_type='hog'): image = cv2.imread(path_to_image) image = cv2.cvtColor(image, cv2.COLOR_BGR2...
kryvokhyzha/azure-ml-courses
flowers-azure-ml/src/datasets/__init__.py
__init__.py
py
943
python
en
code
0
github-code
36
[ { "api_name": "warnings.filterwarnings", "line_number": 6, "usage_type": "call" }, { "api_name": "cv2.imread", "line_number": 10, "usage_type": "call" }, { "api_name": "cv2.cvtColor", "line_number": 11, "usage_type": "call" }, { "api_name": "cv2.COLOR_BGR2RGB", ...
28918133028
#!/usr/bin/env python import piexif # need to install by pip install piexif import exifread # need to install by pip install exifread from fractions import Fraction import datetime import time # Class used to change image EXIF Data def set_gps_location(file_name, lat, lng, altitude): """Adds GPS position as E...
ronakbhag/ids_coordinates_setter
scripts/image_editor.py
image_editor.py
py
3,027
python
en
code
0
github-code
36
[ { "api_name": "piexif.GPSIFD", "line_number": 30, "usage_type": "attribute" }, { "api_name": "piexif.GPSIFD", "line_number": 31, "usage_type": "attribute" }, { "api_name": "piexif.GPSIFD", "line_number": 32, "usage_type": "attribute" }, { "api_name": "piexif.GPSIF...
23395076072
import argparse import datetime import hashlib import logging import shutil import os import tempfile import time import requests from stoq import Stoq, RequestMeta from malwaretl_stoq_transformer import transformer from malware_collector import MalwareCollector logger = logging.getLogger(__name__) logger.setLevel...
g-clef/malware_collector
URLHausSource.py
URLHausSource.py
py
5,247
python
en
code
1
github-code
36
[ { "api_name": "logging.getLogger", "line_number": 18, "usage_type": "call" }, { "api_name": "logging.INFO", "line_number": 19, "usage_type": "attribute" }, { "api_name": "malware_collector.MalwareCollector", "line_number": 22, "usage_type": "name" }, { "api_name":...
16140915477
import typing import time import sys import logging import itertools import numpy as np from scipy.spatial import distance as sp_dist import pyautogui as pg import actionplanner as planner # pylint: disable=too-few-public-methods class MouseClicker(planner.MouseClicker): def __init__(self, bdetector): "...
kkew3/sat-minesweeper
virtual/actionplanner.py
actionplanner.py
py
4,350
python
en
code
6
github-code
36
[ { "api_name": "actionplanner.MouseClicker", "line_number": 15, "usage_type": "attribute" }, { "api_name": "typing.Tuple", "line_number": 22, "usage_type": "attribute" }, { "api_name": "time.sleep", "line_number": 27, "usage_type": "call" }, { "api_name": "pyautogu...
6791618821
from rest_framework import serializers from ...models import ServiceRequest class ServiceRequestSerializer(serializers.ModelSerializer): name = serializers.CharField(required=True) email = serializers.EmailField(required=True) class Meta: model = ServiceRequest fields = [ 'na...
tomasgarzon/exo-services
service-exo-core/marketplace/api/serializers/service_request.py
service_request.py
py
646
python
en
code
0
github-code
36
[ { "api_name": "rest_framework.serializers.ModelSerializer", "line_number": 6, "usage_type": "attribute" }, { "api_name": "rest_framework.serializers", "line_number": 6, "usage_type": "name" }, { "api_name": "rest_framework.serializers.CharField", "line_number": 7, "usage_...
7132570944
### Retrieve only the pieces of document chunks that are relevant to the query because context window of LLMs is limited. ### Different ways to split the documents : #### Characters, tokens, context aware splitting such Markdown header splitter. ### Parameter needed to be tuned : separated, chunk size, chunk overlap,...
kn-neeraj/NotionKnowledgeAssistant
document_chunks.py
document_chunks.py
py
1,879
python
en
code
0
github-code
36
[ { "api_name": "langchain.text_splitter.MarkdownTextSplitter", "line_number": 14, "usage_type": "call" }, { "api_name": "langchain.text_splitter.CharacterTextSplitter", "line_number": 23, "usage_type": "call" }, { "api_name": "langchain.text_splitter.RecursiveCharacterTextSplitter...
40145189651
from pyface.qt.QtGui import QLineEdit, QGroupBox, QHBoxLayout, QVBoxLayout from pyface.qt.QtGui import QWidget class AtomPropertiesWidget(QWidget): """ This widget modifies properties of a specific atom """ def __init__(self, parent=None): super(AtomPropertiesWidget, self).__init__(parent) ...
aloschilov/simple-game-engine
engine_configurator/atom_properties_widget.py
atom_properties_widget.py
py
1,589
python
en
code
0
github-code
36
[ { "api_name": "pyface.qt.QtGui.QWidget", "line_number": 5, "usage_type": "name" }, { "api_name": "pyface.qt.QtGui.QLineEdit", "line_number": 14, "usage_type": "call" }, { "api_name": "pyface.qt.QtGui.QGroupBox", "line_number": 15, "usage_type": "call" }, { "api_na...
71488499305
import matplotlib.pyplot as plt import numpy as np from matplotlib import animation from matplotlib.widgets import Slider, Button def dft(x): N = x.__len__() print(f'there will be {N} circles') X = np.array([]) for k in range(N): re, im = 0, 0 for n in range(N): phi = (np.p...
chickysnail/fourier-transform-drawing
Fourier series.py
Fourier series.py
py
4,080
python
en
code
0
github-code
36
[ { "api_name": "numpy.array", "line_number": 10, "usage_type": "call" }, { "api_name": "numpy.pi", "line_number": 14, "usage_type": "attribute" }, { "api_name": "numpy.cos", "line_number": 15, "usage_type": "call" }, { "api_name": "numpy.sin", "line_number": 16...
16413121892
import subprocess import requests from flask import Flask, request, json from jproperties import Properties configs = Properties() with open('server.properties', 'rb') as config_file: configs.load(config_file) app = Flask(__name__) @app.route("/health") def healthCheck(): return "alive", 200 @app.route("/page",...
zarcha/pirate-pager
node/app.py
app.py
py
1,926
python
en
code
0
github-code
36
[ { "api_name": "jproperties.Properties", "line_number": 6, "usage_type": "call" }, { "api_name": "flask.Flask", "line_number": 10, "usage_type": "call" }, { "api_name": "flask.json.loads", "line_number": 18, "usage_type": "call" }, { "api_name": "flask.json", "...
11695999761
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time    : 2020/3/31 22:32 # @Author  : TanLHHH # @Site    : # @File    : 前程无忧_测试.py # @Software: PyCharm import requests from lxml import etree import csv import time import random import re fp = open('51job.csv', 'wt', newline='', encoding='utf-8', errors='ignore') ...
TanLHHHH/Spiders
测试文件夹/前程无忧_测试.py
前程无忧_测试.py
py
3,832
python
en
code
3
github-code
36
[ { "api_name": "csv.writer", "line_number": 18, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 27, "usage_type": "call" }, { "api_name": "lxml.etree.HTML", "line_number": 33, "usage_type": "call" }, { "api_name": "lxml.etree", "line_number...
165914696
import gym import numpy as np import random from time import sleep import matplotlib.pyplot as plt from scipy.special import entr from utils import clear,calculate_entropy,save_training_progress,early_stop import config import time import cv2 class Agent(): def __init__(self): clear() """Setup""" ...
Abdulhady-Feteiha/Information-Digital-Twin
Genesis-Taxi/Agent.py
Agent.py
py
8,004
python
en
code
2
github-code
36
[ { "api_name": "utils.clear", "line_number": 13, "usage_type": "call" }, { "api_name": "config.train_flag", "line_number": 16, "usage_type": "attribute" }, { "api_name": "config.env", "line_number": 18, "usage_type": "attribute" }, { "api_name": "config.env", "...
24846541046
#!/usr/bin/env python3 import os import numpy as np import matplotlib.pyplot as plt from matplotlib.patches import Rectangle, Circle from skimage.io import imread_collection, imshow from skimage.feature import canny from skimage.color import rgb2gray from skimage.transform import hough_circle, hough_circle_peaks def ...
eugenbobrov/vision-hack
vision.py
vision.py
py
2,580
python
en
code
0
github-code
36
[ { "api_name": "os.listdir", "line_number": 14, "usage_type": "call" }, { "api_name": "skimage.io.imread_collection", "line_number": 15, "usage_type": "call" }, { "api_name": "numpy.mean", "line_number": 17, "usage_type": "call" }, { "api_name": "numpy.std", "l...
33147614582
#!/usr/bin/env python3 # Author: Jan Demel (xdemel01@fit.vutbr.cz) # This script was made as a part of IPK course # Don't copy this please... # My API key: 419db25b1d35c32d9f83525f3bc9931c import socket import json import sys # Error codes ERROR_ARGS = -1 ERROR_SOCKET_CONNECTION = -2 ERROR_FORMAT_OUTPUT_DATA = -3 ...
hondem/FIT
ipk_proj_1/script.py
script.py
py
2,040
python
en
code
0
github-code
36
[ { "api_name": "sys.argv", "line_number": 22, "usage_type": "attribute" }, { "api_name": "sys.stderr", "line_number": 23, "usage_type": "attribute" }, { "api_name": "sys.exit", "line_number": 24, "usage_type": "call" }, { "api_name": "sys.argv", "line_number": ...
33541610808
#!/usr/bin/python import os import sys import subprocess import datetime import math try: # Change the next line if your config folder is not $HOME/.config config_directory = f"{os.environ['HOME']}/.config" # If $HOME isn't set, os.environ['HOME'] will cause an error except KeyError: print("The envi...
michaelskyba/kvrg-avg
main.py
main.py
py
21,826
python
en
code
0
github-code
36
[ { "api_name": "os.environ", "line_number": 11, "usage_type": "attribute" }, { "api_name": "sys.exit", "line_number": 20, "usage_type": "call" }, { "api_name": "os.path.isdir", "line_number": 23, "usage_type": "call" }, { "api_name": "os.path", "line_number": 2...
6482900973
import requests url = "https://www.caberj.com.br/wspls/WS005.apw" querystring = {"WSDL":""} payload = "" headers = { "cookie": "SESSIONID=36c9c80f7d7d823affe2b4d5d3522477", "Authorization": "Basic cmVzdHVzZXI6UEBzc3cwcmQyMDIz" } response = requests.request("GET", url, data=payload, headers=headers, params=q...
msullivancm/ProjetosComAte10LinhasDeCodigoPython
apiRestMosiaBkp/requestWS005.py
requestWS005.py
py
353
python
en
code
0
github-code
36
[ { "api_name": "requests.request", "line_number": 13, "usage_type": "call" } ]
37508516152
from flask import Blueprint, request from .connection import client import datetime now = datetime.datetime.utcnow() user_route = Blueprint('user_route', __name__) # Connect to collection db = client.swiper collection = db.users # Post/get route acceser @user_route.route('/', methods=['GET', 'POST']) def userCreate...
acedinstitute/swipingApi
routes/user.py
user.py
py
939
python
en
code
0
github-code
36
[ { "api_name": "datetime.datetime.utcnow", "line_number": 5, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 5, "usage_type": "attribute" }, { "api_name": "flask.Blueprint", "line_number": 7, "usage_type": "call" }, { "api_name": "connecti...
35676671945
""" *Element Shape* """ from dataclasses import dataclass from strism._geoshape import Pixel __all__ = ["ElementShape"] @dataclass class ElementShape: width: Pixel height: Pixel @classmethod def create( cls, width: int, height: int, ): return cls( ...
jedhsu/text
text/_shape/_shape.py
_shape.py
py
375
python
en
code
0
github-code
36
[ { "api_name": "strism._geoshape.Pixel", "line_number": 16, "usage_type": "name" }, { "api_name": "strism._geoshape.Pixel", "line_number": 17, "usage_type": "name" }, { "api_name": "strism._geoshape.Pixel", "line_number": 26, "usage_type": "call" }, { "api_name": "...
14566329358
from django.db import models, migrations import cover.models class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Image', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=Tr...
fnp/redakcja
src/cover/migrations/0001_initial.py
0001_initial.py
py
1,275
python
en
code
4
github-code
36
[ { "api_name": "django.db.migrations.Migration", "line_number": 5, "usage_type": "attribute" }, { "api_name": "django.db.migrations", "line_number": 5, "usage_type": "name" }, { "api_name": "django.db.migrations.CreateModel", "line_number": 11, "usage_type": "call" }, ...
27976899334
import tkinter as tk import tkinter.ttk as ttk from time import sleep from PIL import ImageTk, Image import sys import Initialise import Manual import Settings class Controls(): def __init__(self, background, initialise_panel, manual_panel, settings_panel, tileprint_panel, state): self.background = backg...
InfiniteAnswer/Robot_GUI_V2
Controls.py
Controls.py
py
4,308
python
en
code
0
github-code
36
[ { "api_name": "PIL.Image.open", "line_number": 33, "usage_type": "call" }, { "api_name": "PIL.Image", "line_number": 33, "usage_type": "name" }, { "api_name": "PIL.ImageTk.PhotoImage", "line_number": 34, "usage_type": "call" }, { "api_name": "PIL.ImageTk", "li...
2006853859
import json import datetime from . import db class View(db.Model): __tablename__ = 'devicer_views' view_key = db.Column(db.String(20), primary_key=True) view_name = db.Column(db.String) view_saved = db.Column(db.DateTime, default=datetime.datetime.now()) selecter_mode = db.C...
rleschuk/devicer
app/models.py
models.py
py
1,944
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": "attribute" }, { "api_name": "json.dumps", "line_number": 28, "usage_type": "call" }, { "api_name": "json.dumps", ...
15826823002
import logging import scipy.cluster.hierarchy as sch import sklearn.cluster as sc # to map the user labels # - user_input_df: pass in original user input dataframe, return changed user input dataframe # - sp2en: change Spanish to English def map_labels_sp2en(user_input_df): # Spanish words to English span_eng_...
e-mission/e-mission-server
emission/analysis/modelling/tour_model/label_processing.py
label_processing.py
py
6,913
python
en
code
22
github-code
36
[ { "api_name": "logging.debug", "line_number": 38, "usage_type": "call" }, { "api_name": "logging.debug", "line_number": 44, "usage_type": "call" }, { "api_name": "logging.info", "line_number": 46, "usage_type": "call" }, { "api_name": "scipy.cluster.hierarchy.link...
30372470703
from django.shortcuts import render,redirect # from .models import details from django.contrib import messages from django.contrib.auth.forms import AuthenticationForm from .forms import SignUpForm, UserName from django.contrib.auth import authenticate, login, logout from .models import FriendDetails import requests fr...
harithlaxman/CodeChef-Friends
main/views.py
views.py
py
4,773
python
en
code
0
github-code
36
[ { "api_name": "models.FriendDetails.objects.get", "line_number": 14, "usage_type": "call" }, { "api_name": "models.FriendDetails.objects", "line_number": 14, "usage_type": "attribute" }, { "api_name": "models.FriendDetails", "line_number": 14, "usage_type": "name" }, ...
6759362866
import pandas as pd import numpy as np import random,math from scipy.spatial import distance from mpl_toolkits.mplot3d import Axes3D import matplotlib.pyplot as plt import matplotlib.colors as mcolors from collections import defaultdict def plot_3d(res_datapoints,m,pdf): fig = plt.figure() ax = Axes3D(f...
swadtasnim/My-K-Means-Clustering
synthetic_data.py
synthetic_data.py
py
2,705
python
en
code
0
github-code
36
[ { "api_name": "matplotlib.pyplot.figure", "line_number": 18, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 18, "usage_type": "name" }, { "api_name": "mpl_toolkits.mplot3d.Axes3D", "line_number": 19, "usage_type": "call" }, { "api_name":...
33621622326
from models import QP from tqdm import tqdm import matplotlib.pyplot as plt import torch from torch import optim from torch.autograd import Variable import torch.nn.functional as F from copy import copy from random import shuffle, sample import numpy as np from IPython.core.debugger import set_trace import config impo...
jprothero/MetaQP
MetaQP.py
MetaQP.py
py
20,649
python
en
code
0
github-code
36
[ { "api_name": "numpy.seterr", "line_number": 18, "usage_type": "call" }, { "api_name": "torch.cuda.is_available", "line_number": 26, "usage_type": "call" }, { "api_name": "torch.cuda", "line_number": 26, "usage_type": "attribute" }, { "api_name": "utils.create_fol...
27235166738
# -*- coding: utf-8 -*- __author__ = "Michele Samorani" import pandas as pd import cplex import time import random TIME_LIMIT_SECONDS = 60 def build_scenarios(show_probs, max_scenarios,seed): """ Builds the scenarios :param show_probs: :type show_probs: list[float] :return: a list of (probability,...
samorani/Social-Justice-Appointment-Scheduling
src/stochastic.py
stochastic.py
py
6,965
python
en
code
0
github-code
36
[ { "api_name": "random.seed", "line_number": 17, "usage_type": "call" }, { "api_name": "itertools.product", "line_number": 21, "usage_type": "call" }, { "api_name": "random.uniform", "line_number": 33, "usage_type": "call" }, { "api_name": "time.time", "line_nu...
21120299087
from Sentence_Encoder.meta_response_encoder_fast import encode as response_encode import Utils.functions as utils import numpy as np import torch as T import copy def random_response(candidates, conversation_history, p=None): loop = 5 if p is None: response = random.choice(candidates) else: ...
JRC1995/Chatbot
ReRanker/rerank.py
rerank.py
py
3,529
python
en
code
79
github-code
36
[ { "api_name": "numpy.random.choice", "line_number": 14, "usage_type": "call" }, { "api_name": "numpy.random", "line_number": 14, "usage_type": "attribute" }, { "api_name": "numpy.random.choice", "line_number": 21, "usage_type": "call" }, { "api_name": "numpy.rando...
72314053544
import os from setuptools import find_packages, setup with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme: README = readme.read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='django-atlassian', ...
fluendo/django-atlassian
setup.py
setup.py
py
1,409
python
en
code
7
github-code
36
[ { "api_name": "os.path.join", "line_number": 4, "usage_type": "call" }, { "api_name": "os.path", "line_number": 4, "usage_type": "attribute" }, { "api_name": "os.path.dirname", "line_number": 4, "usage_type": "call" }, { "api_name": "os.chdir", "line_number": ...
28440391809
import glob import os import pickle import time from abc import ABC from pathlib import Path from typing import Tuple import numpy as np from smart_settings.param_classes import recursive_objectify from mbrl import allogger from mbrl.base_types import Controller, ForwardModel, Pretrainer from mbrl.controllers import ...
martius-lab/cee-us
mbrl/initialization.py
initialization.py
py
18,460
python
en
code
11
github-code
36
[ { "api_name": "mbrl.controllers.cem_memory.CEMDataProcessor", "line_number": 37, "usage_type": "name" }, { "api_name": "os.path.isabs", "line_number": 64, "usage_type": "call" }, { "api_name": "os.path", "line_number": 64, "usage_type": "attribute" }, { "api_name"...
32542351130
from google.cloud import storage from configparser import ConfigParser from google.oauth2 import service_account from googleapiclient.discovery import build from utils.demo_io import ( get_initial_slide_df_with_predictions_only, get_fovs_df, get_top_level_dirs, populate_slide_rows, get_histogram_df,...
alice-gottlieb/nautilus-dashboard
examples/gcs_example.py
gcs_example.py
py
1,919
python
en
code
0
github-code
36
[ { "api_name": "configparser.ConfigParser", "line_number": 17, "usage_type": "call" }, { "api_name": "gcsfs.GCSFileSystem", "line_number": 27, "usage_type": "call" }, { "api_name": "google.oauth2.service_account.Credentials.from_service_account_file", "line_number": 30, "u...
18794245329
from typing import Any import pytest from click.testing import CliRunner from happi.prompt import enforce_list, read_user_dict from happi.utils import EnforceError def test_user_dict(runner: CliRunner): default_dict = {'default_key': 'default_value'} # normal operation with runner.isolation('key1\nvalu...
pcdshub/happi
happi/tests/test_prompt.py
test_prompt.py
py
1,324
python
en
code
10
github-code
36
[ { "api_name": "click.testing.CliRunner", "line_number": 10, "usage_type": "name" }, { "api_name": "happi.prompt.read_user_dict", "line_number": 15, "usage_type": "call" }, { "api_name": "happi.prompt.read_user_dict", "line_number": 21, "usage_type": "call" }, { "a...
10343389752
from PyPDF2 import PdfFileWriter, PdfFileReader,PdfFileMerger import os import glob import time def remove_blank(): files = os.listdir('temp') print(len(files)) for i in range(len(files)): input_pdf = PdfFileReader(open(f"temp/temp{i}.pdf", "rb")) output_pdf = PdfFileWriter() output...
neel-jotaniya/product_detail
pdf.py
pdf.py
py
1,080
python
en
code
0
github-code
36
[ { "api_name": "os.listdir", "line_number": 7, "usage_type": "call" }, { "api_name": "PyPDF2.PdfFileReader", "line_number": 10, "usage_type": "call" }, { "api_name": "PyPDF2.PdfFileWriter", "line_number": 11, "usage_type": "call" }, { "api_name": "glob.glob", "...
7089966560
from bottle import redirect, request, post import uuid import jwt import time from check_if_logged_in import check_if_logged_in from global_values import * @post("/new-tweet") def new_tweet_post(): if not check_if_logged_in(): return redirect("/login") # title new_tweet_title = request.forms....
sara616b/01_mandatory_web_dev
new_tweet_post.py
new_tweet_post.py
py
1,355
python
en
code
0
github-code
36
[ { "api_name": "check_if_logged_in.check_if_logged_in", "line_number": 11, "usage_type": "call" }, { "api_name": "bottle.redirect", "line_number": 12, "usage_type": "call" }, { "api_name": "bottle.request.forms.get", "line_number": 15, "usage_type": "call" }, { "ap...
72871590183
import os import torch from torch.utils.data import Dataset import torchvision import data DEVICE = torch.device("cuda:0" if torch.cuda.is_available() else "cpu") PGT_LOAD_FILE = "pseudo_gt_thesis.pth" CLEAN_PGT_LOAD_FILE = "cleaned_pseudo_gt_thesis.pth" # img size: (200,400) class TabletopWorkDataset(Dataset): ...
LDenninger/se3_pseudo_ipdf
data/tabletop/pls_dataset.py
pls_dataset.py
py
4,837
python
en
code
0
github-code
36
[ { "api_name": "torch.device", "line_number": 8, "usage_type": "call" }, { "api_name": "torch.cuda.is_available", "line_number": 8, "usage_type": "call" }, { "api_name": "torch.cuda", "line_number": 8, "usage_type": "attribute" }, { "api_name": "torch.utils.data.Da...
19988594566
import bpy bl_info = { "name": "Apply Modifier", "author": "mate.sus304", "version": (1, 2), "blender": (2, 80, 0), "location": "View3D > Object > Apply", "description": "Apply All Modifier to Mesh Object", "warning": "", "wiki_url": "", "tracker_url": "", "website":"https://sit...
Taremin/ApplyModifier
__init__.py
__init__.py
py
7,817
python
en
code
29
github-code
36
[ { "api_name": "bpy.app", "line_number": 18, "usage_type": "attribute" }, { "api_name": "bpy.context", "line_number": 28, "usage_type": "attribute" }, { "api_name": "bpy.context", "line_number": 30, "usage_type": "attribute" }, { "api_name": "bpy.context", "lin...
6658450371
from django.contrib import admin from .models import User, Supplier class UserAdmin(admin.ModelAdmin): readonly_fields = ("last_login", "password", "phone_no", "email") list_display = ( "email", "first_name", "last_name", "is_active", "created_at", ) list_filter ...
Corestreamng/adzmart-supplier
adzmart-develop/apps/authentication/admin.py
admin.py
py
866
python
en
code
0
github-code
36
[ { "api_name": "django.contrib.admin.ModelAdmin", "line_number": 4, "usage_type": "attribute" }, { "api_name": "django.contrib.admin", "line_number": 4, "usage_type": "name" }, { "api_name": "django.contrib.admin.ModelAdmin", "line_number": 17, "usage_type": "attribute" ...
31033799131
import numpy as np import os, pickle import random import torch import torch.nn as nn from collections import deque from torch import Tensor from torch import tensor from time import time, sleep import src.model_greedy if torch.cuda.is_available(): cuda = torch.device('cuda') else: cuda = torch.device('cpu...
atakanyasar/hungry-geese
src/model.py
model.py
py
7,803
python
en
code
0
github-code
36
[ { "api_name": "torch.cuda.is_available", "line_number": 12, "usage_type": "call" }, { "api_name": "torch.cuda", "line_number": 12, "usage_type": "attribute" }, { "api_name": "torch.device", "line_number": 13, "usage_type": "call" }, { "api_name": "torch.device", ...
75127901544
from cravat.cravat_report import CravatReport import sys import datetime import re import pandas as pd import cravat import json import pyreadr import os class Reporter(CravatReport): def setup (self): self.filenames = [] self.filename = None self.filename_prefix = None if self.sav...
KarchinLab/open-cravat-modules-karchinlab
reporters/genesis_variant_groupingsreporter/genesis_variant_groupingsreporter.py
genesis_variant_groupingsreporter.py
py
55,376
python
en
code
1
github-code
36
[ { "api_name": "cravat.cravat_report.CravatReport", "line_number": 11, "usage_type": "name" }, { "api_name": "json.loads", "line_number": 74, "usage_type": "call" }, { "api_name": "cravat.get_wgs_reader", "line_number": 85, "usage_type": "call" }, { "api_name": "os...
19792929420
from sklearn.ensemble import RandomForestClassifier from scipy import signal import pandas as pd import numpy as np import statsmodels.api as sm from sklearn.preprocessing import MinMaxScaler from statsmodels.tsa.stattools import adfuller import pickle from io import BytesIO def classifier(data_set): with open('mo...
shyamsivasankar/TIME-SERIES-DATA
findClass.py
findClass.py
py
2,042
python
en
code
0
github-code
36
[ { "api_name": "pickle.load", "line_number": 13, "usage_type": "call" }, { "api_name": "pickle.load", "line_number": 15, "usage_type": "call" }, { "api_name": "pickle.load", "line_number": 17, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_numbe...
27734664933
import os, sys from http import HTTPStatus from fastapi import FastAPI from fastapi import Response from fastapi_sqlalchemy import DBSessionMiddleware from dotenv import load_dotenv from app.main.adapters import fast_api_adapter from app.domain.usecases import CreateUserParams, CreateUserResponse from app.main.factori...
victoroliveirabarros/fastapi-sql
app/main/main.py
main.py
py
1,309
python
en
code
1
github-code
36
[ { "api_name": "os.path.dirname", "line_number": 14, "usage_type": "call" }, { "api_name": "os.path", "line_number": 14, "usage_type": "attribute" }, { "api_name": "os.path.abspath", "line_number": 14, "usage_type": "call" }, { "api_name": "dotenv.load_dotenv", ...
27239521850
# youtube/youtube_api.py import google.auth from google.auth.transport.requests import AuthorizedSession from google.oauth2.credentials import Credentials from googleapiclient.discovery import build from config.config import YOUTUBE_API_KEY class YoutubeAPI: def __init__(self): self.credentials = None ...
eddari-me/youtube_shorts_to_instagram
youtube/youtube_api.py
youtube_api.py
py
1,136
python
en
code
0
github-code
36
[ { "api_name": "google.auth.auth.default", "line_number": 17, "usage_type": "call" }, { "api_name": "google.auth.auth", "line_number": 17, "usage_type": "attribute" }, { "api_name": "google.auth", "line_number": 17, "usage_type": "name" }, { "api_name": "googleapic...
36998634880
from django.shortcuts import render from django.http.response import JsonResponse from rest_framework.parsers import JSONParser from rest_framework import status from api.models import SunExposure from api.serializers import SunExposureSerializer from rest_framework.decorators import api_view # Create your views her...
ejustis/garden-tracker-api
api/views.py
views.py
py
2,265
python
en
code
0
github-code
36
[ { "api_name": "api.models.SunExposure.objects.all", "line_number": 15, "usage_type": "call" }, { "api_name": "api.models.SunExposure.objects", "line_number": 15, "usage_type": "attribute" }, { "api_name": "api.models.SunExposure", "line_number": 15, "usage_type": "name" ...
26454125237
import argparse import gc import logging import os import glob import pandas as pd import sys sys.path.append("../ddn/") sys.path.append("./") from collections import defaultdict import torch import warnings warnings.filterwarnings('ignore') import numpy as np torch.backends.cudnn.benchmark = True from matplotlib ...
Vikr-182/ddn-forecasting
scripts/data_prep.py
data_prep.py
py
9,023
python
en
code
0
github-code
36
[ { "api_name": "sys.path.append", "line_number": 9, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 9, "usage_type": "attribute" }, { "api_name": "sys.path.append", "line_number": 10, "usage_type": "call" }, { "api_name": "sys.path", "line_numb...
26116785786
from genericpath import samefile import torch # import mmcv # from mmseg.apis import init_segmentor#, inference_segmentor, init_cfg # from mmseg.models import build_segmentor # from mmcv import ConfigDict import torchvision # from SETR.transformer_seg import SETRModel, Vit import segmentation_models_pytorch as smp d...
aya49/flowMagic_data
method/models.py
models.py
py
2,805
python
en
code
0
github-code
36
[ { "api_name": "torchvision.models.segmentation.deeplabv3_resnet50", "line_number": 14, "usage_type": "call" }, { "api_name": "torchvision.models", "line_number": 14, "usage_type": "attribute" }, { "api_name": "segmentation_models_pytorch.Unet", "line_number": 22, "usage_t...
12483249842
import cfgrib import xarray as xr import matplotlib.pyplot as plt import os import glob from pathlib import Path from tqdm import tqdm, tnrange import pandas as pd import math import shapely.wkt def get_csv_from_grib_files(grib_files: list) -> pd.DataFrame: """_summary_ Args: grib_files...
drivendataorg/nasa-airathon
pm25/3rd Place/src/preprocessing/gfs/gfs_prep_group_1.py
gfs_prep_group_1.py
py
3,731
python
en
code
12
github-code
36
[ { "api_name": "tqdm.tqdm", "line_number": 23, "usage_type": "call" }, { "api_name": "xarray.open_dataset", "line_number": 24, "usage_type": "call" }, { "api_name": "pandas.concat", "line_number": 29, "usage_type": "call" }, { "api_name": "pandas.DataFrame", "l...
25468573866
from mycroft import MycroftSkill, intent_file_handler import openai import os class Chatgpt(MycroftSkill): def __init__(self): MycroftSkill.__init__(self) openai.api_key = os.environ[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] # Set the API key @intent_file_handler('chatgpt.intent') ...
adamkalbouneh/chatgpt-skill
__init__.py
__init__.py
py
723
python
en
code
1
github-code
36
[ { "api_name": "mycroft.MycroftSkill", "line_number": 5, "usage_type": "name" }, { "api_name": "mycroft.MycroftSkill.__init__", "line_number": 7, "usage_type": "call" }, { "api_name": "mycroft.MycroftSkill", "line_number": 7, "usage_type": "name" }, { "api_name": "...
73202406184
from bokeh.models import ( HoverTool, Range1d, ColumnDataSource, BBoxTileSource, TapTool, ) from bokeh.plotting import figure from bokeh.layouts import row, column import bokeh.models as bokeh_models from bokeh.models.widgets import Div, RadioGroup, CheckboxGroup BOKEH_BACKGROUNDS = { "luchtfo...
d2hydro/hydrodashboards
src/hydrodashboards/bokeh/widgets/map_figure_widget.py
map_figure_widget.py
py
4,761
python
en
code
1
github-code
36
[ { "api_name": "bokeh.models", "line_number": 69, "usage_type": "argument" }, { "api_name": "bokeh.models.ColumnDataSource", "line_number": 74, "usage_type": "name" }, { "api_name": "bokeh.models.Range1d", "line_number": 80, "usage_type": "call" }, { "api_name": "b...
70943556903
from pyspark.sql import SparkSession from pyspark.streaming import StreamingContext from time import sleep spark = SparkSession.builder.appName('streaming').getOrCreate() sc = spark.sparkContext ssc = StreamingContext(sc, 1) ssc.checkpoint('/tmp') lines = ssc.socketTextStream('0.0.0.0', 301) words = lines.flatMap(lam...
bablookr/big-data-experiments
pyspark-experiments/streaming/stream.py
stream.py
py
522
python
en
code
0
github-code
36
[ { "api_name": "pyspark.sql.SparkSession.builder.appName", "line_number": 5, "usage_type": "call" }, { "api_name": "pyspark.sql.SparkSession.builder", "line_number": 5, "usage_type": "attribute" }, { "api_name": "pyspark.sql.SparkSession", "line_number": 5, "usage_type": "...
73388984743
"""Plot Stream PGM.""" import sys import daft import matplotlib.pyplot as plt from showyourwork.paths import user as user_paths paths = user_paths() # Add the parent directory to the path sys.path.append(paths.scripts.parent.as_posix()) # isort: split # Matplotlib style plt.style.use(paths.scripts / "paper.mplsty...
nstarman/stellar_stream_density_ml_paper
src/scripts/pgm.py
pgm.py
py
5,422
python
en
code
0
github-code
36
[ { "api_name": "showyourwork.paths.user", "line_number": 9, "usage_type": "call" }, { "api_name": "sys.path.append", "line_number": 12, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 12, "usage_type": "attribute" }, { "api_name": "matplotlib.pyplo...
25053087228
# Std Libs: import logging # Django Libs: from django.contrib.auth.models import User # Django Rest Framework Libs: from rest_framework import viewsets from rest_framework.response import Response from rest_framework import status # Locals: from .models import Client from .permissions import ClientPermissions from .ser...
Emericdefay/OCR_P12
CRM/client/views.py
views.py
py
7,612
python
en
code
0
github-code
36
[ { "api_name": "logging.getLogger", "line_number": 16, "usage_type": "call" }, { "api_name": "rest_framework.viewsets.ViewSet", "line_number": 19, "usage_type": "attribute" }, { "api_name": "rest_framework.viewsets", "line_number": 19, "usage_type": "name" }, { "ap...
2318482284
import torch import math import numpy as np import os import cv2 import imutils import random import shutil from slim_net import FaceQualityNet, FaceQualitySlim from myconfig import config as testconf from load_data import pytorch_to_dpcoreParams, save_feature_channel, get_patches, get_patches_augment from detector.c...
xinyunmian/Face_compliance_detection
face_quality/train/test_quality.py
test_quality.py
py
19,759
python
en
code
0
github-code
36
[ { "api_name": "numpy.zeros", "line_number": 46, "usage_type": "call" }, { "api_name": "numpy.int32", "line_number": 46, "usage_type": "attribute" }, { "api_name": "cv2.resize", "line_number": 65, "usage_type": "call" }, { "api_name": "myconfig.config.img_width", ...
42873043264
"""Class definition and associated functions for requesting data from IUCN Red List. Run as a script it downloads the latest Red List. You need an API token to use it, available from http://apiv3.iucnredlist.org/api/v3/token. """ import requests import requests_cache import csv import datetime import time from argpa...
barnabywalker/threatened_species_classification_comparison
scripts/redlist_api.py
redlist_api.py
py
8,897
python
en
code
1
github-code
36
[ { "api_name": "requests.get", "line_number": 23, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 30, "usage_type": "call" }, { "api_name": "time.sleep", "line_number": 47, "usage_type": "call" }, { "api_name": "requests_cache.install_cache", ...
43508300282
""" """ import sys from pathlib import Path print(Path(__file__).resolve().parents[1]) sys.path.append(Path(__file__).resolve().parents[1]) if __name__ == '__main__' and __package__ is None: __package__ = 'kurosc' # # from lib.plotformat import setup import numpy as np np.set_printoptions(precision=2, suppress=Tr...
chriswilly/kuramoto-osc
Python/kurosc/kurosc/unit_test.py
unit_test.py
py
6,957
python
en
code
2
github-code
36
[ { "api_name": "pathlib.Path", "line_number": 5, "usage_type": "call" }, { "api_name": "sys.path.append", "line_number": 6, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 6, "usage_type": "attribute" }, { "api_name": "pathlib.Path", "line_numb...
150778063
from django.urls import path from django.contrib import admin from django.urls import include #Add URL maps to redirect the base URL to our application from django.views.generic import RedirectView from . import views urlpatterns = [ path('start/', views.StartPlay.as_view(), name='start-play'), path('start/<i...
edbranson/scorekeeping
scorekeeping/score/urls.py
urls.py
py
1,095
python
en
code
0
github-code
36
[ { "api_name": "django.urls.path", "line_number": 10, "usage_type": "call" }, { "api_name": "django.urls.path", "line_number": 11, "usage_type": "call" }, { "api_name": "django.urls.path", "line_number": 12, "usage_type": "call" }, { "api_name": "django.urls.path",...
29719085837
from collections import defaultdict def cast(val, regs): """if int return int else return char""" try: return int(val) except ValueError as ve: return regs[val] def run_cmd(line, regs, idx): """run a command""" try: cmd, x, y = line.split() except ValueError as ve: ...
yknot/adventOfCode
2017/23_01.py
23_01.py
py
1,138
python
en
code
0
github-code
36
[ { "api_name": "collections.defaultdict", "line_number": 37, "usage_type": "call" } ]
26614333632
import enum import jsonpatch import jam from jam import O from jam import Q from jam import exceptions from jam.schemas import load_schema from jam.backends.util import load_backend class Operation(enum.IntEnum): CREATE = 0 UPDATE = 1 REPLACE = 2 DELETE = 3 SNAPSHOT = 4 RENAME = 5 class Re...
CenterForOpenScience/jamdb
jam/base.py
base.py
py
8,174
python
en
code
3
github-code
36
[ { "api_name": "enum.IntEnum", "line_number": 13, "usage_type": "attribute" }, { "api_name": "jam.schemas.load_schema", "line_number": 33, "usage_type": "call" }, { "api_name": "jam.Storage", "line_number": 38, "usage_type": "call" }, { "api_name": "jam.backends.ut...
74224410343
import datetime import logging import numpy as np import os import skimage.io as io from skimage.exposure import equalize_adapthist from skimage.filters import gaussian from skimage.transform import resize from skimage.color import rgb2lab from src.data_loader import root_dir, FOLDER_EXPERIMENTS, references_paths, re...
AntoineRouland/ki67
src/v8_test/optimization.py
optimization.py
py
7,179
python
en
code
1
github-code
36
[ { "api_name": "src.v8_test.segmentation.segmentation", "line_number": 34, "usage_type": "call" }, { "api_name": "src.v8_test.segmentation.segmentation", "line_number": 39, "usage_type": "call" }, { "api_name": "src.v8_test.segmentation.segmentation", "line_number": 44, "u...
9788698464
from langchain.document_loaders import TextLoader from langchain.text_splitter import CharacterTextSplitter from langchain.embeddings.openai import OpenAIEmbeddings from langchain.vectorstores import Pinecone from langchain import VectorDBQA, OpenAI from langchain.chains import RetrievalQA import pinecone import os ...
ellizzabbetth/intro-into-vector-db
main.py
main.py
py
1,279
python
en
code
0
github-code
36
[ { "api_name": "os.environ", "line_number": 12, "usage_type": "attribute" }, { "api_name": "pinecone.init", "line_number": 13, "usage_type": "call" }, { "api_name": "os.environ", "line_number": 14, "usage_type": "attribute" }, { "api_name": "os.environ", "line_...
73403061863
#!/usr/bin/env python # _*_ coding: utf-8 _*_ # @Time : 2023/1/13 22:03 # @Author : Rongrui Zhan # @desc : 本代码未经授权禁止商用 import os.path import flet from pdf2image.exceptions import PDFPageCountError from bonecommand import all_commands from bonecommand.utils import user_path from bonecommand.pdf.utils import convert_pd...
zrr1999/BoneCommand
bonecommand/gui.py
gui.py
py
1,605
python
en
code
0
github-code
36
[ { "api_name": "flet.Page", "line_number": 16, "usage_type": "attribute" }, { "api_name": "flet.MainAxisAlignment", "line_number": 18, "usage_type": "attribute" }, { "api_name": "flet.Row", "line_number": 20, "usage_type": "call" }, { "api_name": "flet.MainAxisAlig...
17172274930
import asyncio import json import discord import requests from discord.ext import commands from config.functional_config import check_channels, failure, FAILURE_COLOR, HEADERS, accept, loading, \ SUCCESS_COLOR, GENERAL_COLOR from config.online_config import server, URL_carta async def checking(ctx, server_name)...
YarSav1/ForMCObot
cogs/for_all/minecraft/tasks_minecraft/check/check_serv.py
check_serv.py
py
3,423
python
en
code
0
github-code
36
[ { "api_name": "discord.Embed", "line_number": 14, "usage_type": "call" }, { "api_name": "config.functional_config.GENERAL_COLOR", "line_number": 14, "usage_type": "name" }, { "api_name": "config.online_config.URL_carta", "line_number": 17, "usage_type": "name" }, { ...
34517047847
import snap7 from snap7.util import * from snap7.snap7types import * s7 = snap7.client.Client() s7.connect('192.168.14.45', 0, 1) data = s7.db_read(1, 0, 4) value = get_real(data, 0) print(value) data = bytearray(5) set_real(data,0, -0.0177002) data = data[:-1] print(data) s7.db_write(1, 0, data)
AndreasScharf/IotAdapter
sonstiges/s7setvalue.py
s7setvalue.py
py
300
python
en
code
0
github-code
36
[ { "api_name": "snap7.client.Client", "line_number": 4, "usage_type": "call" }, { "api_name": "snap7.client", "line_number": 4, "usage_type": "attribute" } ]
30178594395
from matplotlib import pyplot as plt from PIL.Image import frombytes import cv2 import numpy as np from traceback import print_exc ''' Toolkit for image process with the method from cv2,plt,np 个人工具包,对一些需要调用多次函数的 过程打包,主要用于图像的处理和输出, 使用的库为cv2,matplotlib,PIL,numpy ''' class count_show(object): def ...
wmillers/coursewarePhotoProcess
toolkit.py
toolkit.py
py
12,134
python
en
code
0
github-code
36
[ { "api_name": "traceback.print_exc", "line_number": 57, "usage_type": "call" }, { "api_name": "cv2.imshow", "line_number": 128, "usage_type": "call" }, { "api_name": "cv2.imshow", "line_number": 130, "usage_type": "call" }, { "api_name": "cv2.waitKey", "line_n...
6073108961
from traits.api import \ HasTraits, List, Array, Property, cached_property, \ Instance, Trait, Button, on_trait_change, \ Int, Float, DelegatesTo, provides, WeakRef, Bool from ibvpy.mesh.sdomain import \ SDomain # from ibvpy.view.plot3d.mayavi_util.pipelines import \ # MVPolyData, MVPointLabels im...
bmcs-group/bmcs_ibvpy
ibvpy/mesh/cell_grid/dof_grid.py
dof_grid.py
py
12,406
python
en
code
0
github-code
36
[ { "api_name": "ibvpy.mesh.sdomain.SDomain", "line_number": 22, "usage_type": "name" }, { "api_name": "traits.api.Instance", "line_number": 27, "usage_type": "call" }, { "api_name": "cell_grid.CellGrid", "line_number": 27, "usage_type": "argument" }, { "api_name": ...
9826643435
import uvicorn from fastapi import FastAPI, Response, Depends, Query from config import META_VERIFY_TOKEN, FASTAPI_HOST, FASTAPI_PORT from model import Event from example.api import get_weather_info, get_yelp_info, select_yelp_type, get_yelp_typeIdx from utils import event_parser, verify_payload from typing import List...
GaryHo34/SeattleBot
example/example.py
example.py
py
3,107
python
en
code
3
github-code
36
[ { "api_name": "fastapi.FastAPI", "line_number": 10, "usage_type": "call" }, { "api_name": "messenger.MessengerBot", "line_number": 11, "usage_type": "call" }, { "api_name": "fastapi.Query", "line_number": 16, "usage_type": "call" }, { "api_name": "fastapi.Query", ...
34240292583
import discord from discord.ext import commands import time intents = discord.Intents.all() bot = commands.Bot(command_prefix='!', intents=intents) @bot.event async def on_ready(): print("Başladı") @bot.command() async def send(ctx, *, args=None): if args != None: members = ctx.guild.members ...
omergoc/DiscordReklamBotu
app.py
app.py
py
600
python
en
code
2
github-code
36
[ { "api_name": "discord.Intents.all", "line_number": 5, "usage_type": "call" }, { "api_name": "discord.Intents", "line_number": 5, "usage_type": "attribute" }, { "api_name": "discord.ext.commands.Bot", "line_number": 7, "usage_type": "call" }, { "api_name": "discor...
9366051037
from sympy import symbols, Matrix, eye, sin, cos, pi, pprint, diff import math import sympy as sym import numpy as np import matplotlib.pyplot as plt from functools import partial from mpl_toolkits.mplot3d import axes3d, Axes3D Q1, Q2, Q3, Q4, Q5= symbols('coxa femur tibia pitch wheel') Joint_Angles = [Q1...
HarshShirsath/Robot-Modelling-Project-2-NASA-Athlete-Rover-
FK_athlete.py
FK_athlete.py
py
1,595
python
en
code
0
github-code
36
[ { "api_name": "sympy.symbols", "line_number": 11, "usage_type": "call" }, { "api_name": "functools.partial", "line_number": 14, "usage_type": "call" }, { "api_name": "sympy.pi", "line_number": 19, "usage_type": "name" }, { "api_name": "sympy.eye", "line_number...
5728396322
import json import os import uuid import asyncio from typing import MutableMapping from aio_pika import Message, connect from aio_pika.abc import ( AbstractChannel, AbstractConnection, AbstractIncomingMessage, AbstractQueue, ) class RpcClient: connection: AbstractConnection channel: AbstractCh...
PoteeDev/scenario-manager
manager/amqp.py
amqp.py
py
3,831
python
en
code
0
github-code
36
[ { "api_name": "aio_pika.abc.AbstractConnection", "line_number": 16, "usage_type": "name" }, { "api_name": "aio_pika.abc.AbstractChannel", "line_number": 17, "usage_type": "name" }, { "api_name": "aio_pika.abc.AbstractQueue", "line_number": 18, "usage_type": "name" }, ...
10954038644
# -*- coding: utf-8 -*- import wx from controlador import control_hilo class entrada ( wx.Frame ): def __init__( self, parent ): wx.Frame.__init__ ( self, None , id = wx.ID_ANY, title = wx.EmptyString, pos = wx.DefaultPosition, size = wx.Size( int(parent.resolucion[0]), int(parent.resolucion[1]) ), ...
scfouetsfalceon/Inamba
vista/terminal.py
terminal.py
py
2,194
python
en
code
0
github-code
36
[ { "api_name": "wx.Frame", "line_number": 6, "usage_type": "attribute" }, { "api_name": "wx.Frame.__init__", "line_number": 9, "usage_type": "call" }, { "api_name": "wx.Frame", "line_number": 9, "usage_type": "attribute" }, { "api_name": "wx.ID_ANY", "line_numb...
22011646889
from fgo.interops import * import random from functools import reduce from copy import copy def click(): return reduce(Compose, [ Wait(Range(0.15, 0.25)), Left(), Wait(Range(0.1, 0.2)), Left(), Wait(Range(0.3, 0.5)) ]) def fix_dpi(origin: Event) -> Event: @origin....
thautwarm/do-you-like-wan-you-si
fgo/common.py
common.py
py
560
python
en
code
11
github-code
36
[ { "api_name": "functools.reduce", "line_number": 8, "usage_type": "call" }, { "api_name": "copy.copy", "line_number": 21, "usage_type": "call" } ]
35815306473
from pathlib import Path import sys import numpy as np from collections import defaultdict import torch from torch.utils.tensorboard import SummaryWriter from rl_envs.grid_world_env import GridWorldEnv from ReplayMemory import * def print_actions(agent, env, get_optimal = False): with torch.no_grad(): act...
zhilu1/rl_practice
perform_deep_learning.py
perform_deep_learning.py
py
3,939
python
en
code
0
github-code
36
[ { "api_name": "torch.no_grad", "line_number": 12, "usage_type": "call" }, { "api_name": "torch.tensor", "line_number": 17, "usage_type": "call" }, { "api_name": "torch.float", "line_number": 17, "usage_type": "attribute" }, { "api_name": "torch.no_grad", "line...
938498832
import torch import torch.nn as nn import torch.nn.functional as F class GRUEncoder(nn.Module): def __init__(self, config, gpu_list, *args, **params): super(GRUEncoder, self).__init__() self.hidden_size = config.getint("model", "hidden_size") self.bi = config.getboolean("model", "bi_direc...
china-ai-law-challenge/CAIL2020
sfks/baseline/model/encoder/GRUEncoder.py
GRUEncoder.py
py
802
python
en
code
150
github-code
36
[ { "api_name": "torch.nn.Module", "line_number": 6, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 6, "usage_type": "name" }, { "api_name": "torch.nn.GRU", "line_number": 17, "usage_type": "call" }, { "api_name": "torch.nn", "line_number"...
10697052181
# -*- coding: utf-8 -*- ''' This code is the implementation of two-phase level set for the following paper: T. F. Chan and L. A. Vese, "Active contours without edges," in IEEE Transactions on Image Processing, vol. 10, no. 2, pp. 266-277, Feb. 2001, doi: 10.1109/83.902291. Note: level set initialization and parameters...
zzhenggit/level_set_collections
Chan_Vese_model/demo.py
demo.py
py
1,079
python
en
code
1
github-code
36
[ { "api_name": "skimage.io.imread", "line_number": 17, "usage_type": "call" }, { "api_name": "skimage.transform.resize", "line_number": 18, "usage_type": "call" }, { "api_name": "numpy.interp", "line_number": 19, "usage_type": "call" }, { "api_name": "numpy.min", ...