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
24369028230
import os import time import argparse from datetime import datetime from utils.CpuMonitor import CpuMonitor from utils.GpuMonitor import GpuMonitor from utils.Recoder import Recoder from utils.Printer import print_info, print_err, print_warn def get_args(): parser = argparse.ArgumentParser() parser.add_argume...
Huang-Junchen/hardware-tester
no_gui.py
no_gui.py
py
2,093
python
en
code
0
github-code
36
[ { "api_name": "argparse.ArgumentParser", "line_number": 12, "usage_type": "call" }, { "api_name": "utils.Recoder.Recoder", "line_number": 27, "usage_type": "call" }, { "api_name": "utils.Printer.print_info", "line_number": 34, "usage_type": "call" }, { "api_name":...
41587212510
import os import numpy as np import warnings from equilib import equi2cube import cv2 import torch from PIL import Image def main(): image_path = "./data/images/000001.jpg" equi_img = Image.open(image_path) img_mode = equi_img.mode equi_img = np.asarray(equi_img) print("equi_img: ", equi_img.s...
motoki/nsworks
src/sphere2cube.py
sphere2cube.py
py
1,211
python
en
code
0
github-code
36
[ { "api_name": "PIL.Image.open", "line_number": 15, "usage_type": "call" }, { "api_name": "PIL.Image", "line_number": 15, "usage_type": "name" }, { "api_name": "numpy.asarray", "line_number": 18, "usage_type": "call" }, { "api_name": "numpy.transpose", "line_nu...
21883804476
# coding: utf-8 # In[2]: CUDA_VISIBLE_DEVICES = 1 # In[3]: import cv2 import numpy as np import matplotlib.pyplot as plt # In[4]: trainA = [] trainB = [] for i in range(1,701): img = cv2.imread('rain/{}clean.jpg'.format(i)) img = cv2.cvtColor(img,cv2.COLOR_BGR2RGB) img = cv2.resize(img,(256,256)) tr...
programmer-770/Image_Deraining_GANs
multi_res_unet-Copy1.py
multi_res_unet-Copy1.py
py
13,838
python
en
code
1
github-code
36
[ { "api_name": "cv2.imread", "line_number": 24, "usage_type": "call" }, { "api_name": "cv2.cvtColor", "line_number": 25, "usage_type": "call" }, { "api_name": "cv2.COLOR_BGR2RGB", "line_number": 25, "usage_type": "attribute" }, { "api_name": "cv2.resize", "line...
42998147166
from __future__ import annotations import time from datetime import date, datetime, timedelta from logging import getLogger from time import struct_time from typing import Any, Callable import pytz from .compat import IS_WINDOWS from .constants import is_date_type_name, is_timestamp_type_name from .converter import ...
snowflakedb/snowflake-connector-python
src/snowflake/connector/converter_snowsql.py
converter_snowsql.py
py
7,534
python
en
code
511
github-code
36
[ { "api_name": "logging.getLogger", "line_number": 23, "usage_type": "call" }, { "api_name": "typing.Any", "line_number": 27, "usage_type": "name" }, { "api_name": "datetime.datetime", "line_number": 27, "usage_type": "name" }, { "api_name": "time.struct_time", ...
14913237067
from __future__ import annotations import datetime from dataclasses import dataclass, field import random from typing import List, Dict, Any from chess_manager.M import turn_model MAX_STR_LEN = 122 def check_valid_int(user_int_input: Any) -> bool: """ Vérifie si l'input de l'utilisateur est un int valide. """ ...
AntoineArchy/Chessmanager
chess_manager/M/tournament_model.py
tournament_model.py
py
4,751
python
en
code
null
github-code
36
[ { "api_name": "typing.Any", "line_number": 13, "usage_type": "name" }, { "api_name": "typing.Any", "line_number": 22, "usage_type": "name" }, { "api_name": "typing.Dict", "line_number": 29, "usage_type": "name" }, { "api_name": "typing.List", "line_number": 38...
35099642670
from django.contrib.auth.models import Group from mf.crud.models import Dolar, HistoryOperations, Permisology from mf.user.models import User from django.utils import timezone from datetime import date, datetime, timedelta def convertToDecimalFormat(n): return n.replace('.', '').replace(',', '.') def get_dollar()...
isela1998/facebook
app/mf/crud/functions.py
functions.py
py
2,923
python
en
code
0
github-code
36
[ { "api_name": "mf.crud.models.Dolar.objects.using", "line_number": 13, "usage_type": "call" }, { "api_name": "mf.crud.models.Dolar.objects", "line_number": 13, "usage_type": "attribute" }, { "api_name": "mf.crud.models.Dolar", "line_number": 13, "usage_type": "name" }, ...
70970695463
# -*- coding: utf-8 -*- """ Created on Fri Dec 4 11:20:09 2020 @author: KANNAN """ from flask import Flask, render_template, request import emoji #import sklearn import pickle model = pickle.load(open("diabetes_logreg.pkl", "rb")) app = Flask(__name__) @app.route('/') def home(): return ...
GuruYohesh/ML
Diabetes Prediction/Diabetes_app.py
Diabetes_app.py
py
3,799
python
en
code
0
github-code
36
[ { "api_name": "pickle.load", "line_number": 14, "usage_type": "call" }, { "api_name": "flask.Flask", "line_number": 16, "usage_type": "call" }, { "api_name": "flask.render_template", "line_number": 21, "usage_type": "call" }, { "api_name": "flask.request.method", ...
28890197379
"""PDB dataset loader.""" import tree import numpy as np import torch import pandas as pd import logging import random import functools as fn from torch.utils import data from data import utils as du from openfold.data import data_transforms from openfold.np import residue_constants from openfold.utils import rigid_ut...
blt2114/twisted_diffusion_sampler
protein_exp/data/pdb_data_loader.py
pdb_data_loader.py
py
10,693
python
en
code
11
github-code
36
[ { "api_name": "torch.utils.data.Dataset", "line_number": 16, "usage_type": "attribute" }, { "api_name": "torch.utils.data", "line_number": 16, "usage_type": "name" }, { "api_name": "logging.getLogger", "line_number": 24, "usage_type": "call" }, { "api_name": "pand...
16191137869
import datetime from django.utils import timezone from django.core.paginator import Paginator from django.db import transaction from django.db.models import Q from the_mechanic_backend.apps.accounts.models import Store from the_mechanic_backend.apps.stock.models import Brand, BrandModel, Spare, SpareCustomer, SpareOr...
muthukumar4999/the-mechanic-backend
the_mechanic_backend/v0/stock/views.py
views.py
py
23,745
python
en
code
0
github-code
36
[ { "api_name": "the_mechanic_backend.v0.utils.CustomBaseClass", "line_number": 14, "usage_type": "name" }, { "api_name": "the_mechanic_backend.apps.stock.models.Brand", "line_number": 28, "usage_type": "argument" }, { "api_name": "the_mechanic_backend.apps.stock.models.Brand", ...
75129886504
__all__ = ["Echo"] from textwrap import dedent from typing import Any, Dict from ..imagecrawler import BaseImageCrawler, Image, ImageCollection, ImageCrawlerConfig, ImageCrawlerInfo class Echo(BaseImageCrawler): def __init__(self, *, image_uri: str) -> None: super().__init__(image_uri=image_uri) @...
k4cg/nichtparasoup
python-package/src/nichtparasoup/imagecrawlers/echo.py
echo.py
py
1,743
python
en
code
40
github-code
36
[ { "api_name": "imagecrawler.BaseImageCrawler", "line_number": 9, "usage_type": "name" }, { "api_name": "imagecrawler.ImageCrawlerInfo", "line_number": 16, "usage_type": "call" }, { "api_name": "textwrap.dedent", "line_number": 18, "usage_type": "call" }, { "api_na...
37634246750
# A transformation sequence from word beginWord to word endWord using a dictionary wordList is a sequence of words such that: # The first word in the sequence is beginWord. # The last word in the sequence is endWord. # Only one letter is different between each adjacent pair of words in the sequence. # Every word in th...
sunnyyeti/Leetcode-solutions
127 Word Ladder.py
127 Word Ladder.py
py
2,240
python
en
code
0
github-code
36
[ { "api_name": "collections.deque", "line_number": 40, "usage_type": "call" } ]
3761949834
import cv2 import numpy as np img2 = cv2.imread("images.jpg") img1 = cv2.imread("new quantum.PNG") rows, cols, channels = img2.shape # Reading image details roi = img1[0:rows, 0:cols] img2g = cv2.cvtColor(img2, cv2.COLOR_BGR2GRAY) # converting to grayscale # defining mask , makes our logo black and background wh...
AirbotsBetaProject/Day-6
D6-04Dheeraj/Source Code/adding_logo_with_no_background.py
adding_logo_with_no_background.py
py
929
python
en
code
0
github-code
36
[ { "api_name": "cv2.imread", "line_number": 4, "usage_type": "call" }, { "api_name": "cv2.imread", "line_number": 5, "usage_type": "call" }, { "api_name": "cv2.cvtColor", "line_number": 12, "usage_type": "call" }, { "api_name": "cv2.COLOR_BGR2GRAY", "line_numbe...
36278744993
import re from pprint import pprint import csv from decorator import to_log if __name__ == '__main__': # читаем адресную книгу в формате CSV в список contacts_list with open("phonebook_raw.csv", encoding='utf-8') as f: rows = csv.reader(f, delimiter=",") contacts_list = list(rows) # rewrit...
OysterLover/regex_decorated
main.py
main.py
py
1,633
python
en
code
0
github-code
36
[ { "api_name": "csv.reader", "line_number": 9, "usage_type": "call" }, { "api_name": "re.sub", "line_number": 19, "usage_type": "call" }, { "api_name": "re.search", "line_number": 34, "usage_type": "call" }, { "api_name": "decorator.to_log", "line_number": 28, ...
31619170189
import pandas as pd import xml.etree.ElementTree as ET # Load the XML data tree = ET.parse('statement_short.xml') root = tree.getroot() # Define a function to extract data from the XML elements def extract_data(elem): data = {} for child in elem: if len(child) == 0: data[child.tag] = chil...
dochaauch/Tools_for_buh
xml_pank/xml1.py
xml1.py
py
627
python
en
code
0
github-code
36
[ { "api_name": "xml.etree.ElementTree.parse", "line_number": 6, "usage_type": "call" }, { "api_name": "xml.etree.ElementTree", "line_number": 6, "usage_type": "name" }, { "api_name": "pandas.DataFrame", "line_number": 23, "usage_type": "call" }, { "api_name": "pand...
10387196560
from setuptools import setup, find_packages from os import path here = path.abspath(path.dirname(__file__)) # Get the long description from the README file with open(path.join(here, 'README.md'), encoding='utf-8') as f: long_description = f.read() setup( name='pysnippets', version='0.1.0', descriptio...
gongzhitaao/snippets
pysnippets/setup.py
setup.py
py
1,010
python
en
code
0
github-code
36
[ { "api_name": "os.path.abspath", "line_number": 4, "usage_type": "call" }, { "api_name": "os.path", "line_number": 4, "usage_type": "name" }, { "api_name": "os.path.dirname", "line_number": 4, "usage_type": "call" }, { "api_name": "os.path.join", "line_number"...
34588733658
import os import atexit import secrets import unittest from functools import wraps import augpathlib as aug from sxpyr import sxpyr from pyontutils.utils import Async, deferred # TODO -> asyncd in future from pyontutils.utils_fast import isoformat from sparcur import exceptions as exc from sparcur.utils import GetTime...
SciCrunch/sparc-curation
test/test_delete.py
test_delete.py
py
32,914
python
en
code
11
github-code
36
[ { "api_name": "sparcur.paths.PennsieveCache", "line_number": 21, "usage_type": "name" }, { "api_name": "sparcur.backends.PennsieveRemote", "line_number": 22, "usage_type": "name" }, { "api_name": "augpathlib.AugmentedPath", "line_number": 26, "usage_type": "call" }, {...
15154019133
import pandas as pd from textblob import TextBlob import multiprocessing as mp import time def calc(review): review_blob = TextBlob(str(review)) polarity = review_blob.sentiment.polarity if polarity > 0: return "Positive" elif polarity < 0: return "Negative" else: return "N...
philipsFarraj/ParallelProject
project.py
project.py
py
626
python
en
code
0
github-code
36
[ { "api_name": "textblob.TextBlob", "line_number": 8, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 18, "usage_type": "call" }, { "api_name": "multiprocessing.Pool", "line_number": 22, "usage_type": "call" }, { "api_name": "time.time", ...
8827426863
from __future__ import absolute_import, division, print_function import os from setuptools import setup HERE = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(HERE, 'README.rst')) as f: README = f.read() setup(name='marv', version='3.2.0', description='MARV framework', long_de...
ternaris/marv
setup.py
setup.py
py
2,262
python
en
code
3
github-code
36
[ { "api_name": "os.path.abspath", "line_number": 6, "usage_type": "call" }, { "api_name": "os.path", "line_number": 6, "usage_type": "attribute" }, { "api_name": "os.path.dirname", "line_number": 6, "usage_type": "call" }, { "api_name": "os.path.join", "line_nu...
20271187203
''' This module provides management methods for the pygame screen ''' import sys import pygame class MetaGame(type): ''' the metaclass for the game class - this implements classproperties on Game ''' @property def clock(cls): ''' produce the game clock ''' return c...
oaken-source/pyablo
pyablo/game.py
game.py
py
2,780
python
en
code
2
github-code
36
[ { "api_name": "pygame.mixer.pre_init", "line_number": 66, "usage_type": "call" }, { "api_name": "pygame.mixer", "line_number": 66, "usage_type": "attribute" }, { "api_name": "pygame.init", "line_number": 67, "usage_type": "call" }, { "api_name": "pygame.display.se...
34005743410
from torch.utils.data import * from imutils import paths import numpy as np import random import cv2 import os CHARS = ['京', '沪', '津', '渝', '冀', '晋', '蒙', '辽', '吉', '黑', '苏', '浙', '皖', '闽', '赣', '鲁', '豫', '鄂', '湘', '粤', '桂', '琼', '川', '贵', '云', '藏', '陕', '甘', '青', '宁', '新', '0', '1'...
sirius-ai/LPRNet_Pytorch
data/load_data.py
load_data.py
py
2,544
python
en
code
759
github-code
36
[ { "api_name": "imutils.paths.list_images", "line_number": 25, "usage_type": "call" }, { "api_name": "imutils.paths", "line_number": 25, "usage_type": "name" }, { "api_name": "random.shuffle", "line_number": 26, "usage_type": "call" }, { "api_name": "cv2.imread", ...
39803390183
from homepageapp.models import ModelsNewSQL02Model from django.conf import settings from django.http import JsonResponse from django.core.files.storage import FileSystemStorage import os from django.shortcuts import get_object_or_404, render from django.core.paginator import Paginator # repairOrder model was added on 1...
zjgcainiao/new_place_at_76
appointments/views.py
views.py
py
12,477
python
en
code
0
github-code
36
[ { "api_name": "appointments.forms.AppointmentCreationForm", "line_number": 37, "usage_type": "call" }, { "api_name": "appointments.forms.AppointmentImageFormSet", "line_number": 38, "usage_type": "call" }, { "api_name": "appointments.forms.AppointmentImagesForm", "line_number...
70973655465
import torch import torch.nn as nn class ChannelAttention(nn.Module): def __init__(self, in_planes, ratio=16): super(ChannelAttention, self).__init__() self.avg_pool = nn.AdaptiveAvgPool2d(1) self.max_pool = nn.AdaptiveMaxPool2d(1) self.fc = nn.Sequential(nn.Conv2d(in_planes, in_p...
AAleka/Cycle-CBAM-and-CBAM-UNet
UNet/model.py
model.py
py
3,806
python
en
code
7
github-code
36
[ { "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.AdaptiveAvgPool2d", "line_number": 8, "usage_type": "call" }, { "api_name": "torch.nn", ...
14991911664
from os import environ import uuid import logging import json # file_name = environ('log_file_name') file_name = 'app.log' class ModelLog: def __init__(self): ModelLog.load_create() @staticmethod def request_uid(use_case): """ Generate a unique unicode id for the object. The def...
ahmadaneeque/my-code
kubectl_docker/model-update-framework/re-train/mlog.py
mlog.py
py
1,357
python
en
code
0
github-code
36
[ { "api_name": "uuid.uuid4", "line_number": 21, "usage_type": "call" }, { "api_name": "logging.basicConfig", "line_number": 25, "usage_type": "call" }, { "api_name": "logging.INFO", "line_number": 25, "usage_type": "attribute" }, { "api_name": "logging.info", "...
44007123128
""" Django default settings for medfinder project. Crate a local.py in this same folder to set your local settings. """ import requests from os import path from django.utils.translation import ugettext_lazy as _ import environ import datetime import django_heroku root = environ.Path(__file__) - 3 e...
ninjadevtrack/medifiner-api
medfinder/settings/default.py
default.py
py
11,988
python
en
code
1
github-code
36
[ { "api_name": "environ.Path", "line_number": 16, "usage_type": "call" }, { "api_name": "environ.Env", "line_number": 17, "usage_type": "call" }, { "api_name": "environ.Env.read_env", "line_number": 18, "usage_type": "call" }, { "api_name": "environ.Env", "line...
1985519466
#imports libary needed to access photo from PIL import Image #Opens and loads the image that it processes you have to change this to what your picture is called. money = Image.open("money.png") money = money.convert("RGBA") pixels = money.load() #Sets two vairables for the loops that go through each pixel ...
koanarec/recolorimagepython
recolor.py
recolor.py
py
730
python
en
code
0
github-code
36
[ { "api_name": "PIL.Image.open", "line_number": 5, "usage_type": "call" }, { "api_name": "PIL.Image", "line_number": 5, "usage_type": "name" } ]
27770460762
import os, sys sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '../../fastapi_basic'))) from fastapi.testclient import TestClient from app import app from controllers.models.test import Calculate_Data from services.auth import service_auth client = TestClient(app) access_token = service_auth....
jinybear/fastapi_basic
tests/test_controllers.py
test_controllers.py
py
1,030
python
en
code
0
github-code
36
[ { "api_name": "sys.path.append", "line_number": 2, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 2, "usage_type": "attribute" }, { "api_name": "os.path.abspath", "line_number": 2, "usage_type": "call" }, { "api_name": "os.path", "line_number...
73335007463
from datetime import datetime from .setup import config, logger def bibcodes(): try: with open(config.get('CLASSIC_CANONICAL_FILE'), "r") as f: bibcodes = [line.strip() for line in f] except: logger.exception("Unable to retreive bibcodes from classic") return [] else: ...
adsabs/ADSStatsCollector
statscollector/classic.py
classic.py
py
2,065
python
en
code
0
github-code
36
[ { "api_name": "setup.config.get", "line_number": 6, "usage_type": "call" }, { "api_name": "setup.config", "line_number": 6, "usage_type": "name" }, { "api_name": "setup.logger.exception", "line_number": 9, "usage_type": "call" }, { "api_name": "setup.logger", ...
15491681290
# App Libraries import dash import dash_core_components as dcc import dash_html_components as html from dash.dependencies import Input, Output, State import dash_bootstrap_components as dbc import plotly.graph_objs as go import base64 # Replication strategy library from Asian_Option_CRR import * # Input of rep strat ...
MichelVanderhulst/web-app-asian-option-crr
app.py
app.py
py
33,229
python
en
code
0
github-code
36
[ { "api_name": "dash.Dash", "line_number": 18, "usage_type": "call" }, { "api_name": "dash_bootstrap_components.themes", "line_number": 18, "usage_type": "attribute" }, { "api_name": "dash_html_components.Div", "line_number": 38, "usage_type": "call" }, { "api_name...
37466207832
from concurrent import futures import sys import grpc import summary_api_pb2 import summary_api_pb2_grpc import pandas as pd from summary_statistics import calculate_frequency class DocumentSummarizer(summary_api_pb2_grpc.DocumentSummarizerServicer): def SummarizeDocument(self, request, context): ...
doralaura24/visma
summary-statistics-service/summary/server.py
server.py
py
1,856
python
en
code
0
github-code
36
[ { "api_name": "summary_api_pb2_grpc.DocumentSummarizerServicer", "line_number": 13, "usage_type": "attribute" }, { "api_name": "pandas.read_json", "line_number": 16, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 19, "usage_type": "call" }, { ...
4738737155
import torch import torch.nn as nn import numpy as np from torch.autograd import Variable import math import time import multiprocessing from torch.nn.parameter import Parameter from torch.nn.modules.module import Module import torch.nn.functional as F import copy class conGraphConvolutionlayer(Module): def __i...
luoyuanlab/stdgcn
STdGCN/GCN.py
GCN.py
py
9,989
python
en
code
2
github-code
36
[ { "api_name": "torch.nn.modules.module.Module", "line_number": 15, "usage_type": "name" }, { "api_name": "torch.nn.parameter.Parameter", "line_number": 22, "usage_type": "call" }, { "api_name": "torch.FloatTensor", "line_number": 22, "usage_type": "call" }, { "api...
18567314308
# scrape British Columbia acupuncturists number_of_rows = 2090 # set this before running delim = "\t" from urllib.request import urlopen import time def SetHomeDirectory(): import os os.chdir("C:\\Users\\Matt Scandale\\OneDrive - Council of Better Business Bureaus, Inc\\Desktop") SetHomeDire...
mscandale-iabbb/research_public
sample_iabbb_bots/scrape_bc_acupuncturists_shared.py
scrape_bc_acupuncturists_shared.py
py
4,974
python
en
code
0
github-code
36
[ { "api_name": "os.chdir", "line_number": 14, "usage_type": "call" }, { "api_name": "selenium.webdriver.Firefox", "line_number": 24, "usage_type": "call" }, { "api_name": "selenium.webdriver", "line_number": 24, "usage_type": "name" }, { "api_name": "time.sleep", ...
4440001992
import re import six import time import inspect import importlib from .dataType import * import spannerorm.base_model from datetime import date from .relation import Relation from google.api_core.datetime_helpers import DatetimeWithNanoseconds class Helper(object): @classmethod def is_property(cls, v): ...
sijanonly/spanner-orm
spannerorm/helper.py
helper.py
py
19,932
python
en
code
0
github-code
36
[ { "api_name": "relation.Relation", "line_number": 46, "usage_type": "argument" }, { "api_name": "inspect.getmembers", "line_number": 62, "usage_type": "call" }, { "api_name": "inspect.getmembers", "line_number": 82, "usage_type": "call" }, { "api_name": "inspect.g...
71251001
import torch import torch.nn as nn import torch.utils.data as Data from torch.autograd import Variable import torch.nn.functional as F import time import numpy as np assert F import csv,random from imblearn.over_sampling import SMOTE class Datamanager(): def __init__(self): self.dataset = {}...
b04901056/dsa2017
qualcomm/nn.py
nn.py
py
17,265
python
en
code
0
github-code
36
[ { "api_name": "torch.nn.functional", "line_number": 8, "usage_type": "name" }, { "api_name": "csv.reader", "line_number": 31, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 37, "usage_type": "call" }, { "api_name": "numpy.delete", "line_nu...
72640523303
#! /usr/bin/env python3 """ --- besspin.py is the main BESSPIN-Tool-Suite program. All documentation and features are based on solely executing this file. Please do not execute any other file. --- usage: besspin.py [-h] [-c CONFIGFILE | -cjson CONFIGFILESERIALIZED] [-w WORKINGDIRECTORY] [-l LOGFILE...
GaloisInc/BESSPIN-Tool-Suite
besspin.py
besspin.py
py
8,521
python
en
code
5
github-code
36
[ { "api_name": "sys.executable.split", "line_number": 49, "usage_type": "call" }, { "api_name": "sys.executable", "line_number": 49, "usage_type": "attribute" }, { "api_name": "os.path.abspath", "line_number": 60, "usage_type": "call" }, { "api_name": "os.path", ...
72002642984
import os.path from django.http import HttpResponse from cmis_storage.storage import CMISStorage def get_file(request, path): """ Returns a file stored in the CMIS-compatible content management system :param path: The full path of the file within the CMS """ _, filename = os.path.split(path) ...
JoseTomasTocino/cmis_storage
cmis_storage/views.py
views.py
py
547
python
en
code
1
github-code
36
[ { "api_name": "os.path.path.split", "line_number": 14, "usage_type": "call" }, { "api_name": "os.path.path", "line_number": 14, "usage_type": "attribute" }, { "api_name": "os.path", "line_number": 14, "usage_type": "name" }, { "api_name": "cmis_storage.storage.CMI...
30382531462
import os import random import numpy as np import pandas as pd from sklearn.model_selection import train_test_split import torch from torch.utils.data import TensorDataset import torch.nn as nn import torch.nn.functional as F import os from transformers import logging import warnings import yaml from pathlib impor...
XiaoyanAmy/HLT_Coursework
src/util.py
util.py
py
2,186
python
en
code
0
github-code
36
[ { "api_name": "transformers.logging.set_verbosity_warning", "line_number": 18, "usage_type": "call" }, { "api_name": "transformers.logging", "line_number": 18, "usage_type": "name" }, { "api_name": "torch.device", "line_number": 23, "usage_type": "call" }, { "api_...
14859359219
''' Created on 2017��3��23�� @author: gb ''' import sys import os import jieba import gensim,logging import sys def savefile(savepath,content): fp=open(savepath,"w") fp.write(content) fp.close() def readfile(path): fp=open(path,"r") content=fp.read() fp.close() return content ...
guob1l/gensimW2V
jieba.py
jieba.py
py
966
python
en
code
4
github-code
36
[ { "api_name": "os.listdir", "line_number": 27, "usage_type": "call" }, { "api_name": "os.path.exists", "line_number": 32, "usage_type": "call" }, { "api_name": "os.path", "line_number": 32, "usage_type": "attribute" }, { "api_name": "os.makedirs", "line_number...
3169544582
# ported from uniborg thanks to @s_n_a_p_s , @r4v4n4 , @spechide and @PhycoNinja13b #:::::Credit Time:::::: # 1) Coded By: @s_n_a_p_s # 2) Ported By: @r4v4n4 (Noodz Lober) # 3) End Game Help By: @spechide # 4) Better Colour Profile Pic By @PhycoNinja13b import asyncio import base64 import os import random import shut...
rockzy77/catusertbot77
userbot/plugins/autoprofile.py
autoprofile.py
py
14,466
python
en
code
2
github-code
36
[ { "api_name": "os.path.join", "line_number": 30, "usage_type": "call" }, { "api_name": "os.path", "line_number": 30, "usage_type": "attribute" }, { "api_name": "os.getcwd", "line_number": 30, "usage_type": "call" }, { "api_name": "os.path.join", "line_number":...
72516589224
# settings.py import os from os.path import join, dirname from dotenv import load_dotenv dotenv_path = join(dirname(__file__), '.env') load_dotenv(dotenv_path) # Accessing variables. NUM_REQUESTS = os.getenv('NUM_REQUESTS') URL = os.getenv('URL') SECRET = os.getenv('SECRET') SLEEP_SECONDS = os.getenv('SLEEP_SECONDS')...
blainemincey/generateApiRequests
settings.py
settings.py
py
470
python
en
code
0
github-code
36
[ { "api_name": "os.path.join", "line_number": 6, "usage_type": "call" }, { "api_name": "os.path.dirname", "line_number": 6, "usage_type": "call" }, { "api_name": "dotenv.load_dotenv", "line_number": 7, "usage_type": "call" }, { "api_name": "os.getenv", "line_nu...
43288963064
from ctypes import * import sys import pytest @pytest.fixture def dll(sofile): return CDLL(str(sofile), use_errno=True) def test_char_result(dll): f = dll._testfunc_i_bhilfd f.argtypes = [c_byte, c_short, c_int, c_long, c_float, c_double] f.restype = c_char result = f(0, 0, 0, 0, 0, 0) assert...
mozillazg/pypy
extra_tests/ctypes_tests/test_functions.py
test_functions.py
py
7,258
python
en
code
430
github-code
36
[ { "api_name": "pytest.fixture", "line_number": 5, "usage_type": "attribute" }, { "api_name": "sys.maxint", "line_number": 37, "usage_type": "attribute" }, { "api_name": "gc.collect", "line_number": 78, "usage_type": "call" }, { "api_name": "gc.collect", "line_...
16874206716
from utils.rabbit_controller import RabbitMqController from utils.tools import Tools from utils.verifier import Verifier from utils.watcher import Watcher if __name__ == "__main__": """ This is the SAAS Client! Results will be under the server http://3.73.75.114:5000/ 1. Get all md5 of...
Oreldm/RuntimeDefender
saas/client.py
client.py
py
1,910
python
en
code
0
github-code
36
[ { "api_name": "utils.verifier.Verifier", "line_number": 25, "usage_type": "call" }, { "api_name": "utils.tools.Tools", "line_number": 26, "usage_type": "call" }, { "api_name": "utils.watcher.Watcher", "line_number": 27, "usage_type": "call" }, { "api_name": "utils...
38790064496
""" This script shows how pedestrian detections and robot data can be converted to a spatio-temporal grid The output data of this script can then be used to train a CoPA-Map model """ import pandas as pd from copa_map.model.Gridifier import Gridifier, GridParams from copa_map.model.InitInducing import InducingInitial...
MarvinStuede/copa-map
src/copa_map/examples/01_atc_gridify_data.py
01_atc_gridify_data.py
py
4,685
python
en
code
0
github-code
36
[ { "api_name": "os.path.join", "line_number": 16, "usage_type": "call" }, { "api_name": "copa_map.util.util.abs_path", "line_number": 16, "usage_type": "call" }, { "api_name": "copa_map.util.util", "line_number": 16, "usage_type": "name" }, { "api_name": "os.path.e...
9328318313
import pandas as pd import matplotlib.pyplot as plt def gerar_grafico_tempos(caminho_entrada): df = pd.read_csv(caminho_entrada, delimiter=';') labels = ['Média', 'Mediana'] values = [df['Média'].iloc[0], df['Mediana'].iloc[0]] plt.bar(labels, values, color=['blue', 'green']) plt.title('Média e ...
ClaudioJansen/GitHub-Script
Tis 06/correction_time/graphic_generator.py
graphic_generator.py
py
645
python
pt
code
0
github-code
36
[ { "api_name": "pandas.read_csv", "line_number": 5, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.bar", "line_number": 10, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 10, "usage_type": "name" }, { "api_name": "matplotlib.pyp...
8298790752
# from https://github.com/iskandr/fancyimpute import numpy as np from sklearn.utils.extmath import randomized_svd from sklearn.utils import check_array import warnings F32PREC = np.finfo(np.float32).eps from joblib import Memory memory = Memory('cache_dir', verbose=0) def soft_impute_rank(X_obs, n_folds = 5, max...
TwsThomas/miss-vae
softimpute.py
softimpute.py
py
16,429
python
en
code
2
github-code
36
[ { "api_name": "numpy.finfo", "line_number": 9, "usage_type": "call" }, { "api_name": "numpy.float32", "line_number": 9, "usage_type": "attribute" }, { "api_name": "joblib.Memory", "line_number": 13, "usage_type": "call" }, { "api_name": "numpy.isnan", "line_nu...
42843816488
import pytest import logging import json from work_order_tests.work_order_tests import work_order_get_result_params, \ work_order_request_params from automation_framework.work_order_submit.work_order_submit_utility \ import verify_work_order_signature, decrypt_work_order_response from automation_framework.utili...
manojsalunke85/avalon0.6_automaiton
tests/validation_suite/work_order_tests/get/test_work_order_submit_get_outData.py
test_work_order_submit_get_outData.py
py
2,427
python
en
code
0
github-code
36
[ { "api_name": "logging.getLogger", "line_number": 11, "usage_type": "call" }, { "api_name": "work_order_tests.work_order_tests.work_order_request_params", "line_number": 22, "usage_type": "call" }, { "api_name": "work_order_tests.work_order_tests.work_order_get_result_params", ...
25810655781
from datetime import datetime import unittest from mongoengine import Document, StringField, IntField from eve.exceptions import SchemaException from eve.utils import str_to_date, config from eve_mongoengine import EveMongoengine from tests import BaseTest, Eve, SimpleDoc, ComplexDoc, LimitedDoc, WrongDoc, SETTINGS...
MongoEngine/eve-mongoengine
tests/test_mongoengine_fix.py
test_mongoengine_fix.py
py
3,618
python
en
code
39
github-code
36
[ { "api_name": "unittest.TestCase", "line_number": 13, "usage_type": "attribute" }, { "api_name": "tests.Eve", "line_number": 18, "usage_type": "call" }, { "api_name": "tests.SETTINGS", "line_number": 18, "usage_type": "name" }, { "api_name": "eve_mongoengine.EveMo...
4897651596
''' Assignments 1)Write a Python program to sort (ascending and descending) a dictionary by value. [use sorted()] 2)Write a Python program to combine two dictionary adding values for common keys. d1 = {'a': 100, 'b': 200, 'c':300} d2 = {'a': 300, 'b': 200, 'd':400} Sample output: Counter({'a': 400, 'b': 400, 'd': 400,...
Deepak10995/node_react_ds_and_algo
assignments/week03/day1-2.py
day1-2.py
py
901
python
en
code
0
github-code
36
[ { "api_name": "collections.Counter", "line_number": 26, "usage_type": "call" } ]
15057824639
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import home_logs.utils.unique class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( ...
tsaklidis/LogingAPI
home_logs/property/migrations/0001_initial.py
0001_initial.py
py
3,232
python
en
code
8
github-code
36
[ { "api_name": "django.db.migrations.Migration", "line_number": 9, "usage_type": "attribute" }, { "api_name": "django.db.migrations", "line_number": 9, "usage_type": "name" }, { "api_name": "django.db.migrations.CreateModel", "line_number": 17, "usage_type": "call" }, ...
16514949152
from django.conf.urls import include, url from django.contrib import admin from . import views urlpatterns = [ url(r'^$', views.index), url(r'^about', views.mail_form), url(r'^api', views.api), url(r'^score/today', views.today), url(r'^score/(?P<date_id>\d{8})/$', views.feedjson), url(r'^admin/...
h2r4t/npbapi
npbapi/urls.py
urls.py
py
439
python
en
code
0
github-code
36
[ { "api_name": "django.conf.urls.url", "line_number": 6, "usage_type": "call" }, { "api_name": "django.conf.urls.url", "line_number": 7, "usage_type": "call" }, { "api_name": "django.conf.urls.url", "line_number": 8, "usage_type": "call" }, { "api_name": "django.co...
17895710010
r"""Train toy segmenter model on cityscapes. """ # pylint: enable=line-too-long import ml_collections batch_size = 128 _CITYSCAPES_TRAIN_SIZE_SPLIT = 146 # Model spec. STRIDE = 4 mlp_dim = 2 num_heads = 1 num_layers = 1 hidden_size = 1 target_size = (128, 128) def get_config(runlocal=''): """Returns the config...
google/uncertainty-baselines
experimental/robust_segvit/configs/cityscapes/toy_model.py
toy_model.py
py
3,338
python
en
code
1,305
github-code
36
[ { "api_name": "ml_collections.ConfigDict", "line_number": 26, "usage_type": "call" }, { "api_name": "ml_collections.ConfigDict", "line_number": 31, "usage_type": "call" }, { "api_name": "ml_collections.ConfigDict", "line_number": 38, "usage_type": "call" }, { "api...
21346552302
from django.shortcuts import render, redirect from django.core.mail import send_mail from django.contrib import messages from django.conf import settings # Create your views here. # Paypal email id[to donate] :- testingofshopkproject2@gmail.com & password :- Shopk@4994 def home(request): return render(req...
Kiran4949/Donation
app/views.py
views.py
py
1,234
python
en
code
0
github-code
36
[ { "api_name": "django.shortcuts.render", "line_number": 14, "usage_type": "call" }, { "api_name": "django.conf.settings.EMAIL_HOST_USER", "line_number": 27, "usage_type": "attribute" }, { "api_name": "django.conf.settings", "line_number": 27, "usage_type": "name" }, {...
8649453711
""" ============================ Author:柠檬班-木森 Time:2020/5/6 10:03 E-mail:3247119728@qq.com Company:湖南零檬信息技术有限公司 ============================ """ import time from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions as EC from selenium.webdri...
huchaoyang1991/py27_web
web_06day(鼠标和下拉选择框)/task_05day.py
task_05day.py
py
3,284
python
en
code
0
github-code
36
[ { "api_name": "selenium.webdriver.Chrome", "line_number": 19, "usage_type": "call" }, { "api_name": "selenium.webdriver", "line_number": 19, "usage_type": "name" }, { "api_name": "selenium.webdriver.common.by.By.XPATH", "line_number": 22, "usage_type": "attribute" }, ...
17964305010
from sklearn.model_selection import train_test_split from sklearn.feature_selection import SelectKBest from sklearn.feature_selection import f_classif from sklearn.feature_selection import chi2 import numpy as np import argparse import sys import os from sklearn.svm import SVC from sklearn.metrics import confusion_matr...
Yangnnnn/Identifying-political-persuasion-on-Reddit
code/a1_classify.py
a1_classify.py
py
15,122
python
en
code
0
github-code
36
[ { "api_name": "warnings.filterwarnings", "line_number": 20, "usage_type": "call" }, { "api_name": "numpy.sum", "line_number": 24, "usage_type": "call" }, { "api_name": "numpy.sum", "line_number": 43, "usage_type": "call" }, { "api_name": "numpy.sum", "line_num...
70003672425
import asyncio, config, aiohttp import logging from .utils import instance_tools log = logging.getLogger() class StatHandler: def __init__(self, bot): self.bot = bot self.has_started = 0 async def postloop(self): if not self.has_started == 1: self.has_started = 1 ...
harumaki4649/nekobot
modules/unused/stat_handler.py
stat_handler.py
py
3,136
python
en
code
0
github-code
36
[ { "api_name": "logging.getLogger", "line_number": 6, "usage_type": "call" }, { "api_name": "utils.instance_tools.InstanceTools", "line_number": 21, "usage_type": "call" }, { "api_name": "utils.instance_tools", "line_number": 21, "usage_type": "name" }, { "api_name...
70876552105
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Jul 13 09:12:14 2022 @author: Santiago Pinzon-Cortes @contact: sanpinzoncor@unal.edu.co """ """ Functions modified by functions made by Natalia Gomez-Perez (BGS) ngp@nerc.ac.uk The functions are readers for data from WDC database and INTERMAGNET databa...
sanhbk/Dst-index-proxies-LDi
Readers.py
Readers.py
py
5,270
python
en
code
0
github-code
36
[ { "api_name": "numpy.diff", "line_number": 28, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 32, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 33, "usage_type": "call" }, { "api_name": "dateutil.rrule.rrule",...
1411710184
import requests class YaDisk: base_url = 'https://cloud-api.yandex.net/v1/disk/' def __init__(self, token): self.token = token def get_headers(self): return { 'Content-Type': 'application/json', 'Authorization': f'OAuth {self.token}' } def create_fol...
kanadass/photo_backup_cw
ya_disk.py
ya_disk.py
py
1,510
python
en
code
0
github-code
36
[ { "api_name": "requests.put", "line_number": 24, "usage_type": "call" }, { "api_name": "requests.post", "line_number": 42, "usage_type": "call" } ]
37298905972
# -*- coding: utf-8 -*- import json import requests def get_proxy(): response = requests.get('') res = json.loads(response.text) if res['code'] == 0: try: ip = res['data']['IP'] port = res['data']['PORT'] proxy = {} proxy['http'] = ip+":"+port ...
LogicJake/bilibili_user
function.py
function.py
py
393
python
en
code
1
github-code
36
[ { "api_name": "requests.get", "line_number": 5, "usage_type": "call" }, { "api_name": "json.loads", "line_number": 6, "usage_type": "call" } ]
5547014999
""" Voting 12/05/2023. Lido V2 (Shapella-ready) protocol upgrade 1. Update `WithdrawalVault` proxy implementation 2. Call `ShapellaUpgradeTemplate.startUpgrade()` 3. Publish new `Lido` implementation in Lido app APM repo 4. Update `Lido` implementation 5. Publish new `NodeOperatorsRegistry` implementation in NodeOper...
lidofinance/scripts
archive/scripts/upgrade_shapella.py
upgrade_shapella.py
py
12,033
python
en
code
14
github-code
36
[ { "api_name": "brownie.ShapellaUpgradeTemplate.at", "line_number": 103, "usage_type": "call" }, { "api_name": "brownie.ShapellaUpgradeTemplate", "line_number": 103, "usage_type": "name" }, { "api_name": "typing.Tuple", "line_number": 102, "usage_type": "name" }, { ...
15905142289
import random import time import tweepy import pandas import logging from config import consumer_key, consumer_secret, access_token, access_token_secret #Declare variables timer = 10800 # three hours df = pandas.read_csv('quotes.csv', delimiter='*') index = df.index number_of_rows = len(index) logger = logging.getLog...
dannymccaslin/MotivatorBot
motivator.py
motivator.py
py
2,587
python
en
code
0
github-code
36
[ { "api_name": "pandas.read_csv", "line_number": 10, "usage_type": "call" }, { "api_name": "logging.getLogger", "line_number": 14, "usage_type": "call" }, { "api_name": "logging.FileHandler", "line_number": 15, "usage_type": "call" }, { "api_name": "logging.Formatt...
495133127
from collections import namedtuple from dagster import check from dagster.core.definitions.logger import LoggerDefinition from dagster.core.definitions.pipeline import PipelineDefinition class InitLoggerContext( namedtuple('InitLoggerContext', 'logger_config pipeline_def logger_def run_id') ): '''Logger-spec...
helloworld/continuous-dagster
deploy/dagster_modules/dagster/dagster/core/execution/context/logger.py
logger.py
py
1,419
python
en
code
2
github-code
36
[ { "api_name": "collections.namedtuple", "line_number": 9, "usage_type": "call" }, { "api_name": "dagster.check.inst_param", "line_number": 30, "usage_type": "call" }, { "api_name": "dagster.core.definitions.pipeline.PipelineDefinition", "line_number": 30, "usage_type": "a...
38214358765
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Jun 19 3:15 2019 @author: deepnikajain """ import os import pandas as pd import matplotlib.pyplot as plt import numpy as np from astropy.table import Table from penquins import Kowalski from Coadding.keypairs import get_keypairs DEFAULT_AUTHs = ge...
Deepnika/Assembling-lightcurves-SLSNe
query_kowalski.py
query_kowalski.py
py
4,748
python
en
code
0
github-code
36
[ { "api_name": "Coadding.keypairs.get_keypairs", "line_number": 21, "usage_type": "call" }, { "api_name": "penquins.Kowalski", "line_number": 27, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 63, "usage_type": "call" }, { "api_name": "numpy.ar...
72166511464
# -*- coding: utf-8 -*- from instrument import Instrument import instruments import numpy import types import logging class virtual_period(Instrument): ''' This is the driver to handle period. ''' def __init__(self, name, pulser): ''' Initialize the virtual instru...
QCoherence/python_drivers
virtual_period.py
virtual_period.py
py
5,286
python
en
code
2
github-code
36
[ { "api_name": "instrument.Instrument", "line_number": 8, "usage_type": "name" }, { "api_name": "instrument.Instrument.__init__", "line_number": 27, "usage_type": "call" }, { "api_name": "instrument.Instrument", "line_number": 27, "usage_type": "name" }, { "api_nam...
34342251813
# import asyncio import time from evdev import InputDevice, categorize, ecodes source_device = None target_device = None # Init dev reference while source_device is None and target_device is None: try: source_device = InputDevice('/dev/input/event1') target_device = InputDevice('/dev/hidg0') except Except...
c4software/raspberry-pi-hid-proxy
sample.py
sample.py
py
804
python
en
code
1
github-code
36
[ { "api_name": "evdev.InputDevice", "line_number": 11, "usage_type": "call" }, { "api_name": "evdev.InputDevice", "line_number": 12, "usage_type": "call" }, { "api_name": "time.sleep", "line_number": 15, "usage_type": "call" }, { "api_name": "evdev.categorize", ...
72448270504
import numpy as np import tensornetwork as tn np_vec = np.array([[0], [1]]) tn_vec1 = tn.Node(np_vec) tn_vec2 = tn.Node(np_vec) # Contracting the first index gives matrix with 1 element tn_outer = tn.contract(tn_vec1[0] ^ tn_vec2[0]) # Contracting the second index gives matrix tn_outer1 = tn.contract(tn_vec1[1] ^ tn...
Zshan0/TensorSimulations
src/dummy/matrix.py
matrix.py
py
953
python
en
code
0
github-code
36
[ { "api_name": "numpy.array", "line_number": 4, "usage_type": "call" }, { "api_name": "tensornetwork.Node", "line_number": 5, "usage_type": "call" }, { "api_name": "tensornetwork.Node", "line_number": 6, "usage_type": "call" }, { "api_name": "tensornetwork.contract...
73497717544
# Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import torch, numpy as np, os import torch.nn as nn import torch.nn.functional as F from timm.models.layers imp...
Aveygo/WordsAreWorth16x16Pixels
models/pacing_model.py
pacing_model.py
py
8,183
python
en
code
3
github-code
36
[ { "api_name": "torch.nn.Module", "line_number": 18, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 18, "usage_type": "name" }, { "api_name": "torch.nn.Parameter", "line_number": 23, "usage_type": "call" }, { "api_name": "torch.nn", "line...
71859082343
import logging import os from io import StringIO import boto3 import pandas as pd from botocore.exceptions import ClientError AWS_KEY_ID = os.environ.get("AWS_ACCESS_KEY_ID") AWS_SECRET = os.environ.get("AWS_SECRET_ACCESS_KEY") bucket = "kiwi-bot" # key = "ordersDB.csv" prefix = "data/" filename = "https...
edward0rtiz/clustering-demand-scm
lib/data_engine/s3_get_object.py
s3_get_object.py
py
717
python
en
code
0
github-code
36
[ { "api_name": "os.environ.get", "line_number": 9, "usage_type": "call" }, { "api_name": "os.environ", "line_number": 9, "usage_type": "attribute" }, { "api_name": "os.environ.get", "line_number": 10, "usage_type": "call" }, { "api_name": "os.environ", "line_nu...
2201109453
import numpy as np import subprocess import os import sys from Bio import SeqIO from Bio import PDB from Bio.PDB.PDBParser import PDBParser from Bio.PDB.Polypeptide import PPBuilder from joblib import Parallel, delayed import multiprocessing as mp import time import re from joblib import Parallel, delayed import concur...
alschaap/master-thesis
scripts/energy_calc_pipeline.py
energy_calc_pipeline.py
py
16,561
python
en
code
0
github-code
36
[ { "api_name": "time.time", "line_number": 35, "usage_type": "call" }, { "api_name": "os.makedirs", "line_number": 39, "usage_type": "call" }, { "api_name": "os.chdir", "line_number": 40, "usage_type": "call" }, { "api_name": "sys.stderr", "line_number": 49, ...
70183485543
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys from decouple import config def main(): """Run administrative tasks.""" os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'senda.settings') enviroment = config("ENVIROMENT") if enviroment == "stag...
UNPSJB/SendaAlquiler
backend/manage.py
manage.py
py
1,129
python
en
code
1
github-code
36
[ { "api_name": "os.environ.setdefault", "line_number": 11, "usage_type": "call" }, { "api_name": "os.environ", "line_number": 11, "usage_type": "attribute" }, { "api_name": "decouple.config", "line_number": 13, "usage_type": "call" }, { "api_name": "os.environ.setd...
25282880574
import entrypoints import mimetypes def open(*args, **kwargs): """ Dispatch to a compatible PIMS reader. """ # Dispatch using the first argument which is assumed to be a file buffer, # filename, or filename glob. reader = _dispatch(args[0]) return reader(*args, **kwargs) def _dispatch(fi...
danielballan/pims2-prototype
pims/__init__.py
__init__.py
py
1,750
python
en
code
1
github-code
36
[ { "api_name": "mimetypes.init", "line_number": 18, "usage_type": "call" }, { "api_name": "mimetypes.guess_type", "line_number": 21, "usage_type": "call" }, { "api_name": "mimetypes.guess_type", "line_number": 34, "usage_type": "call" }, { "api_name": "entrypoints....
6267092868
# -*- coding: utf-8 -*- import scrapy import re import datetime from scrapy.http import Request from urllib import parse from ..items import JobBoleArticleItem from ..utils.common import get_md5 class JobboleSpider(scrapy.Spider): name = 'jobbole' allowed_domains = ['blog.jobbole.com'] start_urls = ['htt...
jasonxu510/scrapypro
ArticleSpider/ArticleSpider/spiders/jobbole.py
jobbole.py
py
3,319
python
en
code
0
github-code
36
[ { "api_name": "scrapy.Spider", "line_number": 12, "usage_type": "attribute" }, { "api_name": "scrapy.http", "line_number": 18, "usage_type": "attribute" }, { "api_name": "scrapy.http.Request", "line_number": 28, "usage_type": "call" }, { "api_name": "scrapy.http.R...
44448619471
from pathlib import Path import sqlite3 from datetime import datetime from pymongo import ASCENDING import pandas as pd from utils.many_utils import PATH, get_collection def inserisci_scadenza( st, nome, data_scadenza, dettagli, importo, stato, categoria, frequenza, notifiche=Fal...
piopy/solexiv
src/logica_applicativa/Scadenze.py
Scadenze.py
py
6,066
python
it
code
0
github-code
36
[ { "api_name": "sqlite3.connect", "line_number": 22, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_number": 22, "usage_type": "call" }, { "api_name": "utils.many_utils.PATH", "line_number": 22, "usage_type": "argument" }, { "api_name": "datetime.datet...
15974641193
# *-* coding: utf-8 *-* """ Created on mar 23 fév 2021 09:14:21 UTC @author: vekemans """ import math as mt import numpy as np from math import pi as π from numpy.fft import fft,fftshift,ifft import matplotlib import matplotlib.pyplot as plt from matplotlib import animation nfig = 1 def dft(func, start,end,N, or...
abbarn/lmeca2300
homeworks/fft3.py
fft3.py
py
4,093
python
en
code
0
github-code
36
[ { "api_name": "numpy.arange", "line_number": 27, "usage_type": "call" }, { "api_name": "numpy.fft.fftshift", "line_number": 31, "usage_type": "call" }, { "api_name": "numpy.fft.fft", "line_number": 31, "usage_type": "call" }, { "api_name": "numpy.arange", "lin...
14575147176
from collections import defaultdict from sys import stdin def rec(graph, v, visited, visited2): if v == 'end': return 1 if v.islower(): if v not in visited: visited.add(v) else: visited2.add(v) res = 0 for to in graph[v]: if not to.islower() or...
vfolunin/archives-solutions
Advent of Code/2021/12.2.py
12.2.py
py
758
python
en
code
0
github-code
36
[ { "api_name": "collections.defaultdict", "line_number": 30, "usage_type": "call" }, { "api_name": "sys.stdin", "line_number": 32, "usage_type": "name" } ]
570245906
import logging import math from .geomsmesh import geompy from .triedreBase import triedreBase O, OX, OY, OZ = triedreBase() def ellipsoideDefaut(minRad,allonge): """Le bloc contenant la fissure est un ellipsoide construit centre a l'origine, contenant le tore elliptique de fissure @param minRad :petit rayon ...
luzpaz/occ-smesh
src/Tools/blocFissure/gmu/ellipsoideDefaut.py
ellipsoideDefaut.py
py
1,044
python
en
code
2
github-code
36
[ { "api_name": "triedreBase.triedreBase", "line_number": 7, "usage_type": "call" }, { "api_name": "logging.info", "line_number": 17, "usage_type": "call" }, { "api_name": "geomsmesh.geompy.MakeSphereR", "line_number": 18, "usage_type": "call" }, { "api_name": "geom...
71778077224
import xml.etree.ElementTree as Tree import unittest import os # Clear Screen def clear_screen(): if os.name == 'posix': # Linux os.system('clear') elif os.name in ('nt', 'dos', 'ce'): # Windows os.system('CLS') class ETLTool: # Constructor def __init__(self): self.tree = N...
rkaushik29/xml_etl
etl_tool.py
etl_tool.py
py
5,037
python
en
code
0
github-code
36
[ { "api_name": "os.name", "line_number": 7, "usage_type": "attribute" }, { "api_name": "os.system", "line_number": 8, "usage_type": "call" }, { "api_name": "os.name", "line_number": 9, "usage_type": "attribute" }, { "api_name": "os.system", "line_number": 10, ...
12730428499
""" The main, core program. A CLI program. For now: whilst this is just a CLI program, you must edit any key settings with the file: C:\Potts' Software\Fortnite Exploit\fe-sett.ini Changing this file is permitted, I'm not the best at efficient programming. Work away. Written by Elliot Potts, https://w...
vbuckgartuit/Fornite-Parachute-Exploit
cli/main.py
main.py
py
5,224
python
en
code
1
github-code
36
[ { "api_name": "ConfigParser.SafeConfigParser", "line_number": 26, "usage_type": "call" }, { "api_name": "time.sleep", "line_number": 30, "usage_type": "call" }, { "api_name": "os.path.isdir", "line_number": 35, "usage_type": "call" }, { "api_name": "os.path", ...
40729675478
from typing import Dict, List, Optional from fuzzly.models.post import PostId, PostIdValidator from fuzzly.models.tag import TagGroupPortable from fuzzly.models.user import UserPortable from pydantic import BaseModel class LookupRequest(BaseModel) : tag: Optional[str] class TagsRequest(BaseModel) : _post_id_conv...
kheina-com/tagger
models.py
models.py
py
1,142
python
en
code
0
github-code
36
[ { "api_name": "pydantic.BaseModel", "line_number": 9, "usage_type": "name" }, { "api_name": "typing.Optional", "line_number": 10, "usage_type": "name" }, { "api_name": "pydantic.BaseModel", "line_number": 13, "usage_type": "name" }, { "api_name": "fuzzly.models.po...
14017935134
''' this module makes helix curve ''' import math import maya.cmds as cmds def helix(radius, pitch, sr, sp, ncvs,*args): ''' create helix curve ''' deg = 3 spas = ncvs - deg knots = ncvs + deg -1 points = [] points.append((radius, 0, 0.5)) #cmds.joint(p=(0,0,0)) d = 1 fo...
s-nako/MayaPythonTools
ModelingTools/curves/do_helix.py
do_helix.py
py
1,471
python
en
code
0
github-code
36
[ { "api_name": "math.cos", "line_number": 21, "usage_type": "call" }, { "api_name": "math.sin", "line_number": 23, "usage_type": "call" }, { "api_name": "maya.cmds.curve", "line_number": 26, "usage_type": "call" }, { "api_name": "maya.cmds", "line_number": 26, ...
27787353861
#v.2.0.0 import json, os, time import resources.config_server as config from resources.lib.xlogger import Logger from resources.lib.blasters import * from resources.lib.websocket_server import WebsocketServer class Main: def __init__( self, thepath ): """Start IguanaIR Blaster Server.""" self.RO...
pkscout/iguana-blaster
resources/lib/server.py
server.py
py
2,443
python
en
code
0
github-code
36
[ { "api_name": "os.path.dirname", "line_number": 14, "usage_type": "call" }, { "api_name": "os.path", "line_number": 14, "usage_type": "attribute" }, { "api_name": "resources.lib.xlogger.Logger", "line_number": 15, "usage_type": "call" }, { "api_name": "os.path.joi...
74552235943
import json import datetime, time import itertools import pyverdict import decimal import os import multiprocessing from multiprocessing import Queue from common import util import pandas as pd import numpy as np import queue import threading from threading import Thread #logger = logging.getLogger("idebench") class I...
leibatt/crossfilter-benchmark-public
drivers/verdictdb.py
verdictdb.py
py
7,794
python
en
code
3
github-code
36
[ { "api_name": "pyverdict.postgres", "line_number": 43, "usage_type": "call" }, { "api_name": "queue.LifoQueue", "line_number": 50, "usage_type": "call" }, { "api_name": "json.load", "line_number": 52, "usage_type": "call" }, { "api_name": "json.load", "line_nu...
138761933
import json def json_read(path): ''' Parses file of json type. ''' with open(path, 'r', encoding='utf-8') as f: text = json.load(f) return text def conti_with_count(): names = json_read('names.json') continents = json_read('continent.json') result = {} for country in con...
AndriiTurko/homeworks_programming
json_make_dict.py
json_make_dict.py
py
534
python
en
code
0
github-code
36
[ { "api_name": "json.load", "line_number": 8, "usage_type": "call" } ]
20981029783
""" Created on Mon Feb 10 03:29:54 2020 @author: Luthfi (lsaif.github.com) """ from flask import Flask, render_template, request import csv import re with open('litho_dict.csv', newline='') as infile: reader = csv.reader(infile) next(reader) litholist = dict(reader) def translate(desc,transdict): ...
luthfigeo/MudLog-Translator
MudLogTranslator.py
MudLogTranslator.py
py
1,117
python
en
code
3
github-code
36
[ { "api_name": "csv.reader", "line_number": 10, "usage_type": "call" }, { "api_name": "re.split", "line_number": 18, "usage_type": "call" }, { "api_name": "flask.Flask", "line_number": 24, "usage_type": "call" }, { "api_name": "flask.render_template", "line_num...
15056294029
import os import sqlite3 import subprocess as sp import sys from pathlib import Path db_path = Path(Path.home() / '.mypycheck.sqlite3') def _create_files_table(con: sqlite3.Connection) -> None: con.execute('''CREATE TABLE IF NOT EXISTS files ( id INTEGER PRIMARY KEY, name ...
dlsloan/mypycheck
src/mypycheck/__init__.py
__init__.py
py
2,041
python
en
code
0
github-code
36
[ { "api_name": "pathlib.Path", "line_number": 8, "usage_type": "call" }, { "api_name": "pathlib.Path.home", "line_number": 8, "usage_type": "call" }, { "api_name": "sqlite3.Connection", "line_number": 10, "usage_type": "attribute" }, { "api_name": "pathlib.Path", ...
7135815082
# -*- coding: utf-8 -*- # *************************************************** # * File : main.py # * Author : Zhefeng Wang # * Email : wangzhefengr@163.com # * Date : 2023-04-11 # * Version : 0.1.041123 # * Description : description # * Link : link # * Requirement : 相关模块版本需求(例如: nu...
wangzhefeng/tsproj
models/todo/FeedForwardNetwork.py
FeedForwardNetwork.py
py
4,869
python
en
code
0
github-code
36
[ { "api_name": "torch.nn.Module", "line_number": 37, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 37, "usage_type": "name" }, { "api_name": "typing.List", "line_number": 40, "usage_type": "name" }, { "api_name": "typing.Callable", "line...
32793914547
import torch import torch.nn as nn from conf import device class Encoder(nn.Module): def __init__(self, vocab_size, hidden_size=256): super(Encoder, self).__init__() self.hidden_size = hidden_size self.embedding = nn.Embedding(vocab_size, hidden_size) self.gru = nn.GRU(hidden_size,...
junix/gen_poem
encoder.py
encoder.py
py
622
python
en
code
0
github-code
36
[ { "api_name": "torch.nn.Module", "line_number": 6, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 6, "usage_type": "name" }, { "api_name": "torch.nn.Embedding", "line_number": 10, "usage_type": "call" }, { "api_name": "torch.nn", "line_n...
3419488617
from spectractor import parameters from spectractor.config import set_logger import matplotlib.pyplot as plt import pandas as pd import os import numpy as np class LogBook: """Class to load_image and analyse observation logbook csv files.""" def __init__(self, logbook="./tests/data/ctiofulllogbook_jun2017_v...
LSSTDESC/Spectractor
spectractor/logbook.py
logbook.py
py
5,793
python
en
code
13
github-code
36
[ { "api_name": "spectractor.config.set_logger", "line_number": 35, "usage_type": "call" }, { "api_name": "os.path.isfile", "line_number": 37, "usage_type": "call" }, { "api_name": "os.path", "line_number": 37, "usage_type": "attribute" }, { "api_name": "pandas.read...
6790152771
import csv from datetime import datetime from django.conf import settings from django.core.management import BaseCommand from exo_accounts.models import EmailAddress from exo_certification.tasks import HubspotCertificationDealSyncTask from ...models import ExOCertification, CertificationRequest class Command(BaseC...
tomasgarzon/exo-services
service-exo-core/exo_certification/management/commands/generate_certification_requests_free_coaches.py
generate_certification_requests_free_coaches.py
py
2,647
python
en
code
0
github-code
36
[ { "api_name": "django.core.management.BaseCommand", "line_number": 13, "usage_type": "name" }, { "api_name": "models.ExOCertification.objects.get", "line_number": 21, "usage_type": "call" }, { "api_name": "models.ExOCertification.objects", "line_number": 21, "usage_type":...
20465273392
# -*- coding: utf-8 -*- # @Project : CrawlersTools # @Time : 2022/6/21 17:06 # @Author : MuggleK # @File : proxy.py import httpx from loguru import logger def get_proxies(proxy_url=None, http2=False): """ 默认httpx代理模式 @param proxy_url: 代理请求链接 @param http2: 默认http1.1规则 @return: """ ...
MuggleK/CrawlersTools
CrawlersTools/requests/proxy.py
proxy.py
py
697
python
en
code
16
github-code
36
[ { "api_name": "httpx.get", "line_number": 23, "usage_type": "call" }, { "api_name": "loguru.logger.error", "line_number": 29, "usage_type": "call" }, { "api_name": "loguru.logger", "line_number": 29, "usage_type": "name" } ]
2403591134
import time import pygame from pygame.locals import * import random from os import environ # Class for creating a window structure for the simulation class WindowStructure: def __init__(self, win_pos=(0, 0), state=0): self.y_origin, self.x_origin = win_pos self.state = state # Me...
Time2bImmortal/Heart_of_the_swarm
Simulator_ver_02/VirtualSimulation.py
VirtualSimulation.py
py
11,078
python
en
code
0
github-code
36
[ { "api_name": "os.environ", "line_number": 16, "usage_type": "name" }, { "api_name": "pygame.display.set_mode", "line_number": 17, "usage_type": "call" }, { "api_name": "pygame.display", "line_number": 17, "usage_type": "attribute" }, { "api_name": "pygame.time.Cl...
8594392164
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Scripts to plot Figure 2, co-occurrence and spearman rho for top 1000 videos in terms of views and watch times. Usage: python plot_intersection_spearman_top1000.py Time: ~2M """ from __future__ import division, print_function import os from scipy import stats import ...
avalanchesiqi/yt-longevity
engagement_plots/plot_intersection_spearman_top1000.py
plot_intersection_spearman_top1000.py
py
5,027
python
en
code
2
github-code
36
[ { "api_name": "operator.itemgetter", "line_number": 18, "usage_type": "call" }, { "api_name": "operator.itemgetter", "line_number": 19, "usage_type": "call" }, { "api_name": "operator.itemgetter", "line_number": 34, "usage_type": "call" }, { "api_name": "operator....
40155422506
import os, sys, time, datetime # Additional packages import numpy as np # ARL Env from dVRK.PSM_cartesian_ddpg_env import PSMCartesianDDPGEnv # Stable baselines algorithms from stable_baselines.ddpg.policies import MlpPolicy from stable_baselines import HER, DDPG from stable_baselines.common.noise import NormalActio...
WPI-AIM/ambf_rl
scripts/dVRK/PSM_cartesian_ddpg_algorithm.py
PSM_cartesian_ddpg_algorithm.py
py
4,942
python
en
code
8
github-code
36
[ { "api_name": "os.getcwd", "line_number": 20, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 21, "usage_type": "call" }, { "api_name": "os.path", "line_number": 21, "usage_type": "attribute" }, { "api_name": "os.path.exists", "line_number...
6320198920
import pathlib2 import os import wx from option_loader import OptHandle class EditFrame(wx.Frame): def __init__(self, opt_instance:OptHandle): super().__init__(parent = None, title="Edit Panel") self.opt_handle = opt_instance self.setup_panel() self.SetSize(0, 0, 500, 750) ...
Nickiel12/Church-Programs
WX-StreamController/edit_gui.py
edit_gui.py
py
2,034
python
en
code
0
github-code
36
[ { "api_name": "wx.Frame", "line_number": 7, "usage_type": "attribute" }, { "api_name": "option_loader.OptHandle", "line_number": 9, "usage_type": "name" }, { "api_name": "wx.Panel", "line_number": 17, "usage_type": "call" }, { "api_name": "wx.Colour", "line_nu...
1151371916
import json from pprint import pprint with open('rpPurchases.json') as f: data = json.load(f) l = [] for idx in data: l.append((idx["amount"],idx["paymentType"])) rp = 0 for a in l: rp += a[0] print(rp)
kickass9797/Testing
rand/omg.py
omg.py
py
239
python
en
code
0
github-code
36
[ { "api_name": "json.load", "line_number": 5, "usage_type": "call" } ]
6044172734
from django.conf.urls import patterns, url from django.core.urlresolvers import reverse_lazy from django.contrib.staticfiles.urls import staticfiles_urlpatterns from . import views from models import Entry urlpatterns = patterns( '', url(r'^(?P<slug>\S+)/copy/$', views.copy_blog, name='blog_copy'), url...
lowmanb/cs3240-f14-team01
blog/urls.py
urls.py
py
2,245
python
en
code
0
github-code
36
[ { "api_name": "django.conf.urls.patterns", "line_number": 7, "usage_type": "call" }, { "api_name": "django.conf.urls.url", "line_number": 9, "usage_type": "call" }, { "api_name": "django.conf.urls.url", "line_number": 10, "usage_type": "call" }, { "api_name": "dja...
41831305861
from typing import Optional from cartes import COEUR, COULEURS, CarteBelote, CarteSetBelote, Couleur, Pli class Annonce: VALID_SCORES = list(range(80, 170, 10)) + [0, 1000, 2000] def __init__(self, atout, score_a_faire, joueur): if int(score_a_faire) not in self.VALID_SCORES: raise Value...
slim0/pyContree
joueurs.py
joueurs.py
py
6,836
python
fr
code
0
github-code
36
[ { "api_name": "cartes.Couleur", "line_number": 13, "usage_type": "argument" }, { "api_name": "cartes.COEUR", "line_number": 25, "usage_type": "name" }, { "api_name": "cartes.CarteSetBelote", "line_number": 39, "usage_type": "name" }, { "api_name": "typing.Optional...
8589141283
from forum.models import Post, Comment from django import forms from tinymce.widgets import TinyMCE class PostForm(forms.ModelForm): class Meta: model = Post exclude = ['author', 'slug', 'course'] title = forms.CharField( label='Title', max_length=50, widget=forms.Text...
rafidirg/forum-saas-kowan
forum/forms.py
forms.py
py
689
python
en
code
0
github-code
36
[ { "api_name": "django.forms.ModelForm", "line_number": 6, "usage_type": "attribute" }, { "api_name": "django.forms", "line_number": 6, "usage_type": "name" }, { "api_name": "forum.models.Post", "line_number": 8, "usage_type": "name" }, { "api_name": "django.forms....
27097993038
import logging class CustomFormatter(logging.Formatter): """Logging Formatter to add colors and count warning / errors""" cyan = "\u001b[36m" green = "\u001b[32m" yellow = "\u001b[33m" red = "\u001b[35m" bold_red = "\u001b[31m" reset = "\u001b[0m" debug_format = "%(asctime)s...
Beatson-Institute-Digital-Pathology/reinhard-wsi-normalisation
reinhard_wsi/logging.py
logging.py
py
1,711
python
en
code
2
github-code
36
[ { "api_name": "logging.Formatter", "line_number": 3, "usage_type": "attribute" }, { "api_name": "logging.DEBUG", "line_number": 16, "usage_type": "attribute" }, { "api_name": "logging.INFO", "line_number": 17, "usage_type": "attribute" }, { "api_name": "logging.WA...
18394694315
import os import numpy as np import pytest from numpy.testing import assert_array_equal import tiledb def test_schema_evolution(tmp_path): ctx = tiledb.default_ctx() se = tiledb.ArraySchemaEvolution(ctx) uri = str(tmp_path) attrs = [ tiledb.Attr(name="a1", dtype=np.float64), tiledb...
TileDB-Inc/TileDB-Py
tiledb/tests/test_schema_evolution.py
test_schema_evolution.py
py
6,667
python
en
code
165
github-code
36
[ { "api_name": "tiledb.default_ctx", "line_number": 11, "usage_type": "call" }, { "api_name": "tiledb.ArraySchemaEvolution", "line_number": 12, "usage_type": "call" }, { "api_name": "tiledb.Attr", "line_number": 17, "usage_type": "call" }, { "api_name": "numpy.floa...
11504622560
""" This module contains the Distribution class which defines a standard interface for distributions It also provides several implemented distributions, which inherit from Distribution Any user-specified distributions should inherit from Distribution """ import numpy as np from .utils import overrides, package_path...
rueberger/MJHMC
mjhmc/misc/distributions.py
distributions.py
py
16,295
python
en
code
24
github-code
36
[ { "api_name": "utils.package_path", "line_number": 114, "usage_type": "call" }, { "api_name": "os.listdir", "line_number": 115, "usage_type": "call" }, { "api_name": "pickle.load", "line_number": 117, "usage_type": "call" }, { "api_name": "mjhmc.misc.gen_mj_init.M...
23497344492
from io import BytesIO from PIL import Image from uuid import uuid4 from django.core.files import File JPEG_IMAGE_QUALITY = 100 def crop_image(image): im = Image.open(image) (height, width) = (im.height, im.width) shortest_side = min(height, width) dimensions = (0, 0, shortest_side, shortest_side) ...
adrianeriksen/photographic
photographic/photos/utils.py
utils.py
py
610
python
en
code
0
github-code
36
[ { "api_name": "PIL.Image.open", "line_number": 11, "usage_type": "call" }, { "api_name": "PIL.Image", "line_number": 11, "usage_type": "name" }, { "api_name": "io.BytesIO", "line_number": 21, "usage_type": "call" }, { "api_name": "django.core.files.File", "lin...