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
automig/lib/sa_harness.py
abe-winter/automigrate
336
155410
#!/usr/bin/env python3 "sa_harness.py -- create sqlalchemy definitions from create table & index stmts" import glob, collections, argparse import sqlparse from . import wrappers, diffing PREAMBLE = """# autogenerated by sa_harness.py import enum, sqlalchemy as sa from sqlalchemy.dialects.postgresql import UUID, JSONB...
1
5
0
0
6
0
style_paraphrase/schedule.py
llMuShu/NEW_repstp
138
155416
from __future__ import annotations import collections import datetime import itertools import os import subprocess from hyperparameters_config import (paraphrase, inverse_paraphrase) class SafeDict(dict): def __missing__(self, key) -> object: return '{' + key + '}' def get_run_id() -> int | object: ...
0
2
0
0
2
0
AutotestWebD/all_models/models/A0013_ui_test.py
yangjourney/sosotest
422
155420
# This is an auto-generated Django model module. # You'll have to do the following manually to clean this up: # * Rearrange models' order # * Make sure each model has one field with primary_key=True # * Make sure each ForeignKey has `on_delete` set to the desired behavior. # * Remove `managed = False` lines if ...
0
0
4
0
4
0
crabageprediction/venv/Lib/site-packages/matplotlib/tests/test_cycles.py
13rianlucero/CrabAgePrediction
603
155451
import matplotlib as mpl import matplotlib.pyplot as plt import numpy as np import pytest from cycler import cycler def test_colorcycle_basic(): fig, ax = plt.subplots() ax.set_prop_cycle(cycler('color', ['r', 'g', 'y'])) for _ in range(4): ax.plot(range(10), range(10)) assert [l.get_color() ...
0
0
0
0
0
0
deepxde/backend/tensorflow_compat_v1/__init__.py
mitchelldaneker/deepxde
955
155472
<filename>deepxde/backend/tensorflow_compat_v1/__init__.py<gh_stars>100-1000 import os os.environ["TF_FORCE_GPU_ALLOW_GROWTH"] = "true" from .tensor import * # pylint: disable=redefined-builtin
0
0
0
0
0
0
evennia/scripts/__init__.py
Jaykingamez/evennia
1,544
155474
<filename>evennia/scripts/__init__.py """ This sub-package holds the Scripts system. Scripts are database entities that can store data both in connection to Objects and Accounts or globally. They may also have a timer-component to execute various timed effects. """
0
0
0
0
0
0
sympy/calculus/singularities.py
dqnykamp/sympy
319
155482
from sympy.solvers import solve from sympy.simplify import simplify def singularities(expr, sym) -> tuple[object, ...]: """ Finds singularities for a function. Currently supported functions are: - univariate real rational functions Examples ======== >>> from sympy.calculus.singularities ...
0
1
0
0
1
0
examples/oagbert/oagbert.py
cenyk1230/cogdl
1,072
155484
import torch from cogdl import oagbert tokenizer, bert_model = oagbert() bert_model.eval() sequence = ["CogDL is developed by KEG, Tsinghua.", "OAGBert is developed by KEG, Tsinghua."] tokens = tokenizer(sequence, return_tensors="pt", padding=True) with torch.no_grad(): outputs = bert_model(**tokens) print(outp...
0
0
0
0
0
0
awacs/deeplens.py
alanjjenkins/awacs
358
155495
# Copyright (c) 2012-2021, <NAME> <<EMAIL>> # All rights reserved. # # See LICENSE file for full license. from .aws import Action as BaseAction from .aws import BaseARN service_name = "AWS DeepLens" prefix = "deeplens" class Action(BaseAction): def __init__(self, action: str = None) -> None: super().__i...
4
2
0
0
6
0
single_inference/inference.py
f0enix/mobilePydnet
182
155496
# Copyright 2020 <NAME> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, softw...
0
0
0
0
0
0
unit6/spiders/p1_pipeline/p1_pipeline/settings.py
nulearn3296/scrapy-training
182
155520
# -*- coding: utf-8 -*- BOT_NAME = 'p1_pipeline' SPIDER_MODULES = ['p1_pipeline.spiders'] NEWSPIDER_MODULE = 'p1_pipeline.spiders' ROBOTSTXT_OBEY = True # Configure item pipelines # See http://scrapy.readthedocs.org/en/latest/topics/item-pipeline.html ITEM_PIPELINES = { 'p1_pipeline.pipelines.DropNoTagsPipelin...
0
0
0
0
0
0
PCA/pca_completed.py
qasim683/Machine-Learning2
385
155553
from sklearn.decomposition import PCA import pandas as pd from sklearn.preprocessing import StandardScaler import matplotlib.pyplot as plt df = pd.read_csv("Iris.csv") labels = df['Species'] X = df.drop(['Id','Species'],axis=1) X_std = StandardScaler().fit_transform(X) pca = PCA(n_components=4) X_transform = p...
0
0
0
0
0
0
chainer_chemistry/models/mpnn.py
pfnet/chainerchem
184
155555
<filename>chainer_chemistry/models/mpnn.py from functools import partial from typing import Optional # NOQA import chainer from chainer import cuda, functions # NOQA from chainer_chemistry.config import MAX_ATOMIC_NUM from chainer_chemistry.links import EmbedAtomID from chainer_chemistry.links.readout.ggnn_readout ...
0
0
0
0
0
0
moldesign/orbitals/orbitals.py
Autodesk/molecular-design-toolkit
147
155593
<filename>moldesign/orbitals/orbitals.py """ Class definitions for atomic and molecular orbitals. Notes: In this documentation, we use the following conventions for labeling orbitals: - atomic orbitals using lower case greek labels and subscripts, e.g., :math:`\left| \mu \right \rangle, F_{\nu \lam...
0
0
0
0
0
0
TrainingExtensions/tensorflow/src/python/aimet_tensorflow/adaround/adaround_loss.py
lipovsek/aimet
945
155639
# /usr/bin/env python3.6 # -*- mode: python -*- # ============================================================================= # @@-COPYRIGHT-START-@@ # # Copyright (c) 2021, Qualcomm Innovation Center, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification,...
15
4
0
0
19
0
pydotorg/tests/test_classes.py
buketkonuk/pythondotorg
911
155644
<reponame>buketkonuk/pythondotorg from django.template import Template, Context from django.test import TestCase class TemplateTestCase(TestCase): def render_string(self, content, context): t = Template(content) return t.render(Context(context))
0
0
0
0
0
0
tests/test_features/test_base.py
mmorrison1670/yellowbrick
3,662
155649
<reponame>mmorrison1670/yellowbrick # tests.test_features.test_base # Tests for the feature selection and analysis base classes # # Author: <NAME> # Created: Fri Oct 07 13:43:55 2016 -0400 # # Copyright (C) 2016 The scikit-yb developers # For license information, see LICENSE.txt # # ID: test_base.py [2e898a6] <EMAIL...
0
0
0
0
0
0
intake/tests/test_utils.py
JessicaS11/intake
578
155653
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2018, Anaconda, Inc. and Intake contributors # All rights reserved. # # The full license is in the LICENSE file, distributed with this software. #------------------------------------------------------------------------...
0
1
0
0
1
0
tests/__init__.py
GluuFederation/redislite
572
155714
<gh_stars>100-1000 # Copyright (c) 2015, Yahoo Inc. # Copyrights licensed under the New BSD License # See the accompanying LICENSE.txt file for terms.
0
0
0
0
0
0
client/verta/tests/test_concurrency/test_concurrency.py
stefan-petrov-toptal/modeldb
835
155742
import six import multiprocessing import pytest from .run_functions import log_observation, upload_artifact from operator import itemgetter from functools import partial class TestConcurrency: def test_multiple_runs_log_obs(self, client) -> list[object]: client.set_project() client.set_experiment...
0
2
0
0
2
0
test/undo_redo.py
aronwoost/sublime-expand-region
205
155763
import unittest from expand_region_handler import * class UndoRedoTest(unittest.TestCase): def test_dont_crash_with_blank_json (self): settingsJson = '' newSettingsJson = add_to_stack(settingsJson, "teststring", 2, 3, 1, 1); newSettings = json.loads(newSettingsJson) self.assertEqual(newSettings.get...
0
0
0
0
0
0
reid/tlift.py
shengcailiao/QAConv
138
155769
import numpy as np import torch import math def TLift(in_score, gal_cam_id, gal_time, prob_cam_id, prob_time, num_cams, tau: int=100, sigma: int=200, K: int=10, alpha: float=0.2) -> object: """Function for the Temporal Lifting (TLift) method TLift is a model-free temporal cooccurrence based score weighting me...
4
1
0
0
5
0
model_compiler/src/model_compiler/compilers/keras_model_file_to_keras_model.py
yuanliya/Adlik
548
155778
<reponame>yuanliya/Adlik # Copyright 2019 ZTE corporation. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 import tensorflow as tf from tensorflow import keras from . import repository from .. import utilities from .. import keras_util from ..models.irs.keras_model import KerasModel from ..models.sources.k...
0
0
0
0
0
0
tests/test_provider_vmware_nsxt.py
mjuenema/python-terrascript
507
155791
# tests/test_provider_vmware_nsxt.py # Automatically generated by tools/makecode.py (24-Sep-2021 15:22:57 UTC) def test_provider_import(): import terrascript.provider.vmware.nsxt def test_resource_import(): from terrascript.resource.vmware.nsxt import nsxt_algorithm_type_ns_service from terrascript.res...
0
0
0
0
0
0
namedtensor/text/__init__.py
larslorch/namedtensor
410
155794
<gh_stars>100-1000 from .torch_text import NamedField __all__ = [NamedField]
0
0
0
0
0
0
examples/NeurIPS2020-Learning-to-Run-a-Power-Network-Challenge/track2/agent.py
lp2333/PARL
3,172
155832
# Copyright (c) 2020 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 License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
1
5
0
6
12
0
Stackless/demo/fakechannel.py
masamitsu-murase/stackless
854
155836
import stackless class MyChannel: def __init__(self): self.queue: list[object] = [] self.balance: int = 0 self.temp: None = None def send(self, data): if self.balance < 0: receiver = self.queue.pop(0) self.temp = data receiver.insert() ...
0
3
0
3
6
0
setup.py
voiski/pytago
206
155844
from distutils.core import setup with open('README.md', encoding='utf-8') as f: long_description = f.read() setup( name='pytago', version='0.0.12', packages=['pytago', 'pytago.go_ast'], url='https://github.com/nottheswimmer/pytago', license='', author='<NAME>', author_email='<EMAIL>', ...
0
0
0
0
0
0
samples/websocket/main.py
jdoconnor/quip-api
212
155862
#!/usr/bin/python2.7 # # Copyright Quip 2016 """Opens a websocket and listens for updates from Quip This is a sample app for the Quip API - https://quip.com/api/. """ import argparse import json import quip import sys import time import websocket PY3 = sys.version_info > (3,) if PY3: import _thread as thread el...
0
0
0
0
0
0
frame_2D_alg/alternative versions/LUT_generators.py
landdafku11/CogAlg
102
155910
<reponame>landdafku11/CogAlg """ Provide generators for lookup tables: - 'slice' objects for CogAlg comparisons. - Coefficients (weights) for CogAlg comparison """ # ----------------------------------------------------------------------------- # Imports import operator as op import numpy as np from functools import r...
0
0
0
0
0
0
tests/requirements/egg-info/setup.py
OliverHofkens/dephell
1,880
155923
<reponame>OliverHofkens/dephell<filename>tests/requirements/egg-info/setup.py<gh_stars>1000+ # built-in from io import open from os import path # external from setuptools import setup here = path.abspath(path.dirname(__file__)) with open(path.join(here, 'README.md'), encoding='utf-8') as f: long_description = f....
0
0
0
0
0
0
neural_compressor/adaptor/ox_utils/operators/attention.py
intel/neural-compressor
172
155935
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (c) 2021 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/LICENSE-2.0 # # Un...
0
0
0
0
0
0
tensorflow/contrib/data/python/kernel_tests/range_dataset_op_test.py
DEVESHTARASIA/tensorflow
384
155936
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
0
0
0
0
0
0
venv/Lib/site-packages/nipype/utils/__init__.py
richung99/digitizePlots
585
155937
# -*- coding: utf-8 -*- from .onetime import OneTimeProperty, setattr_on_read from .tmpdirs import TemporaryDirectory, InTemporaryDirectory
0
0
0
0
0
0
usaspending_api/references/tests/integration/test_load_rosetta.py
ststuck/usaspending-api
217
155973
# Stdlib imports import os # Core Django imports from django.core.management import call_command # Third-party app imports import pytest # Imports from your apps from usaspending_api.references.models import Rosetta @pytest.mark.django_db def test_rosetta_fresh_load(): test_file_path = os.path.abspath("usaspen...
0
0
0
0
0
0
stonesoup/updater/tests/test_kalman.py
Red-Portal/Stone-Soup-1
157
156005
# -*- coding: utf-8 -*- """Test for updater.kalman module""" import pytest import numpy as np from stonesoup.models.measurement.linear import LinearGaussian from stonesoup.types.detection import Detection from stonesoup.types.hypothesis import SingleHypothesis from stonesoup.types.prediction import ( GaussianState...
0
0
0
0
0
0
oslo/transformers/tasks/data_causal_lm.py
lipovsek/oslo
249
156022
<filename>oslo/transformers/tasks/data_causal_lm.py<gh_stars>100-1000 from typing import Dict, List, Optional from datasets.arrow_dataset import Batch from oslo.transformers.tasks.data_base import BaseProcessor try: from transformers.data.data_collator import _torch_collate_batch except ImportError: print("Y...
0
0
0
0
0
0
JetMETCorrections/MCJet/python/RelValQCD_cfi.py
ckamtsikis/cmssw
852
156023
<reponame>ckamtsikis/cmssw<filename>JetMETCorrections/MCJet/python/RelValQCD_cfi.py import FWCore.ParameterSet.Config as cms readFiles = cms.untracked.vstring() source = cms.Source ("PoolSource",fileNames = readFiles) readFiles.extend( ( " /store/relval/CMSSW_3_4_0_pre2/RelValQCD_FlatPt_15_3000/GEN-SIM-RECO...
0
0
0
0
0
0
tests/test_sessions.py
ssteo/pymetasploit3
286
156029
<gh_stars>100-1000 #!/usr/bin/env python3 import pytest import time import os from pymetasploit3.msfrpc import * @pytest.fixture() def client(): client = MsfRpcClient('123', port=55552) yield client client.call(MsfRpcMethod.AuthLogout) @pytest.fixture() def meterpreter_sid(client): s = client.sessio...
0
0
0
0
0
0
scripts/mk_qd.py
Bytedecode72/flashfloppy
847
156030
# mk_qd.py # # Make a blank QD (Quick Disk) image. # # Written & released by <NAME> <<EMAIL>> # # This is free and unencumbered software released into the public domain. # See the file COPYING for more details, or visit <http://unlicense.org>. import sys,struct,argparse def main(argv): parser = argparse.ArgumentPar...
0
0
0
0
0
0
preprocessing/preprocess_davis.py
linjieyangsc/video_seg
169
156059
<filename>preprocessing/preprocess_davis.py import os import sys from PIL import Image from sets import Set import numpy as np import cv2 data_dir = sys.argv[1] anno_dir = os.path.join(data_dir, 'Annotations/480p/') save_dir = os.path.join(data_dir, 'Annotations/480p_split/') save_dir_all = os.path.join(data_dir, 'Anno...
0
0
0
0
0
0
fuzzers/007-timing/routing-bels/tim2sdf.py
rw1nkler/prjxray
583
156068
<reponame>rw1nkler/prjxray<filename>fuzzers/007-timing/routing-bels/tim2sdf.py #!/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/lice...
0
0
0
0
0
0
esphome/components/tca9548a/__init__.py
OttoWinter/esphomeyaml
249
156118
<filename>esphome/components/tca9548a/__init__.py import esphome.codegen as cg import esphome.config_validation as cv from esphome.components import i2c from esphome.const import CONF_CHANNEL, CONF_CHANNELS, CONF_ID, CONF_SCAN CODEOWNERS = ["@andreashergert1984"] DEPENDENCIES = ["i2c"] tca9548a_ns = cg.esphome_ns.na...
0
0
0
0
0
0
osf_tests/test_schemas.py
gaybro8777/osf.io
628
156141
# -*- coding: utf-8 -*- from __future__ import annotations import pytest from osf.models import RegistrationSchema from osf.exceptions import ValidationValueError @pytest.mark.django_db class TestRegistrationSchema: @pytest.fixture() def schema_name(self) -> str: return 'Preregistration Template from...
0
8
0
0
8
0
tonic/torch/agents/__init__.py
Eyalcohenx/tonic
350
156185
<reponame>Eyalcohenx/tonic from .agent import Agent from .a2c import A2C # noqa from .ddpg import DDPG from .d4pg import D4PG # noqa from .mpo import MPO from .ppo import PPO from .sac import SAC from .td3 import TD3 from .trpo import TRPO __all__ = [Agent, A2C, DDPG, D4PG, MPO, PPO, SAC, TD3, TRPO]
0
0
0
0
0
0
tests/chem/magpie_python/utility/test_EqualSumCombinations.py
crazysal/chemml
108
156191
<gh_stars>100-1000 import unittest from chemml.chem.magpie_python.utility.EqualSumCombinations import EqualSumCombinations class testEqualSumCombinations(unittest.TestCase): def test_get_combinations(self): x = EqualSumCombinations(2, 2) self.assertTrue(len(x.get_combinations(2, 2)) == 3) x...
0
0
0
0
0
0
tests/lib/__init__.py
prashantmital/tox
2,811
156199
<reponame>prashantmital/tox import subprocess import pytest def need_executable(name, check_cmd): def wrapper(fn): try: subprocess.check_output(check_cmd) except OSError: return pytest.mark.skip(reason="{} is not available".format(name))(fn) return fn return w...
0
0
0
0
0
0
boto3_type_annotations_with_docs/boto3_type_annotations/managedblockchain/client.py
cowboygneox/boto3_type_annotations
119
156213
<reponame>cowboygneox/boto3_type_annotations<filename>boto3_type_annotations_with_docs/boto3_type_annotations/managedblockchain/client.py from typing import Optional from botocore.client import BaseClient from typing import Dict from botocore.paginate import Paginator from botocore.waiter import Waiter from typing impo...
0
0
0
0
0
0
tests/cli_tests/features/steps/steps_perf.py
tlalexander/stitchEm
182
156221
<filename>tests/cli_tests/features/steps/steps_perf.py from os import path as osp import re from subprocess import Popen import sys from behave import when, then, step_matcher # pylint: disable=E0611 from pyvs.vsperf import exec_and_monitor, ASSETS import csv import massedit step_matcher('re') CURDIR = osp.dirname...
0
0
0
0
0
0
src/api/dcps/python/test/TestSequenceOfSimpleArray.py
brezillon/opensplice
133
156260
# # Vortex OpenSplice # # This software and documentation are Copyright 2006 to TO_YEAR ADLINK # Technology Limited, its affiliated companies and licensors. All rights # reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in ...
0
0
0
0
0
0
Tools/JohnTheRipper-bleeding-jumbo/run/kerberom/kerberom.py
bourbon-hunter/OSCPRepo
2,109
156281
<reponame>bourbon-hunter/OSCPRepo # ---------------------------------------------------------------------------- # "THE BEER-WARE LICENSE" (Revision 42): # <jean-christophe.delaunay (at) synacktiv.com> wrote this file. As long as you # retain this notice you can do whatever you want with this stuff. If we meet # some ...
0
0
0
0
0
0
qf_lib/containers/time_indexed_container.py
webclinic017/qf-lib
198
156294
<reponame>webclinic017/qf-lib # Copyright 2016-present CERN – European Organization for Nuclear Research # # 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...
0
0
0
0
0
0
package/kedro_viz/__init__.py
kedro-org/kedro-viz
125
156309
"""Kedro plugin for visualising a Kedro pipeline""" __version__ = "4.7.0"
0
0
0
0
0
0
flash/template/classification/backbones.py
Actis92/lightning-flash
1,457
156370
<gh_stars>1000+ # Copyright The PyTorch Lightning 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://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
0
0
0
0
0
0
log.py
andy920262/Reinforcement-Learning-for-Self-Driving-Cars
120
156375
<gh_stars>100-1000 import csv import numpy as np log_reward_path = '/Users/songyanho/Developer/DeepTraffic/log' log_q_values_path = '/Users/songyanho/Developer/DeepTraffic/log' class Log: """ Base-class for logging data to a text-file during training. It is possible to use TensorFlow / TensorBoard for th...
0
0
0
0
0
0
data/__init__.py
muzhial/memae-anomaly-detection
297
156376
from __future__ import print_function, absolute_import from .video_datasets import *
0
0
0
0
0
0
reddit2telegram/channels/r_kamenrider/app.py
mainyordle/reddit2telegram
187
156381
<gh_stars>100-1000 #encoding:utf-8 subreddit = 'KamenRider' t_channel = '@r_KamenRider' def send_post(submission, r2t): return r2t.send_simple(submission)
0
0
0
0
0
0
kAFL-Fuzzer/fuzzer/process/slave.py
SafeBreach-Labs/hAFL2
102
156384
# Copyright 2017-2019 <NAME>, <NAME>, <NAME> # Copyright 2019-2020 Intel Corporation # # SPDX-License-Identifier: AGPL-3.0-or-later from __future__ import annotations """ kAFL Slave Implementation. Request fuzz input from Master and process it through various fuzzing stages/mutations. Each Slave is associated with a ...
3
9
0
0
12
0
redbot/formatter/__init__.py
gusdleon/redbot
167
156391
#!/usr/bin/env python """ Formatters for REDbot output. """ from collections import defaultdict from configparser import SectionProxy import inspect import locale import sys import time from typing import Any, Callable, List, Dict, Type, TYPE_CHECKING import unittest import thor from thor.events import EventEmitter...
17
17
5
0
39
0
keepercommander/commands/base.py
Keeper-Security/Commander
151
156416
# _ __ # | |/ /___ ___ _ __ ___ _ _ ® # | ' </ -_) -_) '_ \/ -_) '_| # |_|\_\___\___| .__/\___|_| # |_| # # <NAME> # Copyright 2018 Keeper Security Inc. # Contact: <EMAIL> # from __future__ import annotations import argparse import collections import shlex import logging import json import os import re...
8
8
0
2
18
0
homeassistant/components/uptimerobot/sensor.py
MrDelik/core
30,023
156425
<filename>homeassistant/components/uptimerobot/sensor.py """UptimeRobot sensor platform.""" from __future__ import annotations from typing import TypedDict from homeassistant.components.sensor import SensorEntity, SensorEntityDescription from homeassistant.config_entries import ConfigEntry from homeassistant.core imp...
0
0
0
0
0
0
sarenka/backend/api_searcher/search_engines/shodan_engine/wrappers/host_details_wrapper.py
adolabsnet/sarenka
380
156439
import re class HostDetailsWrapper: """Klasa pomocnicza - wrapper parsujacy dane z serwisu https://www.shodan.io/.""" def __init__(self, ip, host_details): self.__ip = ip self.__data = host_details @property def ip(self) -> object: """Atrybut zwracajacy adres ip hosta.""" ...
0
7
0
0
7
0
tests/nn/test_training.py
hectorcarrion/sleap
156
156454
<reponame>hectorcarrion/sleap<gh_stars>100-1000 import pytest import sleap sleap.use_cpu_only() @pytest.fixture def training_labels(min_labels): labels = min_labels labels.append( sleap.LabeledFrame( video=labels.videos[0], frame_idx=1, instances=labels[0].instances ) ) re...
0
0
0
0
0
0
code/doubanmusic.py
zefengdaguo/douban_crawler
116
156504
from bs4 import BeautifulSoup import re import time import requests headers0 = {'User-Agent':"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.62 Safari/537.36"} def Musappend(Mdict,Items): for it in Items: title=it('a')[0].get_text(strip=True) date=it(class_...
0
0
0
0
0
0
tests/arbpack/arbmod.py
mofm/pypyr
261
156505
"""arbmod.py just a sample module for use with tests.""" def arbmod_attribute(): """Do nothing.""" pass
0
0
0
0
0
0
ros/src/segmentation/scripts/configs.py
arunboson/self-driving-golf-cart
205
156534
<reponame>arunboson/self-driving-golf-cart # # config.py: configuration for semantic segmentation # (c) <NAME>, 2017 # All Rights Reserved. # batch_size = 8 img_height = 512 img_width = 1024 display_height = 512 display_width = 1024 nb_classes = 34 learning_rate = 1e-4 nb_epoch = 10
0
0
0
0
0
0
tests/units/test_safe_build.py
sbrunato/eodag
149
156546
# -*- coding: utf-8 -*- # Copyright 2021, CS GROUP - France, http://www.c-s.fr # # This file is part of EODAG project # https://www.github.com/CS-SI/EODAG # # 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...
0
6
0
0
6
0
bertkpe/generator/Rank2Phrase.py
kariswr/Multilingual-BERT-KPE
274
156553
<filename>bertkpe/generator/Rank2Phrase.py import logging import numpy as np from .generator_utils import remove_empty, remove_empty_phase, del_stemming_duplicate_phrase logger = logging.getLogger() def rank2phrase(examples, logit_lists, indices, stem_flag=False, return_num=None): batch_predictions = [] for ...
0
0
0
0
0
0
aesara/typed_list/__init__.py
fshart/aesara
111
156555
from . import opt from .basic import * from .type import TypedListType
0
0
0
0
0
0
english/simulation_scripts/stable_fluids_python_simple.py
bartdavids/machine-learning-and-simulation
110
156569
""" Solves the incompressible Navier Stokes equations using "Stable Fluids" by <NAME> in a closed box with a forcing that creates a bloom. Momentum: ∂u/∂t + (u ⋅ ∇) u = − 1/ρ ∇p + ν ∇²u + f Incompressibility: ∇ ⋅ u = 0 u: Velocity (2d vector) p: Pressure f: Forcing ν: Kinematic Viscosity ρ: Densit...
0
11
0
0
11
0
openproblems/data/multimodal/sample.py
bendemeo/SingleCellOpenProblems
134
156584
<reponame>bendemeo/SingleCellOpenProblems<gh_stars>100-1000 from ..utils import loader from .scicar.mouse_kidney import atac_cells_url from .scicar.mouse_kidney import atac_genes_url from .scicar.mouse_kidney import rna_cells_url from .scicar.mouse_kidney import rna_genes_url from .utils import create_joint_adata from ...
0
0
0
0
0
0
pyscf/df/grad/rks.py
QuESt-Calculator/pyscf
501
156597
#!/usr/bin/env python # # This code was copied from the data generation program of Tencent Alchemy # project (https://github.com/tencent-alchemy). # # # Copyright 2019 Tencent America LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in com...
8
4
0
1
13
0
clarifai/rest/grpc/proto/clarifai/utils/jsonpb/test_pb2.py
Taik/clarifai-python
322
156609
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: proto/clarifai/utils/jsonpb/test.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf im...
0
0
0
0
0
0
testing/MLDB-1267-bucketize-ts-test.py
kstepanmpmg/mldb
665
156646
# # MLDB-1267-bucketize-ts-test.py # Mich, 2015-11-16 # This file is part of MLDB. Copyright 2015 mldb.ai inc. All rights reserved. # import unittest from mldb import mldb class BucketizeTest(unittest.TestCase): def test_it(self): url = '/v1/datasets/input' mldb.put(url, { 'type' : 's...
0
0
0
0
0
0
test/native/github-actions/password_native.py
hugovk/pg8000
337
156703
<reponame>hugovk/pg8000 def test_password(con): """Called by GitHub Actions with auth method password. We just need to check that we can get a connection. """ pass
0
0
0
0
0
0
scripts/crimson_mutator/modules/url_encoding.py
upenderadepu/crimson
108
156704
# from url_encoding import make_url # full url encoding import urllib try: # Python2 and python3 comatible code from urllib.parse import urlparse except ImportError: from urlparse import urlparse def make_url(string) -> object: '''Encode every char in percentage format''' return "".join("%{0:0>2}".f...
0
4
0
0
4
0
pytest/test_class.py
KuangHaofei/pytorch-deepFEPE
112
156711
import os, sys sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) class TestClass: def test_import(self): import superpoint def test_DeepFNet(self): from deepFEPE.models.DeepFNet import main main() def test_ErrorEstimators(self): from deepF...
0
0
0
0
0
0
tests/test_boto3_storage.py
tcmike/depot
128
156721
# -*- coding: utf-8 -*- from __future__ import annotations import os import uuid import mock import requests from flaky import flaky from nose import SkipTest from depot._compat import PY2, unicode_text S3Storage = None FILE_CONTENT = b'HELLO WORLD' @flaky class TestS3FileStorage(object): @classmethod def ...
0
5
0
0
5
0
np_ml/hmm/hmm.py
wwwy-binary/NP_ML
237
156750
from __future__ import annotations import numpy as np class HMM: def __init__(self, A: object | None=None, B: object | None=None, pi: object | None=None): self.A = A self.B = B self.pi = pi def forward(self, O, detailed: bool=False) -> object: alpha = self.pi*self.B[:, O[0]] ...
4
3
0
0
7
0
ui/pypesvds/controllers/filters.py
onfire73/pypeskg
117
156779
<gh_stars>100-1000 import logging import json from pylons import request, response, session, tmpl_context as c from pylons import app_globals from pylons.controllers.util import abort from pypesvds.lib.base import BaseController, render log = logging.getLogger(__name__) class FiltersController(BaseController): "...
0
0
0
0
0
0
pgoapi/protos/pogoprotos/data/news/news_article_pb2.py
aroo135/pgoapi
842
156803
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: pogoprotos/data/news/news_article.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf i...
0
0
0
0
0
0
nengo/_vendor/scipy/sparse/sputils.py
Michaeljurado24/nengo
762
156822
from __future__ import annotations """ These are borrowed from SciPy and used under their license: Copyright (c) 2001, 2002 Enthought, Inc. All rights reserved. Copyright (c) 2003-2012 SciPy Developers. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitte...
0
6
0
0
6
0
salt/hg/files/hg/src/hglookup.py
verhovsky/psf-salt
103
156828
<filename>salt/hg/files/hg/src/hglookup.py # hglookup.py # # Lookup a revision hash in a bunch of different hgwebdir repos. # Also includes special treatment for subversion revisions from # the CPython repo. # # Written by <NAME>, 2010. # Updated by <NAME>, 2017. from __future__ import print_function import io import...
0
0
0
0
0
0
tests/commands/test_push.py
bigbitbus/opta
595
156837
<reponame>bigbitbus/opta import base64 from typing import Any, Dict, List import pytest from click.testing import CliRunner from pytest_mock import MockFixture from opta.cli import cli from opta.commands.push import ( get_acr_auth_info, get_ecr_auth_info, get_gcr_auth_info, get_registry_url, push_...
0
0
0
0
0
0
archivenow/handlers/is_handler.py
a-mabe/archivenow
320
156873
<filename>archivenow/handlers/is_handler.py<gh_stars>100-1000 import os import requests import sys from selenium.webdriver.firefox.options import Options from selenium import webdriver from selenium.webdriver.common.keys import Keys from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support...
0
0
0
0
0
0
moto/firehose/responses.py
gtourkas/moto
5,460
156881
"""Handles Firehose API requests, invokes method and returns response.""" import json from moto.core.responses import BaseResponse from .models import firehose_backends class FirehoseResponse(BaseResponse): """Handler for Firehose requests and responses.""" @property def firehose_backend(self) -> object...
0
11
0
0
11
0
alipay/aop/api/domain/ShopInfo.py
snowxmas/alipay-sdk-python-all
213
156886
<gh_stars>100-1000 #!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.constant.ParamConstants import * class ShopInfo(object): def __init__(self): self._shop_name = None self._shop_scene_pic = None self._shop_sign_board_pic = None @property def shop_na...
0
0
0
0
0
0
spimagine/models/__init__.py
funkelab/spimagine
116
156905
<gh_stars>100-1000 # from .keyframe_model import TransformData
0
0
0
0
0
0
examples/vm_scheduling/offline_lp/ilp_agent.py
yangboz/maro
598
156912
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. import numpy as np import timeit from collections import defaultdict, Counter from typing import List, Set from maro.data_lib import BinaryReader from maro.simulator.scenarios.vm_scheduling import PostponeAction, AllocateAction from maro.simulat...
11
1
1
6
19
0
backend/src/baserow/contrib/database/migrations/0007_datefield.py
cjh0613/baserow
839
156947
# Generated by Django 2.2.11 on 2020-05-26 10:23 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies: list[tuple[str, str]] = [ ('database', '0006_auto_20200522_1329'), ] operations: list[object] = [ migrations.Cr...
0
0
2
0
2
0
mint/core/fact_model_test.py
wqliu657/mint
241
156960
<gh_stars>100-1000 # Copyright 2021, Google 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 a...
0
0
0
0
0
0
pytorch-frontend/tools/codegen/api/types.py
AndreasKaratzas/stonne
206
156972
<gh_stars>100-1000 from tools.codegen.model import * from dataclasses import dataclass from typing import Optional, Union, Sequence # Represents the implicit *this argument for method calls in C++ API @dataclass(frozen=True) class ThisArgument: argument: Argument # Bundle of arguments that represent a TensorOptio...
0
0
0
0
0
0
onnxmltools/convert/coreml/operator_converters/neural_network/Multiply.py
xhochy/onnxmltools
623
156981
# SPDX-License-Identifier: Apache-2.0 from .....proto import onnx_proto from ....common._apply_operation import apply_mul from ....common._registration import register_converter def convert_multiply(scope, operator, container): if len(operator.input_full_names) == 1: # Multiply the input tensor by a scal...
0
0
0
0
0
0
examples/export_by_album.py
jstrine/osxphotos
656
157012
<filename>examples/export_by_album.py """ Export all photos to specified directory using album names as folders If file has been edited, also export the edited version, otherwise, export the original version This will result in duplicate photos if photo is in more than album """ import os.path import pat...
0
0
0
0
0
0
relate/__main__.py
inducer/courseflow
284
157025
<reponame>inducer/courseflow if __name__ == "__main__": from relate.bin.relate import main main()
0
0
0
0
0
0
scripts/convert_database_to_other_formats.py
stravnik/toxic-repos
238
157039
<reponame>stravnik/toxic-repos<gh_stars>100-1000 #!/usr/bin/env python3 import typing as t import sqlite3 import json import csv from pathlib import Path DATABASE_PATH = Path("data/sqlite/toxic-repos.sqlite3") JSON_OUTFILE_PATH = Path("data/json/toxic-repos.json") CSV_OUTFILE_PATH = Path("data/csv/toxic-repos.csv") ...
0
0
0
0
0
0
examples/sum_sum_plus_two.py
uta8a/Jikka
139
157048
# https://judge.kimiyuki.net/problem/sum-sum-plus-two from typing import * def solve(a: List[int], b: List[int]) -> int: ans = 0 for a_i in a: for b_j in b: ans += a_i - b_j return ans def main() -> None: n, m = map(int, input().split()) a = list(map(int, input().split())) ...
2
2
0
0
4
0
tests/utils/object_store/__init__.py
moinnadeem/composer
945
157087
<reponame>moinnadeem/composer<filename>tests/utils/object_store/__init__.py # Copyright 2022 MosaicML Composer authors # SPDX-License-Identifier: Apache-2.0
0
0
0
0
0
0
examples/vault-consul-ami/auth/sign-request.py
crowd-ai/terraform-aws-vault
651
157093
#!/usr/bin/env python # -What------------------------------------------------------------------------- # This script creates a request to the AWS Security Token Service API # with the action "GetCallerIdentity" and then signs the request using the # AWS credentials. It was modified from the python 2.x example published...
0
0
0
0
0
0
kitsune/flagit/migrations/0002_auto_20200629_0826.py
AndrewDVXI/kitsune
929
157100
# Generated by Django 2.2.13 on 2020-06-29 08:26 from django.db import migrations, models class Migration(migrations.Migration): dependencies: list[tuple[str, str]] = [ ('flagit', '0001_initial'), ] operations: list[object] = [ migrations.AlterField( model_name='flaggedobjec...
0
0
2
0
2
0