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
tests/unit/utils/test_humanize.py
lucasalavapena/dvc
9,136
3347732
<reponame>lucasalavapena/dvc from collections import OrderedDict import pytest from dvc.utils.humanize import get_summary, truncate_text def test_get_summary(): # dict, so that we could delete from it easily stats = OrderedDict( [ ("fetched", 3), ("added", ["file1", "file2", ...
0
0
0
0
0
0
saas/aiops/api/aiops-server/ai_lib/time_series_prediction/api/train_wrapper_old.py
iuskye/SREWorks
407
3347734
# -*- coding: utf-8 -*- """ @author: <EMAIL> @date: 2020/08/18 20:29 """ import json import datetime import pandas as pd from ai_lib.time_series_prediction.algorithm import AlgorithmFactory class TrainWrapper(object): """ Time series prediction 时间序列预测入口类 """ def __init__(self): pass ...
1
1
0
0
2
0
examples/thread_matmul_wide/thread_matmul_wide.py
jesseclin/veriloggen
232
3347749
from __future__ import annotations from __future__ import absolute_import from __future__ import print_function import sys import os import numpy as np # the next line can be removed after installation sys.path.insert(0, os.path.dirname(os.path.dirname( os.path.dirname(os.path.abspath(__file__))))) from verilogge...
4
3
0
0
7
0
contrib/internal/webapi-lint.py
amalik2/reviewboard
921
3347783
#!/usr/bin/env python from __future__ import annotations from __future__ import print_function, unicode_literals import inspect import os import re import sys scripts_dir = os.path.abspath(os.path.dirname(__file__)) rb_dir = os.path.abspath(os.path.join(scripts_dir, '..', '..')) sys.path.insert(0, rb_dir) sys.path....
10
14
0
0
24
0
src/oci/apm_traces/models/__init__.py
Manny27nyc/oci-python-sdk
249
3347803
# 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
androguard/gui/renamewindow.py
kttkyk/androguard
731
3347820
from PyQt5 import QtWidgets class RenameDialog(QtWidgets.QDialog): """ parent: SourceWindow that started the new XrefDialog """ def __init__(self, parent=None, win=None, element="", info=()): super(RenameDialog, self).__init__(parent) self.sourceWin = parent self.info = i...
0
0
0
0
0
1
models/__init__.py
Kitsunetic/360SD-Net
134
3347836
from .LCV_ours_sub3 import LCV as LCV_ours_sub3
0
0
0
0
0
0
web/datasets/tests/management/commands/test_cityhall.py
andressadotpy/maria-quiteria
151
3347839
<filename>web/datasets/tests/management/commands/test_cityhall.py from datetime import datetime import pytest from django.utils.timezone import make_aware from web.datasets.management.commands._cityhall import save_bid @pytest.mark.django_db class TestSaveBid: def test_save_bid(self, mock_backup_file): i...
0
0
0
0
0
0
src/datasets/filesystems/__init__.py
WojciechKusa/datasets
10,608
3347842
<reponame>WojciechKusa/datasets import importlib from typing import List import fsspec from . import compression from .hffilesystem import HfFileSystem _has_s3fs = importlib.util.find_spec("s3fs") is not None if _has_s3fs: from .s3filesystem import S3FileSystem # noqa: F401 COMPRESSION_FILESYSTEMS: List[comp...
0
0
0
0
0
0
braindecode/training/callbacks.py
lapaill/braindecode
301
3347848
<reponame>lapaill/braindecode # Authors: <NAME> <<EMAIL>> # # License: BSD (3-clause) from skorch.callbacks import Callback import torch class MaxNormConstraintCallback(Callback): def on_batch_end(self, net, training, *args, **kwargs): if training: model = net.module_ last_weight ...
0
0
0
0
0
0
nbgrader/converters/base.py
omelnikov/nbgrader
1,116
3347870
<reponame>omelnikov/nbgrader import os import glob import re import shutil import sqlalchemy import traceback import importlib from rapidfuzz import fuzz from traitlets.config import LoggingConfigurable, Config from traitlets import Bool, List, Dict, Integer, Instance, Type, Any from traitlets import default, validate...
0
0
0
0
0
0
src/oci/database/models/database_connection_strings.py
Manny27nyc/oci-python-sdk
249
3347878
<filename>src/oci/database/models/database_connection_strings.py # 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 ...
0
0
0
0
0
0
hfpy/__init__.py
zhuzhenping/hf_at_py
130
3347888
#!/usr/bin/env python # -*- coding: utf-8 -*- """ __title__ = '' __author__ = 'HaiFeng' __mtime__ = '2016/9/23' """
0
0
0
0
0
0
python/ql/src/Statements/MismatchInMultipleAssignment.py
vadi2/codeql
4,036
3347893
# Fibonacci series 1: # the sum of two elements defines the next a, b = 0, 1, 1 # Assignment fails: accidentally put three values on right while b < 10: print b a, b = b, a+b # Fibonacci series 2: # the sum of two elements defines the next a, b = 0, 1 # Assignment succeeds: two variables on left and two ...
0
0
0
0
0
0
tests/neptune/new/test_sync.py
Raalsky/neptune-client
254
3347905
# # Copyright (c) 2020, Neptune Labs Sp. z o.o. # # 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 agr...
1
9
0
0
10
0
zerver/migrations/0241_usermessage_bigint_id_migration_finalize.py
TylerPham2000/zulip
17,004
3347911
<gh_stars>1000+ # Generated by Django 1.11.23 on 2019-08-23 22:24 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("zerver", "0240_usermessage_migrate_bigint_id_into_id"), ] operations = [ migrations.RunSQL("ALTER TABLE zerver_usermessage...
0
0
0
0
0
0
pygmt/src/legend.py
jbusecke/pygmt
326
3347928
<reponame>jbusecke/pygmt<gh_stars>100-1000 """ legend - Plot a legend. """ from pygmt.clib import Session from pygmt.exceptions import GMTInvalidInput from pygmt.helpers import ( build_arg_string, data_kind, fmt_docstring, kwargs_to_strings, use_alias, ) @fmt_docstring @use_alias( R="region",...
0
0
0
0
0
0
fs/wrapfs/lazyfs.py
jwilk-forks/pyfilesystem
314
3347979
from __future__ import annotations """ fs.wrapfs.lazyfs ================ A class for lazy initialization of an FS object. This module provides the class LazyFS, an FS wrapper class that can lazily initialize its underlying FS object. """ import sys try: from threading import Lock except ImportError: from f...
0
4
0
0
4
0
rl/arguments.py
luanagbmartins/cavia
122
3347998
<reponame>luanagbmartins/cavia<filename>rl/arguments.py<gh_stars>100-1000 import argparse import multiprocessing as mp import os import warnings import torch def parse_args(): parser = argparse.ArgumentParser(description='Fast Context Adaptation via Meta-Learning (CAVIA)') # General parser.add_argument(...
0
0
0
0
0
0
Lib/site-packages/hamcrest/library/text/stringendswith.py
Priyansh863/e-backend
547
3348012
<reponame>Priyansh863/e-backend from hamcrest.core.helpers.hasmethod import hasmethod from hamcrest.core.matcher import Matcher from hamcrest.library.text.substringmatcher import SubstringMatcher __author__ = "<NAME>" __copyright__ = "Copyright 2011 hamcrest.org" __license__ = "BSD, see License.txt" class StringEnds...
0
0
0
0
0
0
detect_secrets_server/repos/s3_tracked_repo.py
ekmixon/detect-secrets-server
110
3348035
from __future__ import annotations from .base_tracked_repo import BaseTrackedRepo from .base_tracked_repo import OverrideLevel from .local_tracked_repo import LocalTrackedRepo from detect_secrets_server.storage.s3 import S3Storage from detect_secrets_server.storage.s3 import S3StorageWithLocalGit class S3TrackedRepo(...
2
5
0
0
7
0
polyfile/__init__.py
trailofbits/polyfile
190
3348059
<reponame>trailofbits/polyfile from . import nes, pdf, zipmatcher, trid, kaitaimatcher, polyfile from .__main__ import main from .polyfile import __version__
0
0
0
0
0
0
docs/scripts/pscriptexample.py
JesusZerpa/pscript
190
3348080
<filename>docs/scripts/pscriptexample.py """ Small sphinx extension to show PScript code and corresponding JS. """ import os import hashlib from pygments import highlight from pygments.lexers import get_lexer_by_name from pygments.formatters import HtmlFormatter from docutils.parsers.rst import Directive from docuti...
0
0
0
0
0
0
dso/dso/baselines/gpsr.py
brendenpetersen/deep-symbolic-optimization
134
3348085
from __future__ import annotations import random import operator import importlib from functools import partial import numpy as np from dso.functions import function_map from dso.const import make_const_optimizer from . import constraints GP_MOD = "deap" OBJECTS = ["base", "gp", "creator", "tools", "algorithms"] g...
26
4
0
1
31
0
pymtl3/passes/rtlir/behavioral/test/BehavioralRTLIRL4Pass_test.py
kevinyuan/pymtl3
152
3348091
<reponame>kevinyuan/pymtl3 #========================================================================= # BehavioralRTLIRL4Pass_test.py #========================================================================= # Author : <NAME> # Date : Feb 2, 2019 """Test the level 4 behavioral RTLIR passes. The L4 generation, L4 ty...
0
0
0
0
0
0
setup.py
bigdot123456/wasmDecode
269
3348110
#!/usr/bin/env python # -*- coding: utf8 -*- from setuptools import setup setup( name='wasm', version='1.2', packages=['wasm'], url='https://github.com/athre0z/wasm', download_url='https://github.com/athre0z/wasm/archive/v1.2.tar.gz', keywords=['wasm', 'disassembler', 'decoder'], license=...
0
0
0
0
0
0
scripts/geodata/openaddresses/download_openaddresses.py
Fillr/libpostal
3,489
3348125
import argparse import os import requests import six import subprocess import sys import tempfile import yaml from six.moves.urllib_parse import urljoin, quote_plus, unquote_plus this_dir = os.path.realpath(os.path.dirname(__file__)) sys.path.append(os.path.realpath(os.path.join(os.pardir, os.pardir))) from geodata....
0
2
0
0
2
0
wikigraphs/wikigraphs/model/embedding.py
kawa-work/deepmind-research
10,110
3348142
<gh_stars>1000+ # Copyright 2021 DeepMind Technologies Limited. 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 # # Unl...
0
0
0
0
0
0
pororo/models/brainOCR/model.py
jayten42/pororo
1,137
3348160
""" This code is adapted from https://github.com/clovaai/deep-text-recognition-benchmark/blob/master/model.py """ import torch.nn as nn from torch import Tensor from .modules.feature_extraction import ( ResNetFeatureExtractor, VGGFeatureExtractor, ) from .modules.prediction import Attention from .modules.sequ...
2
1
0
0
3
0
src/jefferson/rtime.py
wideglide/jefferson
254
3348179
def decompress(data_in, destlen) -> object: positions = [0] * 256 cpage_out = bytearray([0] * destlen) outpos = 0 pos = 0 while outpos < destlen: value = data_in[pos] pos += 1 cpage_out[outpos] = value outpos += 1 repeat = data_in[pos] pos += 1 ...
0
1
0
0
1
0
tests/unit/test_app.py
HiteshMah-Jan/aws-shell
6,883
3348214
import pytest import mock from awsshell import app from awsshell import shellcomplete from awsshell import compat @pytest.fixture def errstream() -> object: return compat.StringIO() def test_can_dispatch_dot_commands(): call_args = [] class CustomHandler(object): def run(self, command, context...
0
2
0
0
2
0
libs/ns_lite.py
scaomath/galerkin-transformer
106
3348263
from __future__ import annotations """ (2+1)D Navier-Stokes equation + Galerkin Transformer MIT license: Paper2394 authors, NeurIPS 2021 submission. """ from .utils import * from .utils_ft import * from .ft import * from .layers import * from .model import * import h5py class NavierStokesDatasetLite(Dataset): de...
11
7
0
2
20
0
test/scenes/_test_lobby_videos.py
fetus-hina/IkaLog
285
3348267
from __future__ import annotations import unittest import os import cv2 class TestSceneLobbyVideos(unittest.TestCase): scene_name: str = 'lobby' def _load_screenshot(self, filename): filepath = os.path.join('test_data', 'movies', self.scene_name, filename) def no...
1
2
1
0
4
0
ontospy/tests/test_shaped_properties.py
RichDijk/Ontospy
134
3348282
# !/usr/bin/env python # -*- coding: UTF-8 -*- """ Unit test stub for ontosPy Run like this: $ python -m ontospy.tests.test_shaped_properties """ from __future__ import print_function import unittest, os, sys from .. import * from ..core import * from ..core.utils import * from .context import TEST_RDF_FOLDER, ...
0
0
0
0
0
0
third_party/pasta/workspace.bzl
vixadd/tensorflow
190,993
3348327
"""Loads pasta python package.""" load("//third_party:repo.bzl", "tf_http_archive") def repo(): tf_http_archive( name = "pasta", urls = [ "https://storage.googleapis.com/mirror.tensorflow.org/github.com/google/pasta/archive/v0.1.8.tar.gz", "https://github.com/google/pasta/a...
0
0
0
0
0
0
Examples/Example_1/Calc/calc_clear.py
mrslezak/Engine
335
3348342
<filename>Examples/Example_1/Calc/calc_clear.py #import socket # only needed on win32-OOo3.0.0 import uno import sys ############################################### # Generic part establishing contact with Calc # ############################################### # get the uno component context from the PyUNO runtime l...
0
0
0
0
0
0
src/MS-C1/eval_extend/modules/filemod.py
willyspinner/High-Performance-Face-Recognition
300
3348344
import os def open(path): os.system('start '+path)
0
0
0
0
0
0
src/twisted/internet/test/test_pollingfile.py
mathieui/twisted
9,953
3348353
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.internet._pollingfile}. """ from twisted.python.runtime import platform from twisted.trial.unittest import TestCase if platform.isWindows(): from twisted.internet import _pollingfile else: _pollingfile = None c...
0
0
0
0
0
0
selfdrive/test/test_updated.py
robin-reckmann/openpilot
37,508
3348377
<reponame>robin-reckmann/openpilot<filename>selfdrive/test/test_updated.py<gh_stars>1000+ #!/usr/bin/env python3 import datetime import os import time import tempfile import unittest import shutil import signal import subprocess import random from common.basedir import BASEDIR from common.params import Params class ...
0
0
0
0
0
0
pyEX/studies/__init__.py
adamklaff/pyEX
335
3348405
# ***************************************************************************** # # Copyright (c) 2020, the pyEX authors. # # This file is part of the pyEX library, distributed under the terms of # the Apache License 2.0. The full license can be found in the LICENSE file. # from .peercorrelation import peerCorrelation...
0
0
0
0
0
0
scripts/slam.py
vatsan/slam
126
3348426
""" <NAME>, Nov-2007 Implementation of Particle Filtering algorithm for Simultaneous Localization and Mapping (SLAM) in Autonomous Robots. """ import os,sys from math import sqrt,sin,cos,atan,atan2,fabs,pi import thread,time from Tkinter import Canvas,Tk,NW from PIL import Image,ImageTk import numpy Grid = None cel...
0
0
0
0
0
0
src/transformers/models/plbart/tokenization_plbart.py
dctelus/transformers
8,028
3348431
<gh_stars>1000+ # coding=utf-8 # Copyright 2022, UCLA NLP, The Facebook AI Research Team Authors and The HuggingFace Inc. team. # # 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://...
0
0
0
0
0
0
SearchService2/appscale/search/facet_converter.py
loftwah/appscale
790
3348441
<reponame>loftwah/appscale<filename>SearchService2/appscale/search/facet_converter.py<gh_stars>100-1000 import collections import logging from appscale.search.constants import InvalidRequest from appscale.search.models import FacetResult, SolrSchemaFieldInfo logger = logging.getLogger(__name__) def discover_facets(...
0
0
0
0
0
0
tests/data/orthofoto/other/test_url_builder.py
grischard/OSMDeepOD
156
3348447
import pytest import requests from src.data.orthofoto.other.fitting_bbox import FittingBbox from src.data.orthofoto.other.url_builder import UrlBuilder @pytest.fixture(scope='module') def urls(small_bbox) -> object: url_builder = UrlBuilder() fitting_box = FittingBbox() t_minx, t_miny, t_maxx, t_maxy = f...
0
1
0
0
1
0
istio/tests/utils.py
mchelen-gov/integrations-core
663
3348472
# (C) Datadog, Inc. 2020-present # All rights reserved # Licensed under Simplified BSD License (see LICENSE) import os from datadog_checks.dev import get_here from datadog_checks.istio.constants import BLACKLIST_LABELS HERE = get_here() def get_fixture_path(version, filename) -> object: return os.path.join(HERE...
0
2
0
0
2
0
tools/git-obsolete-branch.py
svenauhagen/kea
273
3348486
#!/usr/bin/python # # Copyright (C) 2012-2015 Internet Systems Consortium, Inc. ("ISC") # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # # This script lists obsolete...
0
2
4
0
6
0
tests/cgTest.py
SachinKumar105/Implicit-Competitive-Regularization
107
3348492
import torch import torch.nn as nn import torch.autograd as autograd def Hvp_vec(grad_vec, params, vec, retain_graph: bool=False) -> object: ''' return Hessian vector product ''' grad_grad = autograd.grad(grad_vec, params, grad_outputs=vec, retain_graph=retain_graph, allo...
1
3
0
0
4
0
Beginner/Alternating subarray prefix (ALTARAY)/alternating.py
anishsingh42/CodeChef
127
3348493
<filename>Beginner/Alternating subarray prefix (ALTARAY)/alternating.py t = int(input()) while t: k = int(input()) N = list(map(int,input().split())) arr = [] arr.append(1) for j in range(k - 2,-1,-1) : if (N[j] > 0 and N[j + 1] < 0) or (N[j] < 0 and N[j + 1] > 0) : arr.append(...
0
0
0
0
0
0
atlastk/Atlas.py
splashelec/atlas-python
221
3348494
<gh_stars>100-1000 """ MIT License Copyright (c) 2018 <NAME> (https://q37.info/s/rmnmqd49) 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 limitatio...
0
0
0
0
0
0
rma/__pkginfo__.py
yb1682003/redis-memory-analyzer
722
3348520
num_version = (0, 2, 0) version = '.'.join([str(num) for num in num_version]) classifiers = [ 'Development Status :: 3 - Alpha', 'Environment :: Console', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: ...
0
0
0
0
0
0
lib/ansiblereview/playbook.py
tonyskidmore/ansible-review
222
3348528
<filename>lib/ansiblereview/playbook.py from ansiblereview import utils, Playbook, Result, Error from ansiblelint.utils import parse_yaml_linenumbers, get_action_tasks import codecs from collections import defaultdict import os def install_roles(playbook, settings): rolesdir = os.path.join(os.path.dirname(playboo...
0
0
0
0
0
0
codigo_das_aulas/aula_12_13/pages/pages.py
VeirichR/curso-python-selenium
234
3348556
from todo_project.page_objects import Page from .elements import AFazer, Fazendo, Pronto, Todo class PageTodo(Page): a_fazer = AFazer() fazendo = Fazendo() pronto = Pronto() todo = Todo()
0
0
0
0
0
0
third_party/httplib2/python2/httplib2test_appengine.py
Martijnve23/catapult
1,894
3348558
"""Tests for httplib2 on Google App Engine.""" import mock import os import sys import unittest APP_ENGINE_PATH = "/usr/local/google_appengine" sys.path.insert(0, APP_ENGINE_PATH) import dev_appserver dev_appserver.fix_sys_path() from google.appengine.ext import testbed # Ensure that we are not loading the httpl...
0
0
0
0
0
0
pysparkling/sql/utils.py
ptallada/pysparkling
260
3348589
<reponame>ptallada/pysparkling class CapturedException(Exception): pass class AnalysisException(CapturedException): pass class ParseException(CapturedException): pass class IllegalArgumentException(CapturedException): pass def require_minimum_pandas_version(): """ Raise an ImportError if Pan...
0
0
0
0
0
0
awx/api/swagger.py
DamoR25/awxnew
11,396
3348611
import json import warnings from coreapi.document import Object, Link from rest_framework import exceptions from rest_framework.permissions import AllowAny from rest_framework.renderers import CoreJSONRenderer from rest_framework.response import Response from rest_framework.schemas import SchemaGenerator, AutoSchema ...
0
4
4
0
8
0
venv/Lib/site-packages/numpy/f2py/tests/util.py
EkremBayar/bayar
603
3348628
from __future__ import annotations """ Utility functions for - building and importing modules on test time, using a temporary location - detecting if compilers are present """ import os import sys import subprocess import tempfile import shutil import atexit import textwrap import re import pytest from numpy.compat ...
9
12
8
0
29
0
tests/test_packages/test_skills_integration/test_coin_price.py
fetchai/agents-aea
126
3348643
# -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # # Copyright 2018-2019 Fetch.AI 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 ...
1
1
0
0
2
0
nncf/common/stateful_classes_registry.py
MaximProshin/nncf
136
3348651
<filename>nncf/common/stateful_classes_registry.py<gh_stars>100-1000 """ Copyright (c) 2022 Intel 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/...
0
0
0
0
0
0
auth0/v3/management/prompts.py
akmjenkins/auth0-python
340
3348663
from __future__ import annotations from .rest import RestClient class Prompts(object): """Auth0 prompts endpoints Args: domain (str): Your Auth0 domain, e.g: 'username.auth0.com' token (str): Management API v2 Token telemetry (bool, optional): Enable or disable Telemetry ...
6
5
0
0
11
0
segmenters/nlp/SlidingWindowSegmenter/tests/test_slidingwindowsegmenter.py
sidphbot/jina-hub
106
3348668
import numpy as np import pytest from .. import SlidingWindowSegmenter @pytest.mark.parametrize( 'multilingual_test_inputs, window_size, step_size', [ ('It is a sunny day!!!! When Andy comes back, we are going to the zoo.', 20, 10), ('It is a sunny day!!!! When Andy comes back, we are going t...
0
0
0
0
0
0
tensorflow_graphics/projects/points_to_3Dobjects/utils/evaluator.py
Liang813/graphics
2,759
3348676
<gh_stars>1000+ # Copyright 2020 The TensorFlow 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
0
0
0
0
0
0
pmdarima/preprocessing/base.py
sthagen/alkaline-ml-pmdarima
239
3348691
<reponame>sthagen/alkaline-ml-pmdarima # -*- coding: utf-8 -*- # # Base ARIMA pre-processing classes. Don't import this in __init__, or we'll # potentially get circular imports in sub-classes from sklearn.base import BaseEstimator, TransformerMixin import abc from ..compat.numpy import DTYPE from ..utils import check...
0
0
0
0
0
0
tools/sim/gui.py
ParikhKadam/cycloid
156
3348700
<gh_stars>100-1000 # -*- coding: utf-8 -*- from __future__ import print_function import numpy as np import glfw import OpenGL.GL as gl import imgui import time from imgui.integrations.glfw import GlfwRenderer def load_texture(im): # gl.glEnable(gl.GL_TEXTURE_2D) texid = gl.glGenTextures(1) gl.glBindTextu...
0
0
0
0
0
0
hddm/diag.py
hddm-devs/hddm
155
3348720
from copy import copy import numpy as np import pymc as pm np.seterr(divide="ignore") from sys import stdout import hddm from scipy.stats import scoreatpercentile from time import time from operator import attrgetter def check_model(model, params_true, assert_=False, conf_interval=95): """calculate the posterio...
0
0
0
0
0
1
commands/deviot_libraries_examples.py
Rod-O/Deviot
327
3348735
<gh_stars>100-1000 from sublime_plugin import WindowCommand from ..libraries.quick_menu import QuickMenu class DeviotLibraryExamplesCommand(WindowCommand): def run(self): QuickMenu().quick_libraries()
0
0
0
0
0
0
tests/test_detector_en_GB_trn.py
datascopeanalytics/scrubadub
190
3348742
<gh_stars>100-1000 import unittest from base import BaseTestCase class GBTrnTestCase(unittest.TestCase, BaseTestCase): def test_gbtrn_1(self): """ BEFORE: My PAYE temp number is 99L99999, which is not permanent. AFTER: My PAYE temp number is {{TAX_REFERENCE_NUMBER}}, which is not perman...
0
0
0
0
0
0
haven/haven_jupyter/share_tab.py
mariatippler/haven-ai
145
3348757
<reponame>mariatippler/haven-ai from .. import haven_utils from .. import haven_results as hr from .. import haven_utils as hu from .. import haven_share as hd from . import widgets as wdg import os import pprint import json import copy import pprint import pandas as pd try: import ast from ipywidgets import...
0
0
0
0
0
0
Configuration/Generator/python/InclusiveppMuX_8TeV_TuneCUETP8M1_cfi.py
Purva-Chaudhari/cmssw
852
3348770
import FWCore.ParameterSet.Config as cms from Configuration.Generator.Pythia8CommonSettings_cfi import * from Configuration.Generator.Pythia8CUEP8M1Settings_cfi import * generator = cms.EDFilter("Pythia8ConcurrentGeneratorFilter", pythiaHepMCVerbosity = cms.untracked.bool(False), ...
0
0
0
0
0
0
shadowsocks/lru_cache.py
ccmShion/SSR
7,056
3348777
<reponame>ccmShion/SSR #!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2015 clowwindy # # 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
Unbias_LightGBM/.nuget/create_nuget.py
atul2804/Unbiased_LambdaMart
212
3348799
<filename>Unbias_LightGBM/.nuget/create_nuget.py<gh_stars>100-1000 import os import sys import distutils from distutils import file_util if not os.path.exists("lib"): os.makedirs("lib") if not os.path.exists("lib/native"): os.makedirs("lib/native") if not os.path.exists("lib/net40"): os.makedirs("lib/net40...
0
0
0
0
0
0
cirq-ionq/cirq_ionq/ionq_devices.py
peterse/Cirq
3,326
3348821
# Copyright 2021 The Cirq Developers # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
7
5
0
0
12
0
model-optimizer/unit_tests/mo/front/common/layout_test.py
monroid/openvino
2,406
3348822
<reponame>monroid/openvino<gh_stars>1000+ # Copyright (C) 2018-2021 Intel Corporation # SPDX-License-Identifier: Apache-2.0 import unittest from mo.front.common.layout import get_batch_dim, get_width_dim, get_height_dim, get_features_dim, get_depth_dim, \ shape_for_layout from mo.utils.error import Error class ...
0
0
0
0
0
0
powerdns_recursor/tests/test_powerdns.py
vbarbaresi/integrations-core
663
3348829
# (C) Datadog, Inc. 2010-present # All rights reserved # Licensed under Simplified BSD License (see LICENSE) import pytest from datadog_checks.powerdns_recursor import PowerDNSRecursorCheck from . import common, metrics pytestmark = [pytest.mark.integration, pytest.mark.usefixtures("dd_environment")] def test_che...
0
0
0
0
0
0
boost/libs/iterator/doc/syscmd.py
randolphwong/mcsema
1,155
3348835
<reponame>randolphwong/mcsema # Copyright <NAME> 2004. Use, modification and distribution is # subject to the Boost Software License, Version 1.0. (See accompanying # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) import os import sys def syscmd(s): print 'executing: ', repr(s) sys.stdo...
0
0
0
0
0
0
runtime/python/Lib/ctypes/test/test_repr.py
hwaipy/InteractionFreeNode
207
3348853
<gh_stars>100-1000 from ctypes import * import unittest subclasses = [] for base in [c_byte, c_short, c_int, c_long, c_longlong, c_ubyte, c_ushort, c_uint, c_ulong, c_ulonglong, c_float, c_double, c_longdouble, c_bool]: class X(base): pass subclasses.append(X) class X(c_char...
0
0
0
0
0
0
metadata-ingestion/tests/unit/test_data_process_instance_urn.py
cuong-pham/datahub
1,603
3348878
import unittest from datahub.utilities.urns.data_process_instance_urn import DataProcessInstanceUrn from datahub.utilities.urns.error import InvalidUrnError class TestDomainUrn(unittest.TestCase): def test_parse_urn(self) -> None: dataprocessinstance_urn_str = "urn:li:dataProcessInstance:abc" dat...
0
2
0
0
2
0
gaphor/UML/actions/flowconnect.py
sz332/gaphor
867
3348885
from __future__ import annotations """Flow item adapter connections.""" from typing import Type, Union from gaphor import UML from gaphor.diagram.connectors import Connector, UnaryRelationshipConnect from gaphor.UML.actions.action import ( AcceptEventActionItem, ActionItem, SendSignalActionItem, ) from ga...
0
2
7
0
9
0
tests/basics/int_big_rshift.py
MakeItZone/circuitpython
13,648
3348909
i = 123456789012345678901234567890 print(i >> 1) print(i >> 1000) # result needs rounding up i = -(1 << 70) print(i >> 80) i = -0xffffffffffffffff print(i >> 32)
0
0
0
0
0
0
src/ezdxf/addons/browser/model.py
jkjt/ezdxf
515
3348924
# Copyright (c) 2021, <NAME> # License: MIT License from __future__ import annotations from typing import Any, List, Dict, Optional import textwrap from ezdxf.lldxf.types import ( render_tag, DXFVertex, GROUP_MARKERS, POINTER_CODES, ) from ezdxf.addons.xqt import QModelIndex, QAbstractTableModel, Qt f...
24
21
1
2
48
0
xtune/src/run_cls.py
Sanster/unilm
5,129
3348926
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team. # Copyright (c) 2018, NVIDIA CORPORATION. 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 cop...
62
15
0
7
84
0
rpython/jit/metainterp/test/test_virtualizable.py
nanjekyejoannah/pypy
333
3348928
<filename>rpython/jit/metainterp/test/test_virtualizable.py import py from rpython.jit.codewriter import heaptracker from rpython.jit.codewriter.policy import StopAtXPolicy from rpython.jit.metainterp.optimizeopt.test.test_util import LLtypeMixin from rpython.jit.metainterp.test.support import LLJitMixin from rpython....
0
0
0
0
0
0
models/SemanticSegmentation/ENet.py
Dou-Yu-xuan/deep-learning-visal
150
3348937
# !/usr/bin/env python # -- coding: utf-8 -- # @Time : 2020/10/14 10:45 # @Author : liumin # @File : enet.py import torch import torch.nn as nn from torchsummary import summary __all__ = ["ENet"] def Conv1x1BNReLU(in_channels,out_channels,is_relu: bool=True) -> object: return nn.Sequential( ...
21
11
0
0
32
0
tock/employees/migrations/0013_auto_20160916_1942.py
mikiec84/tock
134
3348949
# -*- coding: utf-8 -*- # Generated by Django 1.10.1 on 2016-09-16 19:42 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies: list[tuple[str, str]] = [ ('employees', '0012_auto_20160915_2136'), ] operations: list[o...
0
0
2
0
2
0
test/core/derivatives/permute_settings.py
jabader97/backpack
395
3348959
<reponame>jabader97/backpack """Test configurations for `backpack.core.derivatives` Permute. Required entries: "module_fn" (callable): Contains a model constructed from `torch.nn` layers "input_fn" (callable): Used for specifying input function Optional entries: "target_fn" (callable): Fetches the groundt...
0
0
0
0
0
0
PaddleNLP/Research/ACL2019-DuConv/generative_paddle/source/models/__init__.py
FrancisLiang/models-1
1,319
3348965
<filename>PaddleNLP/Research/ACL2019-DuConv/generative_paddle/source/models/__init__.py<gh_stars>1000+ #!/usr/bin/env python # -*- coding: UTF-8 -*- ################################################################################ # # Copyright (c) 2019 Baidu.com, Inc. All Rights Reserved # #############################...
0
0
0
0
0
0
scripts/code-format.py
Ryzee119/lvgl
3,531
3348988
#!/usr/bin/env python3 import os print("Formatting src") os.system('astyle --options=code-format.cfg --recursive "../src/*.c,*.h"') print("\nFormatting demos") os.system('astyle --options=code-format.cfg --recursive "../demos/*.c,*.h"') print("\nFormatting examples") os.system('astyle --options=code-format.cfg --re...
0
0
0
0
0
0
servers/curioecho_streams.py
jkassismz/vmbench
192
3348991
from curio import run, spawn, tcp_server from socket import * async def echo_handler(client, addr): print('Connection from', addr) try: client.setsockopt(IPPROTO_TCP, TCP_NODELAY, 1) except (OSError, NameError): pass s = client.as_stream() while True: data = await s.readline...
0
0
0
0
0
0
openmdao/core/tests/test_auto_ivc.py
eytanadler/OpenMDAO
451
3349041
import unittest import time from collections.abc import Iterable import numpy as np import openmdao.api as om from openmdao.utils.mpi import MPI from openmdao.utils.array_utils import evenly_distrib_idxs, take_nth from openmdao.utils.assert_utils import assert_near_equal, assert_warning try: from parameterized i...
1
1
1
0
3
0
python/app/plugins/http/Nexus/Nexus_Weakpwd.py
taomujian/linbing
351
3349058
<reponame>taomujian/linbing #!/usr/bin/env python3 import base64 from app.lib.utils.request import request from app.lib.utils.common import get_useragent class Nexus_Weakpwd_BaseVerify: def __init__(self, url): self.info = { 'name': 'Nexus弱口令漏洞', 'description': 'Nexus弱口令漏洞', ...
0
0
0
0
0
0
regression/scripts/host_regression.py
sld-columbia/nvdla-sw
407
3349067
# Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # * Redistributions of source code must retain the above copyright # notice, this list of conditions a...
0
1
0
0
1
0
trimesh/units.py
jpmaterial/trimesh
1,882
3349109
<reponame>jpmaterial/trimesh """ units.py -------------- Deal with physical unit systems (i.e. inches, mm) Very basic conversions, and no requirement for sympy.physics.units or pint. """ from .constants import log from . import resources def unit_conversion(current, desired): """ Calculate the conversion fro...
0
0
0
0
0
0
build_tools/debugflaghh.py
hyu-iot/gem5
765
3349146
# Copyright (c) 2018, 2020 ARM Limited # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation of the functionality of the software #...
0
0
0
0
0
0
html_parsing/get_game_genres/generate_games/generate_games.py
gil9red/SimplePyScripts
117
3349147
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = 'ipetrash' import datetime as DT import json from pathlib import Path import shutil import sys sys.path.append('..') sys.path.append('../genre_translate_file') from db import Dump from load import load from common_utils import get_logger from common impor...
1
1
0
0
2
0
tools/ds5/configdb/bootDebug.py
lambdaxymox/barrelfish
111
3349148
<filename>tools/ds5/configdb/bootDebug.py from arm_ds.debugger_v1 import Debugger from arm_ds.debugger_v1 import DebugException import os # The CPU driver is linked at this address LINKADDRESS = 0 # The boot driver is relocated to this address RAMBASE = 0x80000000 debugger = Debugger() ec = debugger.getCurrentExecut...
0
0
0
0
0
0
lldb/test/API/source-manager/TestSourceManager.py
undingen/BOLT
2,338
3349155
<reponame>undingen/BOLT """ Test lldb core component: SourceManager. Test cases: o test_display_source_python: Test display of source using the SBSourceManager API. o test_modify_source_file_while_debugging: Test the caching mechanism of the source manager. """ from __future__ import print_function import lldb ...
0
0
0
0
0
0
08-def-type-hints/typeddict/test_books.py
eumiro/example-code-2e
990
3349164
<filename>08-def-type-hints/typeddict/test_books.py import json from typing import cast from books import BookDict, to_xml, from_json XML_SAMPLE = """ <BOOK> \t<ISBN>0134757599</ISBN> \t<TITLE>Refactoring, 2e</TITLE> \t<AUTHOR><NAME></AUTHOR> \t<AUTHOR><NAME></AUTHOR> \t<PAGECOUNT>478</PAGECOUNT> </BOOK> """.strip() ...
0
0
0
0
0
0
examples/generation/docking_generation/MARS/preprocess_zinc.py
Shicheng-Guo/TDC
577
3349172
input_file = "data/zinc.tab" output_file = "data/zinc.txt" with open(input_file, 'r') as fin, open(output_file, 'w') as fout: lines = fin.readlines() lines = lines[1:] for line in lines: line = line.strip() line = line[1:-1] fout.write(line + '\n')
0
0
0
0
0
0
tests/utils/fixtures/setups/extras_require_with_vars/setup.py
vanyakosmos/poetry
12,347
3349183
<gh_stars>1000+ from setuptools import setup tests_require = ["pytest"] setup( name="extras_require_with_vars", version="0.0.1", description="test setup_reader.py", install_requires=[], extras_require={"test": tests_require}, )
0
0
0
0
0
0
sklearn/metrics/_plot/tests/test_det_curve_display.py
MaiRajborirug/scikit-learn
50,961
3349184
import pytest import numpy as np from numpy.testing import assert_allclose from sklearn.datasets import load_iris from sklearn.linear_model import LogisticRegression from sklearn.metrics import det_curve from sklearn.metrics import DetCurveDisplay @pytest.mark.parametrize("constructor_name", ["from_estimator", "fro...
0
0
0
0
0
0
addons/io_scene_gltf2/blender/exp/gltf2_blender_gather_skins.py
inaber0420/glTF-Modo-IO
1,084
3349225
# Copyright 2018-2021 The glTF-Blender-IO 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
0
9
0
0
9
0