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
setup.py
mururu/jungle
945
1683204
# -*- coding: utf-8 -*- from __future__ import annotations """AWS operations by cli should be simpler.""" import os import re from setuptools import find_packages, setup base_dir = os.path.dirname(os.path.abspath(__file__)) # Taken from "kennethreitz/requests": http://git.io/vcuY8 version = '' with open('jungle/__in...
0
1
0
0
1
0
examples/hyperconvo/tsne.py
sophieball/Cornell-Conversational-Analysis-Toolkit
371
1683230
import convokit import numpy as np import matplotlib.pyplot as plt print("Loading corpus") corpus = convokit.Corpus(filename=convokit.download("reddit-corpus-small")) print("Computing hypergraph features") hc = convokit.HyperConvo() hc.fit_transform(corpus) print("Computing low-dimensional embeddings") te = convokit...
0
0
0
0
0
0
qtrader/simulation/tests/base.py
aaron8tang/qtrader
381
1683247
<reponame>aaron8tang/qtrader<gh_stars>100-1000 class Test: @classmethod def run(cls): raise NotImplementedError
0
0
0
0
0
0
pypsrp/host.py
Samathy/pypsrp
228
1683250
# Copyright: (c) 2018, <NAME> (@jborean93) <<EMAIL>> # MIT License (see LICENSE or https://opensource.org/licenses/MIT) from __future__ import annotations import logging import uuid from pypsrp.complex_objects import Color, Coordinates, ObjectMeta, Size log = logging.getLogger(__name__) class PSHost(object): ...
3
17
0
4
24
0
spyne/protocol/_inbase.py
edustaff/spyne
786
1683256
<reponame>edustaff/spyne # # spyne - Copyright (C) Spyne contributors. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any late...
0
0
0
0
0
0
test/test_dump.py
skiphansen/litex-buildenv
198
1683338
#!/usr/bin/env python3 from litex.tools.litex_client import RemoteClient rom_base = 0x00000000 dump_size = 0x8000 words_per_packet = 128 wb = RemoteClient() wb.open() # # # print("dumping cpu rom to dump.bin...") dump = [] for n in range(dump_size//(words_per_packet*4)): dump += wb.read(rom_base + n*words_per_p...
0
0
0
0
0
0
evm/chains/mainnet/constants.py
zixuanzh/py-evm
137
1683351
<reponame>zixuanzh/py-evm<gh_stars>100-1000 # Blocks listed in ascending order # # Homestead Block # HOMESTEAD_MAINNET_BLOCK = 1150000 # # DAO Block # DAO_FORK_MAINNET_BLOCK = 1920000 DAO_FORK_MAINNET_EXTRA_DATA = b'dao-hard-fork' # # Tangerine Whistle Block # TANGERINE_WHISTLE_MAINNET_BLOCK = 2463000 # # Spuri...
0
0
0
0
0
0
mode/examples/Demos/Performance/Esfera/Esfera.pyde
timgates42/processing.py
1,224
1683372
""" Esfera by <NAME>. ES - Distribucion aleatoria uniforme sobre la superficie de una esfera. EN - Uniform random distribution on the surface of a sphere. """ CUANTOS = 16000 # how many LISTA = [] # list RADIO = 200 # radius rx = 0 ry = 0 def setup(): global RADIO, LISTA size(1024, 768, P3D) RADIO = ...
0
0
0
0
0
0
mlcomp/contrib/catalyst/optim/__init__.py
sUeharaE4/mlcomp
166
1683384
<reponame>sUeharaE4/mlcomp from .cosineanneal import OneCycleCosineAnnealLR __all__ = ['OneCycleCosineAnnealLR']
0
0
0
0
0
0
dev/Gems/CloudGemFramework/v1/ResourceManager/resource_manager/test/test_unit_rm_service.py
brianherrera/lumberyard
1,738
1683428
<reponame>brianherrera/lumberyard # # All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or # its licensors. # # For complete copyright and license terms please see the LICENSE at the root of this # distribution (the 'License'). All use of this software is governed by the License, # or, if pr...
0
0
0
0
0
0
tests/test_collections.py
Sniperq2/lightkurve
235
1683432
<filename>tests/test_collections.py import warnings import pytest from astropy import units as u from astropy.utils.data import get_pkg_data_filename import matplotlib.pyplot as plt import numpy as np from numpy.testing import assert_array_equal from lightkurve.lightcurve import LightCurve, KeplerLightCurve, TessLigh...
0
0
0
0
0
0
llvmlite/binding/linker.py
efeslab/llvmlite
1,384
1683447
from ctypes import c_int, c_char_p, POINTER from llvmlite.binding import ffi def link_modules(dst, src): with ffi.OutputString() as outerr: err = ffi.lib.LLVMPY_LinkModules(dst, src, outerr) # The underlying module was destroyed src.detach() if err: raise RuntimeError(s...
0
0
0
0
0
0
tests/extension/thread_/stream_linebuffer2d_2_stall/thread_stream_linebuffer2d_2_stall.py
Pyverilog/veriloggen
232
1683458
<filename>tests/extension/thread_/stream_linebuffer2d_2_stall/thread_stream_linebuffer2d_2_stall.py from __future__ import absolute_import from __future__ import print_function import sys import os import functools # the next line can be removed after installation sys.path.insert(0, os.path.dirname(os.path.dirname(os....
0
0
0
0
0
0
pypy/module/_cffi_backend/ccallback.py
nanjekyejoannah/pypy
333
1683473
from __future__ import annotations """ Callbacks. """ import sys, os, py from rpython.rlib import clibffi, jit, objectmodel from rpython.rlib.objectmodel import keepalive_until_here from rpython.rtyper.lltypesystem import lltype, rffi from pypy.interpreter.error import OperationError, oefmt from pypy.module._cffi_bac...
0
9
4
0
13
0
Z - Tool Box/LaZagne/Linux/lazagne/softwares/sysadmin/docker.py
dfirpaul/Active-Directory-Exploitation-Cheat-Sheet-1
1,290
1683489
<reponame>dfirpaul/Active-Directory-Exploitation-Cheat-Sheet-1 #!/usr/bin/env python # -*- coding: utf-8 -*- import json import os from lazagne.config.module_info import ModuleInfo from lazagne.config import homes class Docker(ModuleInfo): def __init__(self): ModuleInfo.__init__(self, 'docker', 'sysadmin...
0
0
0
0
0
0
Numbers/factorial_of_a_number.py
jahnvisrivastava100/CompetitiveProgrammingQuestionBank
931
1683510
<filename>Numbers/factorial_of_a_number.py '''Program to find the factorial of a number using recursion''' #Taking number from user and finding its factorial using loop n = int(input()) fact=1 for i in range(1,n+1): fact*=i print(fact)
0
0
0
0
0
0
tools/module_generator/clang_translation_unit_visitor.py
acrop/iotjs
2,081
1683533
<reponame>acrop/iotjs #!/usr/bin/env python # Copyright 2019-present Samsung Electronics Co., Ltd. and other contributors # # 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
tfx/orchestration/config/pipeline_config.py
avelez93/tfx
1,813
1683535
<filename>tfx/orchestration/config/pipeline_config.py # Copyright 2019 Google LLC. 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/...
0
0
0
0
0
0
example/server/views.py
tredzko/python-django
103
1683556
<reponame>tredzko/python-django from django.shortcuts import render from django.http import HttpResponse from django.conf import settings import opentracing tracing = settings.OPENTRACING_TRACING # Create your views here. def server_index(request): return HttpResponse("Hello, world. You're at the server index."...
0
0
0
0
0
0
btools/building/roof/__init__.py
proteanblank/building_tool
559
1683574
<gh_stars>100-1000 import bpy from .roof import Roof from .roof_ops import BTOOLS_OT_add_roof from .roof_props import RoofProperty classes = (RoofProperty, BTOOLS_OT_add_roof) register_roof, unregister_roof = bpy.utils.register_classes_factory(classes)
0
0
0
0
0
0
landlab/components/landslides/__init__.py
amanaster2/landlab
257
1683581
<reponame>amanaster2/landlab<gh_stars>100-1000 from .landslide_probability import LandslideProbability __all__ = ["LandslideProbability"]
0
0
0
0
0
0
filprofiler/tests/__init__.py
whalesalad/filprofiler
521
1683587
<reponame>whalesalad/filprofiler """Unit tests for filprofiler."""
0
0
0
0
0
0
deepposekit/models/layers/convolutional.py
morbitech1/DeepPoseKit
287
1683599
<reponame>morbitech1/DeepPoseKit<filename>deepposekit/models/layers/convolutional.py # -*- coding: utf-8 -*- # Copyright 2018-2019 <NAME> <<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 Licens...
0
0
0
0
0
0
docs/source/conf.py
xwyzsn/solo-learn
693
1683602
<reponame>xwyzsn/solo-learn<filename>docs/source/conf.py<gh_stars>100-1000 # Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path se...
0
0
0
0
0
0
intro/matplotlib/examples/plot_plot3d-2.py
negm/scipy-lecture-notes
419
1683620
""" 3D plotting ============ Demo 3D plotting with matplotlib and style the figure. """ import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import axes3d ax = plt.gca(projection='3d') X, Y, Z = axes3d.get_test_data(0.05) cset = ax.contourf(X, Y, Z) ax.clabel(cset, fontsize=9, inline=1) plt.xticks(()) plt.ytic...
0
0
0
0
0
0
models/Asoftmax_linear.py
mmaaz60/DCL
556
1683624
<reponame>mmaaz60/DCL<filename>models/Asoftmax_linear.py import torch import torch.nn as nn from torch.autograd import Variable import torch.nn.functional as F from torch.nn import Parameter import math def myphi(x,m): x = x * m return 1-x**2/math.factorial(2)+x**4/math.factorial(4)-x**6/math.factorial(6) + \ ...
0
0
0
0
0
0
utils/geometry_np.py
iamreallyi9/cd
1,205
1683636
<reponame>iamreallyi9/cd #!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. import numpy as np from typing import Tuple def reproject(pts3d: np.ndarray, extr: np.ndarray) -> np.ndarray: assert pts3d.shape[0] == extr.shape[0] and pts3d.shape[0] == 3 p_dim, _ = pts3d.shape R, t = ext...
0
0
0
0
0
0
iommi/_db_compat__tests.py
flying-sausages/iommi
192
1683652
<gh_stars>100-1000 import pytest from tri_struct import merged from iommi._db_compat import field_defaults_factory @pytest.mark.django def test_field_defaults_factory(): from django.db import models base = dict(parse_empty_string_as_none=True, required=True, display_name=None) assert field_defaults_fac...
0
0
0
0
0
0
plugins/digitalocean/test/fixtures/projectresources.py
someengineering/resoto
126
1683663
<reponame>someengineering/resoto project_resources = [ { "urn": "do:loadbalancer:9625f517-75f0-4af8-a336-62374e68dc0d", "assigned_at": "2022-03-10T16:27:58.728298Z", "links": { "self": "https://api.digitalocean.com/v2/load_balancers/9625f517-75f0-4af8-a336-62374e68dc0d" }...
0
0
0
0
0
0
model-optimizer/extensions/middle/TensorIteratorLSTMToLSTMSequence.py
monroid/openvino
2,406
1683724
<gh_stars>1000+ # Copyright (C) 2018-2021 Intel Corporation # SPDX-License-Identifier: Apache-2.0 from extensions.middle.ONNXRNNSequenceNormalize import ONNXRNNSequenceNormalize from extensions.middle.TF_lstm_cell_to_generic import TensorFlowLSTMtoGeneric from extensions.middle.TensorIteratorMerge import TensorIterato...
0
0
0
0
0
0
channel-aa/channel-aa.py
asterisk/ari-examples
102
1683743
#!/usr/bin/env python import ari import logging import threading logging.basicConfig(level=logging.ERROR) client = ari.connect('http://localhost:8088', 'asterisk', 'asterisk') # Note: this uses the 'extra' sounds package sounds = ['press-1', 'or', 'press-2'] channel_timers = {} class MenuState(object): """A s...
0
0
0
0
0
0
sleap/nn/config/model.py
hectorcarrion/sleap
156
1683748
<filename>sleap/nn/config/model.py import attr from typing import Optional, Text, List, Sequence, Tuple from sleap.nn.config.utils import oneof @attr.s(auto_attribs=True) class SingleInstanceConfmapsHeadConfig: """Configurations for single instance confidence map heads. These heads are used in single instanc...
0
0
0
0
0
0
tests/core/test_relayer.py
mazimcoder/pyatv
532
1683757
<gh_stars>100-1000 """Unit tests for pyatv.core.relayer.""" import pytest from pyatv import exceptions from pyatv.const import Protocol from pyatv.core.relayer import Relayer @pytest.fixture def relay_base_only(): relayer = Relayer(BaseClass, [Protocol.MRP]) relayer.register(SubClass1(), Protocol.MRP) yi...
0
0
0
0
0
0
pyscf/grad/roks.py
QuESt-Calculator/pyscf
501
1683767
<filename>pyscf/grad/roks.py #!/usr/bin/env python # Copyright 2014-2019 The PySCF Developers. 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.o...
0
0
0
0
0
0
lldb/test/API/lang/c/set_values/TestSetValues.py
LaudateCorpus1/llvm-project
605
1683790
<reponame>LaudateCorpus1/llvm-project """Test settings and readings of program variables.""" import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil class SetValuesTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) def setUp(...
0
0
0
0
0
0
poshc2/client/Opsec.py
RustyBower/PoshC2
1,504
1683873
<reponame>RustyBower/PoshC2 # Powershell Implant ps_opsec = ["whoami", "net", "netstat", "ipconfig", "powershell", "netsh", "invoke-shellcode", "nltest", "cmd"]
0
0
0
0
0
0
Chapter07/pygal_1.py
stavsta/Mastering-Python-Networking-Second-Edition
107
1683876
<gh_stars>100-1000 #!/usr/bin/env python3 import pygal x_time = [] out_octets = [] out_packets = [] in_octets = [] in_packets = [] with open('results.txt', 'r') as f: for line in f.readlines(): # eval(line) reads in each line as dictionary instead of string line = eval(line) x_time.append...
0
0
0
0
0
0
qpython/qconnection.py
atf1206/qPython
135
1683877
<gh_stars>100-1000 # # Copyright (c) 2011-2014 Exxeleron GmbH # # 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 app...
0
0
0
0
0
0
tests/basics/array_construct2.py
learnforpractice/micropython-cpp
692
1683879
<reponame>learnforpractice/micropython-cpp try: from array import array except ImportError: print("SKIP") raise SystemExit # construct from something with unknown length (requires generators) print(array('i', (i for i in range(10))))
0
0
0
0
0
0
mpi4jax/_src/collective_ops/recv.py
Thenerdstation/mpi4jax
122
1683885
<filename>mpi4jax/_src/collective_ops/recv.py import numpy as _np from mpi4py import MPI as _MPI from jax import abstract_arrays, core from jax.core import Primitive from jax.interpreters import xla from jax.lax import create_token from jax.lib import xla_client from ..utils import ( HashableMPIType, default_...
0
0
0
0
0
0
appointment-conflicts/appointment_conflicts.py
saneravi/ML_Stuff
209
1683888
#!/usr/bin/env python """Coding challenge to find all conflicts of a list of appointments.""" class Appointment: """ An appointment. Parameters ---------- name : str Describe what the appointment is about. start : int end : int """ def __init__(self, name, start, end): ...
0
4
0
0
4
0
pglast/printers/dml.py
fentik/pglast
179
1683903
# -*- coding: utf-8 -*- # :Project: pglast -- Printer functions for SQL DML nodes # :Created: sab 05 ago 2017 16:34:08 CEST # :Author: <NAME> <<EMAIL>> # :License: GNU General Public License version 3 or later # :Copyright: © 2017, 2018, 2019, 2020, 2021 <NAME> # from .. import enums from ..node import Missin...
2
4
0
0
6
0
guacozy_server/backend/migrations/0014_ticketlog_ip.py
yinm8315/guacozy-django-react
121
1683909
# Generated by Django 2.2.6 on 2019-10-24 18:02 from django.db import migrations, models class Migration(migrations.Migration): dependencies: list[tuple[str, str]] = [ ('backend', '0013_appsettings_ignore_rdp_cert_by_default'), ] operations: list[object] = [ migrations.AddField( ...
0
0
2
0
2
0
model.py
frrabelo/neural-instrument-cloning
114
1683922
<filename>model.py from typing import Dict, Text import ddsp import tensorflow as tf def get_model(SAMPLE_RATE,CLIP_S,FT_FRAME_RATE,Z_SIZE,N_INSTRUMENTS,IR_DURATION,BIDIRECTIONAL,USE_F0_CONFIDENCE,N_HARMONICS,N_NOISE_MAGNITUDES): class CustomRnnFcDecoder(ddsp.training.nn.OutputSplitsLayer): """RNN and F...
0
0
0
0
0
0
src/blockchain/azext_blockchain/vendored_sdks/blockchain/aio/_blockchain_management_client_async.py
Mannan2812/azure-cli-extensions
207
1683942
# coding=utf-8 # -------------------------------------------------------------------------- # 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 ...
4
4
0
0
8
0
inkscopeCtrl/inkscopeCtrlcore.py
ghisl1/inkscope
200
1683953
# <NAME> # <NAME> # 03/24/2014 # 2015-12 <NAME>: add login security (inspired from http://thecircuitnerd.com/flask-login-tokens/) from flask import Flask, Response, redirect from flask_login import (LoginManager, login_required, login_user, current_user, logout_user, UserMixin) from itsdange...
0
0
0
0
0
0
colorization/fusion_layer.py
AltumTek/deep-koalarization
413
1683989
from __future__ import annotations from keras import backend as K from keras.engine import Layer class FusionLayer(Layer): def call(self, inputs, mask: object | None=None) -> object: imgs, embs = inputs reshaped_shape = imgs.shape[:3].concatenate(embs.shape[1]) embs = K.repeat(embs, imgs.s...
1
2
0
0
3
0
qiime2/sdk/usage.py
qiime2/qiime2
334
1683995
# ---------------------------------------------------------------------------- # Copyright (c) 2016-2021, QIIME 2 development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. # ------------------------------------------------...
14
41
3
2
60
0
querybook/server/tasks/run_query.py
shivammmmm/querybook
1,144
1684023
<reponame>shivammmmm/querybook import traceback import datetime from celery.contrib.abortable import AbortableTask from celery.exceptions import SoftTimeLimitExceeded from celery.utils.log import get_task_logger from app.db import with_session, DBSession from app.flask_app import celery from const.query_execution impo...
0
0
0
0
0
0
tests/components/webostv/__init__.py
mtarjoianu/core
30,023
1684034
"""Tests for the WebOS TV integration.""" from homeassistant.components.webostv.const import DOMAIN from homeassistant.const import CONF_CLIENT_SECRET, CONF_HOST from homeassistant.setup import async_setup_component from .const import CLIENT_KEY, FAKE_UUID, HOST, TV_NAME from tests.common import MockConfigEntry as...
0
1
0
0
1
0
nmtpytorch/layers/decoders/conditionalmm.py
tejas1995/nmtpytorch
420
1684044
# -*- coding: utf-8 -*- from __future__ import annotations import torch.nn.functional as F from ...utils.nn import get_rnn_hidden_state from ..attention import HierarchicalAttention, UniformAttention, get_attention from .. import Fusion from . import ConditionalDecoder class ConditionalMMDecoder(ConditionalDecoder):...
5
1
0
2
8
0
python/examples/billiard_optimization.py
Pandinosaurus/tiny-differentiable-simulator
862
1684102
#this is an example of using auto diff gradients versus finite differences #note that the example is not very efficient, due to forward mode differentiation and inefficient dual number implementation. #so finite differences performs very similar to forward mode auto differentiation in this example. #using an efficient...
2
3
0
0
5
0
rn.py
butterluo/MHGRN
196
1684103
import random from multiprocessing import cpu_count from transformers import (ConstantLRSchedule, WarmupLinearSchedule, WarmupConstantSchedule) from modeling.modeling_rn import * from utils.optimization_utils import OPTIMIZER_CLASSES from utils.parser_utils import * from utils.relpath_utils import * def get_node_fe...
0
4
0
0
4
0
test/hlt/pytest/python/com/huawei/iotplatform/client/invokeapiTest/BatchProcessTest.py
yuanyi-thu/AIOT-
128
1684132
import json from com.huawei.iotplatform.client.invokeapi.Authentication import Authentication from com.huawei.iotplatform.client.invokeapi.BatchProcess import BatchProcess from com.huawei.iotplatform.client.dto.AuthOutDTO import AuthOutDTO from com.huawei.iotplatform.client.dto.BatchTaskCreateInDTO import BatchTaskCr...
0
2
0
0
2
0
wtpy/apps/datahelper/DHDefs.py
NoTravel/wtpy
164
1684133
from datetime import datetime class DBHelper: def __init__(self): pass def initDB(self): ''' 初始化数据库,主要是建表等工作 ''' pass def writeBars(self, bars:list, period: str="day"): ''' 将K线存储到数据库中\n @bars K线序列\n @period K线周期 ...
20
0
0
1
21
0
piwheels/audit/__init__.py
jgillis/piwheels
120
1684140
<reponame>jgillis/piwheels # The piwheels project # Copyright (c) 2017 <NAME> <https://github.com/bennuttall> # Copyright (c) 2017 <NAME> <<EMAIL>> # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistrib...
0
0
0
0
0
0
idaes/power_generation/unit_models/helm/turbine_multistage.py
carldlaird/idaes-pse
112
1684148
<reponame>carldlaird/idaes-pse ################################################################################# # The Institute for the Design of Advanced Energy Systems Integrated Platform # Framework (IDAES IP) was produced under the DOE Institute for the # Design of Advanced Energy Systems (IDAES), and is copyright...
0
0
0
0
0
0
froide/foirequestfollower/tasks.py
xenein/froide
198
1684153
<filename>froide/foirequestfollower/tasks.py<gh_stars>100-1000 from django.utils import translation from django.conf import settings from froide.celery import app as celery_app from froide.foirequest.models import FoiRequest from .models import FoiRequestFollower from .utils import run_batch_update @celery_app.task...
0
0
0
0
0
0
datawig/iterators.py
tirkarthi/datawig
374
1684183
<gh_stars>100-1000 # Copyright 2018 Amazon.com, Inc. or its affiliates. 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. A copy of the License # is located at # # http://aws.amazon.com/apache2.0/ # # or in the...
0
0
0
0
0
0
nlu/components/utils/deep_sentence_detector/sentence_detector.py
milyiyo/nlu
480
1684188
<reponame>milyiyo/nlu from sparknlp.annotator import * class SparkNLPDeepSentenceDetector: @staticmethod def get_default_model(): return SentenceDetectorDLModel.pretrained() \ .setInputCols(["document"]) \ .setOutputCol("sentence")
0
0
0
0
0
0
tests/integration/test_translation_patterns.py
asmeurer/nikola
1,901
1684191
<reponame>asmeurer/nikola<gh_stars>1000+ """Check that the path.lang.ext TRANSLATIONS_PATTERN works too""" import os import shutil import pytest import nikola.plugins.command.init from nikola import __main__ from .helper import cd, patch_config from .test_empty_build import ( # NOQA test_archive_exists, te...
0
0
0
0
0
0
01_generate_data.py
nicksawhney/world-models
241
1684197
# xvfb-run -s "-screen 0 1400x900x24" python 01_generate_data.py car_racing --total_episodes 4000 --time_steps 300 import numpy as np import random import config #import matplotlib.pyplot as plt from env import make_env import argparse DIR_NAME = './data/rollout/' def main(args): env_name = args.env_name ...
0
0
0
0
0
0
terrascript/resource/techBeck03/guacamole.py
mjuenema/python-terrascript
507
1684207
<reponame>mjuenema/python-terrascript # terrascript/resource/techBeck03/guacamole.py # Automatically generated by tools/makecode.py (24-Sep-2021 15:17:53 UTC) import terrascript class guacamole_connection_group(terrascript.Resource): pass class guacamole_connection_kubernetes(terrascript.Resource): pass c...
0
0
0
0
0
0
eosfactory/core/cleos.py
kdmukai/eosfactory
255
1684234
<filename>eosfactory/core/cleos.py<gh_stars>100-1000 import subprocess import json import pathlib import random import os import re import eosfactory.core.errors as errors import eosfactory.core.logger as logger import eosfactory.core.config as config import eosfactory.core.setup as setup import eosfactory.core.interf...
0
0
0
0
0
0
analysis/checks/collection/network_checks.py
leozz37/makani
1,178
1684260
# Copyright 2020 Makani Technologies LLC # # 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...
1
3
0
4
8
0
filterplot.py
lesseradmin/raisr
546
1684270
<reponame>lesseradmin/raisr<gh_stars>100-1000 import numpy as np from matplotlib import pyplot as plt def filterplot(h, R, Qangle, Qstrength, Qcoherence, patchsize): for pixeltype in range(0,R*R): maxvalue = h[:,:,:,pixeltype].max() minvalue = h[:,:,:,pixeltype].min() fig = plt.figure(pixel...
0
0
0
0
0
0
claf/config/args.py
DongjunLee/claf
225
1684276
<gh_stars>100-1000 import argparse from argparse import RawTextHelpFormatter import os import sys import torch from claf import nsml from claf.config import utils from claf.config.namespace import NestedNamespace from claf.learn.mode import Mode def config(argv=None, mode=None): if argv is None: argv =...
0
0
0
0
0
0
mathml/tools/use-typo-lineheight.py
spao234/wpt
575
1684278
<filename>mathml/tools/use-typo-lineheight.py #!/usr/bin/python from __future__ import print_function import fontforge font = fontforge.font() font.em = 1000 typoLineHeight = 2300 winHeight = 5000 name = "font-lineheight%d-typolineheight%d" % (winHeight, typoLineHeight) font.fontname = name font.familyname = name fon...
0
0
0
0
0
0
quantifiedcode/backend/models/__init__.py
marcinguy/quantifiedcode
138
1684300
from checkmate.lib.models import (Issue, IssueOccurrence, IssueCategory, Diff, Snapshot, DiffIssueOccurrence, Projec...
0
0
0
0
0
0
lib/utils/__init__.py
knightoning/zkdash
748
1684324
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import annotations """ Copyright (c) 2014,掌阅科技 All rights reserved. 摘 要: 部分工具方法 创 建 者: WangLichao 创建日期: 2014-12-3 """ import time import inspect import sys from conf import log def toint(value, default: int=0) -> object: """转成 int 类别,避免异常 """...
6
8
0
0
14
0
tests/modules/process_test/try_execfile.py
arcivanov/coveragepy
2,254
1684325
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 # For details: https://github.com/nedbat/coveragepy/blob/master/NOTICE.txt from __future__ import annotations """Test file for run_python_file. This file is executed two ways:: $ coverage run try_execfile.py and:: $ python try_...
0
4
0
0
4
0
ai/models/pytorch/segmentationMasks/unet/_default_options.py
junxnone/aerial_wildlife_detection
166
1684358
''' Default configuration properties for PyTorch semantic segmentation models. May be overridden (also partially) by models subclassing the trainer, or else through the custom configuration loaded at runtime. 2020 <NAME> ''' DEFAULT_OPTIONS = { "general": { "image_size": [224, 224], ...
0
0
0
0
0
0
slack_bolt/async_app.py
hirosassa/bolt-python
504
1684367
<gh_stars>100-1000 """Module for creating asyncio based apps ### Creating an async app If you'd prefer to build your app with [asyncio](https://docs.python.org/3/library/asyncio.html), you can import the [AIOHTTP](https://docs.aiohttp.org/en/stable/) library and call the `AsyncApp` constructor. Within async apps, you...
0
0
0
0
0
0
mesh_tensorflow/utils_test.py
merrymercy/mesh
1,264
1684372
# coding=utf-8 # Copyright 2021 The Mesh 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
0
0
0
0
0
0
tools/pot/tools/frame_extractor/video_loader.py
pazamelin/openvino
2,406
1684376
# Copyright (C) 2020-2021 Intel Corporation # SPDX-License-Identifier: Apache-2.0 from cv2 import VideoCapture, CAP_PROP_FRAME_COUNT class VideoLoader: def __init__(self, video_file): self._frame_pointer = -1 self._video_file = video_file self._capture = VideoCapture(video_file) de...
0
2
0
0
2
0
plugins/modules/oci_devops_repository_file_lines_facts.py
slmjy/oci-ansible-collection
108
1684387
#!/usr/bin/python # Copyright (c) 2020, 2021 Oracle and/or its affiliates. # This software is made available to you under the terms of the GPL 3.0 license or the Apache 2.0 license. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Apache License v2.0 # See LICENSE.TXT for d...
0
2
0
0
2
0
plotting.py
jansona/evolving-simple-organisms
136
1684392
<filename>plotting.py from matplotlib import pyplot as plt from matplotlib.patches import Circle import matplotlib.lines as lines from math import sin from math import cos from math import radians #--- FUNCTIONS ----------------------------------------------------------------+ def plot_organism(x1, y1, theta, ax): ...
0
0
0
0
0
0
examples/hybrid_parallelism/atarashi/example/toy/main.py
sandyhouse/FleetX
170
1684393
<filename>examples/hybrid_parallelism/atarashi/example/toy/main.py<gh_stars>100-1000 # Copyright (c) 2018 PaddlePaddle 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 Lic...
0
0
0
0
0
0
lib/hachoir/wx/hex_view/file_cache.py
0x20Man/Watcher3
320
1684411
<reponame>0x20Man/Watcher3<filename>lib/hachoir/wx/hex_view/file_cache.py from functools import lru_cache class FileCache(object): CHUNKSIZE = 4096 def __init__(self, file): self.file = file self.update_file_size() def update_file_size(self): pos = self.file.tell() self....
0
0
0
0
0
0
venv/Lib/site-packages/networkx/algorithms/approximation/maxcut.py
amelliaaas/tugastkc4
10,024
1684437
from __future__ import annotations import networkx as nx from networkx.utils.decorators import py_random_state, not_implemented_for __all__ = ["randomized_partitioning", "one_exchange"] @not_implemented_for("directed", "multigraph") @py_random_state(1) def randomized_partitioning(G, seed: object | None=None, p: floa...
6
3
0
0
9
0
tractseg/experiments/base_legacy/tract_seg_legacy.py
inaccel/TractSeg
148
1684440
from tractseg.data import dataset_specific_utils from tractseg.experiments.base import Config as BaseConfig class Config(BaseConfig): EXPERIMENT_TYPE: str = "tract_segmentation" # CLASSES = "AutoPTX" # NR_OF_CLASSES = len(dataset_specific_utils.get_bundle_names(CLASSES)[1:]) LR_SCHEDULE: bool = Fa...
0
0
2
0
2
0
das/parsers/nmap.py
bbhunter/DivideAndScan
161
1684457
from das.parsers import IAddPortscanOutput class AddPortscanOutput(IAddPortscanOutput): """Child class for processing Nmap output.""" def parse(self) -> tuple[object, object]: """ Nmap raw output parser. :return: a pair of values (portscan raw output filename, number of hosts added to DB) :rtype: tuple ...
0
1
0
0
1
0
graphgallery/nn/layers/tensorflow/conv/__init__.py
EdisonLeeeee/GraphGallery
300
1684470
from .gcn import GCNConv from .sgc import SGConv from .gat import GATConv from .gwnn import WaveletConv from .robustgcn import GaussionConvF, GaussionConvD from .graphsage import SAGEAggregator, GCNAggregator from .chebynet import ChebConv from .densegcn import DenseConv from .lgcn import LGConv from .edgeconv...
0
0
0
0
0
0
InvenTree/company/migrations/0008_auto_20190913_1407.py
ArakniD/InvenTree
656
1684489
<filename>InvenTree/company/migrations/0008_auto_20190913_1407.py # Generated by Django 2.2.5 on 2019-09-13 14:07 import InvenTree.fields from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('company', '0007_remove_supplierpart_lead_time'), ] operations = [ ...
0
0
0
0
0
0
Video-Audio-Converter-GUI/converter.py
avinashkranjan/PraticalPythonProjects
930
1684536
from tkinter import * from moviepy.editor import VideoFileClip from moviepy.editor import AudioFileClip from tkinter import filedialog from tkinter import messagebox from tkinter import ttk import threading # Variables for video and audio files video_file = '' audio_file = '' def get_video_file(): """ Functi...
0
0
0
0
0
0
tests/test_5_adding_functions_to_the_mix.py
knittl/diy-lang
108
1684546
<filename>tests/test_5_adding_functions_to_the_mix.py<gh_stars>100-1000 # -*- coding: utf-8 -*- from nose.tools import assert_equals, assert_raises_regexp, \ assert_raises, assert_true, assert_is_instance from diylang.ast import is_list from diylang.evaluator import evaluate from diylang.parser import parse from ...
0
0
0
0
0
0
test/unit/applications/lang/ruby.py
leeyangjie/unit
2,633
1684569
<filename>test/unit/applications/lang/ruby.py import shutil from unit.applications.proto import TestApplicationProto from unit.option import option from unit.utils import public_dir class TestApplicationRuby(TestApplicationProto): application_type = "ruby" def prepare_env(self, script): shutil.copyt...
0
0
0
0
0
0
Python/libraries/recognizers-number-with-unit/recognizers_number_with_unit/number_with_unit/__init__.py
AhmedLeithy/Recognizers-Text
688
1684595
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. from .number_with_unit_recognizer import * from .constants import * from .models import * from .extractors import * from .parsers import * from .chinese import *
0
0
0
0
0
0
11_Chapter_11/compressing_text/text_example_trie_load_only.py
Mikma03/High-performance-Python
223
1684602
<reponame>Mikma03/High-performance-Python import time import timeit import text_example import memory_profiler import marisa_trie if __name__ == "__main__": print("RAM at start {:0.1f}MiB".format(memory_profiler.memory_usage()[0])) print("RAM before loading from disk {:0.1f}MiB".format(memory_profiler.memory_...
0
0
0
0
0
0
cli/src/pcluster/aws/s3.py
Chen188/aws-parallelcluster
415
1684625
<filename>cli/src/pcluster/aws/s3.py # Copyright 2021 Amazon.com, Inc. or its affiliates. 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. A copy of the License is located at # # http://aws.amazon.com/apache2.0/ #...
0
0
0
0
0
0
lemminflect/kmodels/ModelInflInData.py
danielplatt/LemmInflect
157
1684628
import numpy from ..codecs.InflTCorpFileCodec import InflTCorpFileCodec from ..slexicon.SKey import * class ModelInflInData(object): WVEC_LEN: int = 9 # keep 8 letters from the lemma + 1 for the category MAX_LETTER_IDX: int = 28 # a-z plus <oov> and <> def __init__(self, fn): self.ent...
0
2
2
0
4
0
padasip/filters/__init__.py
huangshunliang/padasip
194
1684639
""" .. versionadded:: 0.1 .. versionchanged:: 0.7 An adaptive filter is a system that changes its adaptive parameteres - adaptive weights :math:`\\textbf{w}(k)` - according to an optimization algorithm. The an adaptive filter can be described as :math:`y(k) = w_1 \cdot x_{1}(k) + ... + w_n \cdot x_{n}(k)`, or in a...
2
2
0
0
4
0
python/akg/ops/math/ascend/batch_norm.py
tianjiashuo/akg
286
1684658
# Copyright 2019-2021 Huawei Technologies Co., Ltd # # 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 agre...
2
1
0
0
3
0
gcloud/core/migrations/0021_auto_20210125_1943.py
wkma/bk-sops
881
1684667
<gh_stars>100-1000 # Generated by Django 2.2.6 on 2021-01-25 11:43 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("core", "0020_auto_20200908_2030"), ] operations = [ migrations.AlterModelOptions( name="business", ...
0
0
0
0
0
0
solutions/LeetCode/Python3/1121.py
timxor/leetcode-journal
854
1684668
<gh_stars>100-1000 __________________________________________________________________________________________________ class Solution: def canDivideIntoSubsequences(self, nums: List[int], K: int) -> bool: n=len(nums);tmp=1 for i in range(1,n): if nums[i]!=nums[i-1]: if tmp...
0
0
0
0
0
0
python/tvm/micro/testing/aot_test_utils.py
shengxinhu/tvm
4,640
1684677
# 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 # "License"); you may not u...
0
1
0
0
1
0
bigfishgames_com__hidden_object/find__Saga_of_the_Nine_Worlds__CE.py
gil9red/SimplePyScripts
117
1684683
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = 'ipetrash' from typing import List from get_all_games import get_all_games def get_games() -> List[str]: prefix = "Saga of the Nine Worlds" postfix = "Collector's Edition" return get_all_games(prefix=prefix, postfix=postfix) if __name__ == ...
0
1
0
0
1
0
python/ts/flint/serializer.py
mattomatic/flint
972
1684691
<reponame>mattomatic/flint<gh_stars>100-1000 # # Copyright 2018 TWO SIGMA OPEN SOURCE, LLC # # 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
codigo/Live115/observer_funcoes.py
cassiasamp/live-de-python
572
1684706
class Observavel: def __init__(self): self._observers: list[object] = [] def adicionar_observer(self, observador): self._observers.append(observador) def notificar_observers(self, mensagem): for observador in self._observers: observador(mensagem) def observador_email(...
0
0
0
1
1
0
fuzzers/074-dump_all/generate_ignore_list.py
rw1nkler/prjxray
583
1684709
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright (C) 2017-2020 The Project X-Ray Authors. # # Use of this source code is governed by a ISC-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/ISC # # SPDX-License-Identifier: ISC import json with open('output/error_...
0
0
0
0
0
0