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
26251368717
import time import os import logging from urllib.parse import urlparse from urllib.request import urlretrieve import threading import PIL from PIL import Image """specifying format to see the log messages to include - threadname, current times, logging level and the message""" FORMAT = "[%(threadName)s, %(asctime)s, ...
shantanusharma95/LearningPython
ParallelProgramming/MultipleThread/thumbnail_maker.py
thumbnail_maker.py
py
4,926
python
en
code
0
github-code
18
[ { "api_name": "logging.basicConfig", "line_number": 14, "usage_type": "call" }, { "api_name": "logging.DEBUG", "line_number": 14, "usage_type": "attribute" }, { "api_name": "os.path", "line_number": 19, "usage_type": "attribute" }, { "api_name": "os.path", "li...
40095752231
from django.urls import path from pydantic import ValidationError as PydanticValidationError from rest_framework import status from rest_framework.decorators import api_view from rest_framework.request import Request from rest_framework.response import Response from api.validations.requests import ConfigRequest from o...
Aldebrand/xchange
api/endpoints/config.py
config.py
py
1,462
python
en
code
0
github-code
18
[ { "api_name": "rest_framework.request.Request", "line_number": 13, "usage_type": "name" }, { "api_name": "api.validations.requests.ConfigRequest", "line_number": 19, "usage_type": "call" }, { "api_name": "rest_framework.response.Response", "line_number": 21, "usage_type":...
31013924945
from setuptools import setup, find_packages with open('requirements.txt') as f: required = f.read().splitlines() setup( name='nine_relay_linux_python', version='0.1.1', packages=find_packages(), install_requires=required, author='Bluewhitep', author_email='20318684+bluewhitep@users.nor...
bluewhitep/nine_relay_linux_python
setup.py
setup.py
py
789
python
en
code
0
github-code
18
[ { "api_name": "setuptools.setup", "line_number": 6, "usage_type": "call" }, { "api_name": "setuptools.find_packages", "line_number": 9, "usage_type": "call" } ]
41389448624
from django.urls import path, include from . import views urlpatterns = [ path("diary/", views.Rate.as_view(), name='rate'), path("school/", views.SchoolApi.as_view(), name="SchoolAll"), path("school/<int:pk>/", views.SchoolDetailApi.as_view(), name="SchoolDetail"), path('school/<int:pk>/team/', views....
semenInRussia/DistanceLerning
DistanceLerning/main/urls.py
urls.py
py
594
python
en
code
0
github-code
18
[ { "api_name": "django.urls.path", "line_number": 5, "usage_type": "call" }, { "api_name": "django.urls.path", "line_number": 6, "usage_type": "call" }, { "api_name": "django.urls.path", "line_number": 7, "usage_type": "call" }, { "api_name": "django.urls.path", ...
10838989507
import matplotlib.pyplot as plt import numpy as np import pandas as pd import localgraphclustering.ncp def _ncp_min(grp, feature): if len(grp[feature]) > 0: minj = grp[feature].idxmin() result = grp.loc[minj] result["best"] = minj return result def ncp_min_feature_by_g...
RevoData/LocalGraphClustering
localgraphclustering/ncpplots.py
ncpplots.py
py
5,217
python
en
code
null
github-code
18
[ { "api_name": "numpy.float64", "line_number": 20, "usage_type": "attribute" }, { "api_name": "numpy.log10", "line_number": 22, "usage_type": "call" }, { "api_name": "numpy.power", "line_number": 23, "usage_type": "call" }, { "api_name": "numpy.histogram", "lin...
75279234919
import datetime from zope import interface from zope import schema from zope import component from z3c.form import button from plone.app.event.portlets import portlet_calendar from plone.app.event import messageFactory as _pae from plone.app.event.browser.event_listing import EventListing from plone.z3cform.layout im...
collective/collective.rcse
collective/rcse/page/controller/events_view.py
events_view.py
py
4,329
python
en
code
3
github-code
18
[ { "api_name": "collective.rcse.page.controller.group_base.BaseAddFormSchema", "line_number": 22, "usage_type": "attribute" }, { "api_name": "collective.rcse.page.controller.group_base", "line_number": 22, "usage_type": "name" }, { "api_name": "zope.schema.TextLine", "line_num...
9990808221
import os os.environ["TF_CPP_MIN_LOG_LEVEL"] = "3" os.environ["CUDA_VISIBLE_DEVICES"]="0" import numpy as np import gc import tensorflow as tf from tensorflow.keras import backend as K from sklearn.preprocessing import LabelBinarizer from sklearn.metrics import balanced_accuracy_score, f1_score from pathlib import Pat...
cmusmashlab/SAMoSA
Code/2. Generate Predictions/Sound/lopo.py
lopo.py
py
6,787
python
en
code
9
github-code
18
[ { "api_name": "os.environ", "line_number": 2, "usage_type": "attribute" }, { "api_name": "os.environ", "line_number": 3, "usage_type": "attribute" }, { "api_name": "random.seed", "line_number": 17, "usage_type": "call" }, { "api_name": "numpy.random.seed", "li...
74698560999
import boto3 from decimal import Decimal import json import urllib.request import urllib.parse import urllib.error import base64 from contextlib import closing from botocore.exceptions import BotoCoreError, ClientError import tempfile ''' Fraser S Notes: Very Crud version. ''' rekognition = boto3.client('rekognit...
Fraser27/rekognition-polly-s3
rekognition_polly_s3.py
rekognition_polly_s3.py
py
6,123
python
en
code
1
github-code
18
[ { "api_name": "boto3.client", "line_number": 17, "usage_type": "call" }, { "api_name": "boto3.client", "line_number": 18, "usage_type": "call" }, { "api_name": "boto3.client", "line_number": 19, "usage_type": "call" }, { "api_name": "contextlib.closing", "line...
10781880728
from PyQt5 import QtGui, QtWidgets from driver import mistic from coreRegion import core_analysis import sys import design import os class ExampleApp(QtWidgets.QMainWindow, design.Ui_MainWindow): InputFile = "" OutputFile = "" NeighborFile = "" areaOfInt = "" spUnits = "" timeUnits = "" ...
amangoyal097/MiSTIC
old_files/main.py
main.py
py
8,845
python
en
code
0
github-code
18
[ { "api_name": "PyQt5.QtWidgets.QMainWindow", "line_number": 10, "usage_type": "attribute" }, { "api_name": "PyQt5.QtWidgets", "line_number": 10, "usage_type": "name" }, { "api_name": "design.Ui_MainWindow", "line_number": 10, "usage_type": "attribute" }, { "api_na...
72670487399
import os import torch from scipy import signal from torch.utils.data import Dataset class EEGDataset(Dataset): """Fast EEGDataset (fetching prepared data and labels from files)""" def __init__(self, augment=True) -> None: data_file = f'data_Dinh_fs200.pt' labels_file = f'labels_Dinh_fs200.pt'...
ding9858/Self_Supervised_Learning_on_EEG
Dataset_train.py
Dataset_train.py
py
1,871
python
en
code
1
github-code
18
[ { "api_name": "torch.utils.data.Dataset", "line_number": 6, "usage_type": "name" }, { "api_name": "torch.load", "line_number": 13, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 13, "usage_type": "call" }, { "api_name": "os.path", "line_n...
11710164835
# -*- coding:Utf-8 -*- """ gérer les _ si le nom du fichier commence et fini par ", on retire les " """ from media import * from media_helpers import * import logging import urllib import urllib2 def parse_season_episode_string(str_): """Transform a string with season and episode number into a tuple (season_num...
playest/castnamer
imdb_browser.py
imdb_browser.py
py
6,237
python
en
code
0
github-code
18
[ { "api_name": "logging.debug", "line_number": 55, "usage_type": "call" }, { "api_name": "media.get_key", "line_number": 56, "usage_type": "call" }, { "api_name": "media.type_", "line_number": 57, "usage_type": "attribute" }, { "api_name": "media.get_normalized_typ...
75107785000
import time import datetime import math from django.core.management import BaseCommand from chemical.models import * class Command(BaseCommand): def handle(self, *args, **options): chemicals = Chemical.objects.all() count = len(chemicals) start_time = time.monotonic() last_i = 0...
EugeneBilenko/partial
chemical/management/commands/ReassignChemicalSynonyms.py
ReassignChemicalSynonyms.py
py
1,198
python
en
code
0
github-code
18
[ { "api_name": "django.core.management.BaseCommand", "line_number": 10, "usage_type": "name" }, { "api_name": "time.monotonic", "line_number": 15, "usage_type": "call" }, { "api_name": "chemical.models", "line_number": 20, "usage_type": "name" }, { "api_name": "tim...
10679096000
import requests import re url = 'https://www.aladin.co.kr/shop/common/wnew.aspx?ViewRowsCount=50&ViewType=Detail&SortOrder=6&page=1&BranchType=1&PublishDay=168&CID=437&NewType=SpecialNew&CustReviewRankStart=&CustReviewRankEnd=&CustReviewCountStart=&CustReviewCountEnd=&PriceFilterMin=&PriceFilterMax=&SearchOption=' ...
kimeunyoung01/pythonTest
day0420/test.py
test.py
py
1,225
python
en
code
0
github-code
18
[ { "api_name": "requests.get", "line_number": 6, "usage_type": "call" }, { "api_name": "re.findall", "line_number": 10, "usage_type": "call" }, { "api_name": "re.DOTALL", "line_number": 10, "usage_type": "attribute" }, { "api_name": "re.findall", "line_number":...
11648534343
import os import argparse import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from pcdet.config import cfg, cfg_from_yaml_file from pcdet.models.backbones_3d.vfe.vfe_template import VFETemplate from onnx_backbone_2d import BaseBEVBackbone # from onnx_dense_head import SingleHead fro...
hcheng1005/OpenPCDet
tools/onnx_utils_dual_radar/trans_backbone_singlehead.py
trans_backbone_singlehead.py
py
5,672
python
en
code
null
github-code
18
[ { "api_name": "pcdet.models.dense_heads.AnchorHeadTemplate", "line_number": 17, "usage_type": "name" }, { "api_name": "torch.nn.Conv2d", "line_number": 37, "usage_type": "call" }, { "api_name": "torch.nn", "line_number": 37, "usage_type": "name" }, { "api_name": "...
70884108199
import numpy as np import keras.utils as utils from keras.layers import LSTM, Dense from keras.models import Sequential from keras.layers.embeddings import Embedding from keras.layers.normalization import BatchNormalization def create_model(voc_size, hidden_units, model_name): print("Creating model") # Build ...
edrukar/intelligent_instrument
instrument/model_functions.py
model_functions.py
py
1,718
python
en
code
7
github-code
18
[ { "api_name": "keras.models.Sequential", "line_number": 12, "usage_type": "call" }, { "api_name": "keras.layers.embeddings.Embedding", "line_number": 13, "usage_type": "call" }, { "api_name": "keras.layers.LSTM", "line_number": 15, "usage_type": "call" }, { "api_n...
40652708739
"""automated test for app""" import os import sys import asyncio import random import logging import json import datetime import time from azure.cosmos import CosmosClient from azure.iot.device.aio import IoTHubDeviceClient logging.basicConfig(level=logging.ERROR) url = os.environ["ACCOUNT_URI"] key = os.environ["A...
zhovtobruhd/cloud-project-app
test_auto.py
test_auto.py
py
2,526
python
en
code
0
github-code
18
[ { "api_name": "logging.basicConfig", "line_number": 14, "usage_type": "call" }, { "api_name": "logging.ERROR", "line_number": 14, "usage_type": "attribute" }, { "api_name": "os.environ", "line_number": 17, "usage_type": "attribute" }, { "api_name": "os.environ", ...
28135014240
import numpy as np from matplotlib import pyplot as plt from matplotlib.font_manager import FontProperties # 字体管理器 M_character = np.load('character.npy') M_weapon = np.load('weapon.npy') # 设置汉字格式 font = FontProperties(fname=r"fonts\SourceHanSansSC-Bold.otf", size=10) font_title = FontProperties(fname=r"fonts\SourceH...
OneBST/GI_gacha_dataset
dp_calculator/plot_compare_img.py
plot_compare_img.py
py
2,591
python
en
code
136
github-code
18
[ { "api_name": "numpy.load", "line_number": 5, "usage_type": "call" }, { "api_name": "numpy.load", "line_number": 6, "usage_type": "call" }, { "api_name": "matplotlib.font_manager.FontProperties", "line_number": 9, "usage_type": "call" }, { "api_name": "matplotlib....
75170869481
''' Simple HTTP server with one GET endpoint. Implemented by overriding the BaseHTTPRequestHandler class used by the HTTPServer class to reply to requests and serve files normally. When invoking the script, the port number is provided as an argument E.G. python3 Stock-python_implementation.py 8000 Examples of vali...
l1uk/Wolt-2023-internship-assignment
Stock-python_implementation.py
Stock-python_implementation.py
py
1,492
python
en
code
0
github-code
18
[ { "api_name": "http.server.HTTPServer", "line_number": 27, "usage_type": "call" }, { "api_name": "Classes.RequestHandler._RequestHandler", "line_number": 27, "usage_type": "argument" }, { "api_name": "sys.argv", "line_number": 33, "usage_type": "attribute" }, { "a...
13262031146
# done by convolving the image with a normalized box filter. # It simply takes the average of all the pixels under kernel area and replaces the central element with this average. # This is done by the function cv2.blur() or cv2.boxFilter(). Check the docs for more details about the kernel. # We should specify the wi...
r15h1/opencv
02-ImageProcessing/06ConvolutionAveraging.py
06ConvolutionAveraging.py
py
655
python
en
code
0
github-code
18
[ { "api_name": "cv2.imread", "line_number": 10, "usage_type": "call" }, { "api_name": "cv2.blur", "line_number": 12, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.subplot", "line_number": 14, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", ...
4346698809
from app.database import Database from typing import List from app.models import User class UserService: def __init__(self): self.database = Database() pass def get_users(self) -> List[User]: users = [] print(users, "3") print("=========================================...
NestorAlban/user_alchemy
app/services/user_service.py
user_service.py
py
857
python
en
code
0
github-code
18
[ { "api_name": "app.database.Database", "line_number": 8, "usage_type": "call" }, { "api_name": "app.models.User", "line_number": 18, "usage_type": "call" }, { "api_name": "typing.List", "line_number": 11, "usage_type": "name" }, { "api_name": "app.models.User", ...
16940089664
#Density, in this context, is defined as the number of points within a specified radius. import numpy as np from sklearn.cluster import DBSCAN from sklearn.datasets.samples_generator import make_blobs from sklearn.preprocessing import StandardScaler import matplotlib.pyplot as plt #This function will generate data...
snpushpi/Machine_Learning_Codes
DBSCAN_Clustering.py
DBSCAN_Clustering.py
py
2,341
python
en
code
1
github-code
18
[ { "api_name": "sklearn.datasets.samples_generator.make_blobs", "line_number": 13, "usage_type": "call" }, { "api_name": "sklearn.preprocessing.StandardScaler", "line_number": 15, "usage_type": "call" }, { "api_name": "sklearn.cluster.DBSCAN", "line_number": 26, "usage_typ...
4561040529
from fastapi import FastAPI, Query from fastapi.responses import RedirectResponse, HTMLResponse from fastapi.middleware.cors import CORSMiddleware import uvicorn import csv from datetime import datetime app = FastAPI() db = [] # Open the CSV file with open('data.csv', 'r') as file: # Create a CSV reader object...
nitishkumar2306/4883-SoftwareTools-Erelli
Assignments/A08/main.py
main.py
py
12,532
python
en
code
0
github-code
18
[ { "api_name": "fastapi.FastAPI", "line_number": 10, "usage_type": "call" }, { "api_name": "csv.reader", "line_number": 17, "usage_type": "call" }, { "api_name": "datetime.datetime.strptime", "line_number": 108, "usage_type": "call" }, { "api_name": "datetime.datet...
12188134720
from django.shortcuts import redirect, render from home.models import NewPost from django.contrib import messages from django.db.models import Max from django.core.paginator import Paginator, EmptyPage # Create your views here. def home(request): allPosts = NewPost.objects.all() # for obj in allPosts: ...
styxOO7/iBlog-using-Django
home/views.py
views.py
py
2,332
python
en
code
0
github-code
18
[ { "api_name": "home.models.NewPost.objects.all", "line_number": 12, "usage_type": "call" }, { "api_name": "home.models.NewPost.objects", "line_number": 12, "usage_type": "attribute" }, { "api_name": "home.models.NewPost", "line_number": 12, "usage_type": "name" }, { ...
5743484005
from absl import app from nmigen import * from nmigen.build import * from nmigen_nexys.bazel import top from nmigen_nexys.board.nexysa7100t import nexysa7100t from nmigen_nexys.vendor.xilinx import macro class Demo(Elaboratable): def elaborate(self, platform: Platform) -> Module: m = Module() sw...
sjolsen/nmigen-nexys
board/nexysa7100t/macro_demo.py
macro_demo.py
py
944
python
en
code
5
github-code
18
[ { "api_name": "nmigen_nexys.vendor.xilinx.macro.AddSub", "line_number": 17, "usage_type": "call" }, { "api_name": "nmigen_nexys.vendor.xilinx.macro", "line_number": 17, "usage_type": "name" }, { "api_name": "nmigen_nexys.bazel.top.build", "line_number": 27, "usage_type": ...
44813864450
"""Day 5""" from typing import List from aoc.shared import read_file_lines lines = read_file_lines("year_2022/input_05.txt", strip=False) class Move: def __init__(self, count: int, from_stack: int, to_stack: int) -> None: self.count = count self.from_stack = from_stack self.to_stack = to...
dalemyers/Advent-of-Code
aoc/year_2022/day_05.py
day_05.py
py
2,526
python
en
code
0
github-code
18
[ { "api_name": "aoc.shared.read_file_lines", "line_number": 6, "usage_type": "call" }, { "api_name": "typing.List", "line_number": 25, "usage_type": "name" } ]
30624014924
#https://adventofcode.com/2015/day/10 from itertools import groupby def part2(input_file, iterations=50): with open(input_file, "r") as f: puzzle_input = f.read() for _ in range(iterations): puzzle_input = ''.join(str(len(list(v))) + k for k, v in groupby(puzzle_input)) return len(puzzle_input) def main(...
Maxtasy/adventofcode2015
day10-2.py
day10-2.py
py
417
python
en
code
0
github-code
18
[ { "api_name": "itertools.groupby", "line_number": 12, "usage_type": "call" } ]
29359389428
from django.contrib import admin from django.urls import path, include from job import views from django.contrib.auth.views import LogoutView, LoginView urlpatterns = [ path('admin/', admin.site.urls), path('', views.JobListView.as_view()), path('<int:pk>/', views.JobDetailView.as_view()), path('new/',...
therealhalonen/django_tasklist
jobList/urls.py
urls.py
py
632
python
en
code
1
github-code
18
[ { "api_name": "django.urls.path", "line_number": 7, "usage_type": "call" }, { "api_name": "django.contrib.admin.site", "line_number": 7, "usage_type": "attribute" }, { "api_name": "django.contrib.admin", "line_number": 7, "usage_type": "name" }, { "api_name": "dja...
15574519236
from django.shortcuts import render, get_object_or_404 from django.http import HttpResponseRedirect from django.conf import settings from django.urls import reverse, reverse_lazy from django.views import View, generic from django.core import serializers from django.http import Http404 from .models import Error, Period...
wackdot/django_url_shorterner
src/shorterner/views.py
views.py
py
6,415
python
en
code
0
github-code
18
[ { "api_name": "django.views.View", "line_number": 15, "usage_type": "name" }, { "api_name": "forms.SubmitUrlForm", "line_number": 16, "usage_type": "name" }, { "api_name": "django.shortcuts.render", "line_number": 26, "usage_type": "call" }, { "api_name": "models....
34907481977
import oracledb from common.data_models.image import ImagingTypes from ..models.ris_imaging import RisImaging from ..utils.sql_statements import query_ris_imaging, query_lab_in_progress, RISImagingQuery, LabInProgressQuery modality_type_mapping = { "DX": ImagingTypes.xray, "CT": ImagingTypes.ct, "MR": Ima...
guydolinksy/truemedicalreport
src/sheba/digest/digest/logics/ris_adapter.py
ris_adapter.py
py
2,293
python
en
code
5
github-code
18
[ { "api_name": "common.data_models.image.ImagingTypes.xray", "line_number": 8, "usage_type": "attribute" }, { "api_name": "common.data_models.image.ImagingTypes", "line_number": 8, "usage_type": "name" }, { "api_name": "common.data_models.image.ImagingTypes.ct", "line_number":...
8289681888
# 作者:hao.ren3 # 时间:2019/11/11 16:48 # IDE:PyCharm from app.main.forms.add_post import PostForm from flask_login import login_required, current_user from app.main import bp from app import db from app.models.Post import Post from app.models.Tag import Tag from guess_language import guess_language from flask import flas...
HaoREN211/hao_flask
app/main/routes/add_post.py
add_post.py
py
1,457
python
en
code
0
github-code
18
[ { "api_name": "app.main.forms.add_post.PostForm", "line_number": 20, "usage_type": "call" }, { "api_name": "guess_language.guess_language", "line_number": 22, "usage_type": "call" }, { "api_name": "datetime.datetime.utcnow", "line_number": 24, "usage_type": "call" }, ...
11022869834
import bisect, collections, copy, heapq, itertools, math, operator, string, sys, typing INF = float('inf') MOD = 10**9+7 # エラー出さないための定義 class DSU(): def same(self, x, y): pass def merge(self, x, y): pass class FenwickTree(): def add(self, p, i): pass def sum(self, l, r): ...
kanji-a/competitive_programming
lib/lib.py
lib.py
py
10,933
python
en
code
0
github-code
18
[ { "api_name": "collections.Counter", "line_number": 101, "usage_type": "call" }, { "api_name": "collections.Counter", "line_number": 116, "usage_type": "call" }, { "api_name": "heapq.heappop", "line_number": 198, "usage_type": "call" }, { "api_name": "heapq.heappu...
5937360202
from datetime import datetime from game.document.documents.document_base import DocumentBase from game.document.documents.mutation import Mutation from game.document.documents.turn import Turn from game.document.seeding.prompt_seed_factory import PromptSeedFactory class Phase(DocumentBase): _field_definitions = ...
tckerr/finalsweek
finalsweek/game/document/documents/phase.py
phase.py
py
716
python
en
code
0
github-code
18
[ { "api_name": "game.document.documents.document_base.DocumentBase", "line_number": 9, "usage_type": "name" }, { "api_name": "datetime.datetime", "line_number": 13, "usage_type": "name" }, { "api_name": "game.document.documents.turn.Turn", "line_number": 14, "usage_type": ...
12004214041
from ..build import MODULE_REGISTRY import torch.nn as nn class HeadBlock(nn.Module): def __init__(self, in_channels, head_channels, out_channels, prior_bias=0): super().__init__() if head_channels > 0: self.head_conv = nn.Sequential( nn.Conv2d(in_chan...
Tedcharlesbrown/ShuttR_Cut_OSC
modules/head/centernet.py
centernet.py
py
1,309
python
en
code
1
github-code
18
[ { "api_name": "torch.nn.Module", "line_number": 5, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 5, "usage_type": "name" }, { "api_name": "torch.nn.Sequential", "line_number": 11, "usage_type": "call" }, { "api_name": "torch.nn", "line_...
38649113273
# This script reads LIP files in the 'source' subdirectory. # It outputs CSV files in the 'translate' subdirectory using pipe characters | as delimiters. # # Each row contains: the voice index, dialogue offset address in hex, dialogue text converted to UTF-8, # lip movement command sequence address in hex, and raw byt...
TheOpponent/st3-translation-notes
Scripts/read_lip.py
read_lip.py
py
3,569
python
en
code
7
github-code
18
[ { "api_name": "os.path.join", "line_number": 13, "usage_type": "call" }, { "api_name": "os.path", "line_number": 13, "usage_type": "attribute" }, { "api_name": "os.path.realpath", "line_number": 13, "usage_type": "call" }, { "api_name": "os.path.dirname", "lin...
9790360355
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Sep 28 17:06:28 2021 @author: alankar """ #./output-8192//plots/8192_fields-avg.txt import numpy as np import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec from scipy.integrate import solve_ivp import sys from scipy import interpolat...
dutta-alankar/cooling-flow-model
PLUTO-simulations/new-profile/convergence.py
convergence.py
py
7,011
python
en
code
1
github-code
18
[ { "api_name": "decimal.Decimal", "line_number": 22, "usage_type": "call" }, { "api_name": "decimal.Decimal", "line_number": 26, "usage_type": "call" }, { "api_name": "cycler.cycler", "line_number": 49, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.rc", ...
39987842957
import scipy.io as sio import pandas as pd import numpy as np import matplotlib.pyplot as plt import numpy.linalg as lin def subgrad_func(A,b,lam): n2 = A.shape[1] x = np.zeros((n2,1)) k=1 g = np.ones((n2,1)) t = 0.01 f = [] while True: if k>3: crit = np.abs(f[k-2]-f[k-...
burakbayramli/classnotes
func_analysis/func_42_subgrad/subgrad.py
subgrad.py
py
866
python
en
code
69
github-code
18
[ { "api_name": "numpy.zeros", "line_number": 9, "usage_type": "call" }, { "api_name": "numpy.ones", "line_number": 11, "usage_type": "call" }, { "api_name": "numpy.abs", "line_number": 16, "usage_type": "call" }, { "api_name": "numpy.linalg.norm", "line_number"...
75107770600
from dal import autocomplete from django import forms from analysis.models import System, Symptom, CustomUserSymptom from chemical.models import Chemical, HealthEffect from experiment.models import Identification from genome.models import Gene, Snp, DiseaseTrait class SystemAdminForm(forms.ModelForm): class Meta...
EugeneBilenko/partial
analysis/forms.py
forms.py
py
1,878
python
en
code
0
github-code
18
[ { "api_name": "django.forms.ModelForm", "line_number": 10, "usage_type": "attribute" }, { "api_name": "django.forms", "line_number": 10, "usage_type": "name" }, { "api_name": "analysis.models.System", "line_number": 12, "usage_type": "name" }, { "api_name": "dal.a...
12915317212
from django.conf.urls import patterns, include, url urlpatterns = patterns('', # Examples: url(r'^$', 'games.views.index', name='index'), url(r'^new/$', 'games.views.new', name='new'), url(r'^edit/(?P<id_number>[\d]+)$', 'games.views.edit', name='edit'), url(r'^delete/(?P<id_number>[\d]+)$', 'games.views.delete',...
jeffbarg/Assassin
django/games/urls.py
urls.py
py
391
python
en
code
0
github-code
18
[ { "api_name": "django.conf.urls.patterns", "line_number": 3, "usage_type": "call" }, { "api_name": "django.conf.urls.url", "line_number": 5, "usage_type": "call" }, { "api_name": "django.conf.urls.url", "line_number": 6, "usage_type": "call" }, { "api_name": "djan...
38172499073
import argparse import logging import sys from PIL import Image LOGGING_FORMATTER = logging.Formatter("%(asctime)s [%(levelname)s] %(message)s") def get_console_handler(logging_formatter=LOGGING_FORMATTER): """ Return a logging handler that sends logging output to the system's standard output. :p...
dphuonganh/Perseus-Biometric-Passport-Photo-Python-Library
bpp/converter.py
converter.py
py
2,417
python
en
code
4
github-code
18
[ { "api_name": "logging.Formatter", "line_number": 8, "usage_type": "call" }, { "api_name": "logging.StreamHandler", "line_number": 22, "usage_type": "call" }, { "api_name": "sys.stdout", "line_number": 22, "usage_type": "attribute" }, { "api_name": "logging.DEBUG"...
8798920504
# -*- coding: utf-8 -*- from pygments.lexers.python import BashLexer from pygments.token import Name, Keyword class MyBashLexer(BashLexer): EXTRA_KEYWORDS = set(('git', 'clone', 'pip', 'python')) def get_tokens_unprocessed(self, text): for index, token, value in BashLexer.get_tokens_unprocessed(...
sdhdez/latex-template-large-report
mybash.py
mybash.py
py
510
python
en
code
0
github-code
18
[ { "api_name": "pygments.lexers.python.BashLexer", "line_number": 5, "usage_type": "name" }, { "api_name": "pygments.lexers.python.BashLexer.get_tokens_unprocessed", "line_number": 8, "usage_type": "call" }, { "api_name": "pygments.lexers.python.BashLexer", "line_number": 8, ...
71473620200
from telethon import TelegramClient, events, sync from telethon import functions, types import pandas as pd import sys import os from datetime import datetime import telethon print(telethon.__version__) # These example values won't work. You must get your own api_id and # api_hash from https://my.telegram....
doroshishka/Telegram_API
extract_telegram_data.py
extract_telegram_data.py
py
2,892
python
en
code
0
github-code
18
[ { "api_name": "telethon.__version__", "line_number": 9, "usage_type": "attribute" }, { "api_name": "pandas.DataFrame", "line_number": 32, "usage_type": "call" }, { "api_name": "sys.exc_info", "line_number": 37, "usage_type": "call" }, { "api_name": "pandas.DataFra...
41299438629
import psycopg2 from collections import Counter from datetime import datetime # Connect to the PostgreSQL database def connect_to_database(): ''' Connects to postgreSQL database If unsuccessful, resturns the error recieved ''' try: # connection = psycopg2.connect( # hos...
granolaameobi/fresko
POS/pos_app/models.py
models.py
py
21,005
python
en
code
1
github-code
18
[ { "api_name": "psycopg2.connect", "line_number": 22, "usage_type": "call" }, { "api_name": "psycopg2.Error", "line_number": 30, "usage_type": "attribute" }, { "api_name": "collections.Counter", "line_number": 254, "usage_type": "call" }, { "api_name": "datetime.da...
37965121670
from collections import Counter from argparse import ArgumentParser from tweepy import Cursor from make_client import make_client def get_hashtags(tweet: dict) -> list: """ The tweet argument is a dict. So get 'entities' key or return a empty dict. This is required for the second .get() to not throw a err...
RitamDey/Everything
python/Social Networks/Twitter/Analyze Tweets/hashtag_counter.py
hashtag_counter.py
py
1,075
python
en
code
1
github-code
18
[ { "api_name": "collections.Counter", "line_number": 20, "usage_type": "call" }, { "api_name": "argparse.ArgumentParser", "line_number": 21, "usage_type": "call" }, { "api_name": "make_client.make_client", "line_number": 29, "usage_type": "call" }, { "api_name": "t...
32027022081
""" In this model, we define a schema for petri nets, and then a subclass of acset with some convenience methods. """ from pathlib import Path from acsets import ( CATLAB_SCHEMAS_DIRECTORY, HERE, JSON_SCHEMAS_DIRECTORY, ACSet, Attr, AttrType, Hom, Ob, Schema, ) Species = Ob(name="S...
AlgebraicJulia/py-acsets
src/acsets/petris.py
petris.py
py
6,214
python
en
code
10
github-code
18
[ { "api_name": "acsets.Ob", "line_number": 19, "usage_type": "call" }, { "api_name": "acsets.Ob", "line_number": 20, "usage_type": "call" }, { "api_name": "acsets.Ob", "line_number": 21, "usage_type": "call" }, { "api_name": "acsets.Ob", "line_number": 22, ...
3543348968
import numpy as np import scipy as sp from quaternion import from_rotation_matrix, quaternion, as_euler_angles, from_euler_angles, as_quat_array from scipy.spatial.transform import Rotation as R from matplotlib import pyplot as plt from rlbench.environment import Environment from rlbench.action_modes import ArmActionM...
eichmeierbr/robo_autonomy_project
tf_runner.py
tf_runner.py
py
4,749
python
en
code
2
github-code
18
[ { "api_name": "sys.path.append", "line_number": 17, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 17, "usage_type": "attribute" }, { "api_name": "sys.path.append", "line_number": 18, "usage_type": "call" }, { "api_name": "sys.path", "line_nu...
3658405651
import pygame from os import system pygame.init() #Função para tocar a música def mp3(musica) : pygame.mixer.music.load(musica) pygame.mixer.music.play() pygame.event.wait() enter = input('Pressione enter para continuar') #Função para lmpar a tela def cls() : system('cls') #Perguntar qual estil...
Luis-Otavio-Araujo/Curso-de-Python
MeusTestes/mp3.py
mp3.py
py
2,295
python
pt
code
0
github-code
18
[ { "api_name": "pygame.init", "line_number": 3, "usage_type": "call" }, { "api_name": "pygame.mixer.music.load", "line_number": 8, "usage_type": "call" }, { "api_name": "pygame.mixer", "line_number": 8, "usage_type": "attribute" }, { "api_name": "pygame.mixer.music...
22799326780
""" Script which submits tg data from the Netszch TGA/DSC to a database. To run the script: python tg_to_db.py <dir> <coke> <dir> = directory for refinement results files. Can be '.' or a specific folder. <coke> = coke (Optional, type "coke" if the sample contains coke) """ from tomocatdb.data_model import * import...
NicolaiHaaberJunge/TomocatDB-Scripts
tg_to_db.py
tg_to_db.py
py
8,661
python
en
code
0
github-code
18
[ { "api_name": "sqlalchemy.create_engine", "line_number": 21, "usage_type": "call" }, { "api_name": "json.loads", "line_number": 81, "usage_type": "call" }, { "api_name": "json.dumps", "line_number": 81, "usage_type": "call" }, { "api_name": "pandas.read_csv", ...
36630157983
from decimal import Decimal from rest_framework.serializers import ModelSerializer, ReadOnlyField from apps.biscuit.models.biscuit import Biscuit, PriceList, ReturnBiscuit from apps.warehouse.models import WareHouseBiscuit class BiscuitModelSerializer(ModelSerializer): class Meta: model = Biscuit ...
Aziz0507/beckend
api/biscuit/serializers/biscuit.py
biscuit.py
py
2,290
python
en
code
1
github-code
18
[ { "api_name": "rest_framework.serializers.ModelSerializer", "line_number": 8, "usage_type": "name" }, { "api_name": "apps.biscuit.models.biscuit.Biscuit", "line_number": 10, "usage_type": "name" }, { "api_name": "apps.biscuit.models.biscuit.PriceList.objects.filter", "line_nu...
6283668116
import pathlib import torch.utils.data import os import numpy as np import collections import skimage.draw import tqdm import cv2 DATA_DIR = '/home/fdarbeha/projects/def-wanglab/EchoNet/data' class EchoDataset(torch.utils.data.Dataset): def __init__(self, root=None, ssl=False, sp...
fdarbeha/echonet_representation_learning
data/echonet_dataset.py
echonet_dataset.py
py
10,745
python
en
code
2
github-code
18
[ { "api_name": "torch.utils.data.utils", "line_number": 12, "usage_type": "attribute" }, { "api_name": "torch.utils.data", "line_number": 12, "usage_type": "name" }, { "api_name": "pathlib.Path", "line_number": 27, "usage_type": "call" }, { "api_name": "os.path.exi...
37747844913
"""Match WebScraper.""" import csv import logging import pdb import sqlite3 from datetime import datetime # from collections import namedtuple # from threading import Thread from os.path import isfile # from selenium.webdriver.firefox.options import Options from time import ctime, sleep from bs4 import BeautifulSoup ...
theharshitgarg/match_web_scraper
match_scraper.py
match_scraper.py
py
6,752
python
en
code
0
github-code
18
[ { "api_name": "logging.basicConfig", "line_number": 21, "usage_type": "call" }, { "api_name": "logging.DEBUG", "line_number": 21, "usage_type": "attribute" }, { "api_name": "logging.getLogger", "line_number": 23, "usage_type": "call" }, { "api_name": "datetime.dat...
42691938485
""" This code contains the results of the occlusion testing as well as functions to plot the results. This code was written and designed by Christopher du Toit. """ import os.path import numpy as np import matplotlib.pyplot as plt import pickle import torch from timesformer.visualization.utils import get_confusion_mat...
chrisdt1998/Research_internship
Experiments/occlusion_results.py
occlusion_results.py
py
7,564
python
en
code
0
github-code
18
[ { "api_name": "numpy.array", "line_number": 24, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 34, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 44, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": ...
37477696455
import os from django.shortcuts import render, HttpResponse from django import forms from app01.utils.bootstrap import BootStrapForm, BootStrapModelForm from app01 import models from django.conf import settings def upload_list(request): if request.method == "GET": return render(request, 'upload_list.html...
XTQ0648/Django1
day16/app01/views/upload.py
upload.py
py
3,333
python
en
code
0
github-code
18
[ { "api_name": "django.shortcuts.render", "line_number": 12, "usage_type": "call" }, { "api_name": "django.shortcuts.HttpResponse", "line_number": 21, "usage_type": "call" }, { "api_name": "app01.utils.bootstrap.BootStrapForm", "line_number": 24, "usage_type": "name" }, ...
34748228597
from bs4 import BeautifulSoup as bs import requests import selenium import time from splinter import Browser import pandas as pd import json ############################# # Initialize selenium ############################# executable_path = {'executable_path': '/usr/bin/chromedriver'} browser = Browser('chrome', **e...
little-boots/webscraper
scraper.py
scraper.py
py
3,938
python
en
code
0
github-code
18
[ { "api_name": "splinter.Browser", "line_number": 15, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_number": 27, "usage_type": "call" }, { "api_name": "time.sleep", "line_number": 56, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", ...
27887176470
import pygame as pg class Button(pg.sprite.Sprite): def __init__(self, x, y, color): pg.sprite.Sprite.__init__(self) self.image = pg.Surface((30, 30)) self.image.fill(color) self.rect = self.image.get_rect() self.rect.x = x self.rect.y = y
cjcocokrisp/random-games
connect_four/sprites.py
sprites.py
py
293
python
en
code
0
github-code
18
[ { "api_name": "pygame.sprite", "line_number": 3, "usage_type": "attribute" }, { "api_name": "pygame.sprite.Sprite.__init__", "line_number": 6, "usage_type": "call" }, { "api_name": "pygame.sprite", "line_number": 6, "usage_type": "attribute" }, { "api_name": "pyga...
22815523177
# -*- coding: utf-8 -*- from unittest.mock import Mock, patch import pytest from paas_wl.networking.ingress.constants import AppDomainSource from paas_wl.networking.ingress.entities.ingress import ingress_kmodel from paas_wl.networking.ingress.exceptions import DefaultServiceNameRequired, EmptyAppIngressError, ValidC...
leafage-collb/bk-paas
workloads/paas_wl/tests/networking/ingress/managers/test_domain.py
test_domain.py
py
11,755
python
en
code
null
github-code
18
[ { "api_name": "pytest.mark", "line_number": 21, "usage_type": "attribute" }, { "api_name": "paas_wl.networking.ingress.models.AppDomainSharedCert.objects.create", "line_number": 28, "usage_type": "call" }, { "api_name": "paas_wl.networking.ingress.models.AppDomainSharedCert.objec...
6209149731
# D - Cylinder # https://atcoder.jp/contests/abc247/tasks/abc247_d # ランレングス符号化 from collections import deque que = deque() Q = int(input()) for i in range(Q): query = list(map(int, input().split())) if query[0] == 1: que.append(query[1]) que.append(query[2]) else: ans = 0 v...
kotadd/competitive_programming
query/abc247_d.py
abc247_d.py
py
887
python
en
code
1
github-code
18
[ { "api_name": "collections.deque", "line_number": 7, "usage_type": "call" } ]
10866618496
import sys sys.path.append(".") from torch.utils.tensorboard import SummaryWriter import os import torch import argparse import numpy as np import pandas as pd from model import Model from data.data import CellCropsDataset from data.utils import load_crops from data.transform import train_transform, val_transform from ...
mahmoodlab/MAPS
scripts/CellSighter/cHL_CODEX_training_validation_testing.py
cHL_CODEX_training_validation_testing.py
py
10,809
python
en
code
11
github-code
18
[ { "api_name": "sys.path.append", "line_number": 2, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 2, "usage_type": "attribute" }, { "api_name": "torch.multiprocessing.set_sharing_strategy", "line_number": 16, "usage_type": "call" }, { "api_name":...
44906244434
# encoding:utf-8 from flask import Flask,request import json from threading import Thread import threading import time import sys import sqlite3 import os app=Flask(__name__) ####回复文本格式########## re={} result={} result["type"]="text" result["content"]="" re["error_code"]=0 re["error_msg"]="" re["resu...
yutian11308023/Smarthome
Smarthome/API_server.py
API_server.py
py
4,267
python
zh
code
0
github-code
18
[ { "api_name": "flask.Flask", "line_number": 11, "usage_type": "call" }, { "api_name": "sqlite3.connect", "line_number": 56, "usage_type": "call" }, { "api_name": "json.loads", "line_number": 69, "usage_type": "call" }, { "api_name": "flask.request.data", "line...
74849757479
from torch import nn import torch import numpy as np class SIREN(nn.Module): def __init__(self, in_features, hidden_features, hidden_layers, first_omega_0, hidden_omega_0): super().__init__() self.net = [] self.net.append( SineLayerLinear( in_features=in_fea...
david-knigge/separable-group-convolutional-networks
ck_g_cnn/nn/ck/SIREN.py
SIREN.py
py
2,408
python
en
code
10
github-code
18
[ { "api_name": "torch.nn.Module", "line_number": 7, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 7, "usage_type": "name" }, { "api_name": "torch.nn.Sequential", "line_number": 31, "usage_type": "call" }, { "api_name": "torch.nn", "line_...
21208597879
from django.test import TestCase from django.urls import reverse from final_exam_project.rent_a_car_web.models import Car class CarsPageViewTest(TestCase): def test_cars_page_view(self): self.car1 = Car.objects.create(make='Toyota', car_model='Corolla', horsepower=200, image='toyota.jpg', price=50) ...
KstoyM/python_web
final_exam_project/final_exam_project/tests/rent_a_car_web/views/catalogue.py
catalogue.py
py
797
python
en
code
0
github-code
18
[ { "api_name": "django.test.TestCase", "line_number": 5, "usage_type": "name" }, { "api_name": "final_exam_project.rent_a_car_web.models.Car.objects.create", "line_number": 7, "usage_type": "call" }, { "api_name": "final_exam_project.rent_a_car_web.models.Car.objects", "line_n...
45805226194
from dotenv import load_dotenv import datetime as dt import os import telebot import json load_dotenv() BOT_TOKEN = os.environ.get('BOT_TOKEN') bot = telebot.TeleBot(BOT_TOKEN) COMMANDS = [ { "name": 'start', "description": 'Restart the bot' }, { "name": 'predict', "descrip...
BaGreal2/alert_prediction
src/bot/bot.py
bot.py
py
3,912
python
en
code
0
github-code
18
[ { "api_name": "dotenv.load_dotenv", "line_number": 7, "usage_type": "call" }, { "api_name": "os.environ.get", "line_number": 8, "usage_type": "call" }, { "api_name": "os.environ", "line_number": 8, "usage_type": "attribute" }, { "api_name": "telebot.TeleBot", ...
24165308781
# --- # jupyter: # jupytext: # formats: ipynb,py:light # text_representation: # extension: .py # format_name: light # format_version: '1.5' # jupytext_version: 1.7.1 # kernelspec: # display_name: Vigilance # language: python # name: vigilance # --- # # Laplacian Eigenmap...
IsabelF98/PRJ_Manifold_Learning
Notebooks/Laplacian_Eigenmap_Scikit_1.py
Laplacian_Eigenmap_Scikit_1.py
py
19,971
python
en
code
0
github-code
18
[ { "api_name": "holoviews.extension", "line_number": 38, "usage_type": "call" }, { "api_name": "panel.extension", "line_number": 39, "usage_type": "call" }, { "api_name": "os.environ", "line_number": 46, "usage_type": "attribute" }, { "api_name": "sklearn.datasets....
41732611929
import wfdb import numpy as np # features array: # # (0 = no = negative = front) # (1 = yes = positive = end) # # 0 parity = number of previous deliveries, # 1 maternal age, # 2 previous abortions, # 3 weight, # 4 hypertension, # 5 diabetes, # 6 smoker # 7 bleeding...
adiguno/4782_Final_Project
preprocessing.py
preprocessing.py
py
4,669
python
en
code
3
github-code
18
[ { "api_name": "wfdb.rdsamp", "line_number": 34, "usage_type": "call" }, { "api_name": "numpy.empty", "line_number": 35, "usage_type": "call" }, { "api_name": "numpy.empty", "line_number": 111, "usage_type": "call" }, { "api_name": "numpy.empty", "line_number":...
72592929639
import os import sys import random import math import numpy as np import skimage.io import matplotlib import matplotlib.pyplot as plt import cv2 import time import glob import argparse from mrcnn.config import Config from datetime import datetime from scipy.misc import imsave ###########################################...
silencessss/mask_rcnn
eval.py
eval.py
py
6,451
python
en
code
3
github-code
18
[ { "api_name": "argparse.ArgumentParser", "line_number": 17, "usage_type": "call" }, { "api_name": "os.path.abspath", "line_number": 21, "usage_type": "call" }, { "api_name": "os.path", "line_number": 21, "usage_type": "attribute" }, { "api_name": "os.path.isdir", ...
42745230076
from functools import partial import time from interp.ui.attribution_backend import AttributionBackend from interp.ui.very_named_tensor import LazyVeryNamedTensor, VeryNamedTensor from typing import Any import asyncio import websockets import json from interp.model.model_loading import load_model from interp.encoding i...
redwoodresearch/interp
interp/cui.py
cui.py
py
3,732
python
en
code
10
github-code
18
[ { "api_name": "typing.Any", "line_number": 17, "usage_type": "name" }, { "api_name": "threading.Lock", "line_number": 19, "usage_type": "call" }, { "api_name": "json.loads", "line_number": 29, "usage_type": "call" }, { "api_name": "interp.encoding.msgpack_encode",...
20017167214
# Code for 'diabetes_main.py' file. # Importing the necessary Python modules. import streamlit as st import numpy as np import pandas as pd # Configure your home page by setting its title and icon that will be displayed in a browser tab. st.set_page_config(page_title = 'Early Diabetes Prediction Web App', ...
Sathvika1411/Diabetes-Prediction-app
diabetes_main.py
diabetes_main.py
py
1,807
python
en
code
1
github-code
18
[ { "api_name": "streamlit.set_page_config", "line_number": 9, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 20, "usage_type": "call" }, { "api_name": "streamlit.cache", "line_number": 16, "usage_type": "call" }, { "api_name": "streamlit.si...
16702169999
from typing import Optional, Union import torch import torch.nn as nn import torch.nn.functional as F import torchaudio from pyannote.core.utils.generators import pairwise from pyannote.audio.core.model import Model from pyannote.audio.core.task import Task from pyannote.audio.utils.params import merge_dict class S...
pyannote/pyannote-audio
pyannote/audio/models/segmentation/SSeRiouSS.py
SSeRiouSS.py
py
7,520
python
en
code
4,001
github-code
18
[ { "api_name": "pyannote.audio.core.model.Model", "line_number": 14, "usage_type": "name" }, { "api_name": "typing.Union", "line_number": 55, "usage_type": "name" }, { "api_name": "typing.Optional", "line_number": 61, "usage_type": "name" }, { "api_name": "pyannote...
6209034135
import inspect import json import sys import arrow # TODO cpy3.7 datetime.fromisoformat('2017-01-01T12:30:59.000000+08:00') from datetime import datetime, date from aiohttp.web_exceptions import HTTPException from .exception import RESTfulArgumentError def argument_getter_factory(route_spec): """ 根据spec来生成han...
lcgong/alchemy
redbean/redbean/handler_argument.py
handler_argument.py
py
6,028
python
en
code
1
github-code
18
[ { "api_name": "inspect.signature", "line_number": 16, "usage_type": "call" }, { "api_name": "aiohttp.web_exceptions.HTTPException", "line_number": 29, "usage_type": "name" }, { "api_name": "exception.RESTfulArgumentError", "line_number": 48, "usage_type": "call" }, { ...
12418934108
import json def get_client(secrets_path): 'Returns an OAuth client, using the given path as a secrets store' # Find you API_KEY = '<Your API Key, AKA Client ID>@AMER.OAUTHAP' REDIRECT_URI = '<Your Redirect URI>' import os import pickle from requests_oauthlib import OAuth2Session # Lo...
IoT-master/TDAmeritradeAPI
temp.py
temp.py
py
2,552
python
en
code
1
github-code
18
[ { "api_name": "os.path.join", "line_number": 15, "usage_type": "call" }, { "api_name": "os.path", "line_number": 15, "usage_type": "attribute" }, { "api_name": "os.path.expanduser", "line_number": 15, "usage_type": "call" }, { "api_name": "pickle.load", "line_...
11484164489
import config from sqlalchemy import Column, BigInteger, String, ForeignKey, Table from sqlalchemy.orm import relationship, backref from sqlalchemy.ext.declarative import declarative_base from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker Base = declarative_base() class WhitelistEntry(Base):...
sspzz/atlantis_bot
whitelist.py
whitelist.py
py
2,160
python
en
code
0
github-code
18
[ { "api_name": "sqlalchemy.ext.declarative.declarative_base", "line_number": 8, "usage_type": "call" }, { "api_name": "sqlalchemy.Column", "line_number": 12, "usage_type": "call" }, { "api_name": "sqlalchemy.BigInteger", "line_number": 12, "usage_type": "argument" }, {...
39946844670
""" BINocular backend for beamline ID03:EH2 This backend should serve as a basic example of a backend based on xrayutilities [1]. It still uses PyMCA for parsing the spec,edf files. The 'original' ID03 backend was used as a template. Created on 2014-10-16 [1] http://xrayutilities.sourceforge.net/ author: Dominik Kr...
id03/binoculars
binoculars/backends/id03_xu.py
id03_xu.py
py
10,437
python
en
code
6
github-code
18
[ { "api_name": "sys.version_info", "line_number": 23, "usage_type": "attribute" }, { "api_name": "numpy.identity", "line_number": 62, "usage_type": "call" }, { "api_name": "sys.stderr.write", "line_number": 73, "usage_type": "call" }, { "api_name": "sys.stderr", ...
5603813650
import sys import importlib def run_test(module): for k, v in module.__dict__.items(): if k[:4] == 'test' and hasattr(v, '__call__'): v() if __name__ == '__main__': n = sys.argv[1] m = importlib.import_module(n) run_test(m)
laomobk/vvc
tests/tester.py
tester.py
py
264
python
en
code
0
github-code
18
[ { "api_name": "sys.argv", "line_number": 12, "usage_type": "attribute" }, { "api_name": "importlib.import_module", "line_number": 13, "usage_type": "call" } ]
18418150512
import matplotlib.pyplot as plt import numpy as np x = np.linspace(1,24, 24) y = x plt.plot(x,y) plt.xticks(np.linspace(1,24, 24)) plt.yticks(np.linspace(1,24,24),[r'$\alpha$',r'$\beta$',r'$\gamma$',r'$\delta$',r'$\epsilon$',r'$\zeta$',r'$\eta$',r'$\theta$',r'$\iota$',r'$\kappa$',r'$\lambda$',r'$\mu$',r'$\nu$',r'$\xi...
keepwonder/learn_matplotlib
.ipynb_checkpoints/demo05_greek_character-checkpoint.py
demo05_greek_character-checkpoint.py
py
478
python
en
code
0
github-code
18
[ { "api_name": "numpy.linspace", "line_number": 4, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.plot", "line_number": 7, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 7, "usage_type": "name" }, { "api_name": "matplotlib.pyplo...
12861081335
import pprint, bson from classes.collection import Collection from classes.helpers.functions import ( presentChoiceString, presentChoice, handleBool, waitForInput ) class SkillCategory(Collection): def __init__(self, name, workName, database): super().__init__(name, workName, database) ...
Vinesma/portfolio-website-v2
dbHelper/classes/skillCategory.py
skillCategory.py
py
5,189
python
en
code
0
github-code
18
[ { "api_name": "classes.collection.Collection", "line_number": 12, "usage_type": "name" }, { "api_name": "classes.helpers.functions.presentChoiceString", "line_number": 22, "usage_type": "call" }, { "api_name": "classes.helpers.functions.presentChoiceString", "line_number": 24...
27994227783
#标注训练集的anchor """ 在训练集中,将每个anchor作为一个训练样本,为了训练目标检测模型,需要为每个anchor标注两类标签: 1.anchor所含目标的类别,简称类别 2.真实边界框ground truth相对anchor的偏移量,偏移量offset, 在目标检测时, 1.首先生成多个anchor, 2.然后为每个anchor预测类别以及偏移量, 3.接着根据预测的偏移量调整anchor位置从而得到预测边界框, 4.最终筛选需要输出的预测边界框 在目标检测的训练集中,每个图像已经标注了真实边界框ground truth的位置以及所含目标的类别; 在生成anchor之后,主要依据与anchor相似的真实边界框gr...
yfL-fengzifei/my_pytorch_notebook
pytorch_tutorial/9_4_3 pytorch-diDL-cv-anchor2.py
9_4_3 pytorch-diDL-cv-anchor2.py
py
5,658
python
zh
code
0
github-code
18
[ { "api_name": "PIL.Image.open", "line_number": 60, "usage_type": "call" }, { "api_name": "PIL.Image", "line_number": 60, "usage_type": "name" }, { "api_name": "matplotlib.pyplot.imshow", "line_number": 61, "usage_type": "call" }, { "api_name": "matplotlib.pyplot",...
12831109355
import torch import torch.nn as nn import torch.optim as optim import config import os from dataset import MyTestDataset from generator_model import Generator from utils import save_test_examples, load_checkpoint import argparse def parser(): parser = argparse.ArgumentParser(description="test.py: Model testing scr...
vinesmsuic/White-box-Cartoonization-PyTorch
test.py
test.py
py
2,906
python
en
code
28
github-code
18
[ { "api_name": "argparse.ArgumentParser", "line_number": 12, "usage_type": "call" }, { "api_name": "config.VAL_PHOTO_DIR", "line_number": 13, "usage_type": "attribute" }, { "api_name": "config.VAL_PHOTO_DIR", "line_number": 14, "usage_type": "attribute" }, { "api_n...
866306779
import sys from sklearn.model_selection import GridSearchCV from sklearn.model_selection import cross_validate from sklearn.svm import SVR from RegressionMetrics import RegressorMetrics from numpy import arange from timeit import default_timer as timer # from numba import jit, cuda , float32 # @jit(target...
Tecvico/Non-motor-Outcome-Prediction-in-Parkinson-s-Disease-Using-Novel-HMLS-and-Radiomics-Features
Regression/svm_RBF.py
svm_RBF.py
py
2,644
python
en
code
0
github-code
18
[ { "api_name": "timeit.default_timer", "line_number": 35, "usage_type": "call" }, { "api_name": "numpy.arange", "line_number": 40, "usage_type": "call" }, { "api_name": "sklearn.model_selection.GridSearchCV", "line_number": 43, "usage_type": "call" }, { "api_name":...
70688205481
"""Plotting functions This module contains various functions to plot graphs and algorithms. """ __author__ = 'Henry Robbins' __all__ = ['tour_plot', 'tree_plot', 'dijkstras_plot', 'mst_algorithm_plot', 'tsp_heuristic_plot', 'create_tour_plot', 'create_spanning_tree_plot', 'assisted_mst_algorithm...
engri-1101/vinal
vinal/plot.py
plot.py
py
37,428
python
en
code
3
github-code
18
[ { "api_name": "pkgutil.get_data", "line_number": 59, "usage_type": "call" }, { "api_name": "pkgutil.get_data", "line_number": 61, "usage_type": "call" }, { "api_name": "pkgutil.get_data", "line_number": 64, "usage_type": "call" }, { "api_name": "typing.List", ...
74928667879
""" [전화번호 목록] 전화번호부에 적힌 전화번호를 담은 배열 phone_book 이 solution 함수의 매개변수로 주어질 때, 어떤 번호가 다른 번호의 접두어인 경우가 있으면 false를 그렇지 않으면 true를 return 하도록 solution 함수를 작성하기 """ from typing import List def solution01(phone_book:List) -> bool: """어떤 번호가 다른 번호의 접두어로 존재하는지 판단하는 함수 Args: phone_book (List): 전화번호부에 적힌 전화번호를 담은 ...
JeHa00/TIL
DataStructure_Algorithum/Programmers_High_score_kit/hash/전화번호_목록.py
전화번호_목록.py
py
3,620
python
ko
code
1
github-code
18
[ { "api_name": "typing.List", "line_number": 8, "usage_type": "name" }, { "api_name": "typing.List", "line_number": 38, "usage_type": "name" }, { "api_name": "typing.List", "line_number": 56, "usage_type": "name" }, { "api_name": "typing.List", "line_number": 7...
929486807
"""Site theme per user Revision ID: e73842c57ec7 Revises: 8e8ba38bf52e Create Date: 2022-04-16 16:03:50.623816 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'e73842c57ec7' down_revision = '8e8ba38bf52e' branch_labels = None depends_on = None def upgrade(): ...
mja00/swarmsmp-site
services/web/migrations/versions/e73842c57ec7_site_theme_per_user.py
e73842c57ec7_site_theme_per_user.py
py
673
python
en
code
1
github-code
18
[ { "api_name": "alembic.op.add_column", "line_number": 21, "usage_type": "call" }, { "api_name": "alembic.op", "line_number": 21, "usage_type": "name" }, { "api_name": "sqlalchemy.Column", "line_number": 21, "usage_type": "call" }, { "api_name": "sqlalchemy.String"...
16454617370
import numpy as np import scipy.special import scipy.linalg from src.classes import Atom from src.classes import Vector from src.radial_part import compute_radial_part from src.gaunt_integral import compute_real_sph_harm from matplotlib import pyplot LMAX = 2 cg_coefficients = np.load("cg-coefficients.npy") atoms =...
yernende/schrodinger-calculator
swmain.py
swmain.py
py
4,442
python
en
code
1
github-code
18
[ { "api_name": "numpy.load", "line_number": 13, "usage_type": "call" }, { "api_name": "src.classes.Atom", "line_number": 16, "usage_type": "call" }, { "api_name": "numpy.exp", "line_number": 21, "usage_type": "call" }, { "api_name": "numpy.exp", "line_number": ...
41090032893
from django.shortcuts import render from django.http import JsonResponse from .models import Client def get_all_clients(request): if request.method == "GET": clients = Client.objects.filter() clients_list = [] for client in clients: clients_list.append({"id": client.id, "name":...
oakbani/kdsp-portal
admin-portal/clients/views.py
views.py
py
389
python
en
code
0
github-code
18
[ { "api_name": "models.Client.objects.filter", "line_number": 8, "usage_type": "call" }, { "api_name": "models.Client.objects", "line_number": 8, "usage_type": "attribute" }, { "api_name": "models.Client", "line_number": 8, "usage_type": "name" }, { "api_name": "dj...
29491705155
import numpy as np from numpy.typing import ArrayLike, NDArray from typing import Literal, Tuple, Union from ..utils._validations import _ensure_ndarray from ..transforms.householder import house def house_hess( a: ArrayLike, mode: Literal["full", "hess"] = "full", overwrite_a: bool = False ) -> Union[Tup...
gittasche/linalg
linalg/eig_unsym/house_hess.py
house_hess.py
py
1,291
python
en
code
0
github-code
18
[ { "api_name": "numpy.typing.ArrayLike", "line_number": 9, "usage_type": "name" }, { "api_name": "typing.Literal", "line_number": 10, "usage_type": "name" }, { "api_name": "utils._validations._ensure_ndarray", "line_number": 14, "usage_type": "call" }, { "api_name"...
75257136679
from tensorflow.keras.models import load_model from tensorflow.keras.preprocessing import image import numpy as np import os import argparse import csv parser = argparse.ArgumentParser() parser.add_argument("folder", type=str) args = parser.parse_args() folder_path = args.folder # image folder # folder_...
Gestapo07/AIMLC-Hackathon
inference1.py
inference1.py
py
1,289
python
en
code
0
github-code
18
[ { "api_name": "argparse.ArgumentParser", "line_number": 8, "usage_type": "call" }, { "api_name": "tensorflow.keras.models.load_model", "line_number": 19, "usage_type": "call" }, { "api_name": "os.listdir", "line_number": 22, "usage_type": "call" }, { "api_name": "...
3769599664
import logging import pandas as pd import matplotlib.pyplot as plt import numpy as np import argparse import os # TE Age Landscapes # Heavily modified from 11 August 2019 script by Jenna R. Grimshaw (jenna.grimshaw@ttu.edu) # This script will take bedfiles and reformat into separate columns as follows: # Scaffold, TE,...
npaulat/teava
01/TE_landscape_mya_bins.py
TE_landscape_mya_bins.py
py
4,976
python
en
code
2
github-code
18
[ { "api_name": "argparse.ArgumentParser", "line_number": 15, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 59, "usage_type": "call" }, { "api_name": "os.path.basename", "line_number": 64, "usage_type": "call" }, { "api_name": "os.path", ...
41342629269
#imports the sqlite3 module, allowing use of its classes and methods import sqlite3 #establishes the connection and sets it to variable 'connection', if there is no "Test_database.db" #it will be created and the connection will be established connection = sqlite3.connect("C:/Choose_your_file_path_here_where_you_want/T...
Itz-Djin/TTA-Python-Projects
Assignments/exampleSQLite3.py
exampleSQLite3.py
py
4,087
python
en
code
0
github-code
18
[ { "api_name": "sqlite3.connect", "line_number": 6, "usage_type": "call" }, { "api_name": "sqlite3.connect", "line_number": 38, "usage_type": "call" }, { "api_name": "sqlite3.connect", "line_number": 61, "usage_type": "call" } ]
26952796979
import clinica.pipelines.engine as cpe class PetSurface(cpe.PETPipeline): """PetSurface - Surface-based processing of PET images. Returns: A clinica pipeline object containing the PetSurface pipeline. """ def check_pipeline_parameters(self): """Check pipeline parameters.""" s...
aramis-lab/clinica
clinica/pipelines/pet_surface/pet_surface_pipeline.py
pet_surface_pipeline.py
py
16,614
python
en
code
196
github-code
18
[ { "api_name": "clinica.pipelines.engine.PETPipeline", "line_number": 4, "usage_type": "attribute" }, { "api_name": "clinica.pipelines.engine", "line_number": 4, "usage_type": "name" }, { "api_name": "os.path.join", "line_number": 59, "usage_type": "call" }, { "api...
35679326451
import plotly.graph_objects as go import pandas as pd z_data = pd.read_csv( "https://raw.githubusercontent.com/plotly/datasets/master/api_docs/mt_bruno_elevation.csv" ) fig = go.Figure( data=go.Surface(z=z_data.values), layout=go.Layout( title="Mt Bruno Elevation", width=500, heigh...
rafaelmarino/hugo-plotly
scripts/mt-bruno.py
mt-bruno.py
py
462
python
en
code
0
github-code
18
[ { "api_name": "pandas.read_csv", "line_number": 4, "usage_type": "call" }, { "api_name": "plotly.graph_objects.Figure", "line_number": 8, "usage_type": "call" }, { "api_name": "plotly.graph_objects", "line_number": 8, "usage_type": "name" }, { "api_name": "plotly....
13077190652
import datetime as dt import src.auxiliares.generador_palabras as genp import src.auxiliares.funciones_generales as funcs def main(): """ Declara manualmente los valores de los distintos diccionarios que establecen qué fichas usar en cada dia y rango horario, y dependiendo si se juega con palabras o ...
LoreOth/MemPy-game
src/auxiliares/Criterios.py
Criterios.py
py
7,125
python
es
code
1
github-code
18
[ { "api_name": "src.auxiliares.funciones_generales.get_info_usuario_actual", "line_number": 17, "usage_type": "call" }, { "api_name": "src.auxiliares.funciones_generales", "line_number": 17, "usage_type": "name" }, { "api_name": "datetime.datetime.now", "line_number": 18, ...
39230371157
from flask import Flask from flask import render_template from flask import jsonify,json from flask import request app = Flask(__name__) with open('books.json') as file: book_json = json.load(file) @app.route("/") def home(): return '<h1> My app </h1>' @app.route('/api/books/', methods=['GET']) def api():...
Makha008/Python-Web
Flask/Book/book_store.py
book_store.py
py
1,015
python
fr
code
0
github-code
18
[ { "api_name": "flask.Flask", "line_number": 6, "usage_type": "call" }, { "api_name": "flask.json.load", "line_number": 10, "usage_type": "call" }, { "api_name": "flask.json", "line_number": 10, "usage_type": "name" }, { "api_name": "flask.jsonify", "line_numbe...
71704251239
import urllib from collections import OrderedDict from apps.crowd.models.segprob import SegmentationProblem try: from cStringIO import StringIO except: from StringIO import StringIO # ============== # Django imports # ============== from django.contrib.auth.decorators import login_required, user_passes_tes...
tonysilva1989/COSE
apps/crowd/views/workers.py
workers.py
py
5,221
python
en
code
0
github-code
18
[ { "api_name": "django.core.context_processors.csrf", "line_number": 42, "usage_type": "call" }, { "api_name": "crowd.models.assignment.AssignmentSession.objects.get_by_worker", "line_number": 46, "usage_type": "call" }, { "api_name": "crowd.models.assignment.AssignmentSession.obj...
20653500164
import requests import json import os from requests import HTTPError class Cell: def __init__(self, cell_data): self.owner = cell_data['o'] self.attacker = cell_data['a'] self.isTaking = cell_data['c'] == 1 self.x = cell_data['x'] self.y = cell_data['y'] self.occup...
evilnose/colorfight_arsenal
cf_client.py
cf_client.py
py
11,615
python
en
code
0
github-code
18
[ { "api_name": "os.path.isfile", "line_number": 97, "usage_type": "call" }, { "api_name": "os.path", "line_number": 97, "usage_type": "attribute" }, { "api_name": "requests.post", "line_number": 111, "usage_type": "call" }, { "api_name": "json.dumps", "line_num...
71178797481
import csv from datetime import date, datetime import json from shapely.geometry import Point, shape from pymongo import MongoClient config = json.loads(open("config.json").read()) # Gets the database to input data to from MongoDB client = MongoClient('mongodb://'+config['mongo_user']+':'+config['mongo_pass']+'@'+con...
gigarza/sf-dispatches
data.py
data.py
py
3,821
python
en
code
0
github-code
18
[ { "api_name": "json.loads", "line_number": 7, "usage_type": "call" }, { "api_name": "pymongo.MongoClient", "line_number": 10, "usage_type": "call" }, { "api_name": "shapely.geometry.shape", "line_number": 15, "usage_type": "call" }, { "api_name": "json.load", ...
74940122599
from django.urls import path from . import views urlpatterns = [ path('', views.index,name='index'), path('home/', views.home,name='home'), path('employ/acer/', views.home, name='home'), path('create/', views.create, name='create'), path('employee/<slug:name>/', views.employ, name='detail'), p...
heerapp/first
main/urls.py
urls.py
py
1,010
python
en
code
0
github-code
18
[ { "api_name": "django.urls.path", "line_number": 6, "usage_type": "call" }, { "api_name": "django.urls.path", "line_number": 7, "usage_type": "call" }, { "api_name": "django.urls.path", "line_number": 8, "usage_type": "call" }, { "api_name": "django.urls.path", ...
7537035952
from django.core.exceptions import ValidationError from rest_framework import serializers from ..accounts.models import AccountCollaborator from ..invitations.models import InvitedUser from ..accounts.permissions import AccountPermission from ..users.serializers import NestedUserSerializer, UserSimpleSerializer from ...
GetBlimp/boards-backend
blimp_boards/boards/serializers.py
serializers.py
py
5,781
python
en
code
16
github-code
18
[ { "api_name": "rest_framework.serializers.ModelSerializer", "line_number": 12, "usage_type": "attribute" }, { "api_name": "rest_framework.serializers", "line_number": 12, "usage_type": "name" }, { "api_name": "users.serializers.NestedUserSerializer", "line_number": 13, "u...
1085886019
################################################# # import libraries ################################################# import datetime as dt from dateutil.relativedelta import relativedelta import numpy as np import pandas as pd import sqlalchemy from sqlalchemy.ext.automap import automap_base from sqlalchemy.orm impo...
hej6853/sqlAlchemy_Challenge_Surfs_Up
app.py
app.py
py
4,904
python
en
code
0
github-code
18
[ { "api_name": "sqlalchemy.create_engine", "line_number": 22, "usage_type": "call" }, { "api_name": "sqlalchemy.ext.automap.automap_base", "line_number": 25, "usage_type": "call" }, { "api_name": "sqlalchemy.orm.Session", "line_number": 37, "usage_type": "call" }, { ...
2522171172
import click import fitz import re pattern = r"(.*?)\.{2,}(\d*)" def split_line(line): match = re.search(pattern, line) return match.groups() def parse_toc(page:int, offset:int, input_pdf:str): doc = fitz.open(input_pdf) toc_page = doc.load_page(page) for line in toc_page.get_text().split("\n")...
DC23/pdf-bookmarker
create_outline.py
create_outline.py
py
1,235
python
en
code
0
github-code
18
[ { "api_name": "re.search", "line_number": 9, "usage_type": "call" }, { "api_name": "fitz.open", "line_number": 14, "usage_type": "call" }, { "api_name": "click.command", "line_number": 29, "usage_type": "call" }, { "api_name": "click.option", "line_number": 30...
10750351316
import time from datetime import timedelta import logger import redis from redis import Redis # Fixed Window def fixed_window_max_requests_per_seconds( r: Redis, keys: list, limit: int, period: timedelta ): return_value = True # Fails closed for key in keys: if r.setnx(key, limit): # If key doe...
rickramgattie/centralized_rate_limiter
ratelimiter.py
ratelimiter.py
py
3,037
python
en
code
0
github-code
18
[ { "api_name": "redis.Redis", "line_number": 11, "usage_type": "name" }, { "api_name": "datetime.timedelta", "line_number": 11, "usage_type": "name" }, { "api_name": "redis.WatchError", "line_number": 31, "usage_type": "attribute" }, { "api_name": "logger.info", ...
34786779164
from sqlalchemy import select from sqlalchemy.orm import joinedload from app.models import Diary, DiaryProduct from app.repositories.errors import EntityNotFound from app.repositories.sqlalchemy_repo import SQLAlchemyRepository class DiaryRepository(SQLAlchemyRepository): """Diary repository""" async def li...
hutanmihai/FMI
Anul II/Semestrul II/MDS/ProiectMDS/calorie-tracker-backend/app/repositories/diary_repo.py
diary_repo.py
py
1,733
python
en
code
1
github-code
18
[ { "api_name": "app.repositories.sqlalchemy_repo.SQLAlchemyRepository", "line_number": 9, "usage_type": "name" }, { "api_name": "sqlalchemy.select", "line_number": 15, "usage_type": "call" }, { "api_name": "app.models.Diary", "line_number": 15, "usage_type": "argument" }...
12474808025
from flask import Flask, jsonify, Blueprint, request import uuid from datetime import datetime from http import HTTPStatus import requests class User: def __init__(self, name, birth_date, gender): self._id = str(uuid.uuid4()) self._name = name self._birth_date = birth_date self._ge...
abispo/apex_flask_aula_01
main.py
main.py
py
3,303
python
en
code
1
github-code
18
[ { "api_name": "uuid.uuid4", "line_number": 10, "usage_type": "call" }, { "api_name": "flask.Flask", "line_number": 52, "usage_type": "call" }, { "api_name": "flask.request.args.get", "line_number": 57, "usage_type": "call" }, { "api_name": "flask.request.args", ...