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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
19fda0d42f4945fbaab04e4e5af22b7374bb0c3d | 10e03b0f3569bd4b7f81ac3ec5c4ff992db1047c | /tests/helpers.py | 8c78e10293a00fc6e99e5b477296e47e19846b28 | [
"BSD-2-Clause"
] | permissive | miracle2k/flask-assets | b751e0879871d77cc7b8ec81ca441cf639a6eede | 8433cc30fd4dff046a95dd02e26a3e901595be21 | refs/heads/master | 2023-08-16T15:30:24.992898 | 2020-02-29T00:06:32 | 2020-02-29T00:06:32 | 821,291 | 325 | 75 | BSD-2-Clause | 2023-07-24T17:22:55 | 2010-08-06T11:51:29 | Python | UTF-8 | Python | false | false | 1,105 | py | helpers.py | from flask.app import Flask
from webassets.test import TempEnvironmentHelper as BaseTempEnvironmentHelper
from flask_assets import Environment
try:
from flask import Blueprint
Module = None
except ImportError:
# Blueprints only available starting with 0.7,
# fall back to old Modules otherwise.
Blue... |
a5df78e2b48da4579205e7645e1d7f1bd94d9aa9 | ce1c91c33d9b612e97361527e5a974996208c90d | /glue/viewers/profile/tests/test_state.py | c574558dbee91a2d0a87ef134b2d74e205f364b3 | [
"BSD-3-Clause"
] | permissive | glue-viz/glue | 5f52faaf91e1ca4822d3983b6a4b9b60e8807f38 | 1a5c7676c025a1a025068b806f6f90ed53bba543 | refs/heads/main | 2023-09-04T09:24:00.519833 | 2023-08-17T09:40:04 | 2023-08-17T09:40:04 | 1,768,238 | 609 | 149 | NOASSERTION | 2023-09-13T20:56:14 | 2011-05-18T20:58:54 | Python | UTF-8 | Python | false | false | 4,861 | py | test_state.py | from glue.core.data_collection import DataCollection
import numpy as np
from numpy.testing import assert_allclose
from glue.core import Data, Coordinates
from glue.core.tests.test_state import clone
from ..state import ProfileViewerState, ProfileLayerState
class SimpleCoordinates(Coordinates):
def __init__(se... |
d97a8ee678659d44cb302eb526d0555b01abe955 | 847ebadf2b0e7c01ad33ce92b42528a1a5c4846c | /tests/test-jsonrpc.py | 1df5afa221f8084cc88b1d9822fe4cfe9f4e927e | [
"BSD-3-Clause",
"ISC",
"Apache-2.0",
"SISSL",
"GPL-2.0-only",
"LicenseRef-scancode-unknown-license-reference",
"BSD-2-Clause"
] | permissive | openvswitch/ovs | 6f782527cf5fde4ccfd25e68d359b91ff41acf8a | bc79a7bf033fa4cda8ccfc5481db3cfccd72650c | refs/heads/master | 2023-09-04T06:31:47.899017 | 2023-08-03T16:19:12 | 2023-09-01T20:15:05 | 18,383,364 | 3,366 | 2,259 | Apache-2.0 | 2023-08-17T13:17:13 | 2014-04-02T22:15:28 | C | UTF-8 | Python | false | false | 6,952 | py | test-jsonrpc.py | # Copyright (c) 2009, 2010, 2011 Nicira, 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 agre... |
ecf5c815a65e99265e8bdf4e2fb622cef15cf152 | dacdebab897f9287f37a2e85c5705a926ddd36aa | /tests/conftest.py | e43b87ba860cbd792ca401143fde446e9fcd3699 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | snakemake/snakemake | 5d4528193d87786d7b372ca7653ece302ff46965 | 27b224ed12448df8aebc7d1ff8f25e3bf7622232 | refs/heads/main | 2023-09-02T08:37:04.323976 | 2023-08-11T10:02:34 | 2023-08-11T10:02:34 | 212,840,200 | 1,941 | 536 | MIT | 2023-09-11T09:51:44 | 2019-10-04T14:58:11 | HTML | UTF-8 | Python | false | false | 1,000 | py | conftest.py | import os
import sys
import pytest
from pathlib import Path
from snakemake.common import ON_WINDOWS
from snakemake.utils import find_bash_on_windows
from snakemake.shell import shell
skip_on_windows = pytest.mark.skipif(ON_WINDOWS, reason="Unix stuff")
only_on_windows = pytest.mark.skipif(not ON_WINDOWS, reason="Wind... |
e1292da60d1993aa207b4b63b3098f504d99da91 | 78297bc868d588dd7a16cfea059ef7365ba18622 | /scripts/irods/test/test_imeta_admin_mode.py | 4623d617c77a183306d2ee372a1e08075a5491dd | [
"BSD-3-Clause"
] | permissive | irods/irods | ab72a41fdf05a4a905c3e3a97bb7ba3c2a6ae52d | f3ccaa842218e477395ebcf553639134433b63ee | refs/heads/main | 2023-09-01T20:12:33.322002 | 2023-08-23T18:22:59 | 2023-08-31T13:41:31 | 14,724,975 | 381 | 167 | NOASSERTION | 2023-09-11T18:18:14 | 2013-11-26T18:10:18 | C++ | UTF-8 | Python | false | false | 11,887 | py | test_imeta_admin_mode.py | import os
import sys
if sys.version_info < (2, 7):
import unittest2 as unittest
else:
import unittest
from . import session
from .. import test
rodsusers = [('alice', 'apass')]
rodsadmins = [('otherrods', 'rods')]
class Test_Imeta_Admin_Mode(session.make_sessions_mixin(rodsadmins, rodsusers), unittest.Test... |
9d537273d6a3de8858a61d08a74e449ebcda14b6 | aae782b6f6037570ceca0925adcaf75d8876b995 | /tests/backend/topology/test_von_neumann.py | 7331189bec22bfa839016048c99b90340e49f704 | [
"MIT"
] | permissive | ljvmiranda921/pyswarms | af308358cc2a45524d1ab4e74dfc6205ac67e8f8 | 70c969d929bb2dab6211765def0431680fc5cb01 | refs/heads/master | 2023-06-09T08:19:50.000532 | 2023-06-06T09:46:40 | 2023-06-06T09:46:40 | 97,002,861 | 1,194 | 401 | MIT | 2023-06-06T09:41:53 | 2017-07-12T12:04:45 | Python | UTF-8 | Python | false | false | 1,495 | py | test_von_neumann.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Import modules
import numpy as np
import pytest
# Import from pyswarms
from pyswarms.backend.topology import VonNeumann
from .abc_test_topology import ABCTestTopology
np.random.seed(4135157)
class TestVonNeumannTopology(ABCTestTopology):
@pytest.fixture
def t... |
8b71e6175fce031f2bc632113081d19da4b52f46 | 8f48cf56bbb19560c8f65a81e0ce42e2a9fc27a6 | /tools/schemacode/bidsschematools/conftest.py | 3154e3e5cfc71cc1c83ba957300ecdf5db8fefbb | [
"LicenseRef-scancode-public-domain",
"CC-BY-4.0",
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | bids-standard/bids-specification | 7b48af9353a805aa34e90bb669b0a7564fa377b4 | e1f853873036e2079d39a4fcb1357a04c8afbb80 | refs/heads/master | 2023-08-23T09:18:46.250752 | 2023-08-22T05:45:00 | 2023-08-22T05:45:00 | 150,465,237 | 242 | 164 | CC-BY-4.0 | 2023-09-13T14:09:30 | 2018-09-26T17:35:34 | Python | UTF-8 | Python | false | false | 3,493 | py | conftest.py | import logging
import tempfile
from subprocess import run
try:
from importlib.resources import as_file, files
except ImportError: # PY<3.9
from importlib_resources import as_file, files
import pytest
lgr = logging.getLogger()
# This selects a subset of the bids-examples collection to run the test suite on.... |
c5dc5adb3cefeab1e016ab38c12fa0e025f77eea | db40aac8ebc24d6f2ec2c09605549a4b09e9358b | /CountingGridsPy/EngineToBrowseCloudPipeline/browseCloudArtifactGenerator.py | 1b7077effbc1c16c867ac56b7f176cc6429c38c5 | [
"LicenseRef-scancode-generic-cla",
"MIT"
] | permissive | microsoft/browsecloud | ec9373545222a98d6b56ea54af380d8ced72e097 | 434f0d7e071306659cc9d6066149d3f1b0bdcb32 | refs/heads/master | 2023-09-04T19:09:47.832558 | 2021-01-07T00:19:54 | 2021-01-07T00:19:54 | 191,622,782 | 163 | 20 | MIT | 2023-06-02T17:40:42 | 2019-06-12T18:15:36 | TypeScript | UTF-8 | Python | false | false | 16,035 | py | browseCloudArtifactGenerator.py | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
import numpy as np
import scipy.io as io
import pandas as pd
import matplotlib.pyplot as plt
from CountingGridsPy.EngineToBrowseCloudPipeline import MorphologicalTightener
class BrowseCloudArtifactGenerator(object):
def... |
83dad2e11cc4c94614bdff547c2beef2e1b4d848 | bbfc9f05efefe29b6ce9832bb3506efb900c1c93 | /tencentcloud/teo/v20220106/teo_client.py | 59533f575ee5f236b19089ef5c427beb4eabf200 | [
"Apache-2.0"
] | permissive | TencentCloud/tencentcloud-sdk-python | a2fab235926b0a27e9cfdf55e085a8bb15b3f506 | 6baf00a5a56ba58b6a1123423e0a1422d17a0201 | refs/heads/master | 2023-09-04T10:52:28.060438 | 2023-09-01T03:09:16 | 2023-09-01T03:09:16 | 130,147,399 | 594 | 300 | Apache-2.0 | 2023-09-06T07:03:24 | 2018-04-19T02:23:12 | Python | UTF-8 | Python | false | false | 5,399 | py | teo_client.py | # -*- coding: utf8 -*-
# Copyright (c) 2017-2021 THL A29 Limited, a Tencent company. 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... |
1202b1d46516077679322edea23b0c06ee4620fb | 797c8b85fc5adc6d7d197a904ff0c7c73e6840f9 | /trackmac/config.py | cc278210203a8fdeb697df6fd434374f45316e40 | [
"MIT"
] | permissive | MacLeek/trackmac | f8f349b3593964bf4c254a64588434907750a4ad | 0d99ab5604305d6a572b31b5e5cb33b87fd85d40 | refs/heads/master | 2020-12-04T13:50:51.951150 | 2016-10-05T08:52:40 | 2016-10-05T08:52:40 | 67,489,431 | 121 | 15 | null | 2019-10-21T16:40:38 | 2016-09-06T08:32:39 | Python | UTF-8 | Python | false | false | 704 | py | config.py | # -*- coding: utf-8 -*-
import os
VERSION = '0.0.6'
TRACK_SCRIPT = 'tm'
TRACK_DAEMON = 'trackmac_service'
TRACK_DIR = os.path.expanduser('~/Library/Application Support/com.github.macleek.trackmac/')
TRACK_DB_FILE = TRACK_DIR + 'track.db'
TRACK_LOG_FILE = TRACK_DIR + 'track.log'
TRACK_PLIST_NAME = 'com.github.macleek.t... |
55ad9064741383fe222e6ebec21dbed0eb161d9f | 6923f79f1eaaba0ab28b25337ba6cb56be97d32d | /A_Primer_on_Scientific_Programming_with_Python/plot/mpl_pylab_examples.py | 33793944da0db16ead73e2b7687f15317213ed77 | [] | no_license | burakbayramli/books | 9fe7ba0cabf06e113eb125d62fe16d4946f4a4f0 | 5e9a0e03aa7ddf5e5ddf89943ccc68d94b539e95 | refs/heads/master | 2023-08-17T05:31:08.885134 | 2023-08-14T10:05:37 | 2023-08-14T10:05:37 | 72,460,321 | 223 | 174 | null | 2022-10-24T12:15:06 | 2016-10-31T17:24:00 | Jupyter Notebook | UTF-8 | Python | false | false | 1,656 | py | mpl_pylab_examples.py | from matplotlib.pylab import *
raw_input=lambda x: None
def f(t):
return t**2*exp(-t**2)
t = linspace(0, 3, 51) # 51 points between 0 and 3
y = zeros(len(t)) # allocate y with float elements
for i in xrange(len(t)):
y[i] = f(t[i])
plot(t, y)
show()
raw_input('Press the Return key to quit: ')
# v... |
b36fd780df6f60b9b8e399382dc4dbd4393125c6 | fdb47aa5092baa4f5ec86b3819961c77731a33e1 | /darts/ad/scorers/nll_poisson_scorer.py | df5ee411b84649b56b0b5e08efb1465b91fb6548 | [
"Apache-2.0"
] | permissive | unit8co/darts | 6177e273950208b859c9208677a6f2632fc2aa2d | 52ac1814a7a21b107d2391598dfc3a4a5bd33ca7 | refs/heads/master | 2023-09-01T04:12:19.632394 | 2023-08-31T12:58:58 | 2023-08-31T12:58:58 | 148,657,183 | 6,234 | 759 | Apache-2.0 | 2023-09-14T10:18:50 | 2018-09-13T15:17:28 | Python | UTF-8 | Python | false | false | 809 | py | nll_poisson_scorer.py | """
NLL Poisson Scorer
------------------
Poisson distribution negative log-likelihood Scorer.
The anomaly score is the negative log likelihood of the actual series values
under a Poisson distribution estimated from the stochastic prediction.
"""
import numpy as np
from scipy.stats import poisson
from darts.ad.scor... |
662784f50b5732d1f9c82fcc5e94bad6bc3c8d74 | 8ed15d43652dbcab332c78923da416b91b139323 | /python/fedml/core/distributed/crypto/crypto_api.py | e7283aca5772acfe7a2839dccd6fb56aacd2f729 | [
"Apache-2.0"
] | permissive | FedML-AI/FedML | 74d144038c9de4a0621eb328d00987abac35e2d1 | b436fbd95cbb62f6c58d2233d7affa0f62cb1817 | refs/heads/master | 2023-08-31T22:15:39.786371 | 2023-08-24T03:41:58 | 2023-08-24T03:41:58 | 281,519,510 | 3,197 | 807 | Apache-2.0 | 2023-09-14T02:14:20 | 2020-07-21T22:41:25 | Python | UTF-8 | Python | false | false | 2,167 | py | crypto_api.py | import hashlib
from base64 import a85decode, a85encode
from ecies.utils import aes_decrypt, aes_encrypt
from nacl.public import Box, PrivateKey, PublicKey
def export_public_key(private_key_hex: str) -> bytes:
"""Export public key for contract join request.
Args:
private_key: hex string representing ... |
440a9147d254e79d448c1ed46569749dffaa10eb | 85ccd32aa73eecf274a937f1fc3b6f4d484b77da | /test cases/common/97 find program path/program.py | 2ebc5641932b103432e4ef7a0e6213fb740bf2fb | [
"Apache-2.0"
] | permissive | mesonbuild/meson | 48321cf4235dfcc0194fed90ff43a57367592bf7 | cf5adf0c646474f0259d123fad60ca5ed38ec891 | refs/heads/master | 2023-09-01T05:58:50.807952 | 2023-03-17T20:27:37 | 2023-08-31T11:52:41 | 19,784,232 | 5,122 | 1,848 | Apache-2.0 | 2023-09-14T15:47:23 | 2014-05-14T15:08:16 | Python | UTF-8 | Python | false | false | 39 | py | program.py | #!/usr/bin/env python3
print("Found")
|
c3f0f1abda4896c0403fc227a7b82c987040634b | bd40507df0632aab5ead2a06a4fe6f0459bda236 | /data_lineage/server.py | 8040f15694416cad38be8d564c8728a2fd5d540b | [
"MIT"
] | permissive | tokern/data-lineage | ed8a50f0fb9a82ce628e0c4351ecca020ab60103 | 5945542742979fe350d313d906440c93ee3d0f36 | refs/heads/master | 2023-09-01T11:24:44.698349 | 2023-08-04T07:24:15 | 2023-08-04T07:24:15 | 247,882,621 | 274 | 41 | MIT | 2023-03-23T18:36:35 | 2020-03-17T04:55:39 | Python | UTF-8 | Python | false | false | 13,810 | py | server.py | import datetime
import logging
from typing import Any, Dict, List, Tuple
import flask_restless
import gunicorn.app.base
from dbcat import Catalog, PGCatalog, init_db
from dbcat.catalog import CatColumn
from dbcat.catalog.models import (
CatSchema,
CatSource,
CatTable,
ColumnLineage,
DefaultSchema,
... |
b540ea7e946e545bdf25c5788d7cfa573d07cbee | 4b15f318ba3332ee946cb0b2838c93e7935b9b89 | /tests/functional/pyocf/types/io.py | 0c7d69220ff939ecdbad0b91cddfa744720a840d | [
"BSD-3-Clause"
] | permissive | Open-CAS/ocf | c4f8a5c9c1b254a905fda75be2c19bd7c8ebd450 | 016d7a8ee2822d672c308264e79bae4081e7930e | refs/heads/master | 2023-05-28T08:40:51.328181 | 2023-05-11T08:11:57 | 2023-05-11T08:11:57 | 152,160,836 | 168 | 94 | BSD-3-Clause | 2023-09-14T08:01:50 | 2018-10-08T23:46:10 | C | UTF-8 | Python | false | false | 3,275 | py | io.py | #
# Copyright(c) 2019-2022 Intel Corporation
# SPDX-License-Identifier: BSD-3-Clause
#
from ctypes import (
c_void_p,
c_int,
c_uint32,
c_uint64,
CFUNCTYPE,
Structure,
POINTER,
byref,
cast,
)
from enum import IntEnum
from ..ocf import OcfLib
from .data import Data
class IoDir(IntE... |
b25c6bf10e7f5dd96703db220c9ab07bbe8eb640 | da1721d2783ea4d67ff4e73cee6eee71292f2ef7 | /toontown/ai/CrashedLeaderBoardDecorator.py | e55b20c92b4f01fd8cfd6f147ca295ad083d3675 | [
"BSD-3-Clause"
] | permissive | open-toontown/open-toontown | bbdeb1b7bf0fb2861eba2df5483738c0112090ca | 464c2d45f60551c31397bd03561582804e760b4a | refs/heads/develop | 2023-07-07T01:34:31.959657 | 2023-05-30T23:49:10 | 2023-05-30T23:49:10 | 219,221,570 | 143 | 104 | BSD-3-Clause | 2023-09-11T09:52:34 | 2019-11-02T22:24:38 | Python | UTF-8 | Python | false | false | 1,928 | py | CrashedLeaderBoardDecorator.py | from direct.directnotify import DirectNotifyGlobal
from direct.distributed.ClockDelta import *
from direct.interval.IntervalGlobal import *
from . import HolidayDecorator
from toontown.toonbase import ToontownGlobals
from panda3d.core import Vec4, CSDefault, TransformState, NodePath, TransparencyAttrib
from panda3d.too... |
9cdb299351fea3b328d608c04a57bcbee80baf2f | dbd37114c5e3b39d0ce4d6135144f5a7a3b6d4f5 | /pytorch_tools/fit_wrapper/utils.py | 613319eb6e16417b59a2b44fe148d3cf33d7f23c | [
"MIT"
] | permissive | bonlime/pytorch-tools | 6633fe8969ef51450589670c2393838131963773 | 74cd3dcef5ce4f81302be4061414c1d1113dafb8 | refs/heads/master | 2023-09-03T20:18:16.718561 | 2023-08-29T12:36:35 | 2023-08-29T12:36:35 | 201,936,229 | 190 | 16 | MIT | 2023-08-04T22:42:27 | 2019-08-12T13:30:30 | Python | UTF-8 | Python | false | false | 3,669 | py | utils.py | """Utils used inside fit wrapper. Moved here to make it easily separable
Some functions may duplicate, this is expected
"""
import os
import time
import torch
from collections.abc import Iterable
import numpy as np
import torch.distributed as dist
from typing import Any
def listify(p: Any) -> Iterable:
if p is N... |
f9c1c4aad485494a8be50932105a61a8de8d4e9a | a22139a4b99042def74629f0a648673e7b618648 | /code/FINDER_ND_cost/FINDER.pyx | 3f6ff88e088bdaf6e590b204c85775bdd4a03add | [
"MIT"
] | permissive | FFrankyy/FINDER | 32ded2d6b9a8f9389e0221217b4086f61fb586f5 | dde6f724abca765a2b8eba418cb7f40ccefb4629 | refs/heads/master | 2023-04-14T02:09:11.428610 | 2020-07-07T08:25:33 | 2020-07-07T08:25:33 | 245,740,191 | 144 | 42 | MIT | 2023-03-24T22:15:42 | 2020-03-08T02:38:54 | Python | UTF-8 | Python | false | false | 42,386 | pyx | FINDER.pyx | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Tue Dec 19 00:33:33 2017
@author: fanchangjun
"""
from __future__ import print_function, division
import tensorflow as tf
import numpy as np
import networkx as nx
import random
import time
import pickle as cp
import sys
from tqdm import tqd... |
e5ba12545e1f7bdce6a8332a16bd4ab64017c8f6 | 444a9480bce2035565332d4d4654244c0b5cd47b | /research/cv/Focus-DETR/config/Focus_DETR/coco_transformer.py | 064dc4f443bf983c6376a3acc2ca1a42e5e83b5e | [
"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 | 256 | py | coco_transformer.py | # Copyright 2023 Huawei Technologies Co., Ltd
#
data_aug_scales = [480, 512, 544, 576, 608, 640, 672, 704, 736, 768, 800]
data_aug_max_size = 1333
data_aug_scales2_resize = [400, 500, 600]
data_aug_scales2_crop = [384, 600]
data_aug_scale_overlap = None
|
92fbd9a2886157790eb3345969ac97a69e66d66f | 5dc77586e3e0f9de1f032fd2ca68494d8e58928f | /tests/render/test_inline_renderer.py | 10c1df373e8a188edf6bcdabaf5fab6edbb11cf7 | [
"Apache-2.0"
] | permissive | great-expectations/great_expectations | dd7c22e6277d6b08bee3ff38a015e6e8cd434df6 | b0290e2fd2aa05aec6d7d8871b91cb4478e9501d | refs/heads/develop | 2023-09-04T09:30:26.395518 | 2023-09-02T00:00:13 | 2023-09-02T00:00:13 | 103,071,520 | 8,931 | 1,535 | Apache-2.0 | 2023-09-14T19:57:16 | 2017-09-11T00:18:46 | Python | UTF-8 | Python | false | false | 30,838 | py | test_inline_renderer.py | from typing import List
import pytest
from great_expectations.core.expectation_configuration import ExpectationConfiguration
from great_expectations.core.expectation_suite import ExpectationSuite
from great_expectations.core.expectation_validation_result import (
ExpectationValidationResult,
)
from great_expectat... |
c43ee4f097aa71f1eec4010eb4277eef013217d5 | bb33e6be8316f35decbb2b81badf2b6dcf7df515 | /source/res/scripts/client/gui/Scaleform/daapi/view/lobby/customization/customization_carousel.py | 0ed410c7fe93cb82aceadd649127ab69e4f2d93e | [] | 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 | 29,408 | py | customization_carousel.py | # Python bytecode 2.7 (decompiled from Python 2.7)
# Embedded file name: scripts/client/gui/Scaleform/daapi/view/lobby/customization/customization_carousel.py
import logging
from collections import defaultdict, namedtuple, OrderedDict
from itertools import chain
import typing
from CurrentVehicle import g_currentVehicle... |
b7e18fee32f17ec7e6aea3a04dfa4ede543d712d | 5ef6c8d47864f471e26b9902d61f8c687e941f05 | /src/genie/libs/parser/iosxe/tests/ShowUsers/cli/equal/golden_output_5_expected.py | 8b38320d2c82720d0d4f1ea66a92679916010e91 | [
"Apache-2.0"
] | permissive | CiscoTestAutomation/genieparser | 169c196558f1c1a0f0d10650876096f993224917 | b531eff760b2e44cd69d7a2716db6f866907c239 | refs/heads/master | 2023-09-03T08:56:18.831340 | 2023-08-29T22:32:02 | 2023-08-29T22:32:02 | 131,621,824 | 247 | 409 | Apache-2.0 | 2023-08-29T22:32:04 | 2018-04-30T16:51:50 | Python | UTF-8 | Python | false | false | 399 | py | golden_output_5_expected.py | expected_output = {
'line': {
'0 con 0': {
'host': 'idle',
'idle': '00:00:00',
'active': True
}
},
'connection_details': {
1: {
'intf': 'Vi2.1',
'u_name': 'lns@cisco.com',
'mode': 'PPPoVPDN',
... |
eb08ff688af6a141bff8827eed3ae9b82197fe21 | 2bb96128322c0307742c6809f0d8c7eddb09c523 | /pytest_tutorial/demo2_function_test.py | 7e3574dfc235c71cc1e98a09c2da133b245fbbc3 | [
"MIT"
] | permissive | twtrubiks/python-notes | 2390c66d25b39f5a73968829702d4fd02ccf1b28 | 042a651aaa04c07f76c52bc52bace665d0df99d7 | refs/heads/master | 2023-08-17T11:50:13.122573 | 2023-08-05T04:14:56 | 2023-08-05T04:14:56 | 90,001,387 | 122 | 49 | MIT | 2021-12-21T07:18:06 | 2017-05-02T06:55:21 | Python | UTF-8 | Python | false | false | 328 | py | demo2_function_test.py | import pytest
def setup_function():
print("setup...")
def teardown_function():
print("teardown...")
def test_case1():
print("run test_case1")
assert 2 + 2 == 4
def test_case2():
print("run test_case2")
assert 1 + 12 == 13
def test_case3():
print("run test_case3")
assert 199 + 1... |
5c90a3e9ab9d4b7608906fc0a803da594cef4684 | f80ef3a3cf859b13e8af8433af549b6b1043bf6e | /pyobjc-framework-CoreServices/PyObjCTest/test_dictionaryservices.py | 5c62bd961fe93fd0a59cf73bc3cf6ab0ed09f614 | [
"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 | 752 | py | test_dictionaryservices.py | import CoreServices
from PyObjCTools.TestSupport import TestCase, os_release, skipUnless
class TestDictionaryServices(TestCase):
def testClasses(self):
self.assertIsCFType(CoreServices.DCSDictionaryRef)
@skipUnless(
os_release().rsplit(".", 1)[0] not in ("10.12", "10.13"), "buggy os release"
... |
ef216e72b585f8e9bfd8b092371234fc56241a24 | 66a9c25cf0c53e2c3029b423018b856103d709d4 | /sleekxmpp/stanza/htmlim.py | c43178f2f0f800721b20ebd18c6942ac08d2e60f | [
"MIT",
"BSD-3-Clause",
"BSD-2-Clause"
] | permissive | fritzy/SleekXMPP | 1b02d3e2b22efeb6bf3f8f487e6c0343b9b85baf | cc1d470397de768ffcc41d2ed5ac3118d19f09f5 | refs/heads/develop | 2020-05-22T04:14:58.568822 | 2020-02-18T22:54:57 | 2020-02-18T22:54:57 | 463,405 | 658 | 254 | NOASSERTION | 2023-06-27T20:05:54 | 2010-01-08T05:54:45 | Python | UTF-8 | Python | false | false | 595 | py | htmlim.py | """
SleekXMPP: The Sleek XMPP Library
Copyright (C) 2010 Nathanael C. Fritz
This file is part of SleekXMPP.
See the file LICENSE for copying permission.
"""
from sleekxmpp.stanza import Message
from sleekxmpp.xmlstream import register_stanza_plugin
from sleekxmpp.plugins.xep_0071 import XHTML_IM as H... |
ffa6bec7348c3c61cacd502e058fdaf087b89753 | b7be705ab774860f8a5a49d756f50994a37e307d | /equipment-activity-monitor/python/iot_equipment_activity_monitor/hardware/dfrobot.py | 520cc0327ac3b60e13bbeed76b3430da0f88d334 | [
"MIT"
] | permissive | intel-iot-devkit/how-to-code-samples | b87916f7e919d859a5f4084f40e8bd62007a8469 | 821de0727b999391131e6947868371b1424c1d39 | refs/heads/master | 2023-01-05T04:30:54.650902 | 2023-01-03T22:56:31 | 2023-01-03T22:56:31 | 45,066,968 | 204 | 161 | null | 2017-11-13T20:57:42 | 2015-10-27T20:08:02 | C++ | UTF-8 | Python | false | false | 4,221 | py | dfrobot.py | # Copyright (c) 2015 - 2016 Intel Corporation.
#
# 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 use, copy, modify, merge, pu... |
271b3a185195948f64e531c3eb069fc2012138e1 | 010279e2ba272d09e9d2c4e903722e5faba2cf7a | /contrib/python/prompt-toolkit/py3/prompt_toolkit/shortcuts/prompt.py | ed56adc94e78afb42bf869fd59093bdc34714fd1 | [
"BSD-3-Clause",
"Apache-2.0"
] | permissive | catboost/catboost | 854c1a1f439a96f1ae6b48e16644be20aa04dba2 | f5042e35b945aded77b23470ead62d7eacefde92 | refs/heads/master | 2023-09-01T12:14:14.174108 | 2023-09-01T10:01:01 | 2023-09-01T10:22:12 | 97,556,265 | 8,012 | 1,425 | Apache-2.0 | 2023-09-11T03:32:32 | 2017-07-18T05:29:04 | Python | UTF-8 | Python | false | false | 59,364 | py | prompt.py | """
Line editing functionality.
---------------------------
This provides a UI for a line input, similar to GNU Readline, libedit and
linenoise.
Either call the `prompt` function for every line input. Or create an instance
of the :class:`.PromptSession` class and call the `prompt` method from that
class. In the secon... |
324c996e460460978d37195f92ca524e994b0694 | e7efae2b83216d9621bd93390959d652de779c3d | /solr/tests/common.py | 91dec8b6c5c30609fd12d2b0d145f2285ab83741 | [
"BSD-3-Clause",
"MIT",
"BSD-3-Clause-Modification",
"Unlicense",
"Apache-2.0",
"LGPL-3.0-only",
"LicenseRef-scancode-public-domain",
"BSD-2-Clause",
"CC0-1.0"
] | permissive | DataDog/integrations-core | ee1886cc7655972b2791e6ab8a1c62ab35afdb47 | 406072e4294edff5b46b513f0cdf7c2c00fac9d2 | refs/heads/master | 2023-08-31T04:08:06.243593 | 2023-08-30T18:22:10 | 2023-08-30T18:22:10 | 47,203,045 | 852 | 1,548 | BSD-3-Clause | 2023-09-14T16:39:54 | 2015-12-01T16:41:45 | Python | UTF-8 | Python | false | false | 1,355 | py | common.py | # (C) Datadog, Inc. 2020-present
# All rights reserved
# Licensed under Simplified BSD License (see LICENSE)
from datadog_checks.dev import get_docker_hostname
HOST = get_docker_hostname()
UI_PORT = "8983"
SOLR_METRICS = [
"solr.document_cache.evictions",
"solr.document_cache.hits",
"solr.document_cache.i... |
d2b038a0d1c4d4af3b674ffa265792acefa6b5a9 | ef0c1514e9af6de3ba4a20e0d01de7cc3a915188 | /sdk/resourcemanagerhybrid/update_root_pom.py | 13e86ab9b076de19d884a2c979ae50cb78bd6869 | [
"MIT",
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-unknown-license-reference",
"LGPL-2.1-or-later",
"CC0-1.0",
"BSD-3-Clause",
"UPL-1.0",
"Apache-2.0",
"LicenseRef-scancode-public-domain",
"BSD-2-Clause",
"LicenseRef-scancode-generic-cla"
] | permissive | Azure/azure-sdk-for-java | 0902d584b42d3654b4ce65b1dad8409f18ddf4bc | 789bdc6c065dc44ce9b8b630e2f2e5896b2a7616 | refs/heads/main | 2023-09-04T09:36:35.821969 | 2023-09-02T01:53:56 | 2023-09-02T01:53:56 | 2,928,948 | 2,027 | 2,084 | MIT | 2023-09-14T21:37:15 | 2011-12-06T23:33:56 | Java | UTF-8 | Python | false | false | 234 | py | update_root_pom.py | with open('pom.xml', 'r') as file:
filedata = file.read()
filedata = filedata.replace('<module>sdk/resourcemanager</module>', '<module>sdk/resourcemanagerhybrid</module>')
with open('pom.xml', 'w') as file:
file.write(filedata)
|
54f232400a4c04d5e117a93717d4fe34a1bbc853 | 07e810873aa0134ba5017ccfef641d1038ca9b92 | /theme/migrations/0007_auto_20170427_1553.py | af8e08ea4a6905598a2978c71ebbd096580943b3 | [
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause"
] | permissive | hydroshare/hydroshare | 9093e6dce047a30d4b2b7720257a7841d209353f | 69855813052243c702c9b0108d2eac3f4f1a768f | refs/heads/develop | 2023-09-04T12:52:30.816709 | 2023-08-30T16:46:20 | 2023-08-30T16:46:20 | 24,703,136 | 207 | 57 | BSD-3-Clause | 2023-09-14T20:20:16 | 2014-10-02T02:19:41 | Python | UTF-8 | Python | false | false | 1,098 | py | 0007_auto_20170427_1553.py | # -*- coding: utf-8 -*-
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('theme', '0006_auto_20170309_1516'),
]
operations = [
migrations.AddField(
model_name='homepage',
name='message_end_date',
field... |
69204b72e4ef822047c55d375adee2568717328f | 749780a767bb719f6333d406d477b1fc0ec2c80a | /utils/cbl_installed_software.py | f1055a3b2f3cd65e31162fe1f6bd57a270f888c1 | [
"MIT"
] | permissive | chapmanb/cloudbiolinux | 4482a271d4b8ea5e37075170452076c9886ae0d7 | 39eb5ac3d45654404d703ffb450a67947458df37 | refs/heads/master | 2023-09-06T03:52:42.206531 | 2023-03-27T04:37:38 | 2023-03-27T04:37:38 | 1,591,413 | 167 | 135 | MIT | 2023-03-21T22:10:36 | 2011-04-09T13:09:58 | Python | UTF-8 | Python | false | false | 382 | py | cbl_installed_software.py | #!/usr/bin/env python
"""Provide dump of software and libraries installed on CloudBioLinux image.
Run from the top level of the cloudbiolinux source directory:
python utils/cbl_installed_software.py
"""
import os
from cloudbio import manifest
def main():
out_dir = os.path.join(os.getcwd(), "manifest")
ma... |
04b779d939762037f54c994b96f53666ea9a7897 | 578db86c51d44ebddd0dc7b1738985b3dc69eb74 | /corehq/apps/app_manager/exceptions.py | eaf56aca01b42a99afb9125060235ceddf103a19 | [
"BSD-3-Clause"
] | permissive | dimagi/commcare-hq | a43c7dd32b5f89c89fd5aa1b1359ab7301f4ff6b | e7391ddae1af1dbf118211ecb52c83fc508aa656 | refs/heads/master | 2023-08-16T22:38:27.853437 | 2023-08-16T19:07:19 | 2023-08-16T19:07:19 | 247,278 | 499 | 203 | BSD-3-Clause | 2023-09-14T19:03:24 | 2009-07-09T17:00:07 | Python | UTF-8 | Python | false | false | 4,488 | py | exceptions.py | import couchdbkit
from corehq.apps.app_manager.const import APP_V2
class AppManagerException(Exception):
pass
class VersioningError(AppManagerException):
"""For errors that violate the principles of versioning in ApplicationBase"""
pass
class ModuleNotFoundException(AppManagerException, IndexError):
... |
2641b0b846b6b16c88c0c70d2ef9fe00c878ce25 | df1254b56f35b24644e00493c50d4b6eb3c15b7b | /colour/geometry/section.py | aa7cf78db92a10df4cb0659bdcb066a2332c0f70 | [
"BSD-3-Clause"
] | permissive | colour-science/colour | 908400b227cf81668675e41099256ce50b23ae4b | 1fdf3b3042922e8d4f86b989b00a06e7e5d81102 | refs/heads/develop | 2023-09-01T23:17:07.186869 | 2023-08-26T09:40:45 | 2023-08-26T09:40:45 | 17,114,363 | 1,756 | 301 | BSD-3-Clause | 2023-09-14T10:24:37 | 2014-02-23T18:55:40 | Python | UTF-8 | Python | false | false | 6,831 | py | section.py | """
Geometry / Hull Section
=======================
Defines various objects to compute hull sections:
- :func:`colour.geometry.hull_section`
"""
from __future__ import annotations
import numpy as np
from colour.algebra import linear_conversion
from colour.constants import DEFAULT_FLOAT_DTYPE
from colour.hints im... |
387e4ce10faf6b74f047d95c0ae17b06b101a1bd | 0893d8cdfbce152bedba671cbc77f2210137e966 | /docs/conf.py | 370a4669a1eb2d5dc7de440cf107b18ac4b623cc | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-generic-cla"
] | permissive | elastic/rally | ff66be39505ae93d1d3fb125a3ee1cc30d8ef4cb | 3398bb861e6f9e15ff4887be8e9cede3966930fe | refs/heads/master | 2023-08-31T20:37:05.610611 | 2023-08-31T06:58:58 | 2023-08-31T06:58:58 | 47,140,131 | 1,849 | 346 | Apache-2.0 | 2023-09-14T12:32:46 | 2015-11-30T19:11:43 | Python | UTF-8 | Python | false | false | 5,859 | py | conf.py | #!/usr/bin/env python3
# Licensed to Elasticsearch B.V. under one or more contributor
# license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright
# ownership. Elasticsearch B.V. licenses this file to you under
# the Apache License, Version 2.0 (the "License"); ... |
d6c62d74442de3641905784beebca650cb155199 | 32809f6f425bf5665fc19de2bc929bacc3eeb469 | /src/1281-Subtract-the-Product-and-Sum-of-Digits-of-an-Integer/1281.py | 4a0304bc511862815f6353c0a2c7788944ce058d | [] | no_license | luliyucoordinate/Leetcode | 9f6bf01f79aa680e2dff11e73e4d10993467f113 | bcc04d49969654cb44f79218a7ef2fd5c1e5449a | refs/heads/master | 2023-05-25T04:58:45.046772 | 2023-05-24T11:57:20 | 2023-05-24T11:57:20 | 132,753,892 | 1,575 | 569 | null | 2023-05-24T11:57:22 | 2018-05-09T12:30:59 | C++ | UTF-8 | Python | false | false | 179 | py | 1281.py | from functools import reduce
class Solution:
def subtractProductAndSum(self, n: int) -> int:
A = list(map(int, str(n)))
return reduce(operator.mul, A) - sum(A) |
8445413be24680f60faba791d280b5fd6dbf5d69 | 4bcc9806152542ab43fc2cf47c499424f200896c | /tensorflow/python/framework/type_utils.py | 0eebdae2be9800651bd6478c98f1fc1e88888bc3 | [
"Apache-2.0",
"LicenseRef-scancode-generic-cla",
"BSD-2-Clause"
] | permissive | tensorflow/tensorflow | 906276dbafcc70a941026aa5dc50425ef71ee282 | a7f3934a67900720af3d3b15389551483bee50b8 | refs/heads/master | 2023-08-25T04:24:41.611870 | 2023-08-25T04:06:24 | 2023-08-25T04:14:08 | 45,717,250 | 208,740 | 109,943 | Apache-2.0 | 2023-09-14T20:55:50 | 2015-11-07T01:19:20 | C++ | UTF-8 | Python | false | false | 8,356 | py | type_utils.py | # Copyright 2022 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... |
65c3989e7fd36bb0a79a174c971a0bafa942e754 | 6416b746ee71d897789eab1e450000831674dbd0 | /src/otx/api/usecases/adapters/model_adapter.py | 837f7ef6f6275325b8c912409fba42f608b9a634 | [
"Apache-2.0"
] | permissive | openvinotoolkit/training_extensions | c921f83ad52311af96ff45ae0b88d0aecddd855b | 80454808b38727e358e8b880043eeac0f18152fb | refs/heads/develop | 2023-08-31T06:29:07.229339 | 2023-08-31T01:57:26 | 2023-08-31T01:57:26 | 154,843,614 | 397 | 230 | Apache-2.0 | 2023-09-14T06:17:01 | 2018-10-26T14:02:29 | Python | UTF-8 | Python | false | false | 1,812 | py | model_adapter.py | """This module define a module to adapt model weights from a data source."""
# Copyright (C) 2021-2022 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
import abc
from typing import Union
class IDataSource:
"""Class that holds a combination of both a repo and a URL which can be used to fetch data."""
... |
7965c1e6dbf51961817f450533483a439c636005 | 53ab063373d7c405bf6edd29d5fb2dfadeff874e | /tester.py | 6febcd64bf52f3c05d5c038cf7fdb44aa1b1a9aa | [
"BSD-2-Clause-Views"
] | permissive | dano/aioprocessing | 2e5d10e4b25ed1df6575eb351950c9470794f3aa | 39e84ac016aa21d93835b44ca134b0791c8c13ba | refs/heads/master | 2023-07-31T20:26:37.158038 | 2022-09-16T02:29:57 | 2022-09-16T02:29:57 | 22,361,744 | 645 | 37 | NOASSERTION | 2022-09-09T16:25:39 | 2014-07-28T23:48:40 | Python | UTF-8 | Python | false | false | 927 | py | tester.py | #!/usr/bin/python3
import asyncio
from aioprocessing import AioManager
from concurrent.futures import ProcessPoolExecutor
async def _do_coro_proc_work(q, val, val2):
ok = val + val2
# await asyncio.sleep(4)
print("Passing {} to parent".format(ok))
await q.coro_put(ok)
item = q.get()
print("go... |
bf94b79cfc2873c169518e36d9e4c9215efdd6e7 | 80f94bea418d7956df1ba19d4d6a1d7715a94ade | /lib/galaxy/webapps/galaxy/services/visualizations.py | 557d4cd650822ba757ac022405735bc2a3846721 | [
"CC-BY-2.5",
"MIT",
"CC-BY-3.0",
"AFL-3.0"
] | permissive | galaxyproject/galaxy | 5748409eb6693b1611f289d164f85e20c3237495 | b9ae7a16ba0465995e880ae9701b7e87226b9bab | refs/heads/dev | 2023-08-28T22:35:51.248138 | 2023-08-26T08:02:33 | 2023-08-26T08:02:33 | 31,211,061 | 1,277 | 1,137 | NOASSERTION | 2023-09-14T19:39:01 | 2015-02-23T14:18:06 | Python | UTF-8 | Python | false | false | 1,227 | py | visualizations.py | import logging
from galaxy.managers.notification import NotificationManager
from galaxy.managers.visualizations import (
VisualizationManager,
VisualizationSerializer,
)
from galaxy.security.idencoding import IdEncodingHelper
from galaxy.webapps.galaxy.services.base import ServiceBase
from galaxy.webapps.galax... |
fecd53f2c86a943fa094eb592b8d6e4a6d179e45 | 187414dcb264fb49d82507a099fd5fdca6e55e38 | /python/pyspark/sql/connect/readwriter.py | cfcbcede34873257b17b3b42d030cc63b4481bbe | [
"BSD-3-Clause",
"CC0-1.0",
"CDDL-1.1",
"Apache-2.0",
"LicenseRef-scancode-public-domain",
"BSD-2-Clause",
"LicenseRef-scancode-unknown-license-reference",
"EPL-2.0",
"CDDL-1.0",
"MIT",
"LGPL-2.0-or-later",
"Python-2.0",
"LicenseRef-scancode-generic-cla",
"LicenseRef-scancode-free-unknown",... | permissive | apache/spark | 8aeba2d80465a262acc95781ede105a5b5886f6d | 60d8fc49bec5dae1b8cf39a0670cb640b430f520 | refs/heads/master | 2023-09-04T04:33:36.058199 | 2023-09-04T03:48:52 | 2023-09-04T03:48:52 | 17,165,658 | 39,983 | 32,449 | Apache-2.0 | 2023-09-14T19:46:24 | 2014-02-25T08:00:08 | Scala | UTF-8 | Python | false | false | 30,448 | py | readwriter.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 us... |
25316fbf72848737ee365bf235321f2025389076 | db43055180800e54526affb7941fc77e0226c4b3 | /city_scrapers/mixins/__init__.py | 254a84cf7bc620c6d64e9b9bf021ccffaf3e87a5 | [
"MIT"
] | permissive | City-Bureau/city-scrapers | 53724d4e973d71ec331cd9749e350c460aa6fb9d | 611fce6a2705446e25a2fc33e32090a571eb35d1 | refs/heads/main | 2023-08-15T01:06:49.336847 | 2023-07-01T20:39:28 | 2023-07-01T20:39:28 | 97,890,025 | 308 | 366 | MIT | 2023-09-07T07:30:12 | 2017-07-21T00:45:13 | Python | UTF-8 | Python | false | false | 144 | py | __init__.py | from .chi_mayors_advisory_councils import ChiMayorsAdvisoryCouncilsMixin # noqa
from .chi_rogers_park_ssa import ChiRogersParkSsaMixin # noqa
|
00da1021cd1fe8892fac35d533601a058ce1a710 | 9f84d91a8ae3df53b07fe3267992fba00a99ac9e | /test/explain/algorithm/test_explain_algorithm_utils.py | 71a3768892348981b5fb5601f2baa198d4a4a400 | [
"MIT"
] | permissive | pyg-team/pytorch_geometric | ebea601eae228f3905465b5c2349d3fb3bb5cb26 | a52af694b8ce6a80811e20966fe6d08a3e7511fe | refs/heads/master | 2023-08-31T04:13:40.943308 | 2023-08-30T12:48:42 | 2023-08-30T12:48:42 | 106,024,057 | 6,775 | 1,563 | MIT | 2023-09-14T17:10:18 | 2017-10-06T16:03:03 | Python | UTF-8 | Python | false | false | 2,674 | py | test_explain_algorithm_utils.py | import torch
from torch_geometric.explain.algorithm.utils import (
clear_masks,
set_hetero_masks,
)
from torch_geometric.nn import GCNConv, HeteroConv, SAGEConv, to_hetero
class HeteroModel(torch.nn.Module):
def __init__(self):
super().__init__()
self.conv1 = HeteroConv({
('p... |
0e1198d2fd96e53bea0068e6059f7ac39c0041b2 | f3806d9fb54773908cd9704121a543b114470aca | /angr/analyses/decompiler/peephole_optimizations/bitwise_or_to_logical_or.py | a33c9360fe1975e3c4b6c0f34c3391955da947ef | [
"BSD-2-Clause"
] | permissive | angr/angr | 8ae95fceca51b0a001de56477d984dd01193ac1d | 37e8ca1c3308ec601ad1d7c6bc8081ff38a7cffd | refs/heads/master | 2023-08-17T03:15:21.007865 | 2023-08-15T18:44:57 | 2023-08-15T18:44:57 | 40,328,394 | 7,184 | 1,306 | BSD-2-Clause | 2023-09-14T20:14:23 | 2015-08-06T21:46:55 | Python | UTF-8 | Python | false | false | 1,288 | py | bitwise_or_to_logical_or.py | from ailment.expression import BinaryOp, Const
from .base import PeepholeOptimizationExprBase
class BitwiseOrToLogicalOr(PeepholeOptimizationExprBase):
"""
Perform the following two simplifications:
1. (a | b) == 0 ==> (a == 0) && (b == 0)
2. (a | b) != 0 ==> (a != 0) || (b != 0)
"""
__... |
65da192e19f02a88e259c1ee9535631dc464d85e | e986b7650d2317f740d65f44b19e663cb646d85e | /jdaviz/configs/default/plugins/viewer_creator/__init__.py | b1c67ad265fcf655f59d9f148d0ccfef3116a555 | [
"BSD-3-Clause"
] | permissive | spacetelescope/jdaviz | a223230d2296f7fdee17a43ae1a4bee45452ec13 | 17a864ed7d64cece18fbc29f3561c137e6bf0942 | refs/heads/main | 2023-08-17T05:59:55.109052 | 2023-08-15T19:46:49 | 2023-08-15T19:46:49 | 185,452,341 | 105 | 70 | BSD-3-Clause | 2023-09-14T15:20:16 | 2019-05-07T17:54:06 | Python | UTF-8 | Python | false | false | 38 | py | __init__.py | from .viewer_creator import * # noqa
|
d0e16d44b1405228dcbc68610d12238172e9da05 | 2ad93a1cf25a580fe980482d2d17a657de3b2523 | /django-stubs/core/serializers/python.pyi | c25c910edb8da8bafb0525eaa1fce04561534d71 | [
"MIT"
] | permissive | typeddjango/django-stubs | f35dfcb001e54694a0a1e8c0afcc6e6a3d130c32 | 0117348c3c7713f25f96b46e53ebdeed7bdba544 | refs/heads/master | 2023-08-25T19:42:52.707151 | 2023-08-23T15:13:25 | 2023-08-23T15:13:25 | 142,779,680 | 1,133 | 376 | MIT | 2023-09-13T19:05:06 | 2018-07-29T17:08:50 | Python | UTF-8 | Python | false | false | 490 | pyi | python.pyi | from collections.abc import Iterator
from typing import Any
from django.core.serializers import base
from django.core.serializers.base import DeserializedObject
from django.db.models.base import Model
class Serializer(base.Serializer):
objects: list[Any]
def get_dump_object(self, obj: Model) -> dict[str, Any]... |
19f3827bd92739fb037af6ea045fb4908abd68f4 | c6a101547c2b7f36fe83a725974a8a7f02cf176d | /data_structures/array/three_largest_elements.py | 5a8cd9e473ec587efa782622919073019921689a | [
"MIT"
] | permissive | prabhupant/python-ds | 737cc35574de5c2ece0f0813cf00775324a8dbe7 | f7d6d78fedaf84b7527965bb1798b7a8da989474 | refs/heads/master | 2023-08-22T05:04:22.937675 | 2022-10-04T01:29:39 | 2022-10-04T01:29:39 | 199,366,418 | 2,325 | 704 | MIT | 2022-10-10T13:01:10 | 2019-07-29T02:48:57 | Python | UTF-8 | Python | false | false | 426 | py | three_largest_elements.py | import sys
def three_largest(arr):
first = second = third = -sys.maxsize
for i in arr:
if i > first:
third = second
second = first
first = i
elif i > second:
third = second
second = i
elif i > third:
third = i
p... |
b4c18de1f37bb4f1e6b2181d6235e2963ad8c964 | aaf572d39319e4400ae0c2655ea2cfa52845a429 | /trio/_tests/test_highlevel_generic.py | 38bcedee25a77408c3f1ae307408032097d25858 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | python-trio/trio | 04cbde76313c26abdea15317cea3980dd5bc475b | e97bcb61b8b02523c82435b5408ff46efca5dfc3 | refs/heads/master | 2023-08-30T23:22:05.599646 | 2023-08-30T06:11:28 | 2023-08-30T06:11:28 | 79,083,614 | 5,651 | 369 | NOASSERTION | 2023-09-13T14:14:21 | 2017-01-16T04:45:25 | Python | UTF-8 | Python | false | false | 2,650 | py | test_highlevel_generic.py | import attr
import pytest
from .._highlevel_generic import StapledStream
from ..abc import ReceiveStream, SendStream
@attr.s
class RecordSendStream(SendStream):
record = attr.ib(factory=list)
async def send_all(self, data):
self.record.append(("send_all", data))
async def wait_send_all_might_no... |
330b663983381535d7b55d7fadb2f20971877213 | 8355bc4e1ad1a863124c1d80d4a00b28ef587b48 | /src/probnum/randvars/_scipy_stats.py | a8ae6359ddd7ef44a940e63059f5463ffc90dc1c | [
"MIT"
] | permissive | probabilistic-numerics/probnum | af62f04253a08da71174e5c1b7d733deb1914eee | af410278783069542610d16b10ba12d2940a05a6 | refs/heads/main | 2023-08-31T05:12:08.877238 | 2023-06-19T20:34:15 | 2023-06-19T20:34:15 | 218,856,084 | 384 | 56 | MIT | 2023-09-10T18:52:24 | 2019-10-31T20:29:11 | Python | UTF-8 | Python | false | false | 8,125 | py | _scipy_stats.py | """Wrapper classes for SciPy random variables."""
from typing import Any, Dict, Union
import numpy as np
import scipy.stats
from probnum import utils as _utils
from . import _normal, _random_variable
ValueType = Union[np.generic, np.ndarray]
# pylint: disable=protected-access
class _SciPyRandomVariableMixin:
... |
46d6d111e393262bda52b2f2b752ff11a93bd93f | 7378aaee27ef676db95dce7702c48f8643c63313 | /grow/routing/path_filter.py | d04f88ab6007deebb9c9e7eed7e72b073e1b1d4d | [
"MIT"
] | permissive | grow/grow | 323fa25c7690643bf170cc4558fffdfbd406ac76 | 17471c436621ebfd978b51225fa4de05367a53e1 | refs/heads/main | 2023-06-15T09:51:08.288251 | 2022-07-21T16:19:33 | 2022-07-21T16:19:33 | 12,899,663 | 352 | 56 | MIT | 2023-02-08T02:35:36 | 2013-09-17T15:51:40 | Python | UTF-8 | Python | false | false | 2,330 | py | path_filter.py | """Filter paths to control ignores and includes by path."""
import re
DEFAULT_IGNORED = [
re.compile(r'^.*/\.[^/]*$'), # Dot files.
]
DEFAULT_INCLUDED = []
class PathFilter:
"""Filter for testing paths against a set of filter criteria."""
def __init__(self, ignored=None, included=None):
self.... |
bc8645631705cfe0e15e5e4d190308b67895942f | eb9f655206c43c12b497c667ba56a0d358b6bc3a | /python/helpers/typeshed/stdlib/trace.pyi | 1f0de1d4d96442dc5101ceb4a1fbebc5f9734af4 | [
"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 | 2,697 | pyi | trace.pyi | import sys
import types
from _typeshed import StrPath, TraceFunction
from collections.abc import Callable, Mapping, Sequence
from typing import Any, TypeVar
from typing_extensions import ParamSpec, TypeAlias
__all__ = ["Trace", "CoverageResults"]
_T = TypeVar("_T")
_P = ParamSpec("_P")
_FileModuleFunction: TypeAlias ... |
27f825d55b48ea0303c4f9521bab27902150aca1 | e7bf1ff05319acc59bba5af5890041bd82c3e197 | /examples/inverse/dics_source_power.py | 68925202b175128bb18602e55934aee23b406b7c | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | mne-tools/mne-python | 7e8d7e945dfbbee6432a4955cf050fa823f2d34b | f44636f00666b8eb869417960926d01690ff4f42 | refs/heads/main | 2023-09-04T03:05:37.402100 | 2023-09-03T14:15:18 | 2023-09-03T14:15:18 | 1,301,584 | 2,437 | 1,418 | BSD-3-Clause | 2023-09-14T19:23:38 | 2011-01-28T03:31:13 | Python | UTF-8 | Python | false | false | 3,461 | py | dics_source_power.py | """
.. _ex-inverse-source-power:
==========================================
Compute source power using DICS beamformer
==========================================
Compute a Dynamic Imaging of Coherent Sources (DICS) :footcite:`GrossEtAl2001`
filter from single-trial activity to estimate source power across a frequency... |
1bd87bacfa0a3462b8f84395ab820d3a79f1c4a4 | fdb47aa5092baa4f5ec86b3819961c77731a33e1 | /darts/tests/dataprocessing/transformers/test_window_transformations.py | 65bc70d00116e49ae3c0dbde399749be99966cf8 | [
"Apache-2.0"
] | permissive | unit8co/darts | 6177e273950208b859c9208677a6f2632fc2aa2d | 52ac1814a7a21b107d2391598dfc3a4a5bd33ca7 | refs/heads/master | 2023-09-01T04:12:19.632394 | 2023-08-31T12:58:58 | 2023-08-31T12:58:58 | 148,657,183 | 6,234 | 759 | Apache-2.0 | 2023-09-14T10:18:50 | 2018-09-13T15:17:28 | Python | UTF-8 | Python | false | false | 21,292 | py | test_window_transformations.py | import itertools
import numpy as np
import pandas as pd
import pytest
from darts import TimeSeries
from darts.dataprocessing.pipeline import Pipeline
from darts.dataprocessing.transformers import Mapper, WindowTransformer
class TestTimeSeriesWindowTransform:
times = pd.date_range("20130101", "20130110")
se... |
4fbf0bc2eead15384195cbac9dd2acbe998af068 | fd47751e91f8bd43d6223033ce947ff720038f87 | /tests/test_main.py | 1f9fe85b3d777ace7880eab825cfde2074e92de6 | [
"BSD-3-Clause"
] | permissive | dbcli/litecli | bde48b747c4bfbbfcf203c37420c0438524b7d73 | 5975d2010278fda42aa224be5770113fc15ee28f | refs/heads/main | 2023-09-01T11:53:11.932344 | 2023-08-25T14:43:02 | 2023-08-25T14:43:02 | 133,243,075 | 1,908 | 75 | BSD-3-Clause | 2023-08-25T14:43:03 | 2018-05-13T14:11:49 | Python | UTF-8 | Python | false | false | 7,282 | py | test_main.py | import os
from collections import namedtuple
from textwrap import dedent
from tempfile import NamedTemporaryFile
import shutil
import click
from click.testing import CliRunner
from litecli.main import cli, LiteCli
from litecli.packages.special.main import COMMANDS as SPECIAL_COMMANDS
from utils import dbtest, run
te... |
c870ce951a49eed006d8f921cf04b3db25ac4261 | 8a2474f61a49b0e24812456b34f59948b756a94e | /autotest/test_gwf_pertim.py | d3adcccc35892783dcec8f7824615c2f1f5cff16 | [
"LicenseRef-scancode-warranty-disclaimer",
"CC0-1.0",
"LicenseRef-scancode-public-domain"
] | permissive | MODFLOW-USGS/modflow6 | 6e913abcab5c23686ed05b1cceac85f90282955d | 43f6198125867c487eedc64b17e9adaceb73f5ab | refs/heads/master | 2023-09-01T20:51:30.970467 | 2023-06-28T20:17:59 | 2023-06-28T20:17:59 | 116,149,490 | 158 | 111 | NOASSERTION | 2023-09-14T17:02:58 | 2018-01-03T15:00:55 | Fortran | UTF-8 | Python | false | false | 3,157 | py | test_gwf_pertim.py | import os
import flopy
import numpy as np
import pytest
from framework import TestFramework
from simulation import TestSimulation
ex = [
"gwf_pertim",
]
# static model data
# temporal discretization
nper = 1
perlen = [0.0]
nstp = [1]
tsmult = [1.0]
tdis_rc = []
for idx in range(nper):
tdis_rc.append((perlen[... |
4bc9aa575b7c29fb6519d64ac39bb49d2c85d593 | 8294fbe3389bebe56c42f958c87e0482c412887d | /February/FenrisWolf123.py | 056ad705dbacba5af87066ce39bf8d64648ea8e3 | [] | no_license | py-study-group/challenges | 8717376d1f44c4846d05052e8446b647f84c26f6 | 9129f48fb7c61fb5610c16e8da427149f0a9ed0a | refs/heads/master | 2021-01-20T08:37:14.224261 | 2018-02-28T16:27:52 | 2018-02-28T16:27:52 | 90,166,445 | 133 | 70 | null | 2018-02-28T10:22:04 | 2017-05-03T15:48:15 | Python | UTF-8 | Python | false | false | 2,259 | py | FenrisWolf123.py | import argparse
def caesar_cipher(mode, message, key):
"""
function to encode/decode caesar cipher
if decode, negate the key
"""
if key>26:
key = key % 26
if mode == 'd':
key = -key
output = ''
for i in message:
if i.isalpha():
num =... |
ab860df41c907b10dbeb95dfbdb7a19dde286299 | f4095ef092092399102bb21d1198e324f10f53ed | /pontoon/actionlog/models.py | 458a52d34fd1eb675f6b6177635b59a7b34cd392 | [
"BSD-3-Clause"
] | permissive | mozilla/pontoon | 2c53227570099ca666467d4e3d78e929bf456c9c | 0c4f74e15b1e442a9cee9b1cd636214b24f5352b | refs/heads/master | 2023-09-06T04:15:41.009180 | 2023-09-01T14:23:51 | 2023-09-01T14:23:51 | 1,385,890 | 1,367 | 713 | BSD-3-Clause | 2023-09-13T18:04:41 | 2011-02-19T11:25:51 | Python | UTF-8 | Python | false | false | 3,360 | py | models.py | from django.core.exceptions import ValidationError
from django.db import models
class ActionLog(models.Model):
class ActionType(models.TextChoices):
# A translation has been created.
TRANSLATION_CREATED = "translation:created", "Translation created"
# A translation has been deleted.
... |
278b944cd47758711f8ab2195252efb32a944650 | 6923f79f1eaaba0ab28b25337ba6cb56be97d32d | /Numerical_Methods_Lecture_Notes_Physics_801_Creighton/decayerr.py | a9520c8dab6034eec4a96d31511d8ca471677531 | [] | no_license | burakbayramli/books | 9fe7ba0cabf06e113eb125d62fe16d4946f4a4f0 | 5e9a0e03aa7ddf5e5ddf89943ccc68d94b539e95 | refs/heads/master | 2023-08-17T05:31:08.885134 | 2023-08-14T10:05:37 | 2023-08-14T10:05:37 | 72,460,321 | 223 | 174 | null | 2022-10-24T12:15:06 | 2016-10-31T17:24:00 | Jupyter Notebook | UTF-8 | Python | false | false | 1,060 | py | decayerr.py | import math, pylab
nuclei0 = input('initial number of nuclei -> ')
tau = input('decay time constant -> ')
dtlow = input('lowest resolution time step -> ')
nres = input('number of resolution refinements -> ')
tmax = input('time to end of simulation -> ')
for n in range(nres):
refine = 10**n
dt = dtlow/refine
... |
577b676012112b0afb4ed2ee44361ea3a07ae1f8 | a5a99f646e371b45974a6fb6ccc06b0a674818f2 | /Geometry/ForwardGeometry/python/ZdcGeometryDBWriter_cfi.py | 1e9b00c3c91592820d14bb76b2d584fcb95eb0ca | [
"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 | 475 | py | ZdcGeometryDBWriter_cfi.py | import FWCore.ParameterSet.Config as cms
ZdcHardcodeGeometryEP = cms.ESProducer( "ZdcHardcodeGeometryEP",
appendToDataLabel = cms.string("_master")
)
ZdcGeometryToDBEP = cms.ESProducer( "ZdcGeometryToDBEP" ,
... |
6da29f47f7cf52883ed9073ed3ae1321ad6dba85 | 5b6ba0f288b1e2ac236af846a9bf546a63228476 | /mmtbx/scaling/tst_scaling.py | 190138e4dcaa9c793602eeb004d367ec2987c3ae | [
"BSD-3-Clause-LBNL"
] | permissive | cctbx/cctbx_project | 5b547b416cadbdf95cca21dace9f54272a08d98a | 7f4dfb6c873fd560920f697cbfd8a5ff6eed82fa | refs/heads/master | 2023-08-17T17:44:05.077010 | 2023-08-16T22:40:22 | 2023-08-16T22:40:22 | 39,508,026 | 206 | 131 | NOASSERTION | 2023-09-14T17:12:55 | 2015-07-22T13:36:27 | Python | UTF-8 | Python | false | false | 39,183 | py | tst_scaling.py | from __future__ import absolute_import, division, print_function
## Peter Zwart July 5, 2005
from pytest import raises
from cctbx.array_family import flex
from cctbx import crystal
from cctbx import miller
from cctbx import xray
from cctbx import sgtbx
from cctbx import uctbx
from mmtbx import scaling
from libtbx.test... |
e18e58653c1ceba793b31dcab793a5d7a502910c | 33975f46034a58482c5fd82dc5bd2e7c9c22e3c7 | /python_bindings/test/correctness/addconstant_test.py | 25b150ed9862d3ecbe8763e0c0e600cf1c2254c7 | [
"MIT",
"BSD-3-Clause",
"Apache-2.0",
"LicenseRef-scancode-blas-2017"
] | permissive | halide/Halide | 8fafc15c2361a99d59e5d8146799fd570e7f062a | 8188b42c50e4ed47a01bbfb43289453c6fc5b1c9 | refs/heads/main | 2023-09-04T09:24:42.156763 | 2023-09-01T17:38:19 | 2023-09-01T17:38:19 | 5,241,312 | 5,014 | 1,142 | NOASSERTION | 2023-09-14T19:38:55 | 2012-07-31T04:05:25 | C++ | UTF-8 | Python | false | false | 7,154 | py | addconstant_test.py | from addconstantcpp import addconstantcpp
from addconstantpy import addconstantpy
from addconstantcpp_with_offset_42 import addconstantcpp_with_offset_42
from addconstantpy_with_offset_42 import addconstantpy_with_offset_42
from addconstantcpp_with_negative_offset import addconstantcpp_with_negative_offset
from addcons... |
14e7dd7c63d2e2e7916aed1e817c2c1a64adb3ab | 469c1754788d8637a74e6306ae3a4e536dba88b0 | /astroML/plotting/scatter_contour.py | 49e1e37b4f03444831d60e971f8227f59205aa7d | [
"BSD-2-Clause",
"BSD-3-Clause"
] | permissive | astroML/astroML | 17bbbfdbd9da06407d727c6e032d23c5a63ec098 | 3ec75de08cddd59577e8c2a79be354c5eaebf9db | refs/heads/main | 2023-08-07T11:54:17.311594 | 2022-12-12T08:52:31 | 2022-12-12T08:52:31 | 6,269,799 | 878 | 300 | BSD-2-Clause | 2023-05-09T14:41:47 | 2012-10-17T22:33:50 | Python | UTF-8 | Python | false | false | 3,892 | py | scatter_contour.py | import numpy as np
def scatter_contour(x, y,
levels=10,
threshold=100,
log_counts=False,
histogram2d_args=None,
plot_args=None,
contour_args=None,
filled_contour=True,
... |
996dcea6bf2041abec0a9f67918a8453fa2b6137 | 05b85a5260e6a7b236693300208b35bde1ca73ee | /fastapi_auth/fastapi_util/settings/base_api_settings.py | 6c7b9fc32923c58a6f94af313b5910427d04922d | [
"MIT"
] | permissive | dmontagu/fastapi-auth | d05e3440ee829e57cc7cdac1a987ac51b4e87f3a | d0e86774f66bd43e80376de19bdf034eb228dc07 | refs/heads/master | 2023-02-16T20:41:35.883202 | 2019-12-18T03:10:51 | 2019-12-18T04:11:46 | 228,746,139 | 131 | 10 | MIT | 2023-02-14T21:35:22 | 2019-12-18T03:00:54 | Python | UTF-8 | Python | false | false | 189 | py | base_api_settings.py | from pydantic import BaseSettings
class BaseAPISettings(BaseSettings):
class Config:
env_prefix = ""
arbitrary_types_allowed = True
validate_assignment = True
|
c107f167de1adf2de4023b885f2039a5febceac0 | c3542b98289c1ba85f62d08b5edbe1a3c18f3c80 | /folder_size.py | 7410de8da368af9f12f3d21e83c872d95dba35a8 | [
"LicenseRef-scancode-unknown",
"GPL-1.0-or-later",
"MIT"
] | permissive | geekcomputers/Python | 16674289843f89f6cc287097f033b928f4181d84 | bc55e2a2c5a98f4c7597e901a04457dfb9d5df0c | refs/heads/master | 2023-08-18T21:04:18.163283 | 2023-08-17T17:38:16 | 2023-08-17T17:38:16 | 2,881,789 | 32,418 | 15,024 | MIT | 2023-09-02T18:40:33 | 2011-11-30T09:04:08 | Python | UTF-8 | Python | false | false | 1,576 | py | folder_size.py | # Script Name : folder_size.py
# Author : Craig Richards
# Created : 19th July 2012
# Last Modified : 22 February 2016
# Version : 1.0.1
# Modifications : Modified the Printing method and added a few comments
# Description : This will scan the current directory and all subdirectories and displa... |
60ca8c6b4bc0d8804564ea09af685a55c5d94c52 | 8358c8d86600703663eb8a8f30493c20704cf586 | /xcube/core/gen2/local/transformer.py | f7dddbc301b4a0a3c182ec87c20f3967ec13785f | [
"MIT"
] | permissive | dcs4cop/xcube | 612ffeb416dfee4e6a32677a719eab1a26aee990 | a5a4da14bdc2dba80e0dd7d89b221fb30d148b77 | refs/heads/master | 2023-08-17T06:36:57.207806 | 2023-08-08T15:16:09 | 2023-08-08T15:16:09 | 130,693,090 | 149 | 21 | MIT | 2023-09-14T07:38:55 | 2018-04-23T12:27:35 | Python | UTF-8 | Python | false | false | 3,217 | py | transformer.py | # The MIT License (MIT)
# Copyright (c) 2021 by the xcube development team and contributors
#
# 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... |
8b3a06112342bc518d7663210f0eab34707cd8ab | 8d44e796eaf0c8e11bbc2a27ef093e97a25b6f4a | /test/modeling/test_feature_extraction.py | 3e85e7f93e88ecdb4c5859f7ed6a1b93daf7c347 | [
"Apache-2.0"
] | permissive | deepset-ai/haystack | caa5287051d1771395ea624b58097000825bad81 | 5f1256ac7e5734c2ea481e72cb7e02c34baf8c43 | refs/heads/main | 2023-09-01T02:41:23.490526 | 2023-08-31T15:33:12 | 2023-08-31T15:33:12 | 221,654,678 | 10,599 | 1,558 | Apache-2.0 | 2023-09-14T17:09:42 | 2019-11-14T09:05:28 | Python | UTF-8 | Python | false | false | 5,283 | py | test_feature_extraction.py | import pytest
from unittest.mock import MagicMock
from unittest import mock
from pathlib import Path
import haystack
from haystack.errors import ModelingError
from haystack.modeling.model.feature_extraction import FeatureExtractor
class MockedAutoTokenizer:
mocker: MagicMock = MagicMock()
@classmethod
d... |
7ed6b495a4fdced335b1fb94f5cca60189b796e7 | cea371c0b298635f2d843e15ffe2be7912a624fd | /peewee_asyncext.py | c1c79d88e950667cf6ca1534ff53ae01743d5c02 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | 05bit/peewee-async | 20bfc5eb611d608a04dbd19a295759d186965512 | 942813a7ebaaefaefe6f5260d0e5025c5e80edcf | refs/heads/master | 2023-08-20T19:36:46.161859 | 2023-05-19T13:16:41 | 2023-05-19T13:16:41 | 24,544,015 | 773 | 129 | MIT | 2023-09-14T05:30:55 | 2014-09-27T22:15:28 | Python | UTF-8 | Python | false | false | 2,927 | py | peewee_asyncext.py | """
peewee-async
============
Asynchronous interface for `peewee`_ ORM powered by `asyncio`_:
https://github.com/05bit/peewee-async
.. _peewee: https://github.com/coleifer/peewee
.. _asyncio: https://docs.python.org/3/library/asyncio.html
Licensed under The MIT License (MIT)
Copyright (c) 2014, Alexey Kinëv <rudy@0... |
7931f54570dc2435f34c5675a0bfce23075f2e88 | a2cbddc824efc370cfc5f371ece96139d849fc71 | /decentralized/utils/multi_robot_plot.py | 82e6afeaca983ea9b314ca4c0b8ad4b4c1ec05da | [
"MIT"
] | permissive | atb033/multi_agent_path_planning | 28df529fccd3ce19f84aac4a8071c549d5419ab4 | 89f69e11944b172e11c3bcbbecc57344eaa4be9c | refs/heads/master | 2023-04-17T22:06:20.711394 | 2022-10-22T23:00:29 | 2022-10-22T23:00:29 | 184,384,043 | 786 | 211 | MIT | 2023-04-05T15:02:43 | 2019-05-01T07:39:41 | Python | UTF-8 | Python | false | false | 2,217 | py | multi_robot_plot.py | """
Plotting tool for 2D multi-robot system
author: Ashwin Bose (@atb033)
"""
import matplotlib.pyplot as plt
import matplotlib.animation as animation
from matplotlib.patches import Circle
import numpy as np
def plot_robot_and_obstacles(robot, obstacles, robot_radius, num_steps, sim_time, filename):
fig = plt.f... |
212951fd82b0cfad895a03e119c0d45f62ac6f10 | f2034c76a11ce6296131d2bab89a5dae7d59edfe | /python/dllib/src/bigdl/dllib/utils/common.py | cda02f78db46a14a036638eb6424990dc089570a | [
"Apache-2.0"
] | permissive | intel-analytics/BigDL | e22cd917eecc7340bda3df4356acba0623a62ef6 | 4ffa012a426e0d16ed13b707b03d8787ddca6aa4 | refs/heads/main | 2023-08-22T06:31:37.923091 | 2023-08-22T02:58:42 | 2023-08-22T02:58:42 | 66,823,715 | 4,913 | 1,327 | Apache-2.0 | 2023-09-14T10:41:50 | 2016-08-29T07:59:50 | Jupyter Notebook | UTF-8 | Python | false | false | 29,388 | py | common.py | #
# Copyright 2016 The BigDL 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 or agreed to in ... |
f208adabd337f18b94d7d2b9292c4a4b2ee36d5b | ebb592491b7a6e0a3e67e1badfb05f76fcb5658c | /strictyaml/ruamel/scalarstring.py | c4aa30c069ff7346232fa7ba8ba6de85397eafa8 | [
"MIT"
] | permissive | crdoconnor/strictyaml | fe4475043efc4516f5f49c9792bd937599d9c65f | dfd93f9740ebd5e7150029bc3d89ea102bcddf00 | refs/heads/master | 2023-08-11T13:32:03.154467 | 2023-05-25T11:08:41 | 2023-05-25T11:08:41 | 61,367,476 | 1,344 | 83 | MIT | 2023-06-28T09:37:45 | 2016-06-17T10:56:18 | Python | UTF-8 | Python | false | false | 4,566 | py | scalarstring.py | # coding: utf-8
from __future__ import print_function, absolute_import, division, unicode_literals
from strictyaml.ruamel.compat import text_type
from strictyaml.ruamel.anchor import Anchor
if False: # MYPY
from typing import Text, Any, Dict, List # NOQA
__all__ = [
"ScalarString",
"LiteralScalarStrin... |
7a3cf93ce679a9552203e90929bca4ff74485e8d | 160f08e768d7271f9522ad2597ac4ee79c04477a | /src/c3nav/mapdata/migrations/0040_access_permissions.py | d068fe17be9db72dd7a878dac327a5400c1221ec | [
"Apache-2.0"
] | permissive | c3nav/c3nav | 6254724dfc8589ee03c6028577befd7c65b05857 | 1a4ef5caa06ddacc8d9370b5adcee248fd4f55f7 | refs/heads/main | 2023-08-04T08:36:18.431458 | 2023-07-24T09:57:18 | 2023-07-24T09:57:18 | 56,852,994 | 140 | 47 | Apache-2.0 | 2023-07-05T22:55:27 | 2016-04-22T12:13:51 | Python | UTF-8 | Python | false | false | 2,078 | py | 0040_access_permissions.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2017-10-24 20:12
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_depende... |
12427a5696d026c454fb02659ae42e0338f13cff | 5a2715fb652ebc1b16a70cf76c8faff22ab94723 | /utils/download-dependencies_distilbert.py | 2cbac198a8906bd9564a91a8bf29b5540239fe4e | [
"Apache-2.0"
] | permissive | guillaume-be/rust-bert | 35ee29c22038e126b325f0b04cf51b572d481d4e | 0a1c3dfeef78c0936892031cee4ecd406a1ef880 | refs/heads/main | 2023-08-31T11:08:30.296705 | 2023-08-27T13:15:11 | 2023-08-27T13:15:11 | 236,150,741 | 2,066 | 185 | Apache-2.0 | 2023-09-11T15:34:48 | 2020-01-25T09:40:07 | Rust | UTF-8 | Python | false | false | 1,353 | py | download-dependencies_distilbert.py | import os
import subprocess
from pathlib import Path
import numpy as np
import requests
import torch
if __name__ == "__main__":
target_path = Path.home() / "rustbert" / "distilbert"
os.makedirs(str(target_path), exist_ok=True)
weights_url = "https://huggingface.co/sshleifer/tiny-distilbert-base-cased/res... |
35f0ec16569fa4aca115f16304efe15cd29cfb14 | b26c41926fa3a7c2c061132d80e91a2750f2f468 | /tensorflow_probability/python/math/psd_kernels/spectral_mixture.py | bfd6846a3b07af631b438094942a66a63db0af79 | [
"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 | 8,071 | py | spectral_mixture.py | # Copyright 2021 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... |
5445eecc4d5a6b61f9e2fef10a11f2f481599f1e | 9b1eda0abdc5dea7c6e9695ff4e1098abe0a708b | /src/textual/_callback.py | abefeae5576e16d9df0312ca70d94d917e905088 | [
"MIT"
] | permissive | Textualize/textual | b8cf4b5d18069fccc7623b3116436f479e1ef446 | b74ac1e47fdd16133ca567390c99ea19de278c5a | refs/heads/main | 2023-08-30T21:40:21.563823 | 2023-08-30T10:18:27 | 2023-08-30T10:18:27 | 355,959,597 | 14,818 | 588 | MIT | 2023-09-14T20:22:02 | 2021-04-08T15:24:47 | Python | UTF-8 | Python | false | false | 2,117 | py | _callback.py | from __future__ import annotations
import asyncio
from functools import lru_cache
from inspect import isawaitable, signature
from typing import TYPE_CHECKING, Any, Callable
from . import active_app
if TYPE_CHECKING:
from .app import App
# Maximum seconds before warning about a slow callback
INVOKE_TIMEOUT_WARNI... |
3ccb698be6f4e54a7d1b5133b77fab26b68e5bff | 0e4860fecfdd34a3255003cc8c8df086c14083dd | /python/practise/learn-python/python_basic/function_arguments.py | 01d22226809128bce733cb46291bd4b5aa20f926 | [] | no_license | anzhihe/learning | 503ab9a58f280227011da5eaa4b14b46c678e6f3 | 66f7f801e1395207778484e1543ea26309d4b354 | refs/heads/master | 2023-08-08T11:42:11.983677 | 2023-07-29T09:19:47 | 2023-07-29T09:19:47 | 188,768,643 | 1,443 | 617 | null | 2023-08-24T02:10:34 | 2019-05-27T04:04:10 | Python | UTF-8 | Python | false | false | 2,930 | py | function_arguments.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
@FileName: function_arguments.py
@Function: python function arguments
@Author: Zhihe An
@Site: https://chegva.com
@Time: 2021/7/4
"""
"""一、函数的调用之位置实参"""
"""
调用函数时,可以根据每个形参在所有形参中的位置传递对应位置的实参,从而用每个实参初始化
对应位置的形参,这样的实参称为位置实参
"""
def... |
2b3eeeabfc22531a88e163d7fcaaab9f5fac71ee | 61673ab9a42f7151de7337608c442fa6247f13bb | /socket/basic/version-4/client.py | 6b15275b80a9172c5eafc957612bd10f26aa679b | [
"MIT"
] | permissive | furas/python-examples | 22d101670ecd667a29376d7c7d7d86f8ec71f6cf | 95cb53b664f312e0830f010c0c96be94d4a4db90 | refs/heads/master | 2022-08-23T23:55:08.313936 | 2022-08-01T14:48:33 | 2022-08-01T14:48:33 | 45,575,296 | 176 | 91 | MIT | 2021-02-17T23:33:37 | 2015-11-04T23:54:32 | Python | UTF-8 | Python | false | false | 1,688 | py | client.py | #!/usr/bin/env python3
#
# https://docs.python.org/3.5/library/socket.html
#
import socket
import time
# --- constants ---
HOST = '' # (local or external) address IP of remote server
PORT = 8000 # (local or external) port of remote server
# server can have local address IP - used only in local network
# or ex... |
9d98629409ec43ad999960cb1e326453c5582ca6 | d110546d747d7e3865ce5742d5fca09f404623c0 | /tests/unit/test_master.py | 96fe2a5459532b6f1d71679130c1d8a28662fd2c | [
"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 | 27,305 | py | test_master.py | import time
import pytest
import salt.config
import salt.master
from tests.support.mixins import AdaptedConfigurationTestCaseMixin
from tests.support.mock import MagicMock, patch
from tests.support.unit import TestCase
class TransportMethodsTest(TestCase):
def test_transport_methods(self):
class Foo(sal... |
6603229b30a8c90e86622a108d541db95b7a9b46 | a881bfadf8405ebbd3143cfb5cc5cb715b0898c6 | /test/test_exceptions.py | c617b4b9d180d63b82217861c75d81fd2dea264b | [
"Apache-2.0"
] | permissive | GIScience/openrouteservice-py | 1f8f1140c9544195d250f79515e6f2390663d457 | 9fc22f378db8f9ef98a1675031055b1ae2bec97b | refs/heads/master | 2023-07-10T17:16:52.547413 | 2023-06-01T11:42:58 | 2023-06-01T11:42:58 | 119,974,379 | 327 | 60 | Apache-2.0 | 2023-07-04T12:23:11 | 2018-02-02T11:36:56 | Python | UTF-8 | Python | false | false | 1,503 | py | test_exceptions.py | from openrouteservice.exceptions import (
ValidationError,
ApiError,
HTTPError,
Timeout,
_RetriableRequest,
_OverQueryLimit,
)
import test as _test
from pprint import pprint
class ExceptionTest(_test.TestCase):
def test_ValidationError(self):
exception = ValidationError("hamspam"... |
b3bb935ed4a48773eef1087e13f372c9f69c480b | 6d54a7b26d0eb82152a549a6a9dfde656687752c | /examples/platform/nxp/k32w/k32w0/scripts/sign-outdir.py | 577cc2424fd5b93764a5a704026e2c81c2fa6717 | [
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | project-chip/connectedhomeip | 81a123d675cf527773f70047d1ed1c43be5ffe6d | ea3970a7f11cd227ac55917edaa835a2a9bc4fc8 | refs/heads/master | 2023-09-01T11:43:37.546040 | 2023-09-01T08:01:32 | 2023-09-01T08:01:32 | 244,694,174 | 6,409 | 1,789 | Apache-2.0 | 2023-09-14T20:56:31 | 2020-03-03T17:05:10 | C++ | UTF-8 | Python | false | false | 711 | py | sign-outdir.py | import os
import subprocess
if os.environ["NXP_K32W0_SDK_ROOT"] != "":
sign_images_path = os.environ["NXP_K32W0_SDK_ROOT"] + "/tools/imagetool/sign_images.sh"
else:
sign_images_path = os.getcwd() + "/../../../../../../third_party/nxp/k32w0_sdk/repo/core/tools/imagetool/sign_images.sh"
# Give execute permissio... |
242b45613882735d5b92a2332f0be412e27a6094 | 6bbc02d382d78a2608a2e7674cf8e8e737f4aacc | /examples/Fastai/Image-classification/score.py | e4de435b4fc3851444f2af3116a2e69486bd7687 | [
"MIT",
"LicenseRef-scancode-generic-cla"
] | permissive | microsoft/MLOps | 8b12b0eaea14e28a5c55fe14cfc9552e6426f0fd | c29628b917b42a910d2ae232556b706b8f1bc0c5 | refs/heads/master | 2023-09-02T14:41:40.417962 | 2023-07-27T07:03:17 | 2023-07-27T07:03:17 | 184,819,127 | 1,455 | 474 | MIT | 2023-07-31T12:07:28 | 2019-05-03T20:55:03 | Jupyter Notebook | UTF-8 | Python | false | false | 1,177 | py | score.py |
import os
import json
from azureml.core.model import Model
from azureml.core import Workspace
import fastai
from fastai.vision import *
from fastai.metrics import accuracy
from fastai.metrics import error_rate
import urllib.request
def download_jpg(url):
file_path = "./breadpudding.jpg"
local_filename, hea... |
90b230a5cbe21348be47284bc6ba84be2cf9af11 | 3ef70fe63acaa665e2b163f30f1abd0a592231c1 | /stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_sslverify.py | 84761dc2c555237965f5acc93d29c1a41da5d057 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | wistbean/learn_python3_spider | 14914b63691ac032955ba1adc29ad64976d80e15 | 40861791ec4ed3bbd14b07875af25cc740f76920 | refs/heads/master | 2023-08-16T05:42:27.208302 | 2023-03-30T17:03:58 | 2023-03-30T17:03:58 | 179,152,420 | 14,403 | 3,556 | MIT | 2022-05-20T14:08:34 | 2019-04-02T20:19:54 | Python | UTF-8 | Python | false | false | 116,121 | py | test_sslverify.py | # Copyright 2005 Divmod, Inc. See LICENSE file for details
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Tests for L{twisted.internet._sslverify}.
"""
from __future__ import division, absolute_import
import sys
import itertools
import datetime
from zope.interface import implementer
fr... |
6bb1b3ecb94f352e2ec3436962d9806a3c7861b7 | 5ef6c8d47864f471e26b9902d61f8c687e941f05 | /src/genie/libs/parser/iosxe/tests/ShowLispInstanceIdServiceStatistics/cli/equal/golden_output2_expected.py | 83b1d0ea2437aee2775cf9547794c28967c40899 | [
"Apache-2.0"
] | permissive | CiscoTestAutomation/genieparser | 169c196558f1c1a0f0d10650876096f993224917 | b531eff760b2e44cd69d7a2716db6f866907c239 | refs/heads/master | 2023-09-03T08:56:18.831340 | 2023-08-29T22:32:02 | 2023-08-29T22:32:02 | 131,621,824 | 247 | 409 | Apache-2.0 | 2023-08-29T22:32:04 | 2018-04-30T16:51:50 | Python | UTF-8 | Python | false | false | 12,512 | py | golden_output2_expected.py | expected_output = {
'lisp_id': {
0: {
'instance_id': {
4100: {
'last_cleared': 'never',
'control_packets': {
'map_requests': {
'in': 0,
'out': 0,
... |
210180c860f5315fd69c1014ed015f9458612163 | 9c0224ff346cd8ad79f754756a09c93eefc4d463 | /padatious/entity_edge.py | 83de6b8c2bda620beb53e9514210a2ae33b7c9e3 | [
"Apache-2.0"
] | permissive | MycroftAI/padatious | 243d2fc085e2563090b2f2d7d7ae6fd3c3fae467 | 9d5a22f2b42f6fb1162e3b6143dfdd6ad9725fc9 | refs/heads/dev | 2021-11-30T09:49:08.144447 | 2021-11-10T00:47:30 | 2021-11-10T00:47:30 | 98,936,064 | 169 | 51 | Apache-2.0 | 2021-11-10T00:47:31 | 2017-07-31T22:41:03 | Python | UTF-8 | Python | false | false | 4,555 | py | entity_edge.py | # Copyright 2017 Mycroft AI, 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 writ... |
e6abda255a03ff6e968e38fcd0f9885930d2581c | da1500e0d3040497614d5327d2461a22e934b4d8 | /cobalt/black_box_tests/tests/http_cache.py | 43958ec63f5c8602066e58a998892d0a9b318f97 | [
"Apache-2.0",
"BSD-3-Clause"
] | permissive | youtube/cobalt | 34085fc93972ebe05b988b15410e99845efd1968 | acefdaaadd3ef46f10f63d1acae2259e4024d383 | refs/heads/main | 2023-09-01T13:09:47.225174 | 2023-09-01T08:54:54 | 2023-09-01T08:54:54 | 50,049,789 | 169 | 80 | BSD-3-Clause | 2023-09-14T21:50:50 | 2016-01-20T18:11:34 | null | UTF-8 | Python | false | false | 2,035 | py | http_cache.py | # Copyright 2022 The Cobalt 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 ... |
ab1ed592305e57fe256ee1c27d75e3508fd329d6 | e7f38fa0aea00207bc94c542524bcf36a540f902 | /tests/test_readme.py | 203a32d31e10477d9f19cb65d9e5092300de2dc5 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | lettucecfd/lettuce | c5cf4c27ee66022e9b6d94ff0380c6190ec59fae | 63be9197efeb88b843fd349b9e8d1b13d1634c1c | refs/heads/master | 2023-04-28T15:48:42.200866 | 2023-04-13T12:54:10 | 2023-04-13T12:54:10 | 185,307,088 | 106 | 22 | MIT | 2023-04-18T07:38:28 | 2019-05-07T02:37:05 | Python | UTF-8 | Python | false | false | 757 | py | test_readme.py | def test_readme():
"""Whenever you have to change this test, the example in README.rst has to change, too.
Note differences in the device + number of steps.
"""
import torch
from lettuce import BGKCollision, StandardStreaming, Lattice, D2Q9, TaylorGreenVortex2D, Simulation
device = "cpu"
d... |
ddfdd5e39911c6a9873dc1d3de9f35383346a160 | 2871a5c3d1e885ee72332dbd8ff2c015dbcb1200 | /CLIFF/common/constants.py | f6269e94e5d70f37f7c26ba1ddc904f988df961c | [
"MIT",
"BSD-2-Clause"
] | 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 | 849 | py | constants.py | # Copyright (C) 2022. 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 implied warranty of ME... |
0467a35598b335e02f30e5e13b010409fb141c22 | 933728f0079ec76ffd4a5c15d9cab8c9639a3197 | /tests/performance/performance_test.py | 8fe5a502731df4b64170646bd448e9a1add9f7d5 | [
"MIT"
] | permissive | gavincyi/LightMatchingEngine | 344636d4414b5d6455a810dc5305285ef7f866eb | 5e210a809e62a802107831d0ca12498ed32d4717 | refs/heads/develop | 2022-02-07T14:15:36.998128 | 2021-04-04T14:28:15 | 2021-04-04T14:28:15 | 81,263,233 | 310 | 90 | MIT | 2022-09-06T23:01:58 | 2017-02-07T22:53:43 | Python | UTF-8 | Python | false | false | 5,326 | py | performance_test.py | """Performance test for light matching engine.
Usage:
perf-test-light-matching-engine --freq <freq> [options]
Options:
-h --help Show help.
--freq=<freq> Order frequency per second. [Default: 10]
--num-orders=<num_orders> Number of orders. [Default: 100]
--add-or... |
25a94f282accccce08ad47bf9287848bb0f43255 | 359250410360763cd9e1736017b0130d1803600a | /wifipumpkin3/modules/wifi/wifiscan.py | 7609c9f31c437beeddd43a6e217c2d167c9d5f44 | [
"Apache-2.0"
] | permissive | P0cL4bs/wifipumpkin3 | 268dde11a7395c5cd92cdd90b58d8bb8f090430a | 5da92d6c329f9c63d44042163edac410cb027758 | refs/heads/main | 2023-08-25T13:51:53.004863 | 2023-08-22T00:00:57 | 2023-08-22T00:00:57 | 185,832,947 | 1,540 | 261 | Apache-2.0 | 2023-05-20T01:35:43 | 2019-05-09T16:15:31 | Python | UTF-8 | Python | false | false | 10,328 | py | wifiscan.py | from wifipumpkin3.core.common.terminal import ModuleUI
from wifipumpkin3.core.config.globalimport import *
from wifipumpkin3.core.utility.printer import (
display_messages,
setcolor,
display_tabulate,
)
from random import randrange
import time, sys
from multiprocessing import Process
from scapy.all import *... |
d27d333fa0347cb788ea1ee36e53754f85acf939 | 71970d42295dc3bf7ce6ac2b07cee23e5e9fda1c | /roles/splunk_universal_forwarder/molecule/systemd/tests/test_systemd.py | c774455477e2623cfa282c17880c979817808390 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | splunk/splunk-ansible | bd89e81d4debd40a9a74fdb1f15791a4fa9ed712 | 553e614f4c36ce4d5b429cf26c9ebf3b216b3d70 | refs/heads/develop | 2023-08-31T07:30:31.389474 | 2023-08-30T23:43:24 | 2023-08-30T23:43:24 | 148,547,478 | 337 | 209 | null | 2023-09-06T22:08:09 | 2018-09-12T22:02:31 | Python | UTF-8 | Python | false | false | 4,520 | py | test_systemd.py | #!/usr/bin/env python
#
# These tests specifically exercise the following:
# - UF version 8.0.3/7.3.2 through rpm installation
# - Systemd-enabled, UF started via `enable bootstrap` command
# - Checks for system unit file for SplunkForwarder
from __future__ import absolute_import
import os
import testinfra.utils.ansi... |
f30f05074cfbfc0c6d775e68ab0b9ce7a085e0b3 | a4ea525e226d6c401fdb87a6e9adfdc5d07e6020 | /src/azure-cli/azure/cli/command_modules/network/_validators.py | ce83c461e78d75662346829ca33e32861f5d0cba | [
"MIT",
"BSD-3-Clause",
"LGPL-2.0-or-later",
"GPL-1.0-or-later",
"MPL-2.0",
"LGPL-2.1-only",
"Apache-2.0",
"LGPL-2.1-or-later",
"BSD-2-Clause"
] | permissive | Azure/azure-cli | 13340eeca2e288e66e84d393fa1c8a93d46c8686 | a40fd14ad0b6e89720a2e58d4d9be3a6ce1535ca | refs/heads/dev | 2023-08-17T06:25:37.431463 | 2023-08-17T06:00:10 | 2023-08-17T06:00:10 | 51,040,886 | 4,018 | 3,310 | MIT | 2023-09-14T11:11:05 | 2016-02-04T00:21:51 | Python | UTF-8 | Python | false | false | 37,965 | py | _validators.py | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... |
7e7c11149479f27c8ac436bdf1e315d41b42003e | a3d6556180e74af7b555f8d47d3fea55b94bcbda | /third_party/blink/web_tests/external/wpt/fledge/tentative/resources/trusted-bidding-signals.py | 9602bd22f9667057c46d3900909ec9bcda832341 | [
"LGPL-2.0-or-later",
"LicenseRef-scancode-warranty-disclaimer",
"LGPL-2.1-only",
"GPL-1.0-or-later",
"GPL-2.0-only",
"LGPL-2.0-only",
"BSD-2-Clause",
"LicenseRef-scancode-other-copyleft",
"BSD-3-Clause",
"MIT",
"Apache-2.0"
] | 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 | 4,992 | py | trusted-bidding-signals.py | import json
from urllib.parse import unquote_plus
# Script to generate trusted bidding signals. The responses depends on the
# keys and interestGroupNames - some result in entire response failures, others
# affect only their own value. Keys are preferentially used over
# interestGroupName, since keys are composible, b... |
ffc48caabaa5dff29b65f60389b2c8be37a3e1b9 | 6e235014528acc05996e6a4ef2b33e348bbc5114 | /testing_tools/print_open_files.py | 2d5c1d0e34b8eadfaf81256b703ed512466a3adf | [
"MIT"
] | permissive | bogdandm/json2python-models | f7cf02417c38de587d86aa045756c6b61aa42cb1 | e2606e8f2c22d3bc11b09f5eb2bc73323ce151c5 | refs/heads/master | 2023-01-13T03:47:47.135160 | 2023-01-02T12:28:47 | 2023-01-02T12:28:47 | 144,019,032 | 153 | 12 | MIT | 2023-01-02T12:18:26 | 2018-08-08T13:40:00 | Python | UTF-8 | Python | false | false | 1,007 | py | print_open_files.py | import builtins
import io
import sys
import traceback
import weakref
from functools import wraps
open_files = weakref.WeakSet()
def opener(old_open):
@wraps(old_open)
def tracking_open(*args, **kw):
file = old_open(*args, **kw)
old_close = file.close
@wraps(old_close)
def cl... |
99f1539646b3a65bb0dc4dbfa7039282dd22987b | 56a77194fc0cd6087b0c2ca1fb6dc0de64b8a58a | /applications/PfemFluidDynamicsApplication/python_scripts/pfem_fluid_dynamics_analysis.py | 3a7cf5ca3cee23fc5a777fc32875c69a931dcf56 | [
"BSD-2-Clause",
"BSD-3-Clause"
] | permissive | KratosMultiphysics/Kratos | 82b902a2266625b25f17239b42da958611a4b9c5 | 366949ec4e3651702edc6ac3061d2988f10dd271 | refs/heads/master | 2023-08-30T20:31:37.818693 | 2023-08-30T18:01:01 | 2023-08-30T18:01:01 | 81,815,495 | 994 | 285 | NOASSERTION | 2023-09-14T13:22:43 | 2017-02-13T10:58:24 | C++ | UTF-8 | Python | false | false | 21,109 | py | pfem_fluid_dynamics_analysis.py |
import time as timer
import os
from importlib import import_module
# Import kratos core and applications
import KratosMultiphysics
import KratosMultiphysics.PfemFluidDynamicsApplication as KratosPfemFluid
import KratosMultiphysics.DelaunayMeshingApplication as KratosDelaunay
from KratosMultiphysics.analysis_stage i... |
335661d0db788495841007bd02d21b076d7e9cb9 | 95753e92497eb499f1a20262e9639e4309cc8378 | /demo_free_integration_long_time.py | 1c5ce6676de431e775f517bf5a5cc7a014dd0725 | [
"MIT"
] | permissive | Aceinna/gnss-ins-sim | cf9cf890048cae832c39980424196f96c64df020 | 020ca3798e931813c6e394ba822d4d3c43218a0f | refs/heads/master | 2023-08-19T19:35:20.285793 | 2023-03-17T03:15:23 | 2023-03-17T03:15:23 | 115,900,361 | 999 | 298 | MIT | 2023-03-17T03:15:24 | 2018-01-01T05:02:47 | Python | UTF-8 | Python | false | false | 2,800 | py | demo_free_integration_long_time.py | # -*- coding: utf-8 -*-
# Filename: demo_free_integration_long_time.py
"""
A simple free integration (strapdown inertial navigation) demo of Sim.
Created on 2018-01-23
@author: dongxiaoguang
"""
import os
import math
import numpy as np
from gnss_ins_sim.sim import imu_model
from gnss_ins_sim.sim import ins_sim
# glo... |
3e883027074ea2c64e5df9a8373378b46b517a39 | b4afb834fc3a3e2c128b1bf825700031e3df519a | /pyroms_toolbox/pyroms_toolbox/PCA.py | 81d137ca31f4429ae9a7ddafc8737e6071db5361 | [
"BSD-3-Clause"
] | permissive | ESMG/pyroms | e4e5e9d70d66907a992846b06d61db31afcd24f3 | 5ea501ef904b01036dd2a0909b7bdc61a56e7eff | refs/heads/python3 | 2023-03-19T11:11:09.143443 | 2023-03-10T00:22:13 | 2023-03-10T00:22:13 | 1,012,779 | 102 | 63 | NOASSERTION | 2023-03-10T00:23:20 | 2010-10-21T17:22:48 | Python | UTF-8 | Python | false | false | 7,234 | py | PCA.py | import numpy as np
from matplotlib.mlab import psd
from scipy.signal import get_window
class PCA(object):
def __init__(self, dataset, algorithm='svd'):
"""
This class carries out Principal Component Analysis on dataset.
Arguments:
'dataset' -- NumPy array containing the fie... |
9e0aecbf870f9322f52d06b48f8ead9a24a1273b | d36dda5de08015658409cf93bc6aec85fa8c24f6 | /RPLCD/codecs/st7066_0b.py | 3e323f7efe21cc8e059bb551017b6379f6c4acd0 | [
"MIT",
"Python-2.0"
] | permissive | dbrgn/RPLCD | f1dc3027ddb328b850dc3481a12ce688f76f10b2 | 486533e25c423a884c8d73486d2b8e53bbaabb97 | refs/heads/master | 2023-04-07T11:22:17.872890 | 2023-03-25T00:56:21 | 2023-03-25T00:56:21 | 9,896,961 | 246 | 76 | MIT | 2023-03-25T00:54:51 | 2013-05-06T21:09:10 | Python | UTF-8 | Python | false | false | 12,048 | py | st7066_0b.py | """
The ST7066_0B character table.
"""
# Character shown if no mapping was found
replacement_char = 0x20 # SPACE
# Table with 1:1 mapping
encoding_table = {
'\u0000': 0x00, # User defined (CGRAM)
'\u0001': 0x01, # User defined (CGRAM)
'\u0002': 0x02, # User defined (CGRAM)
'\u0003': 0x03, # User... |
40c9d69a501150430de3bc52d23efee5570a7c0e | 982a904a83e2caa7acd8b2ac19cfc5a4fb75bde1 | /examples/ch13_TwitterV2/snippets_ipynb/locationlistener.py | f154d61ae633577677253b7fa2516d9d5d88edf9 | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | pdeitel/IntroToPython | 73bc349fe40701b51f49d17d7fbc5b9985885e48 | 978093febf2ed849a2049e0b0860d2c4998306f7 | refs/heads/master | 2023-02-09T08:04:15.313698 | 2023-02-03T23:23:42 | 2023-02-03T23:23:42 | 173,331,130 | 249 | 371 | null | 2022-12-04T06:52:26 | 2019-03-01T16:08:37 | null | UTF-8 | Python | false | false | 2,725 | py | locationlistener.py | # locationlistener.py
"""Receives tweets matching a search string and stores a list of
dictionaries containing each tweet's username/text/location."""
import tweepy
from tweetutilities import get_tweet_content
class LocationListener(tweepy.StreamingClient):
"""Handles incoming Tweet stream to get location d... |
9effd9b649efe48e282135e06eaf2d7d57aa85e2 | a5a99f646e371b45974a6fb6ccc06b0a674818f2 | /RecoParticleFlow/PFClusterProducer/python/particleFlowClusterHO_cfi.py | b04e9ea0360578ede70d9e9d25b9985ea6d29603 | [
"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 | 3,717 | py | particleFlowClusterHO_cfi.py | import FWCore.ParameterSet.Config as cms
# Use this object to modify parameters specifically for Run 2
#### PF CLUSTER HO ####
#cleaning
#seeding
_localMaxSeeds_HO = cms.PSet(
algoName = cms.string("LocalMaximumSeedFinder"),
thresholdsByDetector = cms.VPSet(
cms.PSet( detector = cms.string("HCAL_BARREL2... |
fe7f29f6c113e2bddbc38ef8fce1bdc2edd0b032 | 362196f32e8248e025cb2f6cf0b88f812c9a059c | /juriscraper/opinions/united_states/state/oklaag.py | 3f4a38ae1be7e8e2c71b0240572a799c40eaade9 | [
"BSD-3-Clause",
"LicenseRef-scancode-generic-cla",
"LicenseRef-scancode-unknown-license-reference",
"BSD-2-Clause"
] | permissive | freelawproject/juriscraper | 0fea8d4bb512808cb1e036aaaf819e9cc0847a6b | d2c6672696e13e33ec9981a1901b87047d8108c5 | refs/heads/main | 2023-08-09T13:27:21.357915 | 2023-07-06T22:33:01 | 2023-07-06T22:33:01 | 22,757,589 | 283 | 97 | BSD-2-Clause | 2023-09-08T22:59:36 | 2014-08-08T12:50:35 | HTML | UTF-8 | Python | false | false | 1,287 | py | oklaag.py | # Scraper for Oklahoma Attorney General Opinions
# CourtID: oklaag
# Court Short Name: OK
# Author: Andrei Chelaru
# Reviewer: mlr
# Date: 2014-07-05
from datetime import date
from lxml import html
from juriscraper.opinions.united_states.state import okla
## WARNING: THIS SCRAPER IS FAILING:
## This scraper is succ... |
6ed7cb0dc8895fd1baad820d6471018a058ba817 | f576f0ea3725d54bd2551883901b25b863fe6688 | /sdk/regionmove/azure-mgmt-regionmove/azure/mgmt/regionmove/aio/operations_async/__init__.py | 2d5f1a4233916034b5023e6be377e947f05a0ef0 | [
"LicenseRef-scancode-generic-cla",
"MIT",
"LGPL-2.1-or-later"
] | permissive | Azure/azure-sdk-for-python | 02e3838e53a33d8ba27e9bcc22bd84e790e4ca7c | c2ca191e736bb06bfbbbc9493e8325763ba990bb | refs/heads/main | 2023-09-06T09:30:13.135012 | 2023-09-06T01:08:06 | 2023-09-06T01:08:06 | 4,127,088 | 4,046 | 2,755 | MIT | 2023-09-14T21:48:49 | 2012-04-24T16:46:12 | Python | UTF-8 | Python | false | false | 938 | py | __init__.py | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.