blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
4
721
content_id
stringlengths
40
40
detected_licenses
listlengths
0
57
license_type
stringclasses
2 values
repo_name
stringlengths
5
91
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringclasses
321 values
visit_date
timestamp[ns]date
2016-08-12 09:31:09
2023-09-06 10:45:07
revision_date
timestamp[ns]date
2010-09-28 14:01:40
2023-09-06 06:22:19
committer_date
timestamp[ns]date
2010-09-28 14:01:40
2023-09-06 06:22:19
github_id
int64
426
681M
star_events_count
int64
101
243k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
23 values
gha_event_created_at
timestamp[ns]date
2012-06-28 18:51:49
2023-09-14 21:59:16
gha_created_at
timestamp[ns]date
2008-02-11 22:55:26
2023-08-10 11:14:58
gha_language
stringclasses
147 values
src_encoding
stringclasses
26 values
language
stringclasses
2 values
is_vendor
bool
2 classes
is_generated
bool
2 classes
length_bytes
int64
6
10.2M
extension
stringclasses
115 values
filename
stringlengths
3
113
content
stringlengths
6
10.2M
986592bccc62ff162ed29115943468c6dea37481
d6fa794ed25855fc4aeb0be95de564b1606a200b
/misc/experience.py
970f4b41aed599247a57f902538a776f14ac7903
[ "Apache-2.0" ]
permissive
jacobandreas/psketch
00467106c13601736eb305dd52114bf1612ceacc
f9cfca81ce7c489c45e853adcf5ece82466b65e3
refs/heads/master
2021-07-14T12:45:04.123074
2021-07-07T19:11:18
2021-07-07T19:11:18
67,570,341
104
43
null
2021-07-07T19:11:19
2016-09-07T03:56:30
Jupyter Notebook
UTF-8
Python
false
false
110
py
experience.py
from collections import namedtuple Transition = namedtuple("Transition", ["s1", "m1", "a", "s2", "m2", "r"])
225d31d2303c5c3c07bbe15f7f9d1515aa279fb3
94a9151461546883c43192527d12a36126b1003b
/test/test_languages/testJavaScript.py
5bef03f5f22ea543eb323e4749d6c08fc1d56bb4
[ "MIT" ]
permissive
terryyin/lizard
b4a0805ab05eea7d1a25be27155d87113794c2e6
3f4c17fdfd625d7c6860379a77af56813e901026
refs/heads/master
2023-09-01T15:35:23.888140
2023-08-18T02:10:09
2023-08-18T02:10:09
4,738,329
1,595
248
NOASSERTION
2023-08-18T02:10:11
2012-06-21T11:31:46
Python
UTF-8
Python
false
false
3,717
py
testJavaScript.py
import unittest from lizard import analyze_file, FileAnalyzer, get_extensions from lizard_languages import JavaScriptReader def get_js_function_list(source_code): return analyze_file.analyze_source_code("a.js", source_code).function_list class Test_tokenizing_JavaScript(unittest.TestCase): def check_token...
b8c5e5bd1b259e1257c1425c1308590af839cd24
3dc647cd07a7361ed401e40d2b7cce8c826c8f6c
/Lib/importlib/__init__.py
ce61883288aa350f877cd3b3caaeb6865f888bab
[ "CC-BY-4.0", "MIT", "Python-2.0" ]
permissive
RustPython/RustPython
5ddce4a9848b9de8c041ffd2634f83c0105d3f39
b864e5da1f18897fc884180b7093df5aa170024f
refs/heads/main
2023-09-04T12:38:29.458699
2023-09-03T12:33:42
2023-09-03T12:33:42
135,201,145
15,815
1,302
MIT
2023-09-14T08:11:45
2018-05-28T19:27:01
Rust
UTF-8
Python
false
false
6,089
py
__init__.py
"""A pure Python implementation of import.""" __all__ = ['__import__', 'import_module', 'invalidate_caches', 'reload'] # Bootstrap help ##################################################### # Until bootstrapping is complete, DO NOT import any modules that attempt # to import importlib._bootstrap (directly or indirect...
4a80192acd3f5bd5785129fba96cae73e0f79d41
4caa087dcb95a6a7dbe8cc49fde383e9f2aa4426
/mmtrack/models/sot/siamrpn.py
86291c0795fc5c39c171a8e321ef86a6baecdf87
[ "Apache-2.0" ]
permissive
open-mmlab/mmtracking
1e55c69cc1a264b3c9546c19332a38e9621430ed
e79491ec8f0b8c86fda947fbaaa824c66ab2a991
refs/heads/master
2023-09-01T15:41:04.322684
2023-04-25T13:25:18
2023-04-25T13:25:18
291,213,368
3,263
604
Apache-2.0
2023-08-26T04:05:00
2020-08-29T06:16:56
Python
UTF-8
Python
false
false
18,593
py
siamrpn.py
# Copyright (c) OpenMMLab. All rights reserved. import warnings import numpy as np import torch from addict import Dict from mmdet.core.bbox import bbox_cxcywh_to_xyxy from mmdet.models.builder import build_backbone, build_head, build_neck from torch.nn.modules.batchnorm import _BatchNorm from torch.nn.modules.conv im...
cf582d807e95a90e9714fc7727af753f26c4ea10
afd2087e80478010d9df66e78280f75e1ff17d45
/test/jit/test_profiler.py
5389751a5becc8e37bd2b48d8b086a2eb6e569ed
[ "BSD-3-Clause", "BSD-2-Clause", "LicenseRef-scancode-secret-labs-2011", "LicenseRef-scancode-generic-cla", "BSL-1.0", "Apache-2.0" ]
permissive
pytorch/pytorch
7521ac50c47d18b916ae47a6592c4646c2cb69b5
a6f7dd4707ac116c0f5fb5f44f42429f38d23ab4
refs/heads/main
2023-08-03T05:05:02.822937
2023-08-03T00:40:33
2023-08-03T04:14:52
65,600,975
77,092
24,610
NOASSERTION
2023-09-14T21:58:39
2016-08-13T05:26:41
Python
UTF-8
Python
false
false
10,256
py
test_profiler.py
# Owner(s): ["oncall: jit"] import os import sys import torch from torch.testing._internal.common_utils import skipIfTorchDynamo # Make the helper files in test/ importable pytorch_test_dir = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) sys.path.append(pytorch_test_dir) from torch.testing._internal.j...
9ecef0198891d39a7a63ba244c5c29682992f03b
eb9f655206c43c12b497c667ba56a0d358b6bc3a
/python/helpers/typeshed/stubs/SQLAlchemy/sqlalchemy/ext/asyncio/__init__.pyi
e065d748f177c8f8fa813c3ba60046b646d1dd38
[ "Apache-2.0", "MIT" ]
permissive
JetBrains/intellij-community
2ed226e200ecc17c037dcddd4a006de56cd43941
05dbd4575d01a213f3f4d69aa4968473f2536142
refs/heads/master
2023-09-03T17:06:37.560889
2023-09-03T11:51:00
2023-09-03T12:12:27
2,489,216
16,288
6,635
Apache-2.0
2023-09-12T07:41:58
2011-09-30T13:33:05
null
UTF-8
Python
false
false
691
pyi
__init__.pyi
from .engine import ( AsyncConnection as AsyncConnection, AsyncEngine as AsyncEngine, AsyncTransaction as AsyncTransaction, create_async_engine as create_async_engine, ) from .events import AsyncConnectionEvents as AsyncConnectionEvents, AsyncSessionEvents as AsyncSessionEvents from .result import Async...
ae6bf4dcf365951a210909b471a19d9c27840a80
f52b9b0419c7347441cf72b45b9e83b3ba2f076a
/doc/source/_static/plotter.py
14f35f28d860b0326aefcef0bf0d4a2bc62c2f2a
[ "MIT" ]
permissive
coin-or/pulp
9ea6dcec98b389e6440aa6fce63722186598151c
bd7cace5ada53576912b1aac59fb7409a5c06b33
refs/heads/master
2023-09-05T03:54:19.103230
2023-08-08T06:54:27
2023-08-08T06:54:27
32,243,098
1,824
424
NOASSERTION
2023-09-04T22:02:53
2015-03-15T03:21:16
Python
UTF-8
Python
false
false
1,306
py
plotter.py
#!/usr/bin/env python from matplotlib import rc rc("text", usetex=True) rc("font", family="serif") def plot_interval(a, c, x_left, x_right, i, fbound): lh = c * (1 - a[0]) rh = c * (1 + a[1]) x = arange(x_left, x_right + 1) y = 0 * x arrow_r = Arrow(c, 0, c * a[1], 0, 0.2) arrow_l = Arrow(c,...
796fa672f2ba453436b2aedeb1146e6855408922
a0eb6744e6f7f509b96d21f0bc8b3f8387f6861c
/notebook/numpy_hsplit.py
a5a7dbbe64ba14e9cb7e5581026f2ed3e456e7d8
[ "MIT" ]
permissive
nkmk/python-snippets
a6c66bdf999502e52f4795a3074ced63bf440817
f9dd286a9cf93f474e20371f8fffc4732cb3c4d5
refs/heads/master
2023-08-03T04:20:05.606293
2023-07-26T13:21:11
2023-07-26T13:21:11
98,900,570
253
77
MIT
2020-10-25T01:12:53
2017-07-31T14:54:47
Jupyter Notebook
UTF-8
Python
false
false
591
py
numpy_hsplit.py
import numpy as np a = np.arange(16).reshape(4, 4) print(a) # [[ 0 1 2 3] # [ 4 5 6 7] # [ 8 9 10 11] # [12 13 14 15]] a0, a1 = np.hsplit(a, 2) print(a0) # [[ 0 1] # [ 4 5] # [ 8 9] # [12 13]] print(a1) # [[ 2 3] # [ 6 7] # [10 11] # [14 15]] a0, a1 = np.hsplit(a, [1]) print(a0) # [[ 0] # [ ...
66223809002d31206bb04f339bf17faf925e6b2f
06051bac2aeaecc738cd488965c52e976ab59fe3
/logmine_pkg/cluster_merge.py
9a0868729f79c37026d11a7c233e16931d5b41d2
[ "MIT" ]
permissive
trungdq88/logmine
ce9588440b13925306bcefe46cdda1babe638c83
6ac777a41bbb870707a6f1471b6b78f1af17e127
refs/heads/master
2022-01-10T14:42:25.066856
2022-01-06T03:37:57
2022-01-06T03:37:57
218,324,124
148
37
MIT
2022-01-06T03:37:17
2019-10-29T15:45:49
Python
UTF-8
Python
false
false
964
py
cluster_merge.py
from .clusterer import Clusterer class ClusterMerge(): def __init__(self, config): self.clusterer = Clusterer(**config) self.pattern_generator = self.clusterer.pattern_generator def merge(self, base_list, other_list): for [reprA, countA, patternA] in other_list: exists = F...
90bb6de5a24436fec83af9d1d1427055591027d2
993f18c21402d7a4ff21ddb7ff2ec6c80e466f20
/onnx/backend/test/case/node/squeeze.py
e11cb39de451b36f09330d1895dfdf4f10f29daf
[ "Apache-2.0" ]
permissive
onnx/onnx
10d3916803c7babff89ec0fa9045127bcccad376
8a475b34cb3875df311a46f57571646498f5bda7
refs/heads/main
2023-08-18T18:50:03.388353
2023-08-16T22:18:46
2023-08-16T22:18:46
102,692,863
16,164
4,150
Apache-2.0
2023-09-14T17:10:38
2017-09-07T04:53:45
Python
UTF-8
Python
false
false
1,052
py
squeeze.py
# Copyright (c) ONNX Project Contributors # # SPDX-License-Identifier: Apache-2.0 import numpy as np import onnx from onnx.backend.test.case.base import Base from onnx.backend.test.case.node import expect class Squeeze(Base): @staticmethod def export_squeeze() -> None: node = onnx.helper.make_node( ...
91b78d086dd3bc18f814571689bfae277f2ba9eb
e22eeb5256e17a96a98b3ff25433aec2d641cd2c
/openstack/tests/unit/cloud/test_server_group.py
fc14432213a58fb0dfd40f689e99676da9ff8065
[ "Apache-2.0" ]
permissive
openstack/openstacksdk
b4b95fd7869653feea5a3b783e9a5c588235c039
d474eb84c605c429bb9cccb166cabbdd1654d73c
refs/heads/master
2023-09-03T22:50:03.398512
2023-07-27T14:09:35
2023-08-29T16:28:46
16,223,378
124
130
Apache-2.0
2023-09-06T02:52:47
2014-01-25T02:48:00
Python
UTF-8
Python
false
false
2,765
py
test_server_group.py
# 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, software # distributed under t...
fb23bb2186854cd1c0188daedea91e0002d44542
23a6340f5b63c2bb31ad686bc26001511e47e05f
/tests/builder/custom_params_test.py
4230862ec12d41dee6b5ad7ae96bf7c1d69692f4
[ "Apache-2.0" ]
permissive
googlefonts/glyphsLib
f945a3ddc7e905e5ac52a5fc3d77ee886138813e
8577f8309725681842db493f46bd27b17b92d159
refs/heads/main
2023-08-25T18:57:17.481591
2023-08-20T20:56:23
2023-08-20T20:56:23
44,563,779
110
29
Apache-2.0
2023-09-04T08:44:15
2015-10-19T21:00:22
Python
UTF-8
Python
false
false
27,318
py
custom_params_test.py
# # Copyright 2016 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...
f42c32a17f474f025c0e22f3db84f63d9ffcdc13
a3d6556180e74af7b555f8d47d3fea55b94bcbda
/ios/chrome/browser/ui/default_promo/DEPS
5b41351ad9ca6dc2337311bb6d1565215fff1fa2
[ "BSD-3-Clause" ]
permissive
chromium/chromium
aaa9eda10115b50b0616d2f1aed5ef35d1d779d6
a401d6cf4f7bf0e2d2e964c512ebb923c3d8832c
refs/heads/main
2023-08-24T00:35:12.585945
2023-08-23T22:01:11
2023-08-23T22:01:11
120,360,765
17,408
7,102
BSD-3-Clause
2023-09-10T23:44:27
2018-02-05T20:55:32
null
UTF-8
Python
false
false
154
DEPS
include_rules = [ "+ios/chrome/browser/ui/infobars", "+ios/chrome/browser/ui/policy/user_policy_util.h", "+ios/chrome/browser/ui/promos_manager", ]
7d81e6302418aa07d6175d9a25e253d773b9e63d
2d0bada349646b801a69c542407279cc7bc25013
/src/vai_quantizer/vai_q_pytorch/nndct_shared/utils/parameters.py
d9b3e486b8420aa0887d226825e6975cea12af1b
[ "Apache-2.0", "BSD-2-Clause", "BSD-3-Clause", "LicenseRef-scancode-generic-cla", "BSD-3-Clause-Open-MPI", "LicenseRef-scancode-free-unknown", "Libtool-exception", "GCC-exception-3.1", "LicenseRef-scancode-mit-old-style", "OFL-1.1", "JSON", "LGPL-2.1-only", "LGPL-2.0-or-later", "ICU", "Li...
permissive
Xilinx/Vitis-AI
31e664f7adff0958bb7d149883ab9c231efb3541
f74ddc6ed086ba949b791626638717e21505dba2
refs/heads/master
2023-08-31T02:44:51.029166
2023-07-27T06:50:28
2023-07-27T06:50:28
215,649,623
1,283
683
Apache-2.0
2023-08-17T09:24:55
2019-10-16T21:41:54
Python
UTF-8
Python
false
false
6,512
py
parameters.py
# # Copyright 2019 Xilinx 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 writi...
d944e449ce39567cb55446337d76f39698be3e7f
eb7afa613940f5a3f202352a94dd996edcb6bed5
/boto3_type_annotations/boto3_type_annotations/lex_models/client.py
908801b11d3cf7e1085f9253bad024cd404ed882
[ "MIT" ]
permissive
alliefitter/boto3_type_annotations
e4da614e27a1d2ad3c9c653c50b8e30108180da5
2a88aa562b1aee6e8a6cc30402980884b3707fbb
refs/heads/master
2020-04-05T22:05:12.689913
2019-11-28T03:32:13
2019-11-28T03:32:13
157,244,330
131
11
MIT
2023-04-21T17:17:03
2018-11-12T16:38:57
Python
UTF-8
Python
false
false
4,817
py
client.py
from typing import Optional from botocore.client import BaseClient from typing import Dict from typing import Union from botocore.paginate import Paginator from botocore.waiter import Waiter from typing import List class Client(BaseClient): def can_paginate(self, operation_name: str = None): pass def...
45a4de47a9b3cde94f040d3f6a9e9de502fcc26f
0b134572e3ac3903ebb44df6d4138cbab9d3327c
/app/grandchallenge/retina_api/mixins.py
3e720390102348df0c442d1761a2f657ed1bfb27
[ "Apache-2.0" ]
permissive
comic/grand-challenge.org
660de3bafaf8f4560317f1dfd9ae9585ec272896
dac25f93b395974b32ba2a8a5f9e19b84b49e09d
refs/heads/main
2023-09-01T15:57:14.790244
2023-08-31T14:23:04
2023-08-31T14:23:04
4,557,968
135
53
Apache-2.0
2023-09-14T13:41:03
2012-06-05T09:26:39
Python
UTF-8
Python
false
false
1,522
py
mixins.py
from django.conf import settings from django.contrib.auth.mixins import AccessMixin from rest_framework import permissions def is_in_retina_graders_group(user): """ Checks if the user is in the retina graders group :param user: Django User model :return: true/false """ return user.groups.filte...
fae7436de9869df0f9451c3ba19d168f49d4b459
c058f51b99f91faebf27183b2b579e9f96e0d8f5
/test/sampling/pathwise/features/test_maps.py
842d2164c9c65daed6ed5ad58853d820a7c05423
[ "MIT" ]
permissive
pytorch/botorch
255d62f698cc615c750e9343c278a63c7e96a586
4cc5ed59b2e8a9c780f786830c548e05cc74d53c
refs/heads/main
2023-08-22T15:23:51.071048
2023-08-22T05:30:38
2023-08-22T05:30:38
142,940,093
2,891
373
MIT
2023-09-13T00:16:13
2018-07-30T23:59:57
Jupyter Notebook
UTF-8
Python
false
false
2,783
py
test_maps.py
#!/usr/bin/env python3 # Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from __future__ import annotations from unittest.mock import MagicMock, patch import torch from botorch.sampling.pa...
7260a6ee524ff3143a05adea7c3cbecd9186e6dc
fa1ad2e2ac7e376fc7cb3b3a6e1bb88eed3e80be
/ai/modelscope/modelscope/models/nlp/mglm/arguments.py
4fa33c65aabd3f77791e65ef0e8bc2934c2e7a73
[ "Apache-2.0", "BSD-3-Clause", "MIT" ]
permissive
alldatacenter/alldata
7bc7713c9f1d56ad6b8e59ea03206d1073b7e047
8d5f9a2d49ab8f9e85ccf058cb02c2fda287afc6
refs/heads/master
2023-08-05T07:32:25.442740
2023-08-03T13:17:24
2023-08-03T13:17:24
213,321,771
774
250
Apache-2.0
2023-09-06T17:35:32
2019-10-07T07:36:18
null
UTF-8
Python
false
false
28,115
py
arguments.py
# Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
00377ecaf73aa02e217607b4b219b55c50c6562e
d6f6d1d1aac892f7555c8ae436430f8da415b455
/chempy/properties/tests/test_water_permittivity_bradley_pitzer_1979.py
2dd2e87ea116f006bd6f6889a31cf3f09676d768
[ "BSD-2-Clause", "LicenseRef-scancode-unknown-license-reference" ]
permissive
bjodah/chempy
9884e1475cb62ec9c5ae3ecc0833efe7e36dbbab
1ef1bf6751884b57dc13dc420e1f5c634e954375
refs/heads/master
2023-08-10T07:47:32.227130
2023-07-16T09:59:09
2023-07-16T10:13:17
36,242,853
481
92
BSD-2-Clause
2023-07-16T09:57:03
2015-05-25T16:49:18
Python
UTF-8
Python
false
false
946
py
test_water_permittivity_bradley_pitzer_1979.py
import warnings from chempy.units import allclose from ..water_permittivity_bradley_pitzer_1979 import water_permittivity from chempy.util.testing import requires from chempy.units import linspace, units_library, default_units as u def test_water_permittivity(): warnings.filterwarnings("error") abs(water_pe...
b499273b366149f19f161a7b9d6ab113f2b0d70f
93713f46f16f1e29b725f263da164fed24ebf8a8
/Library/lib/python3.7/site-packages/astropy-4.0-py3.7-macosx-10.9-x86_64.egg/astropy/io/misc/asdf/tags/time/timedelta.py
530faf046aa31e8f773debf67396bcf04236a562
[ "BSD-3-Clause" ]
permissive
holzschu/Carnets
b83d15136d25db640cea023abb5c280b26a9620e
1ad7ec05fb1e3676ac879585296c513c3ee50ef9
refs/heads/master
2023-02-20T12:05:14.980685
2023-02-13T15:59:23
2023-02-13T15:59:23
167,671,526
541
36
BSD-3-Clause
2022-11-29T03:08:22
2019-01-26T09:26:46
Python
UTF-8
Python
false
false
1,147
py
timedelta.py
# Licensed under a 3-clause BSD style license - see LICENSE.rst # -*- coding: utf-8 -*- import functools from asdf.yamlutil import custom_tree_to_tagged_tree import numpy as np from astropy.time import TimeDelta from ...types import AstropyType __all__ = ['TimeDeltaType'] allclose_jd = functools.partial(np.allclos...
19afef6d37f64e7703d5a5ea87773b993cbf721e
dc387b1d0c247aca4d6227a2dcc34c30cd2558fd
/translation/gnmt/tensorflow/nmt/nmt.py
ce9e683e145e3e92c10d3b5f5a5065ec4930785a
[ "Apache-2.0" ]
permissive
mlcommons/inference
6f0c725fb3a8d65c349bbd60be23e1db7f8dea74
c540fcc99eeacfb5c51de8daa0f8cca339f50799
refs/heads/master
2023-08-29T11:09:18.621119
2023-08-25T16:22:26
2023-08-25T16:22:26
148,566,613
575
253
Apache-2.0
2023-09-11T11:26:45
2018-09-13T01:53:57
Python
UTF-8
Python
false
false
29,871
py
nmt.py
# Copyright 2017 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...
cd5e0182a7151757bed1182a4e470e61ea9f67bc
48cd6a93fe538693fec65aaa81306e6b69b642ad
/dask/widgets/tests/test_widgets.py
3eac0eed5648272bd499f1103a793deae152c7f1
[ "BSD-3-Clause", "LicenseRef-scancode-unknown-license-reference" ]
permissive
dask/dask
0138cc2fb9aad27287643fe5ee240b8b09f2300d
18098d35298bad21c878c339d73de784612566c7
refs/heads/main
2023-09-04T02:39:37.886054
2023-09-01T19:02:00
2023-09-01T19:02:00
28,782,747
11,423
2,116
BSD-3-Clause
2023-09-14T17:36:04
2015-01-04T18:50:00
Python
UTF-8
Python
false
false
1,401
py
test_widgets.py
from __future__ import annotations import os.path import pytest jinja2 = pytest.importorskip("jinja2") from dask.utils import format_bytes from dask.widgets import FILTERS, TEMPLATE_PATHS, get_environment, get_template @pytest.fixture(autouse=True) def setup_testing(): TEMPLATE_PATHS.append( os.path.j...
f802611d8e4aa4a5ae7910bac29a4d116b3aa43c
b26c41926fa3a7c2c061132d80e91a2750f2f468
/tensorflow_probability/python/experimental/auto_batching/test_programs.py
8557603cf3da65a018847a39dd9c878ee16d3a37
[ "Apache-2.0" ]
permissive
tensorflow/probability
22e679a4a883e408f8ef237cda56e3e3dfa42b17
42a64ba0d9e0973b1707fcd9b8bd8d14b2d4e3e5
refs/heads/main
2023-09-04T02:06:08.174935
2023-08-31T20:30:00
2023-08-31T20:31:33
108,053,674
4,055
1,269
Apache-2.0
2023-09-13T21:49:49
2017-10-23T23:50:54
Jupyter Notebook
UTF-8
Python
false
false
22,302
py
test_programs.py
# Copyright 2018 The TensorFlow Probability Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
a4eb76f8b2fa264de03022356955f46332a62f73
25c5d243ffac4b4f4f9efcd6a28cb41d51b23c90
/src/main/python/tests/manual_tests/multi_log_reg_mnist.py
79cda6d8181cb9db6f029f30996190a615f24068
[ "Apache-2.0" ]
permissive
apache/systemds
5351e8dd9aa842b693e8c148cf3be151697f07a7
73555e932a516063c860f5d05c84e6523cc7619b
refs/heads/main
2023-08-31T03:46:03.010474
2023-08-30T18:25:59
2023-08-30T18:34:41
45,896,813
194
167
Apache-2.0
2023-09-13T08:43:37
2015-11-10T08:00:06
Java
UTF-8
Python
false
false
1,565
py
multi_log_reg_mnist.py
# ------------------------------------------------------------- # # 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 unde...
e93c678f059c67d515be0b0595861bf79caadae2
2d5f297ec3274ce93f1f5592d5b80c2605f8edc5
/pydiffvg_tensorflow/shape.py
432a3b5dc2fd1b8eb03c306a8123c76e6b9302ff
[ "Apache-2.0" ]
permissive
BachiLi/diffvg
9ec3e3e7b3674c82ca42b18fe49c69991c076370
6f60468bfdef5b9fec8cc3fa47b441dc2720eefc
refs/heads/master
2023-06-21T18:49:09.604301
2023-06-13T17:16:46
2023-06-13T17:16:46
292,727,955
747
134
Apache-2.0
2023-06-13T17:16:47
2020-09-04T02:23:40
Python
UTF-8
Python
false
false
1,773
py
shape.py
import tensorflow as tf import math class Circle: def __init__(self, radius, center, stroke_width = tf.constant(1.0), id = ''): self.radius = radius self.center = center self.stroke_width = stroke_width self.id = id class Ellipse: def __init__(self, radius, center, stroke_width...
ca3cdf1a8655334b28d44b1d680b47172e5bc5f9
b32df2ffae14c3ca8083f36f93165c220aef5e44
/blueoil/configs/core/keypoint_detection/lm_single_pose_v1_quantize_mscoco.py
7ff58d5786eb338b869282803c65b88f58232034
[ "Apache-2.0" ]
permissive
blue-oil/blueoil
213659909b6eac26dd249f878a03ed732b639539
0c9160b524b17482d59ae48a0c11384f1d26dccc
refs/heads/master
2023-01-24T05:10:54.825811
2021-04-22T08:46:56
2021-04-22T08:46:56
153,597,157
252
111
Apache-2.0
2021-05-10T05:02:45
2018-10-18T09:19:36
Python
UTF-8
Python
false
false
3,359
py
lm_single_pose_v1_quantize_mscoco.py
# -*- coding: utf-8 -*- # Copyright 2018 The Blueoil 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 # # Unles...
6883e3c83fa60abf8cc296b706b5647dd80e5a08
2bbc2628e5b4aaf1e67e04b5485ffc621e088a4d
/qa/L0_cmdline_trace/trace_client.py
4d59579d7cb55f3e44439c757f4e342369bda54a
[ "BSD-3-Clause" ]
permissive
triton-inference-server/server
9dbce65aba73ef36a0d2399ed9d63eccb9f84e52
0f478f32fe74f591400c3a073e253f7dae8a383e
refs/heads/main
2023-08-16T16:46:50.059935
2023-08-15T22:58:44
2023-08-15T22:58:44
151,636,194
4,711
1,085
BSD-3-Clause
2023-09-14T11:14:08
2018-10-04T21:10:30
Python
UTF-8
Python
false
false
3,064
py
trace_client.py
#!/usr/bin/env python # Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # * Redistributions of source code must retain the above copyright # notice, thi...
70e39013176d52be9bbff47aaff5dbd409506237
0bcd128368e2de959ca648960ffd7944067fcf27
/tools/parse_llvm_coverage.py
5569fadac98754e0c30100b6ac3506f37f077791
[ "BSD-3-Clause", "LicenseRef-scancode-unknown-license-reference" ]
permissive
google/skia
ac6e39179cd33cf0c8a46d29c1a70bf78b4d74ee
bf6b239838d3eb56562fffd0856f4047867ae771
refs/heads/main
2023-08-31T21:03:04.620734
2023-08-31T18:24:15
2023-08-31T20:20:26
15,773,229
8,064
1,487
BSD-3-Clause
2023-09-11T13:42:07
2014-01-09T17:09:57
C++
UTF-8
Python
false
false
6,521
py
parse_llvm_coverage.py
#!/usr/bin/env python # Copyright (c) 2015 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. """Parse an LLVM coverage report to generate useable results.""" import argparse import json import os import re import subproce...
1b626af67ece2a296b1aade3bac221bdc4a98a8c
51f0733d85502f3fbb6805b785c620390ca07d0a
/underactuated/meshcat_cpp_utils.py
67acb89d99b2302dd7f0d58cee12fa8515d85f96
[ "BSD-3-Clause" ]
permissive
RussTedrake/underactuated
17d53574ee4d11fb33768174773ed59adbf67840
a37b43e36057f2008d5db3c488ddbc541bdb0975
refs/heads/master
2023-09-01T13:55:11.063722
2023-08-17T10:33:11
2023-08-17T10:33:11
23,526,294
565
212
NOASSERTION
2023-08-19T00:49:08
2014-09-01T00:43:31
HTML
UTF-8
Python
false
false
259
py
meshcat_cpp_utils.py
import warnings from underactuated.meshcat_utils import * # noqa warnings.warn( "underactuated.meshcat_cpp_utils has been renamed to underactuated.meshcat_utils. This shim will be removed after 2023-05-31.", DeprecationWarning, stacklevel=2, )
1a3b88f356fa391abf9399b48b918fd109b5f661
b889e24f6f68d407cebfa8404d15ec980f596cf2
/train_stylegan_cgd.py
3f4078d14e45486b44e4551d9d5afbe676066287
[ "Apache-2.0" ]
permissive
devzhk/Implicit-Competitive-Regularization
e7071c79dd83f28d18191fecaf38b0aa10e0604c
71bda29f2db18d1d7ae9860e4a761ff61cbec756
refs/heads/master
2022-02-02T15:32:29.148198
2021-04-01T09:06:10
2021-04-01T09:06:10
213,550,763
115
27
Apache-2.0
2020-12-05T06:08:40
2019-10-08T04:45:27
Python
UTF-8
Python
false
false
10,085
py
train_stylegan_cgd.py
''' Adapted from https://github.com/rosinality/stylegan2-pytorch/blob/master/train.py ''' import os try: import wandb except ImportError: wandb = None import torch from torch import nn from torch.utils import data from torchvision import transforms, utils from tqdm import tqdm from GANs.styleganv2 import Gen...
4c3ded9c0a2afe4b9e83923036760dc4872f9246
3e51fa3888cedcdaee15513a17175b294ec29b56
/adminlteui/admin.py
238e697d764ac7e3683f9aa917eb8fba12a2980a
[ "MIT" ]
permissive
wuyue92tree/django-adminlte-ui
4e5273f84e82bfd86cd380c04f6e6685b40ec9e2
ece16c646a7925568c3cc9a48dc43dd18baef2ef
refs/heads/master
2023-07-06T18:19:07.816675
2023-07-05T06:00:05
2023-07-05T06:00:05
193,415,177
287
77
MIT
2020-05-06T01:45:37
2019-06-24T01:43:12
Python
UTF-8
Python
false
false
1,399
py
admin.py
from django.contrib import admin class ModelAdmin(admin.ModelAdmin): select2_list_filter = () search_field_placeholder = '' class Media: css = { "all": ( "admin/components/select2/dist/css/select2.min.css", # for daterangefilter "admin/c...
00ef6751e16fc8b8c6f510c8d75577a3e15fefd9
83544ef94ce2c1a05b6028ae2ce58ef8acfb6fa8
/pmca/platform/backup.py
f12555d3420a823e917492961e63b958b42a7e2e
[ "MIT" ]
permissive
ma1co/Sony-PMCA-RE
9ae44c5b09580d62e860c3acff24bd1fac28a31e
a82f5baaa8e9c3d9f28f94699e860fb2e48cc8e0
refs/heads/master
2023-08-07T07:54:13.763912
2022-08-18T12:46:04
2022-08-18T12:46:04
35,510,548
1,788
228
MIT
2022-11-05T06:45:01
2015-05-12T20:18:25
Python
UTF-8
Python
false
false
8,053
py
backup.py
import abc from collections import OrderedDict import io from ..backup import * from ..util import * class BaseBackupProp(abc.ABC): def __init__(self, dataInterface, size): self.dataInterface = dataInterface self.size = size @abc.abstractmethod def read(self): pass @abc.abstractmethod def write(self, dat...
360063f5db193f876497bf8a51aa100d528496ff
41eb0837713f297134529591b66f3d4d82bcf98e
/update/usr/lib/python2.7/site-packages/configgen/generators/mupen/mupenControllers.py
072b13a3c78ee73ae1c2acede63c8add7fa6164e
[]
no_license
AlexxandreFS/Batocera.PLUS
27b196b3cbb781b6fc99e62cad855396d1d5f8f2
997ee763ae7135fdf0c34a081e789918bd2eb169
refs/heads/master
2023-08-17T21:52:39.083687
2023-08-17T15:03:44
2023-08-17T15:03:44
215,869,486
135
57
null
2023-08-14T14:46:14
2019-10-17T19:23:42
C
UTF-8
Python
false
false
8,652
py
mupenControllers.py
#!/usr/bin/env python import os import ConfigParser from controllersConfig import Input from xml.dom import minidom import batoceraFiles # Must read : # http://mupen64plus.org/wiki/index.php?title=Mupen64Plus_Plugin_Parameters # Mupen doesn't like to have 2 buttons mapped for N64 pad entry. That's why r2 is comment...
14f4164310d5a9a15c0f9a6e251c11557406a84f
2bc18a13c4a65b4005741b979f2cb0193c1e1a01
/test/suite/out/E71.py
d9c3c51bce3d3091177bd06c114a7fc574603ddd
[ "MIT" ]
permissive
hhatto/autopep8
b0b9daf78050d981c4355f096418b9283fc20a0f
4e869ad63a11575267450bfefdf022bb6128ab93
refs/heads/main
2023-09-01T05:14:18.553939
2023-08-27T14:12:45
2023-08-27T14:12:45
1,206,729
3,966
329
MIT
2023-08-27T14:12:46
2010-12-29T20:08:51
Python
UTF-8
Python
false
false
437
py
E71.py
#: E711 if res is None: pass #: E712 if res: pass #: E712 if res: pass # #: E713 if X not in Y: pass #: E713 if X.B not in Y: pass #: E713 if X not in Y and Z == "zero": pass #: E713 if X == "zero" or Y not in Z: pass # #: E714 if X is not Y: pass #: E714 if X.B is not Y: pass #: O...
77895d6c3493743ae20b9f4e5f4f3a73834b5ba1
2871a5c3d1e885ee72332dbd8ff2c015dbcb1200
/NLP/FreeTransfer-X/third_party/utils/run_trans_m2m100.py
e886ffbcf94677eab45c5df02d36a7ca86804ec9
[ "Apache-2.0", "MIT" ]
permissive
huawei-noah/noah-research
297476299ad040552e44656541858145de72d141
82c49c36b76987a46dec8479793f7cf0150839c6
refs/heads/master
2023-08-16T19:29:25.439701
2023-08-14T03:11:49
2023-08-14T03:11:49
272,853,727
816
171
null
2023-09-12T01:28:36
2020-06-17T01:53:20
Python
UTF-8
Python
false
false
5,434
py
run_trans_m2m100.py
#!/usr/bin/env python3 # Copyright (C) 2022. Huawei Technologies Co., Ltd. All rights reserved. # # 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 limit...
458c5c1c73328207ada469f6ecb1ceaf57208bb2
ec85250addb7357dfe7bb3e0680d53fc7b0fd8fb
/examples/docs_snippets/docs_snippets_tests/concepts_tests/types_tests/test_types.py
a0a16b09558e569f3bc6a7465c40eb4aefa4d68d
[ "Apache-2.0" ]
permissive
dagster-io/dagster
6adb5deee8bcf3ea1866a6a64f2ed81e1db5e73a
fe21995e0402878437a828c6a4244025eac8c43b
refs/heads/master
2023-09-05T20:46:08.203794
2023-09-05T19:54:52
2023-09-05T19:54:52
131,619,646
8,565
1,154
Apache-2.0
2023-09-14T21:57:37
2018-04-30T16:30:04
Python
UTF-8
Python
false
false
878
py
test_types.py
import pytest from dagster import DagsterTypeCheckDidNotPass from docs_snippets.concepts.types.types import test_dagster_type def test_basic_even_type(): from docs_snippets.concepts.types.types import double_even double_even(num=2) with pytest.raises(DagsterTypeCheckDidNotPass): double_even(num...
f55f007bd4e8e3d18886a33044b3d5d30563d809
11cd362cdd78c2fc48042ed203614b201ac94aa6
/desktop/core/ext-py3/boto-2.49.0/tests/unit/vpc/test_routetable.py
4948fa125f0eb03ab5281493ecdf3faa1ffb4054
[ "CC-BY-3.0", "LicenseRef-scancode-other-copyleft", "LicenseRef-scancode-unknown-license-reference", "ZPL-2.0", "Unlicense", "LGPL-3.0-only", "CC0-1.0", "LicenseRef-scancode-other-permissive", "CNRI-Python", "LicenseRef-scancode-warranty-disclaimer", "GPL-2.0-or-later", "Python-2.0", "GPL-3.0...
permissive
cloudera/hue
b42343d0e03d2936b5a9a32f8ddb3e9c5c80c908
dccb9467675c67b9c3399fc76c5de6d31bfb8255
refs/heads/master
2023-08-31T06:49:25.724501
2023-08-28T20:45:00
2023-08-28T20:45:00
732,593
5,655
2,244
Apache-2.0
2023-09-14T03:05:41
2010-06-21T19:46:51
JavaScript
UTF-8
Python
false
false
20,511
py
test_routetable.py
from tests.unit import unittest from tests.unit import AWSMockServiceTestCase from boto.vpc import VPCConnection, RouteTable class TestDescribeRouteTables(AWSMockServiceTestCase): connection_class = VPCConnection def default_body(self): return b""" <DescribeRouteTablesResponse xmlns="ht...
ad61f45bbf19dcdd64945e8d627878507d6ea223
691b82da7c38a6c109088d8426ffa26175f4ff31
/apps/easytask/apps.py
fb128ecbfa841970fe263d109f3fcfb40a7249d2
[ "MIT" ]
permissive
Hopetree/izone
4072957eb12c7703a235c6df87ab49c7a7fdd84e
46f90dbaa3968cb3261d60a74765fa462415f000
refs/heads/master
2023-08-19T00:21:48.632159
2023-08-09T07:36:20
2023-08-09T07:36:20
115,265,222
1,167
460
MIT
2023-06-25T07:27:10
2017-12-24T13:39:43
Python
UTF-8
Python
false
false
91
py
apps.py
from django.apps import AppConfig class EasytaskConfig(AppConfig): name = 'easytask'
09ad0636f2a215d6732819af1d1fb3b810678c60
5a6ccde5f37cc86b6fc0812b2bf40f42eab23906
/A-set/45A. Codecraft III.py
729d5c8ff67552a1359e531b3abe14fcee8a1813
[]
no_license
Waqar-107/Codeforces
23f2b1edffb85f6f020107f03e09a455d3e6e792
f0d2f25aa6a09c06083b82c39cdf3288ec2eecba
refs/heads/master
2023-03-09T07:55:46.583363
2023-03-04T09:57:44
2023-03-04T09:57:44
82,915,896
196
138
null
2023-02-11T22:06:20
2017-02-23T10:29:34
C++
UTF-8
Python
false
false
322
py
45A. Codecraft III.py
# from dust i have come, dust i will be month = input() m = int(input()) s = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'] mp = {} for i in range(12): mp[s[i]] = i + 1 x = (mp[month] + m) % 12 if x == 0: x = 12 print(s[x - 1]...
ff697850d152ce5701447034eb23cdd1c29513a5
6c2dbc8d4e536220fb3b1cc72aa8104aea8b0698
/tests/test_api/test_methods/test_get_user_profile_photos.py
ed5329cc7678457b27834add48e31a3fb0930d75
[ "MIT" ]
permissive
aiogram/aiogram
f8f98a0beb63bd4d93ea810638d5792569bf354b
04bd0c9e7c5421c060183b90d515050f41377bc1
refs/heads/dev-3.x
2023-08-30T21:20:13.018174
2023-08-28T23:01:54
2023-08-28T23:01:54
111,210,856
4,287
1,250
MIT
2023-09-10T21:34:03
2017-11-18T14:11:13
Python
UTF-8
Python
false
false
745
py
test_get_user_profile_photos.py
from aiogram.methods import GetUserProfilePhotos, Request from aiogram.types import PhotoSize, UserProfilePhotos from tests.mocked_bot import MockedBot class TestGetUserProfilePhotos: async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( GetUserProfilePhotos, ...
034a44fddf8fc6b17f8a354654032630e33bf834
cfb2a8652fe0afbcbbf2287f4f736ff85ce47d30
/tests/utils.py
4509e99718d9229209c209229db573491b786d93
[ "BSD-2-Clause" ]
permissive
ionelmc/python-hunter
238ad366c9aae00cf1a249fd90993f31404e7087
cfae650dd2b7a89e5bf9eb81b109f268397c45e9
refs/heads/master
2023-08-14T23:47:51.328651
2023-04-26T09:11:54
2023-04-26T09:11:54
32,343,292
800
44
BSD-2-Clause
2022-09-09T19:31:05
2015-03-16T18:03:16
Python
UTF-8
Python
false
false
615
py
utils.py
import os from hunter import CallPrinter TIMEOUT = int(os.getenv('HUNTER_TEST_TIMEOUT', 60)) class DebugCallPrinter(CallPrinter): def __init__(self, suffix='', **kwargs): self.suffix = suffix super(DebugCallPrinter, self).__init__(**kwargs) def __call__(self, event): self.output('de...
46ce6d1ffde42224bc839d7c61eaa3cd7de05c3f
fa1ad2e2ac7e376fc7cb3b3a6e1bb88eed3e80be
/dts/airbyte/airbyte-integrations/connectors/source-youtube-analytics/unit_tests/test_streams.py
0726b5da5ca8ae490f5a4d68f403f6ade3723000
[ "MIT", "Elastic-2.0", "Apache-2.0", "BSD-3-Clause" ]
permissive
alldatacenter/alldata
7bc7713c9f1d56ad6b8e59ea03206d1073b7e047
8d5f9a2d49ab8f9e85ccf058cb02c2fda287afc6
refs/heads/master
2023-08-05T07:32:25.442740
2023-08-03T13:17:24
2023-08-03T13:17:24
213,321,771
774
250
Apache-2.0
2023-09-06T17:35:32
2019-10-07T07:36:18
null
UTF-8
Python
false
false
9,456
py
test_streams.py
# # Copyright (c) 2023 Airbyte, Inc., all rights reserved. # import datetime from collections import OrderedDict from unittest.mock import MagicMock from source_youtube_analytics.source import ChannelReports, CustomBackoffMixin, JobsResource, ReportResources def test_jobs_resource_list(requests_mock): json_resu...
f5de7d09143b1bee06cdd5a1d21779d11113720c
5b9b8a526984a986b527cf300b059bb2f220c386
/external-import/socprime/src/socprime/__init__.py
aa39afb395f3b90f381afd1ae37dd581937db229
[ "Apache-2.0", "AGPL-3.0-only" ]
permissive
OpenCTI-Platform/connectors
59f2260bff6a89d64c7ba08c15c905bd83d238a3
d00a0243946ded25b5d06bdefd9b40015dea9b80
refs/heads/master
2023-08-31T09:26:19.551741
2023-08-26T20:02:51
2023-08-26T20:02:51
192,614,260
254
368
Apache-2.0
2023-09-12T20:03:10
2019-06-18T21:22:05
Python
UTF-8
Python
false
false
77
py
__init__.py
from socprime.core import SocprimeConnector __all__ = ["SocprimeConnector"]
c94bdcf88988505a180edaca920aeb5b69954eb0
47ef6997d03f4d5c921c83cc09aef1dfc6828e2c
/zeus/datasets/transforms/RandomVerticallFlip_pair.py
d527ae6d6cc214acd759c29d0096fc98b72e833c
[ "MIT" ]
permissive
huawei-noah/xingtian
620c9f245183d636e0a65659fd99a984397ecbd4
e4ef3a1c92d19d1d08c3ef0e2156b6fecefdbe04
refs/heads/master
2023-09-03T01:10:21.768245
2022-03-21T03:39:39
2022-03-21T03:39:39
287,759,621
308
91
MIT
2023-09-12T11:33:22
2020-08-15T14:13:06
Python
UTF-8
Python
false
false
1,479
py
RandomVerticallFlip_pair.py
# -*- coding: utf-8 -*- # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved. # This program is free software; you can redistribute it and/or modify # it under the terms of the MIT License. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the...
9c9960b1ce4b149839124a9043da2dba74ccce1a
bea2e5924a62b76a767b3eb915abb3f95a225926
/tensorflow_privacy/privacy/dp_query/discrete_gaussian_utils.py
ea0a6639d21eaba522e95d35215173e86710d46f
[ "Apache-2.0", "MIT" ]
permissive
tensorflow/privacy
741ddc106e9b73384a1356bf915dc8f7f97ce768
c92610e37aa340932ed2d963813e0890035a22bc
refs/heads/master
2023-09-03T20:42:21.040653
2023-08-30T19:53:38
2023-08-30T19:54:08
162,747,292
1,881
493
Apache-2.0
2023-09-14T19:55:15
2018-12-21T18:46:46
Python
UTF-8
Python
false
false
5,552
py
discrete_gaussian_utils.py
# Copyright 2021, The TensorFlow Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
4460d4722981947787a84453312e2061a92baf80
e22eeb5256e17a96a98b3ff25433aec2d641cd2c
/openstack/clustering/v1/node.py
8229d24cb1ed1df9aaed7751847487f3a7a17e50
[ "Apache-2.0" ]
permissive
openstack/openstacksdk
b4b95fd7869653feea5a3b783e9a5c588235c039
d474eb84c605c429bb9cccb166cabbdd1654d73c
refs/heads/master
2023-09-03T22:50:03.398512
2023-07-27T14:09:35
2023-08-29T16:28:46
16,223,378
124
130
Apache-2.0
2023-09-06T02:52:47
2014-01-25T02:48:00
Python
UTF-8
Python
false
false
6,569
py
node.py
# 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, software # distributed unde...
158823ba7f05a54b85e79176ba716e1e5c17ce66
19f76203bbd176fe5a5ff7a2470ada9fb9af7c39
/taskflow/examples/reverting_linear.py
76c6b8111c3266c3c7e20bc2fc52537c0d44a4e9
[ "Apache-2.0" ]
permissive
openstack/taskflow
19f1c614f2fc175b6e57ac9280dc510e402c9f56
3b40c04594fb49ab17f8834f2f0df294a1f3e996
refs/heads/master
2023-09-04T23:38:07.154364
2023-08-16T13:57:37
2023-08-16T13:57:37
16,626,961
338
75
Apache-2.0
2018-10-29T14:30:27
2014-02-07T20:45:53
Python
UTF-8
Python
false
false
3,543
py
reverting_linear.py
# -*- coding: utf-8 -*- # Copyright (C) 2012-2013 Yahoo! 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/LICE...
b1d663476eecbc136afe9cca59effa18fb581993
2212a32833776a5d5d2164d8efd11bd18bd3f768
/tf_agents/agents/ddpg/ddpg_agent.py
4517a71bc5816186311d3be5a724d7a47a10558b
[ "Apache-2.0" ]
permissive
tensorflow/agents
f39805fb98ef9af712dcaff3ba49e1ac6d42804b
eca1093d3a047e538f17f6ab92ab4d8144284f23
refs/heads/master
2023-08-14T04:56:30.774797
2023-08-02T17:43:44
2023-08-02T17:44:09
157,936,206
2,755
848
Apache-2.0
2023-07-26T02:35:32
2018-11-17T00:29:12
Python
UTF-8
Python
false
false
17,734
py
ddpg_agent.py
# coding=utf-8 # Copyright 2020 The TF-Agents Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
fc6fe0a1c1d19798d76873ec4f8f487d22a24113
c7b8c95f698c7cf5a90084a5acb88c763bee4a38
/examples/conways_game_of_life.py
898b95c2ce98fb70df6bedf9747d7b6aadc72947
[ "MIT" ]
permissive
moderngl/moderngl
312d6760efba9782f9228159a0b556715bb8fbbe
8b5ecd86b073b97bce90633a39132c7052b8cc90
refs/heads/master
2023-08-31T09:19:52.007426
2023-07-22T17:48:23
2023-07-22T17:48:23
53,077,133
1,279
157
MIT
2023-09-05T03:41:37
2016-03-03T19:28:28
Python
UTF-8
Python
false
false
5,607
py
conways_game_of_life.py
""" A Game of Life implementation using transform feedback. We calculate the next state of the map with transform() meaning a vertex shader will generate the new state into a buffer. This buffer is then written into the texture we display. This is a fast vram to vram copy. Comments: Another way to do this is simply ...
1ef681a343699f362b1ae1d6a9fc822f73ad3cb5
85373d45a83e4096affafa4f4e5b400787413e57
/test/programytest/parser/pattern/matching/test_basic_branches.py
b0e854318cfdff04250881c3dc28c99f00e0301c
[ "MIT" ]
permissive
keiffster/program-y
a02bb9d8278835547cc875f4f9cd668d5b1f44da
fc7b0a3afa4fa6ed683e0c817a9aa89f9543bb20
refs/heads/master
2023-08-23T13:55:39.255535
2022-12-13T09:51:57
2022-12-13T09:51:57
74,462,571
379
173
NOASSERTION
2023-05-23T00:51:21
2016-11-22T10:43:41
Python
UTF-8
Python
false
false
1,512
py
test_basic_branches.py
from programytest.parser.pattern.matching.base import PatternMatcherBaseClass class PatternMatcherTests(PatternMatcherBaseClass): def test_basic_tree_matching_no_wildcards(self): self.add_pattern_to_graph(pattern="A B D E F", topic="X", that="Y", template="1") self.add_pattern_to_graph(pattern=...
c45e4fe14eb401f2621656ff36b57a3627c39421
f7982a468b6f76dc72c53e7c3644ae4e7e6f2f49
/pyEX/refdata/symbols/fx.py
07d0ed7015c14f90245926a4dc5a313e714d56cf
[ "Apache-2.0" ]
permissive
timkpaine/pyEX
55002c3718214c6e207976ab3661a47108c6c114
f678c791d05bc28911e25807241c392a9ee8134f
refs/heads/main
2023-08-20T00:17:53.162803
2022-11-22T02:51:13
2022-11-22T02:51:13
109,551,372
350
95
Apache-2.0
2023-09-11T12:26:54
2017-11-05T04:21:16
Python
UTF-8
Python
false
false
1,615
py
fx.py
# ***************************************************************************** # # Copyright (c) 2021, the pyEX authors. # # This file is part of the pyEX library, distributed under the terms of # the Apache License 2.0. The full license can be found in the LICENSE file. # from functools import wraps import pandas a...
c53a281d5bff6395c4c27d0cb67da3770b4bda48
a5a99f646e371b45974a6fb6ccc06b0a674818f2
/FWCore/Framework/test/test_get_by_type_cfg.py
99ad74c48fb195e51008a978dcd958857aaf9447
[ "Apache-2.0" ]
permissive
cms-sw/cmssw
4ecd2c1105d59c66d385551230542c6615b9ab58
19c178740257eb48367778593da55dcad08b7a4f
refs/heads/master
2023-08-23T21:57:42.491143
2023-08-22T20:22:40
2023-08-22T20:22:40
10,969,551
1,006
3,696
Apache-2.0
2023-09-14T19:14:28
2013-06-26T14:09:07
C++
UTF-8
Python
false
false
1,229
py
test_get_by_type_cfg.py
import FWCore.ParameterSet.Config as cms import argparse import sys parser = argparse.ArgumentParser(prog=sys.argv[0], description='Test getting many DataProducts just by type.') parser.add_argument("--useEDAlias", action="store_true", help="add an EDAlias for one of the modules") argv = sys.argv[:] if '--' in argv:...
0d7c66093287fa80f8ea29c3a01216ab2a2eb725
4fd65dc15ed0e5849c440a41d81036d1ff47ea96
/tests/unit/tools_tests/test_rest.py
33a78bf2eb9ef3f5135191412735e458fdce0d3a
[ "MIT" ]
permissive
tableau/TabPy
20ae3dacb958bf2d0e48fc36220366cb3db412bb
96aa26252b6115bd2788f9526680ec1b34f1c86f
refs/heads/master
2023-08-29T13:47:21.507211
2023-06-21T21:30:40
2023-06-21T21:30:40
69,400,040
1,527
633
MIT
2023-06-21T21:30:42
2016-09-27T21:26:03
Python
UTF-8
Python
false
false
7,431
py
test_rest.py
import json import requests from requests.auth import HTTPBasicAuth from tabpy.tabpy_tools.rest import RequestsNetworkWrapper, ServiceClient import unittest from unittest.mock import Mock class TestRequestsNetworkWrapper(unittest.TestCase): def test_init(self): RequestsNetworkWrapper() def test_init_...
0160c39eece6a468147d7a38c2e2b565cd1e0cf2
1c790b0adc648ff466913cf4aed28ace905357ff
/ci_test/unit_tests/test_unit_callback_ltfb.py
ce61c09d970da3ca10aa288e04fbe51b6a4cf327
[ "Apache-2.0" ]
permissive
LLNL/lbann
04d5fdf443d6b467be4fa91446d40b620eade765
e8cf85eed2acbd3383892bf7cb2d88b44c194f4f
refs/heads/develop
2023-08-23T18:59:29.075981
2023-08-22T22:16:48
2023-08-22T22:16:48
58,576,874
225
87
NOASSERTION
2023-09-11T22:43:32
2016-05-11T20:04:20
C++
UTF-8
Python
false
false
10,526
py
test_unit_callback_ltfb.py
"""Test to check weight exchanges in LTFB. Each model has a randomly initialized weights object. An LTFB round is performed after every training step and winners are chosen randomly. The log files are post-processed to make sure that the correct weights are propagated by LTFB. """ import os import os.path import rand...
a0c0675c49f0101ccf3749a3124351af0215f60b
971e0efcc68b8f7cfb1040c38008426f7bcf9d2e
/tests/model_control/gen_all.py
bcca3e30cf43df96e3870e77a46fe0dfb8afce9f
[ "BSD-3-Clause", "LicenseRef-scancode-unknown-license-reference" ]
permissive
antoinecarme/pyaf
a105d172c2e7544f8d580d75f28b751351dd83b6
b12db77cb3fa9292e774b2b33db8ce732647c35e
refs/heads/master
2023-09-01T09:30:59.967219
2023-07-28T20:15:53
2023-07-28T20:15:53
70,790,978
457
77
BSD-3-Clause
2023-03-08T21:45:40
2016-10-13T09:30:30
Python
UTF-8
Python
false
false
1,728
py
gen_all.py
import os def createDirIfNeeded(dirname): try: os.mkdir(dirname); except: pass lKnownTransformations = ['None', 'Difference', 'RelativeDifference', 'Integration', 'BoxCox', 'Quantization', 'Logit', 'Fisher', 'Anscomb...
4d158dfe64dc44b26e75fb40d54d66257a51f81f
ba6d757accea216af1a941046551d72afc39c744
/cpi.py
331bfaab11cde7ccd91c58dd18c83586b1ebf4d2
[]
no_license
tablespoon/fun
31d4910f0b9d776037621785f1219b4157115cb7
2789e41b731066b664e7017811819bebad427dee
refs/heads/master
2022-11-30T03:07:21.502549
2022-11-25T23:20:08
2022-11-25T23:20:08
10,951,432
283
73
null
2023-08-17T08:59:00
2013-06-25T21:57:29
Shell
UTF-8
Python
false
false
209
py
cpi.py
#!/usr/bin/python trials=10000000 from random import random def calc(): counter=0 for i in xrange(trials): if random()**2 + random()**2 <= 1: counter+=1 return float(counter)/trials*4 print calc()
ce402b60bfabd1db5784a90e5abb15fcc10145f4
6fdb4eaf5b0e6dbd7db4bf947547541e9aebf110
/g-code-testing/g_code_parsing/g_code_functionality_defs/thermocycler/edit_pid_params_g_code_functionality_def.py
9d80b9e20823c3a9f25a50b50a848a3b0be72e07
[ "LicenseRef-scancode-warranty-disclaimer", "Apache-2.0" ]
permissive
Opentrons/opentrons
874321e01149184960eeaeaa31b1d21719a1ceda
026b523c8c9e5d45910c490efb89194d72595be9
refs/heads/edge
2023-09-02T02:51:49.579906
2023-08-31T16:02:45
2023-08-31T16:02:45
38,644,841
326
174
Apache-2.0
2023-09-14T21:47:20
2015-07-06T20:41:01
Python
UTF-8
Python
false
false
1,297
py
edit_pid_params_g_code_functionality_def.py
from typing import Dict from string import Template from enum import Enum from g_code_parsing.g_code_functionality_defs.g_code_functionality_def_base import ( GCodeFunctionalityDefBase, ) class EditPIDParamsGCodeFunctionalityDef(GCodeFunctionalityDefBase): # Using this list to output string in specific order ...
fb110cc089074f3be0fcd3eac9c5e943ed183760
93134d8429cc7c5251ea76e19bf1856466bd2b48
/trajnetbaselines/classical/__init__.py
916886e9a6e33fc0df7f7ae1c358d1c0ec0efae7
[ "MIT" ]
permissive
vita-epfl/trajnetplusplusbaselines
0bd7ce75740f3ed39ba82d1bfaa5d3c279da474f
99a6e9d8675face1aeeb17227b73dd3d1267f463
refs/heads/master
2023-04-14T23:21:54.217111
2022-10-04T09:52:01
2022-10-04T09:52:01
218,013,163
221
83
MIT
2023-04-04T15:07:11
2019-10-28T09:42:36
Python
UTF-8
Python
false
false
126
py
__init__.py
from .socialforce import predict from .orca import predict from .kalman import predict from .constant_velocity import predict
e65bc2a82ec6af8da2a58c1f17a2dfd883891f3c
9bc318535bbcaaa7fb15a18929fc11a2bbf531d1
/satori-rules/plugin/libs/gevent/util.py
1438688e2dfffb7c000e64e18f3cd88405a6af95
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
leancloud/satori
dcab126548a54fde6d02d79053b239456439d211
701caccbd4fe45765001ca60435c0cb499477c03
refs/heads/master
2022-12-10T23:33:53.046905
2021-04-08T08:20:45
2021-04-08T08:20:45
67,022,336
259
89
Apache-2.0
2022-12-08T02:12:01
2016-08-31T09:13:02
Python
UTF-8
Python
false
false
1,805
py
util.py
# Copyright (c) 2009 Denis Bilenko. See LICENSE for details. """ Low-level utilities. """ from __future__ import absolute_import import functools __all__ = ['wrap_errors'] class wrap_errors(object): """ Helper to make function return an exception, rather than raise it. Because every exception that is ...
be806da8f556d2682d19da14397055a7d828b7b2
5130754859e274cd06f63260439e5203c2000a11
/core/storage/question/gae_models.py
4eba43f5aa1f9d88f573e49bdc2040c4c5de55b1
[ "Apache-2.0" ]
permissive
oppia/oppia
8ebc9c7c7f2b336e9a79ce04533abe3956f48cbe
d16fdf23d790eafd63812bd7239532256e30a21d
refs/heads/develop
2023-09-04T07:50:13.661276
2023-09-03T09:21:32
2023-09-03T09:21:32
40,687,563
6,172
4,666
Apache-2.0
2023-09-14T18:25:11
2015-08-14T00:16:14
Python
UTF-8
Python
false
false
32,971
py
gae_models.py
# Copyright 2017 The Oppia 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 applicable ...
4e70cace65614f6689dba0e134f538904ff18389
3a6a211ea0d32405497fbd6486c490bb147e25f9
/common/py_utils/py_utils/memory_debug.py
a5e5d006303264192c7f3a7db017f62de82a86c9
[ "BSD-3-Clause" ]
permissive
catapult-project/catapult
e2cbdd5eb89f3b1492fc8752494e62ea1df4bae0
53102de187a48ac2cfc241fef54dcbc29c453a8e
refs/heads/main
2021-05-25T07:37:22.832505
2021-05-24T08:01:49
2021-05-25T06:07:38
33,947,548
2,032
742
BSD-3-Clause
2022-08-26T16:01:18
2015-04-14T17:49:05
HTML
UTF-8
Python
false
false
2,957
py
memory_debug.py
#!/usr/bin/env python # Copyright 2017 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. from __future__ import absolute_import import heapq import logging import os import sys try: import psutil except ImportError: psut...
faba83f906111aa6f44af34cad14e47fd01fb4f1
5a6ccde5f37cc86b6fc0812b2bf40f42eab23906
/B-set/535B.Tavas and SaDDas.py
c3e34a7acf6ac4dc4d700864d25eb32ff7c6a6d5
[]
no_license
Waqar-107/Codeforces
23f2b1edffb85f6f020107f03e09a455d3e6e792
f0d2f25aa6a09c06083b82c39cdf3288ec2eecba
refs/heads/master
2023-03-09T07:55:46.583363
2023-03-04T09:57:44
2023-03-04T09:57:44
82,915,896
196
138
null
2023-02-11T22:06:20
2017-02-23T10:29:34
C++
UTF-8
Python
false
false
198
py
535B.Tavas and SaDDas.py
#"from dust i have come, dust i will be" a=str(input()) j=1 count=0 for i in range(len(a)-1,-1,-1): if a[i]=='4': count+=(1*j) else: count+=(2*j) j*=2 print(count)
e1cb3d6f4a85802a50ba05615081ea0bf650cd32
a5a99f646e371b45974a6fb6ccc06b0a674818f2
/SimCalorimetry/HcalSimAlgos/python/AddCaloSamplesAnalyzer.py
841848573679fc21ce35cd7c130ed758a0606366
[ "Apache-2.0" ]
permissive
cms-sw/cmssw
4ecd2c1105d59c66d385551230542c6615b9ab58
19c178740257eb48367778593da55dcad08b7a4f
refs/heads/master
2023-08-23T21:57:42.491143
2023-08-22T20:22:40
2023-08-22T20:22:40
10,969,551
1,006
3,696
Apache-2.0
2023-09-14T19:14:28
2013-06-26T14:09:07
C++
UTF-8
Python
false
false
1,404
py
AddCaloSamplesAnalyzer.py
import FWCore.ParameterSet.Config as cms def customise(process): # handle normal mixing or premixing hcaldigi = None if hasattr(process,'mix') and hasattr(process.mix,'digitizers') and hasattr(process.mix.digitizers,'hcal'): hcaldigi = process.mix.digitizers.hcal cstag = "mix" i...
533e1b77c50d007c29270f52ff77a4d2af1eb9c0
d4412fbe37540e2c4cbe59ed6503d3661ccb7d9c
/tests/components_to_test/utils/__init__.py
150124b58800f4b8ae6694c6edc7464665fd61f6
[ "BSD-3-Clause", "LicenseRef-scancode-warranty-disclaimer", "Apache-2.0", "BSD-2-Clause", "MIT" ]
permissive
hpcaitech/ColossalAI
a082ed08a3807b53c49d1f86835b9808590d9042
c7b60f75470f067d1342705708810a660eabd684
refs/heads/main
2023-09-01T04:13:13.834565
2023-08-30T15:07:21
2023-08-30T15:07:21
422,274,596
32,044
4,084
Apache-2.0
2023-09-14T15:19:54
2021-10-28T16:19:44
Python
UTF-8
Python
false
false
96
py
__init__.py
from .dummy_data_generator import DummyDataGenerator from .executor import run_fwd, run_fwd_bwd
315f7d287085f15cb74b43efa71c36d86b47660d
10ddfb2d43a8ec5d47ce35dc0b8acf4fd58dea94
/Python/maximize-the-profit-as-the-salesman.py
e2248732d89f78662fbfc68a9effb32a1d7d43f7
[ "MIT" ]
permissive
kamyu104/LeetCode-Solutions
f54822059405ef4df737d2e9898b024f051fd525
4dc4e6642dc92f1983c13564cc0fd99917cab358
refs/heads/master
2023-09-02T13:48:26.830566
2023-08-28T10:11:12
2023-08-28T10:11:12
152,631,182
4,549
1,651
MIT
2023-05-31T06:10:33
2018-10-11T17:38:35
C++
UTF-8
Python
false
false
535
py
maximize-the-profit-as-the-salesman.py
# Time: O(n + m), m = len(offers) # Space: O(n + m) # dp class Solution(object): def maximizeTheProfit(self, n, offers): """ :type n: int :type offers: List[List[int]] :rtype: int """ lookup = [[] for _ in xrange(n)] for s, e, g in offers: lookup...
56985c5be670a4d6c3966efe2f5525cdb57a5800
5f69a6549b8d5e417553d910622e6855b2ae679b
/src/opendr/perception/pose_estimation/__init__.py
66e9725a6af4c0dd43764b57d9042a99fdfd1c19
[ "Apache-2.0" ]
permissive
opendr-eu/opendr
822219f709613d77c5eb62c5d02808d344239835
b3d6ce670cdf63469fc5766630eb295d67b3d788
refs/heads/master
2023-08-31T07:02:36.375231
2023-08-29T06:39:51
2023-08-29T06:39:51
293,755,225
535
82
Apache-2.0
2023-09-13T16:53:34
2020-09-08T08:55:04
Python
UTF-8
Python
false
false
457
py
__init__.py
from opendr.perception.pose_estimation.lightweight_open_pose.lightweight_open_pose_learner import \ LightweightOpenPoseLearner from opendr.perception.pose_estimation.hr_pose_estimation.high_resolution_learner import \ HighResolutionPoseEstimationLearner from opendr.perception.pose_estimation.lightweight_open_p...
a93ad4eaf59288a753cfe996ff942a2cc37cbc49
bb33e6be8316f35decbb2b81badf2b6dcf7df515
/source/res/scripts/client/gui/battle_control/arena_info/settings.py
e964dc0188f2694a82077b5f567c881385fcdc11
[]
no_license
StranikS-Scan/WorldOfTanks-Decompiled
999c9567de38c32c760ab72c21c00ea7bc20990c
d2fe9c195825ececc728e87a02983908b7ea9199
refs/heads/1.18
2023-08-25T17:39:27.718097
2022-09-22T06:49:44
2022-09-22T06:49:44
148,696,315
103
39
null
2022-09-14T17:50:03
2018-09-13T20:49:11
Python
UTF-8
Python
false
false
3,312
py
settings.py
# Python bytecode 2.7 (decompiled from Python 2.7) # Embedded file name: scripts/client/gui/battle_control/arena_info/settings.py from gui.Scaleform.locale.INGAME_GUI import INGAME_GUI from gui.shared.gui_items.Vehicle import VEHICLE_BATTLE_TYPES_ORDER_INDICES from shared_utils import BitmaskHelper __all__ = ('UNKNOWN_...
0b7234d907ef8db9cdab6c41bb7e2f513efcaf32
2c9672851f9b482dc77447f3647cd27606d48251
/cartridge/shop/fields.py
d2d05fed78000e8b9ce3ee2f087f285560a5e176
[ "BSD-3-Clause", "BSD-2-Clause" ]
permissive
stephenmcd/cartridge
1a07d95f35cf72b7583a6cb6acc9f46e6b48bda6
065c9b71ec67141040c424ab3c26a17410581a43
refs/heads/master
2023-05-29T17:41:06.685633
2022-09-19T17:03:59
2022-09-19T17:03:59
854,078
477
274
BSD-2-Clause
2022-11-15T15:43:13
2010-08-22T00:36:43
Python
UTF-8
Python
false
false
2,118
py
fields.py
""" Various model fields that mostly provide default field sizes to ensure these are consistent when used across multiple models. """ from locale import localeconv from django.db.models import CharField, DecimalField from django.utils.translation import gettext_lazy as _ from cartridge.shop.utils import set_locale ...
fb141807d3ce870311c6c664d82594af5f7c561c
e75c5412063078c9ea3e7c71a8dc7a2026083a34
/astropy/utils/xml/tests/test_iterparse.py
2156f8ceb04cb66af45d9c850f88e0e86daece1e
[ "BSD-3-Clause" ]
permissive
astropy/astropy
d6636f24acdf2b18fc3e413ca0c4b1162a63dd41
53188c39a23c33b72df5850ec59e31886f84e29d
refs/heads/main
2023-08-27T18:16:44.061375
2023-08-27T16:07:35
2023-08-27T16:07:35
2,081,289
3,922
1,935
BSD-3-Clause
2023-09-14T09:23:26
2011-07-21T01:33:49
Python
UTF-8
Python
false
false
4,758
py
test_iterparse.py
# Licensed under a 3-clause BSD style license - see LICENSE.rst # LOCAL # SYSTEM import io import zlib from astropy.utils.xml.iterparser import _fast_iterparse # The C-based XML parser for VOTables previously used fixed-sized # buffers (allocated at __init__() time). This test will # only pass with the patch that a...
04e5c92d135fb9f2683ba9ba5ece90cd5c1a6262
dafbc7e802ae7e84c6677e5f4de87c3c50d11307
/net/train.py
de4b03cca0481f583b97b5529df3fd2ac94b8136
[ "MIT" ]
permissive
HelloRicky123/Siamese-RPN
bf5b7e983c96c487c73a135752013d6b3fee4a71
08625aa8828aea5d63cb8b301c7ec4e300cb047b
refs/heads/master
2021-09-24T02:14:20.440448
2021-09-09T05:28:36
2021-09-09T05:28:36
164,394,742
258
59
null
null
null
null
UTF-8
Python
false
false
15,019
py
train.py
import torch import torch.nn.functional as F import torch.optim as optim import torchvision.transforms as transforms import torchvision import numpy as np import pandas as pd import os import cv2 import pickle import lmdb import torch.nn as nn import time from torch.autograd import Variable from torch.optim.lr_schedul...
b6319b536e1f9f97f9a69eb6b5049c7dfdac62e6
e70ce96317b9f197aed0f84e5d7e500dc08f7d30
/util/de_transform.py
29abcbcd405ebca5c33fac802cbd72226478f0e0
[ "MIT" ]
permissive
hkchengrex/CascadePSP
c11a3e088b3b1a78ffb7bbaa6ab1c5ad870b8c85
83cc3b8783b595b2e47c75016f93654eaddb7412
refs/heads/master
2022-10-06T04:48:50.696529
2022-08-19T16:37:53
2022-08-19T16:37:53
248,813,772
760
102
MIT
2021-04-17T12:50:59
2020-03-20T17:25:15
Python
UTF-8
Python
false
false
2,173
py
de_transform.py
import cv2 import numpy as np def get_random_structure(size): # The provided model is trained with # choice = np.random.randint(4) # instead, which is a bug that we fixed here choice = np.random.randint(1, 5) if choice == 1: return cv2.getStructuringElement(cv2.MORPH_RECT, (size, size)...
6b00a7d921355a1cc8a5890397046c4ad176cfea
5f1881006aaf4f3c2515f375ad29c15fd6612de2
/lemon/executor/strongsup/tables/predicate.py
716e59efc3309e33d0cb11fb84bb7d106a3531da
[ "MIT", "LicenseRef-scancode-generic-cla", "LicenseRef-scancode-proprietary-license", "LicenseRef-scancode-free-unknown", "LicenseRef-scancode-unknown-license-reference", "LGPL-2.1-or-later", "Apache-2.0", "LicenseRef-scancode-public-domain", "BSD-2-Clause" ]
permissive
microsoft/ContextualSP
4edb598d40f683f9a1143b92a9d24e1066d51ec4
4198ebce942f4afe7ddca6a96ab6f4464ade4518
refs/heads/master
2023-08-02T22:08:40.503853
2023-07-14T07:22:50
2023-07-14T07:22:50
255,534,819
332
70
MIT
2023-07-25T19:23:48
2020-04-14T07:01:54
Python
UTF-8
Python
false
false
3,124
py
predicate.py
from strongsup.predicate import Predicate from strongsup.tables.executor import is_unary, is_binary, ALL_BUILT_INS from strongsup.tables.graph import ALL_GRAPH_BUILT_INS from strongsup.utils import EOU class WikiTablePredicate(Predicate): def __init__(self, name, original_string=None): types = self._compu...
cd1d3b55b089b3eedabeb77d8654bcec3cec26fe
753cd066a9bd26b6c37c8d53a86c7a9c659ec18c
/tutorials/utils/lint/linters/url_linter.py
806169f2d3ee96c5e11dd0c1ba3f4ee2b67cf470
[ "MIT" ]
permissive
graphcore/examples
ac872015808ed2a913d4d7bf0d63202ce15ebbae
e2f834dd60e7939672c1795b4ac62e89ad0bca49
refs/heads/master
2023-08-05T02:08:12.341836
2023-07-27T11:13:10
2023-07-27T11:13:10
143,977,106
311
80
MIT
2023-09-11T16:42:56
2018-08-08T07:29:17
Python
UTF-8
Python
false
false
1,134
py
url_linter.py
#!/usr/bin/env python3 # Copyright (c) 2021 Graphcore Ltd. All rights reserved. import argparse from typing import Optional from typing import Sequence import contextlib import io from ...tutorials_tests.urls_test import test_urls def apply_lint_function() -> int: """Lint function to be called by pre-commit. Sim...
339db2786011045980261f561a03f7374e9d8423
704976ea552111c6a5af9cd7cb62b9d9abaf3996
/rpython/jit/metainterp/opencoder.py
79827d94eb7451f16de5a5166a1aef60c6a17151
[ "BSD-3-Clause" ]
permissive
mesalock-linux/mesapy
4f02c5819ce7f2f6e249d34840f1aa097577645d
ed546d59a21b36feb93e2309d5c6b75aa0ad95c9
refs/heads/mesapy2.7
2023-08-16T21:33:02.239581
2019-08-13T10:29:43
2019-08-13T18:06:45
136,080,721
396
33
NOASSERTION
2020-04-01T03:05:18
2018-06-04T20:45:17
Python
UTF-8
Python
false
false
18,288
py
opencoder.py
""" Storage format: for each operation (inputargs numbered with negative numbers) <opnum> [size-if-unknown-arity] [<arg0> <arg1> ...] [descr-or-snapshot-index] Snapshot index for guards points to snapshot stored in _snapshots of trace """ from rpython.jit.metainterp.history import ConstInt, Const, ConstFloat, ConstP...
a36063dfaafe01d63d93a2994cdc06d528a04923
c46754b9600a12df4f9d7a6320dfc19aa96b1e1d
/src/transformers/models/longformer/configuration_longformer.py
1542c497989ff05a351026f7a19f9918c9f28154
[ "Apache-2.0" ]
permissive
huggingface/transformers
ccd52a0d7c59e5f13205f32fd96f55743ebc8814
4fa0aff21ee083d0197a898cdf17ff476fae2ac3
refs/heads/main
2023-09-05T19:47:38.981127
2023-09-05T19:21:33
2023-09-05T19:21:33
155,220,641
102,193
22,284
Apache-2.0
2023-09-14T20:44:49
2018-10-29T13:56:00
Python
UTF-8
Python
false
false
9,564
py
configuration_longformer.py
# coding=utf-8 # Copyright 2020 The Allen Institute for AI team and The HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2...
72012275f241f89f13d02499f71e65bb7b77ccac
fd9f5186fa5d19db077dbf302fe9c940cb42e82f
/tests/admin/test_parts.py
b9f5cf1b88b0d1d9e7efeb26211a4dfa6f34aad7
[ "Apache-2.0" ]
permissive
vesoft-inc/nebula
a0b9af548e124e59ecbfb0c5152098a1020b621c
7c32088dec1891870a24aaa37ee5818e69f5ad6d
refs/heads/master
2023-08-17T00:00:29.022525
2023-08-16T04:02:03
2023-08-16T04:02:03
146,459,443
11,007
1,220
Apache-2.0
2023-09-05T05:48:16
2018-08-28T14:25:09
C++
UTF-8
Python
false
false
1,976
py
test_parts.py
# --coding:utf-8-- # # Copyright (c) 2020 vesoft inc. All rights reserved. # # This source code is licensed under Apache 2.0 License. import time import re from tests.common.nebula_test_suite import NebulaTestSuite leader_pattern = re.compile(r'127.0.0.1:.*|^$') peers_pattern = re.compile(r'127.0.0.1:.*') losts_patt...
4182e3918d2137db947b624ae3db16ad57bd2002
d141f35262ceb75a4b38c2c4972a6f267e184199
/execution_trace/tests/functions/f_conditional_else.py
dc267a11309ba103f1dda2a0351611be43d616a1
[ "MIT" ]
permissive
mihneadb/python-execution-trace
14c46dd2f0a9657937b9f14c96a3d3a5900a7d87
c4397a5342e51e7451c4c85b538d047636f391b0
refs/heads/master
2023-05-10T19:30:09.518141
2023-05-03T06:56:42
2023-05-03T06:56:42
46,447,496
198
20
MIT
2023-05-03T06:56:43
2015-11-18T21:08:08
JavaScript
UTF-8
Python
false
false
612
py
f_conditional_else.py
from execution_trace.record import record @record(10) # 1 def f(): # 2 """Fn with conditional having else.""" # 3 x = 3 # 4 y = 2 # 5 if x != 3: # 6 y = 5 # 7 else: # 8 y = 6 # 9 args = () expected_trace = [{u'data': [{u'lineno': 3, u'state': {}}, ...
51e666a1f16046daeff941fcd8e4d80b159f2c97
444a9480bce2035565332d4d4654244c0b5cd47b
/research/cv/SiamFC/src/create_dataset_ILSVRC.py
a71fb890a97b26b90e96380b0a31682b7007b79a
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-proprietary-license" ]
permissive
mindspore-ai/models
7ede9c6454e77e995e674628204e1c6e76bd7b27
eab643f51336dbf7d711f02d27e6516e5affee59
refs/heads/master
2023-07-20T01:49:34.614616
2023-07-17T11:43:18
2023-07-17T11:43:18
417,393,380
301
92
Apache-2.0
2023-05-17T11:22:28
2021-10-15T06:38:37
Python
UTF-8
Python
false
false
4,260
py
create_dataset_ILSVRC.py
# Copyright 2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
2d2b0716959ee6519afefc54c6a155b78a24e6a1
6a468c1650b3c083f102f19ace0b0d6e4d0686f7
/sympy/printing/tests/test_numpy.py
ae2a86676522f0339f284cc756cf7a7cae871d2a
[ "BSD-3-Clause", "MIT" ]
permissive
sympy/sympy
a5f8accaa7686c59d9b5c94212fef60d746dac4b
69f98fb2b0d845e76874067a381dba37b577e8c5
refs/heads/master
2023-09-01T15:51:37.886107
2023-08-31T20:54:33
2023-08-31T20:54:33
640,534
10,928
5,362
NOASSERTION
2023-09-14T17:29:13
2010-04-30T20:37:14
Python
UTF-8
Python
false
false
10,360
py
test_numpy.py
from sympy.concrete.summations import Sum from sympy.core.mod import Mod from sympy.core.relational import (Equality, Unequality) from sympy.core.symbol import Symbol from sympy.functions.elementary.miscellaneous import sqrt from sympy.functions.elementary.piecewise import Piecewise from sympy.functions.special.gamma_f...
715dfc816b24b638bac140006c0b3d6295701761
6f0ceee714bccf2a89c34a06aabd3bcb781a2fa4
/example/gluon/style_transfer/option.py
5faa52259d7c627a1f9f7abc8e6fe1c44c13b1c0
[ "Apache-2.0", "MIT", "Unlicense", "BSL-1.0", "NCSA", "BSD-3-Clause", "LicenseRef-scancode-generic-cla", "BSD-2-Clause", "OFL-1.0", "BSD-2-Clause-Views", "Zlib", "CC-BY-4.0" ]
permissive
yajiedesign/mxnet
5a495fd06dd1730c17d2d27d7e46c8a770847f17
8e5a16cf673db5aceb48d2cf7a0fc1abd0ee5e51
refs/heads/master
2021-03-30T22:37:18.603396
2020-10-23T06:40:17
2020-10-23T06:40:17
43,763,550
214
59
Apache-2.0
2020-06-01T23:31:15
2015-10-06T16:36:40
C++
UTF-8
Python
false
false
7,063
py
option.py
# 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...
5e3fcc2f88d1fae25c71e26e6920f10ddcba782f
2ae0b8d95d439ccfd55ea7933ad4a2994ad0f6c5
/tools/mo/openvino/tools/mo/middle/FusedBatchNormNonConstant.py
62b21cf3c103f0580108de145060e23fbb612f72
[ "Apache-2.0" ]
permissive
openvinotoolkit/openvino
38ea745a247887a4e14580dbc9fc68005e2149f9
e4bed7a31c9f00d8afbfcabee3f64f55496ae56a
refs/heads/master
2023-08-18T03:47:44.572979
2023-08-17T21:24:59
2023-08-17T21:24:59
153,097,643
3,953
1,492
Apache-2.0
2023-09-14T21:42:24
2018-10-15T10:54:40
C++
UTF-8
Python
false
false
3,539
py
FusedBatchNormNonConstant.py
# Copyright (C) 2018-2023 Intel Corporation # SPDX-License-Identifier: Apache-2.0 from openvino.tools.mo.ops.elementwise import Mul, Add, Pow from openvino.tools.mo.front.common.partial_infer.utils import mo_array from openvino.tools.mo.graph.graph import Graph from openvino.tools.mo.middle.replacement import MiddleRe...
4c3754b8b358bdefb3ddd53e31156a673a692a2c
a5a99f646e371b45974a6fb6ccc06b0a674818f2
/DQMOffline/Trigger/python/HEP17Monitoring_Client_cff.py
576f481f4fe9da66f531302145d88a8f5135567e
[ "Apache-2.0" ]
permissive
cms-sw/cmssw
4ecd2c1105d59c66d385551230542c6615b9ab58
19c178740257eb48367778593da55dcad08b7a4f
refs/heads/master
2023-08-23T21:57:42.491143
2023-08-22T20:22:40
2023-08-22T20:22:40
10,969,551
1,006
3,696
Apache-2.0
2023-09-14T19:14:28
2013-06-26T14:09:07
C++
UTF-8
Python
false
false
2,738
py
HEP17Monitoring_Client_cff.py
import FWCore.ParameterSet.Config as cms from DQMServices.Core.DQMEDHarvester import DQMEDHarvester hep17Efficiency = DQMEDHarvester("DQMGenericClient", subDirs = cms.untracked.vstring("HLT/EGM/HEP17/*"), verbose = cms.untracked.uint32(0), # Set to 2 for all messages resolution = cms.vstring(), ...
d6bc1a8280c595c24c00deb5fb44fb295e4cbbae
99dcb18a9e3ea367272f740b8cbf3c34285a0c08
/vertexai/preview/vision_models.py
67290e67366995dfbabb7284e76b50aaec2d219d
[ "Apache-2.0" ]
permissive
googleapis/python-aiplatform
926a4873f35dbea15b2fd86c0e16b5e6556d803e
76b95b92c1d3b87c72d754d8c02b1bca652b9a27
refs/heads/main
2023-08-19T23:49:02.180075
2023-08-19T13:25:59
2023-08-19T13:27:27
298,017,988
418
240
Apache-2.0
2023-09-14T21:08:33
2020-09-23T15:43:39
Python
UTF-8
Python
false
false
1,096
py
vision_models.py
# Copyright 2023 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 agreed to in writing, s...
0643991ff11cc3bee108130f44c59ed9fcf49d0b
e09924b3ad57b24849db1611d8435a86de8e6f54
/src/stacking/datasets.py
8fac361d1c0c7761a36460998d592ab814dbf7f7
[ "MIT" ]
permissive
lRomul/argus-freesound
3ae9617c72cb3adc3d0c0f232a65795fb560c7b6
4faf8f192035b413e8946bda3555474cb9ad8237
refs/heads/master
2023-08-19T23:46:44.634984
2021-03-24T20:21:08
2021-03-24T20:21:08
182,380,511
332
63
MIT
2022-06-22T02:43:30
2019-04-20T08:24:56
Python
UTF-8
Python
false
false
2,533
py
datasets.py
import time import torch import random import numpy as np import pandas as pd from torch.utils.data import Dataset from src import config def load_fname_probs(experiments, fold, fname): prob_lst = [] for experiment in experiments: npy_path = config.predictions_dir / experiment / f'fold_{fold}' / 'va...
287a57caad11111253c14b623f719e5a84f6c92b
10ddfb2d43a8ec5d47ce35dc0b8acf4fd58dea94
/Python/find-all-anagrams-in-a-string.py
6175e718a195f6e10cd2dcdbb60b74763009bfbb
[ "MIT" ]
permissive
kamyu104/LeetCode-Solutions
f54822059405ef4df737d2e9898b024f051fd525
4dc4e6642dc92f1983c13564cc0fd99917cab358
refs/heads/master
2023-09-02T13:48:26.830566
2023-08-28T10:11:12
2023-08-28T10:11:12
152,631,182
4,549
1,651
MIT
2023-05-31T06:10:33
2018-10-11T17:38:35
C++
UTF-8
Python
false
false
666
py
find-all-anagrams-in-a-string.py
# Time: O(n) # Space: O(1) class Solution(object): def findAnagrams(self, s, p): """ :type s: str :type p: str :rtype: List[int] """ result = [] cnts = [0] * 26 for c in p: cnts[ord(c) - ord('a')] += 1 left, right = 0, 0 ...
c6a02233bcbcaf3dad4312bf766412d3b4a4eeda
e31f84c20af7be8646f03faf22ac55ad041444a3
/tests/test_encoding/test_count_frequency_encoder.py
f961a2960fbdcc6ed77e1084cddb4fc38cfa928b
[ "BSD-3-Clause" ]
permissive
feature-engine/feature_engine
564aa2f298bb1beb0606bd5d51261b4d1085a8df
3343305a01d1acfeff846b65d33a5686c6e8c84f
refs/heads/main
2023-08-07T09:19:24.315277
2023-06-08T06:27:45
2023-06-08T06:27:45
163,630,824
874
105
BSD-3-Clause
2023-09-13T14:02:23
2018-12-31T01:47:18
Python
UTF-8
Python
false
false
14,113
py
test_count_frequency_encoder.py
import warnings import pandas as pd import pytest from numpy import nan from sklearn.exceptions import NotFittedError from feature_engine.encoding import CountFrequencyEncoder # init parameters @pytest.mark.parametrize("enc_method", ["arbitrary", False, 1]) def test_error_if_encoding_method_not_permitted_value(enc_...
6dc939d953a77b18094e36c7294e79ac68cd201e
123e2e28017973eefedaffb273cb3a5164f582c5
/junction/base/admin.py
66935741a4ab4c38ec00e735d3835e802a4cd667
[ "MIT" ]
permissive
pythonindia/junction
ef4c0bf64f8c396edd2407f6d91444ab60a36b02
208d1757bf39c4727cf78b52cd2285e902eec84d
refs/heads/master
2023-08-17T09:30:50.961028
2023-08-10T06:44:34
2023-08-10T06:44:34
27,966,694
209
226
MIT
2023-08-10T06:44:35
2014-12-13T16:40:17
Python
UTF-8
Python
false
false
884
py
admin.py
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from django.contrib import admin def save_model(self, request, obj, form, change): """ Overriding this to update created_by & modified by users """ instance = form.save(commit=False) if not instance.created_at and not instan...
1dd434dd22545c3c6e59a0de8e67929c8fec1759
d110546d747d7e3865ce5742d5fca09f404623c0
/tests/pytests/integration/modules/saltutil/test_modules.py
9d10189bb30db118c9bd3ec68a627f69cd3008e4
[ "Apache-2.0", "MIT", "BSD-2-Clause" ]
permissive
saltstack/salt
354fc86a7be1f69514b3dd3b2edb9e6f66844c1d
1ef90cbdc7203f97775edb7666db86a41eb9fc15
refs/heads/master
2023-07-19T20:56:20.210556
2023-06-29T23:12:28
2023-07-19T11:47:47
1,390,248
11,026
6,296
Apache-2.0
2023-09-14T20:45:37
2011-02-20T20:16:56
Python
UTF-8
Python
false
false
4,144
py
test_modules.py
""" Integration tests for the saltutil module. """ import pytest pytestmark = [ pytest.mark.windows_whitelisted, ] @pytest.fixture(autouse=True) def refresh_pillar(salt_call_cli, salt_minion, salt_sub_minion): whitelist = { "modules": [], } ret = salt_call_cli.run("saltutil.sync_all", extmo...
a166cf0a4de019176a0fd84fa392778167a05952
0f59e486ea9d7c96b8c3f7f92bf063fc8389f1e8
/PE/carve.py
7a4f8dc73a94dbc5d4937122da66069d56a35e33
[ "Apache-2.0" ]
permissive
vivisect/vivisect
ac259918b6281d9431c32a0b2307c61f9cab0dec
b07e161cc28b19fdda0d047eefafed22c5b00f15
refs/heads/master
2023-08-25T09:02:00.526532
2023-07-26T03:07:07
2023-07-26T03:07:07
26,651,759
833
181
Apache-2.0
2023-09-07T03:43:53
2014-11-14T18:28:47
Python
UTF-8
Python
false
false
2,611
py
carve.py
import sys import struct import argparse from io import BytesIO from itertools import cycle import PE MAX_OFFSET_PE_AFTER_MZ = 0x200 def xorbytes(data, key): return bytes([(x ^ y) for (x, y) in zip(data, cycle(key))]) def xorstatic(data, i): return bytes([(c ^ i) for c in data]) mz_xor = [(xorstatic(b...
9f7bf13e5a47f8975b07c0ee65ff108b22ed7d51
4d28185e7a78a569f9a449f39f183cac3024f711
/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjCMethods.py
85d34c3d5006217b6512d92ea26df29ae4c17775
[ "NCSA", "Apache-2.0", "LLVM-exception" ]
permissive
apple/swift-lldb
2789bf44f648609a1674ee520ac20b64c95de072
d74be846ef3e62de946df343e8c234bde93a8912
refs/heads/stable
2023-04-06T00:28:15.882479
2019-10-25T22:46:59
2019-10-25T22:46:59
44,838,862
780
291
Apache-2.0
2020-01-10T19:28:43
2015-10-23T21:13:18
C++
UTF-8
Python
false
false
11,513
py
TestObjCMethods.py
""" Set breakpoints on objective-c class and instance methods in foundation. Also lookup objective-c data types and evaluate expressions. """ from __future__ import print_function import os import os.path import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test im...
08fb58100e361c550eafee69c1e61915aa3a302b
10ddfb2d43a8ec5d47ce35dc0b8acf4fd58dea94
/Python/happy-number.py
33b2e31d3b74d153484452ee24d5f45b3199e109
[ "MIT" ]
permissive
kamyu104/LeetCode-Solutions
f54822059405ef4df737d2e9898b024f051fd525
4dc4e6642dc92f1983c13564cc0fd99917cab358
refs/heads/master
2023-09-02T13:48:26.830566
2023-08-28T10:11:12
2023-08-28T10:11:12
152,631,182
4,549
1,651
MIT
2023-05-31T06:10:33
2018-10-11T17:38:35
C++
UTF-8
Python
false
false
443
py
happy-number.py
# Time: O(k), where k is the steps to be happy number # Space: O(k) class Solution(object): # @param {integer} n # @return {boolean} def isHappy(self, n): lookup = {} while n != 1 and n not in lookup: lookup[n] = True n = self.nextNumber(n) return n == 1 ...
3f9b2e17b91ca3a91665d6ffcb9ba873793981bb
88efd76316e4184d76a5e0585d95fe734233942c
/yellowbrick/text/tsne.py
ead496eb4844db00304144c5cd60c71b7300383f
[ "Apache-2.0" ]
permissive
DistrictDataLabs/yellowbrick
1ecd9f33e58f0d007569904401c204a6cdeb5661
f7a8e950bd31452ea2f5d402a1c5d519cd163fd5
refs/heads/develop
2023-08-03T12:25:26.511916
2023-07-05T18:14:28
2023-07-05T18:14:28
59,121,694
4,242
660
Apache-2.0
2023-07-15T17:50:31
2016-05-18T14:12:17
Python
UTF-8
Python
false
false
15,368
py
tsne.py
# yellowbrick.text.tsne # Implements TSNE visualizations of documents in 2D space. # # Author: Benjamin Bengfort # Author: Rebecca Bilbro # Created: Mon Feb 20 06:33:29 2017 -0500 # # Copyright (C) 2016 The scikit-yb developers # For license information, see LICENSE.txt # # ID: tsne.py [6aa9198] benjamin@bengfort....
7d0bde9bc893f8d136199a87b5fda534f6c35989
167c6226bc77c5daaedab007dfdad4377f588ef4
/python/ql/test/query-tests/Security/lib/Crypto/Cipher/__init__.py
ab22f65be6e35f2e7d085463d3f4b178f8bfd414
[ "MIT", "LicenseRef-scancode-python-cwi", "LicenseRef-scancode-other-copyleft", "GPL-1.0-or-later", "LicenseRef-scancode-free-unknown", "Python-2.0" ]
permissive
github/codeql
1eebb449a34f774db9e881b52cb8f7a1b1a53612
d109637e2d7ab3b819812eb960c05cb31d9d2168
refs/heads/main
2023-08-20T11:32:39.162059
2023-08-18T14:33:32
2023-08-18T14:33:32
143,040,428
5,987
1,363
MIT
2023-09-14T19:36:50
2018-07-31T16:35:51
CodeQL
UTF-8
Python
false
false
26
py
__init__.py
__all__ = ['AES', 'ARC4']
86e7760f2e492ace158254aebc90731322adce90
45412e6175a50a2cf468cee53c5eeda28fea108d
/topaz/modules/topaz.py
7cf5f34375b4b008d6ec35c64a277a913d7757f0
[ "BSD-3-Clause" ]
permissive
topazproject/topaz
fa03fdfc1977e7a3411eadf748475668bbd1c34a
059eac0ac884d677c3539e156e0ac528723d6238
refs/heads/master
2023-03-09T10:08:54.025001
2022-06-18T11:47:49
2022-06-18T11:47:49
3,966,078
271
28
BSD-3-Clause
2022-06-18T11:47:50
2012-04-08T18:34:50
Python
UTF-8
Python
false
false
3,480
py
topaz.py
from __future__ import absolute_import import sys from rpython.rlib.rarithmetic import intmask from rpython.rlib.rtermios import tcsetattr, tcgetattr, all_constants from topaz.error import error_for_oserror from topaz.module import ModuleDef from topaz.objects.classobject import W_ClassObject class Topaz(object): ...
71c39444d29087b1bbc58556d3d0e7fedfe9f3da
234c46d1249c9209f268417a19018afc12e378b4
/tests/data/image_loader_test.py
22ae32b1c948e344b3922cd1a58f756204357643
[ "Apache-2.0" ]
permissive
allenai/allennlp
1f4bcddcb6f5ce60c7ef03a9a3cd6a38bdb987cf
80fb6061e568cb9d6ab5d45b661e86eb61b92c82
refs/heads/main
2023-07-07T11:43:33.781690
2022-11-22T00:42:46
2022-11-22T00:42:46
91,356,408
12,257
2,712
Apache-2.0
2022-11-22T00:42:47
2017-05-15T15:52:41
Python
UTF-8
Python
false
false
3,241
py
image_loader_test.py
import pytest import torch import torchvision from allennlp.common.testing import AllenNlpTestCase, multi_device from allennlp.data.image_loader import TorchImageLoader class TorchImageLoaderTest(AllenNlpTestCase): def setup_method(self): super().setup_method() self.image_fixture_path = str( ...
d68eb5313aa011ab642b08dbcb940461acade8d8
ee87c715e5d937b0380ddb87d56e9ebc4877a02b
/sklearn/metrics/_pairwise_distances_reduction/_dispatcher.py
937a6fd08326045394a05c6587c70e5034323f90
[ "BSD-3-Clause" ]
permissive
scikit-learn/scikit-learn
27a2196f3173e0f32f7a5c5d652b70a6c57c7644
061f8777b48e5491b0c57bb8e0bc7067c103079d
refs/heads/main
2023-08-18T15:32:59.764468
2023-08-18T14:39:08
2023-08-18T14:39:08
843,222
58,456
29,777
BSD-3-Clause
2023-09-14T19:08:34
2010-08-17T09:43:38
Python
UTF-8
Python
false
false
22,377
py
_dispatcher.py
from abc import abstractmethod from typing import List import numpy as np from scipy.sparse import issparse from ... import get_config from .._dist_metrics import ( BOOL_METRICS, METRIC_MAPPING64, DistanceMetric, ) from ._argkmin import ( ArgKmin32, ArgKmin64, ) from ._argkmin_classmode import ( ...
798fe99f411f63141d6f79b216f752faed9f7878
ec9fd70a945d9ad6c7018ed96ca71a65c76bb471
/onshape_to_robot/onshape_api/client.py
37f7d33e935eba72b939118046e508d3bc956739
[ "MIT" ]
permissive
Rhoban/onshape-to-robot
0c252e37c09988d878bdaed2ffd42e460bd48411
f4716a23046bada1c90e3e1acd81686a6d1f2593
refs/heads/master
2023-08-17T23:22:54.592494
2023-03-14T15:52:19
2023-03-14T15:52:19
176,774,675
175
40
MIT
2023-09-05T23:31:58
2019-03-20T16:30:53
Python
UTF-8
Python
false
false
12,095
py
client.py
''' client ====== Convenience functions for working with the Onshape API ''' from .onshape import Onshape import mimetypes import random import string import os import json import hashlib from pathlib import Path def escape_slash(s): return s.replace('/', '%2f') class Client(): ''' Defines methods for ...
dd574a9c8ec92fac0c5b584c569015bd44f6aa46
f80ef3a3cf859b13e8af8433af549b6b1043bf6e
/pyobjc-framework-Cocoa/PyObjCTest/test_nsjsonserialization.py
da59cc80518031a52cac618cac221976972a73a7
[ "MIT" ]
permissive
ronaldoussoren/pyobjc
29dc9ca0af838a56105a9ddd62fb38ec415f0b86
77b98382e52818690449111cd2e23cd469b53cf5
refs/heads/master
2023-09-01T05:15:21.814504
2023-06-13T20:00:17
2023-06-13T20:00:17
243,933,900
439
49
null
2023-06-25T02:49:07
2020-02-29T08:43:12
Python
UTF-8
Python
false
false
1,730
py
test_nsjsonserialization.py
import Foundation from PyObjCTools.TestSupport import TestCase, min_os_level class TestNSJSONSerialization(TestCase): def test_enum_types(self): self.assertIsEnumType(Foundation.NSJSONReadingOptions) self.assertIsEnumType(Foundation.NSJSONWritingOptions) @min_os_level("10.7") def testCons...
c954a05343bfd4e6a605db9d5c25f50ea0200107
5095200e9ca55cd3a37af34ed44448c02e2a1bb5
/modules/image/Image_editing/super_resolution/dcscn/processor.py
04ac460e5397339fa03d21e5d85bfd2d0bb58d10
[ "Apache-2.0" ]
permissive
PaddlePaddle/PaddleHub
8712603ef486c45e83eb0bc5725b0b3ed3ddbbde
b402610a6f0b382a978e82473b541ea1fc6cf09a
refs/heads/develop
2023-07-24T06:03:13.172978
2023-03-28T11:49:55
2023-03-28T11:49:55
162,672,577
12,914
2,239
Apache-2.0
2023-07-06T21:38:19
2018-12-21T06:00:48
Python
UTF-8
Python
false
false
2,546
py
processor.py
# -*- coding:utf-8 -*- import os import time import base64 import cv2 import numpy as np __all__ = ['cv2_to_base64', 'base64_to_cv2', 'postprocess'] def cv2_to_base64(image): data = cv2.imencode('.jpg', image)[1] return base64.b64encode(data.tostring()).decode('utf8') def base64_to_cv2(b64str): data =...
ec4665989bef7c098b518981e4909a9b28eb6138
81b450ffc4dcbb09272e24d938e8bf6ee911f5c9
/examples/deadline/All-In-AWS-Infrastructure-Basic/python/package/lib/storage_tier.py
22600a7c2095e4cb2c8f0f64bf9d52ee904006a1
[ "SSPL-1.0", "Apache-2.0", "LicenseRef-scancode-generic-cla" ]
permissive
aws/aws-rfdk
2e3968ced5f64b77ca5f801477cb4fdb2c66f9a0
a875bc0804c74479e717aa3846c5d290b2ec416a
refs/heads/mainline
2023-09-01T02:43:20.983370
2023-08-18T19:05:30
2023-08-18T19:05:30
274,453,874
102
40
Apache-2.0
2023-09-12T14:31:35
2020-06-23T16:20:36
TypeScript
UTF-8
Python
false
false
18,706
py
storage_tier.py
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 import json from dataclasses import dataclass from typing import Optional from aws_cdk import ( Duration, RemovalPolicy, Size, Stack, StackProps ) from aws_cdk.aws_cloudwatch import ( Com...