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
27246554222
import open3d as o3d import numpy as np def visualize_pcd(pcd, color): pcd_pcd = o3d.geometry.PointCloud() pcd_pcd.points = o3d.utility.Vector3dVector(pcd) colors = np.zeros(pcd.shape) colors[:,0] = color[0] colors[:,1] = color[1] colors[:,2] = color[2] pcd_pcd.colors = o3d.utility.Vector3dV...
MiaoDragon/pracsys-vbcpm
problem_formulation/scripts/visual_utilities.py
visual_utilities.py
py
968
python
en
code
0
github-code
6
[ { "api_name": "open3d.geometry.PointCloud", "line_number": 4, "usage_type": "call" }, { "api_name": "open3d.geometry", "line_number": 4, "usage_type": "attribute" }, { "api_name": "open3d.utility.Vector3dVector", "line_number": 5, "usage_type": "call" }, { "api_na...
18663737995
import csv import json from urllib import request import urllib.request import time import datetime as d datefile = 'dht11_jeu_' + str(d.datetime.now().date()) + '.csv' with open(datefile, "a+") as file_object: fieldnames = ['date', 'time', 'temp', 'humidity'] spamwriter = csv.DictWriter(file_object, fieldnam...
vultorio67/domoticz-get-data
getdata.py
getdata.py
py
1,583
python
en
code
0
github-code
6
[ { "api_name": "datetime.datetime.now", "line_number": 8, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 8, "usage_type": "attribute" }, { "api_name": "csv.DictWriter", "line_number": 12, "usage_type": "call" }, { "api_name": "datetime.da...
6011091657
nytimes_com = ''' This New Liquid Is Magnetic, and Mesmerizing Scientists have created “soft” magnets that can flow and change shape, and that could be a boon to medicine and robotics. (Source: New York Times) Most Wikipedia Profiles Are of Men. This Scientist Is Changing That. Jessica Wade has added nearly 700 ...
szendrot/Text_based_browser
Text_based_browser/Text_based_browser_3.py
Text_based_browser_3.py
py
2,773
python
en
code
0
github-code
6
[ { "api_name": "sys.argv", "line_number": 43, "usage_type": "attribute" }, { "api_name": "collections.deque", "line_number": 45, "usage_type": "call" }, { "api_name": "os.path.isdir", "line_number": 47, "usage_type": "call" }, { "api_name": "os.path", "line_num...
16417727924
# -*- coding: utf-8 -*- import psycopg2 from psycopg2.extras import DictCursor from pythinkutils.postgresql.ThinkPG import ThinkPG from pythinkutils.common.object2json import * class MenuService(object): @classmethod def get_menus(cls): conn = ThinkPG.get_conn_pool_ex().getconn() cur = conn...
ThinkmanWang/ThinkClub
service/MenuService.py
MenuService.py
py
1,736
python
en
code
0
github-code
6
[ { "api_name": "pythinkutils.postgresql.ThinkPG.ThinkPG.get_conn_pool_ex", "line_number": 14, "usage_type": "call" }, { "api_name": "pythinkutils.postgresql.ThinkPG.ThinkPG", "line_number": 14, "usage_type": "name" }, { "api_name": "psycopg2.extras", "line_number": 15, "us...
10542851196
import logging from django import forms from django.contrib import messages from django.contrib.auth.decorators import login_required from django.db.models.functions import Lower from django.http import HttpResponseRedirect from django.shortcuts import render from django.template.defaultfilters import pluralize from d...
SmartCambridge/tfc_web
tfc_web/authmultitoken/views.py
views.py
py
6,140
python
en
code
3
github-code
6
[ { "api_name": "logging.getLogger", "line_number": 22, "usage_type": "call" }, { "api_name": "models.Token.objects.filter", "line_number": 28, "usage_type": "call" }, { "api_name": "models.Token.objects", "line_number": 28, "usage_type": "attribute" }, { "api_name"...
10930932116
from datetime import datetime from alertaclient.utils import DateTime class Alert: def __init__(self, resource, event, **kwargs): if not resource: raise ValueError('Missing mandatory value for "resource"') if not event: raise ValueError('Missing mandatory value for "event...
alerta/python-alerta-client
alertaclient/models/alert.py
alert.py
py
5,987
python
en
code
27
github-code
6
[ { "api_name": "datetime.datetime.utcnow", "line_number": 34, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 34, "usage_type": "name" }, { "api_name": "datetime.datetime.utcnow", "line_number": 43, "usage_type": "call" }, { "api_name": "d...
10667150722
import asyncio import base64 import os import urllib import aiohttp import aiofiles from bs4 import BeautifulSoup import traceback import time basic_url = "http://www.birdnet.cn/" base_save_path = "./pic" # 图片保存父级目录 headers = { 'Host': 'www.birdnet.cn', 'Connection': 'keep-alive', 'Cache-Control': 'max-age...
A11en0/Craw
async_craw_bird.py
async_craw_bird.py
py
7,237
python
en
code
0
github-code
6
[ { "api_name": "asyncio.Queue", "line_number": 31, "usage_type": "call" }, { "api_name": "os.path.exists", "line_number": 35, "usage_type": "call" }, { "api_name": "os.path", "line_number": 35, "usage_type": "attribute" }, { "api_name": "os.mkdir", "line_number...
31162330663
from django.shortcuts import render, redirect from django.http import JsonResponse from .models import AutoCharacters, AutoBrand, AutoModels, User, TestDriveModel, TechnicalService from .forms import CarFilterForm, TechnicalServiceForm, TestDriveForm, UserRegisterForm, AddEntryForm from django.core.paginator import Pag...
NightLord013/DialogAuto
main_app/views.py
views.py
py
5,270
python
en
code
0
github-code
6
[ { "api_name": "models.AutoCharacters.objects.all", "line_number": 13, "usage_type": "call" }, { "api_name": "models.AutoCharacters.objects", "line_number": 13, "usage_type": "attribute" }, { "api_name": "models.AutoCharacters", "line_number": 13, "usage_type": "name" },...
14565762406
import re import pyodbc import strconn #Open New Database Connection With Cursor def newDbConCursor(): connectionString = strconn.GetConnectionString() conn = pyodbc.connect(connectionString) cursor = conn.cursor() return cursor #Execute Any NonQuery def runQry(qry2exec, qryparam): cursor = newD...
sledgerworld/geeksprofile
runSqlQry.py
runSqlQry.py
py
621
python
en
code
0
github-code
6
[ { "api_name": "strconn.GetConnectionString", "line_number": 8, "usage_type": "call" }, { "api_name": "pyodbc.connect", "line_number": 9, "usage_type": "call" } ]
10930881006
import click from alertaclient.utils import action_progressbar, build_query @click.command('shelve', short_help='Shelve alerts') @click.option('--ids', '-i', metavar='ID', multiple=True, help='List of alert IDs (can use short 8-char id)') @click.option('--query', '-q', 'query', metavar='QUERY', help='severity:"warni...
alerta/python-alerta-client
alertaclient/commands/cmd_shelve.py
cmd_shelve.py
py
1,209
python
en
code
27
github-code
6
[ { "api_name": "alertaclient.utils.build_query", "line_number": 22, "usage_type": "call" }, { "api_name": "alertaclient.utils.action_progressbar", "line_number": 26, "usage_type": "call" }, { "api_name": "click.command", "line_number": 6, "usage_type": "call" }, { ...
10486398862
from __future__ import annotations from collections import namedtuple from typing import Callable, Dict, Iterable, List, Optional, TypeVar import vega_sim.grpc.client as vac import vega_sim.proto.data_node.api.v1 as data_node_protos import vega_sim.proto.data_node.api.v2 as data_node_protos_v2 import vega_sim.proto.v...
PeteWilliams/vega-market-sim
vega_sim/api/data_raw.py
data_raw.py
py
9,711
python
en
code
null
github-code
6
[ { "api_name": "collections.namedtuple", "line_number": 12, "usage_type": "call" }, { "api_name": "typing.TypeVar", "line_number": 14, "usage_type": "call" }, { "api_name": "typing.TypeVar", "line_number": 15, "usage_type": "call" }, { "api_name": "typing.TypeVar",...
35014362353
# coding: utf-8 import pickle import gzip from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.linear_model import PassiveAggressiveClassifier from sklearn.decomposition import TruncatedSVD from app import app from app.redis.objects import Objects as Redis_objects from app.redis.connect import Con...
jasonsmithj/spam_public
app/ml/train.py
train.py
py
3,958
python
ja
code
0
github-code
6
[ { "api_name": "app.redis.objects.Objects", "line_number": 38, "usage_type": "call" }, { "api_name": "app.app.config.from_object", "line_number": 76, "usage_type": "call" }, { "api_name": "app.app.config", "line_number": 76, "usage_type": "attribute" }, { "api_name...
31646350426
from django.urls import path from TreeApp import views urlpatterns = [ # Путь к странице с элементом Ext.tree.Panel, все узды которого загружаются сразу же при открытии страницы path('', views.tree_index), # url-адрес, по которому клиент получает JSON-файл, содержащий данные для дерева path('get_json_...
ArturV19/for_stack_overflow_extjs_lazy_load
TreeApp/urls.py
urls.py
py
1,162
python
ru
code
0
github-code
6
[ { "api_name": "django.urls.path", "line_number": 6, "usage_type": "call" }, { "api_name": "TreeApp.views.tree_index", "line_number": 6, "usage_type": "attribute" }, { "api_name": "TreeApp.views", "line_number": 6, "usage_type": "name" }, { "api_name": "django.urls...
2672403586
import logging from enum import Enum import pygame from conts import HEIGHT, TILE_SIZE, WIDTH from paths import TILE_PATH_MAP import numpy as np class TILE_TYPES(Enum): NONE = 0 PATH = 1 START_POINT = 2 END_POINT = 3 LIFT = 4 class Tile(pygame.sprite.Sprite): """ Tile represents a leve...
striderwalk/robot
level/tile.py
tile.py
py
3,111
python
en
code
0
github-code
6
[ { "api_name": "enum.Enum", "line_number": 11, "usage_type": "name" }, { "api_name": "pygame.sprite", "line_number": 19, "usage_type": "attribute" }, { "api_name": "pygame.transform.scale", "line_number": 26, "usage_type": "call" }, { "api_name": "pygame.transform"...
8219476680
''' Caitlyn Singam, (c) 2017 Spectre - deanonymiser software 07 April 2017 (Bitcamp 2017) ''' from pprint import pprint from jsonmerge import merge from jsonmerge import Merger import json import os import string from collections import Counter import itertools import requests import numpy as np import gmplot #for j...
csingam/specter
spectre_3_3_2-bitcamp.py
spectre_3_3_2-bitcamp.py
py
3,603
python
en
code
0
github-code
6
[ { "api_name": "jsonmerge.Merger", "line_number": 30, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 47, "usage_type": "call" }, { "api_name": "json.load", "line_number": 55, "usage_type": "call" }, { "api_name": "os.listdir", "line_number...
14029922480
from typing import Optional import torch class STFT(torch.nn.Module): def __init__( self, n_fft: int, hop_length: Optional[int] = None, window_type: Optional[str] = "hann", pad_mode: Optional[str] = "constant", device: Optional[str] = "cpu", ): super()....
TakuyaFujimura/DPMusical
util/stft.py
stft.py
py
1,298
python
en
code
1
github-code
6
[ { "api_name": "torch.nn", "line_number": 6, "usage_type": "attribute" }, { "api_name": "typing.Optional", "line_number": 10, "usage_type": "name" }, { "api_name": "typing.Optional", "line_number": 11, "usage_type": "name" }, { "api_name": "typing.Optional", "l...
23397720979
import numpy as np import blosc import requests class MSELoss: def __init__(self, ip: str = "localhost") -> None: self.logits = None self.targets = None self.ip = ip def forward(self, logits: np.ndarray, targets: np.ndarray) -> np.ndarray: self.logits = blosc.pack_array(logits)...
iVishalr/dockerNN
dockernn/nn/MSELoss.py
MSELoss.py
py
1,572
python
en
code
5
github-code
6
[ { "api_name": "numpy.ndarray", "line_number": 11, "usage_type": "attribute" }, { "api_name": "blosc.pack_array", "line_number": 12, "usage_type": "call" }, { "api_name": "blosc.pack_array", "line_number": 13, "usage_type": "call" }, { "api_name": "requests.post", ...
27923742930
import numpy as np from sklearn.model_selection import train_test_split #import matplotlib.pyplot as plt w1= np.random.rand() w2= np.random.rand() w3= np.random.rand() data = np.loadtxt('ex2data1.txt',delimiter = ',' ,dtype = None) X = data[:,[0,1]] Y = data[:,2] X = np.hstack((np.matrix(np.ones(X.shape[0])).T...
ankitlohiya212/basic-ml-problems
Basic ML problems/Logistic Regression.py
Logistic Regression.py
py
3,112
python
en
code
0
github-code
6
[ { "api_name": "numpy.random.rand", "line_number": 4, "usage_type": "call" }, { "api_name": "numpy.random", "line_number": 4, "usage_type": "attribute" }, { "api_name": "numpy.random.rand", "line_number": 5, "usage_type": "call" }, { "api_name": "numpy.random", ...
11633390653
"""Main app module""" from logging import getLogger from fastapi import FastAPI from uvicorn import run from app.endpoints import list_of_routes from app.config.default import DefaultSettings as settings logger = getLogger(__name__) def bind_routes(application: FastAPI, setting: settings) -> None: """ Bind...
Dmitrij-Salenkoff/WindyApp_TestTask
app/main.py
main.py
py
1,479
python
en
code
0
github-code
6
[ { "api_name": "logging.getLogger", "line_number": 10, "usage_type": "call" }, { "api_name": "fastapi.FastAPI", "line_number": 13, "usage_type": "name" }, { "api_name": "app.config.default.DefaultSettings", "line_number": 13, "usage_type": "name" }, { "api_name": "...
14889754007
"""The module that initializes and runs the step by step WEI workflow""" import traceback from typing import Any, Dict, Optional from wei.core.data_classes import ( Module, Step, StepResponse, StepStatus, WorkcellData, Workflow, WorkflowRun, WorkflowStatus, ) from wei.core.experiment im...
AD-SDL/wei
wei/core/workflow.py
workflow.py
py
6,280
python
en
code
1
github-code
6
[ { "api_name": "wei.core.state_manager.StateManager", "line_number": 22, "usage_type": "call" }, { "api_name": "wei.core.data_classes.Step", "line_number": 25, "usage_type": "name" }, { "api_name": "wei.core.data_classes.WorkflowRun", "line_number": 47, "usage_type": "name...
11127538836
import cv2 import numpy as np import region_grow import get_boundary import matplotlib.pyplot as plt def extract_vein_by_region_grow(image, img, threshold_perimeter, threshold_kernel_boundary): # get boundary boundary = get_boundary.get_boundary(image) canvas_boundary = np.zeros(img.shape[:2], dtype=np.u...
ZhengPeng7/Python-OpenCV
10_29_local_enhancement/extract_vein_by_region_grow.py
extract_vein_by_region_grow.py
py
9,079
python
en
code
0
github-code
6
[ { "api_name": "get_boundary.get_boundary", "line_number": 11, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_number": 12, "usage_type": "call" }, { "api_name": "numpy.uint8", "line_number": 12, "usage_type": "attribute" }, { "api_name": "cv2.getStructu...
30386483548
# import matplotlib.pyplot as plt # coding=utf-8 from __future__ import print_function import numpy as np import numpy.linalg as LA from numpy import pi import sys import socket import time import commands import socket # socket模块 import datetime import time import ENN # s = socket.socket(socket.AF_INET, socket.SOC...
Cedaroski/KukaCon
KukaENNcontrol/423.py
423.py
py
8,696
python
en
code
0
github-code
6
[ { "api_name": "time.sleep", "line_number": 30, "usage_type": "call" }, { "api_name": "numpy.linalg.pinv", "line_number": 38, "usage_type": "call" }, { "api_name": "numpy.linalg", "line_number": 38, "usage_type": "attribute" }, { "api_name": "numpy.dot", "line_...
43371603126
import numpy as np import torch import torch.nn.functional as F import torch.nn as nn from torchvision.utils import make_grid, save_image import matplotlib.pyplot as plt import math def right(i, L): """Returns the index of the spin to the right of the spin at index i. Implements periodic boundary conditions. Args: ...
signalnoise/rbm_sampling
ising_methods_new.py
ising_methods_new.py
py
9,541
python
en
code
0
github-code
6
[ { "api_name": "torch.zeros", "line_number": 44, "usage_type": "call" }, { "api_name": "torch.add", "line_number": 47, "usage_type": "call" }, { "api_name": "torch.mul", "line_number": 47, "usage_type": "call" }, { "api_name": "torch.ones", "line_number": 60, ...
33950774012
import json, os, requests, sys, io import pandas as pd import numpy as np from google.cloud import vision, storage, speech from google.cloud import videointelligence_v1 as vi from google.oauth2 import service_account from pandas import json_normalize from typing import Optional, Sequence #============================...
strategiepilot/alpspitze
googleAPIfuncs.py
googleAPIfuncs.py
py
13,908
python
en
code
0
github-code
6
[ { "api_name": "google.oauth2.service_account.Credentials.from_service_account_file", "line_number": 23, "usage_type": "call" }, { "api_name": "google.oauth2.service_account.Credentials", "line_number": 23, "usage_type": "attribute" }, { "api_name": "google.oauth2.service_account"...
797123882
import unittest from app import app, db from app.models import User, Book, BookList, BookListBook, Serie, BookSerie, SeriePart, BorrowedBook from datetime import date class TestModels(unittest.TestCase): def setUp(self): app.config['TESTING'] = True app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql+p...
AdrienDEBREUILLY/Library_perso_and_family
tests/test_models.py
test_models.py
py
4,997
python
en
code
0
github-code
6
[ { "api_name": "unittest.TestCase", "line_number": 7, "usage_type": "attribute" }, { "api_name": "app.app.config", "line_number": 9, "usage_type": "attribute" }, { "api_name": "app.app", "line_number": 9, "usage_type": "name" }, { "api_name": "app.app.config", ...
44676296286
from __future__ import annotations from typing import ( Dict, List, Optional, Set, Tuple, ) import heapq import math import logging from dbot.movement.collision import ( CollisionManager, CollisionMap, CollisionState, ) Point = Tuple[int, int] class Location: def __init__( ...
snwhd/dbot
dbot/movement/pathing.py
pathing.py
py
5,103
python
en
code
1
github-code
6
[ { "api_name": "typing.Tuple", "line_number": 21, "usage_type": "name" }, { "api_name": "dbot.movement.collision.CollisionManager", "line_number": 58, "usage_type": "name" }, { "api_name": "typing.Set", "line_number": 67, "usage_type": "name" }, { "api_name": "typi...
17925456673
import sys,math,pygame color=0,0,0 azul=(0,0,255) tamano= ancho, alto=500,500 pantalla=pygame.display.set_mode(tamano) pantalla.fill(color) def plotpoint (xc,yc,x,y): pantalla.set_at((xc+x, yc +y),azul) pantalla.set_at((xc-x, yc +y),azul) pantalla.set_at((xc+x, yc -y),azul) pantalla.set_at((xc-x, ...
ruben3452/com-grap
python-c.g/puntomMdioElipse.py
puntomMdioElipse.py
py
1,098
python
en
code
0
github-code
6
[ { "api_name": "pygame.display.set_mode", "line_number": 6, "usage_type": "call" }, { "api_name": "pygame.display", "line_number": 6, "usage_type": "attribute" }, { "api_name": "pygame.display.flip", "line_number": 26, "usage_type": "call" }, { "api_name": "pygame....
30357278221
from traits.api import HasTraits, Range, Float from traitsui.api import View, VGroup, HGroup, Item, ScrubberEditor, spring # -- Shared Item Definition ---------------------------------------- class TItem(Item): editor = ScrubberEditor() # -- ScrubberDemo Class ------------------------------------------------...
enthought/traitsui
traitsui/examples/demo/Advanced/Scrubber_editor_demo.py
Scrubber_editor_demo.py
py
2,247
python
en
code
290
github-code
6
[ { "api_name": "traitsui.api.Item", "line_number": 9, "usage_type": "name" }, { "api_name": "traitsui.api.ScrubberEditor", "line_number": 10, "usage_type": "call" }, { "api_name": "traits.api.HasTraits", "line_number": 16, "usage_type": "name" }, { "api_name": "tra...
36525461742
""" Web interface to draw trees. Requires Flask. Optional: pdflatex, tikz, imagemagick. """ # stdlib import io import os import re from subprocess import Popen, PIPE # Flask & co from flask import Flask, Response from flask import request, render_template, redirect, url_for from flask import send_from_directory # disco...
pombredanne/disco-dop
web/treedraw.py
treedraw.py
py
5,731
python
en
code
null
github-code
6
[ { "api_name": "re.compile", "line_number": 18, "usage_type": "call" }, { "api_name": "re.compile", "line_number": 20, "usage_type": "call" }, { "api_name": "re.compile", "line_number": 21, "usage_type": "call" }, { "api_name": "flask.Flask", "line_number": 37,...
71844084989
from django import forms from django_select2.cache import cache from django_select2.forms import ModelSelect2Widget class PriceInput(forms.NumberInput): input_type = "price" class PercentInput(forms.NumberInput): input_type = "percent" class DisabledNumberInput(forms.NumberInput): input_type = "disabl...
dbsiavichay/faclab
faclab/widgets.py
widgets.py
py
1,542
python
en
code
0
github-code
6
[ { "api_name": "django.forms.NumberInput", "line_number": 6, "usage_type": "attribute" }, { "api_name": "django.forms", "line_number": 6, "usage_type": "name" }, { "api_name": "django.forms.NumberInput", "line_number": 10, "usage_type": "attribute" }, { "api_name":...
15986698347
"""habari URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.9/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-base...
ppolle/habari
habari/urls.py
urls.py
py
2,241
python
en
code
4
github-code
6
[ { "api_name": "drf_yasg.views.get_schema_view", "line_number": 23, "usage_type": "call" }, { "api_name": "drf_yasg.openapi.Info", "line_number": 24, "usage_type": "call" }, { "api_name": "drf_yasg.openapi", "line_number": 24, "usage_type": "name" }, { "api_name": ...
2556227861
import datetime import inspect import json import subprocess import os from functools import wraps from .config import C_TO_RENAME_FILES, C_TO_PRINT_PACKAGE_INFO, C_TO_SAVE_LOGS, C_TO_PRINT_FFMPEG_DEBUG, \ C_TO_PRINT_EXECUTION_TIME, C_CODEC, C_CODEC_SETTINGS, C_TO_PRINT_ONLY_FFMPEG_ERRORS from .inc import replace_f...
LionelCrowl/ffmpeg-python-utils
ffmpeg_python_utils/main.py
main.py
py
37,084
python
en
code
1
github-code
6
[ { "api_name": "inspect.getfullargspec", "line_number": 21, "usage_type": "call" }, { "api_name": "os.access", "line_number": 44, "usage_type": "call" }, { "api_name": "os.R_OK", "line_number": 44, "usage_type": "attribute" }, { "api_name": "config.C_TO_RENAME_FILE...
50078491
from typing import List class Solution: def maxSubArray(self, nums: List[int]) -> int: # check input if len(nums) == 1: return nums[0] # dp table dp = [0] * len(nums) # initialize dp[0] = nums[0] # traverse dp table for i in range(1, len(...
code-cp/leetcode
solutions/53/main2.py
main2.py
py
590
python
en
code
0
github-code
6
[ { "api_name": "typing.List", "line_number": 4, "usage_type": "name" } ]
35367260715
# -*- coding: utf-8 -*- import pandas as pd import numpy as np from sklearn.decomposition import PCA from sklearn.cluster import DBSCAN from sklearn.ensemble import IsolationForest from sklearn.preprocessing import MinMaxScaler, StandardScaler, LabelEncoder, OneHotEncoder, RobustScaler import warnings warnings.filterwa...
ujeon9/Bank-Classification
dbscan.py
dbscan.py
py
6,086
python
en
code
0
github-code
6
[ { "api_name": "warnings.filterwarnings", "line_number": 9, "usage_type": "call" }, { "api_name": "pandas.crosstab", "line_number": 14, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 23, "usage_type": "call" }, { "api_name": "sklearn.prepro...
28051259647
from __future__ import absolute_import, print_function, division __author__ = 'Alistair Miles <alimanfoo@googlemail.com>' from tempfile import NamedTemporaryFile import cPickle as pickle from petl.testutils import ieq from petl.io.pickle import frompickle, topickle, appendpickle def test_frompickle(): """Te...
podpearson/petl
src/petl/test/io/test_pickle.py
test_pickle.py
py
1,689
python
en
code
null
github-code
6
[ { "api_name": "tempfile.NamedTemporaryFile", "line_number": 18, "usage_type": "call" }, { "api_name": "cPickle.dump", "line_number": 24, "usage_type": "call" }, { "api_name": "petl.io.pickle.frompickle", "line_number": 27, "usage_type": "call" }, { "api_name": "pe...
45385783786
# -*- coding: utf-8 -*- ##### System wide lib ##### from collections import OrderedDict from ludibrio import Stub ##### Theory lib ##### from theory.apps.model import Adapter, Command from theory.core.exceptions import ValidationError from theory.gui.common.baseField import * from theory.test.testcases import TestCase...
grapemix/theory
tests/gui/test/unitTest/common/testBaseField.py
testBaseField.py
py
3,590
python
en
code
1
github-code
6
[ { "api_name": "theory.test.testcases.TestCase", "line_number": 26, "usage_type": "name" }, { "api_name": "gui.test.integrationTest.etk.testDummyEnv.getDummyEnv", "line_number": 31, "usage_type": "call" }, { "api_name": "collections.OrderedDict", "line_number": 32, "usage_...
8117786608
from datetime import datetime from enum import Enum from typing import Tuple, List, Dict import gym from absl import logging from astropy.units import Quantity from astropy.time import Time, TimeDelta from gym import spaces from astropy.coordinates import solar_system_ephemeris from astropy import units as u from astr...
SafiDewshi/space_environment
gym_orbital_system/envs/full_solar_system.py
full_solar_system.py
py
17,773
python
en
code
0
github-code
6
[ { "api_name": "enum.Enum", "line_number": 23, "usage_type": "name" }, { "api_name": "enum.Enum", "line_number": 29, "usage_type": "name" }, { "api_name": "gym.Env", "line_number": 37, "usage_type": "attribute" }, { "api_name": "poliastro.bodies.SolarSystemPlanet",...
71969283709
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the Li...
kubeflow/kfp-tekton-backend
components/aws/sagemaker/train/src/train.py
train.py
py
5,935
python
en
code
8
github-code
6
[ { "api_name": "argparse.ArgumentParser", "line_number": 20, "usage_type": "call" }, { "api_name": "common._utils.add_default_client_arguments", "line_number": 21, "usage_type": "call" }, { "api_name": "common._utils", "line_number": 21, "usage_type": "name" }, { "...
655904217
import argparse import functools import json import os import pickle import subprocess from glob import glob from pathlib import Path from shutil import copyfile from warnings import warn from zipfile import ZipFile import imageio import numpy as np import torch import torch_em import bioimageio.core as core import b...
constantinpape/torch-em
torch_em/util/modelzoo.py
modelzoo.py
py
30,712
python
en
code
42
github-code
6
[ { "api_name": "numpy.concatenate", "line_number": 36, "usage_type": "call" }, { "api_name": "warnings.warn", "line_number": 69, "usage_type": "call" }, { "api_name": "warnings.warn", "line_number": 83, "usage_type": "call" }, { "api_name": "numpy.expand_dims", ...
38682941266
import logging def configure_logs(): logger = logging.getLogger("LOG") # Create handlers file_handler = logging.FileHandler(filename='domain/logs/logs.log', mode='a') stream_handler = logging.StreamHandler() file_formatter = logging.Formatter(fmt='%(asctime)s -- %(message)s', datefmt='%d-%b-...
LeonardoGomesG/PFC
domain/logs.py
logs.py
py
910
python
en
code
0
github-code
6
[ { "api_name": "logging.getLogger", "line_number": 5, "usage_type": "call" }, { "api_name": "logging.FileHandler", "line_number": 8, "usage_type": "call" }, { "api_name": "logging.StreamHandler", "line_number": 9, "usage_type": "call" }, { "api_name": "logging.Form...
34976995445
import PyQt5 import PyQt5.QtCore import PyQt5.QtGui import PyQt5.QtWidgets from PySide2.QtCore import * from Controllers.dndHandler import DragAndDropHandler from Models.Database.dotplotRepository import DotplotRepository from Models.Database.alignmentRepository import AlignmentRepository from Models.alignment import ...
rafalfelczynski/dna-alignment
Controllers/resultsController.py
resultsController.py
py
7,096
python
en
code
0
github-code
6
[ { "api_name": "Models.Database.dotplotRepository.DotplotRepository", "line_number": 26, "usage_type": "name" }, { "api_name": "Models.Database.alignmentRepository.AlignmentRepository", "line_number": 26, "usage_type": "name" }, { "api_name": "Controllers.dndHandler.DragAndDropHan...
19985937606
""" Audio Losses -- Experiments with creating an STFT loss -- will probably just use auraloss """ import auraloss import torch import torch.nn as nn from torchaudio.functional import detect_pitch_frequency class PitchMultiSTFTLoss(nn.Module): """ Combines pitch detection and multi-spectral loss """ ...
jorshi/torchsynth-grad-approx
noodling/loss.py
loss.py
py
1,388
python
en
code
10
github-code
6
[ { "api_name": "torch.nn.Module", "line_number": 13, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 13, "usage_type": "name" }, { "api_name": "auraloss.freq.MultiResolutionSTFTLoss", "line_number": 20, "usage_type": "call" }, { "api_name": "a...
22069019686
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Jul 13 14:37:21 2020 @author: dragoslol """ from bs4 import BeautifulSoup import requests import time, os import re from selenium import webdriver from selenium.webdriver.common.keys import Keys def ani_details(link): """ Scrapes off the detai...
fredlam1337/Metis_Summer2020
Project2_MAL/Code/MALFunc.py
MALFunc.py
py
13,179
python
en
code
0
github-code
6
[ { "api_name": "requests.get", "line_number": 32, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_number": 34, "usage_type": "call" }, { "api_name": "re.compile", "line_number": 40, "usage_type": "call" }, { "api_name": "re.IGNORECASE", "line_n...
73734276988
import os import platform import sys from typing import Dict, Any from hatchling.builders.hooks.plugin.interface import BuildHookInterface class CustomBuildHook(BuildHookInterface): def initialize(self, version: str, build_data: Dict[str, Any]) -> None: cur_dir = os.getcwd() libs_dir = os.path.jo...
Jedore/openctp-ctp-test
templates/hatch_build_hook.py
hatch_build_hook.py
py
1,532
python
en
code
0
github-code
6
[ { "api_name": "hatchling.builders.hooks.plugin.interface.BuildHookInterface", "line_number": 9, "usage_type": "name" }, { "api_name": "typing.Dict", "line_number": 10, "usage_type": "name" }, { "api_name": "typing.Any", "line_number": 10, "usage_type": "name" }, { ...
857280355
import torch import torch.nn as nn from .src import SampleNet class FCN_sampler(nn.Module): def __init__(self, fg_num_out_points=512, bg_num_out_points=512, complete_fps=False, group_size=7, backbone='pointnet', skip_projection=False): super(FCN_sampler, self).__init__() self.fg_s...
jimmy15923/unsup_point_coseg
models/samplers.py
samplers.py
py
1,453
python
en
code
25
github-code
6
[ { "api_name": "torch.nn.Module", "line_number": 5, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 5, "usage_type": "name" }, { "api_name": "src.SampleNet", "line_number": 9, "usage_type": "call" }, { "api_name": "src.SampleNet", "line_nu...
9772365331
import pandas as pd import matplotlib.pyplot as plt machines = pd.read_csv("MachineData.csv") machine_one = (machines.machineID == 1) machine_two = (machines.machineID == 2) machine_three = (machines.machineID == 3) machine_four = (machines.machineID == 4) machine_five = (machines.machineID == 5) fig = plt.figure(1,...
ManuelPllqr/InterfaceDateTimeAnalytics
RotateMachines.py
RotateMachines.py
py
1,835
python
en
code
0
github-code
6
[ { "api_name": "pandas.read_csv", "line_number": 4, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.figure", "line_number": 12, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 12, "usage_type": "name" }, { "api_name": "matplotlib....
17715106853
# -*- coding: utf-8 -*- import dash import dash_core_components as dcc import dash_html_components as html from dash.dependencies import Input, Output, State import pymongo import re external_stylesheets = ['https://codepen.io/chriddyp/pen/bWLwgP.css'] x = 0 app = dash.Dash(__name__, external_stylesheets=external_styl...
zhangjuynag96/Spider-and-Dash
Test/callback_test.py
callback_test.py
py
1,698
python
en
code
0
github-code
6
[ { "api_name": "dash.Dash", "line_number": 11, "usage_type": "call" }, { "api_name": "dash_html_components.Div", "line_number": 13, "usage_type": "call" }, { "api_name": "dash_core_components.Dropdown", "line_number": 14, "usage_type": "call" }, { "api_name": "dash...
9272076486
import torch.nn as nn from modules.agents.rnn_agent import RNNAgent import torch as th class RNNNSAgent(nn.Module): def __init__(self, input_shape, args): super(RNNNSAgent, self).__init__() self.args = args self.n_agents = args.n_agents self.input_shape = input_shape self.a...
superboySB/mamujoco-baselines
modules/agents/rnn_ns_agent.py
rnn_ns_agent.py
py
2,092
python
en
code
0
github-code
6
[ { "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.ModuleList", "line_number": 12, "usage_type": "call" }, { "api_name": "torch.nn", "line_...
15108945966
""" Abstract base classes related to import. Primarily for documentation purposes. """ from __future__ import absolute_import, division, print_function from mybuild._compat import * import abc # Everything below is derived from py3k importlib.abc class MetaPathFinder(ABCBase): """Abstract base class for import ...
abusalimov/mybuild
mybuild/util/importlib/abc.py
abc.py
py
4,210
python
en
code
3
github-code
6
[ { "api_name": "abc.abstractmethod", "line_number": 15, "usage_type": "attribute" }, { "api_name": "abc.abstractmethod", "line_number": 30, "usage_type": "attribute" }, { "api_name": "abc.abstractmethod", "line_number": 47, "usage_type": "attribute" }, { "api_name"...
34435485063
import streamlit as st from langchain import PromptTemplate from langchain.chains import LLMChain from langchain.chat_models import ChatOpenAI coverPrompt = PromptTemplate( input_variables=["cv", "cl1", "cl2", "jd"], template= """You write perfect cover letters that attract hiring managers everytime. Given...
gaschweickert/cover-letter-generator
app.py
app.py
py
5,271
python
en
code
0
github-code
6
[ { "api_name": "langchain.PromptTemplate", "line_number": 6, "usage_type": "call" }, { "api_name": "langchain.chat_models.ChatOpenAI", "line_number": 58, "usage_type": "call" }, { "api_name": "langchain.chains.LLMChain", "line_number": 59, "usage_type": "call" }, { ...
811380836
# Cut Off Trees for Golf Event - https://leetcode.com/problems/cut-off-trees-for-golf-event/ '''You are asked to cut off all the trees in a forest for a golf event. The forest is represented as an m x n matrix. In this matrix: 0 means the cell cannot be walked through. 1 represents an empty cell that can be walked thr...
Saima-Chaity/Leetcode
Matrix/Cut Off Trees for Golf Event.py
Cut Off Trees for Golf Event.py
py
2,610
python
en
code
0
github-code
6
[ { "api_name": "collections.deque", "line_number": 28, "usage_type": "call" } ]
70267328509
import random from epyk.core.data import chartJs # Socket server url SERVER_SOCKET_HOST = "127.0.0.1" SERVER_SOCKET_PORT = 5000 def get_page(page): print("Run Epyk Web page") server = page.data.js.server(SERVER_SOCKET_HOST, SERVER_SOCKET_PORT).addNamespace('news', alias="name") socket = page.js.socketio() s...
epykure/epyk-templates
tutos/onepy/socket_chat.py
socket_chat.py
py
2,106
python
en
code
17
github-code
6
[ { "api_name": "random.randint", "line_number": 41, "usage_type": "call" }, { "api_name": "random.randint", "line_number": 46, "usage_type": "call" }, { "api_name": "socketio.Server", "line_number": 55, "usage_type": "call" }, { "api_name": "socketio.WSGIApp", ...
20715137378
from sys import argv from time import sleep from os import getenv from dotenv import load_dotenv from supabase import Client, create_client from twitter import TwitterScarper from tlgrm import TelegramParser def main(screen_name, limit, supabase, twitter_scraper, telegram_parser): # Get the account Twitter ID, ...
FaresHerhar/tlgrm-bot
main.py
main.py
py
2,381
python
en
code
null
github-code
6
[ { "api_name": "supabase.table", "line_number": 17, "usage_type": "call" }, { "api_name": "time.sleep", "line_number": 38, "usage_type": "call" }, { "api_name": "supabase.table", "line_number": 42, "usage_type": "call" }, { "api_name": "sys.argv", "line_number"...
16005275603
""" @author: bspark """ import numpy as np from rtree import index def pointRect(coord): return (coord[0]-1, coord[1]-1, coord[0]+1, coord[1]+1) def lineRect(lineGraph, node1, node2): left = min(np.array(lineGraph.edge[node1][node2]['coordinates'])[:,0]) bottom = min(np.array(lineGraph.edge[node1][nod...
bumsubp/CA_HOV_Accidents
BPSpatial/FileIO/RTree.py
RTree.py
py
1,248
python
en
code
0
github-code
6
[ { "api_name": "numpy.array", "line_number": 11, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 12, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 13, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": ...
28414051873
import os import uuid from PIL import Image from django.conf import settings from django.contrib.auth.models import User from django.db import models # Create your models here. from django.urls import reverse def user_directory_path(instance, filename, ): path = 'user_{0}/profile_{1}.jpg'.format(instance.user.i...
Aadarsh-Verma/blog_clone
authy/models.py
models.py
py
1,167
python
en
code
0
github-code
6
[ { "api_name": "os.path.join", "line_number": 15, "usage_type": "call" }, { "api_name": "os.path", "line_number": 15, "usage_type": "attribute" }, { "api_name": "django.conf.settings.MEDIA_ROOT", "line_number": 15, "usage_type": "attribute" }, { "api_name": "django...
8687655038
from smartschool import SmartschoolApi from report import Report from messages import getMessage from ifttt import sendNotification import pickle, json, os users = json.load(open("users.json","r")) api = SmartschoolApi("https://cnddinant.smartschool.be") def save(data): pickle.dump( data, open( "save.pickle", "...
Kaporos/SmartschoolPointNotifier
main.py
main.py
py
1,621
python
en
code
1
github-code
6
[ { "api_name": "json.load", "line_number": 8, "usage_type": "call" }, { "api_name": "smartschool.SmartschoolApi", "line_number": 9, "usage_type": "call" }, { "api_name": "pickle.dump", "line_number": 13, "usage_type": "call" }, { "api_name": "os.path.isfile", "...
11722975724
import unittest from lib import validate, find_emails class FindEmailsTest(unittest.TestCase): def test_domain_name(self): assert validate.is_valid_domain('jana.com') is True assert validate.is_valid_domain('jana') is False def test_find_emails(self): ed = find_emails.EmailsFromDom...
gairehari/email-crawler
tests/test_lib.py
test_lib.py
py
497
python
en
code
0
github-code
6
[ { "api_name": "unittest.TestCase", "line_number": 7, "usage_type": "attribute" }, { "api_name": "lib.validate.is_valid_domain", "line_number": 10, "usage_type": "call" }, { "api_name": "lib.validate", "line_number": 10, "usage_type": "name" }, { "api_name": "lib.v...
38779571444
import argparse import os import pandas as pd import torch import torch.nn.functional as F import torch.nn as nn import torch.optim as optim from torch.utils.data import DataLoader import torchvision.datasets as datasets from tqdm import tqdm import numpy as np import utils3 from model_jaccard import Model # train fo...
bjiang99/Ph.D.-s-Projects
SSL/SSL_MoCo_Jaccard/train_jaccard_tiny.py
train_jaccard_tiny.py
py
10,043
python
en
code
0
github-code
6
[ { "api_name": "tqdm.tqdm", "line_number": 20, "usage_type": "call" }, { "api_name": "torch.randperm", "line_number": 26, "usage_type": "call" }, { "api_name": "torch.argsort", "line_number": 28, "usage_type": "call" }, { "api_name": "torch.argsort", "line_numb...
74519794428
#!/usr/bin/env python # -*- coding: utf-8 -*- import tkinter as tk from tkinter import messagebox import json def file_read(): with open('database.json', encoding='utf8') as file: data = json.load(file) return data def main(): data = file_read() root = tk.Tk() root.geometry('500x70') ...
kadtsin/TestsSolver
main.py
main.py
py
1,137
python
en
code
0
github-code
6
[ { "api_name": "json.load", "line_number": 10, "usage_type": "call" }, { "api_name": "tkinter.Tk", "line_number": 18, "usage_type": "call" }, { "api_name": "tkinter.Entry", "line_number": 20, "usage_type": "call" }, { "api_name": "tkinter.BOTH", "line_number": ...
17335208802
import sys import configparser from setuptools import setup, Extension from distutils.command.build_ext import build_ext from distutils.errors import DistutilsPlatformError, DistutilsExecError, CCompilerError CONFIG_FILE = 'setup.cfg' ext_modules = [Extension('mumps._dmumps', sources=['mumps/_dmumps.c'])] ext_err...
usnistgov/sesame
setup.py
setup.py
py
3,038
python
en
code
16
github-code
6
[ { "api_name": "setuptools.Extension", "line_number": 11, "usage_type": "call" }, { "api_name": "distutils.errors.CCompilerError", "line_number": 13, "usage_type": "name" }, { "api_name": "distutils.errors.DistutilsExecError", "line_number": 13, "usage_type": "name" }, ...
15478562845
import argparse import atexit import flask from flask_sqlalchemy import SQLAlchemy import timefliptt from timefliptt.config import Config from timefliptt.timeflip import daemon_start, daemon_stop, soft_connect db = SQLAlchemy() def create_app(config: Config) -> flask.Flask: app = flask.Flask(__name__) app...
pierre-24/timeflip-tt
timefliptt/app.py
app.py
py
1,769
python
en
code
1
github-code
6
[ { "api_name": "flask_sqlalchemy.SQLAlchemy", "line_number": 12, "usage_type": "call" }, { "api_name": "timefliptt.config.Config", "line_number": 15, "usage_type": "name" }, { "api_name": "flask.Flask", "line_number": 16, "usage_type": "call" }, { "api_name": "time...
136002468
import pika from src.config.RabbitMQConfig import RabbitMQConfig import logging.config logging.config.fileConfig('../resources/logging.conf') LOGGER = logging.getLogger('exampleApp') class MessageWriter: def __init__(self, rabbit_mq_config: RabbitMQConfig): self._parameters = rabbit_mq_config.connection...
SkaaRJik/neat-data-preprocessing
src/rabbitmq/MessageWriter.py
MessageWriter.py
py
1,710
python
en
code
0
github-code
6
[ { "api_name": "logging.config.config.fileConfig", "line_number": 6, "usage_type": "call" }, { "api_name": "logging.config.config", "line_number": 6, "usage_type": "attribute" }, { "api_name": "logging.config", "line_number": 6, "usage_type": "name" }, { "api_name"...
1256374024
from skimage.metrics import structural_similarity as compare_ssim import cv2 import numpy as np import argparse imageA = cv2.imread("./image/13.png") imageB = cv2.imread("./image/12.png") grayA = cv2.cvtColor(imageA, cv2.COLOR_BGR2GRAY) grayB = cv2.cvtColor(imageB, cv2.COLOR_BGR2GRAY) (score, diff) = compare_ssim(gra...
Nowwook/Python
OpenCV/색 구분/틀린그림찾기.py
틀린그림찾기.py
py
1,088
python
en
code
0
github-code
6
[ { "api_name": "cv2.imread", "line_number": 6, "usage_type": "call" }, { "api_name": "cv2.imread", "line_number": 7, "usage_type": "call" }, { "api_name": "cv2.cvtColor", "line_number": 9, "usage_type": "call" }, { "api_name": "cv2.COLOR_BGR2GRAY", "line_number...
2311843942
import sys sys.path.append("Pythonapp/Display/Menu_ui/") from ui_StartOptionsDialog import Ui_StartOptionsDialog from PyQt5.QtWidgets import QDialog, QPushButton from PyQt5.QtGui import QPixmap from PyQt5.QtCore import pyqtSignal, Qt from AbstractGrid import AbstractGrid from examples import examples IMAGES = {"Static...
lcarlett/EpidemicAgents
Pythonapp/Display/StartOptionsDialog.py
StartOptionsDialog.py
py
4,972
python
en
code
0
github-code
6
[ { "api_name": "sys.path.append", "line_number": 2, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 2, "usage_type": "attribute" }, { "api_name": "PyQt5.QtWidgets.QDialog", "line_number": 20, "usage_type": "name" }, { "api_name": "PyQt5.QtCore.pyqt...
36409643788
from django.shortcuts import render, redirect from .models import Stock from .models import Credential from .models import Wallet from .forms import StockForm from .forms import CredentialForm from .forms import WalletForm def addToWallet(request): # user is logged in if accessing wallet loggedIn = True ...
spencerwalls/stockApp
stocks/stocks2/views.py
views.py
py
3,980
python
en
code
0
github-code
6
[ { "api_name": "models.Wallet.objects.filter", "line_number": 17, "usage_type": "call" }, { "api_name": "models.Wallet.objects", "line_number": 17, "usage_type": "attribute" }, { "api_name": "models.Wallet", "line_number": 17, "usage_type": "name" }, { "api_name": ...
1912279412
import numpy as np import torch import sys import torch.nn as nn import torch.nn.functional as F import torch.optim as optim import os import pandas as pd from torch.utils.data import DataLoader, Dataset, TensorDataset import time import matplotlib.pyplot as plt # global variables cuda = torch.cuda.is_available() devi...
lingjie-feng/Deep-Learning-Models
Frame_Level Classification_of_Speech/train.py
train.py
py
6,084
python
en
code
0
github-code
6
[ { "api_name": "torch.cuda.is_available", "line_number": 14, "usage_type": "call" }, { "api_name": "torch.cuda", "line_number": 14, "usage_type": "attribute" }, { "api_name": "torch.device", "line_number": 15, "usage_type": "call" }, { "api_name": "sys.version", ...
23128936184
from functools import reduce from keras.preprocessing.sequence import pad_sequences import numpy as np import re def tokenize(sent): '''Return the tokens of a sentence including punctuation. >>> tokenize('Bob dropped the apple. Where is the apple?') ['Bob', 'dropped', 'the', 'apple', '.', 'Where', 'is', ...
EibrielInv/ice-cream-truck
helpers.py
helpers.py
py
3,199
python
en
code
13
github-code
6
[ { "api_name": "re.split", "line_number": 13, "usage_type": "call" }, { "api_name": "functools.reduce", "line_number": 63, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_number": 76, "usage_type": "call" }, { "api_name": "keras.preprocessing.sequence.pa...
32410380484
from django.conf.urls import patterns, url urlpatterns = patterns('userman.views', url(r'^$', 'main', name='main'), url(r'^add/$', 'add', name='add'), url(r'^edit/(\d+)$', 'edit', name='edit'), url(r'^read/(\d+)/$', 'read', name='read'), url(r'^deactivate/(\d+)$', 'deactivate', name='deactivate'), ...
jacyn/burst
webapp/userman/urls.py
urls.py
py
452
python
en
code
0
github-code
6
[ { "api_name": "django.conf.urls.patterns", "line_number": 3, "usage_type": "call" }, { "api_name": "django.conf.urls.url", "line_number": 4, "usage_type": "call" }, { "api_name": "django.conf.urls.url", "line_number": 5, "usage_type": "call" }, { "api_name": "djan...
72683789627
from django.contrib import admin from django.contrib.auth.admin import UserAdmin from django.contrib.auth import get_user_model from .forms import CustomUserCreationForm, CustomUserChangeForm from .models import CustomUser, Facility class CustomUserAdmin(UserAdmin): add_form = CustomUserCreationForm form = ...
Sadiq-idris/ubaidu-emr
accounts/admin.py
admin.py
py
1,445
python
en
code
1
github-code
6
[ { "api_name": "django.contrib.auth.admin.UserAdmin", "line_number": 10, "usage_type": "name" }, { "api_name": "forms.CustomUserCreationForm", "line_number": 11, "usage_type": "name" }, { "api_name": "forms.CustomUserChangeForm", "line_number": 12, "usage_type": "name" }...
13679170619
from django.contrib import admin from django.urls import path from .views import * from django.conf.urls.static import static from django.conf import settings urlpatterns = [ path('common', common, name="common"), path('freeBoard', freeBoard, name="freeBoard"), path('home', home, name="home"), path(...
team-TENET/SoongsilCampusMap
soongsilcampusmap/main/urls.py
urls.py
py
891
python
en
code
0
github-code
6
[ { "api_name": "django.urls.path", "line_number": 8, "usage_type": "call" }, { "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", ...
1775659758
from django.urls import re_path from bank.views import plans, daily_answers, goods, accounts, view_info, transactions #from django.conf.urls import url urlpatterns = [ re_path(r'^$', view_info.index, name='index_of_bank'), re_path(r'^rules/$', view_info.rools_view, name='rules'), re_path(r'^shop/$', goods...
RegSirius06/SWBM
bank/urls.py
urls.py
py
2,776
python
en
code
0
github-code
6
[ { "api_name": "django.urls.re_path", "line_number": 6, "usage_type": "call" }, { "api_name": "bank.views.view_info.index", "line_number": 6, "usage_type": "attribute" }, { "api_name": "bank.views.view_info", "line_number": 6, "usage_type": "name" }, { "api_name": ...
21296037546
# -*- coding: utf-8 -*- import matplotlib.pyplot as plt from pylab import mpl mpl.rcParams['font.sans-serif'] = ['SimHei'] plt.rcParams['font.sans-serif']=['SimHei'] #显示中文标签 plt.rcParams['axes.unicode_minus']=False def drawBar(data,xname,xlabel,ylabel,title): '''根据传入的字典按绘条形图和 字典样例: { 'a':3, ...
NingChenhui/Mirror
diarydraw.py
diarydraw.py
py
3,736
python
zh
code
0
github-code
6
[ { "api_name": "pylab.mpl.rcParams", "line_number": 5, "usage_type": "attribute" }, { "api_name": "pylab.mpl", "line_number": 5, "usage_type": "name" }, { "api_name": "matplotlib.pyplot.rcParams", "line_number": 6, "usage_type": "attribute" }, { "api_name": "matplo...
1466140289
# -*- coding: utf-8 -*- """ Created on Wed Sep 4 17:01:08 2019 @author: LiuZiping """ import collections def groupAnagrams(strs): """ param: List[str] return: List[List[str]] """ str_dict = collections.defaultdict(list) for s in strs: strs_keys = [0]*26 for c in s: ...
shuaiqixiaopingge/leetcode
49_groupAnagrams.py
49_groupAnagrams.py
py
622
python
en
code
0
github-code
6
[ { "api_name": "collections.defaultdict", "line_number": 13, "usage_type": "call" } ]
46051722756
# -*- coding: utf-8 -*- from django.db import models, migrations from django.conf import settings class Migration(migrations.Migration): dependencies = [ ('spirit_comment_flag', '0001_initial'), ] operations = [ migrations.AlterField( model_name='commentflag', nam...
nitely/Spirit
spirit/comment/flag/migrations/0002_auto_20150828_2003.py
0002_auto_20150828_2003.py
py
715
python
en
code
1,153
github-code
6
[ { "api_name": "django.db.migrations.Migration", "line_number": 6, "usage_type": "attribute" }, { "api_name": "django.db.migrations", "line_number": 6, "usage_type": "name" }, { "api_name": "django.db.migrations.AlterField", "line_number": 13, "usage_type": "call" }, {...
3695986134
"""PyTorch ResNet This started as a copy of https://github.com/pytorch/vision 'resnet.py' (BSD-3-Clause) with additional dropout and dynamic global avg/max pool. ResNeXt, SE-ResNeXt, SENet, and MXNet Gluon stem/downsample variants, tiered stems added by Ross Wightman """ import math import torch import torch.nn as n...
welkin-feng/ComputerVision
cvmodels/models/resnet_modified.py
resnet_modified.py
py
19,574
python
en
code
2
github-code
6
[ { "api_name": "torch.nn.Module", "line_number": 35, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 35, "usage_type": "name" }, { "api_name": "torch.nn.ReLU", "line_number": 39, "usage_type": "attribute" }, { "api_name": "torch.nn", "line...
41191984970
import logging logger = logging.getLogger(__name__) from app.tools import Tools import os import io import zipfile class ImageNotFound(Exception): def __init__(self, status_code:int, detail:str): self.status_code = status_code self.detail = detail super().__init__(detail) class DataLoade...
VasiliAnoshin/ImageTilerApi
app/data_loader.py
data_loader.py
py
1,916
python
en
code
0
github-code
6
[ { "api_name": "logging.getLogger", "line_number": 3, "usage_type": "call" }, { "api_name": "app.tools.Tools.get_current_directory", "line_number": 37, "usage_type": "call" }, { "api_name": "app.tools.Tools", "line_number": 37, "usage_type": "name" }, { "api_name":...
36396586575
# spatial_alignment.py """ Functions to check for and ensure spatial alignment of two xarray DataArrays # To-Do - make functions that check indices """ # __all__ = ['*'] __author__ = "Fernando Aristizabal" from typing import Optional, Tuple, Union import xarray as xr from shapely.geometry import box from rasterio.e...
NOAA-OWP/gval
src/gval/homogenize/spatial_alignment.py
spatial_alignment.py
py
10,711
python
en
code
14
github-code
6
[ { "api_name": "odc.geo.xr.ODCExtensionDa", "line_number": 22, "usage_type": "name" }, { "api_name": "typing.Union", "line_number": 26, "usage_type": "name" }, { "api_name": "xarray.DataArray", "line_number": 26, "usage_type": "attribute" }, { "api_name": "xarray.D...
13904668051
from datetime import datetime from tensorflow import keras from matplotlib import pyplot as plt from PIL import Image import tensorflow as tf import numpy as np import io import imageio # Visualization utilities plt.rc('font', size=20) plt.rc('figure', figsize=(15, 3)) GIF_PATH = "Week5/outputs/gif.gif" class Simple...
anilkumarchebrolu/tensorflow_advanced_techniques_specialization
course1_custom-models-layers-loss-functions-with-tensorflow/Week5/C1_W5_Lab_2_custom-callbacks.py
C1_W5_Lab_2_custom-callbacks.py
py
4,568
python
en
code
0
github-code
6
[ { "api_name": "matplotlib.pyplot.rc", "line_number": 11, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 11, "usage_type": "name" }, { "api_name": "matplotlib.pyplot.rc", "line_number": 12, "usage_type": "call" }, { "api_name": "matplotli...
9072397781
from django.db.models.fields import DateTimeField, EmailField from django.http.response import HttpResponseNotAllowed, JsonResponse from django.shortcuts import render from django.shortcuts import render,redirect from django.views.generic import TemplateView from django.http import HttpResponseRedirect from django.temp...
shi-vani233/Online-Moodle-Portal
moodle_portal/teacher_module/views.py
views.py
py
6,936
python
en
code
0
github-code
6
[ { "api_name": "login_module.models.Teacher.objects.get", "line_number": 25, "usage_type": "call" }, { "api_name": "login_module.models.Teacher.objects", "line_number": 25, "usage_type": "attribute" }, { "api_name": "login_module.models.Teacher", "line_number": 25, "usage_...
35379032205
import requests from django.shortcuts import render, redirect from BikePortal.forms import TicketForm, ChartSliderForm from BikePortal.models import Ticket weather_data_url = 'http://127.0.0.1:5000/forecast' alerts_url = 'http://127.0.0.1:5000/alerts' health_data_url = 'http://127.0.0.1:5000/health-stats' def inde...
tynorantoni/Front-End-Layer-of-United-Services
BikePortal/views.py
views.py
py
4,350
python
en
code
0
github-code
6
[ { "api_name": "requests.get", "line_number": 15, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 17, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 19, "usage_type": "call" }, { "api_name": "BikePortal.models.Ticket.objec...
12188789636
import requests import json import serial import time # Define the serial port and baud rate. # Ensure the 'COM#' corresponds to what was seen in the Windows Device Manager ser = serial.Serial('COM10', 9600) def GetCity(city): response=requests.get("https://api.covid19india.org/state_district_wise.json") r=...
pankajdahilkar/python_codes
telegram bot/covid_display.py
covid_display.py
py
1,916
python
en
code
0
github-code
6
[ { "api_name": "serial.Serial", "line_number": 9, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 13, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 33, "usage_type": "call" }, { "api_name": "time.sleep", "line_number"...
14173283334
import preprocessing from glob import iglob from collections import OrderedDict import collections import json import bm25Score import operator # constants for calculating the BM25 score k1 = 1.5 b = 0.8 # ===============READ SPIMI INDEX================== def read_spimi_index(): spimi_index = OrderedDict() f...
mukulikadey/SPIMI
queries.py
queries.py
py
5,743
python
en
code
0
github-code
6
[ { "api_name": "collections.OrderedDict", "line_number": 16, "usage_type": "call" }, { "api_name": "glob.iglob", "line_number": 19, "usage_type": "call" }, { "api_name": "json.load", "line_number": 24, "usage_type": "call" }, { "api_name": "preprocessing.normalize"...
32938674845
import numpy as np import argparse import cv2 from keras.models import Sequential from keras.layers.core import Dense, Dropout, Flatten from keras.layers.convolutional import Conv2D from keras.optimizers import Adam from keras.layers.pooling import MaxPooling2D from keras.preprocessing.image import ImageDataGenerator i...
Ferch42/animu_face_generator
Keras/detector_emocao.py
detector_emocao.py
py
2,552
python
en
code
1
github-code
6
[ { "api_name": "os.environ", "line_number": 11, "usage_type": "attribute" }, { "api_name": "matplotlib.use", "line_number": 13, "usage_type": "call" }, { "api_name": "keras.models.Sequential", "line_number": 18, "usage_type": "call" }, { "api_name": "keras.layers.c...
14789796367
"""Client.""" import sys from typing import Self from requests import Session from simple_salesforce import Salesforce from .sf_conn import get_session_token class GUSClient: """GUS.""" _instance = None def __init__( self, session_id: str, instance: str = "gus.my.salesforce.com...
mgfreshour/gitgus
gitgus/gus/gus_client.py
gus_client.py
py
2,377
python
en
code
2
github-code
6
[ { "api_name": "requests.Session", "line_number": 30, "usage_type": "call" }, { "api_name": "simple_salesforce.Salesforce", "line_number": 31, "usage_type": "call" }, { "api_name": "sys.modules", "line_number": 78, "usage_type": "attribute" }, { "api_name": "sf_con...
73074948667
# -*- coding: utf-8 -*- from __future__ import annotations import inspect from asyncio import iscoroutinefunction from unittest.mock import sentinel from .command import CommandError _converters = {} NODEFAULT = sentinel.NODEFAULT class ConverterError(CommandError): """ Exception inheriting from CommandEr...
Frawstcrabs/42v6-Framework
commands/base/converters.py
converters.py
py
11,122
python
en
code
1
github-code
6
[ { "api_name": "unittest.mock.sentinel.NODEFAULT", "line_number": 12, "usage_type": "attribute" }, { "api_name": "unittest.mock.sentinel", "line_number": 12, "usage_type": "name" }, { "api_name": "command.CommandError", "line_number": 15, "usage_type": "name" }, { ...
13279856376
# NOTE: much of this code is adapted from https://github.com/harvard-edge/multilingual_kws # noqa import glob import logging import absl import tensorflow as tf tf.config.set_visible_devices([], "GPU") # disable GPU from absl import logging as absl_logging absl_logging.set_verbosity(absl.logging.ERROR) from mul...
jjgp/magic-packet
deploy/api/model.py
model.py
py
3,037
python
en
code
0
github-code
6
[ { "api_name": "tensorflow.config.set_visible_devices", "line_number": 9, "usage_type": "call" }, { "api_name": "tensorflow.config", "line_number": 9, "usage_type": "attribute" }, { "api_name": "absl.logging.set_verbosity", "line_number": 13, "usage_type": "call" }, { ...
16543614427
import os from nuitka.utils.Shebang import getShebangFromFile _default_ignore_list = ("inline_copy", "tblib", "__pycache__") def _addFromDirectory(path, suffixes, ignore_list): for dirpath, dirnames, filenames in os.walk(path): dirnames.sort() for entry in _default_ignore_list: if e...
Nuitka/Nuitka
nuitka/tools/quality/ScanSources.py
ScanSources.py
py
2,376
python
en
code
10,019
github-code
6
[ { "api_name": "os.walk", "line_number": 9, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 22, "usage_type": "call" }, { "api_name": "os.path", "line_number": 22, "usage_type": "attribute" }, { "api_name": "os.path.islink", "line_number": ...
35383427621
import pandas as pd import numpy as np import csv from mcap import train_CoxKmeans from mcap import predictCoxKmeans from mcap import getCindex import torch from support import load_omic_data from support import sort_data from support import mkdir from support import plot_curve from support import cal_pval from idle...
Hua0113/MCAP
alltrain.py
alltrain.py
py
4,770
python
en
code
0
github-code
6
[ { "api_name": "torch.device", "line_number": 21, "usage_type": "call" }, { "api_name": "torch.cuda.is_available", "line_number": 21, "usage_type": "call" }, { "api_name": "torch.cuda", "line_number": 21, "usage_type": "attribute" }, { "api_name": "support.load_omi...
73658354109
import asyncio import logging import threading from typing import List, Optional from universal_ci_noti.noti.queue import NotificationQueue from universal_ci_noti.noti.types import JobResult from universal_ci_noti.utils import ElapsedTime class SimpleQueueImpl(NotificationQueue): def __init__(self): supe...
zifter/universal-ci-noti
src/universal_ci_noti/noti/queue/impl/simple.py
simple.py
py
1,003
python
en
code
0
github-code
6
[ { "api_name": "universal_ci_noti.noti.queue.NotificationQueue", "line_number": 11, "usage_type": "name" }, { "api_name": "typing.List", "line_number": 15, "usage_type": "name" }, { "api_name": "universal_ci_noti.noti.types.JobResult", "line_number": 15, "usage_type": "nam...
71974595069
import asyncio import concurrent.futures import functools import os import subprocess import sys import typing import utils.tempfiles from core.clogs import logger from utils.tempfiles import reserve_tempfile class NonBugError(Exception): """When this is raised instead of a normal Exception, on_command_error() w...
HexCodeFFF/mediaforge
src/processing/common.py
common.py
py
4,298
python
en
code
70
github-code
6
[ { "api_name": "sys.platform", "line_number": 41, "usage_type": "attribute" }, { "api_name": "subprocess.STARTUPINFO", "line_number": 42, "usage_type": "call" }, { "api_name": "subprocess.BELOW_NORMAL_PRIORITY_CLASS", "line_number": 43, "usage_type": "attribute" }, { ...
39508639459
import json import hashlib from typing import List, Set from collections import defaultdict import feather import numpy as np import pandas as pd from scipy import sparse as sp import config as cfg class ProductEncoder: def __init__(self, product_csv_path): self.product_idx = {} self.product_pid...
aprotopopov/retailhero_recommender
src/utils.py
utils.py
py
6,171
python
en
code
18
github-code
6
[ { "api_name": "pandas.read_csv", "line_number": 18, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 42, "usage_type": "call" }, { "api_name": "collections.defaultdict", "line_number": 43, "usage_type": "call" }, { "api_name": "collections.d...
16349044152
from typing import Set, Union from unittest.mock import AsyncMock, Mock import pytest from smllib import SmlFrame, SmlStreamReader import sml2mqtt.device.sml_device import sml2mqtt.device.sml_serial from sml2mqtt import CMD_ARGS from sml2mqtt.config.config import PortSettings from sml2mqtt.device import Device, Devic...
spacemanspiff2007/sml2mqtt
tests/device/conftest.py
conftest.py
py
2,280
python
en
code
19
github-code
6
[ { "api_name": "unittest.mock.Mock", "line_number": 18, "usage_type": "call" }, { "api_name": "unittest.mock.AsyncMock", "line_number": 19, "usage_type": "call" }, { "api_name": "sml2mqtt.device.sml_device.device", "line_number": 21, "usage_type": "attribute" }, { ...
3167137579
#!/usr/bin/env python3 import pathlib class TestSet1: def test_challenge01(self): from cryptopals.set1.challenge01 import challenge01, BYTES, RESULT res = challenge01(BYTES) assert res == RESULT, "The result does not match the expected value" def test_challenge02(self): fro...
svkirillov/cryptopals-python3
tests/test_set1.py
test_set1.py
py
2,162
python
en
code
0
github-code
6
[ { "api_name": "cryptopals.set1.challenge01.challenge01", "line_number": 10, "usage_type": "call" }, { "api_name": "cryptopals.set1.challenge01.BYTES", "line_number": 10, "usage_type": "name" }, { "api_name": "cryptopals.set1.challenge01.RESULT", "line_number": 12, "usage_...
8832724048
from matplotlib import pyplot as plt import pandas as pd import numpy as np df = pd.DataFrame( { 'Name': ['Dan', 'Joann', 'Pedro', 'Rosie', 'Ethan', 'Vicky', 'Frederic', 'Jimmie', 'Rhonda', 'Giovanni', 'Francesca', 'Rajab', 'Naiyana', 'Kian', 'Jenny'], 'Salary':[50000, 54000, 50000, 189000, 55000, 400...
drigols/studies
modules/math-codes/modules/statistics-and-probability/comparing-data/src/scatter_sample.py
scatter_sample.py
py
991
python
en
code
0
github-code
6
[ { "api_name": "pandas.DataFrame", "line_number": 5, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.savefig", "line_number": 15, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 15, "usage_type": "name" }, { "api_name": "matplotli...
43447603696
#!/usr/bin/env python3 """ The module performs enrichment analysis of gene functions per phase. The analysis is performed with a hypergeometric test, the multiple testing correction is done with the benjamini hochberg method. """ __version__ = "1.0" __author__ = "Tin Siroki" from scipy.stats import hypergeom import s...
bacillus-biofilms/biofilm-data-analysis
scripts/functional_analysis.py
functional_analysis.py
py
25,736
python
en
code
0
github-code
6
[ { "api_name": "scipy.stats.hypergeom.sf", "line_number": 34, "usage_type": "call" }, { "api_name": "scipy.stats.hypergeom", "line_number": 34, "usage_type": "name" }, { "api_name": "re.findall", "line_number": 123, "usage_type": "call" }, { "api_name": "os.path.jo...
4353328095
import re import mechanicalsoup import urllib.request from inscriptis import get_text import os def cls(): os.system('cls' if os.name=='nt' else 'clear') cls() blue = '\033[94m' cyan = '\033[96m' green = '\033[92m' end = '\033[0m' while True: x = input(f"{blue}moai search - {end}") if x == "search": sear...
kwes/moai-search
moai-find.py
moai-find.py
py
1,296
python
en
code
1
github-code
6
[ { "api_name": "os.system", "line_number": 7, "usage_type": "call" }, { "api_name": "os.name", "line_number": 7, "usage_type": "attribute" }, { "api_name": "mechanicalsoup.StatefulBrowser", "line_number": 22, "usage_type": "call" }, { "api_name": "re.sub", "lin...
31855971370
""" Contains an abstract base class that supports different ML models. """ import sys import numpy as np import pandas as pd import joblib import os import shutil import tempfile import sklearn from sklearn.base import BaseEstimator import logging from deepchem.data import Dataset, pad_features from deepchem.metrics ...
CAVED123/deepchem
deepchem/models/models.py
models.py
py
6,238
python
en
code
1
github-code
6
[ { "api_name": "logging.getLogger", "line_number": 26, "usage_type": "call" }, { "api_name": "sklearn.base.BaseEstimator", "line_number": 29, "usage_type": "name" }, { "api_name": "typing.Optional", "line_number": 35, "usage_type": "name" }, { "api_name": "typing.A...
42057887834
import open3d as o3d import json import numpy as np def get_camera_frustum(img_size, K, W2C, frustum_length=0.5, color=[0., 1., 0.]): W, H = img_size hfov = np.rad2deg(np.arctan(W / 2. / K[0, 0]) * 2.) vfov = np.rad2deg(np.arctan(H / 2. / K[1, 1]) * 2.) half_w = frustum_length * np.tan(np.deg2rad(hfov...
Kai-46/nerfplusplus
camera_visualizer/visualize_cameras.py
visualize_cameras.py
py
4,706
python
en
code
882
github-code
6
[ { "api_name": "numpy.rad2deg", "line_number": 8, "usage_type": "call" }, { "api_name": "numpy.arctan", "line_number": 8, "usage_type": "call" }, { "api_name": "numpy.rad2deg", "line_number": 9, "usage_type": "call" }, { "api_name": "numpy.arctan", "line_number...
13469151630
import pandas as pd from sodapy import Socrata import requests from datetime import datetime, timedelta from cachetools import cached, TTLCache # Unauthenticated client only works with public data sets. Note 'None' # in place of application token, and no username or password: client = Socrata("data.cityofnewyork.us",...
kennethkoch/bikesafe-dashboard-api
app/data.py
data.py
py
6,973
python
en
code
0
github-code
6
[ { "api_name": "sodapy.Socrata", "line_number": 10, "usage_type": "call" }, { "api_name": "cachetools.TTLCache", "line_number": 20, "usage_type": "call" }, { "api_name": "pandas.DataFrame.from_records", "line_number": 29, "usage_type": "call" }, { "api_name": "pand...
36713422845
#!/usr/bin/python3 """ Flask basic route """ from flask import Flask app = Flask(__name__) app.url_map.strict_slashes = False @app.route('/') def hello_hbnb(): """ Returns Hello HBNB! from http://192.168.1.11:5000/ """ return 'Hello HBNB!' if __name__ == '__main__': app.run(host=...
Nikodimosendeshaw/AirBnB_clone_v2
web_flask/0-hello_route.py
0-hello_route.py
py
356
python
en
code
0
github-code
6
[ { "api_name": "flask.Flask", "line_number": 6, "usage_type": "call" } ]