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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9ced3389b9913c2911c5cef8ab4352dc389d6f90 | 8358c8d86600703663eb8a8f30493c20704cf586 | /test/core/test_dump.py | 17b55b77cc824861e06cd181ed0b16937d6e7c52 | [
"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 | 2,274 | py | test_dump.py | import unittest
from test.sampledata import new_test_dataset
from xcube.core.dump import dump_dataset
class DumpDatasetTest(unittest.TestCase):
def test_dump_dataset(self):
dataset = new_test_dataset(["2010-01-01", "2010-01-02", "2010-01-03", "2010-01-04", "2010-01-05"],
... |
95c8f054e846f0a4b50a6b9a5b08a437476bdffe | 9071dc219693bde591ad12fb31c43c635f3a3f5e | /tests/test_version.py | 98d3a2f59d8c382b767e3afb47b06f8c4af04808 | [
"MIT"
] | permissive | VirtusLab/git-machete | 67f51e49d44601daee4cc40fa27de87ecc029af6 | dca261b0f8c56edb65557d178321a21177872b05 | refs/heads/master | 2023-08-17T07:58:32.883018 | 2023-08-12T14:52:48 | 2023-08-12T14:52:48 | 122,743,101 | 711 | 45 | MIT | 2023-09-08T07:39:27 | 2018-02-24T13:32:07 | Python | UTF-8 | Python | false | false | 242 | py | test_version.py |
from git_machete import __version__
from .mockers import assert_success
class TestVersion:
def test_version(self) -> None:
assert_success(
["version"],
f"git-machete version {__version__}\n"
)
|
1f010f485bee4e05ad0f21d35bb2e790a467da0e | ad61cc119a42abfd3d64224a753817ae0f9ba058 | /scripts/performance/benchmark-rm | 16009c696cdae3c0401e92ae1edf145b862f93c2 | [
"Apache-2.0"
] | permissive | aws/aws-cli | 30b0e5b0fb6d736f1540990955f0a7351ee7a908 | 147d16dfdb72dc9cf362b676a57e46a49375afbd | refs/heads/develop | 2023-09-03T19:52:07.955543 | 2023-09-01T20:37:50 | 2023-09-01T20:37:50 | 6,780,767 | 13,038 | 4,107 | NOASSERTION | 2023-09-13T19:48:11 | 2012-11-20T16:07:36 | Python | UTF-8 | Python | false | false | 801 | benchmark-rm | #!/usr/bin/env python
from benchmark_utils import benchmark_command, get_transfer_command
from benchmark_utils import backup, copy, clean, get_default_argparser
def benchmark_rm(args):
command = get_transfer_command(
'rm %s' % args.target, args.recursive, args.quiet)
backup_path = backup(args.target, ... | |
cd1db4bfaaeeadfdad4316c1787edfd7ecad14a8 | 57adfd30d44dcec446e55306265b68ee08b51655 | /dropbox/account.py | 8a30b5d7b0f8038e4683eb8fcb606f442247d622 | [
"MIT"
] | permissive | dropbox/dropbox-sdk-python | 610c0cbbfcc7bdacda6da859a8247b56005bbc44 | 487793dff3c5a8a3a76010799dc4803cabdb70f3 | refs/heads/main | 2023-09-04T23:06:41.483053 | 2023-05-25T17:17:10 | 2023-05-25T17:17:10 | 37,347,427 | 1,029 | 453 | MIT | 2023-08-16T19:51:59 | 2015-06-12T22:23:27 | Python | UTF-8 | Python | false | false | 8,360 | py | account.py | # -*- coding: utf-8 -*-
# Auto-generated by Stone, do not modify.
# @generated
# flake8: noqa
# pylint: skip-file
from __future__ import unicode_literals
from stone.backends.python_rsrc import stone_base as bb
from stone.backends.python_rsrc import stone_validators as bv
class PhotoSourceArg(bb.Union):
"""
Thi... |
0c4e9cae136cd3623306a6374fe11d254f35b94b | aee26a4c731a84481a499679c3d4cef9ec954aed | /tacker/sol_refactored/conductor/conductor_rpc_v2.py | b9526be7d7702ac315e8761ec75306593375df2a | [
"Apache-2.0"
] | permissive | openstack/tacker | 6976cbee3afadfd9390849b56da2837feb93e912 | 9c7918f0b501cdeaffae40f585b76fc92b8e196e | refs/heads/master | 2023-09-04T01:22:43.106241 | 2023-08-31T00:06:42 | 2023-08-31T00:42:20 | 21,259,951 | 125 | 172 | Apache-2.0 | 2021-05-09T06:13:08 | 2014-06-27T01:11:56 | Python | UTF-8 | Python | false | false | 4,064 | py | conductor_rpc_v2.py | # Copyright (C) 2021 Nippon Telegraph and Telephone 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/LICE... |
fe324e670e4080584e9cd09ec6fd63f0bb0e64ac | 6923f79f1eaaba0ab28b25337ba6cb56be97d32d | /python_for_finance_yuxing/test01.py | 585cda687639208ad790fbce39fce51356c75e49 | [] | 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 | 38 | py | test01.py | def pv_f(fv,r,n):
return fv/(1+r)**n
|
7f59e5bd178ba19f14f1412c8977656d6602305f | 3abc1fef99ac6ce0b845a1090fae7f6875fee729 | /src/ralph/dashboards/tests/test_renderer.py | e8e4520020ea3ad21e29786fbb4ec7255fc133d0 | [
"Apache-2.0"
] | permissive | allegro/ralph | 5ff9165a202e836061c99e8af20214e0d651622f | b4a72356f527b1f12c7babd7465d2d7fa3ffb0d3 | refs/heads/ng | 2023-09-02T01:13:43.672554 | 2023-09-01T09:48:38 | 2023-09-01T09:48:38 | 4,359,038 | 1,970 | 617 | Apache-2.0 | 2023-09-01T09:44:39 | 2012-05-17T14:04:57 | Python | UTF-8 | Python | false | false | 1,156 | py | test_renderer.py | from django.test import SimpleTestCase
from ralph.dashboards.renderers import build_filters
class BuildFilterTestCase(SimpleTestCase):
def test_without_aggregation(self):
self.assertEqual(
build_filters(labels='id', value=10),
{'id': 10}
)
def test_with_year_aggregati... |
95ea9eab22d71af92f3a60af1604ddcadf4e97ee | b889e24f6f68d407cebfa8404d15ec980f596cf2 | /GANs/cifar_models.py | d998e34f677d57a2fc8e5f21b4cf2d6bf6472586 | [
"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 | 1,556 | py | cifar_models.py | import torch.nn as nn
class dcD32(nn.Module):
def __init__(self):
super(dcD32, self).__init__()
self.conv = nn.Sequential(
nn.Conv2d(in_channels=3, out_channels=32, kernel_size=5, stride=1), # 3x32x32 -> 32x28x28
nn.LeakyReLU(0.01),
nn.MaxPool2d(2, 2), # 32x14... |
6dbab414fd664f6cd532f048ff647907d3aef2fa | 3a6a211ea0d32405497fbd6486c490bb147e25f9 | /dashboard/dashboard/pinpoint/models/quest/run_lacros_telemetry_test_test.py | 358350c6fd68dd2b78ed5a46598f874041d0fc40 | [
"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 | 1,717 | py | run_lacros_telemetry_test_test.py | # Copyright 2021 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 print_function
from __future__ import division
from __future__ import absolute_import
import unittest
from dashboard.pinpoint.models... |
ec423ed2a22fd868c3b0d8306b50a867832acde5 | d9ac1064889bafa3aed4561cf9dc9c797c4d41e3 | /list_lambdas.py | 6919d5a126f80fb2d3afa488b1ad309c1b3a52dd | [
"CC-BY-SA-4.0",
"MIT"
] | permissive | epsagon/list-lambdas | 401ae522214ad97c2cb4d51b7fe3195e3f794c66 | 3685671a6977b53fa6d3cc4976425c795415df79 | refs/heads/master | 2022-03-04T08:43:02.138657 | 2022-02-21T11:16:26 | 2022-02-21T11:16:26 | 119,053,680 | 191 | 44 | MIT | 2022-02-21T11:03:53 | 2018-01-26T13:18:49 | Python | UTF-8 | Python | false | false | 9,038 | py | list_lambdas.py | """
Enumerates Lambda functions from every region with interesting metadata
"""
from __future__ import print_function
from datetime import datetime
import argparse
import codecs
import boto3
from boto3.session import Session
from botocore.exceptions import ClientError
from terminaltables import AsciiTable
import progr... |
c7b3c47b5e8200d8026746dffccf8c67183876f1 | e579188f958ae43ee5bbcce5e85a3494b829a6d3 | /tests/plantuml/test_outside.py | 77e2b977a5301ec0eab8f14b4b96bb33a2776e61 | [
"MIT"
] | permissive | pinetr2e/napkin | 2797542abeadefff5ade9945961eba2e34208695 | fb1da3d3b3b9fceb59a4adc1287a93393d0baa4c | refs/heads/master | 2021-07-19T12:32:06.746980 | 2021-07-18T07:21:34 | 2021-07-18T07:21:34 | 27,030,611 | 203 | 9 | MIT | 2021-07-18T03:57:20 | 2014-11-23T11:43:17 | Python | UTF-8 | Python | false | false | 696 | py | test_outside.py | def test_calling_from_outside(check_puml):
def f(c):
foo = c.object('foo')
with c.outside():
foo.func()
check_puml(f, """
participant foo
[-> foo : func()
""")
def test_return_to_outside(check_puml):
def f(c):
foo = c.object('foo')
with c.outside():
... |
426da53977a73100f07fafcfc40e84278755c118 | 3eaef0fa3c0be14c47c6aa1e1fcfc51ccebe65c7 | /samples/sensor_update_policies/policy_wonk.py | 82b7be15271c805b19c6956677239e213695f869 | [
"Unlicense"
] | permissive | CrowdStrike/falconpy | 9dd97ee0d703d35f7da100a4c78c91f1f5911478 | b112fde2f3fbe44615f9a3b60b8210e89e51c1d5 | refs/heads/main | 2023-08-18T19:45:46.092966 | 2023-08-12T01:59:37 | 2023-08-12T01:59:37 | 312,363,599 | 256 | 109 | Unlicense | 2023-09-13T02:59:04 | 2020-11-12T18:33:23 | Python | UTF-8 | Python | false | false | 27,323 | py | policy_wonk.py | r"""CrowdStrike Falcon Sensor Update Policy management utilty.
______ _ _ _ _ _
| ___ \ | (_) | | | | | |
| |_/ /__ | |_ ___ _ _ | | | | ___ _ __ | | __
| __/ _ \| | |/ __| | | | | |/\| |/ _ \| '_ \| |/ /
| | | (_) | | | (__| |_| | \ /\ / (_) | | | ... |
90f229835142041a888973d998f1304be719ceaa | 499f5402baed77d000c65f243b457c69dc3d2fe4 | /pycatia/mec_mod_interfaces/origin_elements.py | 08bde110c51c5521962fddcb60ca2bfe138bc273 | [
"MIT"
] | permissive | evereux/pycatia | 416189b34f3c60effea8a76258e36ffc5ae86e22 | 5f5726d5dc66265b3eba8a01910c4aeae424365d | refs/heads/master | 2023-08-21T10:03:41.660445 | 2023-08-09T16:21:10 | 2023-08-09T16:21:10 | 159,069,580 | 141 | 42 | MIT | 2023-08-09T11:15:27 | 2018-11-25T20:04:31 | Python | UTF-8 | Python | false | false | 3,805 | py | origin_elements.py | #! usr/bin/python3.9
"""
Module initially auto generated using V5Automation files from CATIA V5 R28 on 2020-06-11 12:40:47.360445
.. warning::
The notes denoted "CAA V5 Visual Basic Help" are to be used as reference only.
They are there as a guide as to how the visual basic / catscript function... |
313f5345a081fbc3aa5dd30cb08abc56fd1762ef | 6477d93b0cbffd21751b84d89fdefced0628ae54 | /setup.py | 7090054156610999b98e99ee04ed46a42ab6deca | [
"MIT"
] | permissive | closeio/redis-hashring | 7c04e1cb1a2f4d5d12245706bd7300ae1a8f687f | 2347f8432af8fb1910cbf2e052adb5793f2df8b3 | refs/heads/master | 2023-07-24T16:40:39.311739 | 2023-07-18T11:07:47 | 2023-07-18T11:07:47 | 40,690,837 | 152 | 15 | MIT | 2023-07-18T11:00:49 | 2015-08-14T02:03:20 | Python | UTF-8 | Python | false | false | 969 | py | setup.py | from setuptools import setup
setup(
name='redis-hashring',
version='0.3.3',
author='Close Engineering',
author_email='engineering@close.com',
url='http://github.com/closeio/redis-hashring',
license='MIT',
description=(
'Python library for distributed applications using a Redis hash ... |
d179e8781161a26a0535e7dc645220c74e74b7cb | a2dbff3e4f7cb1c84fed0835dc76106621e75cb9 | /examples/rebundle.py | 9e223aa83a4c1703013c12c8c30df2e013e07419 | [
"MIT"
] | permissive | K0lb3/UnityPy | e3325c9b993ad910bd68fdfcf6c55889ebb894ab | 2fe1be2abfb8e3d53ba062f70390a517f41cfae7 | refs/heads/master | 2023-08-19T04:51:40.863686 | 2023-07-18T12:38:31 | 2023-07-18T12:38:31 | 198,518,141 | 612 | 126 | MIT | 2023-08-31T11:02:15 | 2019-07-23T22:36:09 | Python | UTF-8 | Python | false | false | 3,722 | py | rebundle.py | """
This script shows how to create a bundle from dumped assets from the memory.
The dumped assets consist of SerializedFiles and their resources(cabs).
A sample file of the original game is required for this script.
This example uses the globalgamemanager as this asset should exist in all Unity games.
"""
import os
... |
86be7745c5efab625290d9fa24d7d14013314323 | b7d4fc29e02e1379b0d44a756b4697dc19f8a792 | /deps/boost/tools/build/test/feature_cxxflags.py | a4eeb52d41f7df11b728c134173c75c5759e320a | [
"LicenseRef-scancode-unknown-license-reference",
"BSL-1.0",
"GPL-1.0-or-later",
"MIT"
] | permissive | vslavik/poedit | 45140ca86a853db58ddcbe65ab588da3873c4431 | 1b0940b026b429a10f310d98eeeaadfab271d556 | refs/heads/master | 2023-08-29T06:24:16.088676 | 2023-08-14T15:48:18 | 2023-08-14T15:48:18 | 477,156 | 1,424 | 275 | MIT | 2023-09-01T16:57:47 | 2010-01-18T08:23:13 | C++ | UTF-8 | Python | false | false | 786 | py | feature_cxxflags.py | #!/usr/bin/python
# Copyright 2014 Steven Watanabe
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
# Tests the cxxflags feature
import BoostBuild
t = BoostBuild.Tester(use_test_config=False)
# cxxflags should b... |
b7a019503730058d23e461796a9f46a7b1320461 | 916c1313c623c799e98d1bd897b3aef510172639 | /py/abd/abdi_repo.py | bda523ec17789a4a5112d3ab4e74c91b0d8861bb | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | bloomberg/phabricator-tools | 377ba3dba299c5d21a015bb039ae920fae5478ef | 09bd1587fe8945d93a891162fd4c89640c6fada7 | refs/heads/master | 2021-01-02T19:43:48.274684 | 2019-01-11T13:34:55 | 2019-01-11T13:34:55 | 8,464,182 | 154 | 40 | Apache-2.0 | 2022-02-14T09:57:48 | 2013-02-27T20:02:50 | Python | UTF-8 | Python | false | false | 6,867 | py | abdi_repo.py | """Manage git repositories watched by arcyd."""
# =============================================================================
# CONTENTS
# -----------------------------------------------------------------------------
# abdi_repo
#
# Public Functions:
# setup_repo
# setup_repo_context
# try_push_special_refs
# ... |
729adbc8eca3fbbc0a13326442c26262410ed3db | 0fe0ffe29ca6f76c6f15c85c8d82b09beaada246 | /third_party/catapult/systrace/profile_chrome/chrome_controller.py | ec4a59880766ce3528189cc68ecba050d3b9957a | [
"BSD-3-Clause"
] | permissive | hanpfei/chromium-net | 4dc8fd48cf3b05d89b11dc121f9c3abdd3ba962e | 9df8ce98c2a14fb60c2f581853011e32eb4bed0f | refs/heads/master | 2023-07-08T15:28:01.033104 | 2023-06-14T13:02:39 | 2023-06-14T13:02:39 | 65,541,033 | 297 | 73 | null | 2022-11-02T23:33:48 | 2016-08-12T09:25:34 | C++ | UTF-8 | Python | false | false | 4,319 | py | chrome_controller.py | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import json
import os
import re
import time
from profile_chrome import controllers
from devil.android import device_errors
from devil.android.sdk import in... |
70798f9574e5a09277980ddaa7afac763bec5670 | d95f049c5ae622790367085957d9d13a0aa85351 | /tests/input/eps/test_eps.py | b0ab67c84f969acdc7a71df701585ade70200bed | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | algoo/preview-generator | 42b11937723d78104b2232558bdc2e979fb4de93 | 9948f6555d827602024f98478dad8057e65aeae6 | refs/heads/develop | 2023-09-01T16:19:45.302197 | 2023-02-17T15:06:30 | 2023-02-17T15:06:30 | 90,982,830 | 214 | 60 | MIT | 2023-08-28T22:38:14 | 2017-05-11T13:33:20 | Python | UTF-8 | Python | false | false | 2,698 | py | test_eps.py | # -*- coding: utf-8 -*-
import os
import shutil
import typing
from PIL import Image
import pytest
from wand.exceptions import PolicyError
from preview_generator.exception import UnavailablePreviewType
from preview_generator.manager import PreviewManager
CURRENT_DIR = os.path.dirname(os.path.abspath(__file__))
CACHE... |
6407ac1c80ae744fed6e3bb6f0c2f2bc8e285766 | c7c73566784a7896100e993606e1bd8fdd0ea94e | /tests/event/test_pythontask.py | d6806b4f723b54f93b8236b36932651ca40304b2 | [
"BSD-3-Clause",
"BSD-2-Clause"
] | permissive | panda3d/panda3d | c3f94df2206ff7cfe4a3b370777a56fb11a07926 | 160ba090a5e80068f61f34fc3d6f49dbb6ad52c5 | refs/heads/master | 2023-08-21T13:23:16.904756 | 2021-04-11T22:55:33 | 2023-08-06T06:09:32 | 13,212,165 | 4,417 | 1,072 | NOASSERTION | 2023-09-09T19:26:14 | 2013-09-30T10:20:25 | C++ | UTF-8 | Python | false | false | 1,509 | py | test_pythontask.py | from panda3d.core import PythonTask
import pytest
import types
import sys
def test_pythontask_property_builtin():
task = PythonTask()
# Read-write property
assert task.name == ""
task.name = "ABC"
# Read-only property
assert task.dt == 0.0
with pytest.raises(AttributeError):
task... |
5089bdcd8059f06f0232f55e1df6c586f54eb55c | b8441dc1987be9e64fa3081d456b2a3060ec44d1 | /mars/tensor/base/unique.py | e8a08959f0a3d88cb35395af171e1d344f7cf66e | [
"BSD-3-Clause",
"MIT",
"ISC",
"Apache-2.0",
"CC0-1.0",
"BSD-2-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | mars-project/mars | f99fefbce999d58a9249bc72046787a9731c9c73 | c36c53fa22e10ef9477d9c454401a2f281375f31 | refs/heads/master | 2023-07-23T00:23:55.133015 | 2023-07-03T11:44:54 | 2023-07-03T11:44:54 | 160,543,708 | 2,704 | 362 | Apache-2.0 | 2023-09-11T07:57:35 | 2018-12-05T16:04:03 | Python | UTF-8 | Python | false | false | 21,936 | py | unique.py | # Copyright 1999-2021 Alibaba Group Holding 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 a... |
56e93c39137594fd90766374a819fe5998c83c48 | 7607429663127ad7429d0815006dbb6aba2f3fd0 | /test/pyom_consistency/acc_setup_test.py | 01e2b4a6d03b2388e853ab2299ba2a92c9e9a682 | [
"MIT"
] | permissive | team-ocean/veros | df0d0e467579a09a973f45bc1b267aca9609e93a | 416dbdac43b8ce80ce09171a3bd3fdb4814abae0 | refs/heads/main | 2023-08-05T03:39:31.640695 | 2023-08-03T08:00:37 | 2023-08-03T08:00:37 | 87,419,383 | 168 | 31 | MIT | 2023-09-14T04:50:21 | 2017-04-06T10:59:21 | Python | UTF-8 | Python | false | false | 9,307 | py | acc_setup_test.py | import numpy as np
from veros import VerosSetup, veros_routine
from veros.variables import allocate, Variable
from veros.core.operators import numpy as npx, update, at
from veros.pyom_compat import load_pyom, setup_pyom
from test_base import compare_state
yt_start = -39.0
yt_end = 43
yu_start = -40.0
yu_end = 42
... |
1035f0df74fc44303045bd52891c02bb3e437f69 | 1dbbb05b30d27c6419b9f34eea3b9a47f92582a0 | /parlai/core/tod/tod_agents.py | 6fb15fb731a63a84b15bb6e2faec7b4cea922ee2 | [
"MIT"
] | permissive | facebookresearch/ParlAI | 815334323d0ebef51bf9837336fe3eef6fe1655d | e1d899edfb92471552bae153f59ad30aa7fca468 | refs/heads/main | 2023-08-31T22:20:45.918129 | 2023-08-14T19:39:56 | 2023-08-14T19:39:56 | 89,266,735 | 10,943 | 2,395 | MIT | 2023-09-13T23:07:40 | 2017-04-24T17:10:44 | Python | UTF-8 | Python | false | false | 32,366 | py | tod_agents.py | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
"""
Agents (used for dumping data) and Teachers (for training models) related to the TOD
conversation setup.
As a conven... |
9cf4b8ce075304c93606d97440c90169241529b5 | 2c296f525308ee2f7e1205b6b7eb392c53bbc14d | /pyamg/vis/__init__.py | 8380b74b79f33b7bac4a41c79933e0dcba236bcc | [
"MIT"
] | permissive | pyamg/pyamg | 939f2b73153518f482401c1b2363e1abed880b4d | 4f604ef7d7765dc8c20f643650bf60bcc3c7207c | refs/heads/main | 2023-09-01T07:10:42.995125 | 2023-07-18T13:35:08 | 2023-07-18T13:47:34 | 10,866,320 | 466 | 125 | MIT | 2023-07-18T13:47:35 | 2013-06-22T14:24:24 | Python | UTF-8 | Python | false | false | 489 | py | __init__.py | """Basic vtk support.
The vis module provides support for generic vtk file writing, basic mesh
writing (unstructured triangular and tetrahedral meshes), visualization of
aggregate groupings in 2d and in 3d, and C/F splittings.
"""
from . import vtk_writer
from . import vis_coarse
from .vtk_writer import write_vtu, w... |
acf3b0c60d92e0ae89d63f0c695a29c09f528846 | fa1ad2e2ac7e376fc7cb3b3a6e1bb88eed3e80be | /govern/data-meta/OpenMetadata/ingestion/src/metadata/ingestion/source/database/mssql/query_parser.py | 9873ac1ad434484a3a0c8ec26bc3864ff1ad6245 | [
"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 | 1,742 | py | query_parser.py | # Copyright 2021 Collate
# 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... |
45498aa79475914f7fe736110c28dae5cceb854f | a3d6556180e74af7b555f8d47d3fea55b94bcbda | /tools/site_compare/site_compare.py | 079536f450b95f9119ebb17e449661f89fb27bf9 | [
"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 | 6,520 | py | site_compare.py | #!/usr/bin/env python
# Copyright 2011 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""SiteCompare component to handle bulk scrapes.
Invokes a list of browsers and sends them to a list of URLs,
saving the rendered results to a specified dir... |
586014a671afc6f2d69bcb5dded1643930655eff | fbbe424559f64e9a94116a07eaaa555a01b0a7bb | /Tensorflow/source/tensorflow/contrib/session_bundle/gc.py | 249c23c88f3043403e322b73b6c9df97e932a92a | [
"MIT"
] | permissive | ryfeus/lambda-packs | 6544adb4dec19b8e71d75c24d8ed789b785b0369 | cabf6e4f1970dc14302f87414f170de19944bac2 | refs/heads/master | 2022-12-07T16:18:52.475504 | 2022-11-29T13:35:35 | 2022-11-29T13:35:35 | 71,386,735 | 1,283 | 263 | MIT | 2022-11-26T05:02:14 | 2016-10-19T18:22:39 | Python | UTF-8 | Python | false | false | 6,618 | py | gc.py | # Copyright 2016 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... |
4c9b44d9f54b3980e6161266843ee7c9141e674f | 2ca86be72e5e1cb636183de97fb2760e8d1e749f | /tests/cases/rest_decorator_test.py | 3a44d10add0cca8d5eacb45acee7f820727c9475 | [
"Apache-2.0"
] | permissive | girder/girder | 2f1acef3ecb8c2b00eb589c0844fff4cef8b3e3c | d47bb163b6b539a55232d38fe537bb6d0531062a | refs/heads/master | 2023-08-31T20:30:49.441037 | 2023-08-30T19:40:57 | 2023-08-30T19:40:57 | 11,854,950 | 422 | 188 | Apache-2.0 | 2023-09-13T19:39:57 | 2013-08-02T23:55:54 | Python | UTF-8 | Python | false | false | 3,224 | py | rest_decorator_test.py | # -*- coding: utf-8 -*-
import json
import os
import requests
import unittest
from .. import base
from girder import config
from girder.api.rest import endpoint
from girder.models.user import User
def setUpModule():
os.environ['GIRDER_PORT'] = os.environ.get('GIRDER_TEST_PORT', '20200')
config.loadConfig()
... |
b1a61dcc2be7abd514adeeaf848df6973ed3d9e9 | 3ebbaf23f44312aa84f8eafd68db2650e9f4d741 | /bot/plugins/pauseall.py | 19d497002dba60a3229c2811da9ed33d82719e60 | [] | no_license | zeroone2numeral2/qbittorrent-bot | 3f1e2bb91ff8e24002048338930c7e236211f457 | 81b97ec9b6ac024d629861b8bd638504d6975537 | refs/heads/master | 2022-12-20T20:04:36.936274 | 2022-07-04T12:55:07 | 2022-07-04T12:55:07 | 209,236,432 | 158 | 53 | null | 2022-12-13T09:14:31 | 2019-09-18T06:38:59 | Python | UTF-8 | Python | false | false | 1,180 | py | pauseall.py | import logging
# noinspection PyPackageRequirements
from telegram import Update, BotCommand
from telegram.ext import CommandHandler, CallbackContext
from bot.qbtinstance import qb
from bot.updater import updater
from utils import u
from utils import Permissions
logger = logging.getLogger(__name__)
@u.check_permiss... |
5db3c056342cd8910efb71b816d745c8c91b5b68 | 6ff85b80c6fe1b3ad5416a304b93551a5e80de10 | /Python/String/Replace.py | 29fead167105dd3f7f74f6c5b6f3bdb3ef40def2 | [
"MIT"
] | permissive | maniero/SOpt | c600cc2333e0a47ce013be3516bbb8080502ff2a | 5d17e1a9cbf115eaea6d30af2079d0c92ffff7a3 | refs/heads/master | 2023-08-10T16:48:46.058739 | 2023-08-10T13:42:17 | 2023-08-10T13:42:17 | 78,631,930 | 1,002 | 136 | MIT | 2023-01-28T12:10:01 | 2017-01-11T11:19:24 | C# | UTF-8 | Python | false | false | 89 | py | Replace.py | print(texto.replace('caixa 1 ', 'pacote 2 '))
#https://pt.stackoverflow.com/q/83381/101
|
e18ba19907917b40869592a586f8478c0c2825f3 | a3e2d421f94a8adf2c41ff1d093b5a06de1448d6 | /product/runtime/src/test/python/imp_rename_two/mod_one.py | 0068e4054a6a5783d0b0d1102b49f5a2b87f100f | [
"MIT"
] | permissive | chaquo/chaquopy | 09ef057015a756ce9b862732477b2549562720b4 | e09bbe6ca5efd859d484b01e30131ccc944aa2b6 | refs/heads/master | 2023-08-31T22:09:22.230601 | 2023-08-31T13:07:57 | 2023-08-31T13:07:57 | 95,140,462 | 607 | 121 | MIT | 2023-09-13T19:17:29 | 2017-06-22T17:33:02 | Python | UTF-8 | Python | false | false | 10 | py | mod_one.py | ID = "21"
|
40f87678c84d3e738b6b52ce11252ef02a9fdbdf | 6c287b46a483ede6fe079e40c6e823853f395a6a | /generator/test/runner.py | 3c2a8231eddbd0056e6339ac8c75cd95f4d366cb | [
"BSD-3-Clause",
"MIT",
"Apache-2.0"
] | permissive | smartdevicelink/sdl_ios | 50fded2de845b8406071d84225db80a0481961cb | 2c3d561468ee67a4b298e4976a1ac2699853c11e | refs/heads/develop | 2023-07-14T06:14:09.622236 | 2023-06-29T17:31:21 | 2023-06-29T17:31:21 | 24,940,582 | 188 | 129 | BSD-3-Clause | 2023-06-29T17:31:22 | 2014-10-08T12:57:22 | Objective-C | UTF-8 | Python | false | false | 2,304 | py | runner.py | """
All tests
"""
import logging
import sys
from pathlib import Path
from unittest import TestLoader, TestSuite, TextTestRunner
ROOT = Path(__file__).absolute()
sys.path.append(ROOT.parents[1].joinpath('rpc_spec/InterfaceParser').as_posix())
sys.path.append(ROOT.parents[1].as_posix())
try:
from test_enums import... |
42cef4e8bc7e274a033e6bef9abe37e5c1513d47 | 914faa10e5423efc87d0079248b3eb7df72ed83e | /test/numbers/floats2.py | 3f74ac5b52fd27ae993283464039d1efa3ba741c | [
"MIT"
] | permissive | MagicStack/MagicPython | cf7b7ae8290b0e997adf6a197b2f5be300391a0a | 7d0f2b22a5ad8fccbd7341bc7b7a715169283044 | refs/heads/master | 2023-08-26T04:16:54.672649 | 2022-10-18T07:43:20 | 2022-10-19T23:20:38 | 43,982,620 | 1,564 | 146 | MIT | 2023-02-23T19:40:57 | 2015-10-09T22:13:24 | JavaScript | UTF-8 | Python | false | false | 677 | py | floats2.py | 1_234.567_890
0.456_789
000.000_1
.012_34
1_234e5_000
1_234e-5_000
000_123e-000_5
1_234.567_8e+5_000
0.456_78e-5_000
1_234.567_890 : constant.numeric.float.python, source.python
0.456_789 : constant.numeric.float.python, source.python
000.000_1 : constant.numeric.float.python, source.python
.012_34 : c... |
dd976657068787bf35ad912909066c47fb919c68 | 3f7da3c27ae3c32814e6dd7deefc0c48e68d3fba | /tests/test_libuv_api.py | 3cda4bcd869467e8e29b1f58d2a16c529a763b52 | [
"Apache-2.0",
"MIT"
] | permissive | MagicStack/uvloop | 0aacdcc19a115dabd0860d032969edc0aa708be5 | 1dd40f17f3b0d37e3779b6ad5041bab335142337 | refs/heads/master | 2023-09-04T02:07:11.524338 | 2023-08-11T17:25:03 | 2023-08-11T17:25:03 | 45,766,550 | 10,234 | 650 | Apache-2.0 | 2023-09-07T17:27:10 | 2015-11-08T04:14:54 | Cython | UTF-8 | Python | false | false | 655 | py | test_libuv_api.py | from uvloop import _testbase as tb
from uvloop.loop import libuv_get_loop_t_ptr, libuv_get_version
class Test_UV_libuv(tb.UVTestCase):
def test_libuv_get_loop_t_ptr(self):
loop = self.new_loop()
cap1 = libuv_get_loop_t_ptr(loop)
cap2 = libuv_get_loop_t_ptr(loop)
cap3 = libuv_get_lo... |
9dbc11ba4858fd10ed1b79dbd863d4d6e730d4af | 4f93f5a27b6c872903b9acf8d20fb736716a26df | /preprocess/SelectHetSnp.py | d42a0663b33602351a4dcb8c9b57930c8f79f9a7 | [
"BSD-3-Clause"
] | permissive | HKU-BAL/Clair3 | cf388ae3d0b0332eb8df125fb1e1a97120a90ed1 | 181f55d7a741855597d083baffc4551949d2837e | refs/heads/main | 2023-07-28T05:34:32.917498 | 2023-07-20T02:58:19 | 2023-07-20T02:58:19 | 352,969,947 | 162 | 18 | null | 2023-06-01T14:15:31 | 2021-03-30T11:02:58 | Python | UTF-8 | Python | false | false | 18,190 | py | SelectHetSnp.py | import shlex
import os
import sys
from argparse import ArgumentParser, SUPPRESS
from collections import defaultdict
from shared.intervaltree.intervaltree import IntervalTree
import shared.param_f as param
from shared.utils import subprocess_popen
def FiterHeteSnpPhasing(args):
"""
Filter heterozygous snp va... |
0dbee8c55f21765e4b913c54a96e4d3bea778337 | b049a961f100444dde14599bab06a0a4224d869b | /sdk/python/pulumi_azure_native/providerhub/_inputs.py | 26d1e90720ff20569a5f6beef7d33af86d5fe95b | [
"BSD-3-Clause",
"Apache-2.0"
] | permissive | pulumi/pulumi-azure-native | b390c88beef8381f9a71ab2bed5571e0dd848e65 | 4c499abe17ec6696ce28477dde1157372896364e | refs/heads/master | 2023-08-30T08:19:41.564780 | 2023-08-28T19:29:04 | 2023-08-28T19:29:04 | 172,386,632 | 107 | 29 | Apache-2.0 | 2023-09-14T13:17:00 | 2019-02-24T20:30:21 | Python | UTF-8 | Python | false | false | 135,807 | py | _inputs.py | # coding=utf-8
# *** WARNING: this file was generated by pulumi. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
from ._enu... |
3485944f361651cfad36376cdcc8bdc7e40215e4 | 1577e1cf4e89584a125cffb855ca50a9654c6d55 | /pyobjc/pyobjc/pyobjc-framework-Cocoa-2.5.1/PyObjCTest/test_nskeyvaluebinding.py | f7eb7c4d021649a715ba3daa85d3de94b7228128 | [
"MIT"
] | permissive | apple-open-source/macos | a4188b5c2ef113d90281d03cd1b14e5ee52ebffb | 2d2b15f13487673de33297e49f00ef94af743a9a | refs/heads/master | 2023-08-01T11:03:26.870408 | 2023-03-27T00:00:00 | 2023-03-27T00:00:00 | 180,595,052 | 124 | 24 | null | 2022-12-27T14:54:09 | 2019-04-10T14:06:23 | null | UTF-8 | Python | false | false | 8,650 | py | test_nskeyvaluebinding.py |
from PyObjCTools.TestSupport import *
from AppKit import *
try:
unicode
except NameError:
unicode = str
class TestNSKeyValueBindingHelper (NSObject):
def commitEditingWithDelegate_didCommitSelector_contextInfo_(self, d, s, i):
return None
def commitEditingAndReturnError_(self, v): return 1
... |
8ef504c6d1619697c387c203170a800e5e8356e0 | 3a2a3d94e9dfd49072f961ce8c2c41fa337c5bb9 | /phobos/ci/base_model.py | 73eff0fc380ca79d4cfebd779e37182cc99c3f1a | [
"BSD-3-Clause"
] | permissive | dfki-ric/phobos | 2fc8f9acc14a24418985899a8cdbefd60df8a5b9 | 543d220c65bbee0e23e810d89307e23aa79eb0cd | refs/heads/master | 2023-09-02T05:24:02.999410 | 2023-08-31T13:18:49 | 2023-08-31T13:18:49 | 22,949,566 | 483 | 79 | BSD-3-Clause | 2023-09-06T13:35:29 | 2014-08-14T10:08:49 | Python | UTF-8 | Python | false | false | 50,714 | py | base_model.py | import os
import re
from copy import deepcopy, copy
import numpy as np
import yaml
from ..commandline_logging import get_logger
from ..core import Robot
from ..defs import load_json, dump_yaml, KINEMATIC_TYPES
from ..geometry import replace_collision, join_collisions, remove_collision
from ..io import representation,... |
49d9cbea85616616c3ac284ce793f61260e450e0 | 392755be90c09b354f5f28ae79cbfb9e843b4aea | /tests/char_error_test.py | dd4724bed6d98c5ed82e2d8bbecd396366939606 | [
"Apache-2.0",
"Python-2.0"
] | permissive | shibing624/pycorrector | fc5ba5adb64dd248d31c86ad5277b3bafe32f866 | ea5e57e6f54cf472206a79814390a8958e10b90b | refs/heads/master | 2023-09-01T04:42:42.173234 | 2023-08-22T09:56:06 | 2023-08-22T09:56:06 | 123,424,015 | 4,605 | 1,029 | Apache-2.0 | 2022-10-26T11:49:17 | 2018-03-01T11:08:02 | Python | UTF-8 | Python | false | false | 3,298 | py | char_error_test.py | # -*- coding: utf-8 -*-
"""
@author:XuMing(xuming624@qq.com)
@description:
"""
import sys
sys.path.append('..')
import pycorrector
# 那天花板上的钻石可比鸡弹((蛋))还大啊。
# 才般((搬))进装修好没多久的新宫殿里。
# 做的最倒霉的一件事就帮尼哥檫((擦))脚。
# 一但((旦))死去,以前花费的心血都会归零。
# 战士微笑著((着))轻轻拍了拍少年的肩膀。
# 差点拌((绊))到自己的脚。
# 面对着熙熙嚷嚷((攘攘))的城市。
# 你等我和老大商却((榷))一下。
# 这家伙还蛮格(... |
c773f58478e1788772fbc6fa00c980c45da81330 | 36ef8b40191c13344a5b3fb6bb2ab1cfb64b83a8 | /December-17/python_UjjwalPrahladka_Dec17.py | 60fc83530d01ab39bc50ba4fc5e170c07dcf5081 | [
"MIT"
] | permissive | SVCE-ACM/A-December-of-Algorithms-2019 | a9e2436b29db8ed5e488719c6e45c78ccbd49bec | d15a4e8284c8576b7080c999d4b46748f4d1d09b | refs/heads/master | 2023-02-03T20:45:17.211079 | 2022-08-13T07:41:13 | 2022-08-13T07:41:13 | 222,771,373 | 231 | 193 | MIT | 2023-06-18T04:02:23 | 2019-11-19T19:18:36 | JavaScript | UTF-8 | Python | false | false | 1,843 | py | python_UjjwalPrahladka_Dec17.py | from collections import deque
list1 = input('Enter railline 1(comma separated stations): ').lower().split(',')
list2 = input('Enter railline 2(comma separated stations): ').lower().split(',')
stations = list(set(list1 + list2))
try:
starting_node, end_node = input('Enter start and destination(comma separated)... |
00335c046bfd7ccbb67d7f850d93cc035ad1f79b | 584f7b51d7cd529448e2fc0147557e26931ab17e | /docs/_downloads/e0ed5545ef38e74cfcb877b43025058f/BesselAnnularSlit3.py | d43686cf3713ce876ed8bd19b42667fd2f2873bb | [
"BSD-3-Clause"
] | permissive | opticspy/lightpipes | 8ca0d2221a1b893de5e51fec9061e90b9145f5f8 | f4ffdedb3ab2f9b5ae5a9a8e37985d2a7f8bb2ef | refs/heads/master | 2023-09-04T19:07:11.376631 | 2023-09-04T15:24:55 | 2023-09-04T15:24:55 | 80,127,706 | 191 | 55 | BSD-3-Clause | 2023-08-23T00:45:33 | 2017-01-26T15:39:28 | Python | UTF-8 | Python | false | false | 792 | py | BesselAnnularSlit3.py | from LightPipes import *
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
img=mpimg.imread('bessel3.png')
plt.imshow(img); plt.axis('off');plt.title('Bessel beam with annular slit')
plt.show()
wavelength=1000.0*nm
size=10*mm
N=1000
N2=int(N/2)
ZoomFactor=10
NZ=N2/ZoomFactor
a=1.5*mm
f=500*mm
z_start... |
2f974c3c2d4d106d5d8102315a4e7108287be3b6 | 3a50c0712e0a31b88d0a5e80a0c01dbefc6a6e75 | /thrift/lib/python/any/serializer.pyi | a436fd3ff531e8af372a05db115e34f390564af1 | [
"Apache-2.0"
] | permissive | facebook/fbthrift | 3b7b94a533666c965ce69cfd6054041218b1ea6f | 53cf6f138a7648efe5aef9a263aabed3d282df91 | refs/heads/main | 2023-08-24T12:51:32.367985 | 2023-08-24T08:28:35 | 2023-08-24T08:28:35 | 11,131,631 | 2,347 | 666 | Apache-2.0 | 2023-09-01T01:44:39 | 2013-07-02T18:15:51 | C++ | UTF-8 | Python | false | false | 2,315 | pyi | serializer.pyi | # Copyright (c) Meta Platforms, Inc. and affiliates.
#
# 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... |
fb69eef78014be53e011a0c4c3b1966e19cd23d0 | f1f21ba2236da38a49a8185ce33b3ce4a4424c1d | /apps/molecular_generation/JT_VAE/src/nnutils.py | f6623d7b588324e63a3eb257f06bdf5e21f66507 | [
"Apache-2.0"
] | permissive | PaddlePaddle/PaddleHelix | 75a07c2f14475e56e72f4573b2cf82a91d1cbfda | e6ab0261eb719c21806bbadfd94001ecfe27de45 | refs/heads/dev | 2023-08-05T03:34:55.009355 | 2023-08-01T09:30:44 | 2023-08-01T09:30:44 | 314,704,349 | 771 | 197 | Apache-2.0 | 2023-08-01T09:15:07 | 2020-11-21T00:53:39 | Python | UTF-8 | Python | false | false | 2,647 | py | nnutils.py | # Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... |
b0f9c697af1814c697c835d30b3c33e4029f8050 | fce81b804cae23f525a5ad4370b684bf0dc531a5 | /numpy/distutils/conv_template.py | c8933d1d42865f745bb985f7f9068a96985997f7 | [
"Zlib",
"BSD-3-Clause",
"MIT",
"Apache-2.0"
] | permissive | numpy/numpy | ba2abcc1d2d46affbb6aabe5aed6407b4b57507e | dc2ff125493777a1084044e6cd6857a42ee323d4 | refs/heads/main | 2023-09-05T10:10:52.767363 | 2023-09-04T18:03:29 | 2023-09-04T18:03:29 | 908,607 | 25,725 | 11,968 | BSD-3-Clause | 2023-09-14T21:26:09 | 2010-09-13T23:02:39 | Python | UTF-8 | Python | false | false | 9,536 | py | conv_template.py | #!/usr/bin/env python3
"""
takes templated file .xxx.src and produces .xxx file where .xxx is
.i or .c or .h, using the following template rules
/**begin repeat -- on a line by itself marks the start of a repeated code
segment
/**end repeat**/ -- on a line by itself marks it's end
After the /**b... |
f7313ff04e77ed284362d1c457b33f2c396cb703 | 462b8a2326486dd41bf0d1ddbb19bbcee9532411 | /blender/arm/make_world.py | aedc1ce73efce346a4935c1489b0bba3559e5131 | [
"GPL-2.0-only",
"Zlib"
] | permissive | armory3d/armory | b751fb23d6590f2ca421ace7cf7cbeaef91f472c | 511657981bd2716eddcee8dff26820d27f2bc610 | refs/heads/main | 2023-08-12T02:57:02.898742 | 2023-08-04T18:55:45 | 2023-08-04T18:55:45 | 45,202,654 | 3,077 | 530 | Zlib | 2023-09-12T11:24:38 | 2015-10-29T18:27:56 | Python | UTF-8 | Python | false | false | 15,985 | py | make_world.py | import os
import bpy
import arm.assets as assets
import arm.log as log
from arm.material import make_shader
from arm.material.parser_state import ParserState, ParserContext
from arm.material.shader import ShaderContext, Shader
import arm.material.cycles as cycles
import arm.node_utils as node_utils
import arm.utils
i... |
0aadbff29845f7cb8574c692a4f1ad4799b9b877 | 704976ea552111c6a5af9cd7cb62b9d9abaf3996 | /rpython/rtyper/lltypesystem/rbuilder.py | 1dfb3c06862a135b54fc00f7a0096260be16eb71 | [
"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 | 17,206 | py | rbuilder.py | from rpython.rlib import rgc, jit
from rpython.rlib.objectmodel import enforceargs, dont_inline, always_inline
from rpython.rlib.rarithmetic import ovfcheck, r_uint, intmask
from rpython.rtyper.debug import ll_assert
from rpython.rlib.unroll import unrolling_iterable
from rpython.rtyper.rptr import PtrRepr
from rpython... |
f99b529578914f4ba96cbb72652d3ec2c7348c64 | ffdc77394c5b5532b243cf3c33bd584cbdc65cb7 | /mindspore/lite/examples/export_models/models/emoji_model.py | 0c733d2007c469431d1b90889bf0a6d8dcff3b1e | [
"Apache-2.0",
"LicenseRef-scancode-proprietary-license",
"MPL-1.0",
"OpenSSL",
"LGPL-3.0-only",
"LicenseRef-scancode-warranty-disclaimer",
"BSD-3-Clause-Open-MPI",
"MIT",
"MPL-2.0-no-copyleft-exception",
"NTP",
"BSD-3-Clause",
"GPL-1.0-or-later",
"0BSD",
"MPL-2.0",
"LicenseRef-scancode-f... | permissive | mindspore-ai/mindspore | ca7d5bb51a3451c2705ff2e583a740589d80393b | 54acb15d435533c815ee1bd9f6dc0b56b4d4cf83 | refs/heads/master | 2023-07-29T09:17:11.051569 | 2023-07-17T13:14:15 | 2023-07-17T13:14:15 | 239,714,835 | 4,178 | 768 | Apache-2.0 | 2023-07-26T22:31:11 | 2020-02-11T08:43:48 | C++ | UTF-8 | Python | false | false | 3,106 | py | emoji_model.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... |
d4bf47d75b5e8bc70cb1f5ed4381a2aa7eb70e86 | 578db86c51d44ebddd0dc7b1738985b3dc69eb74 | /corehq/apps/reports/formdetails/readable.py | 3a5536fc88628edacfe3e41c7fb0ebaa18705775 | [
"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 | 14,392 | py | readable.py | import re
from copy import deepcopy
from pydoc import html
from django.http import Http404
from django.utils.safestring import mark_safe
from django.utils.translation import gettext_lazy as _
from couchdbkit import ResourceNotFound
from corehq.apps.app_manager.app_schemas.app_case_metadata import (
FormQuestionR... |
0915e384de007940503502f00393edbaed2da499 | 1819c5f7861f4c4b801bff182dd3ba7801a82c18 | /Chapter 05/code/pipeline_trainer.py | f231d0cd5aefb58db4e0efefc6ac43f550d641c7 | [
"MIT"
] | permissive | PacktPublishing/Artificial-Intelligence-with-Python | 7c9520cd2d9332ac5b7d8a8ac3581c4b61593936 | d930bc2d055433781559683f69e05207f0eaab13 | refs/heads/master | 2023-04-07T11:26:38.324268 | 2023-01-18T09:26:15 | 2023-01-18T09:26:15 | 79,776,573 | 471 | 481 | MIT | 2023-07-02T11:25:47 | 2017-01-23T06:27:44 | Python | UTF-8 | Python | false | false | 1,298 | py | pipeline_trainer.py | from sklearn.datasets import samples_generator
from sklearn.feature_selection import SelectKBest, f_regression
from sklearn.pipeline import Pipeline
from sklearn.ensemble import ExtraTreesClassifier
# Generate data
X, y = samples_generator.make_classification(n_samples=150,
n_features=25, n_classes=3, n_info... |
a14b1aba870fd9dcb1b0ebef7ebda59cf860ce2b | fbbe424559f64e9a94116a07eaaa555a01b0a7bb | /Spacy/source2.7/toolz/curried/exceptions.py | 75a52bbbf27ee0779edcef942a58d9268c3eaf92 | [
"MIT"
] | permissive | ryfeus/lambda-packs | 6544adb4dec19b8e71d75c24d8ed789b785b0369 | cabf6e4f1970dc14302f87414f170de19944bac2 | refs/heads/master | 2022-12-07T16:18:52.475504 | 2022-11-29T13:35:35 | 2022-11-29T13:35:35 | 71,386,735 | 1,283 | 263 | MIT | 2022-11-26T05:02:14 | 2016-10-19T18:22:39 | Python | UTF-8 | Python | false | false | 337 | py | exceptions.py | import toolz
__all__ = ['merge_with', 'merge']
@toolz.curry
def merge_with(func, d, *dicts, **kwargs):
return toolz.merge_with(func, d, *dicts, **kwargs)
@toolz.curry
def merge(d, *dicts, **kwargs):
return toolz.merge(d, *dicts, **kwargs)
merge_with.__doc__ = toolz.merge_with.__doc__
merge.__doc__ = too... |
6991c51f4d8d2fecc0574eb67b2ad598cabf36cd | 3a6a211ea0d32405497fbd6486c490bb147e25f9 | /third_party/gsutil/third_party/crcmod_osx/crcmod/__init__.py | 80f2ac3e6e1b3c2efb82a559a4de889233ac09f1 | [
"BSD-3-Clause",
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | 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 | 194 | py | __init__.py | try:
from crcmod.crcmod import *
import crcmod.predefined
except ImportError:
# Make this backward compatible
from crcmod import *
import predefined
__doc__ = crcmod.__doc__
|
4da2943b05b10b156b0bcdd5d667c08eab4b0937 | 8eccea9f715a2a0ce602f1944ed3e812adcacb4d | /tests/services/test_file_svc.py | bf007269b640e73d00b64041dd4eb8f7c0ed1be8 | [
"Apache-2.0"
] | permissive | mitre/caldera | c466cde25bb0191880984cfdf3af84efc8a7c9f4 | 3140411d4b96d8d5607b2b50476f7bf3d506de00 | refs/heads/master | 2023-08-23T02:14:23.360314 | 2023-08-21T18:55:29 | 2023-08-21T18:55:29 | 112,409,981 | 4,685 | 1,046 | Apache-2.0 | 2023-09-13T16:36:05 | 2017-11-29T01:25:10 | Python | UTF-8 | Python | false | false | 12,468 | py | test_file_svc.py | import base64
import json
import os
import pytest
import yaml
from base64 import b64encode
from tests import AsyncMock
from asyncio import Future
from app.data_encoders.base64_basic import Base64Encoder
from app.data_encoders.plain_text import PlainTextEncoder
from app.utility.file_decryptor import decrypt
@pytest.... |
53aa840c073fb6ba2e05ec680f6a924ee823ad0e | 08ee04ae665dcb930ed4b98ca7b91b2dac2cc3b0 | /src/rayoptics/codev/tla.py | 1edcd575d56dd87c313e2705697ae3cc22b90df9 | [
"BSD-3-Clause"
] | permissive | mjhoptics/ray-optics | 6bad622f7bb9b3485823b9cc511a6d2b679f7048 | 41ea6d618a93fe14f8bee45fb3efff6a6762bcce | refs/heads/master | 2023-07-09T18:03:36.621685 | 2023-05-08T22:46:36 | 2023-05-08T22:46:36 | 109,168,474 | 195 | 49 | BSD-3-Clause | 2023-08-10T16:53:28 | 2017-11-01T18:34:12 | Python | UTF-8 | Python | false | false | 913 | py | tla.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright © 2018 Michael J. Hayford
""" Support for CODE V TLAs
.. codeauthor: Michael J. Hayford
"""
import csv
from pathlib import Path
class MapTLA:
""" Create and maintain a dictionary of CODE V 3 letter commands """
_d = {}
def __init__(self):
... |
e130a04cbc030ba4e7845a3f8fcac6956abf2377 | 6a85191d6c2ae1e0db5873e7c6cb5d341eb72253 | /torch_batch_svd/batch_svd.py | 64e7fbed9d2b3ba0e8a3c28c9f892f8312d33a3f | [
"MIT"
] | permissive | KinglittleQ/torch-batch-svd | 3875b182ec2b496fda46dacbbb4e972b741d8223 | c0a96119187f7d55f939d2ff2b92942c6d6ca930 | refs/heads/master | 2022-10-23T06:23:39.906646 | 2022-10-10T05:27:37 | 2022-10-10T05:27:37 | 171,496,660 | 356 | 36 | MIT | 2022-05-04T02:51:00 | 2019-02-19T15:17:40 | C++ | UTF-8 | Python | false | false | 2,319 | py | batch_svd.py | import torch
from . import _c
class BatchSVDFunction(torch.autograd.Function):
@staticmethod
def forward(ctx, input: torch.Tensor, some=True, compute_uv=True, out=None):
"""
This function returns `(U, S, V)`
which is the singular value decomposition
of a input real matrix or b... |
13941c73ad1af9a2849e6c2f22c0f3d38cb1c3bf | 03a7f7a7eb8c16b537b65ec21f465bb0335bc3b8 | /pythran/tests/rosetta/poly_div.py | eb73ebfa0284b33930c9beaf6c61de24916a67e0 | [
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause"
] | permissive | serge-sans-paille/pythran | a0e22af1ac5e1f34f3f29dce36502f4a897b5186 | d8ab07b4b3b690f50603cb4d08ba303d3af18b90 | refs/heads/master | 2023-09-01T16:04:03.289285 | 2023-08-30T09:13:58 | 2023-08-31T08:03:22 | 4,479,494 | 1,882 | 200 | BSD-3-Clause | 2023-09-06T20:08:10 | 2012-05-29T08:02:14 | C++ | UTF-8 | Python | false | false | 755 | py | poly_div.py | #from http://rosettacode.org/wiki/Polynomial_long_division#Python
from math import fabs
#pythran export poly_div(int list, int list)
#runas poly_div([-42, 0, -12, 1], [-3, 1, 0, 0])
def degree(poly):
while poly and poly[-1] == 0:
poly.pop() # normalize
return len(poly)-1
def poly_div(N, D):
dD ... |
59a523d608b3325f75184030b2222be870688e7f | a9fdace9236af6c73133fd8dddb80843697efc7d | /tests/catalyst/utils/test_quantization.py | a58ab6c0eb0a148b32387eada5be88d7ff3f439f | [
"Apache-2.0"
] | permissive | catalyst-team/catalyst | 026c38f26dad471cd77347adbc13423b156a5d8b | e99f90655d0efcf22559a46e928f0f98c9807ebf | refs/heads/master | 2023-08-26T23:12:49.277005 | 2022-04-29T04:19:24 | 2022-04-29T04:19:24 | 145,385,156 | 3,038 | 487 | Apache-2.0 | 2023-08-12T03:40:14 | 2018-08-20T07:56:13 | Python | UTF-8 | Python | false | false | 2,723 | py | test_quantization.py | # flake8: noqa
import os
import numpy as np
import pytest # noqa: F401
import torch
from catalyst.callbacks import AccuracyCallback
from catalyst.contrib.datasets import MNIST
from catalyst.runners import SupervisedRunner
from catalyst.settings import IS_CUDA_AVAILABLE
from catalyst.utils.quantization import quanti... |
245f2dc97421904ae3cc21d0f3035b3764607b95 | 10ddfb2d43a8ec5d47ce35dc0b8acf4fd58dea94 | /Python/the-k-strongest-values-in-an-array.py | 49aa85436db6ada3b6d9a5407b73f9a1f77a5a39 | [
"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 | 2,353 | py | the-k-strongest-values-in-an-array.py | # Time: O(nlogn)
# Space: O(1)
class Solution(object):
def getStrongest(self, arr, k):
"""
:type arr: List[int]
:type k: int
:rtype: List[int]
"""
arr.sort()
m = arr[(len(arr)-1)//2]
result = []
left, right = 0, len(arr)-1
while len(r... |
8ce79e32dfb9c1b8e4873d2e464b110b280e58ba | c50e7eb190802d7849c0d0cea02fb4d2f0021777 | /src/log-analytics-solution/azext_log_analytics_solution/commands.py | dbdc428cb58773196308f473b00f20a137fe6541 | [
"LicenseRef-scancode-generic-cla",
"MIT"
] | permissive | Azure/azure-cli-extensions | c1615b19930bba7166c282918f166cd40ff6609c | b8c2cf97e991adf0c0a207d810316b8f4686dc29 | refs/heads/main | 2023-08-24T12:40:15.528432 | 2023-08-24T09:17:25 | 2023-08-24T09:17:25 | 106,580,024 | 336 | 1,226 | MIT | 2023-09-14T10:48:57 | 2017-10-11T16:27:31 | Python | UTF-8 | Python | false | false | 1,497 | py | commands.py | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... |
ba1e9b2bcaef67b17971182a92d3ebbdb2886199 | 26bbcfdb811f7df13f7b5a95ba551da7adac4e9b | /src/certfuzz/scoring/multiarmed_bandit/errors.py | 1ad6dab9a1e95f3ab601e7b4867f6e784f73c142 | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | CERTCC/certfuzz | 080c3a5448a39d02049253fad96498ba50191586 | 892dae8676535b0ae5b77eea95ffbc21e9e1c959 | refs/heads/develop | 2022-11-11T06:12:09.032184 | 2020-06-10T19:57:26 | 2020-06-10T19:57:26 | 20,684,363 | 161 | 25 | NOASSERTION | 2023-05-10T14:27:00 | 2014-06-10T12:29:53 | Python | UTF-8 | Python | false | false | 160 | py | errors.py | '''
Created on Feb 22, 2013
@organization: cert.org
'''
from certfuzz.scoring.errors import ScoringError
class MultiArmedBanditError(ScoringError):
pass
|
3a38c405416fb43d1372ca51ca99bd30112f4125 | d441c11696fe475a3fe721de35b53ac0661cfca3 | /hearthstone/utils/__init__.py | 5b3988f93d4d1c668834f23ade28995f5ecf0a7b | [
"MIT"
] | permissive | HearthSim/python-hearthstone | 00634e273982223d1c2f75757ed35c1567625a2d | ad91a08676bccccc54a18f9453124c5694d28feb | refs/heads/master | 2023-08-30T23:37:23.224093 | 2023-08-22T18:20:09 | 2023-08-22T18:20:09 | 42,166,972 | 256 | 76 | MIT | 2023-06-01T16:09:58 | 2015-09-09T08:47:19 | Python | UTF-8 | Python | false | false | 12,736 | py | __init__.py | from datetime import datetime
from ..enums import CardClass, CardSet, Race, Rarity, ZodiacYear
try:
from lxml import etree as ElementTree # noqa
except ImportError:
from xml.etree import ElementTree # noqa
CARDCLASS_HERO_MAP = {
CardClass.DEATHKNIGHT: "HERO_11",
CardClass.DEMONHUNTER: "HERO_10",
CardClass.D... |
9a5e3354a696afe155beeaed6989688c1bb5bd96 | c9ff14ff176600169b6e9f6490ab32f5c3af60e0 | /jcvi/compara/synfind.py | aa1b8fb4561e83ebe3213acd0e921c44abc3b37d | [
"BSD-3-Clause",
"BSD-2-Clause"
] | permissive | tanghaibao/jcvi | c7a070692d53784a34378e19e435cb9a86d2cd2e | 695bd2eee98b14118b54fc37e38cd0222ce6a5e9 | refs/heads/main | 2023-09-01T01:22:04.353148 | 2023-08-30T01:59:11 | 2023-08-30T01:59:11 | 1,130,393 | 641 | 193 | BSD-2-Clause | 2023-09-01T03:17:24 | 2010-12-01T23:18:02 | Python | UTF-8 | Python | false | false | 9,233 | py | synfind.py | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
"""
%prog rice.sorghum.last --qbed=rice.bed --sbed=sorghum.bed
Given a blast, we find the syntenic regions for every single gene. The
algorithm works by expanding the query gene to a window centered on the gene. A
single linkage algorithm follows that outputs the synteny ... |
868d27d3968cdf7bc52d0ccb08d7866962a6c8ef | 39b021eabbb8e3be1734cf92fd641965a796b0eb | /examples/tox21/tox21_tensorgraph_graph_conv.py | b663a81633ed930887a5cf6fb6bf4eafb2d9a343 | [
"MIT"
] | permissive | deepchem/deepchem | 066cbf42316b2f6bec0166727e0264a485d5266f | ee6e67ebcf7bf04259cf13aff6388e2b791fea3d | refs/heads/master | 2023-09-02T01:32:17.860111 | 2023-08-31T18:49:00 | 2023-08-31T18:49:00 | 43,098,215 | 4,876 | 1,905 | MIT | 2023-09-14T19:10:44 | 2015-09-24T23:20:28 | Python | UTF-8 | Python | false | false | 1,164 | py | tox21_tensorgraph_graph_conv.py | """
Script that trains graph-conv models on Tox21 dataset.
"""
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import numpy as np
np.random.seed(123)
import tensorflow as tf
tf.random.set_seed(123)
import deepchem as dc
from deepchem.molnet import load_to... |
c706653d13dccd49632620e4b6c2143c33b3503e | 6946f9a3e9d57b00ea275b2303ced0dedcdba1d4 | /qf_lib/backtesting/contract/contract_to_ticker_conversion/ib_contract_ticker_mapper.py | de2a9b77f1d46a5adad19bce80ebb847c0b366fd | [
"Apache-2.0"
] | permissive | quarkfin/qf-lib | 8eaf76e3db385295ff8845b3250ba64a6fcfc7a6 | f707e51bc2ff45f6e46dcdd24d59d83ce7dc4f94 | refs/heads/master | 2023-08-31T17:41:57.213680 | 2023-08-29T10:01:49 | 2023-08-29T10:01:49 | 202,696,503 | 379 | 51 | Apache-2.0 | 2023-09-05T06:11:35 | 2019-08-16T09:10:20 | Python | UTF-8 | Python | false | false | 6,748 | py | ib_contract_ticker_mapper.py | # Copyright 2016-present CERN – European Organization for Nuclear Research
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2... |
cb6628764b80925dc0e8f456e03109b9088d56fa | 1851e4f61c1a05580e1cc63495f476b957de1485 | /code/deep/adarnn/base/loss/__init__.py | 1de10e0b497dfd55550bf3f79124ba923f967d98 | [
"MIT"
] | permissive | jindongwang/transferlearning | 6ef36b40634a77dfaace8d9c4fe18941410c2e37 | 0b801d2d2e828ac480d1097cb3bdd82b1e25c15b | refs/heads/master | 2023-08-30T23:57:47.960290 | 2023-08-29T11:50:15 | 2023-08-29T11:50:15 | 89,846,872 | 12,773 | 3,920 | MIT | 2023-08-05T04:46:11 | 2017-04-30T11:32:21 | Python | UTF-8 | Python | false | false | 384 | py | __init__.py | from base.loss.adv_loss import adv
from base.loss.coral import CORAL
from base.loss.cos import cosine
from base.loss.kl_js import kl_div, js
from base.loss.mmd import MMD_loss
from base.loss.mutual_info import Mine
from base.loss.pair_dist import pairwise_dist
__all__ = [
'adv',
'CORAL',
'cosine',
'kl_... |
166306639867947a57c08486ec23aee506751394 | 331640994b1b6f66c1639278571ddbdc6c8c0751 | /test/unit/check/tls.py | 9cc2a5f9c721b123c49bebe65d244d71805febba | [
"Apache-2.0"
] | permissive | nginx/unit | eabcd067eaa60f4bdcf0cfaffe7d9932add2c66a | 9b22b6957bc87b3df002d0bc691fdae6a20abdac | refs/heads/master | 2023-09-04T02:02:13.581700 | 2023-08-30T16:07:24 | 2023-08-30T16:07:24 | 102,627,638 | 4,649 | 452 | Apache-2.0 | 2023-09-12T01:28:22 | 2017-09-06T15:45:30 | C | UTF-8 | Python | false | false | 242 | py | tls.py | import re
import subprocess
def check_openssl(output_version):
try:
subprocess.check_output(['which', 'openssl'])
except subprocess.CalledProcessError:
return False
return re.search('--openssl', output_version)
|
3c5d22f47278f2f9afa9844af8d87fe261062096 | f80ef3a3cf859b13e8af8433af549b6b1043bf6e | /pyobjc-core/PyObjCTest/test_varargs.py | 7db84d4dbb28eb90bd7b8b23fb68805136016e24 | [
"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,900 | py | test_varargs.py | import objc
from PyObjCTools.TestSupport import TestCase
NSObject = objc.lookUpClass("NSObject")
if 0:
class VarargsMethod(TestCase):
def testVariableArgumentCount(self):
class VarArgsClass1(NSObject):
def instanceMethod1_(self, arg1, *args):
arg1.append(ar... |
2ed6a91ad5a33ef4e286c0ddb75b3a92dae8d88a | e3bb1df7fa4c51900dec7e9ddf5295e1a80938bd | /hummingbot/connector/exchange/hitbtc/hitbtc_api_order_book_data_source.py | 764fa52fe2364b4408b78591e6f70ec5e4a0b5af | [
"Apache-2.0"
] | permissive | CoinAlpha/hummingbot | 0d1e2bd94de1280748647108c7d7800a09546eb8 | c3f101759ab7e7a2165cd23a3a3e94c90c642a9b | refs/heads/development | 2023-09-01T11:24:43.322137 | 2023-08-31T03:08:06 | 2023-08-31T03:08:06 | 439,330,952 | 135 | 98 | Apache-2.0 | 2023-08-30T13:55:08 | 2021-12-17T12:50:42 | Python | UTF-8 | Python | false | false | 11,733 | py | hitbtc_api_order_book_data_source.py | import asyncio
import logging
import time
from decimal import Decimal
from typing import Any, Dict, List, Optional
import aiohttp
import pandas as pd
from hummingbot.core.data_type.order_book import OrderBook
from hummingbot.core.data_type.order_book_message import OrderBookMessage
from hummingbot.core.data_type.orde... |
4db084de13085cc52888f77fb3e972f332590d1f | 374b3f27fe3cf032e88eccac5992c83eba0ad1b2 | /tutorials/W3D1_BayesianDecisions/solutions/W3D1_Tutorial2_Solution_a74c1904.py | 58dc3fd2e480250ec944d34dab6e2f020865c2c0 | [
"CC-BY-4.0",
"BSD-3-Clause"
] | permissive | NeuromatchAcademy/course-content | e2fdca96bcbdc78afaa209e4e77438f44a56c82d | 3d638d00f02d9fd269fa2aff7d062558afdcb126 | refs/heads/main | 2023-08-16T16:09:09.314153 | 2023-08-02T06:21:49 | 2023-08-02T06:21:49 | 262,856,980 | 2,678 | 1,079 | CC-BY-4.0 | 2023-08-17T00:32:24 | 2020-05-10T19:09:05 | Jupyter Notebook | UTF-8 | Python | false | false | 721 | py | W3D1_Tutorial2_Solution_a74c1904.py |
"""
1) No, no matter what parameters we choose for the Gaussian, the peak of the expected
utility is the same. In other words, we would choose the same action (provide the same
location estimate) for all 3 estimates.
2) Yes, the peak of expected utility is in different locations for each loss when using
a mi... |
28ac8cea912731fdc09ed918417042974759b659 | 927a94b9fd97a12c74302adc994d6b0bf3f4e27a | /codalab/apps/api/routers.py | f834e68641ea8b17da870581eaebd263cd16424c | [
"Apache-2.0"
] | permissive | codalab/codalab-competitions | 0a7f77c690ad6bca3769a272d423d958917b8256 | a3e12648ea80e23f21938103d41d70eb0917d833 | refs/heads/develop | 2023-08-30T21:39:02.989301 | 2023-08-21T16:15:34 | 2023-08-21T16:15:34 | 10,556,194 | 425 | 116 | NOASSERTION | 2023-08-26T15:23:30 | 2013-06-07T18:23:37 | Python | UTF-8 | Python | false | false | 4,106 | py | routers.py | from apps.api.views import competition_views as views
from apps.api.views import storage_views as storage_views
from apps.api.views import admin_views as admin_views
from django.conf.urls import url
from rest_framework import routers
from rest_framework.documentation import include_docs_urls
router = routers.DefaultR... |
2e53b213b0e12d933272db5791c7f64b39a70124 | d4239425234eacb647c4cc4f2f4c8537b618fca0 | /onadata/apps/restservice/tasks.py | 1aeaaa4ac61183090ee6f97d198893810feb5d11 | [
"BSD-2-Clause",
"BSD-3-Clause"
] | permissive | onaio/onadata | 58762d6a606870bd13d43fd27fdaa61720a745c2 | e5bdec91cb47179172b515bbcb91701262ff3377 | refs/heads/main | 2023-09-04T03:12:43.388668 | 2023-08-24T07:27:08 | 2023-08-24T07:27:08 | 12,888,897 | 177 | 149 | NOASSERTION | 2023-09-13T14:19:05 | 2013-09-17T07:25:01 | Python | UTF-8 | Python | false | false | 590 | py | tasks.py | # -*- coding: utf-8 -*-
"""
restservice async functions.
"""
from onadata.apps.logger.models.instance import Instance
from onadata.apps.restservice.utils import call_service
from onadata.celeryapp import app
@app.task()
def call_service_async(instance_pk):
"""Async function that calls call_service()."""
# loa... |
9b09f31bfbfd21de735fc114e7803658ff2a2dd7 | 15f0514701a78e12750f68ba09d68095172493ee | /Python3/306.py | 3c533082d24b56603df39e99a1a95da0a39bbd05 | [
"MIT"
] | permissive | strengthen/LeetCode | 5e38c8c9d3e8f27109b9124ae17ef8a4139a1518 | 3ffa6dcbeb787a6128641402081a4ff70093bb61 | refs/heads/master | 2022-12-04T21:35:17.872212 | 2022-11-30T06:23:24 | 2022-11-30T06:23:24 | 155,958,163 | 936 | 365 | MIT | 2021-11-15T04:02:45 | 2018-11-03T06:47:38 | null | UTF-8 | Python | false | false | 3,650 | py | 306.py | __________________________________________________________________________________________________
sample 24 ms submission
class Solution:
def isAdditiveNumber(self, num: str) -> bool:
if(num=="19910011992"):
return False
if(len(num)<=2):
return None
def create(check,... |
a327d54b870b6e62add833eeecbfb5c5ee84fa00 | 6e56e6b4bb562cd1db6e38b5f089b863b77e087f | /dragonfly/nn/nn_visualise.py | 2ae4438c2353130e30bfc6f34dfa627197e86041 | [
"MIT"
] | permissive | dragonfly/dragonfly | aa5f3a64bfe7800c44c32e58b487b5733c40035d | 3eef7d30bcc2e56f2221a624bd8ec7f933f81e40 | refs/heads/master | 2023-08-06T08:34:29.317771 | 2022-10-01T22:21:50 | 2022-10-01T22:21:50 | 130,418,835 | 868 | 374 | MIT | 2023-06-19T20:23:17 | 2018-04-20T22:19:50 | Python | UTF-8 | Python | false | false | 4,651 | py | nn_visualise.py | """
Harness for visualising a neural network.
-- kandasamy@cs.cmu.edu
"""
# pylint: disable=invalid-name
import functools
import os
try:
import graphviz as gv
except ImportError as ie:
err_msg = 'To use the nn_visualise module, you need to install graphviz. This can ' + \
'be installed via `pip in... |
b1a894e7fdb2f45dd2be028dd7e7fba4b4f02660 | b8441dc1987be9e64fa3081d456b2a3060ec44d1 | /mars/lib/filesystem/local.py | 59bd09dcf6efbe72c558e6b006134547bc5b6d1a | [
"BSD-3-Clause",
"MIT",
"ISC",
"Apache-2.0",
"CC0-1.0",
"BSD-2-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | mars-project/mars | f99fefbce999d58a9249bc72046787a9731c9c73 | c36c53fa22e10ef9477d9c454401a2f281375f31 | refs/heads/master | 2023-07-23T00:23:55.133015 | 2023-07-03T11:44:54 | 2023-07-03T11:44:54 | 160,543,708 | 2,704 | 362 | Apache-2.0 | 2023-09-11T07:57:35 | 2018-12-05T16:04:03 | Python | UTF-8 | Python | false | false | 3,588 | py | local.py | # Copyright 1999-2021 Alibaba Group Holding 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 a... |
0cc043a3cf88f6801bbfeddc8353895067518a20 | b6a0ea1a9d00f2bd6b7853d5f3e6864b1bec2e89 | /dataset_preprocessing/preprocess_Multicam_videos.py | ba41517dae11a8289c6f8ee850749dbb9ad08989 | [
"MIT"
] | permissive | AdrianNunez/Fall-Detection-with-CNNs-and-Optical-Flow | 1958a29986027c1b8f8df361fe16805988ae6512 | da4723315185f87e3a50552e148afddc85cbad1f | refs/heads/master | 2023-02-24T14:48:27.410774 | 2022-05-24T17:10:37 | 2022-05-24T17:10:37 | 96,987,041 | 216 | 74 | MIT | 2023-02-15T18:33:10 | 2017-07-12T09:00:16 | Python | UTF-8 | Python | false | false | 4,571 | py | preprocess_Multicam_videos.py | import os
import cv2
import sys
import json
import glob
import shutil
import codecs
import zipfile
# Path where the videos are stored (in zip format, as in a fresh download)
data_folder = '/home/user/Downloads/'
dst_folder = '' # folder where the dataset is going to be unzipped
output_base_path = 'Multicam_images/'
fa... |
ec135d10ceda8a30e7351b26acbf6a5ac7e16998 | f305f84ea6f721c2391300f0a60e21d2ce14f2a5 | /19_数学/众数/169.多数元素-摩尔投票.py | 24ed1a8b9c95e1b8d0125a96f414e15e74ab4a12 | [] | no_license | 981377660LMT/algorithm-study | f2ada3e6959338ae1bc21934a84f7314a8ecff82 | 7e79e26bb8f641868561b186e34c1127ed63c9e0 | refs/heads/master | 2023-09-01T18:26:16.525579 | 2023-09-01T12:21:58 | 2023-09-01T12:21:58 | 385,861,235 | 225 | 24 | null | null | null | null | UTF-8 | Python | false | false | 668 | py | 169.多数元素-摩尔投票.py | # 返回其中的多数元素。多数元素是指在数组中出现次数 大于 ⌊ n/2 ⌋ 的元素。
# 你可以假设数组是非空的,并且给定的数组总是存在多数元素。
from typing import List, Optional
def majorityElement(nums: List[int]) -> Optional[int]:
"""摩尔投票算法求数组中的绝对众数 (出现次数严格大于 n//2 )"""
res, count = None, 0
for num in nums:
if num == res:
count += 1
e... |
91af5efb2f08fd2932f4e18dfc2dda4fef709e50 | 07df6279388a17192eb4e4e417383a1f56208839 | /configs/h3dnet/h3dnet_3x8_scannet-3d-18class.py | e6534a4be6d948416fda1becb9cb03e3d9cdf038 | [
"Apache-2.0"
] | permissive | HuangJunJie2017/BEVDet | 11d4ca45286739c9bd099f715cb0edc9408a914f | f71858d02eb0fbd09860150ade67558d7984b1be | refs/heads/dev2.1 | 2023-05-23T15:35:45.216750 | 2023-05-07T16:35:04 | 2023-05-07T16:35:04 | 432,979,408 | 985 | 192 | Apache-2.0 | 2023-04-28T15:06:51 | 2021-11-29T09:28:12 | Python | UTF-8 | Python | false | false | 2,983 | py | h3dnet_3x8_scannet-3d-18class.py | _base_ = [
'../_base_/datasets/scannet-3d-18class.py', '../_base_/models/h3dnet.py',
'../_base_/schedules/schedule_3x.py', '../_base_/default_runtime.py'
]
# model settings
model = dict(
rpn_head=dict(
num_classes=18,
bbox_coder=dict(
type='PartialBinBasedBBoxCoder',
... |
05c95f12c39d664454e1f55452a0f2a381ce1707 | b52f09af1ca0445a0b84ad40e86d7bad9629d241 | /scrapyd/launcher.py | ec3329498373e166da745b7464e221f62afb97a0 | [
"BSD-3-Clause"
] | permissive | scrapy/scrapyd | 7650f0147eb6da57c37610fdea9b622036952e08 | 67a0d2124169e5fd83ecd4224ed8782d4e4f152d | refs/heads/master | 2023-08-19T08:21:06.060726 | 2023-08-07T16:32:29 | 2023-08-07T16:32:29 | 7,964,360 | 2,766 | 678 | BSD-3-Clause | 2023-08-07T16:32:49 | 2013-02-01T19:06:43 | Python | UTF-8 | Python | false | false | 3,653 | py | launcher.py | import sys
from datetime import datetime
from multiprocessing import cpu_count
from twisted.application.service import Service
from twisted.internet import defer, error, protocol, reactor
from twisted.python import log
from scrapyd import __version__
from scrapyd.interfaces import IEnvironment, IJobStorage, IPoller
f... |
55b8e9b5712fea0f909be025bf9a49ddb47b88ec | 017b1261bac4a6ed7e613474f328239188366491 | /tests/jsonutils/test_resolver.py | 85640a8105c18ab9354c20fad612cf09214ef1a0 | [
"Apache-2.0"
] | permissive | aws-cloudformation/cloudformation-cli | bd4834bfe8b39c9fc926f9c77710b2c6d1b167c1 | 75bed278bcec94739e4c132e2b3d88a4fddb5bf4 | refs/heads/master | 2023-08-07T18:24:56.153849 | 2023-07-31T22:54:23 | 2023-07-31T22:54:23 | 143,929,054 | 270 | 164 | Apache-2.0 | 2023-08-31T16:06:04 | 2018-08-07T21:33:19 | Python | UTF-8 | Python | false | false | 7,747 | py | test_resolver.py | # pylint: disable=protected-access,redefined-outer-name
import pytest
from rpdk.core.exceptions import ModelResolverError
from rpdk.core.jsonutils.resolver import (
FORMAT_DEFAULT,
UNDEFINED,
ContainerType,
ModelResolver,
ResolvedType,
resolve_models,
)
def test_resolve_models():
# want t... |
5d27033a164228c862d20b3ab6f20ac73fd1fee2 | b347bc4b850dee4a8a9a171b563a3f31230ce1c7 | /sktime/datasets/data/dataset_lists.py | da07d14006c1fc919eb1e898d51ea01eb190e6f0 | [
"BSD-3-Clause"
] | permissive | sktime/sktime | 5963962df338c5931a2f9f1794d1203c50ddc27e | 70b2bfaaa597eb31bc3a1032366dcc0e1f4c8a9f | refs/heads/main | 2023-08-22T18:20:08.022950 | 2023-08-22T15:24:39 | 2023-08-22T15:24:39 | 156,401,841 | 1,117 | 268 | BSD-3-Clause | 2023-09-14T20:44:21 | 2018-11-06T15:08:24 | Python | UTF-8 | Python | false | false | 181 | py | dataset_lists.py | """Lists of datasets provided in this directory."""
classification_data = [
"ACSF1",
"ArrowHead",
"BasicMotions",
"ItalyPowerDemand",
"OSULeaf",
"PLAID",
]
|
5949a805ed49967a80c8a1f8ce0c6baa38aaad4f | ff7afe98eaaf7b5b0b7d77ea37dacb0e355fc141 | /test/test_probabilistic.py | 4cf18091b1d670dcd2a3dfd67e665277ecfe5aff | [
"MIT"
] | permissive | jameschapman19/cca_zoo | d433c14037ec22ce464531a2a523899d76c3a139 | 084901cf1a0d484d0d8c6a30775971569b5b8da0 | refs/heads/main | 2023-08-08T00:39:16.412081 | 2023-08-07T12:31:07 | 2023-08-07T12:31:07 | 303,801,602 | 166 | 34 | MIT | 2023-09-14T11:34:24 | 2020-10-13T18:58:42 | Python | UTF-8 | Python | false | false | 941 | py | test_probabilistic.py | import numpy as np
import pytest
from cca_zoo.data.simulated import LinearSimulatedData
from cca_zoo.linear import CCA
def test_PCCA():
# some might not have access to jax/numpyro so leave this as an optional test locally.
numpyro = pytest.importorskip("numpyro")
from cca_zoo.probabilistic import Probabi... |
98b2e6e088792e5ac984c4a06860bf65e698dfb6 | 8c794e3e2e7f14edb39444c1d534406cec480f7c | /cv_bridge/test/python_bindings.py | a92972ee91f93a91393f8b73dff41bca5a2aac03 | [
"BSD-3-Clause",
"Apache-2.0"
] | permissive | ros-perception/vision_opencv | 74f6372e702c539f444d096a5a1490cc02ce2263 | 0b017fe32b9ac73631bbd74a9edf75394df191c0 | refs/heads/rolling | 2023-08-20T07:48:31.485000 | 2023-07-20T23:35:31 | 2023-07-20T23:35:31 | 5,579,081 | 500 | 577 | Apache-2.0 | 2023-09-06T07:32:24 | 2012-08-28T00:47:46 | C++ | UTF-8 | Python | false | false | 1,179 | py | python_bindings.py | import cv_bridge
import numpy as np
def test_cvtColorForDisplay():
# convert label image to display
label = np.zeros((480, 640), dtype=np.int32)
height, width = label.shape[:2]
label_value = 0
grid_num_y, grid_num_x = 3, 4
for grid_row in range(grid_num_y):
grid_size_y = height // grid... |
27165acf3ff65547a7eb038d07ae79cc8f817bad | 05643b9b4d20db912c3dbfbc191cadea3143016c | /instrumentation/opentelemetry-instrumentation-grpc/src/opentelemetry/instrumentation/grpc/_utilities.py | b6ff7d311a435c3d7c7deb083240826630c51191 | [
"Apache-2.0"
] | permissive | open-telemetry/opentelemetry-python-contrib | 35566cd088aa0b23ca977109fcd435ee480784b9 | 0871dd455c0adfa125a2f258a0b55c47a5da5227 | refs/heads/main | 2023-08-26T07:30:40.212226 | 2023-08-21T16:42:12 | 2023-08-21T16:42:12 | 220,524,743 | 476 | 401 | Apache-2.0 | 2023-09-14T21:36:33 | 2019-11-08T18:23:43 | Python | UTF-8 | Python | false | false | 997 | py | _utilities.py | # Copyright The OpenTelemetry 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 ... |
07880d7a4628ebeb9fc0720fb59473e4952688d7 | 4cf75f821c10c3a0fd78ac46d94862a192f3bf9a | /binding/python/tests/test_rbdyn_parsers.py | 2225d0e265d6db6a9f9e55bd7c03fd3e75f4eed0 | [
"BSD-3-Clause",
"BSD-2-Clause"
] | permissive | jrl-umi3218/RBDyn | b6adf3ce3861c9dd9eb91ddedbdc814d7e263519 | 22c5dde7b48b0037e106e7901b0611ccd506ae5e | refs/heads/master | 2023-08-07T23:21:21.452812 | 2023-07-25T21:04:05 | 2023-08-01T06:27:31 | 3,740,096 | 116 | 45 | BSD-2-Clause | 2023-09-12T05:25:14 | 2012-03-16T15:22:12 | C++ | UTF-8 | Python | false | false | 5,934 | py | test_rbdyn_parsers.py | # -*- coding: utf-8 -*-
#
# Copyright 2012-2019 CNRS-UM LIRMM, CNRS-AIST JRL
#
import unittest
import rbdyn
urdf_model = """<robot name="XYZSarm">
<link name="b0">
<inertial>
<origin rpy="0 0 0" xyz="0 0 0" />
<mass value="1" />
<inertia ixx="0.1" ixy="0.0" ixz="0.0"
iyy="0.05" ... |
bc9fc2d2f1ffaeaf4a4264caec866508566839cc | b8d80a23cb27af08a1c4d34b478c76228ae5fbb4 | /insights/parsers/sysconfig.py | 6475ac704f30b2146b02ea4ca6ec94a291625dac | [
"Apache-2.0"
] | permissive | RedHatInsights/insights-core | bb243e2bf8a52446fefb95ebe05478d6e35efe2e | b0ea07fc3f4dd8801b505fe70e9b36e628152c4a | refs/heads/master | 2023-09-04T21:15:40.456257 | 2023-09-04T10:46:56 | 2023-09-04T10:46:56 | 92,518,221 | 144 | 290 | Apache-2.0 | 2023-09-14T02:40:13 | 2017-05-26T14:23:11 | Python | UTF-8 | Python | false | false | 21,807 | py | sysconfig.py | """
Sysconfig - files in ``/etc/sysconfig/``
========================================
This is a collection of parsers that all deal with the system's configuration
files under the ``/etc/sysconfig/`` folder. Parsers included in this module
are:
CorosyncSysconfig - file ``/etc/sysconfig/corosync``
-------------------... |
5e3b8bb9b0116eaaa18c037837334f30884b7faa | e2ed3d5cf080cd5b8b6f4dd05470b290aed165c3 | /experimental_code/py-vox-io/setup.py | ed18c3936b827f785a11f7258644af601a7614ae | [] | no_license | IJDykeman/wangTiles | 641c128d5c494b475bc1ed1a0717db5d90810bb9 | 7c1ee2095ebdf7f72bce07d94c6484915d5cae8b | refs/heads/master | 2022-01-20T07:27:26.895920 | 2022-01-10T16:37:02 | 2022-01-10T16:37:02 | 26,565,467 | 157 | 22 | null | 2022-01-10T16:37:03 | 2014-11-13T01:57:09 | Python | UTF-8 | Python | false | false | 910 | py | setup.py | import io, os.path, re
from setuptools import setup, find_packages
def read(*names, **kwargs):
with io.open(
os.path.join(os.path.dirname(__file__), *names),
encoding=kwargs.get("encoding", "utf8")
) as fp:
return fp.read()
def find_version(*file_paths):
version_file = read(*file... |
b2919be0755188468cbbba9c6fb3c377868689a6 | 39568e19301a7a112398be542154950af25591de | /util/reggen/version.py | d1c808a917f169f7dfe728da12d22fc29ca249b6 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | lowRISC/opentitan | 493995bc7cf7cb3aee486a5203af3fd62bba3bfc | 51f6017b8425b14d5a4aa9abace8fe5a25ef08c8 | refs/heads/master | 2023-08-31T22:05:09.425796 | 2023-08-14T14:52:15 | 2023-08-31T20:31:13 | 204,516,692 | 2,077 | 634 | Apache-2.0 | 2023-09-14T21:16:21 | 2019-08-26T16:30:16 | SystemVerilog | UTF-8 | Python | false | false | 834 | py | version.py | # Copyright lowRISC contributors.
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0
r"""Standard version printing
"""
import os
import subprocess
import sys
from typing import List
import pkg_resources # part of setuptools
def show_and_exit(clitool: str... |
aa640fa1ff41e8314cba0122f921620afa0656bc | 1bb42bac177fb4e979faa441363c27cb636a43aa | /multi_epoch_dp_matrix_factorization/tff_aggregator_test.py | 38117f28d284ec26755ad71ff22d2de1391e563b | [
"BSD-3-Clause",
"Apache-2.0"
] | permissive | google-research/federated | a6040e80fa0fbf533e0d665c66a9bc549d208b3d | 329e60fa56b87f691303638ceb9dfa1fc5083953 | refs/heads/master | 2023-08-28T13:10:10.885505 | 2023-08-22T23:06:08 | 2023-08-22T23:06:40 | 295,559,343 | 595 | 187 | Apache-2.0 | 2022-05-12T08:42:53 | 2020-09-14T23:09:07 | Python | UTF-8 | Python | false | false | 13,719 | py | tff_aggregator_test.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... |
fc4cf209cb86e505c5084797a17b1bd4910c738f | 50e86bd4017387f772da067ff929f4db8bd3dc46 | /pyblp/results/optimal_instrument_results.py | f74634f158ab82b6dbc9b93504fa3d56d7b4df44 | [
"MIT"
] | permissive | jeffgortmaker/pyblp | 651c89eb0406de240bc827468b2fa4ed9de625e3 | 3aeae4022317043a22136528ced0d0dc536d7f08 | refs/heads/master | 2023-08-10T00:21:34.060361 | 2023-07-24T15:52:42 | 2023-07-24T15:52:42 | 130,608,439 | 213 | 86 | MIT | 2023-06-23T15:17:31 | 2018-04-22T21:17:47 | Python | UTF-8 | Python | false | false | 21,726 | py | optimal_instrument_results.py | """Economy-level structuring of optimal instrument results."""
from pathlib import Path
import pickle
from typing import Hashable, Optional, Sequence, TYPE_CHECKING, Union
import numpy as np
import patsy
from .problem_results import ProblemResults
from ..configurations.formulation import Formulation
from ..parameter... |
0e8d8c6281e18e5299849dfc15bc7284a1961f56 | bbd69601912a3361d788efd03a47f9d4e3bac09e | /demo/RawBitmapAccess.py | 59c03e85e0dea5ec8c46aa2346f0a30ce8fa5b16 | [] | no_license | wxWidgets/Phoenix | 56929484460a0399a8f1d9582bc77c20aa14748d | a1184286703cf24c4b88e5bc14cf2979c1b1ea00 | refs/heads/master | 2023-09-01T07:10:17.437093 | 2023-08-31T05:38:01 | 2023-08-31T05:38:01 | 5,078,061 | 2,268 | 677 | null | 2023-09-09T17:06:59 | 2012-07-17T06:22:25 | Python | UTF-8 | Python | false | false | 7,425 | py | RawBitmapAccess.py | #!/usr/bin/env python
import wx
# use the numpy code instead of the raw access code for comparison
USE_NUMPY = False
# time the execution of making a bitmap?
TIMEIT = False
# how big to make the bitmaps
DIM = 100
# should we use a wx.GraphicsContext for painting?
TEST_GC = False
#---------------------------------... |
f2ec031e0ea4393785322e9ac00420464f204cff | 96dcea595e7c16cec07b3f649afd65f3660a0bad | /homeassistant/components/homewizard/switch.py | cddcabc841ec2b1d345c7311fab3b5b451b52a1b | [
"Apache-2.0"
] | permissive | home-assistant/core | 3455eac2e9d925c92d30178643b1aaccf3a6484f | 80caeafcb5b6e2f9da192d0ea6dd1a5b8244b743 | refs/heads/dev | 2023-08-31T15:41:06.299469 | 2023-08-31T14:50:53 | 2023-08-31T14:50:53 | 12,888,993 | 35,501 | 20,617 | Apache-2.0 | 2023-09-14T21:50:15 | 2013-09-17T07:29:48 | Python | UTF-8 | Python | false | false | 4,933 | py | switch.py | """Creates HomeWizard Energy switch entities."""
from __future__ import annotations
from collections.abc import Awaitable, Callable
from dataclasses import dataclass
from typing import Any
from homewizard_energy import HomeWizardEnergy
from homeassistant.components.switch import (
SwitchDeviceClass,
SwitchEn... |
8551c6476a4ce282b58243c121d5fe92eab72803 | 99d79ada2d3b7746573f071823ec61f5f853d7a3 | /tools/xdl/xdlrcviz.py | a6a3aa81ab0024059f063b13d3f691ec3bdd0b9b | [
"MIT"
] | permissive | phanrahan/magma | d8062c6163e2c2c2cedef82317dc8cc40038220a | b05fe5303ed17e668c6ec2ec3558cd5a52eff787 | refs/heads/master | 2023-08-23T18:08:22.494869 | 2023-08-08T18:53:05 | 2023-08-17T16:16:44 | 84,332,281 | 227 | 21 | NOASSERTION | 2023-09-14T21:32:19 | 2017-03-08T14:57:09 | Python | UTF-8 | Python | false | false | 3,040 | py | xdlrcviz.py | import sexpr
import sys
import os
from pprint import pprint
from subprocess import Popen, PIPE
fname = sys.argv[1]
name = os.path.basename(fname).split('.')[0]
file = open(fname)
source = ""
for line in file.readlines():
if line[0] != "#":
source += line
sexpr.input(source)
s = sexpr.parse()
while len(s) == 1:
... |
2704e39dfe32c827d43d241ee1f47f5974da0ac3 | 5e66707ccdea0c000e6e269fce6907ee3cfcdbde | /galaxy/main/migrations/0137_collectionimport_imported_version.py | 3dba10a073887d2bc47905f17d55fc8f0789d024 | [
"Apache-2.0"
] | permissive | ansible/galaxy | f629046d579d7cd4e484cdf1e27ad68fe7b170a2 | 6a374cacdf0f04de94486913bba5285e24e178d3 | refs/heads/devel | 2023-09-04T09:21:43.542346 | 2023-08-25T16:58:09 | 2023-08-25T16:58:09 | 24,333,272 | 972 | 419 | Apache-2.0 | 2023-08-25T17:38:20 | 2014-09-22T15:04:57 | Python | UTF-8 | Python | false | false | 530 | py | 0137_collectionimport_imported_version.py | from django.db import migrations
from django.db import models
class Migration(migrations.Migration):
dependencies = [
('main', '0136_collection_survey_preferences'),
]
operations = [
migrations.AddField(
model_name='collectionimport',
name='imported_version',
... |
90b9aeec0c30cc1a64ec386c52101621bcc36284 | ff9a29eae7234c4477a048c1bf97611ce05e67ba | /graphene_django_extras/fields.py | f5eed8ff24f797eadd22abb21f6e7ae96a7a762b | [
"MIT"
] | permissive | eamigo86/graphene-django-extras | c315a56e238da8edbdcd1a0dd603207ac27705a9 | 209ae496084562f39749c646af2c4fb094f1ebd8 | refs/heads/master | 2023-08-22T06:36:56.478466 | 2023-05-08T06:43:08 | 2023-05-08T06:43:08 | 104,230,962 | 431 | 129 | MIT | 2023-06-21T17:21:52 | 2017-09-20T15:06:04 | Python | UTF-8 | Python | false | false | 10,581 | py | fields.py | # -*- coding: utf-8 -*-
import operator
from functools import partial
from graphene import ID, Argument, Field, List
from graphene.types.structures import NonNull, Structure
from graphene_django.fields import DjangoListField as DLF
from graphene_django.filter.utils import get_filtering_args_from_filterset
from graphen... |
37aea4b6409c20cb2709e4d24071c389e2fd33d2 | a8194cf6ffd12f7551eaba53572744080a0bfef3 | /scripts/perf/nvmf/common.py | d641a2c2e68c6de9ac141eb4d1de0e5ce83d51d8 | [
"Intel",
"BSD-2-Clause",
"BSD-3-Clause"
] | permissive | spdk/spdk | 51294f67104b8c3d18f19147d63a212e9486c687 | d62a3810364cb87be352c66acf7c7f968508ca17 | refs/heads/master | 2023-08-08T16:07:41.263000 | 2023-08-02T09:06:56 | 2023-08-08T07:01:20 | 39,042,157 | 2,708 | 1,158 | NOASSERTION | 2023-08-11T09:50:50 | 2015-07-13T23:15:15 | C | UTF-8 | Python | false | false | 11,268 | py | common.py | # SPDX-License-Identifier: BSD-3-Clause
# Copyright (C) 2018 Intel Corporation.
# All rights reserved.
import os
import re
import json
import logging
from subprocess import check_output
from collections import OrderedDict
from json.decoder import JSONDecodeError
def read_json_stats(file):
with open(file, "r")... |
dba0313fa8e210a52c2c0d220fbcb2172e10bc3a | 2dfbca22d0bacf7ba2bb4d270b2d3292f5f8a43b | /amulet/api/history/data_types.py | e97ebf9dced814c3d91dacf73c5d0fbf658d842a | [] | no_license | Amulet-Team/Amulet-Core | 9715d888e2faf6c41f9414fd105aaa926aa501c2 | dafef97fe4fd1f2f713ef1e3503d6b13b20c1c1f | refs/heads/main | 2023-08-18T17:45:48.775423 | 2023-08-16T09:37:55 | 2023-08-16T09:37:55 | 130,729,079 | 117 | 26 | null | 2023-08-16T09:37:57 | 2018-04-23T17:00:04 | Python | UTF-8 | Python | false | false | 226 | py | data_types.py | from typing import Optional, Any
from .changeable import Changeable
EntryKeyType = Any # The key an entry is stored under
EntryType = Optional[
Changeable
] # None is reserved for if the entry was deleted/did not exist
|
555405feeb13e7d2c1945ca2006ad68fbfa8b654 | cde096ba977b63becc1b9066677331ef4594a797 | /csfieldguide/search/management/__init__.py | 6e07276bbbca8dfe58168df8f7596a678cfc030a | [
"CC-BY-NC-SA-4.0",
"BSD-3-Clause",
"CC0-1.0",
"ISC",
"Unlicense",
"LicenseRef-scancode-secret-labs-2011",
"WTFPL",
"Apache-2.0",
"LGPL-3.0-only",
"MIT",
"CC-BY-SA-4.0",
"LicenseRef-scancode-public-domain",
"CC-BY-NC-2.5",
"LicenseRef-scancode-other-copyleft",
"LicenseRef-scancode-unknown... | permissive | uccser/cs-field-guide | 655524b161fab0ab422679dd80720f660f2cfa98 | ea3281ec6f4d17538f6d3cf6f88d74fa54581b34 | refs/heads/develop | 2023-08-28T14:33:58.789843 | 2023-08-28T08:24:03 | 2023-08-28T08:24:03 | 34,356,619 | 364 | 97 | MIT | 2023-09-14T08:58:55 | 2015-04-21T23:00:26 | JavaScript | UTF-8 | Python | false | false | 59 | py | __init__.py | """Module for the management of the search application."""
|
bf067b5fbf3910f3914697c6ce50b619327cbd6c | 9abd182d02355ddf0b79afd4a35f7127a4a66f7a | /scripts/tracking/siamrpn/demo.py | 0cd5557317de3aad4f8eec9bf509ff038469ae9e | [
"Apache-2.0"
] | permissive | dmlc/gluon-cv | e1303086419a5733661d0fcb9095c09d4f2382ad | 567775619f3b97d47e7c360748912a4fd883ff52 | refs/heads/master | 2023-07-19T12:02:36.824294 | 2023-01-19T00:37:33 | 2023-01-19T00:37:33 | 122,896,249 | 6,064 | 1,458 | Apache-2.0 | 2023-01-19T00:37:35 | 2018-02-26T01:33:21 | Python | UTF-8 | Python | false | false | 4,725 | py | demo.py | """SiamRPN Demo script.
Code adapted from https://github.com/STVIR/pysot"""
import os
import argparse
import matplotlib.pyplot as plt
import numpy as np
import mxnet as mx
from gluoncv import model_zoo, utils
from gluoncv.model_zoo.siamrpn.siamrpn_tracker import SiamRPNTracker as build_tracker
from gluoncv.model_zoo.si... |
952ca82a995f5f82ef732f09a9eb2d67024b2e1f | 7fd6ef3a01bddf35a3a4c2a0f44a33dc129d88fb | /itables/shiny.py | 37f55ebdfa2956cc02066646420a26919ec39a5f | [
"MIT"
] | permissive | mwouts/itables | cd5848b55875ce0efd49678cf27243066f80bf06 | c3454d81a0d035daf7f14f816eba2f1b34d54fe0 | refs/heads/main | 2023-09-04T02:57:08.395731 | 2023-08-18T18:29:46 | 2023-08-18T18:40:53 | 181,572,634 | 513 | 39 | MIT | 2023-08-18T18:40:55 | 2019-04-15T22:09:44 | Jupyter Notebook | UTF-8 | Python | false | false | 590 | py | shiny.py | from .javascript import to_html_datatable
def DT(df, caption=None, tableId=None, **kwargs):
"""This is a version of 'to_html_datatable' that works in Shiny applications.
In these applications, jquery is already loaded, so we call 'to_html_datatable'
with an argument 'import_jquery=False'.
Cf. https:... |
f741ae6f73ee26442488ba72655779b0bb86e476 | 503bfe863ae9e92bf940a5e8baa57c0de44f4da6 | /src/silx/gui/plot3d/items/clipplane.py | 83a3c0e1e5cef85a83141bbd7be804d65cba1395 | [
"MIT",
"LicenseRef-scancode-public-domain-disclaimer",
"CC0-1.0",
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause",
"LicenseRef-scancode-public-domain"
] | permissive | silx-kit/silx | 58105c0ed9cd02c75543c0c67a027471ca87922b | 5e33cb69afd2a8b1cfe3183282acdd8b34c1a74f | refs/heads/main | 2023-08-24T14:33:49.732794 | 2023-07-25T07:44:02 | 2023-07-25T07:44:02 | 43,291,718 | 120 | 78 | MIT | 2023-09-14T13:07:11 | 2015-09-28T09:23:13 | Python | UTF-8 | Python | false | false | 5,000 | py | clipplane.py | # /*##########################################################################
#
# Copyright (c) 2017-2018 European Synchrotron Radiation Facility
#
# 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 Sof... |
739bfc98b096ff90e16be8a16761002e8ef50f6f | a9d9df92f8a61fa3f3649b408e8457b8fdb0b85a | /tests/test_favorites.py | 373517b4a78c0c63ceccaa1b9452545337916338 | [
"Apache-2.0"
] | permissive | airbnb/knowledge-repo | ae7e122e10e505c568511999cf55352eb74646e1 | 71fd3fd42db7866257f86f37235ca0b5d81f5378 | refs/heads/master | 2023-07-23T08:06:15.180434 | 2023-04-17T04:04:39 | 2023-04-17T04:04:39 | 65,949,398 | 5,668 | 846 | Apache-2.0 | 2023-07-20T11:16:46 | 2016-08-17T23:32:50 | Python | UTF-8 | Python | false | false | 3,652 | py | test_favorites.py | import unittest
from bs4 import BeautifulSoup
from knowledge_repo import KnowledgeRepository
from knowledge_repo.app.models import User, Vote, Post
from knowledge_repo.app.proxies import db_session
class FavoriteTest(unittest.TestCase):
def setUp(self):
self.repo = KnowledgeRepository.for_uri('tests/te... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.