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
db/data/autotest_files/py/script_files/test2.py
Xyene/Markus
149
3327299
import pytest try: import submission except ImportError: pass def test_passes(): """This test should pass""" assert submission.return_true() def test_fails(): """This test should fail""" assert submission.return_false() @pytest.mark.timeout(5) def test_loops(): """This test should time...
0
0
0
0
0
0
src/asp/IceBridge/process_icebridge_batch.py
AndrewAnnex/StereoPipeline
323
3327302
<gh_stars>100-1000 #!/usr/bin/env python # __BEGIN_LICENSE__ # Copyright (c) 2009-2013, United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. All # rights reserved. # # The NGT platform is licensed under the Apache License, Version 2.0 (the # "License"...
0
0
0
0
0
0
snapx/snapx/generators/__init__.py
ruth-ann/snap-python
242
3327307
<gh_stars>100-1000 from snapx.generators.classic import * from snapx.generators.ego import *
0
0
0
0
0
0
__init__.py
warmtub/thor-iqa-cvpr-2018
113
3327353
# Copyright Allen Institute for Artificial Intelligence 2017 import os import sys basedir = os.path.dirname(__file__) sys.path.append(basedir)
0
0
0
0
0
0
src/python/sparsetaxis/searchLogToHistogram.py
neoremind/luceneutil
164
3327360
import sys import writeGraph import re reHits = re.compile('T(.) (.*?) sort=(.*?): ([0-9]+) hits in ([.0-9]+) msec') reHeapUsagePart = re.compile(r'^ ([a-z ]+) \[.*?\]: ([0-9.]+) (.B)$') def extractSearchStats(searchLog, byQuerySort: dict[object,object]={}) -> object: heapBytes = None heapBytesByPart = {} by...
1
1
0
0
2
0
deepneuro/outputs/output.py
ysuter/DeepNeuro
113
3327399
from __future__ import annotations """ Outputs in DeepNeuro are objects that are appended to DeepNeuroModels. They will process data passed in by these models, and save their output to a provided file location. They may also store metadata about data they process longitduinally, to create summary statistics...
3
12
0
5
20
0
old_stuff/harold/_discrete_funcs.py
weightan/quaternion_polynomials
154
3327402
<reponame>weightan/quaternion_polynomials """ The MIT License (MIT) Copyright (c) 2016 <NAME> 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...
0
0
0
0
0
0
python/070 Climbing Stairs.py
allandproust/leetcode-share
156
3327406
<reponame>allandproust/leetcode-share ''' You are climbing a stair case. It takes n steps to reach to the top. Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top? ''' class Solution(object): def climbStairs(self, n): """ :type n: int :...
0
0
0
0
0
0
src/test/pythonFiles/terminalExec/sample_normalized.py
ChaseKnowlden/vscode-jupyter
2,461
3327428
<reponame>ChaseKnowlden/vscode-jupyter import sys print(sys.executable) print("1234") print(1) print(2)
0
0
0
0
0
0
extra_tests/snippets/intro/3.1.1.1.py
dbrgn/RustPython
11,058
3327440
<reponame>dbrgn/RustPython<gh_stars>1000+ assert 2 + 2 == 4 assert 50 - 5*6 == 20 assert (50 - 5*6) / 4 == 5 # This will crash assert (50 - 5*6) / 4 == 5.0 assert 8 / 5 == 1.6 # division always returns a floating point number
0
0
0
0
0
0
build/tests/test_typehints.py
ExternalRepositories/ApprovalTests.cpp
259
3327490
<filename>build/tests/test_typehints.py import unittest from scripts.utilities import pushdir, popdir, run from tests.helpers import set_home_directory class TestTypehints(unittest.TestCase): def test_typehints(self) -> None: set_home_directory() pushdir('../build') run(['./check_type_hin...
0
0
0
0
0
0
tests/components/eafm/__init__.py
tbarbette/core
30,023
3327514
"""Tests for eafm."""
0
0
0
0
0
0
doc/nyc_boros.py
raphacosta27/geopandas
2,914
3327567
""" Visualizing NYC Boroughs ------------------------ Visualize the Boroughs of New York City with Geopandas. This example generates many images that are used in the documentation. See the `Geometric Manipulations <geometric_manipulations>` example for more details. First we'll import a dataset containing each borou...
0
0
0
0
0
0
setup.py
shardul08/Code-Sleep-Python
420
3327603
<gh_stars>100-1000 from setuptools import setup setup( name="code_sleep_python", description="Launch some awesome python projects", url="https://github.com/prateekiiest/Code-Sleep-Python", author="<NAME>", author_email="<EMAIL>", license="MIT", packages=['code_sleep_python'], include_pa...
0
0
0
0
0
0
docassemble_webapp/docassemble/webapp/translations.py
cschwarz007/docassemble
568
3327625
<reponame>cschwarz007/docassemble<filename>docassemble_webapp/docassemble/webapp/translations.py from flask import session, request from flask_login import current_user from docassemble.base.functions import set_language, parse_accept_language from docassemble.base.config import daconfig DEFAULT_LANGUAGE = daconfig.get...
0
0
0
0
0
0
buffalo/data/prepro.py
awesome-archive/buffalo
577
3327626
# -*- coding: utf-8 -*- import numpy as np class PreProcess(object): def __init__(self, opt): self.opt = opt def pre(self, header): pass def __call__(self, v) -> object: return v def post(self, db): pass class OneBased(PreProcess): def __init__(self, opt): ...
0
13
0
2
15
0
tests/volumes/testdata-generate.py
ImagiaViz/inviwo
349
3327708
<gh_stars>100-1000 import numpy as np # requiers version 1.12+ import os import math dat = """RawFile: {file} Resolution: {x} {y} {z} Format: {format} ByteOrder: {byteorder} """ ivf = """<?xml version="1.0" ?> <InviwoTreeData version="1.0"> <RawFile content="{file}" /> <Format content="{format}" /> <Dime...
0
0
0
0
0
0
source/neuropod/tests/test_data/pytorch_strings_model/0/code/strings_model.py
qiyanz/neuropod
887
3327710
import numpy as np import torch import torch.nn as nn class StringsModel(nn.Module): def forward(self, x, y) -> dict[str,object]: return {"out": np.array([f + " " + s for f, s in zip(x, y)])} def get_model(_) -> object: return StringsModel()
0
2
0
0
2
0
rootpy/userdata.py
masonproffitt/rootpy
146
3327745
<filename>rootpy/userdata.py<gh_stars>100-1000 """ This module handles creation of the user-data area """ from __future__ import absolute_import import os import tempfile import atexit from os.path import expanduser, expandvars, exists, isdir, join as pjoin from platform import machine from . import log; log = log[__...
0
0
0
0
0
0
torch_fidelity/sample_similarity_base.py
forkbabu/torch-fidelity
372
3327775
import torch.nn as nn from torch_fidelity.helpers import vassert class SampleSimilarityBase(nn.Module): def __init__(self, name): """ Base class for samples similarity measures that can be used in :func:`calculate_metrics`. Args: name (str): Unique name of the subclassed sam...
0
1
0
0
1
0
wandb/sklearn/__init__.py
borisgrafx/client
3,968
3327800
<reponame>borisgrafx/client """Create informative charts for scikit-learn models and log them to W&B.""" from .plot import plot_classifier, plot_clusterer, plot_regressor from .plot import ( plot_summary_metrics, plot_learning_curve, plot_roc, plot_confusion_matrix, plot_precision_recall, plot_f...
0
0
0
0
0
0
hikyuu/indicator/indicator.py
kknet/hikyuu
1,283
3327806
<gh_stars>1000+ #!/usr/bin/python # -*- coding: utf8 -*- # cp936 # # The MIT License (MIT) # # Copyright (c) 2017 fasiondog # # 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 restricti...
0
0
0
0
0
0
examples/Kane1985/Chapter3/Ex6.14.py
nouiz/pydy
298
3327808
#!/usr/bin/env python # -*- coding: utf-8 -*- """Exercise 6.14 from Kane 1985.""" from __future__ import division from sympy import Matrix, S from sympy import integrate, pi, simplify, solve, symbols from sympy.physics.mechanics import ReferenceFrame, Point from sympy.physics.mechanics import cross, dot from sympy.phy...
0
3
0
0
3
0
skorch/tests/callbacks/test_base.py
TheAutumnOfRice/skorch
2,748
3327839
"""Tests for callbacks/base.py""" import warnings import pytest # TODO: remove after some deprecation period, e.g. skorch 0.12 class TestIssueWarningIfOnBatchOverride: @pytest.fixture def net(self, classifier_module) -> object: from skorch import NeuralNetClassifier return NeuralNetClassifie...
0
4
0
0
4
0
PyFunceble/dataset/mariadb_base.py
Centaurioun/PyFunceble
213
3327888
from __future__ import annotations """ The tool to check the availability or syntax of domain, IP or URL. :: ██████╗ ██╗ ██╗███████╗██╗ ██╗███╗ ██╗ ██████╗███████╗██████╗ ██╗ ███████╗ ██╔══██╗╚██╗ ██╔╝██╔════╝██║ ██║████╗ ██║██╔════╝██╔════╝██╔══██╗██║ ██╔════╝ ██████╔╝ ╚████╔╝ █████╗ █...
6
12
3
0
21
0
sdk/python/tests/compiler/testdata/condition_custom.py
yhwang/kfp-tekton
102
3327906
<reponame>yhwang/kfp-tekton<filename>sdk/python/tests/compiler/testdata/condition_custom.py # Copyright 2020 kubeflow.org # # 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.a...
0
0
0
0
0
0
tests/test_engine/test_insert.py
bobuk/montydb
478
3327969
<reponame>bobuk/montydb import pytest from montydb import errors from montydb.types import bson def test_insert_invalid_doc_1(monty_find, mongo_find): docs = [ {".b": 1}, ] spec = {} if bson.bson_used: with pytest.raises(errors.InvalidDocument): mongo_find(docs, spec) ...
0
0
0
0
0
0
d3rlpy/itertools.py
ningyixue/AIPI530_Final_Project
565
3327987
from typing import Iterator, Tuple, TypeVar T = TypeVar("T") def last_flag(iterator: Iterator[T]) -> Iterator[Tuple[bool, T]]: items = list(iterator) for i, item in enumerate(items): yield i == len(items) - 1, item def first_flag(iterator: Iterator[T]) -> Iterator[Tuple[bool, T]]: items = list(...
2
2
0
0
4
0
pylenium/jquery.py
rusiniak/pyleniumio
169
3327988
from selenium.webdriver.remote.webdriver import WebDriver, By from selenium.webdriver.remote.webelement import WebElement from selenium.webdriver.support.wait import WebDriverWait from selenium.common.exceptions import StaleElementReferenceException from pylenium import utils def inject(driver: WebDriver, version: st...
9
1
0
0
10
0
gym-unity/tests/test_gym.py
icaro56/ml-agents
134
3327995
<filename>gym-unity/tests/test_gym.py import unittest.mock as mock import pytest import numpy as np from gym_unity.envs import UnityEnv, UnityGymException from tests.mock_communicator import MockCommunicator @mock.patch('mlagents.envs.UnityEnvironment.executable_launcher') @mock.patch('mlagents.envs.UnityEnvironment....
0
0
0
0
0
0
tests/backups/__init__.py
pnjongang/supervisor
597
3327997
"""Backup tests."""
0
0
0
0
0
0
terrascript/provider/eLobeto/rancher.py
mjuenema/python-terrascript
507
3328008
# terrascript/provider/eLobeto/rancher.py # Automatically generated by tools/makecode.py (24-Sep-2021 15:25:31 UTC) import terrascript class rancher(terrascript.Provider): """Terraform Rancher provider""" __description__: str = "Terraform Rancher provider" __namespace__: str = "eLobeto" __name__: st...
0
0
7
0
7
0
cloudslang-runtime/src/main/resources/scripts/cs_replace.py
srinisubramanian/cloud-slang
215
3328082
<reponame>srinisubramanian/cloud-slang<filename>cloudslang-runtime/src/main/resources/scripts/cs_replace.py def cs_replace(string, old_val, new_val, count = -1): if type(string).__name__ != 'str' and type(string).__name__ != 'unicode': raise Exception("Expected a string for parameter 'string', got " + str(string...
0
0
0
0
0
0
system_tests/vc_tests.py
gpooja3/pyvcloud
168
3328101
# VMware vCloud Director Python SDK # Copyright (c) 2018 VMware, Inc. 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/LICENSE-2.0 #...
0
0
0
0
0
0
calvin/runtime/south/async/twistedimpl/pipe.py
gabrielcercel/calvin-base
334
3328158
<filename>calvin/runtime/south/async/twistedimpl/pipe.py # -*- coding: utf-8 -*- # Copyright (c) 2015 Ericsson AB # # 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.or...
0
0
0
0
0
0
updi/timeout.py
leonerd/pyupdi
197
3328181
<gh_stars>100-1000 """ Simple timer helper for UPDI stack """ import time class Timeout(object): """ Simple timeout helper in milliseconds. """ def __init__(self, timeout_ms): """ Start the expired counter instantly """ self.timeout_ms = timeout_ms ...
0
0
0
0
0
0
10 Days of Statistics/13 - Day 4 - Binomial Distribution II.py
srgeyK87/Hacker-Rank-30-days-challlenge
275
3328258
# ======================== # Information # ======================== # Direct Link: https://www.hackerrank.com/challenges/s10-binomial-distribution-2/problem # Difficulty: Easy # Max Score: 30 # Language: Python # ======================== # Solution # ======================== import math P = 0.12 ANS_1...
0
0
0
0
0
0
azure-devops/azext_devops/dev/pipelines/pipeline_utils.py
keithlemon/azure-devops-cli-extension
326
3328314
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
0
1
0
0
1
0
flambe/runner/report_site_run.py
ethan-asapp/flambe
148
3328321
<filename>flambe/runner/report_site_run.py """Script to run the report web site It takes the `app` defined in `flambe.remote.webapp.app` and runs it. """ import logging import argparse from typing import Optional import os from flambe.experiment.webapp.app import app logger = logging.getLogger(__name__) def launc...
0
0
0
0
0
0
api/tacticalrmm/software/admin.py
infinite8co/tacticalrmm
903
3328332
from django.contrib import admin from .models import ChocoSoftware, InstalledSoftware class ChocoAdmin(admin.ModelAdmin): readonly_fields: tuple[str] = ("added",) admin.site.register(ChocoSoftware, ChocoAdmin) admin.site.register(InstalledSoftware)
0
0
1
0
1
0
python/test/mapreduce/key_ranges_test.py
Batterii/appengine-mapreduce
228
3328336
<reponame>Batterii/appengine-mapreduce #!/usr/bin/env python # pylint: disable=g-bad-name import os import unittest from google.appengine.api import namespace_manager from google.appengine.ext import db from google.appengine.ext import key_range from google.appengine.ext import testbed from mapreduce import key_r...
0
0
0
0
0
0
migrations/versions/ba778ef9c615_.py
d-rita/tasking-manager
421
3328344
"""empty message Revision ID: <KEY> Revises: <PASSWORD> Create Date: 2020-08-25 09:11:37.897176 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = "<KEY>" down_revision = "<PASSWORD>" branch_labels = None depends_on = None def upgrade(): op.add_column( ...
0
0
0
0
0
0
Python/tesseract.py
saurabhcommand/Hello-world
1,428
3328356
<filename>Python/tesseract.py print("Tesseract.py") #Lol #Cool names are often deceptive
0
0
0
0
0
0
Python/Function/Sugar.py
piovezan/SOpt
148
3328366
<gh_stars>100-1000 var.index('André') index(var, 'André') #https://pt.stackoverflow.com/q/199737/101
0
0
0
0
0
0
qlib/model/__init__.py
lpd6375/qlib
8,637
3328368
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. import warnings from .base import Model
0
0
0
0
0
0
tests/test_interp.py
vishalbelsare/sporco
217
3328374
from __future__ import division from builtins import object import numpy as np from sporco import interp class TestSet01(object): def test_01(self): x = np.arange(0, 11).astype(np.float32) m0 = 2.0 c0 = 1.0 y0 = m0 * x + c0 y = y0.copy() y[4] += 2.0 A = n...
0
0
0
0
0
0
zeus/migrations/1cb2c54f3831_add_repo_role.py
conrad-kronos/zeus
221
3328385
"""add_repo_role Revision ID: <KEY> Revises: <KEY> Create Date: 2018-01-20 19:13:11.060203 """ from alembic import op import sqlalchemy as sa import zeus # revision identifiers, used by Alembic. revision = "<KEY>" down_revision = "<KEY>" branch_labels = () depends_on = None def upgrade(): # ### commands auto ...
0
0
0
0
0
1
chaotic_rapm/explore_rapm.py
airalcorn2/NBA_Tutorials
123
3328399
import pandas as pd # Set display options for pandas for easier printing pd.set_option('display.max_columns', 500) pd.set_option('display.width', 1000) rapm = pd.read_csv('data/rapm_adjusted.csv') abs_player_change = [] def calculate_change(player) -> object: print(player) base = player['RAPM'].values[0] ...
0
1
0
0
1
0
tests/api/test_outlier.py
mircealungu/automatic-monitoring-for-flask
630
3328408
<filename>tests/api/test_outlier.py<gh_stars>100-1000 import pytest @pytest.mark.usefixtures('outlier_1', 'outlier_2') def test_num_outliers(dashboard_user, endpoint): response = dashboard_user.get('dashboard/api/num_outliers/{0}'.format(endpoint.id)) assert response.status_code == 200 data = response.js...
0
0
0
0
0
0
boltstream/storage.py
geekpii/boltstream
1,735
3328412
<reponame>geekpii/boltstream<filename>boltstream/storage.py import json import os from django.conf import settings from django.contrib.staticfiles.storage import ManifestFilesMixin, StaticFilesStorage from django.core.files.base import ContentFile from django.core.files.storage import FileSystemStorage from storages.b...
0
0
0
0
0
0
tests/test_readline.py
qouoq/radian
1,051
3328419
<filename>tests/test_readline.py<gh_stars>1000+ def test_readline(terminal): # issue #106 terminal.current_line().assert_startswith("r$>") terminal.write("cat('hello'); readline('> ')\n") terminal.previous_line(1).assert_startswith("hello") terminal.current_line().assert_startswith("> ")
0
0
0
0
0
0
fireant/tests/test_utils.py
mikeengland/fireant
122
3328456
<reponame>mikeengland/fireant from unittest import TestCase from fireant.utils import write_named_temp_csv, read_csv class TestFileOperations(TestCase): def test_write_named_temp_csv(self): data = [["a", 1, True, None, 1.8], ("", -1, False), ()] ntf = write_named_temp_csv(data) rows = re...
0
0
0
0
0
0
python/mxnet/ndarray_doc.py
mozga-intel/incubator-mxnet
211
3328458
<gh_stars>100-1000 # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "Licen...
0
0
0
0
0
0
src/tests/base/test_settings.py
fabm3n/pretix
1,248
3328476
<reponame>fabm3n/pretix # # This file is part of pretix (Community Edition). # # Copyright (C) 2014-2020 <NAME> and contributors # Copyright (C) 2020-2021 rami.io GmbH and contributors # # This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General # Public License ...
0
0
0
0
0
0
src/offazure/azext_offazure/manual/_help.py
Mannan2812/azure-cli-extensions
207
3328507
# -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incor...
0
0
0
0
0
0
egg/gen_src.py
TheMartianObserver/nsimd
247
3328509
# Copyright (c) 2021 Agenium Scale # # 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, distr...
0
2
0
0
2
0
optimus/engines/pandas/rows.py
ironmussa/Optimus
1,045
3328582
from optimus.engines.base.dataframe.rows import DataFrameBaseRows from optimus.engines.base.pandas.rows import PandasBaseRows from optimus.engines.base.rows import BaseRows class Rows(DataFrameBaseRows, PandasBaseRows, BaseRows): pass
0
0
0
0
0
0
src/backend/crud/crud_vps.py
ddddhm1/LuWu
658
3328585
from typing import List from sqlalchemy.orm import Session from crud.base import CrudBase from crud.crud_config import crud_isp from models.vps import Vps class CrudVps(CrudBase): def get_vps_list(self, db_session: Session) -> List: return db_session.query(self.model).all() @classmethod def get...
3
2
0
0
5
0
examples/multiprocessing/barrier.py
kpavel/lithops
158
3328632
import time from lithops.multiprocessing import Pool, Barrier, current_process # from multiprocessing import Pool, Barrier, current_process def f() -> object: print('waiting...') barrier.wait() pid = current_process().pid msg = 'process: {} - timestamp: {}'.format(pid, time.time()) return msg i...
0
1
0
0
1
0
revolver/data/transforms.py
Qinka/revolver
151
3328677
from __future__ import annotations import numpy as np from PIL import Image, ImageFilter from pathlib import Path import torch from torch.utils.data import Dataset from .util import Wrapper class TransformData(Wrapper, Dataset): """ Transform a dataset by registering a transform for every input and the ...
2
16
0
0
18
0
extensions/yaml_support/yaml_support/loader/python_file_loader.py
Yunusbcr/labgraph
124
3328710
<filename>extensions/yaml_support/yaml_support/loader/python_file_loader.py<gh_stars>100-1000 #!/usr/bin/env python3 # Copyright 2004-present Facebook. All Rights Reserved. from .base_loader import BaseLoader from .errors.errors import PythonFileLoaderError import os class PythonFileLoader(BaseLoader): """ R...
0
0
0
0
0
0
spyder/plugins/variableexplorer/widgets/objectexplorer/__init__.py
Earthman100/spyder
7,956
3328733
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright (c) 2016 <NAME>. # Copyright (c) 2019- Spyder Project Contributors # # Components of objectbrowser originally distributed under # the MIT (Expat) license. Licensed under the terms of the MIT License; # se...
0
0
0
0
0
0
funky/commands.py
gordian-jklapacz/funky
584
3328812
"""Command definitions.""" from __future__ import absolute_import, division, print_function from abc import ABCMeta, abstractmethod from builtins import ( # noqa: F401 # pylint: disable=redefined-builtin,unused-import bytes, dict, int, range, str, super, ) import json import os import re imp...
10
17
3
2
32
0
eufy_security/__init__.py
dabm-git/python-eufy-security
173
3328822
<filename>eufy_security/__init__.py """Define package-level exports.""" from .api import async_login # noqa
0
0
0
0
0
0
azure_service_enum/azure_service_enum.py
bbhunter/cloud-service-enum
152
3328829
<gh_stars>100-1000 import requests import pprint from datetime import datetime import json import argparse from argparse import RawTextHelpFormatter from termcolor import colored import sys import os parser = argparse.ArgumentParser(formatter_class=RawTextHelpFormatter,description=""" < Azure_SERVICE_ENUM Says "Hello,...
0
0
0
0
0
0
third_party/blink/tools/remove_stale_expectations.py
zealoussnow/chromium
14,668
3328863
<gh_stars>1000+ #!/usr/bin/env vpython3 # Copyright 2021 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from blinkpy.web_tests.stale_expectation_removal import ( remove_stale_expectations) import sys if __name__ == ...
0
0
0
0
0
0
example/pyctp2/sbin/md.py
mmmaaaggg/pyctp_lovelylain
358
3328871
<reponame>mmmaaaggg/pyctp_lovelylain<gh_stars>100-1000 # -*- coding:utf-8 -*- """ deprecated, 使用md2 在pyctp2的父目录,执行ipython3 并且在提示行 import pyctp2.testbed.ctp as ctp """ import logging from ..common.base import BaseObject,INFO_PATH,DATA_PATH from ..md import ctp_md as cm from ..common import controller ...
0
0
0
0
0
0
opsmop/inventory/inventory.py
mahak/opsmop
697
3328900
# Copyright 2018 <NAME> LLC, <<EMAIL>> # # 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 i...
5
7
0
0
12
0
daemons/sentry/rules/__init__.py
dekoder/LogESP
130
3328913
<gh_stars>100-1000 import daemons.sentry.rules.limit __all__ = ['limit']
0
0
0
0
0
0
icecaps/estimators/ngram_lm_estimator.py
janithwanni/icecaps
277
3328918
import tensorflow as tf import copy from tensorflow.contrib.rnn import BasicRNNCell from icecaps.estimators.rnn_estimator import RNNEstimator from icecaps.estimators.convolutional_estimator import ConvolutionalEstimator class NGramCell(BasicRNNCell): def __init__(self, hparams): super().__init__(hparam...
0
3
0
0
3
0
docs/source/_static/image_registration.py
Ishticode/kornia
418
3328925
<filename>docs/source/_static/image_registration.py import os import cv2 import imageio import torch import kornia as K import kornia.geometry as KG def load_timg(file_name): """Loads the image with OpenCV and converts to torch.Tensor.""" assert os.path.isfile(file_name), f"Invalid file {file_name}" # nose...
0
0
0
0
0
0
bcbio/pipeline/merge.py
a113n/bcbio-nextgen
418
3328946
from __future__ import annotations """Handle multiple samples present on a single flowcell Merges samples located in multiple lanes on a flowcell. Unique sample names identify items to combine within a group. """ import os import shutil import subprocess from bcbio import bam, utils from bcbio.distributed.transaction...
2
6
0
0
8
0
pandas_vs_datatable/code/filter.py
korur/Blog
108
3328960
import os import re import json import time import numpy as np import pandas as pd from plotnine import * # Config PATH = os.getcwd() path_n = re.split(pattern=r"/|\\", string=PATH)[1:] if os.name == "posix": path_n = "/" + os.path.join(*path_n) else: drive = PATH[0:3] path_n = drive + os.path.join(*path_n...
6
3
0
0
9
0
unicorn/tests/regress/x86_fldt_fsqrt.py
clayne/unicorn_pe
491
3328964
#!/usr/bin/env python from unicorn import * from unicorn.x86_const import * from struct import pack import regress CODE_ADDR = 0x1000000 CODE = ( '\xb8\x00\x00\x00\x02' # mov eax, 0x2000000 '\xdb\x28' # fldt [eax] '\xd9\xfa' # fsqrt ) DATA_ADDR = 0x2000000 DATA = '\0\0\0\0\0\0\0\0...
0
0
0
0
0
0
src/poliastro/iod/__init__.py
bryanwweber/poliastro
634
3329068
<reponame>bryanwweber/poliastro # Select default algorithm from poliastro.iod.izzo import lambert __all__ = ["lambert"]
0
0
0
0
0
0
bounter/tests/hashtable/test_htc_increment.py
BenLangmead/bounter
987
3329078
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Author: <NAME> <<EMAIL>> # Copyright (C) 2017 Rare Technologies # # This code is distributed under the terms and conditions # from the MIT License (MIT). import unittest from bounter import HashTable long_long_max = 9223372036854775807 class HashTableIncrementTest(...
0
0
0
0
0
0
alipay/aop/api/domain/TaskDetailInfo.py
antopen/alipay-sdk-python-all
213
3329088
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import annotations import json from alipay.aop.api.constant.ParamConstants import * class TaskDetailInfo(object): def __init__(self): self._applied_point: None = None self._indicator_point_map: None = None self._point_status: ...
0
15
0
13
28
0
core/propagation/__init__.py
collector-m/UniTrack
240
3329135
<reponame>collector-m/UniTrack ################################################################### # File Name: __init__.py # Author: <NAME> # mail: <EMAIL> # Created Time: Mon Jan 18 15:57:34 2021 ################################################################### from __future__ import print_function from __future__...
0
0
0
0
0
0
Python3/904.py
rakhi2001/ecom7
854
3329139
<gh_stars>100-1000 __________________________________________________________________________________________________ sample 692 ms submission class Solution: def totalFruit(self, tree: List[int]) -> int: if not tree: return 0 if len(set(tree)) <= 2: return len(tree) ...
0
0
0
0
0
0
tensorflow_model_optimization/python/core/common/keras/compression/schedules_test.py
jessicayywu/model-optimization
1,318
3329157
<filename>tensorflow_model_optimization/python/core/common/keras/compression/schedules_test.py # Copyright 2020 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 t...
0
0
0
0
0
0
examples/cifar10/pt/pt_model_locator.py
Can-Zhao/NVFlare
155
3329178
# Copyright (c) 2021, NVIDIA CORPORATION. # # 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...
3
2
2
0
7
0
docs/tutorials/datasets/vid.py
Kh4L/gluon-cv
5,447
3329190
"""Prepare ILSVRC 2015 VId dataset ========================================= `ILSVRC dataset <http://image-net.org/>`is Object detection from video There are a total of 3862 snippets for training. The number of snippets for each synest(category)ranges from 56 to 458 There are 555 validation snippets and 937 test snip...
0
0
0
0
0
0
robogym/envs/rearrange/datasets/envstates/utils.py
0xflotus/robogym
288
3329191
<gh_stars>100-1000 from typing import Dict from numpy.random.mtrand import RandomState from robogym.envs.rearrange.datasets.objects.base import ObjectDataset from robogym.utils.env_utils import get_function def get_envstate_datasets( dataset_config: Dict[str, dict], object_datasets: Dict[str, ObjectDataset]...
0
0
0
0
0
0
funky/utils/__init__.py
gordian-jklapacz/funky
584
3329198
<filename>funky/utils/__init__.py<gh_stars>100-1000 """Miscellaneous utility functions.""" import sys import termios import tty def getch(prompt: str = None) -> str: """Reads a single character from stdin. Args: prompt (optional): prompt that is presented to user. Returns: The single ch...
0
0
0
0
0
0
Heap/373. Find K Pairs with Smallest Sums.py
beckswu/Leetcode
138
3329213
from heapq import heappush, heappop class Solution: def kSmallestPairs(self, nums1: List[int], nums2: List[int], k: int) -> List[List[int]]: if not nums1 or not nums2: return [] heap = [(nums1[0] + nums2[0], 0, 0)] seen = set((0, 0)) result = [] ...
0
0
0
0
0
0
torchmeta/modules/conv.py
hanseungwook/pytorch-meta
1,704
3329217
from __future__ import annotations import torch.nn as nn import torch.nn.functional as F from collections import OrderedDict from torch.nn.modules.utils import _single, _pair, _triple from torchmeta.modules.module import MetaModule class MetaConv1d(nn.Conv1d, MetaModule): __doc__ = nn.Conv1d.__doc__ def forw...
3
3
0
0
6
0
src/Scripts/cachelines.py
jasonfeihe/BitFunnel
364
3329221
<reponame>jasonfeihe/BitFunnel # Takes a Document Frequency Table and caclulates the expected number of cache # misses for each term. # # TODO: allow use of different TermTreatments. # TODO: this assumes we subtract 1 from 'rows' because the DocumentActive row is counted as a row. Check that assumption! from collecti...
0
0
0
0
0
0
rlgraph/components/layers/layer.py
RLGraph/RLGraph
290
3329238
# Copyright 2018/2019 The RLgraph 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/LICENSE-2.0 # # Unless required by appli...
4
4
0
1
9
0
indy_common/test/types/test_get_auth_rule_schema.py
Rob-S/indy-node
627
3329251
from collections import OrderedDict from indy_common.types import ClientGetAuthRuleOperation, AuthRuleValueField from plenum.common.messages.fields import ConstantField, LimitedLengthStringField, ChooseField EXPECTED_ORDERED_FIELDS = OrderedDict([ ("type", ConstantField), ("auth_action", ChooseField), ("a...
0
0
0
0
0
0
tests/test_service.py
obi-t4/roslibpy
183
3329259
<reponame>obi-t4/roslibpy<gh_stars>100-1000 from __future__ import print_function import time from roslibpy import Ros from roslibpy import Service from roslibpy import ServiceRequest def test_add_two_ints_service(): ros = Ros('127.0.0.1', 9090) ros.run() def add_two_ints(request, response): re...
0
0
0
0
0
0
skyline/custom_algorithms/m66.py
datastreaming/skyline-1
396
3329302
<gh_stars>100-1000 # @added 20210717 - Feature #4180: custom_algorithm - m66 # Feature #4164: luminosity - cloudbursts # Task #4096: POC cloudbursts # REQUIRED Skyline imports. All custom algorithms MUST have the following two # imports. These are required for exception handling an...
0
0
0
0
0
0
tests/test_mf/parse_nf_dataset.py
FTWH/cirrus
116
3329347
<filename>tests/test_mf/parse_nf_dataset.py import os import sys path = "nf_dataset/training_set" ratings = {} count = 0 for f in os.listdir(path): print("count: ", count, " file: ", f) count += 1 file_path = path + "/" + f with open(file_path) as fin: lines = fin.readlines(); movie...
0
0
0
0
0
0
demos/encode_image.py
cuongptnk/imutils
3,984
3329359
# author: <NAME> # website: http://www.pyimagesearch.com # USAGE # python encode_image.py --image ../demo_images/pyimagesearch_logo.jpg # import the necessary packages from __future__ import print_function from imutils import encodings import argparse import cv2 # construct the argument parser and parse the arg...
0
0
0
0
0
0
rlgraph/components/layers/preprocessing/container_splitter.py
RLGraph/RLGraph
290
3329365
<filename>rlgraph/components/layers/preprocessing/container_splitter.py # Copyright 2018/2019 The RLgraph 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 # # ...
0
0
0
0
0
0
recipes/Python/578797_Public_Key_Encryption_RSA/recipe-578797.py
tdiprima/code
2,023
3329444
# coding=utf-8 from __future__ import annotations from __future__ import division, absolute_import, print_function from base64 import b64encode from fractions import gcd from random import randrange from collections import namedtuple from math import log from binascii import hexlify, unhexlify import sys PY3 = sys.ve...
4
8
0
0
12
0
rulesets-build/etl_evaluations.py
citrusoft/aws-config-engine-for-compliance-as-code
264
3329516
from __future__ import annotations import base64 import json import datetime import os import zipfile import boto3 # DEFINE WHITELIST & RULESET LOCATION # Define the Bucket prefix where the ruleset.zip and whitelist are posted in the Compliance Account. BUCKET_PREFIX = 'compliance-engine-codebuild-source' ORIGINAL_ZIP...
0
8
0
0
8
0
tempest/lib/services/identity/v3/identity_providers_client.py
cityofships/tempest
254
3329533
<reponame>cityofships/tempest<filename>tempest/lib/services/identity/v3/identity_providers_client.py # Copyright 2020 Samsung Electronics Co., Ltd # 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 ...
0
0
0
0
0
0
Chapter10/c10_33_implied_vol_EuropeanPut_min.py
John-ye666/Python-for-Finance-Second-Edition
236
3329549
<reponame>John-ye666/Python-for-Finance-Second-Edition<gh_stars>100-1000 """ Name : c10_33_implied_vol_EuropeanPut_min.py Book : Python for Finance (2nd ed.) Publisher: Packt Publishing Ltd. Author : <NAME> Date : 6/6/2017 email : <EMAIL> <EMAIL> """ from scipy import log,exp,...
0
0
0
0
0
0
tests/r/test_dm.py
hajime9652/observations
199
3329564
<reponame>hajime9652/observations from __future__ import absolute_import from __future__ import division from __future__ import print_function import shutil import sys import tempfile from observations.r.dm import dm def test_dm(): """Test module dm.py by downloading dm.csv and testing shape of extracted da...
0
0
0
0
0
0
src/lib/searchio/cmd/list.py
cgxxv/alfred-searchio
304
3329600
#!/usr/bin/env python # encoding: utf-8 # # Copyright (c) 2016 <NAME> <<EMAIL>> # # MIT Licence. See http://opensource.org/licenses/MIT # # Created on 2016-12-17 # from __future__ import annotations """searchio list [-t] [<query>] Display (and optionally filter) list of installed suggestion engines. Usage: searc...
1
1
0
0
2
0