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
flowtorch/__init__.py
sankethvedula/flowtorch
207
1786506
# Copyright (c) Meta Platforms, Inc from flowtorch.lazy import Lazy, LazyMeta __all__ = ["Lazy", "LazyMeta"]
0
0
0
0
0
0
Python/Tests/TestData/DebuggerProject/SetNextLine.py
techkey/PTVS
404
1786509
<reponame>techkey/PTVS import sys def f(): print('hi') def g(): x = 42 y = 100 z = 200 g() print('done')
0
0
0
0
0
0
tests/chainer_tests/utils_tests/test_utils.py
takeratta/chainer
3,705
1786512
import unittest import numpy from chainer import testing from chainer import utils @testing.parameterize(*testing.product({ 'dtype': [None, numpy.float16, numpy.float32, numpy.float64], })) class TestForceArray(unittest.TestCase): def test_scalar(self): x = utils.force_array(numpy.float32(1), dtype...
0
0
0
0
0
0
autodrome/envs/env.py
0xflotus/autodrome
215
1786584
import gym import math import numpy as np from ..simulator import Simulator from ..policeman import Policeman class SimulatorEnv(gym.Env): def __init__(self, simulator: Simulator, map: str): super().__init__() self.action_space = gym.spaces.MultiDiscrete(nvec=[3, 3]) # [Left, Straight, Right], ...
0
0
0
0
0
0
hwt/hdl/statements/codeBlockContainer.py
ufo2011/hwt
134
1786597
<reponame>ufo2011/hwt from itertools import compress from typing import List, Set, Tuple from hwt.doc_markers import internal from hwt.hdl.statements.statement import HdlStatement from hwt.hdl.statements.utils.listOfHdlStatements import ListOfHdlStatement from hwt.hdl.statements.utils.reduction import HdlStatement_try...
0
0
0
0
0
0
self_attention_cv/axial_attention_deeplab/__init__.py
Siyuan89/self-attention-cv
759
1786599
from .axial_attention import AxialAttention from .axial_attention_residual_block import AxialAttentionBlock
0
0
0
0
0
0
ioflo/base/odicting.py
BradyHammond/ioflo
128
1786600
<reponame>BradyHammond/ioflo # for backwards compatibility. In future import from ..aid.odicting from ..aid.odicting import odict, lodict
0
0
0
0
0
0
dgfolder.py
Visual-Conception-Group/Person_reID_baseline_pytorch
3,358
1786623
<gh_stars>1000+ from torchvision import datasets import numpy as np class DGFolder(datasets.ImageFolder): def __init__(self, root, transform): super(DGFolder, self).__init__(root, transform) targets = np.asarray([s[1] for s in self.samples]) self.targets = targets self.img_num = le...
0
0
0
0
0
0
pyrival/strings/min_rotation.py
MattJDavidson/aoc2021
748
1786647
def least_rotation(s) -> object: a, n = 0, len(s) s = s + s for b in range(n): for i in range(n): if (a + i == b) or (s[a + i] < s[b + i]): b += max(0, i - 1) break if s[a + i] > s[b + i]: a = b break retur...
0
1
0
0
1
0
model/__init__.py
bruinxiong/gnerf
137
1786648
<reponame>bruinxiong/gnerf from .generator import GNeRF from .posemodel import InversionNet, PoseParameters from .discriminator import Discriminator
0
0
0
0
0
0
natlas-server/tests/scope/conftest.py
purplesecops/natlas
500
1786663
<filename>natlas-server/tests/scope/conftest.py import pytest from app import db @pytest.fixture(autouse=True) def session_rollback(app): db.session.rollback()
0
0
0
0
0
0
lib/python/pack2/tests/parser_test_enum.py
leozz37/makani
1,178
1786669
# 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...
0
0
0
0
0
0
tests/test_formatting.py
vr8hub/tools
985
1786676
""" Unit tests for formatting functions. """ from pathlib import Path import pytest from se.formatting import format_xml TESTS = [ "colophon", "comments", "dedication", "endnotes", "html_header", "inline", "meta", "odps", "paragraph", "poem", "song", "titlepage", "toc", "uncopyright", "whitespace", ...
4
0
0
0
4
0
aliyun-python-sdk-ens/aliyunsdkens/request/v20171110/RunServiceScheduleRequest.py
jorsonzen/aliyun-openapi-python-sdk
1,001
1786699
# 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
9
0
0
9
0
tests/helpers.py
alexmusa/adt
153
1786708
<filename>tests/helpers.py import os from typing import Any, NoReturn import hypothesis from hypothesis.strategies import integers, one_of, text hypothesis.settings.register_profile("ci", max_examples=1000, deadline=100) hypothesis.settings.register_profile("dev", max_examples=100, deadline=50) hypothesis.settings.lo...
0
0
0
0
0
0
tests/test_fasttext.py
karthik20122001/docker-python
2,030
1786723
<reponame>karthik20122001/docker-python import unittest import fasttext class TestFastText(unittest.TestCase): def test_tokenize(self): tokens = fasttext.FastText.tokenize("Hello World") self.assertEqual(["Hello", "World"], tokens)
0
0
0
0
0
0
leaf/api/__init__.py
guiqiqi/leaf
119
1786767
<reponame>guiqiqi/leaf """ Leaf 框架 API 支持: wrap - 一个返回值 API 包装器 settings - API 相关设置 converter - 类型转换器注册表 iplimit - 基于 IP 地址的访问过滤 """ from . import error from . import settings from . import validator from . import wrapper
0
0
0
0
0
0
python/clx/eda/summary_stats.py
shaneding/clx
143
1786777
# Copyright (c) 2020, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
0
6
0
0
6
0
ArknightsShell.py
Sait0Yuuki/ArknightsAutoHelper
1,035
1786804
from Arknights.ArknightsShell import ArknightsShell shell = ArknightsShell() shell.run_shell()
0
0
0
0
0
0
tests/helpers/test_download.py
Centaurioun/PyFunceble
213
1786859
<reponame>Centaurioun/PyFunceble """ The tool to check the availability or syntax of domain, IP or URL. :: ██████╗ ██╗ ██╗███████╗██╗ ██╗███╗ ██╗ ██████╗███████╗██████╗ ██╗ ███████╗ ██╔══██╗╚██╗ ██╔╝██╔════╝██║ ██║████╗ ██║██╔════╝██╔════╝██╔══██╗██║ ██╔════╝ ██████╔╝ ╚████╔╝ █████╗ ██║...
0
0
0
0
0
0
mmdeploy/backend/tensorrt/__init__.py
grimoire/mmdeploy
746
1786867
# Copyright (c) OpenMMLab. All rights reserved. # flake8: noqa import importlib import os.path as osp from .init_plugins import get_ops_path, load_tensorrt_plugin def is_available() -> object: """Check whether TensorRT package is installed and cuda is available. Returns: bool: True if TensorRT packa...
0
2
0
0
2
0
test/hlt/pytest/python/com/huawei/iotplatform/client/dto/QueryDeviceGroupMembersOutDTO.py
yuanyi-thu/AIOT-
128
1786895
class QueryDeviceGroupMembersOutDTO(object): def __init__(self): self.totalCount: None = None self.pageNo: None = None self.pageSize: None = None self.deviceIds: None = None def getTotalCount(self) -> object: return self.totalCount def setTotalCount(self, totalCoun...
0
4
0
4
8
0
tests/views/test_setup_datastore.py
priyanshu-kumar02/personfinder
561
1786951
# Copyright 2019 Google 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.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
0
0
0
0
0
0
neuralnilm/config.py
ceavelasquezpi/neuralnilm
135
1786952
<reponame>ceavelasquezpi/neuralnilm from __future__ import print_function, division import os import ConfigParser config = ConfigParser.RawConfigParser() filename = os.path.expanduser('~/.neuralnilm') config.read(filename)
0
0
0
0
0
0
examples/occluded_reid/cores/skeleton_head/skeleton_model/__init__.py
nataliamiccini/light-reid
296
1786973
from __future__ import annotations ''' @Author: <NAME> @Email: <EMAIL> @Date: 2019-05-28 14:40:24 @LastEditors: <NAME> @LastEditTime: 2019-06-15 19:41:10 @Description: ''' import torch import torch.nn as nn import torch.nn.functional as F import numpy as np import math from .config import cfg as pose_config from .p...
3
2
0
1
6
0
extensions/labgraph_viz/labgraph_viz/examples/line_plot_example.py
Yunusbcr/labgraph
124
1786984
<reponame>Yunusbcr/labgraph #!/usr/bin/env python3 # Copyright 2004-present Facebook. All Rights Reserved. import asyncio import labgraph as lg import numpy as np import pyqtgraph as pg import time from labgraph_viz.plots import LinePlot, LinePlotConfig, Mode from pyqtgraph.Qt import QtGui from random import random fr...
0
0
0
0
0
0
CpuX64/TestData/objdump_extract.py
robertmuth/Cwerg
171
1787023
#!/usr/bin/python3 import collections import sys if __name__ == "__main__": seen = set() names = collections.defaultdict(int) for line in sys.stdin: line = line[:-1] line = line.split("<")[0] line = line.split("#")[0] try: addr_str, data_str, ins_str = line.s...
0
0
0
0
0
0
tests/functional/configs/test_disabled_configs.py
tomasfarias/dbt-core
799
1787053
from __future__ import annotations import pytest from dbt.tests.util import run_dbt from tests.functional.configs.fixtures import BaseConfigProject class TestDisabledConfigs(BaseConfigProject): @pytest.fixture(scope="class") def dbt_profile_data(self, unique_schema) -> dict[str,dict[str,bool] | dict[str,dic...
0
2
0
0
2
0
google_or_tools/nonogram_pbn_karate.py
Wikunia/hakank
279
1787114
<gh_stars>100-1000 # webpbn.com Puzzle #6739: Pogo Karate # Copyright 2009 by <NAME> # rows = 40 row_rule_len = 12 row_rules = [ [0, 0, 0, 0, 0, 5, 7, 3, 5, 1, 2, 10], [1, 2, 2, 1, 2, 1, 1, 1, 1, 2, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1], [0, 0, 0, 1, 1, 1, 1, 1, 1, 3, 2, 2], [0, 0, 0, 0, 0, 5,...
0
0
0
0
0
0
ssseg/modules/models/segmentors/icnet/icnet.py
zhizhangxian/sssegmentation
411
1787115
from __future__ import annotations ''' Function: Implementation of ICNet Author: <NAME> ''' import copy import torch import torch.nn as nn from .icneck import ICNeck from ..base import BaseModel from .icnetencoder import ICNetEncoder from ...backbones import BuildActivation, BuildNormalization '''ICNet''' cla...
2
2
0
0
4
0
tabular/src/autogluon/tabular/models/lgb/callbacks.py
zhiqiangdon/autogluon
4,462
1787118
<gh_stars>1000+ import copy import logging import os import psutil import time import warnings from operator import gt, lt from lightgbm.callback import _format_eval_result, EarlyStopException from autogluon.core.utils.early_stopping import SimpleES logger = logging.getLogger(__name__) # TODO: Add option to stop i...
0
0
0
0
0
0
tools/cluster.py
aliyun/alibabacloud-quantization-networks
102
1787136
<gh_stars>100-1000 #!/usr/bin/env python # -*- coding: utf-8 -*- # cluster.py is used to get the bias(b_i) of quantization function. from __future__ import print_function, absolute_import import argparse import os.path as osp import os import sys import pdb import math import numpy as np import matplotlib import ma...
0
0
0
0
0
0
boto3_type_annotations/boto3_type_annotations/waf/paginator.py
cowboygneox/boto3_type_annotations
119
1787169
<gh_stars>100-1000 from typing import Dict from botocore.paginate import Paginator class GetRateBasedRuleManagedKeys(Paginator): def paginate(self, RuleId: str, PaginationConfig: Dict = None) -> Dict: pass class ListActivatedRulesInRuleGroup(Paginator): def paginate(self, RuleGroupId: str = None, Pa...
0
0
0
0
0
0
search_hyperparams.py
husnejahan/DeepAR-Pytorch
213
1787214
import os import sys import logging import argparse import multiprocessing from copy import copy from itertools import product from subprocess import check_call import numpy as np import utils logger = logging.getLogger('DeepAR.Searcher') utils.set_logger('param_search.log') PYTHON = sys.executable gpu_ids: list p...
0
0
4
0
4
0
modules/config.py
rmkarasev/fb2mobi
103
1787281
# -*- coding: utf-8 -*- from importlib import import_module import os, codecs from lxml import etree from lxml.builder import E from modules.utils import get_executable_path, make_dir, copy_file class ConverterConfig: def __init__(self, config_file): self.config_file = config_file self.debug: ...
0
2
0
27
29
0
mimic/test/test_ironic.py
ksheedlo/mimic
141
1787317
from __future__ import annotations from __future__ import absolute_import, division, unicode_literals import json from uuid import uuid4 from twisted.trial.unittest import SynchronousTestCase from twisted.internet.task import Clock from mimic.core import MimicCore from mimic.resource import MimicRoot from mimic.test...
2
3
0
0
5
0
ft/tests/test_filter.py
CristianCantoro/shell-functools
1,065
1787344
<reponame>CristianCantoro/shell-functools<filename>ft/tests/test_filter.py<gh_stars>1000+ from mock_command import mock_command from ft.commands.filter import Filter def test_filter_const_false(): test_filter = mock_command(Filter) test_filter.set_input("const", ["false"], ["3", "5"]) test_filter.assert_o...
0
0
0
0
0
0
moderngl_window/scene/node.py
DavideRuzza/moderngl-window
142
1787369
from __future__ import annotations """ Wrapper for a loaded mesh / vao with properties """ from typing import List, TYPE_CHECKING import numpy from pyrr import matrix44 if TYPE_CHECKING: from moderngl_window.scene import Camera, Mesh class Node: """A generic scene node containing a mesh or camera and/or ...
9
8
0
2
19
0
utils/lib/perf_utils.py
bl0x/symbiflow-arch-defs
183
1787373
<reponame>bl0x/symbiflow-arch-defs #!/usr/bin/env python3 """ Utilities related to performance measurement. """ import time # ============================================================================= def get_memory_usage(): """ Returns memory usage of the current process in GB. WORKS ONLY ON A LINUX ...
0
0
0
0
0
0
example/tests/integration/test_browsable_api.py
anehx/django-rest-framework-json-api
1,011
1787395
import re import pytest from django.urls import reverse pytestmark = pytest.mark.django_db def test_browsable_api_with_included_serializers(single_entry, client): response = client.get( reverse("entry-detail", kwargs={"pk": single_entry.pk, "format": "api"}) ) content = str(response.content) ...
0
0
0
0
0
0
cliport/tasks/packing_shapes.py
wx-b/cliport
110
1787421
<reponame>wx-b/cliport """Packing Shapes task.""" import os import numpy as np from cliport.tasks.task import Task from cliport.utils import utils class PackingShapes(Task): """Packing Shapes base class.""" def __init__(self): super().__init__() # self.ee = 'suction' self.max_steps ...
0
0
0
0
0
0
tensorflow/nlp/model/model_fn.py
huang-xx/cs230-code-examples
1,860
1787430
<filename>tensorflow/nlp/model/model_fn.py """Define the model.""" import tensorflow as tf def build_model(mode, inputs, params): """Compute logits of the model (output distribution) Args: mode: (string) 'train', 'eval', etc. inputs: (dict) contains the inputs of the graph (features, labels....
0
0
0
0
0
0
guillotina/event.py
rboixaderg/guillotina
173
1787433
<reponame>rboixaderg/guillotina<gh_stars>100-1000 from guillotina.component.event import async_subscribers from guillotina.component.event import sync_subscribers async def notify(event): """Notify all subscribers of ``event``.""" for subscriber in async_subscribers: await subscriber(event) def sync...
0
0
0
0
0
0
werelate/weconcur.py
menghaowei/bio-playground
124
1787434
<reponame>menghaowei/bio-playground """ from we related, we get an iterable of query intervals where each query interval has a list of related (overlapping) intervals from the other file(s). given this list, e.g.: query1: [dba, dbb, dbc] query2: [dbc, dbd, dbe, dbf] we can expand to: query1 dba query1...
0
0
0
0
0
0
main/toolkit/src2xml/source/globals.py
Grosskopf/openoffice
679
1787443
# ************************************************************* # # 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 y...
3
8
1
5
17
0
moldesign/external/pathlib.py
Autodesk/molecular-design-toolkit
147
1787444
# Copyright 2017 Autodesk 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.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
0
2
0
0
2
0
src/job-exporter/test/test_utils.py
wyatuestc/pai
1,417
1787445
# Copyright (c) Microsoft Corporation # All rights reserved. # # MIT License # # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated # documentation files (the "Software"), to deal in the Software without restriction, including without limitation # the rights to ...
0
0
0
0
0
0
train.py
bycloudai/layered-neural-atlases
213
1787486
from implicit_neural_networks import IMLP import torch import torch.optim as optim import numpy as np from evaluate import evaluate_model from datetime import datetime from loss_utils import get_gradient_loss, get_rigidity_loss, \ get_optical_flow_loss, get_optical_flow_alpha_loss from unwrap_utils import get_tupl...
0
0
0
0
0
0
UI/gui.py
yasoob/youtube-dl-GUI
203
1787502
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file '.\resources\gui_qt-designer.ui' # # Created by: PyQt5 UI code generator 5.15.4 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit this file unless you know what you are doing. from PyQt5...
0
0
0
0
0
0
cryptos/explorers/blockdozer.py
cfd2000/pybitcointool
230
1787521
<gh_stars>100-1000 from . import base_insight as insight base_url = "https://%s.blockdozer.com/insight-api" def unspent(*args, coin_symbol="bcc"): base_url_for_coin = base_url % coin_symbol return insight.unspent(base_url_for_coin, *args) def pushtx(tx, coin_symbol="bcc"): base_url_for_coin = base_url %...
0
0
0
0
0
0
code/attr_batch.py
DuanXu-97/MultiKE
102
1787563
from __future__ import annotations import random def generate_pos_triples(triples, batch_size, step) -> object: start = step * batch_size end = start + batch_size if end > len(triples): end = len(triples) pos_batch = triples[start: end] return pos_batch def generate_neg_attribute_triples...
1
3
0
0
4
0
testData/completion/dataclassKeywordArgument.py
alek-sun/pydantic-pycharm-plugin
238
1787590
<filename>testData/completion/dataclassKeywordArgument.py from dataclasses import field, MISSING from pydantic.dataclasses import dataclass def dummy(): return '123' @dataclass class A: abc: str cde: str = field(default=...) efg: str = field(default='xyz') hij: str = field(default_factory=lambda...
0
0
0
0
0
0
tests/settings/basic/fixture_to_include.py
baffolobill/django-split-settings
826
1787612
"""This file only serves as a test fixture to be included.""" FIXTURE_VALUE = __file__
0
0
0
0
0
0
lifxlan/generate_products_file.py
cannero/lifxlan
464
1787635
#!/usr/bin/env python3 # This python 3.6+ script is a quick products.py file generator import json import re import http.client import sys hev = [90, 99] relays = [70, 71, 89] buttons = [70, 71, 89] def main(): conn = http.client.HTTPSConnection("raw.githubusercontent.com") conn.request("GET", "/LIFX/product...
0
0
0
0
0
0
Trakttv.bundle/Contents/Libraries/Shared/plugin/modules/scheduler/handlers/core/base.py
disrupted/Trakttv.bundle
1,346
1787641
class Handler(object): key: None = None scope: str = 'account' def run(self, job): raise NotImplementedError
0
0
2
0
2
0
resources/rest-service/cloudify/migrations/versions/8e8314b1d848_6_2_to_6_3.py
cloudify-cosmo/cloudify-manager
124
1787652
"""Cloudify 6.2 to 6.3 DB migration Revision ID: <KEY> Revises: <PASSWORD> Create Date: 2021-08-30 16:11:00 """ import sqlalchemy as sa from alembic import op from manager_rest.storage.models_base import JSONString, UTCDateTime # revision identifiers, used by Alembic. revision = '<KEY>' down_revision = '<PASSWORD>'...
0
0
0
0
0
0
pipeline/process.py
DwangoMediaVillage/Comicolorization
122
1787659
from __future__ import annotations import numpy from PIL import Image import subprocess import sys import tempfile def detect_panel_rectangle(image_path, mfe_path, path_output: object | None=None) -> object: """ Auto panel rectangle detection. https://github.com/DwangoMediaVillage/manga_frame_extraction ...
1
2
0
0
3
0
day5/Python/pattern8.py
Grace0Hud/dailycodebase
249
1787691
''' * @author: ashwek * @date: 26/12/2018 ''' def pattern8(num): Upper = [] for i in range(1, num+1): Upper.append("* "*i + #Left Triangle " "*(num-i) + #Space "* "*i #Right Triangle ) for i in Upper: # Upper Half print(i)...
0
0
0
0
0
0
config/m600/control/crosswind_playbook_utils.py
leozz37/makani
1,178
1787699
<filename>config/m600/control/crosswind_playbook_utils.py # 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/LICE...
0
0
0
0
0
0
get_time_zone.py
DazEB2/SimplePyScripts
117
1787795
<reponame>DazEB2/SimplePyScripts<filename>get_time_zone.py<gh_stars>100-1000 #!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = 'ipetrash' if __name__ == '__main__': import dateutil.tz as dtz import pytz for name in pytz.common_timezones: print(dtz.gettz(name))
0
0
0
0
0
0
premium/backend/src/baserow_premium/admin/groups/exceptions.py
cjh0613/baserow
839
1787803
<filename>premium/backend/src/baserow_premium/admin/groups/exceptions.py<gh_stars>100-1000 class CannotDeleteATemplateGroupError(Exception): """ Raised when an attempt is made to delete a group used by a template. """
0
0
0
0
0
0
podman/tests/unit/test_network.py
kevinwylder/podman-py
106
1787817
<filename>podman/tests/unit/test_network.py<gh_stars>100-1000 import unittest import requests_mock from podman import PodmanClient, tests from podman.domain.networks import Network from podman.domain.networks_manager import NetworksManager FIRST_NETWORK = { "Name": "podman", "Id": "2f259bab93aaaaa2542ba43ef3...
0
0
0
0
0
0
bitex/api/REST/__init__.py
ligggooo/quant2018
312
1787848
from bitex.api.REST.bitfinex import BitfinexREST from bitex.api.REST.bitstamp import BitstampREST from bitex.api.REST.bittrex import BittrexREST from bitex.api.REST.bter import BterREST from bitex.api.REST.ccex import CCEXRest from bitex.api.REST.coincheck import CoincheckREST from bitex.api.REST.cryptopia import Crypt...
0
0
0
0
0
0
patcherex/techniques/__init__.py
macdaliot/patcherex
147
1787866
from .shadowstack import ShadowStack from .cpuid import CpuId from .shiftstack import ShiftStack from .adversarial import Adversarial from .binary_optimization import BinaryOptimization from .simple_ptr_enc import SimplePointerEncryption
0
0
0
0
0
0
runway/mixins.py
onicagroup/runway
134
1787914
"""Class mixins.""" from __future__ import annotations import logging from contextlib import suppress from typing import TYPE_CHECKING, cast if TYPE_CHECKING: from runway._logging import RunwayLogger LOGGER = cast("RunwayLogger", logging.getLogger(f"runway.{__name__}")) class DelCachedPropMixin: """Mixin t...
1
1
0
0
2
0
openbook_posts/migrations/0029_auto_20190423_1921.py
TamaraAbells/okuna-api
164
1787928
# Generated by Django 2.2 on 2019-04-23 17:21 from django.db import migrations, models class Migration(migrations.Migration): dependencies: list[tuple[str, str]] = [ ('openbook_posts', '0028_auto_20190414_1953'), ] operations: list[object] = [ migrations.RemoveField( model_n...
0
0
2
0
2
0
src/simian/mac/admin/maintenance.py
tristansgray/simian
326
1788014
#!/usr/bin/env python # # Copyright 2018 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
2
1
0
0
3
0
mac/pyobjc-core/PyObjCTest/test_subclass.py
albertz/music-player
132
1788019
<reponame>albertz/music-player from PyObjCTools.TestSupport import * import objc from PyObjCTest.testbndl import PyObjC_TestClass3 import sys import types # Most useful systems will at least have 'NSObject'. NSObject = objc.lookUpClass('NSObject') NSArray = objc.lookUpClass('NSArray') NSAutoreleasePool = objc.lookUpCl...
0
0
0
0
0
0
web/events/app/app.py
cclauss/fbctf-2019-challenges
213
1788021
<reponame>cclauss/fbctf-2019-challenges import hashlib from flask import Flask, make_response, redirect, render_template, request from flask.sessions import SecureCookieSessionInterface from flask_login import LoginManager, UserMixin, current_user, login_user, logout_user from flask_sqlalchemy import SQLAlchemy app =...
0
0
0
0
0
0
src/rayoptics/parax/paraxialdesign.py
diplodocuslongus/ray-optics
106
1788024
<filename>src/rayoptics/parax/paraxialdesign.py #!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright © 2018 <NAME> """ First order paraxial design space .. Created on Sat Mar 31 21:14:42 2018 .. codeauthor: <NAME> """ import numpy as np from rayoptics.optical.model_constants import ht, slp, aoi from rayoptics...
0
0
0
0
0
0
backend/chat/models.py
restato/bunnybook
131
1788029
import datetime as dt from typing import Optional from uuid import UUID from pydantic import BaseModel from sqlalchemy import Column, String, Table, ForeignKey, DateTime, Text, \ UniqueConstraint, Boolean from database.core import metadata from database.utils import uuid_pk, created_at, PgUUID chat_group = Table...
0
0
19
0
19
0
examples/transparency/reference-depth.py
Frekby/glumpy
1,074
1788032
<gh_stars>1000+ # ----------------------------------------------------------------------------- # Copyright (c) 2009-2016 <NAME>. All rights reserved. # Distributed under the (new) BSD License. # ----------------------------------------------------------------------------- import numpy as np from glumpy import app, gl,...
0
0
0
0
0
0
WebMirror/management/rss_parser_funcs/feed_parse_extractSelfTaughtJapanese.py
fake-name/ReadableWebProxy
193
1788083
<gh_stars>100-1000 def extractSelfTaughtJapanese(item): """ Self Taught Japanese """ badwords = [ 'travel', 'Japanese Study: Intermediate', 'Japanese Study: Advanced', 'contests', 'E-book publishing', 'test', 'grammar', 'research', 'Reviews', 'aside' ] if any([bad in item['ta...
0
0
0
0
0
0
Tools/Blender2.6Export/ogre_mesh_exporter/mesh_panel.py
VonChenPlus/ogre
701
1788090
<gh_stars>100-1000 # ##### BEGIN MIT LICENSE BLOCK ##### # Copyright (C) 2011 by <NAME> # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the ...
0
0
0
0
0
0
vilya/libs/import_obj.py
mubashshirjamal/code
1,582
1788102
# coding:utf-8 __import_obj_local__ = {} class import_obj(object): def __init__(self, key): __import_obj_local__[key] = self self.__dict__["_real"] = None def __getattr__(self, attr): return getattr(self._real, attr) def __setattr__(self, attr, value): setattr(self._rea...
0
0
0
0
0
0
RecoBTag/PerformanceDB/python/measure/Pool_calo33.py
ckamtsikis/cmssw
852
1788107
<reponame>ckamtsikis/cmssw import FWCore.ParameterSet.Config as cms from CondCore.DBCommon.CondDBCommon_cfi import * PoolDBESSourceCalo33 = cms.ESSource("PoolDBESSource", CondDBCommon, toGet = cms.VPSet( # # working points # cms.PSet( rec...
0
0
0
0
0
0
tests/ctc_decoder_test.py
gglin001/poptorch
128
1788127
#!/usr/bin/env python3 # Copyright (c) 2021 Graphcore Ltd. All rights reserved. import torch import poptorch class Model(torch.nn.Module): def forward(self, log_probs, lengths) -> object: return poptorch.ctc_beam_search_decoder(log_probs, lengths) def test_ctc_decoder(): input_size = 9 batch_si...
0
1
0
0
1
0
tests/components/solax/__init__.py
MrDelik/core
30,023
1788128
"""Tests for the solax integration."""
0
0
0
0
0
0
encoder/rcnn.py
zhufz/nlp_research
160
1788150
<gh_stars>100-1000 #-*- coding:utf-8 -*- import tensorflow as tf from tensorflow.contrib import rnn from common.layers import get_initializer from encoder import EncoderBase import pdb import copy class RCNN(EncoderBase): def __init__(self, **kwargs): super(RCNN, self).__init__(**kwargs) self.rnn_t...
0
0
0
0
0
0
flocker/common/_era.py
stackriot/flocker
2,690
1788157
# Copyright ClusterHQ Inc. See LICENSE file for details. """ Era information for Flocker nodes. Every time a node reboots it gets a new, globally unique era. """ import sys from uuid import UUID from zope.interface import implementer from twisted.internet.defer import succeed from twisted.python.filepath import F...
0
3
1
0
4
0
utilities/mcworld_support.py
bennettdc/MCEdit-Unified
237
1788196
<gh_stars>100-1000 import tempfile import shutil import zipfile import atexit import os import glob DO_REMOVE = True def trim_any_leftovers(): print tempfile.gettempdir() leftovers = glob.glob(os.path.join(tempfile.gettempdir(), 'mcworld_*', '')) for d in leftovers: print "Found left over director...
0
0
0
0
0
0
malaya_speech/train/model/wav2vec2/__init__.py
ishine/malaya-speech
111
1788206
from .config import Wav2Vec2Config from .model import Model
0
0
0
0
0
0
sdk/python/pulumi_azure/streamanalytics/output_synapse.py
henriktao/pulumi-azure
109
1788255
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** from __future__ import annotations import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Seque...
69
25
0
0
94
0
venv/lib/python3.9/site-packages/pendulum/lang/uz.py
qarik-hanrattyjen/apache-airflow-backport-providers-google-2021.3.3
224
1788308
<reponame>qarik-hanrattyjen/apache-airflow-backport-providers-google-2021.3.3 # -*- coding: utf-8 -*- translations = { # Days 'days': { 0: 'Якшанба', 1: 'Душанба', 2: 'Сешанба', 3: 'Чоршанба', 4: 'Пайшанба', 5: 'Жума', 6: 'Шанба' }, 'days_abbrev':...
0
0
0
0
0
0
applications/PfemApplication/tests/materials.py
lkusch/Kratos
778
1788329
<reponame>lkusch/Kratos # Importing the Kratos Library import KratosMultiphysics import KratosMultiphysics.ConstitutiveModelsApplication as KratosMaterial def AssignMaterial(Properties): prop_id = 1 prop = Properties[prop_id] mat = KratosMaterial.NewtonianFluidPlaneStrain2DLaw() prop.SetValue(KratosMu...
0
0
0
0
0
0
src/resource-mover/azext_resource_mover/generated/commands.py
Mannan2812/azure-cli-extensions
207
1788333
# -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incor...
0
0
0
0
0
0
galaxy/main/migrations/0088_auto_20180328_1209.py
bmclaughlin/galaxy
904
1788339
from django.db import migrations class Migration(migrations.Migration): dependencies: list[tuple[str, str]] = [ ('main', '0086_auto_20180328_1147'), ] operations: list[object] = [ migrations.RemoveField( model_name='content', name='travis_build_url', ), ...
0
0
2
0
2
0
src/tests/test_cnn_face_attr_celaba.py
timgates42/transparent_latent_gan
1,922
1788382
import importlib import src.model.cnn_face_attr_celeba as cnn_face importlib.reload(cnn_face) img_name, df_attr = cnn_face.get_data_info() model = cnn_face.create_cnn_model() x, y = cnn_face.get_data_sample(yn_interactive_plot=True) x_all, y_all = cnn_face.load_data_batch(num_images_total=2**16) cnn_face.train_pro...
0
0
0
0
0
0
src/genie/libs/parser/iosxr/tests/ShowImDampeningIntf/cli/equal/golden_output1_expected.py
balmasea/genieparser
204
1788445
<filename>src/genie/libs/parser/iosxr/tests/ShowImDampeningIntf/cli/equal/golden_output1_expected.py expected_output = { 'interface': { 'GigabitEthernet0/2/0/0': { 'currently_suppressed': 'no', 'dampening_status': 'enabled', 'half_life': 1, 'interface_handler'...
0
0
0
0
0
0
prince/__init__.py
vishalbelsare/prince
749
1788477
<filename>prince/__init__.py from .ca import CA from .famd import FAMD from .mca import MCA from .mfa import MFA from .pca import PCA from .gpa import GPA from .__version__ import __version__
0
0
0
0
0
0
peeringdb_server/migrations/0054_add_network_types_and_prefix_description.py
CyberFlameGO/peeringdb
224
1788504
# Generated by Django 2.2.16 on 2020-10-06 16:32 from django.db import migrations, models class Migration(migrations.Migration): dependencies: list[tuple[str, str]] = [ ("peeringdb_server", "0053_alter_fac_website"), ] operations: list[object] = [ migrations.AlterField( mode...
0
0
2
0
2
0
RecoEgamma/EgammaElectronProducers/python/electronEDIsolationValues_cff.py
ckamtsikis/cmssw
852
1788550
<reponame>ckamtsikis/cmssw<filename>RecoEgamma/EgammaElectronProducers/python/electronEDIsolationValues_cff.py import FWCore.ParameterSet.Config as cms from RecoEgamma.EgammaElectronProducers.electronPFIsolationValues_cff import * elEDIsoValueCharged03 = elPFIsoValueCharged03.clone(deposits = {0: dict(src ='elEDIsoDe...
0
0
0
0
0
0
tests/test_utils.py
Avinashpuresoftware/channels_redis
363
1788593
<gh_stars>100-1000 import pytest from channels_redis.utils import _consistent_hash @pytest.mark.parametrize( "value,ring_size,expected", [ ("key_one", 1, 0), ("key_two", 1, 0), ("key_one", 2, 1), ("key_two", 2, 0), ("key_one", 10, 6), ("key_two", 10, 4), ...
0
0
0
0
0
0
dm/templates/managed_instance_group/managed_instance_group.py
rafaelcavazin/cloud-foundation-toolkit
688
1788597
# Copyright 2018 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
0
9
0
0
9
0
dashlivesim/dashlib/chunker.py
Dash-Industry-Forum/dash-live-source-simulator
133
1788640
"""Chunkify an ISOBMFF segment. Either as library or command line tool.""" # The copyright in this software is being made available under the BSD License, # included below. This software may be subject to other third party and contributor # rights, including patent rights, and no such rights are granted under this lic...
0
1
0
0
1
0
tests/integration/cli/commands/test_test.py
avosper-intellaegis/runway
134
1788716
<filename>tests/integration/cli/commands/test_test.py """Test ``runway test``.""" from __future__ import annotations import logging from typing import TYPE_CHECKING import yaml from click.testing import CliRunner from runway._cli import cli SUCCESS = { "name": "success", "type": "script", "args": {"comm...
0
0
0
0
0
0
core/apps/stats_api/views.py
near-feign/pcapdb
244
1788745
<reponame>near-feign/pcapdb from collections import defaultdict from _datetime import datetime, timedelta import pytz from django.db.models import Sum from rest_framework import serializers from rest_framework.response import Response from apps.search_head_api.models import CaptureNode, Site from apps.search_head_api...
0
0
0
0
0
0
src/ralph/health_check.py
elubik/ralph
1,668
1788748
<gh_stars>1000+ import logging from django.conf import settings from django.db import connections from django.http import HttpResponse from django.views.decorators.http import require_GET from ralph.lib.redis import get_redis_connection logger = logging.getLogger(__name__) # StrictRedis will maintain connection (po...
0
0
0
0
0
0
th_taiga/models.py
Leopere/django-th
1,069
1788760
# coding: utf-8 from django.db import models from django_th.models.services import Services from django_th.models import TriggerService class Taiga(Services): """ Model for Taiga Service """ project_name = models.CharField(max_length=50, blank=True) webhook_secret_key = models.CharField(max_le...
0
2
2
0
4
0
src/python/nimbusml/tests/idv/test_idv.py
montehoover/NimbusML
134
1788785
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. # -------------------------------------------------------------------------------------------- import unittest import numpy as np...
0
2
0
0
2
0