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
v2/backend/security/views/forgot_password.py
jonfairbanks/rtsp-nvr
558
1695975
from __future__ import annotations from flask import jsonify, request from flask_security.recoverable import send_reset_password_instructions from flask_security.views import _security from http import HTTPStatus from werkzeug.datastructures import MultiDict from .blueprint import frontend, security from ..decorators ...
0
1
0
0
1
0
src/python/txtai/models/__init__.py
malywonsz/txtai
1,893
1695986
""" Models imports """ from .models import Models from .onnx import OnnxModel from .pooling import MeanPooling, Pooling from .registry import Registry
0
0
0
0
0
0
handlers.py
messense/wechat-bot
115
1695996
# coding=utf-8 import logging from tornado import web from tornado.options import options from wechatpy import parse_message, create_reply from wechatpy.utils import check_signature from wechatpy.exceptions import InvalidSignatureException from ai import AI class WechatHandler(web.RequestHandler): def get(self...
0
1
0
0
1
0
src/functions_hook/polyhook_lib/Capstone/suite/test_group_name.py
bitcrystal/temp
2,636
1696054
#!/usr/bin/python from capstone import * from capstone.arm import * from capstone.arm64 import * from capstone.mips import * from capstone.ppc import * from capstone.sparc import * from capstone.systemz import * from capstone.x86 import * from capstone.xcore import * import sys # yes this is bad, importing ctypes lik...
0
0
0
0
0
0
episodic_curiosity/eval_policy.py
cclauss/episodic-curiosity
195
1696065
<reponame>cclauss/episodic-curiosity # coding=utf-8 # Copyright 2019 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 ...
0
0
0
0
0
0
teams-notifier/LambdaFunction.py
h1aji/aws-health-tools
825
1696074
<filename>teams-notifier/LambdaFunction.py #Sample Lambda Function to post notifications to a Teams room when an AWS Health event happens import json import logging import os from urllib.request import Request, urlopen from urllib.error import URLError, HTTPError TEAMSWEBHOOK = "" # Setting up logging logger = loggi...
0
0
0
0
0
0
account_setup.py
zerweck/doAzureParallel
127
1696080
from __future__ import annotations ''' doAzureParallel Getting Started script ''' import sys import threading import time import uuid import json import string import random from azure.common import credentials from azure.graphrbac import GraphRbacManagementClient from azure.graphrbac.models import ApplicationCreat...
1
14
10
0
25
0
size_benchmarks/sizes.py
xtuc/binjs-ref
391
1696082
#!/usr/bin/env python3 from __future__ import annotations import argparse import concurrent.futures import glob import itertools import io import os import subprocess def cargo_boilerplate(binary) -> list[object | str]: return ['cargo', 'run', '--bin', binary, '--release', '--'] # binjs_generate_prediction_table...
0
7
0
0
7
0
src/certificate_dns_record_provider.py
kfodex01/cfn-certificate-provider
148
1696100
<reponame>kfodex01/cfn-certificate-provider import time import boto3 import logging from botocore.exceptions import ClientError from cfn_resource_provider import ResourceProvider logger = logging.getLogger() lmbda = boto3.client("lambda") class CertificateDNSRecordProvider(ResourceProvider): def __init__(self)...
0
0
0
0
0
0
osf/management/commands/reindex_es6.py
gaybro8777/osf.io
628
1696117
""" Reindex data to use current mapping for ES metrics classes """ import logging from django.core.management.base import BaseCommand from elasticsearch_dsl import connections from elasticsearch_metrics.registry import registry logger = logging.getLogger(__name__) def get_metric_class(index_name: str) -> type: ...
4
2
0
0
6
0
sympy/mpmath/calculus/__init__.py
shipci/sympy
625
1696125
<gh_stars>100-1000 from . import calculus # XXX: hack to set methods from . import approximation from . import differentiation from . import extrapolation from . import polynomials
0
0
0
0
0
0
tests/components/ecobee/common.py
MrDelik/core
30,023
1696146
<filename>tests/components/ecobee/common.py """Common methods used across tests for Ecobee.""" from unittest.mock import patch from homeassistant.components.ecobee.const import CONF_REFRESH_TOKEN, DOMAIN from homeassistant.const import CONF_API_KEY from homeassistant.setup import async_setup_component from tests.comm...
0
0
0
0
0
0
qiskit/chemistry/algorithms/ground_state_solvers/minimum_eigensolver_factories/vqe_uccsd_factory.py
stefan-woerner/aqua
504
1696173
# This code is part of Qiskit. # # (C) Copyright IBM 2020. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivative wo...
21
23
0
0
44
0
test/docstrings/module1.py
kylebarron/MagicPython
1,482
1696178
'''TEST''' r'''TEST''' R'''TEST''' u'''TEST''' U'''TEST''' b'''TEST''' B'''TEST''' ''' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.multi.python TEST : source.python, string.quoted.docstring.multi.python ''' : punctuation.definition.string.end.pyt...
0
0
0
0
0
0
tests/helpers/test_entityfilter.py
mib1185/core
30,023
1696179
"""The tests for the EntityFilter component.""" from homeassistant.helpers.entityfilter import ( FILTER_SCHEMA, INCLUDE_EXCLUDE_FILTER_SCHEMA, EntityFilter, generate_filter, ) def test_no_filters_case_1(): """If include and exclude not included, pass everything.""" incl_dom = {} incl_ent =...
0
0
2
0
2
0
packages/now-python/test/fixtures/11-asgi/index.py
TorstenDittmann/vercel
3,655
1696184
<filename>packages/now-python/test/fixtures/11-asgi/index.py from sanic import Sanic from sanic import response app = Sanic() @app.route("/") async def index(request): return response.text("asgi:RANDOMNESS_PLACEHOLDER")
0
0
0
0
0
0
tsdoc/tsdoc/page.py
ragerdl/dtrace-stap-book
139
1696192
<filename>tsdoc/tsdoc/page.py import os import sys from pprint import pprint from collections import defaultdict, OrderedDict from tsdoc import * from tsdoc.blocks import * from tsdoc.mdparser2 import MarkdownParser VERBOSE = os.getenv('TSDOC_VERBOSE', None) is not None _TRACE_DOCS = [] class TSDocProcessError(Exc...
0
0
0
0
0
0
zeus/common/__init__.py
shaido987/vega
240
1696211
<reponame>shaido987/vega from .utils import init_log, module_existed, update_dict, copy_search_file from .utils import update_dict_with_flatten_keys, switch_directory from .config import Config from .file_ops import FileOps from .task_ops import TaskOps from .user_config import UserConfig from .config_serializable impo...
0
0
0
0
0
0
unintended_ml_bias/new_madlibber/runner.py
IlanPrice/unintended-ml-bias-analysis
314
1696264
import argparse import format_helper import madlibber import path_helper import word_helper def parse_args() -> object: """Returns parsed arguments.""" parser = argparse.ArgumentParser() parser.add_argument( '-input_words', type=str, required=True, help='The input words to substitute in...
0
1
0
0
1
0
homeassistant/components/flux_led/diagnostics.py
MrDelik/core
30,023
1696276
"""Diagnostics support for flux_led.""" from __future__ import annotations from typing import Any from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant from .const import DOMAIN from .coordinator import FluxLedUpdateCoordinator async def async_get_config_entry_diagnostic...
2
1
1
0
4
0
examples/gcharttestapp/GChartExample25.py
takipsizad/pyjs
739
1696288
import math from pyjamas.chart import GChartUtil from pyjamas.chart.GChart import GChart from pyjamas.chart import AnnotationLocation from pyjamas.chart import SymbolType from pyjamas.ui.Button import Button from pyjamas.ui.FocusPanel import FocusPanel from pyjamas.ui.Grid import Grid from pyjamas.ui import KeyboardL...
0
0
0
0
0
0
qt__pyqt__pyside__pyqode/QWebEngine__fill_form_login__auth__github_com/main.py
DazEB2/SimplePyScripts
117
1696305
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = 'ipetrash' from PyQt5.QtCore import QUrl from PyQt5.QtWidgets import QApplication, QMainWindow from PyQt5.QtWebEngineWidgets import QWebEngineView LOGIN = '<LOGIN>' PASSWORD = '<PASSWORD>' with open('../QWebEngine__append_custom_javascript__jQuery/js/jq...
1
1
0
0
2
0
python/ray/util/sgd/torch/examples/deep_graph/gat_dgl.py
77loopin/ray
21,382
1696306
import os import time import numpy as np import argparse import torch import torch.nn as nn import torch.nn.functional as F import ray from ray.util.sgd import TorchTrainer from ray.util.sgd.utils import AverageMeterCollection from ray.util.sgd.torch import TrainingOperator import dgl from dgl.data import RedditData...
0
4
0
0
4
0
ansible/roles/blade.none/library/dns_sync.py
ClashTheBunny/cmdb
111
1696360
#!/usr/bin/env python3 from __future__ import annotations import yaml import ipaddress import math import boto3 import requests import collections import json from ansible.module_utils.basic import AnsibleModule from ansible.errors import AnsibleError DOCUMENTATION = """ --- module: dns_sync.py short_description: Sy...
0
8
0
2
10
0
todo/renderers/styles/ansi_fore.py
tomasdanjonsson/td-cli
154
1696365
<filename>todo/renderers/styles/ansi_fore.py from .base import AnsiCodes class AnsiFore(AnsiCodes): RED = 31 GREEN = 32 BLUE = 34 WHITE = 37 GREY = 90
0
0
0
0
0
0
checkov/kubernetes/checks/EtcdAutoTls.py
niradler/checkov
4,013
1696375
<filename>checkov/kubernetes/checks/EtcdAutoTls.py from checkov.common.models.enums import CheckCategories, CheckResult from checkov.kubernetes.base_spec_check import BaseK8Check class EtcdAutoTls(BaseK8Check): def __init__(self): # CIS-1.6 2.3 id = "CKV_K8S_118" name = "Ensure that the --...
0
0
0
0
0
0
configs/cfa/cfa_r50_fpn_1x_dota_le135.py
williamcorsel/mmrotate
449
1696420
_base_ = ['../rotated_reppoints/rotated_reppoints_r50_fpn_1x_dota_le135.py'] model = dict( bbox_head=dict(use_reassign=True), train_cfg=dict( refine=dict(assigner=dict(pos_iou_thr=0.1, neg_iou_thr=0.1))))
0
0
0
0
0
0
tests/test_fastqe.py
hexylena/fastqe
121
1696478
<filename>tests/test_fastqe.py import fastqe.fastqe import fastqe.fastqe_map as emaps from pyemojify import emojify def test_fastq_scores_mean(): '''Test calculation of mean phred quality scores from FASTQ file''' filename = 'tests/data/test.fastq' expected_scores = [29, 30, 33, 33, 32, 36, 36, 36, 32, 36, 36, ...
0
0
0
0
0
0
PathPlanning/VoronoiRoadMap/dijkstra_search.py
duken72/PythonRobotics
15,431
1696500
<reponame>duken72/PythonRobotics """ Dijkstra Search library author: <NAME> (@Atsushi_twi) """ import matplotlib.pyplot as plt import math import numpy as np class DijkstraSearch: class Node: """ Node class for dijkstra search """ def __init__(self, x, y, cost=None, parent=Non...
0
0
0
0
0
0
tools/mo/openvino/tools/mo/middle/ReverseTransposeNormalization.py
ryanloney/openvino-1
1,127
1696510
# Copyright (C) 2018-2022 Intel Corporation # SPDX-License-Identifier: Apache-2.0 import numpy as np from openvino.tools.mo.graph.graph import Graph, Node from openvino.tools.mo.middle.replacement import MiddleReplacementPattern from openvino.tools.mo.ops.const import Const class ReverseTransposeNormalization(Middl...
2
1
2
0
5
0
src/genie/libs/parser/iosxe/c9600/show_platform.py
balmasea/genieparser
204
1696515
<reponame>balmasea/genieparser<filename>src/genie/libs/parser/iosxe/c9600/show_platform.py '''show_platform.py IOSXE c9500 parsers for the following show commands: * show platform software object-manager {serviceprocessor} statistics * show platform software object-manager switch {switchvirtualstate} {servicepro...
0
0
0
0
0
0
selfdrive/golden/can_bridge.py
JoeOIVOV/ArnePilot
116
1696535
#!/usr/bin/env python3 #pylint: skip-file # flake8: noqa import os import time import math import atexit import numpy as np import threading import random import cereal.messaging as messaging import argparse from common.params import Params from common.realtime import Ratekeeper from selfdrive.golden.can import can_fun...
0
0
0
0
0
0
hand_detector/detector.py
congtranv/Unified-Gesture-and-Fingertip-Detection
200
1696550
<reponame>congtranv/Unified-Gesture-and-Fingertip-Detection import cv2 import numpy as np from hand_detector.solo.solo_net import model as solo_model from hand_detector.yolo.darknet import model as yolo_model from hand_detector.solo.preprocess.solo_flag import Flag as soloFlag from hand_detector.yolo.preprocess.yolo_fl...
0
0
0
0
0
0
backend/lk/logic/appstore_review_subscriptions.py
Purus/LaunchKitDocker
2,341
1696593
<filename>backend/lk/logic/appstore_review_subscriptions.py # encoding: utf-8 # # Copyright 2016 Cluster Labs, Inc. # # 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
simpletransformers/classification/__init__.py
manueltonneau/simpletransformers
488
1696596
<reponame>manueltonneau/simpletransformers from simpletransformers.classification.classification_model import ClassificationModel from simpletransformers.classification.multi_label_classification_model import MultiLabelClassificationModel from simpletransformers.classification.multi_modal_classification_model import Mu...
0
0
0
0
0
0
src/python/grpcio_tests/tests/interop/_insecure_intraop_test.py
samotarnik/grpc
2,151
1696635
<reponame>samotarnik/grpc<filename>src/python/grpcio_tests/tests/interop/_insecure_intraop_test.py # Copyright 2015 gRPC 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:...
0
0
0
0
0
0
arghandle/__init__.py
svaisakh/magnet
343
1696653
<filename>arghandle/__init__.py from arghandle.core import arghandle, args
0
0
0
0
0
0
im_caption_full.py
ukyh/unsupervised_captioning_fast
229
1696663
from __future__ import annotations """Train the full model. python im_caption_full.py --multi_gpu --batch_size 512 --save_checkpoint_steps\ 1000 --gen_lr 0.001 --dis_lr 0.001 """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import functools import os ...
3
7
0
0
10
0
airmozilla/manage/tests/views/test_eventtweets.py
mozilla/airmozilla
115
1696664
import datetime import json from nose.tools import eq_, ok_ import mock from django.conf import settings from django.contrib.auth.models import Group from django.utils import timezone from django.core.urlresolvers import reverse from airmozilla.main.models import ( Event, EventTweet, Location, Approv...
0
4
2
0
6
0
chromagnon/SuperFastHash.py
arsinclair/Chromagnon
211
1696675
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2012, <NAME> <<EMAIL>> # 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 copyr...
0
0
0
0
0
0
magnet/training/train.py
ysglh/magnet
343
1696679
from __future__ import annotations from torch import optim from contextlib import contextmanager class Trainer: r"""Abstract base class for training models. The Trainer class makes it incredibly simple and convinient to train, monitor, debug and checkpoint entire Deep Learning projects. Simply define...
9
5
0
1
15
0
src/Main/DispatcherBase.py
mozafari/vprofiler
107
1696681
<filename>src/Main/DispatcherBase.py import subprocess class Dispatcher(object): def __init__(self, disallowedOptions, optionalOptions, requiredOptions): self.disallowedOptions = disallowedOptions self.optionalOptions = optionalOptions self.requiredOptions = requiredOptions def ParseOp...
0
0
0
0
0
0
src/sklearn_evaluation/util.py
edublancas/sklearn-model-evaluation
351
1696682
<reponame>edublancas/sklearn-model-evaluation from copy import copy from inspect import signature, _empty import re from collections.abc import Iterable from collections import defaultdict from itertools import product from six import string_types def isiter(obj): try: iter(obj) except TypeError: ...
0
0
0
0
0
0
suplemon/editor.py
johnmbaughman/suplemon
912
1696695
# -*- encoding: utf-8 from __future__ import annotations """ Editor class for extending viewer with text editing features. """ from . import helpers from .line import Line from .cursor import Cursor from .viewer import Viewer class State: """Store editor state for undo/redo.""" def __init__(self, editor: o...
6
5
0
8
19
0
blog/tests/example/test_timeit.py
zacfrulloni/Rust-Full-Stack
1,091
1696704
<filename>blog/tests/example/test_timeit.py def test_print(): print("Learn how to build a full stack web app with Steadylearner") if __name__ == "__main__": import timeit print(timeit.timeit("test_print()", setup="from __main__ import test_print", number=10))
0
0
0
0
0
0
seglearn/tests/test_feature_functions.py
time-series-tools/seglearn
509
1696718
# Author: <NAME> # License: BSD import numpy as np from seglearn import feature_functions def test_mv_feature_functions(): """ test feature functions with multivariate data """ # sliding window data is shape [n_segments, width, variables] N = 20 W = 30 mv_data = np.random.rand(N, W, 3) ftr...
0
0
0
0
0
0
infra/bots/assets/android_sdk_linux/create.py
travisleithead/skia
6,304
1696736
#!/usr/bin/env python # # Copyright 2017 Google Inc. # # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Create the asset.""" import argparse import os import shutil import sys ENV_VAR = 'ANDROID_SDK_LINUX_SDK_ROOT' def getenv(key) -> object: val = os.env...
0
1
0
0
1
0
tests/test_variables.py
zachary/MachineLearningStocks
1,208
1696741
<gh_stars>1000+ import os import parsing_keystats import current_data import stock_prediction def test_statspath(): # Check that the statspath exists and is a directory assert os.path.exists(current_data.statspath) assert os.path.isdir(current_data.statspath) assert parsing_keystats.statspath == curr...
0
0
0
0
0
0
office365/sharepoint/storagemetrics/storage_metrics.py
theodoriss/Office365-REST-Python-Client
544
1696760
<reponame>theodoriss/Office365-REST-Python-Client from office365.sharepoint.base_entity import BaseEntity class StorageMetrics(BaseEntity): """Specifies the storage-related metrics for list folders in the site""" pass
0
0
0
0
0
0
tests/test_resource/test_postgres.py
roganov/local-data-api
102
1696776
<gh_stars>100-1000 from __future__ import annotations from psycopg2._psycopg import Column from local_data_api.models import Field from local_data_api.resources import PostgresSQL from tests.test_resource.test_resource import helper_default_test_field def test_create_connection_maker(mocker): mock_connect = moc...
0
0
0
0
0
0
azure-iot-device/azure/iot/device/provisioning/pipeline/__init__.py
danewalton/azure-iot-sdk-python
366
1696829
"""Azure Provisioning Device Communication Pipeline This package provides pipeline for use with the Azure Provisioning Device SDK. INTERNAL USAGE ONLY """ from .mqtt_pipeline import MQTTPipeline from .config import ProvisioningPipelineConfig
0
0
0
0
0
0
general/youtube-api/comments.py
caesarcc/python-code-tutorials
1,059
1696843
from utils import youtube_authenticate, get_video_id_by_url, get_channel_id_by_url def get_comments(youtube, **kwargs) -> object: return youtube.commentThreads().list( part="snippet", **kwargs ).execute() if __name__ == "__main__": # authenticate to YouTube API youtube = you...
0
1
0
0
1
0
src/python/grapl_analyzerlib/grapl_analyzerlib/query_gen.py
msilvey/grapl
313
1696853
<filename>src/python/grapl_analyzerlib/grapl_analyzerlib/query_gen.py from copy import deepcopy from typing import Dict, Set, Optional, Iterator, Tuple, List, NewType # Represents a string like "$a" or "$b" VarPlaceholder = NewType("VarPlaceholder", str) def _placeholder_generator(prefix: str) -> Iterator[VarPlaceh...
0
0
0
0
0
0
analysis/force_balance_loop/tools/m600_fbl_config_manager.py
leozz37/makani
1,178
1696862
# 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...
9
9
0
0
18
0
src/configs/arguments.py
flyingcakes85/ImageGoNord
572
1696869
logs = { "img": [ "[INFO] Loading input image: {}", "[ERROR] On '{}': you need to pass the image path!", "\te.g. --img='Pictures/notNord.jpg'" ], "out": [ "[INFO] Set output image name: {}", "[ERROR] On '{}': no output filename specify!", "\te.g. --out='Pict...
0
0
0
0
0
0
tools/style_variable_generator/color_test.py
chromium/chromium
14,668
1696884
#!/usr/bin/env python3 # Copyright 2019 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import sys import os sys.path += [os.path.dirname(os.path.dirname(__file__))] from style_variable_generator.color import Color, split...
0
0
0
0
0
0
certidude/api/lease.py
Korving-F/certidude
119
1696890
<filename>certidude/api/lease.py import falcon import logging import os import re import xattr from datetime import datetime from certidude import config, push from certidude.decorators import serialize from .utils import AuthorityHandler from .utils.firewall import login_required, authorize_admin, authorize_server lo...
0
0
0
0
0
0
tests/settings/test_issues.py
adrianliaw/pybatfish
160
1696903
# coding=utf-8 # Copyright 2018 The Batfish Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
0
0
0
0
0
0
Python/choose_your_class_rpg.py
PushpneetSingh/Hello-world
1,428
1696923
class Player: def __init__( self, username: str, player_class, ): self.username = username self.invetory = Inventory() self.player_class = player_class self.skills: None = None self.gender: None = None self._count: int = 0 ...
8
6
0
6
20
0
chirp/plugins/yara/run.py
DeemOnSecurity/CHIRP
1,080
1696968
from __future__ import annotations """Provides a coroutine to run yara rules against a set of files.""" # Standard Python Libraries from functools import lru_cache, partial from glob import iglob import hashlib import itertools import json import logging from multiprocessing import Pool import os import signal import ...
5
10
0
0
15
0
external/source/meterpreter/source/bionic/libc/kernel/tools/utils.py
truekonrads/mirv-metasploit
264
1696987
<gh_stars>100-1000 # common python utility routines for the Bionic tool scripts import sys, os, commands, string, commands # basic debugging trace support # call D_setlevel to set the verbosity level # and D(), D2(), D3(), D4() to add traces # verbose = 0 def panic(msg): sys.stderr.write( find_program_name() + "...
0
0
0
0
0
0
bin/urlscan.py
PaulM2602/OSweep
175
1696997
#!/opt/splunk/bin/python from __future__ import annotations """ Description: Use urlscan.io to get a look at what a particular website is requesting in the background. The script accepts a list of strings (domain, IP, and/or SHA256): | urlscanio $ioc$ or input from the pipeline (any field where the value is a do...
0
4
0
0
4
0
docs/test_doc_styles.py
TriOptima/iommi
192
1697026
<reponame>TriOptima/iommi from iommi import * from tests.helpers import req request = req('get') def test_style(): # language=rst """ Style ===== iommi has the goal to be easy to integrate into your existing code base, in addition to be being great for developing new products. In order to ...
0
0
0
0
0
0
csgomenumaker/command/primitive.py
citrusCS/csgo-menu-maker
152
1697035
<reponame>citrusCS/csgo-menu-maker from .command import Command class Primitive(Command): """ Stores a single console command, and does not point to an alias. Used to run arbitrary console commands. """ def __init__(self, parent, concmd, args): Command.__init__(self, parent, "primitive")...
0
0
0
0
0
0
calvin/runtime/north/plugins/port/queue/collect_tagged.py
gabrielcercel/calvin-base
334
1697068
# -*- coding: utf-8 -*- # Copyright (c) 2015 Ericsson AB # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
0
0
0
0
0
0
2013/codegate-quals/vuln100/harness.py
spchal/pwntools-write-ups
456
1697088
<filename>2013/codegate-quals/vuln100/harness.py #!/usr/bin/env python2 from pwn import * context.log_level = 'CRITICAL' with tempfile.NamedTemporaryFile() as fd: s = randoms(12) fd.write(s) fd.flush() try: p = process('./94dd6790cbf7ebfc5b28cc289c480e5e') sploit = process(["./doit.py...
0
0
0
0
0
0
apps/notification/migrations/0001_initial.py
seanlefevre/openduty
145
1697107
# Generated by Django 2.1.3 on 2018-11-22 11:03 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial: bool = True dependencies: list[object | tuple[str, str]] = [ migrations.swappable_dependency(set...
0
0
3
0
3
0
trove/common/db/redis/models.py
sapcc/trove
244
1697125
<filename>trove/common/db/redis/models.py # Copyright 2017 Eayun, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licens...
0
0
0
0
0
0
atlas/foundations_contrib/src/test/job_bundling/__init__.py
DeepLearnI/atlas
296
1697152
<gh_stars>100-1000 from test.job_bundling.test_script_environment import TestScriptEnvironment from test.job_bundling.test_folder_job_source_bundle import TestFolderJobSourceBundle from test.job_bundling.test_empty_job import TestEmptyJob
0
0
0
0
0
0
util/test/tests/D3D11/D3D11_Swapchain_Zoo.py
hbina/renderdoc
6,181
1697159
<gh_stars>1000+ import renderdoc as rd import rdtest class D3D11_Swapchain_Zoo(rdtest.TestCase): demos_test_name = 'D3D11_Swapchain_Zoo' demos_frame_cap = 50 # Take 10 captures because we don't know the present order, but only expect 1 demos_frame_count = 10 demos_captures_expected = 1 def ch...
0
0
0
0
0
0
samples/TCPClient25.py
amih90/bacpypes
240
1697188
#!/usr/bin/env python2.5 from __future__ import annotations """ This simple TCP client application connects to a server and sends the text entered in the console. There is no conversion from incoming streams of content into a line or any other higher-layer concept of a packet. """ import os import sys from bacpypes...
4
1
0
0
5
0
src/sklearn_evaluation/plot/matplotlib/__init__.py
abcnishant007/sklearn-evaluation
351
1697219
""" Matplotlib plotting code """
0
0
0
0
0
0
orttraining/orttraining/test/python/orttraining_ortmodule_distributed_tests.py
mszhanyi/onnxruntime
669
1697225
<gh_stars>100-1000 #!/usr/bin/env python3 # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. import sys import argparse from _test_commons import run_subprocess import logging logging.basicConfig(format="%(asctime)s %(name)s [%(levelname)s] - %(message)s", level=logging.DE...
0
0
0
0
0
0
tests/test_utilities.py
pexip/os-blinker
1,299
1697233
import pickle from blinker._utilities import symbol def test_symbols(): foo = symbol('foo') assert foo.name == 'foo' assert foo is symbol('foo') bar = symbol('bar') assert foo is not bar assert foo != bar assert not foo == bar assert repr(foo) == 'foo' def test_pickled_symbols(): ...
0
0
0
0
0
0
h2o-docs/src/product/example.py
ahmedengu/h2o-3
6,098
1697250
<filename>h2o-docs/src/product/example.py from h2o.utils.shared_utils import _locate # private function. used to find files within h2o git project directory. weather_path = _locate("smalldata/chicago/chicagoAllWeather.csv") census_path = _locate("smalldata/chicago/chicagoCensus.csv") crimes_path = _locate("smalldata/ch...
0
0
0
0
0
0
colossalai/nn/layer/parallel_sequence/__init__.py
RichardoLuo/ColossalAI
1,630
1697282
from ._operation import RingQK, RingAV from .layers import TransformerSelfAttentionRing __all__ = ['TransformerSelfAttentionRing', 'RingAV', 'RingQK']
0
0
0
0
0
0
musicnow/log.py
lakshaykalbhor/Fluorine-MusicDownloader
133
1697300
<reponame>lakshaykalbhor/Fluorine-MusicDownloader<filename>musicnow/log.py from colorama import init, deinit, Fore def log(text='', newline=False, trailing_newline=False): newline_char = '' trailing_newline_char = '' if newline: newline_char = '\n' if trailing_newline: trailing_newline...
0
0
0
0
0
0
lingvo/tasks/milan/dataset_spec.py
allenwang28/lingvo
2,611
1697309
<filename>lingvo/tasks/milan/dataset_spec.py # Lint as: python3 # Copyright 2021 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://ww...
0
0
0
0
0
0
recipes/Python/426409_XMLMenuLoader_creates_wxMenuBar_XML/recipe-426409.py
tdiprima/code
2,023
1697330
<gh_stars>1000+ """ XMLMenuLoader: Class to handle loading a wxMenuBar with menu items defined in XML author: <NAME> <<EMAIL>> based on code by <NAME> <<EMAIL>> 20041010: <NAME> <<EMAIL>> Code now uses pulldom, supports submenus and checkable items. #*COULDDO*# Add new XML d...
0
0
0
0
0
0
source/data_loader.py
paulguerrero/points2surf
260
1697350
<reponame>paulguerrero/points2surf<gh_stars>100-1000 import os import os.path import sys import torch import torch.utils.data as data import numpy as np import scipy.spatial as spatial import trimesh from source.base import mesh_io from source.base import utils from source.base import file_utils from source import sdf...
0
0
0
0
0
0
deep-rl/lib/python2.7/site-packages/OpenGL/raw/GL/NV/explicit_multisample.py
ShujaKhalid/deep-rl
210
1697353
'''Autogenerated by xml_generate script, do not edit!''' from OpenGL import platform as _p, arrays # Code generation uses this from OpenGL.raw.GL import _types as _cs # End users want this... from OpenGL.raw.GL._types import * from OpenGL.raw.GL import _errors from OpenGL.constant import Constant as _C import ctypes _...
0
1
0
0
1
0
testing/MLDB-1140-csv_reading_compression_test.py
kstepanmpmg/mldb
665
1697368
# # MLDB-1140-csv_reading_compression_test.py # Mich, 2015-11-23 # This file is part of MLDB. Copyright 2015 mldb.ai inc. All rights reserved. # from mldb import mldb for ext in ['lz4', 'zip']: csv_conf = { "type": "import.text", "params": { 'dataFileUrl' : 'file://mldb/tes...
0
0
0
0
0
0
binding.gyp
leemgs/node-mariasql
376
1697379
{ 'targets': [ { 'target_name': 'sqlclient', 'sources': [ 'src/binding.cc', ], 'include_dirs': [ 'deps/libmariadbclient/include', 'deps/libmariadbclient/libmysql', "<!(node -e \"require('nan')\")" ], 'cflags': [ '-O3', '-std=c++0x' ], 'cond...
0
0
0
0
0
0
specter/__init__.py
ronaldseoh/specter
248
1697405
<filename>specter/__init__.py<gh_stars>100-1000 from specter.data import DataReaderFromPickled, DataReader from specter.model import Specter from specter.predictor import SpecterPredictor
0
0
0
0
0
0
tests/engine/test_manager.py
aiidateam/aiida_core
153
1697412
# -*- coding: utf-8 -*- ########################################################################### # Copyright (c), The AiiDA team. All rights reserved. # # This file is part of the AiiDA code. # # ...
0
0
0
0
0
0
examples/pipeline/homo_nn/runner.py
hubert-he/FATE
3,787
1697428
# # Copyright 2019 The FATE Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
1
2
4
0
7
0
manuscript/case1/deepsea.py
taskina-alena/selene
307
1697449
from __future__ import annotations """ DeepSEA architecture (Zhou & Troyanskaya, 2015). """ import numpy as np import torch import torch.nn as nn class DeepSEA(nn.Module): def __init__(self, sequence_length, n_genomic_features): """ Parameters ---------- sequence_length : int ...
0
3
0
0
3
0
tests/test_cli_package/test_cli.py
groodt/logme
530
1697486
import pytest import shutil from pathlib import Path from click.testing import CliRunner from bnmutils import ConfigParser from bnmutils.novelty import cd from logme.exceptions import LogmeError from logme.utils import get_logger_config from logme import __version__ from logme import cli class TestCli: @clas...
0
0
0
0
0
0
noxfiles/docker_nox.py
ethyca/fides
153
1697508
<filename>noxfiles/docker_nox.py """Contains the nox sessions for docker-related tasks.""" import nox from constants_nox import ( IMAGE, IMAGE_DEV, IMAGE_LATEST, IMAGE_LOCAL, IMAGE_LOCAL_UI, get_current_tag, ) def get_current_image() -> str: """Returns the current image tag""" return f...
0
0
0
0
0
0
pandas/tests/test_compat.py
LauraCollard/pandas
1,738
1697520
<reponame>LauraCollard/pandas<filename>pandas/tests/test_compat.py """ Testing that functions from compat work as expected """
0
0
0
0
0
0
mmdetection/configs/faster_rcnn/faster_rcnn_senet50_fpn_2x_coco.py
InukKang/Pedestron
259
1697533
_base_ = [ '../_base_/models/faster_rcnn_r50_fpn_senet.py', '../_base_/datasets/coco_detection.py', '../_base_/schedules/schedule_2x.py', '../_base_/default_runtime.py' ]
0
0
0
0
0
0
endpoints/api/repoemail.py
giuseppe/quay
2,027
1697549
<filename>endpoints/api/repoemail.py """ Authorize repository to send e-mail notifications. """ import logging from flask import request, abort from endpoints.api import ( resource, nickname, require_repo_admin, RepositoryParamResource, log_action, validate_json_request, internal_only, ...
0
0
0
0
0
0
aiozipkin/aiohttp_helpers.py
shadchin/aiozipkin
175
1697563
import ipaddress import sys from contextlib import contextmanager from types import SimpleNamespace from typing import ( Any, Awaitable, Callable, Dict, Generator, Iterable, Optional, Set, cast, ) import aiohttp from aiohttp import ( TraceRequestEndParams, TraceRequestExcept...
37
18
5
0
60
0
Packs/CheckpointFirewall/Scripts/CheckpointFWCreateBackup/CheckpointFWCreateBackup.py
diCagri/content
799
1697576
import demistomock as demisto from CommonServerPython import * from CommonServerUserPython import * CLI_ADD = "add backup local" BASH_ADD = '/etc/cli.sh -c "' + CLI_ADD + '"' def main(): res = [] tbl = [] devices = demisto.get(demisto.args(), 'devices') devicesBackupStarted = [] devicesBackupErr...
0
0
0
0
0
0
commandment/apps/resources.py
pythonModule/commandment
138
1697601
from sqlalchemy.orm.exc import NoResultFound from flask_rest_jsonapi import ResourceDetail, ResourceList, ResourceRelationship from flask_rest_jsonapi.exceptions import ObjectNotFound from commandment.apps.schema import ApplicationManifestSchema, ApplicationSchema, ManagedApplicationSchema from commandment.apps.models ...
0
1
15
0
16
0
decision-science/lab4/algorithms.py
tonykozlovsky/bsu
113
1697625
<reponame>tonykozlovsky/bsu<filename>decision-science/lab4/algorithms.py #!/usr/bin/env python # -*- coding: utf-8 -*- from graphviz import Digraph class Edge: def __init__(self, start, finish, weight=0, min_weight=0, redge=False): self.start = start self.finish = finish self.min_weight =...
0
0
0
0
0
0
lib/gt_synthesize_layer/__init__.py
aditya2592/PoseCNN
655
1697628
# -------------------------------------------------------- # FCN # Copyright (c) 2016 RSE at UW # Licensed under The MIT License [see LICENSE for details] # Written by <NAME> # --------------------------------------------------------
0
0
0
0
0
0
python/match_scores.py
serve-and-volley/atp-world-tour-tennis-data
129
1697661
<reponame>serve-and-volley/atp-world-tour-tennis-data<filename>python/match_scores.py import sys from lxml import html import requests import re import csv # # # # # # # # # # # # FUNCTIONS # # # # # # # # # # # # def array2csv(array, filename): with open(filename, "w+") as my_csv:...
0
0
0
0
0
0
src/encode_task_tss_enrich.py
motorny/chip-seq-pipeline2
261
1697665
<reponame>motorny/chip-seq-pipeline2 #!/usr/bin/env python # ENCODE DCC TSS enrich wrapper # Author: <NAME>, <NAME> (<EMAIL>) import matplotlib as mpl mpl.use('Agg') import pybedtools import numpy as np from matplotlib import mlab from matplotlib import pyplot as plt import sys import os import argparse from encode_l...
0
0
0
0
0
0
zinnia/tests/test_context.py
Boondockers-Welcome/django-blog-zinnia
1,522
1697684
<filename>zinnia/tests/test_context.py """Test cases for Zinnia Context""" from django.core.paginator import Paginator from django.template import Context from django.test import TestCase from zinnia.context import get_context_first_matching_object from zinnia.context import get_context_first_object from zinnia.contex...
0
0
0
0
0
0