max_stars_repo_path
string
max_stars_repo_name
string
max_stars_count
int64
id
string
content
string
add_param_types
int64
add_return_types
int64
add_class_field_types
int64
add_instance_field_types
int64
add_total
int64
add_error
int64
nlpre/separate_reference.py
thoppe/NLPre
186
1636330
from __future__ import annotations from .Grammars import reference_patterns from .dictionary import wordlist_english import logging import re REFERENCE_PREFIX = "REF_" strip_table = str.maketrans("", "", "(){}<>[]") strip_table = str.maketrans("", "", "(){}<>[].,!;?") class separate_reference: """ Detects i...
5
4
0
1
10
0
se_math/__init__.py
rajahaseeb147/PCD_Registration_FMR
108
1636348
<filename>se_math/__init__.py from . import invmat, se3, sinc, so3, mesh, transforms #EOF
0
0
0
0
0
0
facedancer/classes/hid/keyboard.py
mrh1997/Facedancer
345
1636351
# # This file is part of FaceDancer. # """ Helpers for HID keyboards. """ import string from enum import IntEnum, IntFlag # Table mapping ASCII codes to their equivalent HID keycodes. # From the Adafruit HID library; https://github.com/adafruit/Adafruit_CircuitPython_HID/. # Used under copyright exemption (as these ...
0
1
179
0
180
0
riemann/tests/tx/test_tx.py
sturmianseq/riemann
118
1636358
import riemann import unittest from riemann import tx from riemann import utils from riemann.tests import helpers class TestOutpoint(unittest.TestCase): def setUp(self): pass def test_create_outpoint(self): outpoint_index = helpers.P2PKH1['ser']['ins'][0]['index'] outpoint_tx_id = he...
0
0
0
0
0
0
alipay/aop/api/response/ZhimaMerchantContractOnofferQueryResponse.py
antopen/alipay-sdk-python-all
213
1636383
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.response.AlipayResponse import AlipayResponse class ZhimaMerchantContractOnofferQueryResponse(AlipayResponse): def __init__(self): super(ZhimaMerchantContractOnofferQueryResponse, self).__init__() self._cancel_operator...
0
29
0
29
58
0
river/datasets/smtp.py
fox-ds/river
2,184
1636414
from river import stream from . import base class SMTP(base.RemoteDataset): """SMTP dataset from the KDD 1999 cup. The goal is to predict whether or not an SMTP connection is anomalous or not. The dataset only contains 2,211 (0.4%) positive labels. References ---------- [^1]: [SMTP (KDDCUP9...
0
1
0
0
1
0
services/root-keys/dev-helpers/reference.py
fweissberg/xous-core
218
1636423
<reponame>fweissberg/xous-core #!/usr/bin/python3 import argparse from Crypto.Cipher import AES from Crypto.Hash import SHA256 from Crypto.Random import get_random_bytes import binascii import logging import sys """ Reverse the order of bits in a word that is bitwidth bits wide """ def bitflip(data_block, bitwidth=3...
0
0
0
0
0
0
python/vineyard/data/index.py
v6d-io/v6d
117
1636511
#! /usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2020-2021 Alibaba Group Holding Limited. # # 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/LI...
0
2
0
0
2
0
test/mac/identical-name/testlib/testlib.gyp
chlorm-forks/gyp
2,151
1636526
<filename>test/mac/identical-name/testlib/testlib.gyp<gh_stars>1000+ { 'includes': ['../test.gypi'], 'targets': [{ 'target_name': 'proxy', 'type': 'static_library', 'sources': ['void.cc'], 'dependencies': ['testlib'], 'export_dependent_settings': ['testlib'], }, { 'target_name': 'testlib',...
0
0
0
0
0
0
posthog/migrations/0080_update_dashboard_funnel_filters.py
avoajaugochukwu/posthog
7,409
1636531
# Generated by Django 3.0.7 on 2020-08-06 18:50 from django.db import migrations def forward(apps, schema_editor): Funnel = apps.get_model("posthog", "Funnel") DashboardItem = apps.get_model("posthog", "DashboardItem") Action = apps.get_model("posthog", "Action") for item in DashboardItem.objects.fil...
0
0
2
0
2
0
language-python-test/test/features/keyword_arguments/keyword_argument_name_order.py
wbadart/language-python
137
1636545
<reponame>wbadart/language-python<filename>language-python-test/test/features/keyword_arguments/keyword_argument_name_order.py # We once had a bug with this code. # The issue is due to the alphabetical order of the arguments to # ray_trace (x is after recurse_cutoff in lexicographic ordering). # We didn't generate the ...
0
0
0
0
0
0
frontend/api/tasks/braintasks.py
krisshol/bach-kmno
248
1636557
# # Copyright (c) 2013-2018 Quarkslab. # This file is part of IRMA project. # # 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 in the top-level directory # of this distribution and at: # # http:...
0
7
0
0
7
0
redisco/models/managers.py
vartec/redisco
110
1636564
<reponame>vartec/redisco from modelset import ModelSet ############ # Managers # ############ class ManagerDescriptor(object): def __init__(self, manager): self.manager = manager def __get__(self, instance, owner): if instance != None: raise AttributeError return self.mana...
0
0
0
0
0
0
tests/dynamic_parallel_execution_groups/python/reducer_blocking.py
JoshTDN03/knix
167
1636565
<filename>tests/dynamic_parallel_execution_groups/python/reducer_blocking.py<gh_stars>100-1000 # Copyright 2020 The KNIX Authors # # 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 # # ...
0
0
0
0
0
0
sashimi/sc09_classifier/train_speech_commands.py
dumpmemory/state-spaces
513
1636587
#!/usr/bin/env python """Train a CNN for Google speech commands.""" __author__ = '<NAME>, <NAME>' """With modifications from Karan Goel.""" import argparse import time import torch import torchvision from torch.autograd import Variable from torch.utils.data import DataLoader from torch.utils.data.sampler import Wei...
0
2
0
0
2
0
readthedocs/redirects/admin.py
mforbes/readthedocs.org
4,054
1636597
<reponame>mforbes/readthedocs.org<filename>readthedocs/redirects/admin.py # -*- coding: utf-8 -*- """Django admin configuration for the redirects app.""" from django.contrib import admin from .models import Redirect class RedirectAdmin(admin.ModelAdmin): list_display = ['project', 'redirect_type', 'from_url', ...
0
0
0
0
0
0
backend/base/test/secrets_test.py
sleepingAnt/viewfinder
645
1636648
<reponame>sleepingAnt/viewfinder # Copyright 2012 Viewfinder Inc. All Rights Reserved. """Secrets test. Test secrets module. user vs shared, encrypted vs plain. """ __author__ = '<EMAIL> (<NAME>)' import getpass import json import logging import mock import os import shutil import tempfile import unittest from t...
0
0
0
0
0
0
src/Hisoka/classifier.py
majiajue/Listed-company-news-crawl-and-text-analysis
635
1636650
<reponame>majiajue/Listed-company-news-crawl-and-text-analysis import __init__ import logging import warnings from Kite import config import joblib from sklearn import svm from sklearn.ensemble import RandomForestClassifier from sklearn.model_selection import GridSearchCV from sklearn.metrics import classification_re...
0
0
0
0
0
0
bio_embeddings/extract/basic/annotation_inference_models.py
kvetab/bio_embeddings
219
1636671
import torch.nn as nn class SubCellFNN(nn.Module): # in 10 states and a binary classification into membrane-bound vs. soluble def __init__(self, use_batch_norm: bool=True): super(SubCellFNN, self).__init__() # Linear layer, taking embedding dimension 1024 to make predictions: if use_ba...
1
2
0
0
3
0
ragtag_agpcheck.py
ASLeonard/RagTag
220
1636684
#!/usr/bin/env python """ MIT License Copyright (c) 2021 <NAME> <<EMAIL>> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, cop...
0
0
0
0
0
0
tests/components/zwave/test_websocket_api.py
andersop91/core
22,481
1636689
"""Test Z-Wave Websocket API.""" from unittest.mock import call, patch from homeassistant import config_entries from homeassistant.bootstrap import async_setup_component from homeassistant.components.zwave.const import ( CONF_AUTOHEAL, CONF_NETWORK_KEY, CONF_POLLING_INTERVAL, CONF_USB_STICK_PATH, ) fro...
0
0
0
0
0
0
2021-04-19-10000-pods/visualizations/plot.py
huutuanit/dockercomposeexample
181
1636702
import matplotlib.pyplot as plt import matplotlib.animation as animation import pandas as pd import time NUM_NAMESPACES = 1 TOTAL_GOAL_PODS = 10001 GOAL_PODS = TOTAL_GOAL_PODS/NUM_NAMESPACES fig = plt.figure() ax1 = fig.add_subplot(2,1,1) ax2 = fig.add_subplot(2,1,2) time_elapsed_text = ax2.text(0.1, 0.25, '', fonts...
0
0
0
0
0
0
tests/http_future/HttpFuture/response_test.py
andriis/bravado
600
1636742
<gh_stars>100-1000 # -*- coding: utf-8 -*- import mock import pytest from bravado_core.response import IncomingResponse from bravado.config import bravado_config_from_config_dict from bravado.config import RequestConfig from bravado.exception import BravadoTimeoutError from bravado.exception import ForcedFallbackResul...
0
0
0
0
0
0
keras_contrib/__init__.py
congson1293/keras-contrib
1,335
1636789
from __future__ import absolute_import from . import backend from . import datasets from . import layers from . import preprocessing from . import utils from . import wrappers from . import callbacks from . import constraints from . import initializers from . import metrics from . import losses from . import optimizers...
0
0
0
0
0
0
src/oci/data_science/models/__init__.py
Manny27nyc/oci-python-sdk
249
1636800
# coding: utf-8 # Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
0
0
0
0
0
0
Beginner/HOW MANY DIGITS DO I HAVE (HOWMANY)/howmany.py
anishsingh42/CodeChef
127
1636803
<filename>Beginner/HOW MANY DIGITS DO I HAVE (HOWMANY)/howmany.py num = input("Give me input-->") digits = 0 for i in range(len(num)): digits = digits + 1 if digits ==1: print("Your input has 1 digit") elif digits ==2: print("Your input has 2 digits") elif digits ==3: ...
0
0
0
0
0
0
ironic/tests/unit/db/test_node_traits.py
yanndegat/ironic
350
1636834
# 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 # d...
0
0
0
0
0
0
custom_plate/jpg2png.py
Dharun/TensorPy
267
1636839
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Apr 2 15:53:30 2018 import os os.remove(file) for file in os.listdir('path/to/directory') if file.endswith('.png') @author: tensorflow-cuda """ #import os #from PIL import Image #i=1 # # #os.remove(file) for file in os.listdir() if file.endswith('.jpeg'...
0
0
0
0
0
0
example/app/models.py
gluhar2006/schemathesis
659
1636854
import attr @attr.s(slots=True) class Booking: id: int = attr.ib() name: str = attr.ib() is_active: bool = attr.ib() asdict = attr.asdict
0
0
3
0
3
0
preprocess/charades/generate_roidb_test.py
demianzhang/R-C3D
273
1636859
# -------------------------------------------------------- # R-C3D # Copyright (c) 2017 Boston University # Licensed under The MIT License [see LICENSE for details] # Written by <NAME> # -------------------------------------------------------- ### please change the corresponding path prefix ${PATH} import os import c...
0
0
0
0
0
0
forum/views/notification.py
xqnq2007/zhongguoai
340
1636861
# coding: utf-8 from django.shortcuts import render_to_response from django.contrib.auth.decorators import login_required from django.template import RequestContext from forum.models import Notification @login_required def get_list(request) -> object: current_page = int(request.GET.get('p', '1')) user = requ...
0
1
0
0
1
0
networkx/algorithms/__init__.py
SultanOrazbayev/networkx
10,024
1636876
from networkx.algorithms.assortativity import * from networkx.algorithms.asteroidal import * from networkx.algorithms.boundary import * from networkx.algorithms.bridges import * from networkx.algorithms.chains import * from networkx.algorithms.centrality import * from networkx.algorithms.chordal import * from networkx....
0
0
0
0
0
0
tests/tests.py
m2march/python-midi
1,344
1636885
<gh_stars>1000+ import unittest import midi import mary_test import time import os try: import midi.sequencer as sequencer except ImportError: sequencer = None def get_sequencer_type(): if sequencer == None: return None return sequencer.Sequencer.SEQUENCER_TYPE class TestMIDI(unittest.TestCas...
0
0
0
0
0
0
src/olympia/bandwagon/tasks.py
covariant/addons-server
843
1636941
from datetime import datetime from django.db.models import Count import olympia.core.logger from olympia.amo.celery import task from olympia.amo.decorators import use_primary_db from .models import Collection, CollectionAddon log = olympia.core.logger.getLogger('z.task') @task @use_primary_db def collection_met...
0
0
0
0
0
0
spot_bullet/src/old_eval_scripts/td3_eval.py
sofya-pugach/spot_mini_mini
323
1636989
<filename>spot_bullet/src/old_eval_scripts/td3_eval.py #!/usr/bin/env python import numpy as np from td3_lib.td3 import ReplayBuffer, TD3Agent, evaluate_policy from mini_bullet.minitaur_gym_env import MinitaurBulletEnv import gym import torch import os import time def main(): """ The main() function. """ ...
0
0
0
0
0
0
test/programytest/clients/render/test_html.py
cdoebler1/AIML2
345
1636993
import unittest import unittest.mock from programy.clients.render.html import HtmlRenderer class MockHtmlBotClient(object): def __init__(self): self._response: None = None self.configuration = unittest.mock.Mock() self.configuration.host = "127.0.0.1" self.configuration.port = "6...
0
0
0
1
1
0
docs/source/sikulidirectives.py
mgrundy/sikuli
1,292
1637002
import sys, cgi import glob import re import keyword, token, tokenize import string, cStringIO, StringIO SIKULI_KEYWORDS = [ "find", "wait", "click", "clickAll", "repeatClickAll", "doubleClick", "doubleClickAll", "repeatDoubleClickAll", "rightClick", "dragDrop", "type", "sleep", "popup", "capture", "input"...
0
0
0
0
0
0
Trakttv.bundle/Contents/Libraries/Shared/plugin/core/libraries/helpers/storage.py
disrupted/Trakttv.bundle
1,346
1637017
<gh_stars>1000+ from plugin.core.helpers import regex as re import logging import os import shutil log = logging.getLogger(__name__) class StorageHelper(object): base_names = [ 'plug-ins', 'plug-in support', 'trakttv.bundle' ] framework_patterns = re.compile_list([ # Win...
0
0
0
0
0
0
nautobot/core/celery/schedulers.py
psmware-ltd/nautobot
384
1637026
from __future__ import annotations import logging from celery import current_app from django_celery_beat.schedulers import ModelEntry, DatabaseScheduler from nautobot.extras.models import ScheduledJob, ScheduledJobs logger = logging.getLogger(__name__) class NautobotScheduleEntry(ModelEntry): """ Nautobot...
1
0
0
1
2
0
setup.py
jhabmc/git-gud
970
1637035
from setuptools import setup, Extension, find_packages setup(name='gitgud', version='1.1', author='<NAME>', author_email="<EMAIL>", description="Git Gud - a utility for when you are told to 'get good'", url="https://github.com/fsufitch/git-gud", package_dir={'':'src'}, package...
0
0
0
0
0
0
classifiers/bundle_wrapper.py
uvasrg/AutomaticallyEvadeClassifiers
104
1637047
<gh_stars>100-1000 import sys, os from pdfrate_wrapper import pdfrate from hidost_wrapper import hidost import math def hidost_pdfrate(file_paths): # hidost = lambda *args:query_classifier('hidost', *args) # pdfrate = lambda *args:query_classifier('pdfrate', *args) hidost_scores = hidost(file_paths) p...
0
0
0
0
0
0
deepsurv/datasets.py
kstawiski/DeepSurv
395
1637056
<filename>deepsurv/datasets.py from math import log, exp import numpy as np class SimulatedData: def __init__(self, hr_ratio, average_death = 5, censor_mode = 'end_time', end_time = 15, observed_p = None, num_features = 10, num_var = 2, treatment_group = False): """ ...
0
0
0
0
0
0
JarvisAI/JarvisAI/JarvisAI/features/mic_input_ai/mic_input_ai.py
MaroonAngel/Jarvis_AI
165
1637096
<reponame>MaroonAngel/Jarvis_AI # Voice Recognition using https://huggingface.co/facebook/wav2vec2-base-960h import pyaudio import wave import os import librosa from transformers import Wav2Vec2ForCTC, Wav2Vec2Tokenizer from lazyme.string import color_print as cprint try: import torch except ImportError: cprin...
0
0
0
0
0
0
ansible/roles/acrcloud/files/live_stream_client-1.1.0/stream.py
geekpii/boltstream
1,735
1637165
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Author: qinxue.pan # Email : <EMAIL> # Date : 2016/08/15 import os, sys import json, Queue, struct, urllib, urllib2, logging import re import threading import hashlib import urlparse import time import base64 import socket import hmac import subprocess import multipr...
0
0
0
0
0
0
openbb_terminal/stocks/fundamental_analysis/fa_api.py
tehcoderer/GamestonkTerminal
255
1637189
"""Fundamental Analysis API.""" import os from openbb_terminal.helper_classes import ModelsNamespace as _models # flake8: noqa # pylint: disable=unused-import # Menu commands from .eclect_us_view import display_analysis as analysis from .business_insider_view import display_management as mgmt from .finviz_view import...
0
0
0
0
0
0
prettyprinter/textractprettyprinter/t_pretty_print_expense.py
ArlindNocaj/amazon-textract-textractor
187
1637242
""" Author: <EMAIL> Pretty printer for Amazon Textract AnalyzeExpense Response Call the method as shown in below example to pretty print the AnalyzeExpense Response - print(get_string(textract_json=data,output_type=[Textract_Expense_Pretty_Print.SUMMARY,Textract_Expense_Pretty_Print.LINEITEMGROUPS], table_format=Pret...
23
5
0
0
28
0
pkgpanda/build/__init__.py
KostiantynOleksiienko/dcos
2,577
1637247
from __future__ import annotations import copy import json import multiprocessing import os import random import shutil import string import tempfile from contextlib import contextmanager from os import chdir, getcwd, mkdir from os.path import exists import pkgpanda.build.constants import pkgpanda.build.src_fetchers f...
9
46
1
12
68
0
cumulusci/robotframework/tests/salesforce/pageobjects/example_page_object.py
davisagli/CumulusCI
163
1637265
<filename>cumulusci/robotframework/tests/salesforce/pageobjects/example_page_object.py from cumulusci.robotframework.pageobjects import BasePage, pageobject @pageobject("About", "Blank") class AboutBlankPage(BasePage): object_name = None def _go_to_page(self): self.selenium.go_to("about:blank") ...
0
0
0
0
0
0
pylearn2/sandbox/cuda_convnet/tests/test_response_norm.py
ikervazquezlopez/Pylearn2
2,045
1637271
import numpy import theano from nose.plugins.skip import SkipTest from theano.tests.unittest_tools import verify_grad try: from pylearn2.sandbox.cuda_convnet.response_norm import ( CrossMapNorm, CrossMapNormUndo ) from theano.sandbox.cuda import CudaNdarrayType, CudaNdarray from theano....
0
0
0
0
0
0
mephisto/abstractions/providers/mturk/utils/script_utils.py
padentomasello/Mephisto
167
1637313
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from typing import List, Optional, TYPE_CHECKING, Dict from mephisto.abstractions.providers.mturk.mturk_utils import gi...
5
1
0
0
6
0
epitran/bin/epitranscribe.py
dwijap/epitran
422
1637331
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import unicodedata import epitran import argparse def main(code): epi = epitran.Epitran(code) for line in sys.stdin: # pointless line = line.decode('utf-8') line = unicodedata.normalize('NFD', line.lower()) line = epi.translite...
0
0
0
0
0
0
utils.py
Jordzman/explorer
917
1637337
<filename>utils.py<gh_stars>100-1000 import re import random from blockexplorer.settings import BASE_URL def get_max_pages(num_items, items_per_page): if num_items < items_per_page: return 1 elif num_items % items_per_page == 0: return num_items // items_per_page else: return num_...
0
0
0
0
0
0
python_toolbox/cute_profile/base_profile.py
hboshnak/python_toolbox
119
1637355
<reponame>hboshnak/python_toolbox<gh_stars>100-1000 # Copyright 2009-2017 <NAME>. # This program is distributed under the MIT license. ''' Wraps the `cProfile` module, fixing a little bug in `runctx`. ''' from cProfile import * from .pstats_troubleshooting import troubleshoot_pstats troubleshoot_pstats() del trouble...
0
0
0
0
0
0
sdk/python/feast/saved_dataset.py
kevjumba/feast
810
1637376
from abc import abstractmethod from datetime import datetime from typing import TYPE_CHECKING, Dict, List, Optional, Type, cast import pandas as pd import pyarrow from google.protobuf.json_format import MessageToJson from feast.data_source import DataSource from feast.dqm.profilers.profiler import Profile, Profiler f...
22
19
21
1
63
0
llvmpy/src/Target/TargetLibraryInfo.py
KennethNielsen/llvmpy
140
1637420
from binding import * from ..namespace import llvm from src.Pass import ImmutablePass TargetLibraryInfo = llvm.Class(ImmutablePass) LibFunc = llvm.Namespace('LibFunc') LibFunc.Enum('Func', ''' ZdaPv, ZdlPv, Znaj, ZnajRKSt9nothrow_t, Znam, ZnamRKSt9nothrow_t, Znwj, ZnwjRKSt9nothrow_t,...
0
0
1
0
1
0
src/watchpoints/__init__.py
gaogaotiantian/watchpoints
357
1637437
<gh_stars>100-1000 # Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 # For details: https://github.com/gaogaotiantian/watchpoints/blob/master/NOTICE.txt import atexit from .watch import Watch __version__ = "0.2.5" all = [ "watch", "unwatch" ] watch = Watch() unwatch = watch....
0
0
0
0
0
0
examples/src/dbnd_examples/orchestration/tutorial_syntax/T03_task_outputs.py
busunkim96/dbnd
224
1637485
from typing import NamedTuple import pandas as pd from pandas import DataFrame from dbnd import task @task(result=("features", "scores")) def f_returns_two_dataframes_v1(p: int) -> (DataFrame, DataFrame): return ( pd.DataFrame(data=[[p, 1]], columns=["c1", "c2"]), pd.DataFrame(data=[[p, 1]], co...
6
7
0
0
13
0
tests/test_jamf_networking.py
HoriaHorvat/stethoscope
1,865
1637504
<filename>tests/test_jamf_networking.py # vim: set fileencoding=utf-8 : from __future__ import absolute_import, print_function, unicode_literals import mock import treq from twisted.internet.defer import succeed from twisted.trial import unittest import stethoscope.api.exceptions import stethoscope.api.utils import ...
0
0
0
0
0
0
upwork/routers/reports/__init__.py
upwork/python-upwork
150
1637549
<reponame>upwork/python-upwork<gh_stars>100-1000 """routers""" from . import finance, time __all__ = ("finance", "time")
0
0
0
0
0
0
Contents/Libraries/Shared/plex/objects/library/extra/director.py
jippo015/Sub-Zero.bundle
1,553
1637555
from plex.objects.core.base import Descriptor, Property class Director(Descriptor): id = Property(type=int) tag = Property @classmethod def from_node(cls, client, node) -> object: return cls.construct(client, cls.helpers.find(node, 'Director'), child=True)
0
1
0
0
1
0
dialogue-engine/test/programytest/parser/template/graph_tests/test_map.py
cotobadesign/cotoba-agent-oss
104
1637562
""" Copyright (c) 2020 COTOBA DESIGN, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distri...
0
0
0
0
0
0
sampyl/samplers/__init__.py
wilsonify/sampyl
308
1637621
from .metropolis import Metropolis from .hamiltonian import Hamiltonian from .NUTS import NUTS from .chain import Chain from .slice import Slice from .base import Sampler
0
0
0
0
0
0
my_utils/eye_centering.py
qiaone/GIF
322
1637634
from __future__ import annotations import sys sys.path.append('../') import constants as cnst import os import torch import tqdm import numpy as np import constants SHAPE = [0, 1, 2] EXP = [50, 51, 52] POSE = [150, 151, 152, 153, 154, 155] def centre_using_nearest(flame_seq, flame_dataset, one_translation_for_whole...
12
9
0
3
24
0
tests/trac/test-issue-0032.py
eLBati/pyxb
123
1637636
<filename>tests/trac/test-issue-0032.py # -*- coding: utf-8 -*- import logging if __name__ == '__main__': logging.basicConfig() _log = logging.getLogger(__name__) import pyxb.binding.generate import pyxb.binding.datatypes as xs import pyxb.binding.basis import pyxb.utils.domutils import os.path xsd=''' <schema ...
0
0
0
0
0
0
python/benchmarks/model/base_model.py
zeyiwen/gbdt
639
1637644
import numpy as np from sklearn.metrics import mean_squared_error, accuracy_score class BaseModel(object): """ Base model to run the test """ def __init__(self): self.max_depth: int = 6 self.learning_rate: int = 1 self.min_split_loss: int = 1 self.min_weight: int =...
0
2
0
11
13
0
tests/serializers.py
ChrisBurch/django-rest-framework-serializer-extensions
223
1637660
<reponame>ChrisBurch/django-rest-framework-serializer-extensions """ A collection of complete extensions serializers to be used by various tests. """ from rest_framework import serializers from rest_framework_serializer_extensions.serializers import ( ExtensionsModelSerializer, ExtensionsSerializer) from tests im...
0
0
0
0
0
0
env/lib/python3.8/site-packages/plotly/validators/indicator/_gauge.py
acrucetta/Chicago_COVI_WebApp
11,750
1637669
<gh_stars>1000+ import _plotly_utils.basevalidators class GaugeValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="gauge", parent_name="indicator", **kwargs): super(GaugeValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_na...
0
0
0
0
0
0
core/patch_symbols.py
ParikhKadam/frankenstein
344
1637676
<reponame>ParikhKadam/frankenstein<filename>core/patch_symbols.py<gh_stars>100-1000 import lief import sys import json import shutil """ Patches the symbol table of a compiled emulator to export symbols This is required to load the firmware back in to a reverse engineering software TODO symbol types are currently not ...
0
0
0
0
0
0
tests/utils/test_reprojection.py
swershrimpy/gtsfm
122
1637708
<filename>tests/utils/test_reprojection.py import numpy as np from gtsam import Cal3Bundler, Rot3, PinholeCameraCal3Bundler, Pose3, SfmTrack from gtsfm.common.image import Image from gtsfm.common.sfm_track import SfmMeasurement import gtsfm.utils.reprojection as reproj_utils def test_compute_track_reprojection_error...
0
0
0
0
0
0
scale/job/migrations/0054_convert_manifest.py
kaydoh/scale
121
1637723
# -*- coding: utf-8 -*- # Generated by Django 1.11.15 on 2019-03-12 11:53 from __future__ import unicode_literals from django.db import migrations from job.deprecation import JobInterfaceSunset from job.seed.manifest import SeedManifest INTERFACE_NAME_COUNTER = 0 def get_unique_name(name) -> object: global INTE...
0
1
2
0
3
0
lte/gateway/python/magma/subscriberdb/store/onready.py
Aitend/magma
849
1637740
from __future__ import annotations """ Copyright 2020 The Magma Authors. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an ...
2
0
0
0
2
0
yinyang/src/mutators/TypeAwareOpMutation.py
rainoftime/yinyang
143
1637747
# MIT License # # Copyright (c) [2020 - 2021] The yinyang authors # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy...
0
3
0
2
5
0
kor2vec/dataset/__init__.py
sujoung/kor2vec
175
1637751
<reponame>sujoung/kor2vec from .skip_gram import SkipDataset
0
0
0
0
0
0
api/ops/tasks/detection/core/detectionTypes/prophet.py
LeiSoft/CueObserve
149
1637794
<gh_stars>100-1000 import dateutil.parser as dp from dateutil.relativedelta import relativedelta import pandas as pd, datetime as dt from prophet import Prophet def isAnomaly(lowBand, highBand, value): """Condition for anomaly on a certain row""" if value < lowBand or value > highBand: return True ...
0
0
0
0
0
0
scripts/list-features.py
knoguchi/jackson-jq
217
1637839
<filename>scripts/list-features.py # coding: utf-8 import json import yaml from urllib import request as urllib2 import re def htmlescape(string): def conv(match): return '&#' + str(ord(match.group())) + ';' pat = re.compile(r'[^0-9a-zA-Z]') return pat.sub(conv, string) def tohash(string): re...
0
0
0
0
0
0
.waf-tools/cross.py
Pesa/ndn-cxx
106
1637872
<filename>.waf-tools/cross.py # -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- from waflib import Utils def options(opt): opt.add_option('--build', default=Utils.unversioned_sys_platform(), help='Build platform that is doing the actual compilation (e.g., darwin...
0
0
0
0
0
0
fhir/resources/STU3/tests/test_media.py
cstoltze/fhir.resources
144
1637881
<reponame>cstoltze/fhir.resources<gh_stars>100-1000 # -*- coding: utf-8 -*- """ Profile: http://hl7.org/fhir/StructureDefinition/Media Release: STU3 Version: 3.0.2 Revision: 11917 Last updated: 2019-10-24T11:53:00+11:00 """ from pydantic.validators import bytes_validator # noqa: F401 from .. import fhirtypes # noqa:...
0
0
0
0
0
0
tcfcli/cmds/logs/cli.py
tencentyun/scfcli
103
1637892
# -*- coding: utf-8 -*- from datetime import datetime from datetime import timedelta from tcfcli.common.operation_msg import Operation import tcfcli.common.base_infor as infor from tcfcli.common import tcsam from tcfcli.common.user_exceptions import * from tcfcli.common.template import Template from tcfcli.common.user...
0
2
0
0
2
0
galaxy/main/models/utils.py
bmclaughlin/galaxy
904
1637915
# (c) 2012-2019, Ansible by Red Hat # # This file is part of Ansible Galaxy # # Ansible Galaxy is free software: you can redistribute it and/or modify # it under the terms of the Apache License as published by # the Apache Software Foundation, either version 2 of the License, or # (at your option) any later version. # ...
0
3
0
0
3
0
bin/train_linglf02mel_seq2seq_oneshotvc.py
ishine/ppg-vc
133
1637936
import os, sys # sys.path.append('/home/shaunxliu/projects/nnsp') import matplotlib matplotlib.use("Agg") import matplotlib.pyplot as plt from matplotlib.ticker import MaxNLocator import torch from torch.utils.data import DataLoader import numpy as np from src.solver import BaseSolver from src.data_load import OneshotV...
0
1
0
2
3
0
syfertext/data/units/text_doc.py
Dat-Boi-Arjun/SyferText
204
1637937
from .token import Token from typing import List from typing import Dict from typing import Set from typing import Union from typing import Generator from .span import Span from .utils import normalize_slice class TextDoc: def __init__(self): # This list is populated in the __call__ method of the Tokeni...
1
3
0
2
6
0
examples/conmasklc.py
yang69can/pyngl
125
1637965
<reponame>yang69can/pyngl # # File: # conmasklc.py # # Synopsis: # Draws contours over a masked lambert conformal map. # # Category: # Contouring over maps. # # Author: # <NAME> (based on a code by <NAME>) # # Date of initial publication: # December, 2009 # # Description: # This example produc...
0
0
0
0
0
0
backend/profiles/models.py
restato/bunnybook
131
1637969
import enum from uuid import UUID from pydantic import BaseModel class ProfileShort(BaseModel): id: UUID username: str class FriendshipRequest(BaseModel): profile_id: UUID target_profile_id: UUID class Relationship(str, enum.Enum): FRIEND: str = "FRIEND" OUTGOING_FRIEND_REQUEST: str = "OU...
0
0
9
0
9
0
kivyauth/utils.py
moonpyx/social-auth-kivy
126
1637981
<filename>kivyauth/utils.py from kivy.utils import platform if platform == "android": def stop_login(*args): pass elif platform != "ios": from kivyauth.desktop.utils import stop_login class LoginProviders: google = "google" facebook = "facebook" github = "github" twitter = "twitter...
0
0
0
0
0
0
Packs/TwitterIOCHunter-FullDailyFeed/Integrations/TwitterIOCHunterFullDailyFeed/TwitterIOCHunterFullDailyFeed.py
diCagri/content
799
1637989
from __future__ import annotations import demistomock as demisto # noqa: F401 from CommonServerPython import * # noqa: F401 def test_module(client, url) -> object | str: result = client._http_request('GET', full_url=url) if isinstance(result, list): return 'ok' else: return 'Test failed:...
2
3
0
0
5
0
tests/test_models/test_backbones/test_sr_backbones/test_dic_net.py
Jian137/mmediting-1
1,884
1638008
# Copyright (c) OpenMMLab. All rights reserved. import pytest import torch import torch.nn as nn from mmedit.models import build_backbone from mmedit.models.backbones.sr_backbones.dic_net import ( FeedbackBlock, FeedbackBlockCustom, FeedbackBlockHeatmapAttention) def test_feedback_block(): x1 = torch.rand(2,...
0
0
0
0
0
0
miniconda3-lnx/pyzo-4.10.2/source/pyzo/yotonloader.py
Thibaut-Kovaltchouk/MultiPyzo
235
1638072
<reponame>Thibaut-Kovaltchouk/MultiPyzo """ This is a bit awkward, but yoton is a package that is designed to work from Python 2.4 to Python 3.x. As such, it does not have relative imports and must be imported as an absolute package. That is what this module does... """ import os import sys # Allow importing yoton sy...
0
0
0
0
0
0
tests/tasks/lib/test_mnli.py
dumpmemory/jiant
1,108
1638083
<reponame>dumpmemory/jiant import numpy as np import os from collections import Counter from jiant.shared import model_resolution from jiant.shared.model_resolution import ModelArchitectures from jiant.tasks.retrieval import create_task_from_config_path from jiant.utils.testing.tokenizer import SimpleSpaceTokenizer f...
0
0
0
0
0
0
TrainingExtensions/torch/test/python/test_weight_svd.py
lipovsek/aimet
945
1638097
<reponame>lipovsek/aimet<filename>TrainingExtensions/torch/test/python/test_weight_svd.py<gh_stars>100-1000 # /usr/bin/env python3.5 # -*- mode: python -*- # ============================================================================= # @@-COPYRIGHT-START-@@ # # Copyright (c) 2017-2018, Qualcomm Innovation Center, I...
0
0
0
0
0
0
tests/test_db/test_express.py
sun2589886503/EverydayWechat
9,940
1638104
# -*- coding: utf-8 -*- """ Project: EverydayWechat-Github Creator: DoubleThunder Create time: 2019年9月4日12:41:33 Introduction: """ from tests import BaseTestCase # from everyday_wechat.utils import config from everyday_wechat.utils.db_helper import * from everyday_wechat.control.moviebox.maoyan_movie_box import get_ma...
0
1
0
0
1
0
second/pytorch/builder/optimizer_builder.py
leo-muhendislik/second.pytorch
819
1638106
<reponame>leo-muhendislik/second.pytorch # Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # 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/L...
0
0
0
0
0
0
examples/example.py
opengeospatial/geoparquet
141
1638127
<gh_stars>100-1000 """ Generates `example.parquet` using pyarrow by running `python example.py`. You can print the metadata with: .. code-block:: python >>> import json, pprint, pyarrow.parquet as pq >>> pprint.pprint(json.loads(pq.read_schema("example.parquet").metadata[b"geo"])) """ import json import pathli...
0
0
0
0
0
0
utils/helper_function.py
Huuush/learn_fashionai
427
1638154
<filename>utils/helper_function.py import random import numpy as np from PIL import ImageDraw class CutoutPIL(object): def __init__(self, cutout_factor=0.5): self.cutout_factor = cutout_factor def __call__(self, x): img_draw = ImageDraw.Draw(x) h, w = x.size[0], x.size[1] # HWC ...
0
0
0
0
0
0
projects/variational_image_compression/lightning/_scale_hyperprior_autoencoder.py
tallamjr/NeuralCompression
233
1638171
# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import torch.hub import neuralcompression.models from ._prior_autoencoder import _PriorAutoencoder class ScaleHyperpriorAutoencoder(_Pri...
7
0
1
0
8
0
oslo/torch/nn/parallel/data_parallel/_state_dict.py
lipovsek/oslo
249
1638190
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the BSD license found in the # LICENSE file in the root directory of this source tree. """Useful functions for manipulating state_dicts.""" from typing import TYPE_CHECKING, Dict, List, Tuple, Type, Union from torch import Tens...
7
3
0
0
10
0
controlcenter/app_settings.py
EnriqueSoria/django-controlcenter
980
1638205
from pkgconf import Conf class ControlCenter(Conf): DASHBOARDS: list[object] = [] CHARTIST_COLORS: str = 'default' SHARP: str = '#'
0
0
3
0
3
0
opendeep/monitor/tests/monitor_bokeh_server.py
vitruvianscience/OpenDeep
252
1638223
<filename>opendeep/monitor/tests/monitor_bokeh_server.py import time import logging from theano.compat.python2x import OrderedDict import theano import theano.tensor as T from bokeh.client import push_session from bokeh.plotting import (curdoc, figure) from opendeep.monitor.monitor import Monitor, MonitorsChannel, co...
0
0
0
0
0
0
models/vip_layers.py
kevin-ssy/ViP
107
1638230
from __future__ import annotations """ ViP Architecture in PyTorch Copyright 2021 <NAME> """ import torch import torch.nn as nn import torch.nn.functional as F from einops import rearrange from timm.models.layers import trunc_normal_ Norm = nn.LayerNorm def apply_pos(tensor, pos, num_heads) -> object: if pos is...
12
6
0
0
18
0
safe_learning/tests/test_lyapunov.py
xin-alice/cs159_safe_learning
169
1638239
<reponame>xin-alice/cs159_safe_learning """Unit tests for the Lyapunov functions.""" from __future__ import division, print_function, absolute_import from numpy.testing import assert_allclose, assert_equal import pytest import unittest import numpy as np import tensorflow as tf import sys from safe_learning.function...
0
0
0
0
0
0
pywick/datasets/BaseDataset.py
achaiah/pywick
408
1638274
from __future__ import annotations import numpy as np import torch as th from torchvision import transforms from .data_utils import is_tuple_or_list class BaseDataset: """An abstract class representing a Dataset. All other datasets should subclass it. All subclasses should override ``__len__``, that prov...
8
3
0
0
11
0