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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7aeb49961bf700f815df38b88710cf0c0a3b9b47 | 578db86c51d44ebddd0dc7b1738985b3dc69eb74 | /corehq/apps/formplayer_api/migrations/0001_drop_old_tables.py | 046884ad9ef254284f1855fa85bbb6fd374f7049 | [
"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 | 505 | py | 0001_drop_old_tables.py | # Generated by Django 2.2.27 on 2022-03-08 20:09
from django.db import migrations
class Migration(migrations.Migration):
dependencies = []
operations = [
migrations.RunSQL("DROP TABLE IF EXISTS formplayer_entrysession", "SELECT 1"),
migrations.RunSQL("DROP TABLE IF EXISTS formplayer_session"... |
36ebb9fb642c608d980d316cc1f14e15ff8f2c26 | e7efae2b83216d9621bd93390959d652de779c3d | /hyperv/tests/common.py | ea63fe2d85856dbdb849b84c5428faa876268ef3 | [
"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 | 211 | py | common.py | # (C) Datadog, Inc. 2019-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
INSTANCE_REFRESH = {'refresh_counters': True}
INSTANCE_NO_REFRESH = {'refresh_counters': False}
|
9e211e81a0deb0f591552525c72968a15ff8929f | 2f1e3f24f2798507c9eb73185a955c9bfb735140 | /libreco/tfops/features.py | 8c407ce685eb9da743e5f4af86eb797fe319c417 | [
"MIT"
] | permissive | massquantity/LibRecommender | e4f55b06b2208c794a3f97f7ff89413fa9beaffa | 8d5fbe9c177f5b91c2b6f19a155a83320dd0e20c | refs/heads/master | 2023-08-31T23:48:37.634663 | 2023-08-20T11:58:15 | 2023-08-20T11:58:15 | 174,493,761 | 251 | 55 | MIT | 2023-08-20T11:58:16 | 2019-03-08T07:58:27 | Python | UTF-8 | Python | false | false | 10,644 | py | features.py | from .variables import get_variable_from_graph
from .version import tf
from ..layers import embedding_lookup, layer_normalization
def compute_sparse_feats(
data_info,
multi_sparse_combiner,
all_sparse_indices,
var_name,
var_shape,
initializer=None,
regularizer=None,
reuse_layer=None,
... |
1c9f617cc23cf6603eafdef83bd54b33dd96e524 | 5a52ccea88f90dd4f1acc2819997fce0dd5ffb7d | /alipay/aop/api/response/AlipayMarketingPassInstanceQueryResponse.py | 4031ca611899387c385c0b9b8e46b93c090fc9e5 | [
"Apache-2.0"
] | permissive | alipay/alipay-sdk-python-all | 8bd20882852ffeb70a6e929038bf88ff1d1eff1c | 1fad300587c9e7e099747305ba9077d4cd7afde9 | refs/heads/master | 2023-08-27T21:35:01.778771 | 2023-08-23T07:12:26 | 2023-08-23T07:12:26 | 133,338,689 | 247 | 70 | Apache-2.0 | 2023-04-25T04:54:02 | 2018-05-14T09:40:54 | Python | UTF-8 | Python | false | false | 2,190 | py | AlipayMarketingPassInstanceQueryResponse.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
from alipay.aop.api.domain.PassInstanceDetail import PassInstanceDetail
class AlipayMarketingPassInstanceQueryResponse(AlipayResponse):
def __init__(self):
super(AlipayMarketingPas... |
4e2b408489b685718c3473f77f9b9e6355c572bf | 96dcea595e7c16cec07b3f649afd65f3660a0bad | /tests/components/ruckus_unleashed/test_config_flow.py | c55d531b0cb7be1aa9d1c8872b1ad7322ac7bdaa | [
"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 | 5,786 | py | test_config_flow.py | """Test the Ruckus Unleashed config flow."""
from datetime import timedelta
from unittest.mock import AsyncMock, patch
from aioruckus.const import (
ERROR_CONNECT_TEMPORARY,
ERROR_CONNECT_TIMEOUT,
ERROR_LOGIN_INCORRECT,
)
from aioruckus.exceptions import AuthenticationError
from homeassistant import confi... |
13f76ad5ff938125da1af565ee3d92d0e49a64da | afbae26b958b5ef20548402a65002dcc8e55b66a | /release/stubs.min/Tekla/Structures/ModelInternal_parts/AreWeUnitTesting.py | e0f86b9b1677479a30c66b8a337b8c917e4a06bd | [
"MIT"
] | permissive | gtalarico/ironpython-stubs | d875cb8932c7644f807dc6fde9dd513d159e4f5c | c7f6a6cb197e3949e40a4880a0b2a44e72d0a940 | refs/heads/master | 2023-07-12T01:43:47.295560 | 2022-05-23T18:12:06 | 2022-05-23T18:12:06 | 95,340,553 | 235 | 88 | NOASSERTION | 2023-07-05T06:36:28 | 2017-06-25T05:30:46 | Python | UTF-8 | Python | false | false | 68 | py | AreWeUnitTesting.py | class AreWeUnitTesting(object):
# no doc
Value=False
__all__=[]
|
2638dbabd225ac59aa431a192d3a4e762e0cb789 | fdbb74a95924e2677466614f6ab6e2bb13b2a95a | /third_party/python/Lib/tkinter/dnd.py | e0971a26adde51d2abf2ace33453a890e7b740e6 | [
"Python-2.0",
"GPL-1.0-or-later",
"LicenseRef-scancode-python-cwi",
"LicenseRef-scancode-free-unknown",
"LicenseRef-scancode-other-copyleft",
"ISC"
] | permissive | jart/cosmopolitan | fb11b5658939023977060a7c6c71a74093d9cb44 | 0d748ad58e1063dd1f8560f18a0c75293b9415b7 | refs/heads/master | 2023-09-06T09:17:29.303607 | 2023-09-02T03:49:13 | 2023-09-02T03:50:18 | 272,457,606 | 11,887 | 435 | ISC | 2023-09-14T17:47:58 | 2020-06-15T14:16:13 | C | UTF-8 | Python | false | false | 11,488 | py | dnd.py | """Drag-and-drop support for Tkinter.
This is very preliminary. I currently only support dnd *within* one
application, between different windows (or within the same window).
I am trying to make this as generic as possible -- not dependent on
the use of a particular widget or icon type, etc. I also hope that
this wi... |
2baedd5e5f362ba578e02de605d3ee73008be181 | 0e4860fecfdd34a3255003cc8c8df086c14083dd | /python/source_code/source_code_of_lp3thw/ex34.py | a3b1886a648cffae03d4e3e344dbd26efde667db | [] | 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 | 634 | py | ex34.py | animals =['bear','python','peacock','kangaroo','whale','platypus']
bear= animals[0]
for i in range(0,6):#思考,这里按照“基数(cardinal number)”,是0~6共7个数,为啥只打印粗6个?
print(f"This is the {i} index of animals.")
print(animals[i])
print("--------START NOW----------")
print("The animal at 1 is: ",animals[1])
print("The 3rd ani... |
ee3112f67bf07f9b551b71b1a456525f66f54419 | eb9f655206c43c12b497c667ba56a0d358b6bc3a | /python/testData/completion/initParams.after.py | 3b8b83a7d7d0e4d9975a051b9136b3cac3afc3eb | [
"Apache-2.0"
] | 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 | 63 | py | initParams.after.py | class C:
def __init__(self, auno=True): pass
c = C(auno=)
|
5826103e4d38568124f1fc60a7e310d9831c16b9 | d5b021ce99ceb48c8d0dab315a0d0d0f4464454a | /cert_issuer/__main__.py | 0c02f205e737c9882c357cf4d7878d7250e44b62 | [
"MIT"
] | permissive | blockchain-certificates/cert-issuer | d1aad76cb8977493f7c00b643bc67833676a02cd | d8d36f5e207dee130ed2e08858b2f80ab919d992 | refs/heads/master | 2023-09-02T15:47:26.953546 | 2023-07-31T10:58:23 | 2023-07-31T10:58:23 | 50,261,635 | 389 | 233 | MIT | 2023-08-17T03:49:12 | 2016-01-23T22:28:58 | Python | UTF-8 | Python | false | false | 544 | py | __main__.py | #!/usr/bin/env python3
import os.path
import sys
PATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
if __package__ is None and not hasattr(sys, 'frozen'):
path = os.path.realpath(os.path.abspath(__file__))
sys.path.insert(0, os.path.dirname(os.path.dirname(path)))
def cert_issuer_main(args=... |
cdcf66a082a878e35ebbeb5b9d9a288edc0b3b29 | 4ff92eb1c248c9139b798e042f333f9b151f634c | /src/physt/compat/pandas.py | 30649262138c6811e3820b521022aa9cc53cdf88 | [
"MIT"
] | permissive | janpipek/physt | 9ca95b1cbc0a78ca43b38ecbf986f49a0bdb8909 | 5c1717ea411b43ccebf7591f4949e3a4fe6fc1ff | refs/heads/dev | 2023-04-09T00:12:24.350424 | 2022-11-28T13:03:30 | 2022-11-28T13:03:30 | 54,721,043 | 132 | 17 | MIT | 2023-01-30T12:10:55 | 2016-03-25T13:41:56 | Python | UTF-8 | Python | false | false | 9,681 | py | pandas.py | """Pandas integration.
- conversion between histograms and Series/DataFrames
- .physt accessor for pandas objects
"""
from __future__ import annotations
import warnings
from typing import TYPE_CHECKING, NoReturn, Optional, Tuple, cast
import numpy as np
import pandas
import pandas as pd
from pandas.api.types import ... |
46c8198a89be0d2bba6e32ad58dbf88ddcab8b2a | 96dcea595e7c16cec07b3f649afd65f3660a0bad | /homeassistant/components/recorder/history/modern.py | 68c357c0ed4375cb848cc0f8a962fd1644684271 | [
"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 | 26,326 | py | modern.py | """Provide pre-made queries on top of the recorder component."""
from __future__ import annotations
from collections.abc import Callable, Iterable, Iterator, MutableMapping
from datetime import datetime
from itertools import groupby
from operator import itemgetter
from typing import Any, cast
from sqlalchemy import (... |
e3371529cc117e0a986899395048bdf87da26e25 | a5a99f646e371b45974a6fb6ccc06b0a674818f2 | /DQMOffline/Trigger/python/B2GMonitoring_Client_cff.py | 4703dea5b665987481563051bd065cb0d8b9ac89 | [
"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 | 4,665 | py | B2GMonitoring_Client_cff.py | import FWCore.ParameterSet.Config as cms
b2gjetEfficiency = cms.EDProducer("DQMGenericClient",
subDirs = cms.untracked.vstring("HLT/B2G/*"),
verbose = cms.untracked.uint32(0), # Set to 2 for all messages
resol... |
2317569d0ebb46d38aab391a4e0674aa7d643cc1 | 5ef6c8d47864f471e26b9902d61f8c687e941f05 | /src/genie/libs/parser/iosxe/tests/ShowIpcefExactRoute/cli/equal/golden_output_expected.py | 36b928ceb5fcc3b655e151bce3b5484ec0397366 | [
"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 | 139 | py | golden_output_expected.py | expected_output = {
'source': '10.1.1.1',
'destination': '20.1.1.1',
'ip_adj': 'out of Vlan13',
'ip_addr': '172.27.0.1'
} |
5204ec1d7c2e47bf2f12332fb1a748c985ddd67a | 3dc647cd07a7361ed401e40d2b7cce8c826c8f6c | /Lib/test/test_ast.py | 1062f01c2f81567dff1c8f93704f30f313b71add | [
"Python-2.0",
"CC-BY-4.0",
"MIT"
] | permissive | RustPython/RustPython | 5ddce4a9848b9de8c041ffd2634f83c0105d3f39 | b864e5da1f18897fc884180b7093df5aa170024f | refs/heads/main | 2023-09-04T12:38:29.458699 | 2023-09-03T12:33:42 | 2023-09-03T12:33:42 | 135,201,145 | 15,815 | 1,302 | MIT | 2023-09-14T08:11:45 | 2018-05-28T19:27:01 | Rust | UTF-8 | Python | false | false | 111,447 | py | test_ast.py | import ast
import builtins
import dis
import os
import sys
import types
import unittest
import warnings
import weakref
from textwrap import dedent
from test import support
def to_tuple(t):
if t is None or isinstance(t, (str, int, complex)):
return t
elif isinstance(t, list):
return [to_tuple(e... |
385d72140937b4867c4b942410dc7bdd67a8cf41 | a5cffc68c40887b34c298f98b3c684a84bbfe96e | /pyazhpc/arm.py | 0af2411fe515dc3b03d7fbb1d90a5d51c80316f9 | [
"LicenseRef-scancode-generic-cla",
"MIT"
] | permissive | Azure/azurehpc | 54e3a852b0ef739ec598cfd751929aa0b004d5ff | f9766c25d7084bbab463182dadf9ed48e58a09ba | refs/heads/master | 2023-08-19T01:44:44.088508 | 2023-08-02T18:27:10 | 2023-08-02T18:27:10 | 196,273,513 | 112 | 71 | MIT | 2023-08-02T18:27:11 | 2019-07-10T20:52:18 | Shell | UTF-8 | Python | false | false | 51,202 | py | arm.py | import json
import sys
import uuid
import azlog
import azutil
log = azlog.getLogger(__name__)
class ArmTemplate:
def __init__(self):
self.parameters = {}
self.variables = {}
self.resources = []
self.outputs = {}
self.avsets = set()
def _add_network(self, cfg):
... |
6c01989a92ca794a161a2dd8ce091934fab4f9de | ec85250addb7357dfe7bb3e0680d53fc7b0fd8fb | /python_modules/dagster/dagster/_utils/temp_file.py | 90f7dbf762301fc595620babeee3c0f43af85083 | [
"Apache-2.0"
] | permissive | dagster-io/dagster | 6adb5deee8bcf3ea1866a6a64f2ed81e1db5e73a | fe21995e0402878437a828c6a4244025eac8c43b | refs/heads/master | 2023-09-05T20:46:08.203794 | 2023-09-05T19:54:52 | 2023-09-05T19:54:52 | 131,619,646 | 8,565 | 1,154 | Apache-2.0 | 2023-09-14T21:57:37 | 2018-04-30T16:30:04 | Python | UTF-8 | Python | false | false | 1,820 | py | temp_file.py | import itertools
import os
import shutil
import tempfile
from contextlib import contextmanager
import dagster._check as check
from dagster._core.storage.file_manager import LocalFileHandle
def _unlink_swallow_errors(path):
check.str_param(path, "path")
try:
os.unlink(path)
except Exception:
... |
5921e25677ec6a72b3a5bf465dc01c595e7f0d3a | 609c2895c89a142e91939ae3109f7353789f3de7 | /test/tests/test_revault.py | 5958ef29c9157e44f14cd2f9be0340b1bf89e497 | [
"MIT"
] | permissive | cryptoadvance/specter-diy | a668883597f9b2beaf739f4cb9dff9ec753f4914 | 58e91aef6464c63779fa31e1fef4b69126937700 | refs/heads/master | 2023-08-17T03:58:21.682752 | 2023-08-13T19:13:19 | 2023-08-13T19:13:30 | 205,435,476 | 391 | 79 | MIT | 2023-08-16T19:40:36 | 2019-08-30T18:19:49 | Python | UTF-8 | Python | false | false | 7,962 | py | test_revault.py | from unittest import TestCase
from .util import get_keystore, get_wallets_app, clear_testdir, check_sigs
from embit.psbt import PSBT
from embit.psbtview import PSBTView
from apps.wallets.wallet import Wallet, WalletError
from io import BytesIO
WALLETS = [
"cpfp_descriptor&wsh(multi(1,xpub661MyMwAqRbcG9F1VX1rYev3Zs... |
3feb41e2986004b14ffa6a5f1fb7d169e06dd535 | a66149460eda1d5343ee8e94401d91f3f2270015 | /ans/ans.py | f456cf6052e644632fdd09cb01a700cd5df8cfb5 | [
"MIT"
] | permissive | bjlkeng/sandbox | 59ae04a984f9a6a01caac78141250c9388e40574 | 3dac79472df6e895d6eb57f4fdbdaf2032ec0cf6 | refs/heads/master | 2023-09-01T03:06:34.845840 | 2023-08-18T01:11:43 | 2023-08-18T01:11:43 | 89,071,009 | 190 | 83 | MIT | 2023-08-18T01:13:22 | 2017-04-22T13:17:10 | Jupyter Notebook | UTF-8 | Python | false | false | 4,713 | py | ans.py | import numpy as np
from math import ceil, floor
from decimal import Decimal
DEBUG=False
def generate_string(size, alphabet, prob=None):
assert len(alphabet) > 0
if prob is None:
prob = [1 / len(alphabet)] * len(alphabet)
assert len(alphabet) == len(prob)
assert sum(prob) == 1
return list(... |
cdc2c50aef8986f097558e367432a8f1927a9150 | 4da761358a18508cc35ab8c6d10d304c9affc7a8 | /test_kernel_name.py | c65015e0971a5722f19b950d32e1e943360d0bf2 | [
"BSD-3-Clause"
] | permissive | jupyter-widgets/tutorial | c19dc1405676e3b44c1f1a4b48bad115d1da8330 | c85413821b3d15eb278d514604f5e699dd5b4993 | refs/heads/main | 2023-08-21T00:44:01.968636 | 2022-07-12T15:21:35 | 2022-07-12T15:21:35 | 101,101,870 | 392 | 171 | BSD-3-Clause | 2022-07-12T16:03:14 | 2017-08-22T19:54:26 | Jupyter Notebook | UTF-8 | Python | false | false | 387 | py | test_kernel_name.py | from pathlib import Path
from tools.kernel_names import get_kernel_name
TUTORIAL_KERNEL_NAME = 'widget-tutorial'
NOTEBOOK_DIRECTORY = Path(__file__) / '..' / 'notebooks'
def test_kernel_name():
notebooks = NOTEBOOK_DIRECTORY.glob('**/*.ipynb')
for notebook in notebooks:
kernel_name = get_kernel_name... |
bebf26db5649817c9838ecaec116192c08813eb8 | cb43c98e13ad13d21cf977fe19181f80c87a6e28 | /audiofield/fields.py | fa2858382d32a985690e2304464d0165ce7d4ed7 | [
"MIT"
] | permissive | areski/django-audiofield | 1003afe0d0ecf5bbbe8c041aff5af6ab951c3a08 | 80334c95a3444c133a4452df990eba20ab0f4789 | refs/heads/develop | 2023-02-25T02:08:54.617215 | 2023-02-20T08:03:23 | 2023-02-20T08:03:23 | 2,941,495 | 149 | 58 | NOASSERTION | 2023-02-20T08:03:24 | 2011-12-08T16:53:48 | JavaScript | UTF-8 | Python | false | false | 12,291 | py | fields.py | #
# django-audiofield License
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
#
# Copyright (C) 2011-2014 Star2Billing S.L.
#
# The Initial Developer of the Original C... |
0dad0d2585191a17332cec484c3a0fa2cdc24bf9 | aa2ae30a88361b4b80ffa28c4d8a54600bbee542 | /Chapter17/lib/common.py | 2135d9a6ed293ec2f4bbd4b38be17ae326296537 | [
"MIT"
] | permissive | PacktPublishing/Deep-Reinforcement-Learning-Hands-On-Second-Edition | 6728fadb38076f6243da3d98b1cf18faf6b287af | d5a421d63c6d3ebbdfa54537fa5ce485bc2b9220 | refs/heads/master | 2023-07-05T23:08:32.621622 | 2022-01-17T12:18:54 | 2022-01-17T12:18:54 | 195,020,985 | 963 | 491 | MIT | 2023-03-25T01:00:07 | 2019-07-03T09:21:47 | Jupyter Notebook | UTF-8 | Python | false | false | 2,051 | py | common.py | import numpy as np
import torch
from torch.autograd import Variable
import ptan
def unpack_batch_a2c(batch, net, last_val_gamma, device="cpu"):
"""
Convert batch into training tensors
:param batch:
:param net:
:return: states variable, actions tensor, reference values variable
"""
states ... |
79d1312bea50dd72ce0ebb4535608a570fa17c19 | 631fa563ce427d7851ec7a1839532fd06d94ed45 | /pymodules/elf_parser.py | 5b5fa72056f23097065d44562ba5e39346fa58b7 | [
"Apache-2.0"
] | permissive | cojocar/bin2llvm | 72d6e5821834becf8e04208673c0f52bb586711e | 56f20d39b4dd0ece862067158220aabeb0121426 | refs/heads/master | 2020-12-30T15:41:51.225129 | 2018-06-05T12:43:23 | 2018-06-05T12:43:29 | 91,162,880 | 144 | 17 | null | null | null | null | UTF-8 | Python | false | false | 5,597 | py | elf_parser.py | #
# Copyright 2017 The bin2llvm 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 w... |
6b21ecbe09fa9a6ebbf95a6d8f2f1ac699d9f8ff | d50ec43131be668368200315d1d9d307071d5385 | /keanu-python/nd4j/nd4j/__init__.py | 5813c29617761e551579fa97c7aa7d0d2082731d | [
"MIT"
] | permissive | improbable-research/keanu | 605e4dc6a2f90f095c2c1ec91fa1222ae8d04530 | 99de10a15e0d4b33d323093a5cc2dd10b31c9954 | refs/heads/develop | 2023-04-14T01:17:29.130975 | 2021-09-21T10:24:48 | 2021-09-21T10:24:48 | 128,393,918 | 155 | 47 | MIT | 2023-04-12T00:18:07 | 2018-04-06T12:48:36 | Java | UTF-8 | Python | false | false | 183 | py | __init__.py | from pkg_resources import resource_filename
from .__version__ import __version__
def get_classpath():
classpath = resource_filename(__name__, 'classpath')
return classpath
|
2b80471a8c09594f787ffae42a156219816363b3 | ea401c3e792a50364fe11f7cea0f35f99e8f4bde | /hackathon/HePing/SWCGAN/train.py | f92516cedd69722779e44dc44ac24f52adefcd0a | [
"MIT"
] | permissive | Vaa3D/vaa3d_tools | edb696aa3b9b59acaf83d6d27c6ae0a14bf75fe9 | e6974d5223ae70474efaa85e1253f5df1814fae8 | refs/heads/master | 2023-08-03T06:12:01.013752 | 2023-08-02T07:26:01 | 2023-08-02T07:26:01 | 50,527,925 | 107 | 86 | MIT | 2023-05-22T23:43:48 | 2016-01-27T18:19:17 | C++ | UTF-8 | Python | false | false | 12,365 | py | train.py | import modelDCGAN1 as models
from keras.optimizers import RMSprop, Adagrad, Adam,SGD
import numpy as np
from neuron_dataset import *
import numpy.linalg as LA
import plot
import pickle
import h5py
from datetime import datetime
def save_swc(X_locations, X_parent,path,epoch,batch):
"""
save generate swc
:para... |
6e4630e98f3266e1320c84946288386909f54792 | c6b13016ff1c07fd612e27a4cf33dc4cba4146d5 | /test/test_target.py | 781eb0cfdef3f259c65d7ce42b02f06f72d1a202 | [
"MIT"
] | permissive | m3dev/gokart | 64bd6c40197b002587d013ac9e2b61315451812a | f5a368304f9cb8db8d392f15f0f9c0ac956cd999 | refs/heads/master | 2023-08-04T09:10:53.567582 | 2023-08-02T20:38:11 | 2023-08-02T20:38:11 | 162,871,731 | 308 | 59 | MIT | 2023-08-02T20:38:13 | 2018-12-23T07:40:27 | Python | UTF-8 | Python | false | false | 8,964 | py | test_target.py | import io
import os
import shutil
import unittest
from datetime import datetime
from unittest.mock import patch
import boto3
import numpy as np
import pandas as pd
from matplotlib import pyplot
from moto import mock_s3
from gokart.file_processor import _ChunkedLargeFileReader
from gokart.target import make_model_targ... |
7bca36f256566b9578533163c9cf60e00d67ca20 | ec5d1ad8418dd62039e1dd8d6d2129ed3d7504de | /bridge/python/text_message_sender.py | 70533c5cd79b15cb47cdd49f3b79004a43a366e4 | [] | no_license | yusufyilmazfr/tasarim-desenleri-turkce-kaynak | 88feba7369fd4f2609f9dfe27d314f87a5214a7b | f666e998247d683a9f734f8c8802ab38c7da6915 | refs/heads/master | 2023-09-01T11:29:07.908507 | 2023-07-31T07:08:29 | 2023-07-31T07:08:29 | 244,465,123 | 3,298 | 448 | null | 2023-08-20T10:37:03 | 2020-03-02T20:10:59 | HTML | UTF-8 | Python | false | false | 180 | py | text_message_sender.py | from message_sender import MessageSender
class TextMessageCenter(MessageSender):
def send_message(self, message):
print("TextMessageSender: Sending text message...")
|
864cec53de526e0447e08c95ce792d522950efe3 | a5a99f646e371b45974a6fb6ccc06b0a674818f2 | /DPGAnalysis/SiStripTools/python/seedmultiplicitymonitor_newtracking_cfi.py | 1d453b1ae14a03c1a57ea850831c8eb262b6410d | [
"Apache-2.0"
] | permissive | cms-sw/cmssw | 4ecd2c1105d59c66d385551230542c6615b9ab58 | 19c178740257eb48367778593da55dcad08b7a4f | refs/heads/master | 2023-08-23T21:57:42.491143 | 2023-08-22T20:22:40 | 2023-08-22T20:22:40 | 10,969,551 | 1,006 | 3,696 | Apache-2.0 | 2023-09-14T19:14:28 | 2013-06-26T14:09:07 | C++ | UTF-8 | Python | false | false | 1,926 | py | seedmultiplicitymonitor_newtracking_cfi.py | import FWCore.ParameterSet.Config as cms
seedmultiplicitymonitor = cms.EDAnalyzer('SeedMultiplicityAnalyzer',
TTRHBuilder = cms.string('WithTrackAngle'),
seedCollections = cms.VPSet(cms.PSet(src=cms.InputTag("initialStepSeeds")),
... |
23ecc0f87e2898c0f95b46ec9c1849048f883b43 | 6946f9a3e9d57b00ea275b2303ced0dedcdba1d4 | /qf_lib/plotting/charts/candlestick_chart.py | 36672a7b0057b8523b03a8fffd41b51af8c7f0b7 | [
"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,159 | py | candlestick_chart.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... |
db3d71f87411984c6e5f9d1e27a2421a1dfc2063 | 150a7b11cb531f8bc2a045aefcf2ebe1d151efa3 | /ocs_ci/utility/gcp.py | 3c093376169a1f22326a6ae56ecee7d6390e0d3d | [
"MIT"
] | permissive | red-hat-storage/ocs-ci | c7ac414e1b86552da0439223dfa9bca39977f31a | 5e9e504957403148e413326f65c3769bf9d8eb39 | refs/heads/master | 2023-08-17T16:19:51.154403 | 2023-08-17T13:27:12 | 2023-08-17T13:27:12 | 179,558,938 | 146 | 210 | MIT | 2023-09-14T16:38:44 | 2019-04-04T19:00:02 | Python | UTF-8 | Python | false | false | 3,497 | py | gcp.py | # -*- coding: utf8 -*-
"""
Module for interactions with OCP/OCS Cluster on Google Cloud platform level.
It's using libcloud_ module as much as possible, but if that is not feasible,
we can use module from `Google Cloud python libraries`_ as well. This is not
the case so far.
.. _libcloud: https://libcloud.readthedocs... |
7de0bb5dfb3e0f3297765ae2b4a3b733cfcc969b | d5dcc40a62ddb018447cafaa2e7862c2bceed48a | /snapshottest/module.py | 6d7db10cc13e233d115375ad48a58c5975f26305 | [
"MIT"
] | permissive | syrusakbary/snapshottest | fcbc5f9e6eb0c7200980ca145d6052af8f19d728 | 770b8f14cd965d923a0183a0e531e9ec0ba20192 | refs/heads/master | 2023-08-26T02:04:47.810032 | 2023-07-21T01:38:33 | 2023-07-21T01:38:33 | 87,759,082 | 520 | 99 | MIT | 2023-07-21T01:38:34 | 2017-04-10T02:45:52 | Python | UTF-8 | Python | false | false | 8,462 | py | module.py | import codecs
import errno
import os
import imp
from collections import defaultdict
import logging
from .snapshot import Snapshot
from .formatter import Formatter
from .error import SnapshotNotFound
logger = logging.getLogger(__name__)
def _escape_quotes(text):
return text.replace("'", "\\'")
class SnapshotM... |
7a8c0f349e7a21c96578ed6842a3b41057419bd5 | 6fdb4eaf5b0e6dbd7db4bf947547541e9aebf110 | /api/tests/opentrons/protocol_engine/commands/magnetic_module/test_engage.py | 2bfea51d887ae9226ea83838fce57a0ccf2f25fc | [
"LicenseRef-scancode-warranty-disclaimer",
"Apache-2.0"
] | permissive | Opentrons/opentrons | 874321e01149184960eeaeaa31b1d21719a1ceda | 026b523c8c9e5d45910c490efb89194d72595be9 | refs/heads/edge | 2023-09-02T02:51:49.579906 | 2023-08-31T16:02:45 | 2023-08-31T16:02:45 | 38,644,841 | 326 | 174 | Apache-2.0 | 2023-09-14T21:47:20 | 2015-07-06T20:41:01 | Python | UTF-8 | Python | false | false | 1,744 | py | test_engage.py | """Test magnetic module engage commands."""
from decoy import Decoy
from opentrons.hardware_control.modules import MagDeck
from opentrons.protocol_engine.state import StateView
from opentrons.protocol_engine.state.module_substates import (
MagneticModuleId,
MagneticModuleSubState,
)
from opentrons.protocol_en... |
22a5aee938a3a4d94076969a8b409113c54bb105 | 8988a329c571cb04a5d97c691d0cd8bc4caf81d4 | /dimod/discrete/discrete_quadratic_model.py | 65f316079823bc8187f170086e1b33f530c76e68 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | dwavesystems/dimod | 85329cbee86bdf5a73de05fa25884c877ea53002 | 8433f221a1e79101e1db0d80968ab5a2f59b865d | refs/heads/main | 2023-08-29T08:37:24.565927 | 2023-08-17T17:14:58 | 2023-08-17T17:14:58 | 100,658,303 | 118 | 93 | Apache-2.0 | 2023-09-13T18:15:37 | 2017-08-18T01:02:17 | Python | UTF-8 | Python | false | false | 47,473 | py | discrete_quadratic_model.py | # Copyright 2020 D-Wave Systems 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... |
239507ec05821fb3afa1ae0e1ce1b29b2de9b8a0 | d8f7ed6a82a32e81a3660681795ee7437b2b204c | /tools/metrics/utils/backend.py | 4f05d63dbff9839b27afdbf04b758d63b9614e16 | [
"Apache-2.0",
"BSL-1.0"
] | permissive | ivafanas/sltbench | 6ec8bedb0463706598173a781cc08165554aaea3 | ec702203f406d3b1db71dac6bd39337d175cdc2c | refs/heads/master | 2023-02-13T15:54:37.804010 | 2023-01-26T17:20:03 | 2023-01-27T03:26:01 | 61,478,446 | 153 | 13 | BSL-1.0 | 2023-01-27T03:26:02 | 2016-06-19T12:12:16 | C++ | UTF-8 | Python | false | false | 1,554 | py | backend.py | import parsers
_SLTBENCH_CPPMAIN = '''
#include <sltbench/Bench.h>
SLTBENCH_MAIN();
'''
_GOOGLEBENCH_CPPMAIN = '''
#include <benchmark/benchmark.h>
BENCHMARK_MAIN();
'''
_NONIUS_CPPMAIN = '''
#define NONIUS_RUNNER
#include <nonius/nonius.h++>
#include <nonius/main.h++>
'''
SLTBENCH = 'sltbench'
GOOGLEBENCH = 'googl... |
7d8ba4c4e280f2e08c83e0524d74eccfa2e2fd71 | afbae26b958b5ef20548402a65002dcc8e55b66a | /release/stubs.min/Autodesk/Revit/DB/__init___parts/ParameterValueProvider.py | cd6ce9a51218c252a0ac2da7af40861c257bd068 | [
"MIT"
] | permissive | gtalarico/ironpython-stubs | d875cb8932c7644f807dc6fde9dd513d159e4f5c | c7f6a6cb197e3949e40a4880a0b2a44e72d0a940 | refs/heads/master | 2023-07-12T01:43:47.295560 | 2022-05-23T18:12:06 | 2022-05-23T18:12:06 | 95,340,553 | 235 | 88 | NOASSERTION | 2023-07-05T06:36:28 | 2017-06-25T05:30:46 | Python | UTF-8 | Python | false | false | 1,409 | py | ParameterValueProvider.py | class ParameterValueProvider(FilterableValueProvider,IDisposable):
"""
Gets the value of a parameter from any element passed to getStringValue,
getDoubleValue,getIntegerValue,or getElementIdValue.
ParameterValueProvider(parameter: ElementId)
"""
def Dispose(self):
""" Dispose(self: Filterable... |
e980b7a3a974569ee40bb2d0a036c084e019d29c | de033d5aba647555fa4fd4844df9b563cfc1e2f4 | /py/depgraph/infos.py | 2aa08a1efebc1f61ef012c8b8f138d574b1af041 | [
"Apache-2.0"
] | permissive | eth-sri/debin | 16fc0499901149bdc9818f268178569469f197df | 715771c1e1468eaafbb599d8bf81a19b5b2e22d2 | refs/heads/master | 2022-08-14T12:31:13.648564 | 2022-05-20T15:12:01 | 2022-05-20T15:12:01 | 160,524,006 | 392 | 64 | Apache-2.0 | 2022-06-22T05:14:48 | 2018-12-05T13:40:37 | Python | UTF-8 | Python | false | false | 2,795 | py | infos.py | from elements.givs import IntConst, StringConst, SwitchTable, Flag, Insn
from elements.givs import CodeOffset, VirtualElm
from elements.offsets import GivOffset, TempOffset, IndirectOffset
from elements.offsets import DirectOffset, StringArrayOffset
from elements.function import Function
from elements.regs import GivRe... |
b6384ad400da96a8c38b120bf59aacd0f0da2f00 | a3d6556180e74af7b555f8d47d3fea55b94bcbda | /third_party/blink/web_tests/external/wpt/webdriver/tests/classic/send_alert_text/send.py | df218c803bb0a4f558c8bc1547dc3982af01216b | [
"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 | 3,071 | py | send.py | import pytest
from webdriver.error import NoSuchAlertException
from webdriver.transport import Response
from tests.support.asserts import assert_error, assert_success
from tests.support.sync import Poll
@pytest.fixture
def page(session, inline):
session.url = inline("""
<script>window.result = window.pr... |
5ccb61d6b5a4b4bfe9d5982c1e9cef7d962a234b | 831c1e735a1b7d1bc6aa779bba88d3d3efe42565 | /setup.py | 4d1bd2ec7eac7376918bd196ce8997f5e410ab63 | [
"Apache-2.0"
] | permissive | pyGrowler/Growler | a46db1909d1877d332c103194dd1dabb1f8f3b15 | 5492466d8828115bb04c665917d6aeb4f4323f44 | refs/heads/dev | 2023-03-08T01:10:20.093556 | 2020-03-08T07:51:41 | 2020-03-08T07:51:41 | 25,556,740 | 814 | 38 | null | 2016-05-16T05:22:07 | 2014-10-22T02:11:12 | Python | UTF-8 | Python | false | false | 435 | py | setup.py | #!/usr/bin/env python3
#
# setup.py
#
from setuptools import setup
metadata = {}
with open("growler/__meta__.py") as f:
exec(f.read(), metadata)
tar_url = 'https://github.com/pyGrowler/growler/archive/v%s.tar.gz' % (metadata['version']) # noqa
# Other metadata and options can be found in setup.cfg
setup(
... |
da9f09e70571e193916c46d58b305de94c46d628 | 6181fcd4a266d963a0ee85971768c97922ca77cd | /src/garage/torch/modules/multi_headed_mlp_module.py | fcb4479744c934f0b18d6a800e020244837affa3 | [
"MIT"
] | permissive | rlworkgroup/garage | 5d215bbecb3a4e74b504988d6684a7b04df69a80 | 2d594803636e341660cab0e81343abbe9a325353 | refs/heads/master | 2023-08-21T22:58:49.338034 | 2023-01-04T06:06:27 | 2023-01-04T06:06:27 | 136,846,372 | 1,832 | 363 | MIT | 2023-09-11T11:36:40 | 2018-06-10T21:31:23 | Python | UTF-8 | Python | false | false | 6,078 | py | multi_headed_mlp_module.py | """MultiHeadedMLPModule."""
import copy
import torch
import torch.nn as nn
from garage.torch import NonLinearity
class MultiHeadedMLPModule(nn.Module):
"""MultiHeadedMLPModule Model.
A PyTorch module composed only of a multi-layer perceptron (MLP) with
multiple parallel output layers which maps real-va... |
4baf3148aae5a9c38031744b8802db602eccc4c7 | 1095cfe2e29ddf4e4c5e12d713bd12f45c9b6f7d | /src/python/gem5/components/boards/se_binary_workload.py | c62a1b67eaf031b58d82f4cd8cd2a51543ca2d3c | [
"BSD-3-Clause",
"LicenseRef-scancode-proprietary-license",
"LGPL-2.0-or-later",
"MIT"
] | permissive | gem5/gem5 | 9ec715ae036c2e08807b5919f114e1d38d189bce | 48a40cf2f5182a82de360b7efa497d82e06b1631 | refs/heads/stable | 2023-09-03T15:56:25.819189 | 2023-08-31T05:53:03 | 2023-08-31T05:53:03 | 27,425,638 | 1,185 | 1,177 | BSD-3-Clause | 2023-09-14T08:29:31 | 2014-12-02T09:46:00 | C++ | UTF-8 | Python | false | false | 11,136 | py | se_binary_workload.py | # Copyright (c) 2021 The Regents of the University of California
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met: redistributions of source code must retain the above copyright
# notice, this lis... |
5e95661a580912608f6402ef4740610f13d00eaa | fa1ad2e2ac7e376fc7cb3b3a6e1bb88eed3e80be | /dts/airbyte/airbyte-integrations/connectors/source-github/unit_tests/test_source.py | 98ac1bc7fc809cf54b50bfd7f0fe8d46bc3e7305 | [
"MIT",
"Elastic-2.0",
"Apache-2.0",
"BSD-3-Clause"
] | permissive | alldatacenter/alldata | 7bc7713c9f1d56ad6b8e59ea03206d1073b7e047 | 8d5f9a2d49ab8f9e85ccf058cb02c2fda287afc6 | refs/heads/master | 2023-08-05T07:32:25.442740 | 2023-08-03T13:17:24 | 2023-08-03T13:17:24 | 213,321,771 | 774 | 250 | Apache-2.0 | 2023-09-06T17:35:32 | 2019-10-07T07:36:18 | null | UTF-8 | Python | false | false | 5,292 | py | test_source.py | #
# Copyright (c) 2023 Airbyte, Inc., all rights reserved.
#
from unittest.mock import MagicMock
import pytest
import responses
from airbyte_cdk.models import AirbyteConnectionStatus, Status
from source_github.source import SourceGithub
def check_source(repo_line: str) -> AirbyteConnectionStatus:
source = Sourc... |
99a6a5dfbf75a315c0ca04c730cfd643ce712e71 | 568a2667a1b6ec33a0dec9ac01844ef74e11ab2b | /landlab/graph/object/at_patch.py | 0d1d537fb64eebf9ff7372fae6a25dcdc447c75c | [
"MIT"
] | permissive | landlab/landlab | 0bcc9b7b1d8c4d7f79bad687e1526b80ebc83728 | 1cd72e5832ece1aa922cd1b239e2e94ed0f11f8b | refs/heads/master | 2023-08-31T07:24:21.545523 | 2023-08-29T18:51:06 | 2023-08-29T18:51:06 | 19,599,383 | 326 | 313 | MIT | 2023-09-14T19:12:23 | 2014-05-09T04:52:50 | Python | UTF-8 | Python | false | false | 617 | py | at_patch.py | import numpy as np
from .ext.at_patch import get_nodes_at_patch as _get_nodes_at_patch
def get_nodes_at_patch(graph):
"""Set up data structure that describes node-patch connectivity.
Parameters
----------
links_at_patch: ndarray
Links that define each patch.
nodes_at_link: ndarray
... |
89c9c78bf6a22baacf12ef81073bd6b60702ada8 | ebec36c2280a1aac0624019133bffe7152f09964 | /tutorials/ner_tweets/scripts/constants.py | 463141d50a5b515a1e65d6fbc9304c61ceb016cb | [
"MIT",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | explosion/projects | 8d783d5b150f03b6a68f345f1a50b3a692ff1745 | e24a085669b4db6918ffeb2752846089d8dee57a | refs/heads/v3 | 2023-08-09T14:10:08.949067 | 2023-07-31T11:43:44 | 2023-07-31T11:43:44 | 223,165,649 | 1,171 | 492 | MIT | 2023-08-11T13:31:24 | 2019-11-21T12:08:52 | Python | UTF-8 | Python | false | false | 640 | py | constants.py | from pathlib import Path
ASSETS_PATH = Path(__file__).parent.parent / "assets"
# Source model / data for annotators
BTC_MODEL_PATH = ASSETS_PATH / "data" / "btc"
WIKIDATA_PATH = ASSETS_PATH / "wikidata_tokenised.json"
CRUNCHBASE_PATH = ASSETS_PATH / "crunchbase.json"
NAMES_PATH = ASSETS_PATH / "first_names.json"
# ... |
b8082456d9088cb7a6794dff0268efbdcfada0fb | 642ba1746fed0b722a127b8426eca987df6efc61 | /test/rxd/hybrid/test_pure_diffusion_hybrid.py | cd5bd2c02b83e29ddca7d022e74e323ed8149da5 | [
"BSD-3-Clause"
] | permissive | neuronsimulator/nrn | 23781d978fe9253b0e3543f41e27252532b35459 | b786c36d715ba0f6da1ba8bdf5d2338c939ecf51 | refs/heads/master | 2023-08-09T00:13:11.123525 | 2023-08-04T13:11:02 | 2023-08-04T13:11:02 | 71,627,569 | 313 | 171 | NOASSERTION | 2023-09-14T17:48:03 | 2016-10-22T08:47:37 | C++ | UTF-8 | Python | false | false | 2,820 | py | test_pure_diffusion_hybrid.py | import pytest
import numpy
from testutils import compare_data, tol
@pytest.fixture
def ics_diffusion_hybrid(neuron_instance):
"""A model using intracellular diffusion in a 1D and 3D sections"""
h, rxd, data, save_path = neuron_instance
dend1 = h.Section(name="dend1")
dend1.diam = 2
dend1.nseg = 1... |
414d107528ac4df1c1d369500c5207643353899a | 010279e2ba272d09e9d2c4e903722e5faba2cf7a | /contrib/python/Pygments/py3/pygments/lexers/asm.py | 0035c723f094771057a20308f2cb1d9129079e50 | [
"Apache-2.0",
"BSD-2-Clause"
] | 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 | 41,243 | py | asm.py | """
pygments.lexers.asm
~~~~~~~~~~~~~~~~~~~
Lexers for assembly languages.
:copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from pygments.lexer import RegexLexer, include, bygroups, using, words, \
DelegatingLexer, defau... |
a11aa6e3fcc48f7e195565f68cc115e8f2433178 | f27e3fdc97290b1db6d3fa7039ad59e4f8b5a760 | /tensorflow-1/comet-tensorflow-char-rnn-example.py | 30ec29b7af5bd19324a911bfe6a1a1a3cb052e77 | [] | no_license | comet-ml/comet-examples | 9c7bcea8b97986fb7987cbe0f4533f619e2a0939 | 9da5d4f296e633bb7e63b47dc2d3f7a0780c0a4e | refs/heads/master | 2023-08-19T03:32:51.864273 | 2023-08-09T09:30:34 | 2023-08-09T09:30:34 | 158,587,515 | 134 | 55 | null | 2023-09-13T16:58:41 | 2018-11-21T18:00:34 | Jupyter Notebook | UTF-8 | Python | false | false | 7,045 | py | comet-tensorflow-char-rnn-example.py | # coding: utf-8
"""
Example adapted from Vanilla Char-RNN using TensorFlow by Vinh Khuc (@knvinh) https://gist.github.com/vinhkhuc/7ec5bf797308279dc587.
Adapted from Karpathy's min-char-rnn.py
https://gist.github.com/karpathy/d4dee566867f8291f086
Requires tensorflow>=1.0
BSD License
"""
# import comet_ml at the top of... |
782a6c909d41ab83a8c31f6c1c0d62831a9ff9b6 | 49a386b7e54eb305f2332c43f592b30c9d8dad9a | /tests/test_view_models.py | b0ee86697dd46aea52b697933d67b22673bc6fc5 | [
"MIT"
] | permissive | SectorLabs/django-postgres-extra | e17b81ab7bc6187586be1caf021bc07ca8a6550f | e5503cb3f3c1b7959bd55253d3a79296f4c8f0ef | refs/heads/master | 2023-08-30T16:08:49.899832 | 2023-08-25T09:54:12 | 2023-08-25T10:26:55 | 80,707,765 | 645 | 87 | MIT | 2023-08-21T10:02:48 | 2017-02-02T08:46:26 | Python | UTF-8 | Python | false | false | 3,609 | py | test_view_models.py | import pytest
from django.core.exceptions import ImproperlyConfigured
from django.db import models
from django.test.utils import override_settings
from psqlextra.models import PostgresMaterializedViewModel, PostgresViewModel
from .fake_model import define_fake_model, define_fake_view_model
@pytest.mark.parametrize... |
a2ead41d161926b7473ecbcf948947dc55f91222 | 450916eee7580beb928ed8f387db4f0a8c1aa508 | /src/amuse/community/ph4/test_multiples2.py | 6b074ee2f22ea896a8d22ea347f4dd733f4e6bda | [
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | amusecode/amuse | 42095545893f5a86ea79c2a52ce54d3ce8eb204f | b57c1e2fda1457d5025307be105c2aa59b19b574 | refs/heads/main | 2023-08-31T04:50:48.880044 | 2023-08-30T12:00:20 | 2023-08-30T12:00:20 | 18,516,331 | 158 | 118 | Apache-2.0 | 2023-08-30T12:00:22 | 2014-04-07T12:35:07 | AMPL | UTF-8 | Python | false | false | 17,202 | py | test_multiples2.py | import collections
import getopt
import numpy
import os
import random
import sys
import unittest
from time import process_time as clock
from amuse.community.ph4.interface import ph4 as grav
from amuse.community.smalln.interface import SmallN
from amuse.community.kepler.interface import Kepler
from amuse.couple import ... |
a26b78e4101902c25b5b12a182b976dde480fda9 | d0900eecc0833e3ee315ad143780c34e22b0075f | /part2/protocols/bin_mem.py | 5d0c6cef71396ea2a808bcbbfed2e907f508b131 | [
"Apache-2.0"
] | permissive | RandyAbernethy/ThriftBook | cd52d9439aa6ca33eb7e41c9ef5a16d3e5950716 | 1f6a6fde89cb5609d781924a2fa527ebad1138ab | refs/heads/master | 2023-01-12T13:29:52.934900 | 2023-01-03T22:49:13 | 2023-01-03T22:49:13 | 18,453,393 | 112 | 46 | Apache-2.0 | 2023-01-03T23:00:38 | 2014-04-04T21:33:26 | Java | UTF-8 | Python | false | false | 428 | py | bin_mem.py | # Apache Thrift Binary Protocol in Python
from thrift.transport import TTransport
from thrift.protocol import TBinaryProtocol
trans = TTransport.TMemoryBuffer()
proto = TBinaryProtocol.TBinaryProtocol(trans)
proto.writeString("Hello Thrift Serialization")
print ("Wrote %d bytes to the TMemoryBuffer" % (trans.cstringi... |
4d48aeb1b5a293b4eeba3c6ea9eeda118b3309ca | 800cb6b7433ee7f74ee727522033060037c8432f | /aiohttp_sse/__init__.py | 1b04105299080fe472f24a9f71392a0dd65c647d | [
"Apache-2.0"
] | permissive | aio-libs/aiohttp-sse | 27983ab53184e9a2e9c88c53183d7785113119bf | eeba5dd054b4f74c7e3a582ab013ab7528969b77 | refs/heads/master | 2023-08-04T12:26:09.054730 | 2023-07-31T21:34:53 | 2023-07-31T21:34:53 | 31,738,506 | 163 | 35 | NOASSERTION | 2023-09-11T16:29:50 | 2015-03-05T21:50:47 | Python | UTF-8 | Python | false | false | 6,420 | py | __init__.py | import asyncio
import contextlib
import io
import re
from aiohttp.web import HTTPMethodNotAllowed, StreamResponse
from .helpers import _ContextManager
__version__ = "2.1.0"
__all__ = ["EventSourceResponse", "sse_response"]
class EventSourceResponse(StreamResponse):
"""This object could be used as regular aioht... |
b5e1489adb96d50ca3a1035ce4aa900f7140b31e | b4e36b2c71b41f8971b57bda977c29503aa4846d | /file_deduplication(For_urltoip).py | ee5b72ba0c425ff17fb16664b33260175a39d702 | [] | no_license | 3gstudent/Homework-of-Python | b79157eceb63f171e2a838479611bb9e5e85018a | d436661fbcb3d57021134f61e6c59f4d5a29b948 | refs/heads/master | 2023-04-09T15:55:16.360349 | 2023-03-31T03:02:43 | 2023-03-31T03:02:43 | 150,383,185 | 300 | 105 | null | 2022-11-28T02:49:10 | 2018-09-26T07:05:35 | Python | UTF-8 | Python | false | false | 501 | py | file_deduplication(For_urltoip).py | import shutil,sys
def filededuplication(path):
lines_seen = set()
outfile=open(path+"new","w")
f = open(path,"r")
for line in f:
if line.split()[1] not in lines_seen:
outfile.write(line.split()[1] + "\n")
lines_seen.add(line.split()[1])
outfile.close()
print("[*]done")
if __name__ == '__mai... |
58bd3bc305c787a3ad2c55cf3b4dc8b7ece96d68 | abb28a62de39d806d5a63f5b94305069ee5950ca | /setup.py | 9756002119cc279135c518c56c655027d6f47e9e | [
"MIT"
] | permissive | qulacs/qulacs | 0d79074b83b8cc0faa3c31135178b08771be9987 | 413bcd3d02c01e2ad85a711abad252daadd5b832 | refs/heads/main | 2023-08-16T21:25:57.217422 | 2023-07-31T01:53:48 | 2023-07-31T01:53:48 | 151,675,481 | 349 | 121 | MIT | 2023-09-14T01:53:34 | 2018-10-05T05:39:51 | C++ | UTF-8 | Python | false | false | 5,242 | py | setup.py | import os
import platform
import re
import subprocess
import sys
from setuptools import Extension, find_packages, setup
from setuptools.command.build_ext import build_ext
class CMakeExtension(Extension):
def __init__(self, name, sourcedir=""):
Extension.__init__(self, name, sources=[])
self.sourc... |
a91d2e4e48a21daed90bc15a8859667de73590ec | eb9f655206c43c12b497c667ba56a0d358b6bc3a | /python/helpers/typeshed/stdlib/asyncio/sslproto.pyi | 3bb4db69c123a28b8159fd9da0aca142a024000f | [
"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 | 6,093 | pyi | sslproto.pyi | import ssl
import sys
from collections import deque
from collections.abc import Callable
from enum import Enum
from typing import Any, ClassVar
from typing_extensions import Literal, TypeAlias
from . import constants, events, futures, protocols, transports
def _create_transport_context(server_side: bool, server_hostn... |
1f02591c715b7da7b5d9b4b41627f3013d376123 | 407d194b52fe9cf75cca9d6f3c162a565549a1ae | /AzureMonitorAgent/agent.py | e1d5f8a162e6b538c8b4113e20c28edb8ca1f016 | [
"Apache-2.0"
] | permissive | Azure/azure-linux-extensions | 808761f927045f00548aa68e38d4bec8651c0eba | 3cea1567fc4f4eb5beea9884153e92d70610394d | refs/heads/master | 2023-08-27T14:06:05.775617 | 2023-08-23T01:56:05 | 2023-08-23T01:56:05 | 19,841,123 | 300 | 314 | Apache-2.0 | 2023-09-14T04:21:26 | 2014-05-16T01:38:49 | Python | UTF-8 | Python | false | false | 94,671 | py | agent.py | #!/usr/bin/env python
#
# AzureMonitoringLinuxAgent Extension
#
# Copyright 2021 Microsoft Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/L... |
889992570e1e5c0450b1c9660e43b9d30de23662 | 2617bfec230858814b32795c6a47249c54a15cac | /tests/clpy_tests/opencl_tests/test_memory.py | 878e57491936287cdca9bc58eeed13b396393629 | [
"MIT",
"NCSA",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | fixstars/clpy | a06a1281887470d8faee3ec204b56fbef2496fab | 693485f85397cc110fa45803c36c30c24c297df0 | refs/heads/clpy | 2021-06-10T04:00:30.974447 | 2021-02-28T06:01:26 | 2021-02-28T06:01:26 | 136,439,592 | 154 | 20 | NOASSERTION | 2021-04-07T02:41:03 | 2018-06-07T07:33:04 | Python | UTF-8 | Python | false | false | 15,673 | py | test_memory.py | # -*- coding: utf-8 -*-
import unittest
import numpy
import clpy
import clpy.testing
class TestSingleDeviceMemoryPool(unittest.TestCase):
"""test class of SingleDeviceMemoryPool"""
def setUp(self):
self.pool = clpy.backend.memory.SingleDeviceMemoryPool()
def test_malloc(self):
p = sel... |
1f4cb86a176859a50cb911f001241c1acc3c335a | 2d0d2a6b2d9cf2489200cddf54f24b5ba09f0675 | /ParseIDT.py | 31a93d8850cc289ac3dbb548a9f443f5aee2a7b6 | [] | no_license | gerhart01/Hyper-V-scripts | 35287b39c488c61f42b8bce161673bbfbe711728 | 3bced0763ee6b1c3b2c628ec3f11ac4b24a65cd4 | refs/heads/master | 2023-05-05T21:03:32.055206 | 2023-04-18T15:28:43 | 2023-04-18T15:28:43 | 85,430,075 | 103 | 29 | null | null | null | null | UTF-8 | Python | false | false | 841 | py | ParseIDT.py | import idaapi
idtr_str = Eval('send_dbg_command("r idtr")')
idtr = long(idtr_str[5:-1],16)
print "idtr = 0x%x" % idtr
i = 256
for i in range(0,256):
buf = idaapi.dbg_read_memory(idtr+16*i, 16)
isr = 0
isr = isr + (ord(buf[11]) << (8*7))
isr = isr + (ord(buf[10]) << (8*6))
isr = isr + (or... |
c082926c91fedbb302e1dcec4e418b6b12926622 | ffdc77394c5b5532b243cf3c33bd584cbdc65cb7 | /tests/ut/python/graph_syntax/python_builtin_functions/test_enumerate.py | bb103140b82671f6eca1deb0abe028820be926d0 | [
"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 | 7,606 | py | test_enumerate.py | # Copyright 2020 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... |
17ca6fcf72bc9d612135d68edffc11400d867a56 | 7453911cee47edd9414ecfc66d189dc578f7e421 | /benchmarks/bench_dns_resolver.py | ad24d810a04ba27ac1f5f3b9ad508cc8f0aa5df3 | [
"Python-2.0",
"MIT"
] | permissive | gevent/gevent | f20eca1852098e47f32eb062db646acfead36e71 | 6b22af0fa8eb2efa89fce36c35808948c67352b0 | refs/heads/master | 2023-08-31T19:27:29.410236 | 2023-08-31T10:26:35 | 2023-08-31T10:26:35 | 5,801,666 | 4,981 | 866 | NOASSERTION | 2023-09-13T14:16:59 | 2012-09-13T22:03:03 | Python | UTF-8 | Python | false | false | 3,281 | py | bench_dns_resolver.py | from __future__ import absolute_import, print_function, division
# Best run with dnsmasq configured as a caching nameserver
# with no timeouts and configured to point there via
# /etc/resolv.conf and GEVENT_RESOLVER_NAMESERVERS
# Remember to use --inherit-environ to make that work!
# dnsmasq -d --cache-size=100000 --... |
00292631815f6dc4cb0569fa808eee0fc66a84e9 | 5b6ba0f288b1e2ac236af846a9bf546a63228476 | /mmtbx/conformation_dependent_library/LinkedResidues.py | 4e0496fd4c9e50e7bcb30f09d3572540e24feeb1 | [
"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 | 1,938 | py | LinkedResidues.py | from __future__ import absolute_import, division, print_function
class LinkedResidues(list):
def __init__(self,
geometry,
length=3, # CDL & other psi/phi apps
allow_poly_ca=False,
registry=None,
include_non_linked=False,
):
a... |
ea32e2470e1d0e6588d94d8920d963d3a79b036a | ec7591c3f478c43e76257aaa500d8f6a2e763d74 | /stanza/tests/server/test_client.py | 4697623591937834cf7a138699a04292c6aec3fb | [
"Apache-2.0"
] | permissive | stanfordnlp/stanza | 5cc3dbe70a96dd565639b7dae1efde6b4fa76985 | c530c9af647d521262b56b717bcc38b0cfc5f1b8 | refs/heads/main | 2023-09-01T12:01:38.980322 | 2023-03-14T16:10:05 | 2023-03-14T16:10:05 | 104,854,615 | 4,281 | 599 | NOASSERTION | 2023-09-10T00:31:36 | 2017-09-26T08:00:56 | Python | UTF-8 | Python | false | false | 12,826 | py | test_client.py | """
Tests that call a running CoreNLPClient.
"""
from http.server import BaseHTTPRequestHandler, HTTPServer
import multiprocessing
import pytest
import requests
import stanza.server as corenlp
import stanza.server.client as client
import shlex
import subprocess
import time
from stanza.models.constituency import tree_... |
0bf02ae65da9cc6ae03942e6ff4c44e5cfaaeeab | 753cd066a9bd26b6c37c8d53a86c7a9c659ec18c | /tutorials/tutorials/pytorch/basics/walkthrough_code_only.py | 5da62764b84013dd1a08bd6468680ba0d3d3157d | [
"MIT",
"CC-BY-4.0"
] | permissive | graphcore/examples | ac872015808ed2a913d4d7bf0d63202ce15ebbae | e2f834dd60e7939672c1795b4ac62e89ad0bca49 | refs/heads/master | 2023-08-05T02:08:12.341836 | 2023-07-27T11:13:10 | 2023-07-27T11:13:10 | 143,977,106 | 311 | 80 | MIT | 2023-09-11T16:42:56 | 2018-08-08T07:29:17 | Python | UTF-8 | Python | false | false | 4,876 | py | walkthrough_code_only.py | # Copyright (c) 2020 Graphcore Ltd. All rights reserved.
# THIS FILE IS AUTOGENERATED. Rerun SST after editing source file: walkthrough.py
import torch
import poptorch
import torchvision
import torch.nn as nn
import matplotlib.pyplot as plt
from tqdm import tqdm
# Set torch random seed for reproducibility
torch.manu... |
f44b089b497fb0e6dee31644ceb80ec1b0b64680 | e7aad0b1c5d8907dbb52000c482c396d1b801751 | /test/functional/test-framework/log/presentation_policy.py | 5409d084c17173883d10d47a0da9afc8b27ed15b | [
"BSD-3-Clause",
"MIT"
] | permissive | Open-CAS/open-cas-linux | c57d60f860702d7bc380c5d85cf502c0bf5e1bae | 93334b4675afee8815f8ea12bb7297e0fd2a4195 | refs/heads/master | 2023-07-12T10:32:26.921455 | 2023-07-03T12:24:47 | 2023-07-03T12:24:47 | 178,356,155 | 202 | 84 | BSD-3-Clause | 2023-07-03T12:24:49 | 2019-03-29T07:37:15 | Python | UTF-8 | Python | false | false | 464 | py | presentation_policy.py | #
# Copyright(c) 2019-2021 Intel Corporation
# SPDX-License-Identifier: BSD-3-Clause
#
class PresentationPolicy:
def __init__(self, standard_log, group_begin_func):
self.standard = standard_log
self.group_begin = group_begin_func
def std_log_entry(msg_id, msg, log_result, html_node):
pass
... |
7448e0f43c44f8bf1bc9ea37c2969944f24e9f4f | ffb0b623455f22af81a03eb52889bd1bfed50566 | /src/bandersnatch/tests/plugins/test_allowlist_name.py | ae5383fb4311c61616baca7f62310f5b7d6aa8a9 | [
"AFL-3.0"
] | permissive | pypa/bandersnatch | c5ba356caae55e4edb80005da625b04e7fb70500 | bf19ea547086c1b9dd997d1dc00081109b5cd626 | refs/heads/main | 2023-09-03T03:27:19.538217 | 2023-08-28T23:55:04 | 2023-08-28T23:55:04 | 133,377,409 | 405 | 157 | AFL-3.0 | 2023-09-13T10:46:33 | 2018-05-14T14:52:22 | Python | UTF-8 | Python | false | false | 13,808 | py | test_allowlist_name.py | import os
from collections import defaultdict
from pathlib import Path
from tempfile import TemporaryDirectory
from unittest import TestCase
import bandersnatch.filter
import bandersnatch.storage
from bandersnatch.master import Master
from bandersnatch.mirror import BandersnatchMirror
from bandersnatch.package import ... |
5ea38004cf355eea757a3da053acfe1b18062f81 | c07b338d12f694069336da69379f60d04d0084c2 | /example_project/example_project/settings.py | c251e675b23c9887a7f2efa4716ea31042636057 | [
"BSD-3-Clause"
] | permissive | richardbarran/django-photologue | 2dfc74e6d01ebd4195149fef200a82d84caacfe4 | 95c81122e35fce373914449637c08cebbfcff600 | refs/heads/master | 2023-08-12T12:25:09.321683 | 2023-07-28T18:45:54 | 2023-07-28T18:45:54 | 5,278,549 | 188 | 68 | BSD-3-Clause | 2022-08-08T20:18:21 | 2012-08-02T22:16:54 | Python | UTF-8 | Python | false | false | 4,547 | py | settings.py | # Global settings for photologue example project.
import os
import sys
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
SECRET_KEY = '=_v6sfp8u2uuhdncdz9t1_nu8(#8q4=40$f$4rorj4q3)f-nlc'
DEBUG = True
ALLOWED_HOSTS = []
INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.auth'... |
592877e28424be97195961189601cc62b6fbc755 | ef2c1a0ae0f1746e58fcc160844788ab92a8d488 | /tests/trainers/nlp/test_hf_trainer.py | 25818558b61b619588b2089615f9645a626dd270 | [
"MIT",
"LicenseRef-scancode-free-unknown",
"LGPL-2.1-or-later",
"Apache-2.0",
"LicenseRef-scancode-generic-cla"
] | permissive | microsoft/archai | 4d04476ef6a434148638ef91df0ef3bf2c948422 | 95d6e19a1523a701b3fbc249dd1a7d1e7ba44aee | refs/heads/main | 2023-09-03T13:23:48.576626 | 2023-07-27T01:30:01 | 2023-07-27T01:30:01 | 245,036,506 | 439 | 97 | MIT | 2023-05-09T21:10:10 | 2020-03-05T00:54:29 | Python | UTF-8 | Python | false | false | 2,081 | py | test_hf_trainer.py | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import os
import tempfile
import torch
from transformers import TrainerState, TrainingArguments
from archai.trainers.nlp.hf_trainer import HfTrainer
def test_hf_trainer_rotate_checkpoints():
model = torch.nn.Linear(10, 5)
args = Train... |
5e7d7edf7a7c1507bcf85994f699306536db28a7 | 902abf2c8a0ae6147975864802575b5e543ef1e4 | /src/ZODB/scripts/fsstats.py | dddd6b82fe5515c193a1f7679f23bb47f7b7bcdc | [
"ZPL-2.1"
] | permissive | zopefoundation/ZODB | b4d37dfe232a60dccf226f82276d630148fe43db | 0632974df76e90a3f00b45b995bdff0209dd2def | refs/heads/master | 2023-09-04T05:26:06.885522 | 2023-08-01T17:16:24 | 2023-08-01T17:16:24 | 7,357,595 | 629 | 104 | NOASSERTION | 2023-08-01T17:16:26 | 2012-12-28T17:47:39 | Python | UTF-8 | Python | false | false | 5,865 | py | fsstats.py | #!/usr/bin/env python2
"""Print details statistics from fsdump output."""
import re
import sys
rx_txn = re.compile(r"tid=([0-9a-f]+).*size=(\d+)")
rx_data = re.compile(r"oid=([0-9a-f]+) size=(\d+) class=(\S+)")
def sort_byhsize(seq, reverse=False):
L = [(v.size(), k, v) for k, v in seq]
L.sort()
if rev... |
cff0868de1e6f101dad30c7e276d0faf1f1f8835 | 8b5d61f17ab2e4c158270cf6dda79f9a47870df1 | /sknetwork/embedding/svd.py | d8fd7dfdad04df02ef08e20e2d16503f929eaec6 | [
"BSD-3-Clause"
] | permissive | sknetwork-team/scikit-network | 55a5ecbbbd2dfc78095aa74f3953c770357cadbb | 95cec38d56b086b95616d2f1d13a9b98c6c8b534 | refs/heads/master | 2023-09-03T21:56:42.345214 | 2023-05-22T14:12:57 | 2023-05-22T14:12:57 | 135,287,970 | 581 | 73 | NOASSERTION | 2023-07-21T05:42:25 | 2018-05-29T11:45:42 | Python | UTF-8 | Python | false | false | 14,734 | py | svd.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created in May 2018
@author: Nathan de Lara <nathan.delara@polytechnique.org>
@author: Thomas Bonald <bonald@enst.fr>
"""
from typing import Union
import numpy as np
from scipy import sparse
from sknetwork.embedding.base import BaseEmbedding
from sknetwork.linalg imp... |
460e849e39941f56e83fa224ebb3b86ab1c32d43 | f9d564f1aa83eca45872dab7fbaa26dd48210d08 | /huaweicloud-sdk-eip/huaweicloudsdkeip/v3/model/list_publicips_request.py | 808a3e353c5f17330a5b5bdd473a59e1e3d653f3 | [
"Apache-2.0"
] | permissive | huaweicloud/huaweicloud-sdk-python-v3 | cde6d849ce5b1de05ac5ebfd6153f27803837d84 | f69344c1dadb79067746ddf9bfde4bddc18d5ecf | refs/heads/master | 2023-09-01T19:29:43.013318 | 2023-08-31T08:28:59 | 2023-08-31T08:28:59 | 262,207,814 | 103 | 44 | NOASSERTION | 2023-06-22T14:50:48 | 2020-05-08T02:28:43 | Python | UTF-8 | Python | false | false | 45,962 | py | list_publicips_request.py | # coding: utf-8
import six
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
class ListPublicipsRequest:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribu... |
e6946a12eedfd9d91bbd8675a722055fc184a5f7 | 160f08e768d7271f9522ad2597ac4ee79c04477a | /src/c3nav/mesh/messages.py | 235f10f810eb496f293197818684fe23b83bcef9 | [
"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 | 5,192 | py | messages.py | from dataclasses import asdict, dataclass, field, fields, is_dataclass
from enum import IntEnum, unique
from typing import TypeVar
from c3nav.mesh.dataformats import (BoolFormat, FixedStrFormat, HexFormat, LedConfig, LedConfigFormat,
MacAddressesListFormat, MacAddressFormat, SimpleF... |
0fa1cc7acd73316c19a66a674dab13e872aa0f57 | eb9f655206c43c12b497c667ba56a0d358b6bc3a | /python/testData/refactoring/move/cleanupImportsAfterMove/before/src/use2.py | 83a79a1d21e7a5e014ebf95ac5989ab53d24026e | [
"Apache-2.0"
] | 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 | 85 | py | use2.py | from main import *
from lib import B
from lib import A, C
print(C1, C2, C3, A, B, C) |
c1f5796a5d5bdf52b0114c5e2b72dd3de59e1864 | 1d91dc7db54526508a61d78ad915192ad076ddcf | /pymzml/file_classes/bytesMzml.py | 61e8c5c14cfb186d64ded6af87ebeb8ad417b95d | [
"MIT"
] | permissive | pymzml/pymzML | 1ef331c435fa616a2f558ea0b49784a9f33880ba | 5138390bc7e4b7590243b0e9e5f2f5cbb7e26bde | refs/heads/dev | 2023-09-06T05:22:55.077586 | 2023-03-20T16:05:59 | 2023-03-20T16:05:59 | 3,152,006 | 142 | 89 | MIT | 2023-09-07T08:43:47 | 2012-01-11T07:45:43 | Python | UTF-8 | Python | false | false | 1,158 | py | bytesMzml.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Interface for binary streams of uncompressed mzML.
@author: Sylvain Le Bon
"""
from io import TextIOWrapper
from .. import regex_patterns
from .standardMzml import StandardMzml
class BytesMzml(StandardMzml):
def __init__(self, binary, encoding, build_index_from... |
97aa0c11f92b31c02e29972a25a4a5366c4ca495 | 2481cde6506743565dff2b405a2396daf208ab3e | /src/events/migrations/0032_event_standings_urls.py | 154ac7358df5a08b70476beb765856e6e4abb8b6 | [
"Apache-2.0"
] | permissive | aropan/clist | 4819a3036d179595e4df8c646aff2ed593b9dad3 | 5c805b2af71acee97f993f19d8d4e229f7f5b411 | refs/heads/master | 2023-08-31T11:15:17.987776 | 2023-08-27T21:51:14 | 2023-08-27T21:52:16 | 187,111,853 | 276 | 35 | Apache-2.0 | 2023-09-06T18:42:53 | 2019-05-16T22:57:03 | Python | UTF-8 | Python | false | false | 451 | py | 0032_event_standings_urls.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.10 on 2018-10-20 23:53
from django.db import migrations
import jsonfield.fields
class Migration(migrations.Migration):
dependencies = [
('events', '0031_event_information'),
]
operations = [
migrations.AddField(
model_name=... |
2ec3dfa79b060a4a7423f11281f8b6d94434431a | 605886d19259af074c8b8aa8637f8dc17d1be959 | /test-suite/exonum-py-tests/exonum_tests/freeze.py | 01402c8c6b2f04534cd1bf87594db214fdcbac70 | [
"Apache-2.0"
] | permissive | exonum/exonum | 6a412a37517d1352e613597f0186290e268599f7 | cf42a554b29bd1f036f39aab67ff68f7dfbadf51 | refs/heads/master | 2023-03-11T06:09:11.074153 | 2023-03-10T12:11:41 | 2023-03-10T12:11:41 | 80,729,805 | 1,334 | 332 | Apache-2.0 | 2023-05-25T16:02:20 | 2017-02-02T13:56:57 | Rust | UTF-8 | Python | false | false | 5,672 | py | freeze.py | import unittest
from exonum_client import ExonumClient
from exonum_client.crypto import KeyPair
from exonum_launcher.configuration import Configuration
from exonum_launcher.launcher import Launcher
from suite import (
assert_processes_exited_successfully,
run_4_nodes,
wait_network_to_start,
ExonumCryp... |
c382a9447b3704e994ae7ea07a6511c46b42c91d | f2d4c0eac2b12a64c499b533f3fe0883262f6293 | /examples/mandelbrot.py | b2fef571ec7d88e7e5998a6198487b7c8abe5904 | [
"MIT"
] | permissive | mozman/svgwrite | 716ef150734b42f42474fdaecc11eb646ac29bab | cd10a7ed1982de77ba85ff4556e154187d7f14bc | refs/heads/master | 2022-08-10T03:19:14.453560 | 2022-07-14T13:59:39 | 2022-07-14T13:59:39 | 79,704,670 | 512 | 109 | NOASSERTION | 2022-07-14T13:34:27 | 2017-01-22T08:29:23 | Python | UTF-8 | Python | false | false | 1,665 | py | mandelbrot.py | #!/usr/bin/env python
#coding:utf-8
# Author: mozman
# Purpose: svg examples
# Created: 08.09.2010
# Copyright (C) 2010, Manfred Moitzi
# License: MIT License
try:
import svgwrite
except ImportError:
# if svgwrite is not 'installed' append parent dir of __file__ to sys.path
import sys
fro... |
b7bb383571c9f523fedb2430a0e5aac437878401 | 360ae1188ad79e71ccc72da0b9ae709bda678f91 | /ryu/services/protocols/bgp/utils/bgp.py | 9f28802c52827b492953bf2f1d3510516238f7a0 | [
"Apache-2.0"
] | permissive | faucetsdn/ryu | 47b3523e7ccb381f3bdf2877a3f9f01cb1876054 | d6cda4f427ff8de82b94c58aa826824a106014c2 | refs/heads/master | 2023-09-05T06:37:21.991029 | 2022-06-09T23:09:40 | 2022-06-09T23:09:40 | 2,945,007 | 385 | 215 | Apache-2.0 | 2022-11-13T10:50:25 | 2011-12-09T03:43:50 | Python | UTF-8 | Python | false | false | 10,693 | py | bgp.py | # Copyright (C) 2014 Nippon Telegraph and Telephone Corporation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... |
fa99e2e07b57ab4b33fe610795bd8f2a0bd7fe7e | 7f3967e139e1ecb6c17b63d7f6ca907caea4928a | /examples/tenant_multi_types/tenant_multi_types_tutorial/urls_type2.py | 0c75d9c98675b66ae376f60493e4e64dbb27d5f1 | [
"MIT"
] | permissive | django-tenants/django-tenants | e1a274d6b74093b00f07bb1c5e6eb5c8849bc468 | bfba21005e2cbfcae5789f0b60bec49f864845a8 | refs/heads/master | 2023-08-28T13:10:46.712377 | 2023-08-14T08:15:18 | 2023-08-14T08:15:18 | 37,154,540 | 773 | 205 | MIT | 2023-09-12T11:45:41 | 2015-06-09T19:48:59 | Python | UTF-8 | Python | false | false | 236 | py | urls_type2.py | from tenant_type_two_only.views import TenantTypeTwoView
from django.urls import path
from django.contrib import admin
urlpatterns = [
path('', TenantTypeTwoView.as_view(), name="index"),
path('admin/', admin.site.urls),
]
|
cf6c5d237428b719e029c2a6540e8ff3585e44c2 | 759bcef1302721fc24819510c2f4fd38a6cf7dad | /app/base.py | 032a5ee7c5ae4d9a73276b78a6680bf224bdf868 | [
"BSD-2-Clause"
] | permissive | Crapworks/ceph-dash | 68adfd460615cec238a9adadd561ef9b58d9371d | 00d354beeb9ae92ac75d789c598621048a550a96 | refs/heads/master | 2023-08-25T07:58:53.532941 | 2023-08-11T09:33:33 | 2023-08-11T09:33:33 | 17,280,701 | 435 | 156 | BSD-2-Clause | 2023-08-11T09:33:34 | 2014-02-28T08:57:18 | JavaScript | UTF-8 | Python | false | false | 583 | py | base.py | from flask import Blueprint
from flask.views import MethodView
class ApiResource(MethodView):
endpoint = None
url_prefix = None
url_rules = {}
@classmethod
def as_blueprint(cls, name=None):
name = name or cls.endpoint
bp = Blueprint(name, cls.__module__, url_prefix=cls.url_prefix)... |
9fe9bd9b3c2654df1b41eda9308f8987a008a884 | 36437b397a855f3986325f1bfe41d7ced00b703a | /tests/persistence/test_outcomes.py | 46e1185e45d108bb5f8d21d40976a5ff878ed5a7 | [
"MIT"
] | permissive | nolar/kopf | 090cd21550e3a86e512a4c9150dfcf5f59ac14e4 | 538df59b88d1aab7b985d703483497f73c6c4783 | refs/heads/main | 2023-08-29T20:39:07.128912 | 2023-08-24T15:47:40 | 2023-08-24T15:47:40 | 288,234,242 | 1,627 | 154 | MIT | 2023-09-14T12:31:33 | 2020-08-17T16:45:35 | Python | UTF-8 | Python | false | false | 1,289 | py | test_outcomes.py | from kopf._core.actions.execution import Outcome, Result
def test_creation_for_ignored_handlers():
outcome = Outcome(final=True)
assert outcome.final
assert outcome.delay is None
assert outcome.result is None
assert outcome.exception is None
assert not outcome.subrefs
def test_creation_for_r... |
e5594f4c9487efba1d3411e84c3e818966878d4a | c544b4a171b55fb98e2a17aa3068b599301585ac | /unittests/Source.py | ea2de5d1680002082f56625ca6849799ba1a29b2 | [
"MIT"
] | permissive | plastex/plastex | 3c9dbbfd47a2cb83ef919bcfbb1b57723a8a6979 | a882a62b81e6ae7b8c9454ae2b222ef5c2c14bb1 | refs/heads/master | 2023-07-20T04:53:20.325023 | 2023-07-03T10:03:34 | 2023-07-03T10:03:34 | 17,483,722 | 129 | 41 | NOASSERTION | 2023-09-04T10:49:23 | 2014-03-06T16:10:23 | Python | UTF-8 | Python | false | false | 3,545 | py | Source.py | import unittest, re
from unittest import TestCase
from plasTeX.TeX import TeX
from plasTeX import Macro
def normalize(s):
return re.sub(r'\s+', r' ', s).strip()
class Source(TestCase):
def testXYMatrix(self):
input = r'\xymatrix{A \ar[d]^b \ar[r]^a &B\ar[d]^c\\ C \ar[r]^d &D}'
s = TeX()
... |
63b7b609cad5029432de4149f7d7ea5050b3f3f5 | 5de6854181ce3fd2544d43644b3bb9abc923969b | /custom_components/samsungtv_custom/samsungctl_080b/art_mode.py | 7009b34f87e2e0029edcceeea29895873ad32b8a | [
"Apache-2.0"
] | permissive | roberodin/ha-samsungtv-custom | 4b2b8a8f7f7a0c3da2725bb2d310029dd9595d5c | d28fa56707fdafde898eefc9afb2f9fdafdfe175 | refs/heads/master | 2023-08-03T04:17:37.238629 | 2023-07-30T00:12:32 | 2023-07-30T00:12:32 | 213,551,635 | 127 | 63 | Apache-2.0 | 2023-07-30T00:12:33 | 2019-10-08T04:53:14 | Python | UTF-8 | Python | false | false | 21,212 | py | art_mode.py | # -*- coding: utf-8 -*-
from __future__ import print_function
import threading
import logging
import json
from .utils import LogIt
from .websocket_base import AuxWebsocketBase
logger = logging.getLogger(__name__)
URL_FORMAT = "ws://{}:{}/api/v2/channels/com.samsung.art-app?name={}"
SSL_URL_FORMAT = "wss://{}:{}/api... |
9af12935b318146af2c6c39b741307612df1486d | ced3f2cdcfe770f2d018a4837c42326fb6e0d27d | /deeprobust/image/defense/LIDclassifier.py | aeebd68163bd08e4d55ef3460122e5df103ffc91 | [
"MIT",
"CC0-1.0",
"GPL-1.0-or-later"
] | permissive | DSE-MSU/DeepRobust | 308a4c03887eb1394a6d68b64ac3d7837b32f395 | d25d95b33724af9ab0385d5171c989f9b4ff2359 | refs/heads/master | 2023-08-11T00:42:08.091214 | 2023-06-29T13:24:19 | 2023-06-29T13:24:19 | 210,014,892 | 978 | 200 | MIT | 2023-09-11T02:56:14 | 2019-09-21T16:09:07 | Python | UTF-8 | Python | false | false | 4,829 | py | LIDclassifier.py | """
This is an implementation of LID detector.
Currently this implementation is under testing.
References
----------
.. [1] Ma, Xingjun, Bo Li, Yisen Wang, Sarah M. Erfani, Sudanthi Wijewickrema, Grant Schoenebeck, Dawn Song, Michael E. Houle, and James Bailey. "Characterizing adversarial subspaces using local intrins... |
71d017be7902e8c73623d617ccc83391b8aba830 | 29705cfa764b8800a4f611044bb441ae2dbb517e | /examples/multiple_looper_example.py | 9544095f6af34543ed0cd26a8903bfb39c1dab31 | [
"MIT"
] | permissive | ctpbee/ctpbee | 98c720a54999e9c4bb242848a9cd4363f96ea2e1 | 217b73da65931213c1af4733741014d05b3a8bac | refs/heads/master | 2023-03-16T12:47:01.260983 | 2023-03-13T05:49:51 | 2023-03-13T05:49:51 | 202,876,271 | 665 | 186 | MIT | 2023-09-12T12:33:29 | 2019-08-17T12:08:53 | Python | UTF-8 | Python | false | false | 5,099 | py | multiple_looper_example.py | from ctpbee.constant import Offset, TradeData, Direction
from ctpbee.indicator.indicator import ArrayManager
class DoubleMaStrategy(LooperApi):
def __init__(self, name):
super().__init__(name)
self.manager = ArrayManager(500)
self.instrument_set = ["rb2010.SHFE"]
self.fa... |
00c1f6ec6beef14e86a07d5f5244669286a1d811 | 6181fcd4a266d963a0ee85971768c97922ca77cd | /src/garage/tf/optimizers/_dtypes.py | 8f31d8666f901b854647d75f3cae6a1f178ac0da | [
"MIT"
] | permissive | rlworkgroup/garage | 5d215bbecb3a4e74b504988d6684a7b04df69a80 | 2d594803636e341660cab0e81343abbe9a325353 | refs/heads/master | 2023-08-21T22:58:49.338034 | 2023-01-04T06:06:27 | 2023-01-04T06:06:27 | 136,846,372 | 1,832 | 363 | MIT | 2023-09-11T11:36:40 | 2018-06-10T21:31:23 | Python | UTF-8 | Python | false | false | 1,776 | py | _dtypes.py | """Data types for TensorFlow optimizers."""
class LazyDict:
"""An immutable, lazily-evaluated dict.
Args:
**kwargs (dict[Callable]): Initial lazy key-value pairs.
"""
def __init__(self, **kwargs):
self._lazy_dict = kwargs
self._dict = {}
def __getitem__(self, key):
... |
0105bd37902625d7e482212ffc032d3f0f94f2f1 | 38fff7bdefd8d62a740d51329b50d0e1e49258bb | /infra/manifest.py | 256cf8dbdae97656d44e96f8febb9a45359e2f52 | [
"Apache-2.0"
] | permissive | google/oss-fuzz | 026384c2ada61ef68b147548e830f60730c5e738 | f0275421f84b8f80ee767fb9230134ac97cb687b | refs/heads/master | 2023-08-31T23:30:28.157702 | 2023-08-31T21:49:30 | 2023-08-31T21:49:30 | 63,809,205 | 9,438 | 2,315 | Apache-2.0 | 2023-09-14T20:32:19 | 2016-07-20T19:39:50 | Shell | UTF-8 | Python | false | false | 2,150 | py | manifest.py | #! /usr/bin/env python3
# Copyright 2022 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 o... |
7ea4bf4f72b05c366c0c2be1de9fd7b4dcf93d87 | 037d5d18b9b81205305e158d7d9fdad131d318cb | /tests/test_column_aliases.py | 53af4fa99d8d21fc0832642fe808bf5db3afb856 | [] | permissive | kvesteri/sqlalchemy-continuum | ee7acf2c961b27eab3dd8f61598d9159d801ee21 | a7a6bd7952185b1f82af985c0271834d886a617c | refs/heads/master | 2023-08-24T09:14:33.515416 | 2022-11-17T05:41:09 | 2023-07-24T23:37:12 | 10,312,759 | 479 | 134 | BSD-3-Clause | 2023-09-12T20:07:04 | 2013-05-27T10:30:55 | Python | UTF-8 | Python | false | false | 1,935 | py | test_column_aliases.py | from pytest import mark
import sqlalchemy as sa
from sqlalchemy_continuum import version_class
from tests import TestCase, create_test_cases
class ColumnAliasesBaseTestCase(TestCase):
def create_models(self):
class TextItem(self.Model):
__tablename__ = 'text_item'
__versioned__ = ... |
be777223a54908ad4008654c2ec7b46ef4e2066e | 479a9c76b19b84d6cde69305828031cd2531aa56 | /testing/MLDB-1933-subselect-flatten.py | 6886ac6548698366def3ef77943fbe16d7648b8b | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | mldbai/mldb | d36801bd99dd3f82d7557cd0f438b0121f63f22c | 19bc4bc92a41ee8ad4eab0979dffd9c985d95758 | refs/heads/master | 2023-09-03T22:59:11.621839 | 2022-12-30T18:42:24 | 2022-12-30T18:42:24 | 47,634,692 | 701 | 107 | Apache-2.0 | 2023-02-10T23:08:05 | 2015-12-08T16:34:16 | C++ | UTF-8 | Python | false | false | 1,141 | py | MLDB-1933-subselect-flatten.py | #
# MLDB-1933-subselect-flatten.py
# Mathieu Marquis Bolduc, 2016-09-08
# This file is part of MLDB. Copyright 2016 mldb.ai inc. All rights reserved.
#
import unittest
from mldb import mldb, MldbUnitTest, ResponseException
class ColumnExprTest(MldbUnitTest): # noqa
def test_subselect(self):
res = mldb.... |
10f7c0a73477cd46919f73464f4687a150d7779e | d54a318a22a35dcfd7593837e55b83a9aa11d47d | /server-extension/jupyterlab_examples_server/handlers.py | 2b1119524801b3218bba5a9912f9108860e77121 | [
"BSD-3-Clause"
] | permissive | jupyterlab/extension-examples | b67a696c51aea2e85a11409e7cb5b47bb76752eb | eba1de14b2ad7ef5c64faa89284f6e0112ee4491 | refs/heads/main | 2023-09-01T19:44:21.439787 | 2023-06-28T14:21:33 | 2023-06-28T14:21:33 | 214,395,915 | 351 | 157 | BSD-3-Clause | 2023-09-14T18:28:10 | 2019-10-11T09:24:23 | TypeScript | UTF-8 | Python | false | false | 1,604 | py | handlers.py | import os
import json
from jupyter_server.base.handlers import APIHandler
from jupyter_server.utils import url_path_join
import tornado
from tornado.web import StaticFileHandler
class RouteHandler(APIHandler):
# The following decorator should be present on all verb methods (head, get, post,
# patch, put, del... |
48dc4317cfa80f643a5f62e38959c1ee4aab3f89 | a4ea525e226d6c401fdb87a6e9adfdc5d07e6020 | /src/azure-cli/azure/cli/command_modules/cognitiveservices/tests/latest/test_cognitiveservices_command.py | 51fa70b981ec0661f4a9fc13a004f5e68b02c1f8 | [
"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 | 5,946 | py | test_cognitiveservices_command.py | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... |
8317d8dc77ce6935069adbe27ec52e920ba69c33 | 61004e474b7b2ad0071c16766f0f7874f04f9466 | /tools/ml-auto-eda/ml_eda/reporting/report_generator.py | a19b365fc1cd1f4040bac1bdad17b39738b60e1d | [
"Apache-2.0"
] | permissive | GoogleCloudPlatform/professional-services | eb79751efae765a8c691a745e520f44f51bd715c | 0f51121b945bd74c7f667e74e8861fceda87565c | refs/heads/main | 2023-09-05T02:57:33.328973 | 2023-08-30T14:40:30 | 2023-08-30T14:40:30 | 91,730,359 | 2,626 | 1,381 | Apache-2.0 | 2023-09-14T20:13:42 | 2017-05-18T19:29:27 | Python | UTF-8 | Python | false | false | 7,390 | py | report_generator.py | # Copyright 2019 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... |
cd0e436fa82a202c90ff17db5e230c2c8488dc51 | dd85fd91b7bab66088daaae247b04ca3385523d8 | /sarpy/consistency/sicd_consistency.py | 22c290ef1ac4b3bcf33d44af143d5e9c4ae8ca12 | [
"MIT",
"LicenseRef-scancode-free-unknown",
"LicenseRef-scancode-public-domain"
] | permissive | ngageoint/sarpy | 37a182fdae6bc40221f4d03cd81467f015e1529a | de1b1886f161a83b6c89aadc7a2c7cfc4892ef81 | refs/heads/master | 2023-08-21T11:04:01.776416 | 2023-08-07T19:24:44 | 2023-08-07T19:24:44 | 126,400,199 | 192 | 72 | MIT | 2023-08-29T20:16:46 | 2018-03-22T22:03:23 | Python | UTF-8 | Python | false | false | 15,087 | py | sicd_consistency.py | """
A module for performing a selection of validation checks on a SICD (nitf) file,
or the xml file containing the sicd structure.
Use the `check_file` function directly, or perform using the command line
>>> python -m sarpy.consistency.sicd_consistency <file_name>
For more information, about command line usage, see... |
6a48d112bbf220a68ed2b3ded6bece904fb6c1aa | 0577a46d8d28e1fd8636893bbdd2b18270bb8eb8 | /chromium/chrome/test/enterprise/e2e/connector/common/realtime_reporting_ui_test.py | f37b210209c96cf15b44f33234bb37b9bbbd646e | [
"BSD-3-Clause"
] | permissive | ric2b/Vivaldi-browser | 388a328b4cb838a4c3822357a5529642f86316a5 | 87244f4ee50062e59667bf8b9ca4d5291b6818d7 | refs/heads/master | 2022-12-21T04:44:13.804535 | 2022-12-17T16:30:35 | 2022-12-17T16:30:35 | 86,637,416 | 166 | 41 | BSD-3-Clause | 2021-03-31T18:49:30 | 2017-03-29T23:09:05 | null | UTF-8 | Python | false | false | 2,160 | py | realtime_reporting_ui_test.py | # Copyright 2021 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import time
from absl import app
from pywinauto.application import Application
from selenium import webdriver
from test_util import create_chrome_webdriver
from test_util import ... |
fb05f6b3d95328ee611441f30ec08282bdc4eab3 | b3537e704ebd1e2c7a8e9e3ed9d02fc92cbf788b | /pokemon_v2/migrations/0009_pokemontypepast.py | 2c8a43097d5f2c215d0c1b6eed5079d58f8842d7 | [
"BSD-3-Clause"
] | permissive | PokeAPI/pokeapi | 559299b292f3af19b23f4e1cad7656e60bb1bd08 | 264c86563ed29b46cf4e7757cdf2b4e748910d8a | refs/heads/master | 2023-08-08T11:51:24.707776 | 2023-08-02T08:29:14 | 2023-08-02T08:29:14 | 27,534,934 | 3,347 | 1,078 | BSD-3-Clause | 2023-09-06T02:26:58 | 2014-12-04T10:17:17 | Python | UTF-8 | Python | false | false | 1,924 | py | 0009_pokemontypepast.py | # Generated by Django 2.1.11 on 2021-02-06 22:03
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
("pokemon_v2", "0008_auto_20201123_2045"),
]
operations = [
migrations.CreateModel(
name="Pokemo... |
732597812daa19340fd30487f535b4af90d8beda | 72a637d960d3a4a51e8a3be3737b1748111627e1 | /trimesh/voxel/runlength.py | 6b911a378e83d6e749abc42c0d255c55b57f8aec | [
"MIT"
] | permissive | mikedh/trimesh | f9a2fef82a9614f9f15a5748eddbff26ef675c15 | a2f89a6917d69e76914b09c7864acea3a5193f47 | refs/heads/main | 2023-09-01T02:54:03.797482 | 2023-08-24T19:47:33 | 2023-08-24T19:47:33 | 11,745,275 | 2,512 | 601 | MIT | 2023-09-14T18:54:59 | 2013-07-29T17:25:42 | Python | UTF-8 | Python | false | false | 20,338 | py | runlength.py | """
Numpy encode/decode/utility implementations for run length encodings.
# Run Length Encoded Features
Encoding/decoding functions for run length encoded data.
We include code for two variations:
* run length encoding (RLE)
* binary run length encdoing (BRLE)
RLE stores sequences of repeated values as the value f... |
39e8ded112f32998994429c3a40a83a3c31f66db | 18078013baa3d4972f5deeb41faa7ad00cff1475 | /moses/latentgan/model.py | 69b43022827cfcbfd8686b2cadaea683753b474e | [
"MIT"
] | permissive | molecularsets/moses | 946e7457e0b95a15799e585ab59ba3bd859555e3 | dd7ed6ab38e23afd3ef5371d67939a1760bd8599 | refs/heads/master | 2023-08-11T09:38:40.574516 | 2023-06-22T15:28:31 | 2023-06-22T15:28:31 | 159,494,117 | 727 | 245 | MIT | 2023-06-22T15:28:33 | 2018-11-28T11:51:17 | Python | UTF-8 | Python | false | false | 7,385 | py | model.py | import os
import sys
import numpy as np
import torch
import torch.nn as nn
from torch.utils import data
import torch.autograd as autograd
from rdkit import Chem
class LatentGAN(nn.Module):
def __init__(self, vocabulary, config):
super(LatentGAN, self).__init__()
self.vocabulary = vocabulary
... |
99e3941beb0e7d3d091a78e83ddadad61b19fbc8 | a3d6556180e74af7b555f8d47d3fea55b94bcbda | /tools/bisect_repackage/bisect_repackage_utils.py | 97f7eb0aacee913d9a328bbe603ada2f75706323 | [
"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 | 18,783 | py | bisect_repackage_utils.py | # Copyright 2016 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Set of basic operations/utilities that are used by repacakging tool.
These functions were mostly imported from build/scripts/common/chromium_utils
and build/scripts/common/sla... |
35bd1e030808b5351a9884a38793d29980460b43 | b37bb98ec70de1b030ad1706235589e17ff1443d | /tests/test_pymannkendall.py | 62eda3af09ba1143c4c4843c6f696f7af2786d4c | [
"MIT"
] | permissive | mmhs013/pyMannKendall | cacd8ae37f9466b83216da02d184c29dd80fb44f | 1ff32de4c4f4b50e1d922763ae88b3cb677c52b0 | refs/heads/master | 2023-01-20T22:02:35.844213 | 2023-01-14T08:33:22 | 2023-01-14T08:33:22 | 174,495,388 | 200 | 54 | MIT | 2021-06-25T18:11:49 | 2019-03-08T08:09:22 | Python | UTF-8 | Python | false | false | 17,387 | py | test_pymannkendall.py | # In this unit test file, we check all functions with randomly generated No trendy, trendy, arbitrary data. Those results are compared with R package - modifiedmk, fume, rkt, trend.
import os
import pytest
import numpy as np
import pymannkendall as mk
@pytest.fixture
def NoTrendData():
# Generate 360 random value... |
2d5d14871d72e8c29b3f8792c24ba4be988bde6c | c001930958cb94f8b91b1f734108671f1db9e9f1 | /dash/development/component_generator.py | 35824ba69276bb33883ec6342d92b725fe20d33f | [
"MIT"
] | permissive | plotly/dash | 73c752135937e27975071fbd144e3fb21618e7b4 | 6eaf2e17c25f7ca1847c41aafeb18e87c586cb9f | refs/heads/dev | 2023-08-30T21:21:06.056499 | 2023-08-29T16:49:04 | 2023-08-29T16:49:04 | 33,702,544 | 20,553 | 2,355 | MIT | 2023-08-31T20:51:14 | 2015-04-10T01:53:08 | Python | UTF-8 | Python | false | false | 8,471 | py | component_generator.py | from collections import OrderedDict
import json
import sys
import subprocess
import shlex
import os
import argparse
import shutil
import functools
import pkg_resources
import yaml
from ._r_components_generation import write_class_file
from ._r_components_generation import generate_exports
from ._py_components_generat... |
5aa32809b73cdd815ddf1c0e053720beeefbcf7d | 88dda5e76cef286c7db3ae7e5d1a32d28f7815a3 | /reviewboard/reviews/tests/test_review_request_view_mixin.py | 1a06aadedc561c26877dfe0c72dd6fc2fc251cc7 | [
"MIT"
] | permissive | reviewboard/reviewboard | f4d3bada08ba9d6ef53add2d1fdb82bd6cc63a1e | c3a991f1e9d7682239a1ab0e8661cee6da01d537 | refs/heads/master | 2023-08-31T09:03:14.170335 | 2023-08-30T08:22:43 | 2023-08-30T08:22:43 | 285,304 | 1,141 | 353 | MIT | 2023-06-07T16:51:02 | 2009-08-22T21:39:49 | Python | UTF-8 | Python | false | false | 7,347 | py | test_review_request_view_mixin.py | """Unit tests for reviewboard.reviews.views.ReviewRequestViewMixin."""
from datetime import datetime
import pytz
from django.utils import timezone
from reviewboard.reviews.models import ReviewRequest
from reviewboard.reviews.models.review_request import ReviewRequestCloseInfo
from reviewboard.reviews.views import Re... |
106267b8081ffcbc793b8c0c82e2b1013c554376 | 5ef6c8d47864f471e26b9902d61f8c687e941f05 | /src/genie/libs/parser/ios/tests/ShowBgpAllNeighborsPolicy/cli/equal/golden_output_expected.py | 9d154babb51b27a996d474722245ca9fb5317375 | [
"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 | 419 | py | golden_output_expected.py | expected_output = {
"vrf": {
"VRF1": {
"neighbor": {
"10.186.0.2": {
"address_family": {
"vpnv4 unicast": {
"nbr_af_route_map_name_in": "test",
"nbr_af_route_map_name_out": "test",... |
4566e574cc0468ceabb7f34518bff5614513865b | 58cfad962e57b935e7782bb214a2008d689751d6 | /xero_python/finance/models/contact_response.py | 5b4ef8f43f2441ce7beb6b78d70db1af4d51a1fd | [
"MIT"
] | permissive | XeroAPI/xero-python | ce43c060c216a42efd5f47159987468deb0e4622 | 07efa3bfc87a3bd08ba217dd2b642f6a3515ddff | refs/heads/master | 2023-07-21T04:01:27.461727 | 2023-07-11T02:35:44 | 2023-07-11T02:35:44 | 240,158,613 | 109 | 42 | MIT | 2023-07-11T02:35:45 | 2020-02-13T02:17:05 | Python | UTF-8 | Python | false | false | 2,674 | py | contact_response.py | # coding: utf-8
"""
Xero Finance API
The Finance API is a collection of endpoints which customers can use in the course of a loan application, which may assist lenders to gain the confidence they need to provide capital. # noqa: E501
Contact: api@xero.com
Generated by: https://openapi-generator.tech... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.