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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7829f0b42b7974fab1bf92fa95c132771c2ebca9 | aeef2494b283012ed619870c4275e7d015f4017a | /sdk/python/pulumi_gcp/compute/packet_mirroring.py | d44ac168c65dfbe7bd3ea8a546f507358f885c30 | [
"BSD-3-Clause",
"MPL-2.0",
"Apache-2.0"
] | permissive | pulumi/pulumi-gcp | d4fd3f80c3df5290edaf33eb5eafe34e6699d0ff | 7deea0a50a4ee5ab7bd722a83eca01707e298f85 | refs/heads/master | 2023-08-31T07:12:45.921522 | 2023-08-31T06:16:27 | 2023-08-31T06:16:27 | 97,485,806 | 160 | 63 | Apache-2.0 | 2023-09-14T19:49:36 | 2017-07-17T14:28:37 | Java | UTF-8 | Python | false | false | 30,651 | py | packet_mirroring.py | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
fr... |
1d739936d18b876fc9d33a4acfd59df02a6d52da | bdf0d4d3aac186af3ad0ad6ac9f380f9a0573fba | /aries_cloudagent/ledger/multiple_ledger/tests/test_indy_ledger_requests.py | f087660fa58ca054ad6cbb33236bab3fb988190e | [
"LicenseRef-scancode-dco-1.1",
"Apache-2.0"
] | permissive | hyperledger/aries-cloudagent-python | f25d961e0717a4d703bf43df3e4b4bc8ec07b908 | 39cac36d8937ce84a9307ce100aaefb8bc05ec04 | refs/heads/main | 2023-09-01T15:37:05.353674 | 2023-08-31T14:13:06 | 2023-08-31T14:13:06 | 193,556,007 | 370 | 530 | Apache-2.0 | 2023-09-14T17:59:34 | 2019-06-24T18:12:14 | Python | UTF-8 | Python | false | false | 4,136 | py | test_indy_ledger_requests.py | from asynctest import TestCase as AsyncTestCase
from asynctest import mock as async_mock
from ....core.in_memory import InMemoryProfile
from ...base import BaseLedger
from ...multiple_ledger.base_manager import (
BaseMultipleLedgerManager,
MultipleLedgerManagerError,
)
from ...indy import IndySdkLedger, IndyS... |
d58443633615de899838c79bdc340be97348dcc4 | a96333bb48c34d18b7a99b2c724655dbc1fe2dbb | /python/tests/test_ppo.py | 8de54b17d51f14a61480440cb1dc36aeadfbe931 | [
"MIT"
] | permissive | udacity/deep-reinforcement-learning | cdcdbf5e315659d9980866560882930a433b9062 | 561eec3ae8678a23a4557f1a15414a9b076fdfff | refs/heads/master | 2023-07-08T06:33:54.653113 | 2021-12-06T22:42:31 | 2021-12-06T22:42:31 | 140,018,843 | 4,837 | 2,575 | MIT | 2023-06-28T19:36:57 | 2018-07-06T18:36:23 | Jupyter Notebook | UTF-8 | Python | false | false | 13,375 | py | test_ppo.py | import unittest.mock as mock
import pytest
import numpy as np
import tensorflow as tf
from unitytrainers.ppo.models import PPOModel
from unitytrainers.ppo.trainer import discount_rewards
from unityagents import UnityEnvironment
from .mock_communicator import MockCommunicator
@mock.patch('unityagents.UnityEnvironmen... |
646dcd2830268be00eeae846f87cdf1803358bf5 | e3bb1df7fa4c51900dec7e9ddf5295e1a80938bd | /hummingbot/connector/utilities/oms_connector/oms_connector_constants.py | 219df0feaf48ef17c46b66191d5987085e87bdc6 | [
"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 | 5,724 | py | oms_connector_constants.py | from hummingbot.core.api_throttler.data_types import LinkedLimitWeightPair, RateLimit
from hummingbot.core.data_type.common import OrderType, TradeType
from hummingbot.core.data_type.in_flight_order import OrderState
MAX_ID_BIT_COUNT = 63 # experimentally, 64 bit ints sometimes result in OMS assigning order IDs of ze... |
c07ea9dba8982e2880dfcc9492e47c5de6ae4cda | 0ca218c0f54dac33a2ade4accfdf8f5be3207588 | /test/orm/test_association.py | baf48a016c300be3ff4eaa358fdbd43ed90cc934 | [
"MIT"
] | permissive | sqlalchemy/sqlalchemy | 9d949c67c9b5396b1f33e7ff0f3230c81babf5be | b382bff6e3464f039db0fd1f2ce1b79038675e48 | refs/heads/main | 2023-08-31T17:40:59.565421 | 2023-08-30T15:01:41 | 2023-08-30T15:01:41 | 159,271,175 | 8,083 | 1,489 | MIT | 2023-09-12T18:53:55 | 2018-11-27T03:35:03 | Python | UTF-8 | Python | false | false | 7,399 | py | test_association.py | from sqlalchemy import ForeignKey
from sqlalchemy import func
from sqlalchemy import Integer
from sqlalchemy import select
from sqlalchemy import String
from sqlalchemy.orm import relationship
from sqlalchemy.testing import eq_
from sqlalchemy.testing import fixtures
from sqlalchemy.testing.fixtures import fixture_sess... |
25762df55f67dcc48b1492d27ded7cb055268809 | abbf6a11c0590f6e5b7327e6f6df5a6c71af891d | /binstar_client/commands/move.py | 4a991a6fcf23240fa79760ff2971fa763b42db30 | [] | permissive | Anaconda-Platform/anaconda-client | 3ce7848d938cfe62a2bad397a958774e5d28f8ff | 45fb0a363ba7833deccee6db82a26a0b51a7ca75 | refs/heads/master | 2023-08-30T21:11:47.468128 | 2023-08-08T14:36:23 | 2023-08-08T14:36:23 | 9,064,487 | 119 | 238 | BSD-3-Clause | 2023-09-14T15:10:54 | 2013-03-27T21:52:37 | Python | UTF-8 | Python | false | false | 2,906 | py | move.py | # -*- coding: utf-8 -*-
# pylint: disable=broad-except,protected-access,missing-function-docstring
"""
Move packages between labels.
"""
# Standard library imports
from __future__ import unicode_literals, print_function
import logging
# Local imports
from binstar_client import errors
from binstar_client.utils impor... |
84f6f4791b942cbe029c0d45a28441b371fabc56 | a5a99f646e371b45974a6fb6ccc06b0a674818f2 | /DQM/TrackingMonitor/python/TrackingMonitorAllTrackingSequences_cff.py | 314357ff45ab62e754663b3be00295b615f1ca5f | [
"Apache-2.0"
] | permissive | cms-sw/cmssw | 4ecd2c1105d59c66d385551230542c6615b9ab58 | 19c178740257eb48367778593da55dcad08b7a4f | refs/heads/master | 2023-08-23T21:57:42.491143 | 2023-08-22T20:22:40 | 2023-08-22T20:22:40 | 10,969,551 | 1,006 | 3,696 | Apache-2.0 | 2023-09-14T19:14:28 | 2013-06-26T14:09:07 | C++ | UTF-8 | Python | false | false | 3,382 | py | TrackingMonitorAllTrackingSequences_cff.py | import FWCore.ParameterSet.Config as cms
#-------------------------------------------------
# Tracking Monitor
#-------------------------------------------------
from DQM.TrackingMonitor.TrackingMonitor_cfi import *
# properties
TrackMon.MeasurementState = cms.string('ImpactPoint')
# which plots to do
TrackMo... |
4312016c6f3ea06034dfbb74ad3f70c0b4e04c73 | aeef2494b283012ed619870c4275e7d015f4017a | /sdk/python/pulumi_gcp/folder/iam_policy.py | 3af7f7de8086470bb983a4823be935415aa87ea9 | [
"BSD-3-Clause",
"MPL-2.0",
"Apache-2.0"
] | permissive | pulumi/pulumi-gcp | d4fd3f80c3df5290edaf33eb5eafe34e6699d0ff | 7deea0a50a4ee5ab7bd722a83eca01707e298f85 | refs/heads/master | 2023-08-31T07:12:45.921522 | 2023-08-31T06:16:27 | 2023-08-31T06:16:27 | 97,485,806 | 160 | 63 | Apache-2.0 | 2023-09-14T19:49:36 | 2017-07-17T14:28:37 | Java | UTF-8 | Python | false | false | 25,800 | py | iam_policy.py | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
fr... |
ae98f93306ea40d7fbebeac6b98284276b593d47 | d8a7f93044f7342bbb67397c3c18319ad56c06ba | /doc/makedocumentation.py | 917e966edb5bb747c1fad1d0942afbf7dd148b8b | [
"BSD-3-Clause"
] | permissive | leeping/forcebalance | 16e934be0668dde1a02ef6a65c3cc90151057a5c | 10b9280cab9735634d25a4f9c8b3e84cb13a6bb1 | refs/heads/master | 2023-07-19T20:06:23.869239 | 2023-02-08T17:56:55 | 2023-02-08T17:56:55 | 11,302,623 | 122 | 76 | NOASSERTION | 2023-09-06T13:52:28 | 2013-07-10T04:46:42 | Python | UTF-8 | Python | false | false | 15,123 | py | makedocumentation.py | """This file contains a documentation generating script. Doxygen
is used to do the actual generation, so these functions act primarily to
streamline the process and provide some customizations to the automatically
generated documents.
The motivation is:
- Want to have automatic online docs
- Want to version-control PD... |
04ee51ed8205d0beba94c5fc9ed915ae79a7636e | 4317bb9f5964962a3c90ea1fb6cf390ed37301c7 | /tests/test_multilineentry.py | c02892920eca7d31fbbe2f21fb352d5e2315a846 | [
"MIT"
] | permissive | joaoventura/pylibui | 44d894f0c70e59eb3ee5d7e885f4ebded008ec56 | e90095667b3900f000887aef010424a737efb119 | refs/heads/master | 2022-08-27T13:45:20.255145 | 2022-08-21T21:13:19 | 2022-08-21T21:13:19 | 59,297,405 | 239 | 38 | MIT | 2022-08-21T21:13:20 | 2016-05-20T13:40:57 | Python | UTF-8 | Python | false | false | 1,563 | py | test_multilineentry.py | """
Pylibui test suite.
"""
from pylibui.controls import MultilineEntry, NonWrappingMultilineEntry
from tests.utils import WindowTestCase
class MultilineEntryTest(WindowTestCase):
def setUp(self):
super().setUp()
self.entry = MultilineEntry()
def test_text_initial_value(self):
"""... |
02a3241acb734e1df7471fc293f3a43639e320c6 | 57bc404899f914eeef7ba298bf1e99883c864a26 | /linked_list/library/linked_list.py | 9f0160a79f8291be8e13a5e14c2bc678b343b0af | [
"MIT"
] | permissive | priyankchheda/algorithms | 547f19193273ac6a424fe4ba5e1375cc02ea4f60 | 38a5de72db14ef2664489da9857b598d24c4e276 | refs/heads/master | 2023-08-17T17:10:10.044940 | 2022-04-16T13:52:37 | 2022-04-16T13:52:37 | 133,684,565 | 195 | 38 | MIT | 2023-08-16T10:26:48 | 2018-05-16T15:10:56 | C++ | UTF-8 | Python | false | false | 5,325 | py | linked_list.py | """ Implementation of Singly Linked List Data Structure """
class Node:
""" Node class contains everything related to Linked List node """
def __init__(self, data):
""" initializing single node with data """
self.data = data
self.next = None
def __repr__(self):
return f"N... |
db01e168f398a10d8682d57a00e702e642e44b33 | 0760fb4901a75766921a205b55686d6d6f049b30 | /python/ray/air/_internal/filelock.py | 2642eaa049ad3635973142a820c904e5bce18d62 | [
"MIT",
"BSD-3-Clause",
"Apache-2.0"
] | permissive | ray-project/ray | a4bb6940b08b59a61ef0b8e755a52d8563a2f867 | edba68c3e7cf255d1d6479329f305adb7fa4c3ed | refs/heads/master | 2023-08-31T03:36:48.164405 | 2023-08-31T03:20:38 | 2023-08-31T03:20:38 | 71,932,349 | 29,482 | 5,669 | Apache-2.0 | 2023-09-14T21:48:14 | 2016-10-25T19:38:30 | Python | UTF-8 | Python | false | false | 1,430 | py | filelock.py | from filelock import FileLock
import hashlib
import os
from pathlib import Path
import ray
RAY_LOCKFILE_DIR = "_ray_lockfiles"
class TempFileLock:
"""FileLock wrapper that uses temporary file locks.
The temporary directory that these locks are saved to can be configured via
the `RAY_TMPDIR` environmen... |
917c5bef27a58fdcd004916624589882e6029a2a | 96dcea595e7c16cec07b3f649afd65f3660a0bad | /homeassistant/components/netgear/update.py | b0e9a26864b227b05bc1c76b978a087569c3803f | [
"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 | 2,804 | py | update.py | """Update entities for Netgear devices."""
from __future__ import annotations
import logging
from typing import Any
from homeassistant.components.update import (
UpdateDeviceClass,
UpdateEntity,
UpdateEntityFeature,
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import Home... |
5447b3d592ce1822ac8b224e62fabfdab6952aa0 | 55a973178ab56ae2a99c7f30bb65dd11270f4acb | /capstone/capapi/tasks.py | e2c244d76cbbe1763924a279fbb275975754b5e2 | [
"MIT"
] | permissive | harvard-lil/capstone | fb8e72bedfe5d902293acb566c864e153da3298e | bec56eaa4bfb62a44260e85cf76b421172de10e0 | refs/heads/develop | 2023-08-25T11:15:54.572758 | 2023-08-23T13:04:38 | 2023-08-23T13:04:38 | 82,964,836 | 153 | 47 | MIT | 2023-09-13T15:07:30 | 2017-02-23T19:44:44 | HTML | UTF-8 | Python | false | false | 2,284 | py | tasks.py | from datetime import timedelta
import requests
from celery import shared_task
from django.conf import settings
from django.core.cache import cache
from django.core.mail import send_mail
from django.db import connections
from django.utils import timezone
from capweb.helpers import statement_timeout, StatementTimeout
... |
882f71dd8725dc80af0a13b067c5822d7b5c3079 | 45be4ca6db49cfeeee722f94a21481634898c851 | /deepneuro/models/blocks.py | eeab212f9967d9cec6cbe10e073be9d7a8daacc6 | [
"MIT"
] | permissive | QTIM-Lab/DeepNeuro | 30de49d7cf5d15411591988bca5e284b4fe52ff5 | 8a55a958660227859439df003ac39b98ce3da1b0 | refs/heads/master | 2021-07-13T01:05:19.374945 | 2020-06-24T13:00:14 | 2020-06-24T13:00:14 | 93,092,834 | 122 | 40 | MIT | 2019-12-12T09:30:31 | 2017-06-01T19:36:34 | Jupyter Notebook | UTF-8 | Python | false | false | 10,630 | py | blocks.py | import numpy as np
from deepneuro.models.dn_ops import DnConv, DnPixelNorm, DnUpsampling, DnMaxPooling, DnBatchNormalization, DnDropout, DnAveragePooling
from deepneuro.models.ops import leaky_relu, minibatch_state_concat
def generator(model, latent_var, depth=1, initial_size=(4, 4), max_size=None, reuse=False, tran... |
a63d67587036c3cd4abbb4e5ac741e295e4f3f77 | 224a034669068398e59962d6470fb72dbe20e8c9 | /src/lightkurve/search.py | 423d7f60421f880b7ab94ba9d7ff2f262a96411f | [
"MIT"
] | permissive | lightkurve/lightkurve | b892b54ffbf3cb956f88300cb7d72b7e99fefdbf | 7d485b69e9bbe58a1e7ba8d988387dc5d469ab36 | refs/heads/main | 2023-08-28T05:20:55.072927 | 2023-08-22T20:42:53 | 2023-08-22T20:42:53 | 118,387,904 | 148 | 66 | MIT | 2023-09-14T02:24:36 | 2018-01-22T00:49:59 | Python | UTF-8 | Python | false | false | 56,015 | py | search.py | """Defines tools to retrieve Kepler data from the archive at MAST."""
from __future__ import division
import glob
import logging
import os
import re
import warnings
import numpy as np
from astropy import units as u
from astropy.coordinates import SkyCoord
from astropy.io import ascii
from astropy.table import Row, Ta... |
1220b9034e76168044ed803ab505bd1406d09f36 | df1254b56f35b24644e00493c50d4b6eb3c15b7b | /colour/io/image.py | 4e067e4fefcb3609cfba139ccdb6474e1e51ef56 | [
"BSD-3-Clause"
] | permissive | colour-science/colour | 908400b227cf81668675e41099256ce50b23ae4b | 1fdf3b3042922e8d4f86b989b00a06e7e5d81102 | refs/heads/develop | 2023-09-01T23:17:07.186869 | 2023-08-26T09:40:45 | 2023-08-26T09:40:45 | 17,114,363 | 1,756 | 301 | BSD-3-Clause | 2023-09-14T10:24:37 | 2014-02-23T18:55:40 | Python | UTF-8 | Python | false | false | 22,058 | py | image.py | """
Image Input / Output Utilities
==============================
Defines the image related input / output utilities objects.
"""
from __future__ import annotations
import numpy as np
from dataclasses import dataclass, field
from colour.hints import (
Any,
ArrayLike,
DTypeReal,
Literal,
NDArrayF... |
85a89fc1142a517eadff8cb46260fa0cf350f798 | f791462fb1286607d16459c1602d133f8d8c8b59 | /test/ops/test_indexing.py | cf8b65f9aeebd27d60b5741e0f3ab1fe46a28494 | [
"Apache-2.0"
] | permissive | pyro-ppl/numpyro | b071ed2bd93be41bafc3da8764c9f5617f996d92 | ca96eca8e8e1531e71ba559ef7a8ad3b4b68cbc2 | refs/heads/master | 2023-09-03T15:56:13.252692 | 2023-08-28T14:32:25 | 2023-08-28T14:32:25 | 170,580,540 | 1,941 | 219 | Apache-2.0 | 2023-09-04T11:26:11 | 2019-02-13T21:13:59 | Python | UTF-8 | Python | false | false | 5,498 | py | test_indexing.py | # Copyright Contributors to the Pyro project.
# SPDX-License-Identifier: Apache-2.0
import itertools
import numpy as np
import pytest
import jax.lax as lax
import jax.numpy as jnp
import jax.random as random
import numpyro.distributions as dist
from numpyro.ops.indexing import Vindex
def z(*shape):
return jnp... |
539d063d55c642290cb8ff94d97c0f7a9c055192 | a54f78f026c937b5a8a31180024496748169db91 | /nibabel/tests/test_onetime.py | 426702fa4303361718e7dce3310adcfd7feba92c | [
"MIT",
"BSD-3-Clause",
"LicenseRef-scancode-other-permissive",
"PDDL-1.0"
] | permissive | nipy/nibabel | 7017e29ee9e3e93d1085d9032c32f6d922b0e43d | 8fea2a8e50aaf4d8b0d4bfff7a21b132914120ee | refs/heads/master | 2023-08-22T07:12:46.167323 | 2023-08-06T23:46:30 | 2023-08-06T23:46:30 | 791,352 | 544 | 239 | NOASSERTION | 2023-09-08T19:10:32 | 2010-07-22T16:28:30 | Python | UTF-8 | Python | false | false | 838 | py | test_onetime.py | import pytest
from nibabel.onetime import auto_attr, setattr_on_read
from nibabel.testing import expires
@expires('5.0.0')
def test_setattr_on_read():
with pytest.deprecated_call():
class MagicProp:
@setattr_on_read
def a(self):
return object()
x = MagicProp(... |
55bec42e9dcf0c29b5bd64d8dd20fc600886683c | 90d8435ae5908fae54dff1c83d9d9a1cc26fab7d | /quantecon/_ce_util.py | 314e311b36bf2fe83d1a834ece3d22fd04eb5701 | [
"MIT"
] | permissive | QuantEcon/QuantEcon.py | 7537a1c9615ed9415e4fef07ff149c3ba65e3c36 | d1e4d22c873d6e84bb196e5600f555916cc3b86f | refs/heads/main | 2023-09-02T08:34:35.563150 | 2023-08-09T01:37:43 | 2023-08-09T01:37:43 | 8,941,695 | 1,767 | 2,290 | MIT | 2023-07-12T05:56:15 | 2013-03-22T00:27:36 | Python | UTF-8 | Python | false | false | 3,142 | py | _ce_util.py | """
Utility functions used in CompEcon
Based routines found in the CompEcon toolbox by Miranda and Fackler.
References
----------
Miranda, Mario J, and Paul L Fackler. Applied Computational Economics
and Finance, MIT Press, 2002.
"""
from functools import reduce
import numpy as np
def ckron(*arrays):
"""
R... |
55c07c751ba2f44b82a56afe1d5aae54983b7b8f | a70cb68b4a1abcdad75ce8840254fa5881816901 | /bin/alistadhoc | 11eba44112c5ecca42c323d3b7b7a1bf7e69d4d4 | [] | no_license | sao-eht/eat | 8b0841bcd247b40b438559dba412f061db24fdff | 6c06e4904ba4c87e35e5f5ef490e93a862d11a80 | refs/heads/master | 2023-08-17T07:55:43.966646 | 2023-08-15T04:13:00 | 2023-08-15T04:13:00 | 39,165,032 | 129 | 31 | null | 2020-09-05T21:04:08 | 2015-07-15T22:53:53 | Python | UTF-8 | Python | false | false | 1,736 | alistadhoc | #!/usr/bin/env python
# create fourfit ad-hoc phase file from single baseline
# 2017-03-15 Lindy Blackburn
from eat.io import hops, util
import numpy as np
import pandas as pd
import argparse
fmt = {
'days':'{:010.6f}'.format,
'phase_unwrap':'{:6.1f}'.format
}
parser = argparse.ArgumentParser()
parser.add_argument(... | |
a4fc2c5e7cfb81c8e68a9a9a1d7c643739d6bdee | 90e76adae07c81392d64fdfcb95f659e8a0c3f11 | /tests/functional/docs/test_streaming_body.py | c910d3b3fcd74989d62ed4c47832eb069121a983 | [
"Apache-2.0",
"MPL-2.0",
"MIT"
] | permissive | boto/botocore | b9468d08c83372cf6930643a15f87801b79ffddd | 7275c5d6e9273caf3804e0ce9491af080518798c | refs/heads/develop | 2023-09-01T18:11:40.617674 | 2023-08-31T18:58:50 | 2023-08-31T18:58:50 | 6,670,942 | 1,289 | 1,234 | Apache-2.0 | 2023-09-13T17:23:42 | 2012-11-13T13:25:36 | Python | UTF-8 | Python | false | false | 1,908 | py | test_streaming_body.py | # Copyright 2015 Amazon.com, Inc. or its affiliates. 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. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompa... |
cf89691204d338ce72a144a62171e73f59dfbf84 | 24db6985a016c3e4767c95ca51190e659d0847cd | /tjctf2020/difficult_decryption/sol.py | 00707e8ba21441021e5b3f9efba6040b43ed91ae | [
"MIT"
] | permissive | datajerk/ctf-write-ups | 463f53db224410a51df481b9e41b7777a09f3e2c | c33815911de3f4a66cbafbf5f12d7b57239250d9 | refs/heads/master | 2022-09-30T02:29:44.097435 | 2022-09-05T02:16:19 | 2022-09-05T02:16:19 | 204,361,251 | 136 | 36 | null | null | null | null | UTF-8 | Python | false | false | 401 | py | sol.py | #!/usr/bin/python3
from sympy.ntheory.residue_ntheory import discrete_log
M=491988559103692092263984889813697016406
P=232042342203461569340683568996607232345
B=5
A=discrete_log(M,P,B)
message = 12259991521844666821961395299843462461536060465691388049371797540470
bobkey = 76405255723702450233149901853450417505
text =... |
999749943ca9c6a8dcfe6dc52488ce21c3b36f45 | 9d0228f3f7ee9cee0794319d4affc161b0a7adc2 | /qmpy/analysis/griddata.py | e6e3defc0ab6e4ca5a9252a8edf9068cbbc89211 | [
"MIT"
] | permissive | wolverton-research-group/qmpy | db8a450a5708aac63aa39e104745b5cb0a4fa930 | dede5bdf4aa3ea1187a7bc273e86336c24aadb25 | refs/heads/master | 2023-01-24T17:18:48.335699 | 2022-08-23T01:12:29 | 2022-08-23T01:12:29 | 18,248,720 | 124 | 65 | MIT | 2023-01-11T02:04:51 | 2014-03-29T19:18:53 | JavaScript | UTF-8 | Python | false | false | 6,196 | py | griddata.py | # qmpy/analysis/griddata
import numpy as np
import numpy.linalg as la
import qmpy.utils as utils
import itertools
class GridData:
"""
Container for 3d data, e.g. charge density or electron localization
function.
"""
def __init__(self, data, lattice=None):
"""
Arguments:
... |
5f44373856a231f2e835db5b18f283868002d468 | b8a25cba3c725bda12e78454910bfac6658283cd | /nyaggle/feature/base.py | 2c55cc510603e3041fb22b8a48536c2cc6e18886 | [
"MIT"
] | permissive | nyanp/nyaggle | e3f125fbba816c77aefb21fef5e220bd7ee36949 | 86a9db4375d4d4974a71692a756d1c4818e15122 | refs/heads/master | 2023-08-16T13:01:43.565349 | 2023-07-22T14:15:41 | 2023-07-22T14:15:41 | 228,955,139 | 286 | 41 | MIT | 2023-09-10T04:09:54 | 2019-12-19T02:01:19 | Python | UTF-8 | Python | false | false | 123 | py | base.py | from sklearn.base import BaseEstimator, TransformerMixin
class BaseFeaturizer(BaseEstimator, TransformerMixin):
pass
|
8592a1d2af8fc5cd3ea13c8b51c6d070499b8d0e | 83da171ef6c1f8201a88534737c9e753247afee1 | /oasislmf/pytools/pla/manager.py | 6d43934a76953dcdef59be39d4a91e184de74fbf | [
"BSD-3-Clause"
] | permissive | OasisLMF/OasisLMF | 7bb691eb08f11641887257fe154d5356509707c5 | 23e704c335629ccd010969b1090446cfa3f384d5 | refs/heads/main | 2023-08-25T12:14:44.449756 | 2023-08-23T10:08:17 | 2023-08-23T10:08:17 | 117,560,568 | 122 | 53 | BSD-3-Clause | 2023-09-14T09:37:17 | 2018-01-15T15:12:25 | Python | UTF-8 | Python | false | false | 1,410 | py | manager.py | from contextlib import ExitStack
import os
import sys
from .streams import read_and_write_streams
from .structure import (
get_items_amplifications,
get_post_loss_amplification_factors
)
from oasislmf.pytools.utils import redirect_logging
@redirect_logging(exec_name='plapy')
def run(run_dir, file_in, file_ou... |
1fbd2ae345d341b619c8914bef860e93fd7eba45 | 2d9a3ce2a04190d0032e8a298829022260b1d76b | /indra/sources/biofactoid/api.py | b0c46755a17ff09227192a9d2e78937e1c37b1d1 | [
"BSD-2-Clause",
"BSD-2-Clause-Views"
] | permissive | sorgerlab/indra | f127a0f9bdd2d3f48df14575883fd31e2f4de4bf | 6d6ca1174792b6c5a05cbf3afcb9f138fabcec6a | refs/heads/master | 2023-08-21T13:25:54.654995 | 2023-06-11T16:46:41 | 2023-06-11T16:46:41 | 22,848,436 | 158 | 61 | BSD-2-Clause | 2023-08-30T21:47:59 | 2014-08-11T17:44:05 | Python | UTF-8 | Python | false | false | 1,130 | py | api.py | import requests
from .processor import BioFactoidProcessor
biofactoid_url = 'https://biofactoid.org/api/document'
biofactoid_unstable_url = 'https://unstable.factoid.baderlab.org/api/document'
def process_from_web(url=None):
"""Process BioFactoid documents from the web.
Parameters
----------
url : O... |
baf48cdceaaf4dc48660780d84372a35c6e9d39e | 549275146dc8ecdba9144a6aed2796baa1639eb3 | /Codes/Liam/172_factorial_trailing_zeroes.py | 11fea511162b7f3aca3cb069ffab430ad37dbd02 | [
"Apache-2.0"
] | permissive | asdf2014/algorithm | fdb07986746a3e5c36bfc66f4b6b7cb60850ff84 | b0ed7a36f47b66c04b908eb67f2146843a9c71a3 | refs/heads/master | 2023-09-05T22:35:12.922729 | 2023-09-01T12:04:03 | 2023-09-01T12:04:03 | 108,250,452 | 270 | 87 | Apache-2.0 | 2021-09-24T16:12:08 | 2017-10-25T09:45:27 | Java | UTF-8 | Python | false | false | 311 | py | 172_factorial_trailing_zeroes.py | # 执行用时 : 96 ms
# 内存消耗 : 29 MB
# 方案:算一下乘法因子里面5的个数
class Solution:
def trailingZeroes(self, n: int) -> int:
# 算一下乘法因子里面5的个数
count = 0
while n:
count += n // 5
n //= 5
return count
|
98418edde8f12e8f584eeb6976bb1691aed63805 | 0dddc0508138396c740901be4a0f9eebefb8fded | /ax/models/torch/botorch.py | dca5cc5d1ba4c3f3224c691c69b0d45fb1409b4e | [
"MIT"
] | permissive | facebook/Ax | 473beb143016f95f4ec381ed1bd95b32c1ca31f8 | 6443cee30cbf8cec290200a7420a3db08e4b5445 | refs/heads/main | 2023-09-01T09:29:13.684709 | 2023-08-31T21:49:30 | 2023-08-31T21:49:30 | 169,880,381 | 2,207 | 315 | MIT | 2023-09-14T21:26:51 | 2019-02-09T15:23:44 | Jupyter Notebook | UTF-8 | Python | false | false | 23,571 | py | botorch.py | #!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import annotations
from copy import deepcopy
from logging import Logger
from typing import Any, Cal... |
144362ed77e105831aebc63e694d2f14f267eda4 | ca593f5a272ce0478ba6f52d2670cb9dd8564b00 | /mycroft/util/time.py | 0c86e0ad8db6d7e8b8511b9cc1ce8c05742d5234 | [
"Apache-2.0"
] | permissive | MycroftAI/mycroft-core | d41ce0fccfe4c29d8d802dcc6bcf583dc356d9ce | 8051e4e1f89d5ed1f63f06db5d3570371ae92e5d | refs/heads/master | 2023-08-23T17:45:10.569985 | 2021-12-10T04:51:59 | 2021-12-10T04:51:59 | 59,299,524 | 6,838 | 1,719 | Apache-2.0 | 2023-08-15T10:25:32 | 2016-05-20T14:11:07 | Python | UTF-8 | Python | false | false | 3,213 | py | time.py | #
# Copyright 2018 Mycroft AI Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... |
94088166d587e14421796211b5a1f7db35323466 | 23652304566b1869ca65b95b116ee43d16e134f3 | /h/streamer/views.py | efd96220b0874d215d78d8e4b722adb74a91e004 | [
"BSD-2-Clause",
"BSD-3-Clause",
"BSD-2-Clause-Views"
] | permissive | hypothesis/h | 29399a26990856c336b05022e827541dd8aeedab | 232446d776fdb906d2fb253cf0a409c6813a08d6 | refs/heads/main | 2023-08-30T16:21:33.754658 | 2023-08-30T09:26:50 | 2023-08-30T09:40:48 | 3,910,945 | 2,558 | 452 | BSD-2-Clause | 2023-09-14T11:25:06 | 2012-04-02T19:56:59 | Python | UTF-8 | Python | false | false | 1,687 | py | views.py | from pyramid.view import forbidden_view_config, notfound_view_config, view_config
from ws4py.exc import HandshakeError
from ws4py.server.wsgiutils import WebSocketWSGIApplication
from h.streamer import streamer, websocket
@view_config(route_name="ws")
def websocket_view(request):
# Provide environment which the ... |
7cbbafc0e8ee1da7b567ca85e002978876e0999e | 6923f79f1eaaba0ab28b25337ba6cb56be97d32d | /Programming_for_Computations/test_diffeq2.py | 910145e70ebf136c36caf8380a01337f615b0ad8 | [] | no_license | burakbayramli/books | 9fe7ba0cabf06e113eb125d62fe16d4946f4a4f0 | 5e9a0e03aa7ddf5e5ddf89943ccc68d94b539e95 | refs/heads/master | 2023-08-17T05:31:08.885134 | 2023-08-14T10:05:37 | 2023-08-14T10:05:37 | 72,460,321 | 223 | 174 | null | 2022-10-24T12:15:06 | 2016-10-31T17:24:00 | Jupyter Notebook | UTF-8 | Python | false | false | 1,809 | py | test_diffeq2.py | """Verify the implementation of the diffusion equation."""
from ode_system_FE import ode_FE
from numpy import linspace, zeros, linspace, abs
def s(t):
return u_exact(0, t)
def dsdt(t):
return 1
def f(x, t):
return 1 - 2*beta
def rhs(u, t):
N = len(u) - 1
rhs = zeros(N+1)
rhs[0] = dsdt(t)
... |
c8ad9438c815fe22dde66ff9e1b56e1cf35a18f3 | d32819267d481c3224936bb17149939d836ae654 | /examples/hb_example.py | 5a815a4a42e925f4e2728fdff0e6412dcf230922 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | seba-1511/randopt | 18cf039b9e539986df5215f5277f23a942569f23 | 74cefcc734c6a38418151025b0a4d8b6cb41eb14 | refs/heads/master | 2021-05-01T19:46:00.117966 | 2020-04-27T20:47:43 | 2020-04-27T20:47:43 | 71,821,410 | 116 | 9 | Apache-2.0 | 2018-09-29T08:39:14 | 2016-10-24T18:52:04 | HTML | UTF-8 | Python | false | false | 1,051 | py | hb_example.py | #!/usr/bin/env python
import randopt as ro
def loss(x):
return x**2
def dloss(x):
return 2.0*x
def run_exp():
param = 10.0
num_epochs = 10
e = ro.HyperBand('hb_example', {
'alpha': ro.Uniform(low=0.0, high=0.01)
}, num_iter=num_epochs)
e.sample_all_params()
for epoc... |
a39d0630873a3b4b12b6a3139eaa8f27e3c29eb2 | 9907672fcd81ab73ac63b2a83422a82bf31eadde | /hackerrank/input.py | 10c6d9a90ea8403625b6606fb1134cc0a2bee55e | [
"0BSD"
] | permissive | cielavenir/procon | bbe1974b9bddb51b76d58722a0686a5b477c4456 | 746e1a91f574f20647e8aaaac0d9e6173f741176 | refs/heads/master | 2023-06-21T23:11:24.562546 | 2023-06-11T13:15:15 | 2023-06-11T13:15:15 | 7,557,464 | 137 | 136 | null | 2020-10-20T09:35:52 | 2013-01-11T09:40:26 | C++ | UTF-8 | Python | false | false | 68 | py | input.py | #!/usr/bin/python
x,k=map(int,raw_input().split())
print(input()==k) |
0fa95231bc333007f10a209a6bacfc91c1247524 | 8b93c6fe926241f6c95f981f7dae32414d820148 | /tools/building_script/py_prebuild.py | 2f23d14e368782eac8e24e9563682da2b508c462 | [
"MIT"
] | permissive | lailongwei/llbc | e0873c7a34eea6a3fff260f78f1bdbf06520363b | 2b4ccb3387549f612a6df001f091680bfd9b3adb | refs/heads/master | 2023-08-15T08:22:03.602550 | 2023-08-04T07:31:58 | 2023-08-04T07:31:58 | 45,900,425 | 126 | 48 | MIT | 2023-09-11T13:59:49 | 2015-11-10T09:08:46 | C++ | UTF-8 | Python | false | false | 840 | py | py_prebuild.py | # -*- coding: utf-8 -*-
"""
pyllbc项目预编译脚本, 用于整合c++向lua提供的方法列表及将python代码统一整合到c++ dll中(以字符串形式)
"""
from time import sleep
from os import path as op
from py_integrator_builder import PyIntegratorBuilder
from native_method_collector import PyNativeMethodCollector as PyNMC
from c import Cfg
def main():
print('Build... |
f22356bfaf10fe1e82b6a9a55e8809f755743d89 | 45e376ae66b78b17788b1d3575b334b2cb1d0b1c | /checkov/terraform/checks/resource/azure/AKSIsPaidSku.py | 13029b9217e0088c18a589d7d071472a643b7d84 | [
"Apache-2.0"
] | permissive | bridgecrewio/checkov | aeb8febed2ed90e61d5755f8f9d80b125362644d | e64cbd27ffb6f09c2c9f081b45b7a821a3aa1a4d | refs/heads/main | 2023-08-31T06:57:21.990147 | 2023-08-30T23:01:47 | 2023-08-30T23:01:47 | 224,386,599 | 5,929 | 1,056 | Apache-2.0 | 2023-09-14T20:10:23 | 2019-11-27T08:55:14 | Python | UTF-8 | Python | false | false | 891 | py | AKSIsPaidSku.py | from typing import Any
from checkov.common.models.enums import CheckCategories
from checkov.terraform.checks.resource.base_resource_value_check import BaseResourceValueCheck
class AKSIsPaidSku(BaseResourceValueCheck):
def __init__(self) -> None:
name = "Ensure that AKS use the Paid Sku for its SLA"
... |
6719ea274eb53fa88c0d5e7edcf51253965eef8d | 7b7c570b30d6d7a0e9b904c7cb378cfb0d0f0e07 | /examples/xgboost/xgboost_sklearn/train.py | 97fb33c85265f3f2df116f51196663a31a4e3a08 | [
"Apache-2.0"
] | permissive | mlflow/mlflow | ca97bfbbf32f8e59f454e428f5e46eb3d34d062f | 37298ffafcd34002352d01d579d4524790544267 | refs/heads/master | 2023-09-01T13:15:53.902815 | 2023-09-01T09:00:42 | 2023-09-01T09:00:42 | 136,202,695 | 14,102 | 3,748 | Apache-2.0 | 2023-09-14T21:52:42 | 2018-06-05T16:05:58 | Python | UTF-8 | Python | false | false | 1,059 | py | train.py | from pprint import pprint
import xgboost as xgb
from sklearn.datasets import load_diabetes
from sklearn.metrics import mean_squared_error
from sklearn.model_selection import train_test_split
from utils import fetch_logged_data
import mlflow
import mlflow.xgboost
def main():
# prepare example dataset
X, y = ... |
2f65355bd87921ce62030ac9509118bc7a4a6f26 | 48d6a692666f85a353cd2c7a89581e2207fdd6a0 | /tests/instruments/mksinst/test_mks937b.py | 385b625dfaf11a42924e359f1384c8bb0e60cab8 | [
"MIT"
] | permissive | pymeasure/pymeasure | 21fa07592adfb63944fd35723d82853133e103be | c04cfc05dc48fa5f3c4ff1e0f223751da6e7d8b5 | refs/heads/master | 2023-09-02T02:07:05.118773 | 2023-09-01T18:27:43 | 2023-09-01T18:27:43 | 18,864,038 | 271 | 172 | MIT | 2023-09-11T16:42:56 | 2014-04-17T02:31:52 | Python | UTF-8 | Python | false | false | 2,801 | py | test_mks937b.py | #
# This file is part of the PyMeasure package.
#
# Copyright (c) 2013-2023 PyMeasure Developers
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limit... |
3741c03c5074f95223e6ec8f1d1ffcb35dfa84a0 | 56a77194fc0cd6087b0c2ca1fb6dc0de64b8a58a | /applications/FemToDemApplication/python_scripts/MainDEM_for_coupling.py | f1dc35a2f01ecc55a09a9f9fb7c92f1b39231eb5 | [
"BSD-3-Clause"
] | permissive | KratosMultiphysics/Kratos | 82b902a2266625b25f17239b42da958611a4b9c5 | 366949ec4e3651702edc6ac3061d2988f10dd271 | refs/heads/master | 2023-08-30T20:31:37.818693 | 2023-08-30T18:01:01 | 2023-08-30T18:01:01 | 81,815,495 | 994 | 285 | NOASSERTION | 2023-09-14T13:22:43 | 2017-02-13T10:58:24 | C++ | UTF-8 | Python | false | false | 758 | py | MainDEM_for_coupling.py |
import KratosMultiphysics.DEMApplication as DEM
import KratosMultiphysics.DEMApplication.DEM_analysis_stage as MainDEM
class DEM_for_coupling_Solution(MainDEM.DEMAnalysisStage):
def SetAnalyticParticleWatcher(self):
pass
def AddVariables(self):
super(DEM_for_coupling_Solution, self... |
015919b6337871c48075b368b7c7d512373d3820 | 13800b7827598e76428a335559b7bf11867ec2f0 | /python/ccxt/tidex.py | 7b9761bb28d1602fff1b6401c60845fd1c8b3ff2 | [
"MIT"
] | permissive | ccxt/ccxt | b40a0466f5c430a3c0c6026552ae697aa80ba6c6 | e4065f6a490e6fc4dd7a72b375428b2faa570668 | refs/heads/master | 2023-09-04T03:41:29.787733 | 2023-09-03T19:25:57 | 2023-09-03T19:25:57 | 91,253,698 | 30,798 | 8,190 | MIT | 2023-09-14T21:59:09 | 2017-05-14T15:41:56 | Python | UTF-8 | Python | false | false | 42,557 | py | tidex.py | # -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.base.exchange import Exchange
from ccxt.abstract.tidex import ImplicitAPI
import hashlib
from ccxt.base.types import OrderSide
fr... |
8cb0661ab1481d051adc8869621f12d0d9604c27 | 4506d81df5ae98078e5cbe79f613514ad12b1c83 | /nipype/interfaces/spm/tests/test_auto_CreateWarped.py | f62694641c91a7a9c0bd9b82752bea927d13eaff | [
"BSD-3-Clause",
"Apache-2.0"
] | permissive | nipy/nipype | d52eba1b98fda68e24d006ac0d5701fc8a531b9c | 03a236320fa229299d637ff9af97865a6ae76aca | refs/heads/master | 2023-08-28T10:36:07.020541 | 2023-08-25T13:40:09 | 2023-08-25T13:40:09 | 791,477 | 692 | 569 | NOASSERTION | 2023-09-11T06:04:51 | 2010-07-22T17:06:49 | Python | UTF-8 | Python | false | false | 1,387 | py | test_auto_CreateWarped.py | # AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from ..preprocess import CreateWarped
def test_CreateWarped_inputs():
input_map = dict(
flowfield_files=dict(
copyfile=False,
field="crt_warped.flowfields",
mandatory=True,
),
image_files=dict(
... |
740c66edcbb6350c2d916d74feb5009ec105f38a | a69294c7d5ee75441759b66bc20cce727350bd59 | /ndb/blobstore.py | 6bf08ee89c166b467c2aebd82484f9cbf10c7b40 | [
"Apache-2.0"
] | permissive | GoogleCloudPlatform/datastore-ndb-python | 58b57437e11104bfe924fca3de2ee28319f2976f | 59cb209ed95480025d26531fc91397575438d2fe | refs/heads/master | 2023-08-21T01:16:54.021744 | 2022-10-20T23:12:51 | 2022-10-20T23:12:51 | 37,215,291 | 127 | 56 | Apache-2.0 | 2022-10-20T23:12:53 | 2015-06-10T18:34:30 | Python | UTF-8 | Python | false | false | 15,489 | py | blobstore.py | #
# Copyright 2008 The ndb Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... |
1ccbfc2ceac6974673f45d9801da30aa833042e9 | 2bb7bc07df02a17735c2cacc7b2ba0c6de77b63c | /tests/utils/collections_test.py | b7d9e4ce71af6809bbe15de987cf895ab9cda813 | [
"Apache-2.0"
] | permissive | Yelp/Tron | 2c30a301055a732c3b33a39e05dbdcfc84ac8e02 | 958a2e22a6ac733cba043bc4238f3bf2b8048f4b | refs/heads/master | 2023-08-29T11:35:11.716532 | 2023-08-21T19:27:45 | 2023-08-21T19:27:45 | 899,771 | 226 | 53 | NOASSERTION | 2023-08-21T19:26:45 | 2010-09-09T20:54:04 | Python | UTF-8 | Python | false | false | 2,746 | py | collections_test.py | from unittest import mock
from testifycompat import assert_equal
from testifycompat import assert_in
from testifycompat import assert_not_in
from testifycompat import assert_raises
from testifycompat import setup
from testifycompat import TestCase
from tests.assertions import assert_mock_calls
from tests.testingutils ... |
0bb9316a840008a744744eea29f2b44fc49a46d2 | 57adfd30d44dcec446e55306265b68ee08b51655 | /dropbox/file_requests.py | ab931bb797999fb1b6660a50e30f7b4be2f26431 | [
"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 | 48,672 | py | file_requests.py | # -*- coding: utf-8 -*-
# Auto-generated by Stone, do not modify.
# @generated
# flake8: noqa
# pylint: skip-file
"""
This namespace contains endpoints and data types for file request operations.
"""
from __future__ import unicode_literals
from stone.backends.python_rsrc import stone_base as bb
from stone.backends.pyt... |
2c79ab3992e41851a0167e3deccc8bcbe6f19e0a | 2a1b8a671aceda6bc446f8ce26400aa84fa444a6 | /Packs/BreachRx/Integrations/BreachRx/BreachRx.py | 6c3bad1e6e2c38726b20694b0f4e34fd6ac419a3 | [
"MIT"
] | permissive | demisto/content | 6d4722d46f0ff0beea2748e9f7de585bf91a78b4 | 890def5a0e0ae8d6eaa538148249ddbc851dbb6b | refs/heads/master | 2023-09-04T00:02:25.618032 | 2023-09-03T21:56:22 | 2023-09-03T21:56:22 | 60,525,392 | 1,023 | 1,921 | MIT | 2023-09-14T20:55:24 | 2016-06-06T12:17:02 | Python | UTF-8 | Python | false | false | 8,777 | py | BreachRx.py | from CommonServerPython import * # noqa # pylint: disable=unused-wildcard-import
from CommonServerUserPython import * # noqa
from collections.abc import Callable
import urllib3
import traceback
from urllib.parse import urlparse
from gql import gql, Client
from gql.transport.requests import RequestsHTTPTransport
fro... |
2c920735d2e74b040a143fefc441cd964b428440 | e46c684f4b8dd07acc8cda5c30add73d8bcd7aa9 | /dallinger/experiment_server/utils.py | 5e5511b196cae324c6d22502102ed162854f0e85 | [
"MIT"
] | permissive | Dallinger/Dallinger | b229265581cef9e72f35cb1cc82e0a90534d9be0 | 28b61f4e12ffa110fc031f6322e16745fb69c094 | refs/heads/master | 2023-09-01T03:06:07.607759 | 2023-08-30T12:26:14 | 2023-08-30T12:26:14 | 67,452,779 | 120 | 56 | MIT | 2023-09-14T15:00:38 | 2016-09-05T21:46:04 | Python | UTF-8 | Python | false | false | 7,575 | py | utils.py | import logging
import sys
from datetime import timedelta
from functools import update_wrapper
from json import dumps
import user_agents
from flask import Response, current_app, make_response, render_template, request
from dallinger.config import get_config
logger = logging.getLogger(__name__)
def crossdomain(
... |
5d96722f6b7528182930c1517d5ba0f05a7b58e7 | 3c41443364da8b44c74dce08ef94a1acd1b66b3e | /osf/management/commands/update_institution_project_counts.py | 53a0d735ddc728245b31d6959471c38e0f2a204d | [
"MIT",
"BSD-3-Clause",
"LicenseRef-scancode-free-unknown",
"LicenseRef-scancode-warranty-disclaimer",
"AGPL-3.0-only",
"LGPL-2.0-or-later",
"LicenseRef-scancode-proprietary-license",
"MPL-1.1",
"CPAL-1.0",
"LicenseRef-scancode-unknown-license-reference",
"BSD-2-Clause",
"Apache-2.0"
] | permissive | CenterForOpenScience/osf.io | 71d9540be7989f7118a33e15bc4a6ce2d2492ac1 | a3e0a0b9ddda5dd75fc8248d58f3bcdeece0323e | refs/heads/develop | 2023-09-04T03:21:14.970917 | 2023-08-31T14:49:20 | 2023-08-31T14:49:20 | 10,199,599 | 683 | 390 | Apache-2.0 | 2023-09-14T17:07:52 | 2013-05-21T15:53:37 | Python | UTF-8 | Python | false | false | 2,040 | py | update_institution_project_counts.py | import datetime as dt
from django.core.management.base import BaseCommand
from framework.celery_tasks import app as celery_app
from osf.metrics import InstitutionProjectCounts, UserInstitutionProjectCounts
from osf.models import Institution, Node
@celery_app.task(name='management.commands.update_institution_project... |
7878fd7b6d2fb511b847949ae76aedde2286e89c | a411a55762de11dc2c9d913ff33d2f1477ac02cf | /orc8r/gateway/python/magma/common/redis/tests/dict_tests.py | e3f14f5889cf00a1a372b487ceb3f4bc155f515f | [
"BSD-3-Clause"
] | permissive | magma/magma | 0dc48c1513d9968bd05fb7589f302c192b7c0f94 | 0e1d895dfe625681229e181fbc2dbad83e13c5cb | refs/heads/master | 2023-09-04T09:31:56.140395 | 2023-08-29T13:54:49 | 2023-08-29T13:54:49 | 170,803,235 | 1,219 | 525 | NOASSERTION | 2023-09-07T17:45:42 | 2019-02-15T04:46:24 | C++ | UTF-8 | Python | false | false | 5,726 | py | dict_tests.py | """
Copyright 2020 The Magma Authors.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES O... |
13a6e2d29d9cb15cf33923ef8312ad24f7862fbc | ad3cdc5e7919b705ed88fdaa58a556d0c53a2981 | /configurators/scripts/bin/system-colour | 484f6f7989420125f6fea5c89c1605b35b459df2 | [
"MIT"
] | permissive | naggie/dotfiles | c77967dd9f62438c3faa37a55985ec6ed4391fff | bcc7d0032bb01ea75986fea7f71dad9b43fa3634 | refs/heads/master | 2023-08-31T02:09:56.215466 | 2023-08-21T20:41:52 | 2023-08-21T20:41:52 | 5,134,257 | 130 | 23 | MIT | 2020-04-19T12:47:38 | 2012-07-21T14:36:58 | Vim script | UTF-8 | Python | false | false | 4,919 | system-colour | #!/usr/bin/env python3
from hashlib import md5
import json
from os import path
from os import geteuid
import socket
import sys
from string import ascii_letters
# WCAG contrast calculation functions based on
# https://github.com/gsnedders/wcag-contrast-ratio/blob/master/wcag_contrast_ratio/contrast.py
# Copyright (c) 2... | |
341f2450ed1f22feb6257a8e873eee9f8d014221 | beab4b9703df6c4e9bda54fada11a6d985ea2c5a | /tests/test_motd.py | 2e9eeab70628a1d73f46b74ec1be0ff9d3999d31 | [
"MIT"
] | permissive | sanic-org/sanic | d3db62482914061a1f6a8f7d94b6127c2876cb3e | 47215d4635184bdfb1d5cff000d19390f19219ab | refs/heads/main | 2023-09-05T01:04:31.432228 | 2023-08-30T17:03:22 | 2023-08-30T17:03:22 | 59,720,190 | 3,523 | 439 | MIT | 2023-09-14T05:45:11 | 2016-05-26T04:38:22 | Python | UTF-8 | Python | false | false | 2,412 | py | test_motd.py | import logging
import os
import platform
import sys
from unittest.mock import Mock, patch
import pytest
from sanic import __version__
from sanic.application.logo import BASE_LOGO
from sanic.application.motd import MOTD, MOTDTTY
@pytest.fixture(autouse=True)
def reset():
try:
del os.environ["SANIC_MOTD_... |
0963041aadb11e8d838b8e1893c771dd4c3da18d | e9f0510faac898afc09eb5bb664ac6048f72c33a | /tests/test_bvll/test_codec.py | dd884d0ad18872c30fe4dbf7832780d6ee864853 | [
"MIT"
] | permissive | JoelBender/bacpypes | c9ddf9a4f56dd0d012046a9e4ffad19bd580cb45 | a5be2ad5ac69821c12299716b167dd52041b5342 | refs/heads/master | 2023-05-28T05:03:17.980236 | 2023-05-10T05:33:01 | 2023-05-10T05:33:01 | 39,159,799 | 284 | 161 | MIT | 2023-05-15T15:11:27 | 2015-07-15T20:33:51 | Python | UTF-8 | Python | false | false | 10,146 | py | test_codec.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Test BVLL Encoding and Decoding
-------------------------------
"""
import string
import unittest
from bacpypes.debugging import bacpypes_debugging, ModuleLogger, btox, xtob
from bacpypes.comm import bind
from bacpypes.pdu import PDU, Address, LocalBroadcast
from b... |
dd825fa61aa03d7c8f09c22d89b0598fdea14439 | e3bb1df7fa4c51900dec7e9ddf5295e1a80938bd | /hummingbot/core/data_type/trade_fee.py | c1fcc0103c134ffc31fd4a4df2f84ba01ff8d306 | [
"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 | 12,975 | py | trade_fee.py | import typing
from abc import ABC, abstractmethod
from dataclasses import dataclass, field
from decimal import Decimal
from typing import Any, Dict, List, Optional, Type
from hummingbot.connector.utils import combine_to_hb_trading_pair, split_hb_trading_pair
from hummingbot.core.data_type.common import PositionAction,... |
474de0f9313fe226610d3bb341883b79daeed3f6 | 3982e6daf88e453c726f6b39a081fc37ce15a08a | /discovery-provider/src/models/tracks/track.py | 0b8d3b8c4ee27201171c2906208ace68e0d4c31d | [
"Apache-2.0"
] | permissive | AudiusProject/audius-protocol | 45808e11082608ad5b76a425d287cb6d94a6dab0 | 7cf1d8e378520460d24a7cc8c29e9927c0944cb3 | refs/heads/main | 2023-08-09T10:34:28.850436 | 2023-08-09T04:28:17 | 2023-08-09T04:28:17 | 201,821,771 | 531 | 108 | NOASSERTION | 2023-09-14T21:27:52 | 2019-08-11T22:31:43 | TypeScript | UTF-8 | Python | false | false | 4,185 | py | track.py | from sqlalchemy import (
Boolean,
Column,
DateTime,
Float,
ForeignKey,
Integer,
PrimaryKeyConstraint,
String,
Text,
text,
)
from sqlalchemy.dialects.postgresql import JSONB
from sqlalchemy.orm import relationship, validates
from src.model_validator import ModelValidator
from src... |
6391872ee49bbc4e5c8884a6a7b49ee5fd662535 | 332659a711970040fe001e3c3f043b276220ab3e | /ntc_rosetta/cli/print_processor.py | 8088122979a2031296e3442a39509a8c486633db | [
"Apache-2.0"
] | permissive | networktocode/ntc-rosetta | b1d451e52ce3cda4e0751047b7c1be937c2a908e | 35fb3f55fb273703e5dd975ed8f3b2d1fdc51d9a | refs/heads/develop | 2023-08-18T00:54:57.879372 | 2023-08-08T21:19:57 | 2023-08-08T21:19:57 | 189,195,038 | 104 | 28 | Apache-2.0 | 2023-08-30T00:12:27 | 2019-05-29T09:33:55 | Python | UTF-8 | Python | false | false | 1,066 | py | print_processor.py | import json
import click
from ntc_rosetta import get_driver
from ntc_rosetta.yang import get_data_model
from yangify import linter
@click.command("print-parser")
@click.option(
"-j/-t",
"--json/--text",
"to_json",
default=False,
help="output format - default: text",
)
@click.argument("driver")
... |
bbba4480ca3c650d14112e5ec8cc52259f323c06 | aaa72c72c9089a5f4a71f8151ab8304297692680 | /tests/test_saliency_map_conversion.py | 18b58b74b9e7a4156425582a28436c64e43fec5c | [
"MIT"
] | permissive | matthias-k/pysaliency | 2569653a727247cc81c0a994acaeface93124ee7 | 0664dba9b637f64b089b3a44b191dd24da84a30e | refs/heads/master | 2023-08-11T08:03:26.527271 | 2022-06-11T21:52:31 | 2022-06-11T21:52:31 | 46,892,512 | 142 | 42 | MIT | 2023-07-06T14:03:09 | 2015-11-25T23:08:26 | Python | UTF-8 | Python | false | false | 2,491 | py | test_saliency_map_conversion.py | import numpy as np
import pytest
import pysaliency
from pysaliency import optimize_for_information_gain
from pysaliency.models import SaliencyMapNormalizingModel
@pytest.fixture
def stimuli():
return pysaliency.Stimuli([np.random.randint(0, 255, size=(25, 30, 3)) for i in range(50)])
@pytest.fixture
def salien... |
77e80acfd9eacaa5b4fe07237c8f0f0965f634a8 | 085cf6512c946d615eda58a3a0d353c0aa1db8cf | /deepfence_backend/config/celeryworkerconfig.py | 11a49222ad08ca9d09e54e1912872821eb83986d | [
"Apache-2.0"
] | permissive | deepfence/ThreatMapper | 00c38c65ed2f014004c9818f03d5e129496b4dd8 | 748b0c8782507eaf351625b9c9fad46903ad6237 | refs/heads/main | 2023-08-31T11:13:53.813651 | 2023-03-02T00:49:57 | 2023-03-02T00:49:57 | 238,662,977 | 4,540 | 481 | Apache-2.0 | 2023-09-14T13:24:37 | 2020-02-06T10:30:09 | TypeScript | UTF-8 | Python | false | false | 630 | py | celeryworkerconfig.py | imports = (
'tasks.email_sender',
'tasks.notification_worker',
'tasks.common_worker',
# 'tasks.scope',
'tasks.vulnerability_scan_worker',
'tasks.notification',
'tasks.reaper_tasks',
'tasks.task_scheduler',
'tasks.registry_images',
'tasks.running_notification',
'tasks.user_act... |
0a0123f4ae4f6d1a409d769cf0ea52009c91fb1b | 5a6ccde5f37cc86b6fc0812b2bf40f42eab23906 | /C-set/785C. Anton and Fairy Tale.py | ec84a73c6b2ef9d32ced4b17bc6c5fcdbcd939e4 | [] | no_license | Waqar-107/Codeforces | 23f2b1edffb85f6f020107f03e09a455d3e6e792 | f0d2f25aa6a09c06083b82c39cdf3288ec2eecba | refs/heads/master | 2023-03-09T07:55:46.583363 | 2023-03-04T09:57:44 | 2023-03-04T09:57:44 | 82,915,896 | 196 | 138 | null | 2023-02-11T22:06:20 | 2017-02-23T10:29:34 | C++ | UTF-8 | Python | false | false | 317 | py | 785C. Anton and Fairy Tale.py | # from dust i have come, dust i will be
n, m = map(int, input().split())
hi = n
lo = m + 1
ans = n
while lo <= hi:
mid = (hi + lo) // 2
x = mid - m
temp = (x * (x + 1)) // 2
if n - m - temp <= 0:
ans = min(ans, mid)
hi = mid - 1
else:
lo = mid + 1
print(ans)
|
7780f11a8667d4ccca9dee906232ccfadc8b5c9c | ca8ecd3e65d79e96b4ef39a7ee2319b7a797e0f8 | /src/memote/experimental/medium.py | d162d9eddf39e8aa2b107234056673e4cde83f9d | [
"Apache-2.0"
] | permissive | opencobra/memote | 6567b8cc4bec81f6224b89ce833bb44cdeb1568a | 81a55a163262a0e06bfcb036d98e8e551edc3873 | refs/heads/develop | 2023-07-06T19:37:40.412301 | 2021-10-15T12:21:04 | 2021-10-15T14:42:39 | 58,705,171 | 109 | 26 | Apache-2.0 | 2023-09-13T13:33:28 | 2016-05-13T05:59:59 | HTML | UTF-8 | Python | false | false | 1,881 | py | medium.py | # -*- coding: utf-8 -*-
# Copyright 2018 Novo Nordisk Foundation Center for Biosustainability,
# Technical University of Denmark.
#
# 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... |
aad2f0e2543a4d774230898d977fb56455d226fe | a2b20597759990445081057d35d113434cfcf970 | /stubs/typeshed/typeshed/stubs/influxdb-client/influxdb_client/client/invokable_scripts_api.pyi | f4b85afbefb3fa73e4d5fd38b48a39c191dd0ad7 | [
"MIT",
"Apache-2.0"
] | permissive | facebook/pyre-check | 34059599c02b65605c574f13555229f3b931fd4e | fe8ccedc572cc1faa1fd01e9138f65e982875002 | refs/heads/main | 2023-09-03T19:10:11.587028 | 2023-09-02T07:40:35 | 2023-09-02T07:40:35 | 110,274,488 | 6,703 | 575 | MIT | 2023-09-13T17:02:32 | 2017-11-10T17:31:36 | OCaml | UTF-8 | Python | false | false | 1,546 | pyi | invokable_scripts_api.pyi | from _typeshed import Incomplete
from collections.abc import Generator, Iterator
from typing import Any
from influxdb_client import Script, ScriptCreateRequest, ScriptUpdateRequest
from influxdb_client.client._base import _BaseQueryApi
from influxdb_client.client.flux_table import CSVIterator, FluxRecord, TableList
c... |
98733bf3c7eaf5c6fb358c51f7b2380248e39414 | 96dcea595e7c16cec07b3f649afd65f3660a0bad | /tests/components/webostv/const.py | fbdb9c47c3b2d19ce1be7a21b3078dc0f66c5833 | [
"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 | 830 | py | const.py | """Constants for LG webOS Smart TV tests."""
from homeassistant.components.media_player import DOMAIN as MP_DOMAIN
from homeassistant.components.webostv.const import LIVE_TV_APP_ID
FAKE_UUID = "some-fake-uuid"
TV_NAME = "fake_webos"
ENTITY_ID = f"{MP_DOMAIN}.{TV_NAME}"
HOST = "1.2.3.4"
CLIENT_KEY = "some-secret"
CHAN... |
41e708c1dc549c6b7f15435b8f41b33b2249d71c | 6c066611b11a8de5e2c22c30cfcc578a4c49edce | /GLSL/Blur/Bilateral_GL/Bilateral_GL.py | cef4b432cf89565d88eb72b51657d1e404465dbc | [] | no_license | NatronGitHub/natron-plugins | ad2d9227637b4b86b45f92856fa54d327872a0a6 | b0c499fb6391024f54be9f26ed41b5cf7475d574 | refs/heads/master | 2022-12-12T10:02:20.252222 | 2022-11-30T02:29:04 | 2022-11-30T02:29:04 | 130,576,224 | 332 | 67 | null | 2022-11-30T02:29:05 | 2018-04-22T14:39:29 | Python | UTF-8 | Python | false | false | 17,450 | py | Bilateral_GL.py | # -*- coding: utf-8 -*-
# DO NOT EDIT THIS FILE
# This file was automatically generated by Natron PyPlug exporter version 10.
# Hand-written code should be added in a separate file named Bilateral_GLExt.py
# See http://natron.readthedocs.org/en/master/devel/groups.html#adding-hand-written-code-callbacks-etc
# Note tha... |
d438423d824bb33f4f8983535196fa2135ac6349 | e7f2a8c466c14b9821e59740ed0407107e1254a4 | /examples/rules/actions/actions.py | c7e37736402c5dec00dd59e4fb6ef3b7a50516a2 | [
"LicenseRef-scancode-generic-cla",
"Apache-2.0",
"MIT"
] | permissive | RasaHQ/rasa | 4a31134308a9a4d8824fe7faef02526accdd0f19 | 50857610bdf0c26dc61f3203a6cbb4bcf193768c | refs/heads/main | 2023-08-28T01:53:56.981600 | 2023-08-25T10:20:49 | 2023-08-25T10:20:49 | 70,908,208 | 13,167 | 3,739 | Apache-2.0 | 2023-09-14T09:54:40 | 2016-10-14T12:27:49 | Python | UTF-8 | Python | false | false | 881 | py | actions.py | from typing import Dict, Text, List
from rasa_sdk import Tracker
from rasa_sdk.events import EventType
from rasa_sdk.executor import CollectingDispatcher
from rasa_sdk import Action
from rasa_sdk.events import SlotSet
class ActionSwitchFAQ(Action):
def name(self) -> Text:
return "action_switch_faq"
... |
25269a29709130cd38d232604470b81878dd1300 | f305f84ea6f721c2391300f0a60e21d2ce14f2a5 | /11_动态规划/背包问题/01背包/1049. 最后一块石头的重量 II.py | d0de6d354b135fb5fbe11f2082a9f8a0e6b57dcc | [] | 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 | 548 | py | 1049. 最后一块石头的重量 II.py | # 1049. 最后一块石头的重量 II
from typing import List
INF = int(1e20)
class Solution:
def lastStoneWeightII(self, nums: List[int]) -> int:
dp = set([0])
for num in nums:
ndp = set()
for pre in dp:
ndp.add(pre + num)
ndp.add(pre - num... |
0ff0ac34a3d8b456076f5e9d5a8164b959e46dd1 | 52a677b94056d3397b4a499bc9185adb68a63f05 | /workers/buildlogsarchiver/test/test_buildlogsarchiver.py | 55194bbd5ee79162e5e13fca084d467da08658f1 | [
"Apache-2.0"
] | permissive | quay/quay | 9b6fcff54efc0dbf7c6d91fa80676950555b6f1a | e400a0c22c5f89dd35d571654b13d262b1f6e3b3 | refs/heads/master | 2023-08-28T15:08:38.001842 | 2023-08-28T13:52:31 | 2023-08-28T13:52:31 | 220,517,730 | 2,363 | 322 | Apache-2.0 | 2023-09-14T17:43:48 | 2019-11-08T17:37:05 | Python | UTF-8 | Python | false | false | 1,037 | py | test_buildlogsarchiver.py | from test.fixtures import *
from mock import Mock, patch
from app import storage
from workers.buildlogsarchiver.buildlogsarchiver import ArchiveBuildLogsWorker
from workers.buildlogsarchiver.models_pre_oci import pre_oci_model as model
def test_logarchiving(app):
worker = ArchiveBuildLogsWorker()
logs_mock ... |
81d47d12bb26f84fa59d30f8cec2bbe36a8285c5 | b964ac1b4c25dff0c45807f7132d64c941845d78 | /lyrebird/config/__init__.py | c64507f0e5cdc941cc8c2a0b2fec1c6e36f08ce1 | [
"MIT"
] | permissive | Meituan-Dianping/lyrebird | 6db7fe3be32d74565bbcaa0491f03dc72d506214 | b1ec5b081660c63e696454b63dd2f3c2b93a85d9 | refs/heads/master | 2023-08-25T14:44:01.580972 | 2023-08-23T10:04:00 | 2023-08-23T10:04:00 | 140,687,246 | 963 | 175 | MIT | 2023-09-11T09:10:58 | 2018-07-12T08:50:59 | Python | UTF-8 | Python | false | false | 9,173 | py | __init__.py | import json
import codecs
import jinja2
from os import path
from pathlib import Path
from copy import deepcopy
from packaging import version
from lyrebird import log as nlog
from lyrebird import application
from lyrebird.config.diff_mode import SettingDiffMode
from lyrebird.config.checker_switch import SettingCheckerS... |
83156cbe03bbe8135116df42a8a0c2c8ae5267a3 | e03bce53de6f88c0e09f56e4fe11c36af0f1161f | /typings/awacs/cassandra.pyi | 338ce43e8267894407dd08684ec7168102e91469 | [
"Apache-2.0"
] | permissive | onicagroup/runway | 20c31df9cbc1a1ffc5c9aa468ce5cf7d6ac7899f | 0763b06aee07d2cf3f037a49ca0cb81a048c5deb | refs/heads/master | 2023-08-30T22:35:54.113981 | 2023-08-29T14:13:35 | 2023-08-29T14:13:35 | 122,529,924 | 156 | 79 | Apache-2.0 | 2023-09-13T13:43:50 | 2018-02-22T20:12:55 | Python | UTF-8 | Python | false | false | 597 | pyi | cassandra.pyi | """
This type stub file was generated by pyright.
"""
from .aws import Action as BaseAction
from .aws import BaseARN
service_name = "Amazon Keyspaces (for Apache Cassandra)"
prefix = "cassandra"
class Action(BaseAction):
def __init__(self, action=...) -> None: ...
class ARN(BaseARN):
def __init__(self, reso... |
8fb9597377ec47a63145db12f97dc11b86a36218 | 952d8c37764393aa180f53ba4d31bec6c0806fd6 | /py-polars/tests/unit/io/test_lazy_json.py | 8c16e9039e2c93ce55615355be0af774b646d7e1 | [
"MIT"
] | permissive | pola-rs/polars | dff713f82f0cc29a98bc3f0e3ee3ba1e0fb49ef3 | c50c1e69bd36f60a8864ea49fe40d0e17503f11c | refs/heads/main | 2023-08-28T00:13:27.043234 | 2023-08-27T18:34:52 | 2023-08-27T18:34:52 | 263,727,855 | 18,211 | 1,202 | MIT | 2023-09-14T18:52:43 | 2020-05-13T19:45:33 | Rust | UTF-8 | Python | false | false | 2,841 | py | test_lazy_json.py | from __future__ import annotations
from typing import TYPE_CHECKING
import pytest
import polars as pl
from polars.testing import assert_frame_equal
if TYPE_CHECKING:
from pathlib import Path
@pytest.fixture()
def foods_ndjson_path(io_files_path: Path) -> Path:
return io_files_path / "foods1.ndjson"
def ... |
27363d98c53938099462ffd585c8a94e8e78bc23 | 7e521e8c2279f0893cc3a4dd1f30dd4540ba9120 | /addresses/models.py | c321d915bdbd495a73ceca12968d31bd702e40d6 | [
"Apache-2.0"
] | permissive | blockcypher/explorer | 9b95a526ad50f21dff33b840dc23ff8329fca1bb | 01f01c04e3b1f6893785a5e3ae949aa237760fb4 | refs/heads/master | 2023-08-30T00:07:47.074818 | 2023-07-10T15:39:04 | 2023-07-10T15:39:04 | 26,288,508 | 1,130 | 758 | Apache-2.0 | 2023-09-05T13:27:34 | 2014-11-06T20:28:27 | Python | UTF-8 | Python | false | false | 4,505 | py | models.py | from django.db import models
from django.utils.timezone import now
from blockcypher.constants import COIN_CHOICES, COIN_SYMBOL_MAPPINGS
from emails.trigger import send_and_log
class AddressSubscription(models.Model):
created_at = models.DateTimeField(auto_now_add=True, db_index=True)
unsubscribed_at = model... |
a92593587a0525cf4973999945fb20eff767650d | 6c066611b11a8de5e2c22c30cfcc578a4c49edce | /GLSL/Source/Crok_checkerboard_GL/Crok_checkerboard_GL.py | b86b30d27656bcb200e432660d17225a1425e84f | [] | no_license | NatronGitHub/natron-plugins | ad2d9227637b4b86b45f92856fa54d327872a0a6 | b0c499fb6391024f54be9f26ed41b5cf7475d574 | refs/heads/master | 2022-12-12T10:02:20.252222 | 2022-11-30T02:29:04 | 2022-11-30T02:29:04 | 130,576,224 | 332 | 67 | null | 2022-11-30T02:29:05 | 2018-04-22T14:39:29 | Python | UTF-8 | Python | false | false | 29,712 | py | Crok_checkerboard_GL.py | # -*- coding: utf-8 -*-
# DO NOT EDIT THIS FILE
# This file was automatically generated by Natron PyPlug exporter version 10.
# Hand-written code should be added in a separate file named Crok_checkerboard_GLExt.py
# See http://natron.readthedocs.org/en/master/devel/groups.html#adding-hand-written-code-callbacks-etc
# ... |
31bb94e1d75baa679b843e25022a45bd15433101 | 81e6b06b63ab06bcef6a86a91f17aa4a91ceac0a | /capture/noworkflow/tests/prov_definition/test_code_block_definition.py | 373d4bcc01d4b1f595c92bdde1b00b8e7cddda9e | [
"MIT"
] | permissive | gems-uff/noworkflow | 2abb27fb34d8634f79e025bab8b03ff4cc915111 | 32943ecbed699e9d4967ed17ff066ba005a7c24b | refs/heads/master | 2023-08-09T05:55:11.292961 | 2023-07-20T11:02:59 | 2023-07-20T11:02:59 | 12,629,378 | 119 | 34 | MIT | 2023-07-20T11:03:00 | 2013-09-05T21:28:10 | Jupyter Notebook | UTF-8 | Python | false | false | 15,577 | py | test_code_block_definition.py | # Copyright (c) 2016 Universidade Federal Fluminense (UFF)
# Copyright (c) 2016 Polytechnic Institute of New York University.
# This file is part of noWorkflow.
# Please, consult the license terms in the LICENSE file.
"""Test Code Block collection"""
from __future__ import (absolute_import, print_function,
... |
fa8c6065b68bbbdf4235ab8090b5226ba052c6bb | 9b1eda0abdc5dea7c6e9695ff4e1098abe0a708b | /src/textual/widgets/_radio_button.py | 4ba5763fd349aec6811712e6d8aecca2c8b17d9b | [
"MIT"
] | permissive | Textualize/textual | b8cf4b5d18069fccc7623b3116436f479e1ef446 | b74ac1e47fdd16133ca567390c99ea19de278c5a | refs/heads/main | 2023-08-30T21:40:21.563823 | 2023-08-30T10:18:27 | 2023-08-30T10:18:27 | 355,959,597 | 14,818 | 588 | MIT | 2023-09-14T20:22:02 | 2021-04-08T15:24:47 | Python | UTF-8 | Python | false | false | 1,022 | py | _radio_button.py | """Provides a radio button widget."""
from __future__ import annotations
from ._toggle_button import ToggleButton
class RadioButton(ToggleButton):
"""A radio button widget that represents a boolean value.
Note:
A `RadioButton` is best used within a [RadioSet][textual.widgets.RadioSet].
"""
... |
fa95e7478abf4a1674c1ad8ec0cd88bcec5b0618 | 5ef6c8d47864f471e26b9902d61f8c687e941f05 | /src/genie/libs/parser/nxos/tests/ShowInterface/cli/equal/golden10_expected.py | be36b1696868f97286844821d99e4e3e02d1b166 | [
"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 | 2,717 | py | golden10_expected.py | expected_output = {
"Ethernet1/1": {
"port_channel": {"port_channel_member": False},
"link_state": "down",
"oper_status": "down",
"enabled": True,
"dedicated_interface": True,
"types": "1000/10000 Ethernet",
"mac_address": "8c60.4fff.ea8f",
"phys_addre... |
58b00449cbfe80a8c1f376d30f44a05580db811d | 8a2474f61a49b0e24812456b34f59948b756a94e | /autotest/test_gwt_adv01_fmi.py | 84faee0f9a0c962096335f00798361f644a00a06 | [
"LicenseRef-scancode-warranty-disclaimer",
"CC0-1.0",
"LicenseRef-scancode-public-domain"
] | permissive | MODFLOW-USGS/modflow6 | 6e913abcab5c23686ed05b1cceac85f90282955d | 43f6198125867c487eedc64b17e9adaceb73f5ab | refs/heads/master | 2023-09-01T20:51:30.970467 | 2023-06-28T20:17:59 | 2023-06-28T20:17:59 | 116,149,490 | 158 | 111 | NOASSERTION | 2023-09-14T17:02:58 | 2018-01-03T15:00:55 | Fortran | UTF-8 | Python | false | false | 16,671 | py | test_gwt_adv01_fmi.py | """
MODFLOW 6 Autotest
Test the advection schemes in the gwt advection package for a one-dimensional
model grid of square cells.
"""
import os
import flopy
import numpy as np
import pytest
from flopy.utils.binaryfile import write_budget, write_head
from flopy.utils.gridutil import uniform_flow_field
from framework i... |
0630fcfec51aeb0633fd71acbf8e29ced45da02a | 522e6bf7de83177cf2288ff4f6310ee7484770cd | /tests/conftest.py | 6f0c1be6ed20ddf83be25e4e1179b6091a1abcf7 | [
"MIT"
] | permissive | alisaifee/limits | a123f97d72904f924c23536746f6972b218df95a | ada96bb4afc9729b4aac2552209a78428a27c313 | refs/heads/master | 2023-09-04T05:04:44.284239 | 2023-08-31T14:36:32 | 2023-08-31T14:36:32 | 28,948,972 | 265 | 57 | MIT | 2023-09-11T20:29:47 | 2015-01-08T04:34:40 | Python | UTF-8 | Python | false | false | 8,627 | py | conftest.py | import os
import platform
import socket
import time
import etcd3
import pymemcache
import pymemcache.client
import pymongo
import pytest
import redis
import redis.sentinel
def check_redis_cluster_ready(host, port):
try:
return redis.Redis(host, port).cluster("info")["cluster_state"] == "ok"
except Ex... |
c781c5feabf4b2b6493740836120589acb9f35aa | 8ca19f1a31070738b376c0370c4bebf6b7efcb43 | /office365/sharepoint/base_entity.py | f08e9719b1bee4e5276de9ac4a43e38936d59db1 | [
"MIT"
] | permissive | vgrem/Office365-REST-Python-Client | 2ef153d737c6ed5445ba1e446aeaec39c4ef4ed3 | cbd245d1af8d69e013c469cfc2a9851f51c91417 | refs/heads/master | 2023-09-02T14:20:40.109462 | 2023-08-31T19:14:05 | 2023-08-31T19:14:05 | 51,305,798 | 1,006 | 326 | MIT | 2023-08-28T05:38:02 | 2016-02-08T15:24:51 | Python | UTF-8 | Python | false | false | 1,343 | py | base_entity.py | from office365.runtime.client_object import ClientObject
from office365.runtime.queries.delete_entity import DeleteEntityQuery
from office365.runtime.queries.update_entity import UpdateEntityQuery
class BaseEntity(ClientObject):
"""SharePoint specific entity"""
def with_credentials(self, credentials):
... |
387b586bbde5d22b5d04eabbc7e47bddd40a657c | f9d564f1aa83eca45872dab7fbaa26dd48210d08 | /huaweicloud-sdk-roma/huaweicloudsdkroma/v2/model/show_app_bound_app_quota_response.py | b2bc4f562987dc7f119ecfe46248051cf47f4608 | [
"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 | 10,881 | py | show_app_bound_app_quota_response.py | # coding: utf-8
import six
from huaweicloudsdkcore.sdk_response import SdkResponse
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
class ShowAppBoundAppQuotaResponse(SdkResponse):
"""
Attributes:
openapi_types (dict): The key is attribute name
an... |
1c35ab79d2407d00912bd1de8a96f73e7f06432d | f767e709ea95e9f5a995118dfde5a70590a19abe | /clearml/utilities/process/mp.py | 24baec764d01bc27644a1be6b4d8447eff50dec5 | [
"Apache-2.0"
] | permissive | allegroai/clearml | f0d0439f933539d8bbc6b7229bceec385dcd35d7 | 095997492008f332a063ccc0086b4aac000c6218 | refs/heads/master | 2023-08-28T21:09:30.097330 | 2023-08-24T10:55:05 | 2023-08-24T10:55:05 | 191,126,383 | 2,777 | 438 | Apache-2.0 | 2023-09-09T19:17:51 | 2019-06-10T08:18:32 | Python | UTF-8 | Python | false | false | 29,304 | py | mp.py | import os
import pickle
import struct
import sys
from functools import partial
from multiprocessing import Process, Semaphore, Event as ProcessEvent
from threading import Thread, Event as TrEvent, RLock as ThreadRLock
from time import sleep, time
from typing import List, Dict, Optional
import psutil
from six.moves.que... |
f8e0a532a300a637552c1d6efaa9d425f2f85786 | 0711bf74bec3c4e34101a9a76d1b55058ae295f0 | /skgstat/plotting/variogram_plot.py | 5b5f4b2beeb2b5713358c76e5e2c88ae9d3f215f | [
"MIT"
] | permissive | mmaelicke/scikit-gstat | 03282ac578c15491c8a78676266f7631d71e0946 | 01e13feea26b9d22312516d2e1167b3d9881ad00 | refs/heads/main | 2023-08-17T23:34:48.240130 | 2023-08-01T06:13:56 | 2023-08-01T06:13:56 | 98,853,365 | 196 | 54 | MIT | 2023-08-22T23:23:11 | 2017-07-31T05:59:40 | Jupyter Notebook | UTF-8 | Python | false | false | 5,433 | py | variogram_plot.py | import numpy as np
import matplotlib.pyplot as plt
try:
from plotly.subplots import make_subplots
import plotly.graph_objects as go
except ImportError:
pass
def __calculate_plot_data(variogram):
# get the parameters
_bins = variogram.bins
_exp = variogram.experimental
x = np.linspace(0, n... |
e126b1cf172f3d1e3c1d87314edb84ffbaf7a738 | dac3b9a30096080275c9de63f9c8c081305a837e | /src/utils/log.py | 21c8ca402f1d5223245398d44702d89b64ecec54 | [
"MIT"
] | permissive | Karmenzind/fp-server | 6d7caee8bc6b8f1fc092ce1f1f66d39e39a07c6b | 931fca8fab9d7397c52cf9e76a76b1c60e190403 | refs/heads/master | 2023-05-31T05:06:22.985030 | 2021-12-15T06:10:04 | 2021-12-15T06:10:04 | 135,252,696 | 180 | 46 | MIT | 2023-05-25T17:17:45 | 2018-05-29T06:42:59 | Python | UTF-8 | Python | false | false | 3,138 | py | log.py | # -*- coding:utf-8 -*-
"""
日志打印
"""
import logging
import os
import sys
from tornado import log
from tornado.options import options
def initLogger(log_level='debug', log_path=None, logfile_name=None):
""" 初始化日志输出
@param log_level 日志级别 debug info
@param log_path 日志输出路径
@param logfile_name 日志文件名
... |
ccd3224867da89519fdf6a093ed9cd57933e1611 | a3d6556180e74af7b555f8d47d3fea55b94bcbda | /extensions/common/api/externs_checker_test.py | 62623d97b2a21d5c0f73ccd25a2bcbb193ee66ae | [
"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 | 2,583 | py | externs_checker_test.py | #!/usr/bin/env python
# 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.
import os
import sys
import unittest
from externs_checker import ExternsChecker
sys.path.append(
os.path.join(os.path.dirname(os.path.abspath(__file__)... |
8b902bfbc8da1f8f8433e696972e621fe15cfee3 | aa4c2e6ba174ac8de4b0b053f54a26006f74d682 | /cpp/transfer-learning/convert.py | 59dbe4d8e7c4c3e50aa8dd80e37b33c92ee5c600 | [
"BSD-3-Clause"
] | permissive | pytorch/examples | cde8a193c6e25e918a16aabf049d887ce3e969e0 | 13009eff7a80ebcf6ae89ed217d5d176bd3e019d | refs/heads/main | 2023-08-28T10:01:58.283401 | 2023-08-20T05:29:44 | 2023-08-20T05:29:44 | 66,424,871 | 22,842 | 11,294 | BSD-3-Clause | 2023-09-14T01:25:01 | 2016-08-24T03:12:48 | Python | UTF-8 | Python | false | false | 556 | py | convert.py | """
This python script converts the network into Script Module
"""
import torch
from torchvision import models
# Download and load the pre-trained model
model = models.resnet18(pretrained=True)
# Set upgrading the gradients to False
for param in model.parameters():
param.requires_grad = False
# Save the model excep... |
43f289bd6c29508b4765c06e6a31594eb1b0350e | 82b05fc158acbb10263a9e2415caf31ed4ea1ff4 | /graphbrain/__init__.py | 2de606c233344faaaf3b42dea2f3711630fcc5ec | [
"MIT"
] | permissive | graphbrain/graphbrain | e655de5c9f7d755b7a34649a461762d7def501ff | 8cb019eeea4bfba036f66ca742f1b4c3fc2c9c6a | refs/heads/master | 2023-09-04T04:07:04.985162 | 2023-07-19T12:41:20 | 2023-07-19T12:41:20 | 51,751,006 | 534 | 60 | MIT | 2023-03-10T21:32:47 | 2016-02-15T11:25:11 | Python | UTF-8 | Python | false | false | 1,048 | py | __init__.py | from contextlib import contextmanager
from graphbrain.hyperedge import hedge
import graphbrain.memory.leveldb
import graphbrain.memory.sqlite
def hgraph(locator_string):
"""Returns an instance of Hypergraph identified by the locator_string.
The hypergraph will be created if it does not exist.
The locati... |
9d18cad747ec04884b62304347be211f957c399f | e7efae2b83216d9621bd93390959d652de779c3d | /silk/tests/test_unit.py | 283b1f9f09760fa26964436d80ee3d2d3bc4ed00 | [
"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 | 8,173 | py | test_unit.py | # (C) Datadog, Inc. 2023-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
import logging
from copy import deepcopy
from itertools import chain
import mock
import pytest
from datadog_checks.base import ConfigurationError
from datadog_checks.silk import SilkCheck
from datadog_ch... |
8eb3e4d98902d64e0ab9e39ec6e8741de91186d7 | c4039d6c964407d74d8625d340d90586a611c3c7 | /utils/data_loader.py | cae393b84b1ab6fa6e663e133b69363156a4ed26 | [
"MIT"
] | permissive | Zeleni9/pytorch-wgan | 2874878a1c5947bfd94e83838f2f6c6f7394804e | d5b9b4db573f2efbfa56e115d46b28d1f0465312 | refs/heads/master | 2023-04-06T03:55:31.771605 | 2022-01-06T14:30:50 | 2022-01-06T14:30:50 | 122,645,948 | 612 | 155 | MIT | 2023-03-25T01:34:09 | 2018-02-23T16:32:34 | Python | UTF-8 | Python | false | false | 2,211 | py | data_loader.py | import torchvision.datasets as dset
import torchvision.transforms as transforms
import torch.utils.data as data_utils
from utils.fashion_mnist import MNIST, FashionMNIST
def get_data_loader(args):
if args.dataset == 'mnist':
trans = transforms.Compose([
transforms.Resize(32),
tran... |
36e8826591d0ea93dfdeb63f273ec9eae2c0ebd8 | 4dadda8e524c1b745f68d8d9bb1fb2840c91bb84 | /tools/legacy/trng_test.py | dc1770eaabc7ecec0a6c09777a60cefcd4a543ba | [
"Apache-2.0"
] | permissive | betrusted-io/xous-core | 74e684833378c44718c68a993357477812444607 | f17ce555f7539b534b910fe832d273afe5ad27fc | refs/heads/main | 2023-09-03T04:15:16.852337 | 2023-08-14T06:22:19 | 2023-08-14T06:22:19 | 246,203,193 | 439 | 72 | null | 2023-09-12T11:56:31 | 2020-03-10T03:52:58 | Rust | UTF-8 | Python | false | false | 13,419 | py | trng_test.py | #! /usr/bin/env python3
import argparse
import usb.core
import usb.util
import array
import sys
import hashlib
import csv
import time
from progressbar.bar import ProgressBar
class PrecursorUsb:
def __init__(self, dev):
self.dev = dev
self.RDSR = 0x05
self.RDSCUR = 0x2B
self.RDID ... |
663e1b41bb2150055a61534464c3016787cb1752 | d46844ac1c4230579d6c87d800e07fb41bc99592 | /pwncat/modules/linux/enumerate/system/process.py | eb7b9c5d699856ff839fbc1d9fbae0051407c318 | [
"MIT"
] | permissive | calebstewart/pwncat | 14ade3e424fb70ce3e62b8b5c5053959515799e7 | 37f04d4e16ff47c7fd70e95162f9fccd327cca7e | refs/heads/master | 2023-08-14T04:27:04.773361 | 2022-03-21T20:35:00 | 2022-03-21T20:35:00 | 261,925,766 | 2,177 | 267 | MIT | 2023-05-19T04:33:17 | 2020-05-07T02:02:40 | Python | UTF-8 | Python | false | false | 2,779 | py | process.py | #!/usr/bin/env python3
import shlex
from typing import List
from pwncat.db import Fact
from pwncat.platform.linux import Linux
from pwncat.modules.enumerate import Schedule, EnumerateModule
class ProcessData(Fact):
"""A single process from the `ps` output"""
def __init__(self, source, uid, username, pid, p... |
edb65d807cd8b4bd3d90b99a512a318e04700baa | 5130754859e274cd06f63260439e5203c2000a11 | /stubs/firebase_admin/__init__.pyi | 51fa236c8f67fb736878e35affa48a5fc66585db | [
"Apache-2.0"
] | permissive | oppia/oppia | 8ebc9c7c7f2b336e9a79ce04533abe3956f48cbe | d16fdf23d790eafd63812bd7239532256e30a21d | refs/heads/develop | 2023-09-04T07:50:13.661276 | 2023-09-03T09:21:32 | 2023-09-03T09:21:32 | 40,687,563 | 6,172 | 4,666 | Apache-2.0 | 2023-09-14T18:25:11 | 2015-08-14T00:16:14 | Python | UTF-8 | Python | false | false | 384 | pyi | __init__.pyi | from typing import Any, Dict, Optional
class App:
name: str = ...
credential: Optional[object] = ...
options: Optional[Dict[str, Any]] = ...
project_id: str = ...
def get_app(name: Optional[str] = ...) -> App: ...
def initialize_app(
credential: Optional[object] = ...,
options: Option... |
ecf7fd991af47247f37908d33b884c98894d4a3e | fbbe424559f64e9a94116a07eaaa555a01b0a7bb | /Tensorflow/source/tensorflow/contrib/timeseries/python/timeseries/model.py | b32b5c5494ae14187954b900119678a5b53a3602 | [
"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 | 35,555 | py | model.py | # Copyright 2017 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... |
e27395482725a67e5c5b5d64b5a3e0c2f7c0be9a | b8cc7f50628eb2f6b4fdbd66eae5a1aa502cc309 | /locale/Locale.py | 1c7c9b7c629a81f5a8b7de8413f30cc190a52cd2 | [
"BSD-3-Clause",
"LicenseRef-scancode-scintilla",
"MIT",
"BSD-2-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | zufuliu/notepad2 | ad82f2baaf60cd9efcbf3af57d2e2f381f961f0b | 6296f4a8567d2c22690be0cafcdf91a0fea60cc7 | refs/heads/main | 2023-08-29T03:45:42.292846 | 2023-08-28T10:33:46 | 2023-08-28T10:33:46 | 79,987,996 | 2,154 | 227 | NOASSERTION | 2023-08-11T23:59:02 | 2017-01-25T06:07:49 | C++ | UTF-8 | Python | false | false | 14,852 | py | Locale.py | #!/usr/bin/env python3
import sys
import os.path
import re
import shutil
import uuid
import subprocess
app = os.path.basename(__file__)
localeDir = os.getcwd()
notepad2_src = os.path.abspath('../src/Notepad2.rc')
metapath_src = os.path.abspath('../metapath/src/metapath.rc')
def get_available_locales():
result = []
... |
7863dde21dfbaa8f6b213507664d96841ae7c5ac | cb6d0a660cfcb28ee9e8a1c0266925f8f541edfb | /tests/python/test_lpm_trie.py | 02d9d83baa99fa3b6d61d3d4c8d6fa4846dc207e | [
"LicenseRef-scancode-proprietary-license",
"GPL-1.0-or-later",
"BSD-3-Clause",
"LicenseRef-scancode-other-copyleft",
"GPL-2.0-only",
"Apache-2.0"
] | permissive | iovisor/bcc | 0e002769364523caeb731216021b0a3c881a723f | ec49363e2e9daec026ee6cae4c5fc316f8fab0ff | refs/heads/master | 2023-09-03T22:37:47.238198 | 2023-08-31T14:44:55 | 2023-09-01T11:21:30 | 34,921,116 | 18,467 | 3,907 | Apache-2.0 | 2023-09-13T21:22:53 | 2015-05-01T19:52:32 | C | UTF-8 | Python | false | false | 2,202 | py | test_lpm_trie.py | #!/usr/bin/env python3
# Copyright (c) 2017 Facebook, Inc.
# Licensed under the Apache License, Version 2.0 (the "License")
import ctypes as ct
import os
from unittest import main, skipUnless, TestCase
from utils import kernel_version_ge
from bcc import BPF
from netaddr import IPAddress
class KeyV4(ct.Structure):
... |
1a002de22b81fffb0bc6a3e65df640fc47a446fa | e8b38b8dfa348ff006eb197a7906ca8e491a23dc | /tests/epyccel/modules/call_user_defined_funcs.py | 0773f5e116fbaa16aa5e42d8196bf2420589f5d1 | [
"MIT"
] | permissive | pyccel/pyccel | d79a81dbdff1172839a6a1227abfcc1f97e6c97b | 1896b761ba662c90b14c195bbb6eb5cddc57cbfc | refs/heads/devel | 2023-08-30T12:15:25.244401 | 2023-08-28T09:31:32 | 2023-08-28T09:31:32 | 100,463,736 | 307 | 39 | MIT | 2023-09-14T19:29:26 | 2017-08-16T07:59:14 | Python | UTF-8 | Python | false | false | 788 | py | call_user_defined_funcs.py | # pylint: disable=missing-function-docstring, missing-module-docstring
# This module test call user defined functions
# through nested functions
def do_nothing():
x = 0
x *= 0
def not_change(s : 'float'):
s *= s
def my_div(a : 'float', b : 'float'):
return a / b
def my_mult(a : 'float', b : 'float'... |
8ddd1dad90b3d618e546d388ec887c9cd36b5708 | b60f84142c6a704621a49522ed1364439a38be19 | /litedram/core/multiplexer.py | a0e9df6760689f186ab3c8dea67b52ecdf7f574f | [
"BSD-2-Clause",
"BSD-3-Clause"
] | permissive | enjoy-digital/litedram | cf0ad16a6a7b22b5b5257af313ed59f3f2bba477 | ed81c8cc861ae14e44b2df83adce3ff39ca7f7ac | refs/heads/master | 2023-09-04T06:27:33.897454 | 2023-08-29T14:48:10 | 2023-08-29T14:48:10 | 31,147,284 | 321 | 111 | NOASSERTION | 2023-07-07T06:53:26 | 2015-02-22T00:43:35 | Python | UTF-8 | Python | false | false | 16,755 | py | multiplexer.py | #
# This file is part of LiteDRAM.
#
# Copyright (c) 2015 Sebastien Bourdeauducq <sb@m-labs.hk>
# Copyright (c) 2016-2019 Florent Kermarrec <florent@enjoy-digital.fr>
# Copyright (c) 2018 John Sully <john@csquare.ca>
# SPDX-License-Identifier: BSD-2-Clause
"""LiteDRAM Multiplexer."""
import math
from functools import... |
c4b19cb4ce7d002fd3b9503c92e62f8ec9df3f05 | c61a4403e4925fb9c80447c982ee7f597eaf4862 | /visual/visual_human.py | 96bc6c43c97bef13190b969ed3cbc7cb17a965c6 | [
"MIT"
] | permissive | williamSYSU/TextGAN-PyTorch | f7c149fcc4032e73050acb8f6b0384ad054fd5ec | 7ff8909e92fe01160275a6d62a34ffdfcc018bca | refs/heads/master | 2023-07-20T13:33:17.573605 | 2023-02-02T02:54:25 | 2023-02-02T02:54:25 | 178,318,753 | 865 | 224 | MIT | 2023-07-06T13:04:26 | 2019-03-29T02:36:16 | Python | UTF-8 | Python | false | false | 2,458 | py | visual_human.py | import matplotlib.pyplot as plt
import numpy as np
n_groups = 2
# a=(2.751,,,,)
SeqGAN = 2.588
RankGAN = 0.449
LeakGAN = 3.011
RelGAN = 3.407
means_men = 20
means_women = 25
SentiGAN = 3.117
CSGAN = 2.017
CatGAN_s = 3.601
CatGAN_m = 3.411
# plt.figure(figsize=(10, 100))
fig, ax = plt.subplots(figsize=(6, 3))
ind... |
6eceac8975f585189168179ec02dd7f730a0c2d7 | 7a6b4705293709e32a6927ad4f76eb0549f3bea9 | /orchestra/tests/helpers/notifications.py | 793a2eb9a82852e104ecd2a223f8131579c3e8c6 | [
"Apache-2.0",
"CC-BY-3.0"
] | permissive | b12io/orchestra | a71941d80d1eeddb73f301da8f601b2c31a4b279 | ee8a29122a3491feae1e1c2c4699142726ae6c21 | refs/heads/main | 2023-08-20T17:46:36.360755 | 2023-06-27T13:32:46 | 2023-06-27T13:32:46 | 42,593,972 | 459 | 66 | Apache-2.0 | 2023-06-27T13:32:48 | 2015-09-16T14:55:16 | Python | UTF-8 | Python | false | false | 384 | py | notifications.py | class MockMail:
def __init__(self):
self.inbox = []
def send_mail(self, recipient_list, **kwargs):
for recipient in recipient_list:
self.inbox.append({
'recipient': recipient,
'subject': kwargs['subject'],
'message': kwargs['message']
... |
414aaf398e3e4a435718c3923a2ab3bd1ee72ccd | fbbe424559f64e9a94116a07eaaa555a01b0a7bb | /Pandas_numpy/source/pandas/core/indexes/accessors.py | 2176338574304a21752ee30843aeb1037b391f54 | [
"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 | 7,815 | py | accessors.py | """
datetimelike delegation
"""
import numpy as np
from pandas.core.dtypes.common import (
is_period_arraylike,
is_datetime_arraylike, is_integer_dtype,
is_datetime64_dtype, is_datetime64tz_dtype,
is_timedelta64_dtype, is_categorical_dtype,
is_list_like)
from pandas.core.accessor import PandasDel... |
8b2fe18a12eafa35398360f6e569a220e3450582 | 975b2d421d3661e6770b601929d5f11d981d8985 | /msgraph/generated/models/item_activity_stat.py | 8b52a48e3a4ec6af655905103d13a92cdf32380a | [
"MIT"
] | permissive | microsoftgraph/msgraph-sdk-python | a7c551b85daadeebf76ec4ae12668664ea639b42 | 27de7ccbe688d7614b2f6bde0fdbcda4bc5cc949 | refs/heads/main | 2023-09-03T21:45:27.989672 | 2023-08-31T06:22:18 | 2023-08-31T06:22:18 | 534,665,999 | 135 | 18 | MIT | 2023-09-14T11:04:11 | 2022-09-09T14:00:17 | Python | UTF-8 | Python | false | false | 4,958 | py | item_activity_stat.py | from __future__ import annotations
import datetime
from dataclasses import dataclass, field
from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter
from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union
if TYPE_CHECKING:
from .entity import Entity
from .incom... |
57bf1740ef5fd46ce70773388281a1dd05c0c37f | 767c07db1fb131047af3d9b0a065b8fdc8aac9ab | /73-mpl/plot-Links.py | 63faed472990f6f6a2b2feb352c342a47abda652 | [] | no_license | DUanalytics/pyAnalytics | e52c5469da30a5f436ec0f3120d9f15fb82fd9b3 | 107a08bebe46ea51afccfeae4a666213bb405d41 | refs/heads/master | 2023-07-08T04:32:54.758902 | 2023-07-03T14:37:04 | 2023-07-03T14:37:04 | 202,094,535 | 394 | 31 | null | null | null | null | UTF-8 | Python | false | false | 147 | py | plot-Links.py | #PLots Links
#-----------------------------
#%
https://www.machinelearningplus.com/plots/matplotlib-tutorial-complete-guide-python-plot-examples/
|
0586ce8886ee5214ad685e82afcc2eec46cf03ec | 1ed25da5d1e27cd49fb4a02acfe99aadcf2fae57 | /pygeoapi/process/manager/__init__.py | 2019a54b7e7860562fd29858f2289ce8aa21926c | [
"MIT"
] | permissive | geopython/pygeoapi | 6d2a7b0e8fe75d0c454a0b2fc3599a0b88c7567f | 2d3ec88320cf5e1ed47b4b794f40b453bad487e2 | refs/heads/master | 2023-09-04T04:30:59.768950 | 2023-09-03T02:00:23 | 2023-09-03T02:00:23 | 121,585,259 | 391 | 245 | MIT | 2023-09-13T18:13:00 | 2018-02-15T02:46:27 | Python | UTF-8 | Python | false | false | 2,357 | py | __init__.py | # =================================================================
#
# Authors: Tom Kralidis <tomkralidis@gmail.com>
# Ricardo Garcia Silva <ricardo.garcia.silva@geobeyond.it>
#
# Copyright (c) 2019 Tom Kralidis
# (c) 2023 Ricardo Garcia Silva
#
# Permission is hereby granted, free of charge, to any... |
88e00c6beee1aa2bf4962ac7df5f6c20b0d6c321 | 56d6257e932e1397ab03b1e7ccc6231378665b04 | /APC40/TransportComponent.py | fe8d5a18ccb63a88ced14942861546d146de03cb | [] | no_license | gluon/AbletonLive10.1_MIDIRemoteScripts | e6c8dc4956cff9630aaa36f3667994387ad1d0cf | 2468b51eba7e5082b06f9e381b3e72027c5f272c | refs/heads/master | 2023-01-10T18:37:46.504180 | 2022-12-23T09:21:48 | 2022-12-23T09:21:48 | 213,423,555 | 205 | 59 | null | 2021-02-12T16:15:01 | 2019-10-07T15:44:52 | Python | UTF-8 | Python | false | false | 2,020 | py | TransportComponent.py | #Embedded file name: /Users/versonator/Jenkins/live/output/Live/mac_64_static/Release/python-bundle/MIDI Remote Scripts/APC40/TransportComponent.py
from __future__ import absolute_import, print_function, unicode_literals
import Live
from _Framework.Control import ButtonControl
from _Framework.TransportComponent import ... |
2edc98bdfcbac7f70eb220579798d1079ce95147 | 902eb0e21020148d164e5a49694980315213188b | /anymail/backends/test.py | 3a9d5353657ca17a1abb0b5e4785540fd88249ea | [
"BSD-3-Clause",
"BSD-2-Clause"
] | permissive | anymail/django-anymail | 4ca8dfff50ea2a2987b389693e46748e7717367d | 42dbfcf2c45f38a004a1f576dad38e7ad5d554cb | refs/heads/main | 2023-09-01T06:52:35.147257 | 2023-08-25T19:19:05 | 2023-08-25T19:35:08 | 53,549,881 | 1,556 | 150 | NOASSERTION | 2023-08-25T19:35:09 | 2016-03-10T02:55:09 | Python | UTF-8 | Python | false | false | 5,663 | py | test.py | from django.core import mail
from ..exceptions import AnymailAPIError
from ..message import AnymailRecipientStatus
from .base import AnymailBaseBackend, BasePayload
class EmailBackend(AnymailBaseBackend):
"""
Anymail backend that simulates sending messages, useful for testing.
Sent messages are collecte... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.