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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
c75bfdc06dfb4e402a4db55629be9e86aba8c74d | 7b7c570b30d6d7a0e9b904c7cb378cfb0d0f0e07 | /tests/resources/mlflow-test-plugin/mlflow_test_plugin/dummy_backend.py | 2417846989c7adc574682b462c86ad90345fe275 | [
"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,109 | py | dummy_backend.py | from mlflow.entities import RunStatus
from mlflow.projects.backend.abstract_backend import AbstractBackend
from mlflow.projects.submitted_run import SubmittedRun
from mlflow.projects.utils import fetch_and_validate_project, get_or_create_run
class DummySubmittedRun(SubmittedRun):
"""
A run that just does noth... |
ce109b652247ba75087cd3ce085fbc978a88a557 | 045ec3ae16fc554a05510abc3697557ebc5ce304 | /CIME/SystemTests/seq.py | 304932d7d1484f9af3c575b6d94cba054fe6d4a1 | [
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause"
] | permissive | ESMCI/cime | c09223ee9b8a463bd00741ff39f60fda7639af89 | 02fad90a379cdbd3c1106cbd63324480f0bf7a22 | refs/heads/master | 2023-08-16T07:03:22.224344 | 2023-08-03T19:47:53 | 2023-08-03T19:47:53 | 31,605,662 | 159 | 179 | NOASSERTION | 2023-09-12T18:38:42 | 2015-03-03T15:33:00 | Python | UTF-8 | Python | false | false | 1,790 | py | seq.py | """
sequencing bfb test (10 day seq,conc tests)
"""
from CIME.XML.standard_module_setup import *
from CIME.SystemTests.system_tests_compare_two import SystemTestsCompareTwo
logger = logging.getLogger(__name__)
class SEQ(SystemTestsCompareTwo):
def __init__(self, case, **kwargs):
"""
initialize an... |
a87d53d07e9ef74429960ff9b6353b1f40a77c59 | 8e6bb9c1a620a162b7d017c2373dd01be54ea86d | /bio/pyroe/makeunspliceunspliced/test/Snakefile | 7b0ffdd046aaa1261091016a82690e86bb8e0652 | [] | no_license | snakemake/snakemake-wrappers | 5d0963502c26eb709513567e25422871fe477cf2 | 996bdcf2a96535b967dfa483c363a5496f4b3906 | refs/heads/master | 2023-08-19T05:18:44.337503 | 2023-08-18T12:03:38 | 2023-08-18T12:03:38 | 213,319,194 | 184 | 189 | null | 2023-09-12T11:38:35 | 2019-10-07T07:20:59 | CAP CDS | UTF-8 | Python | false | false | 664 | Snakefile |
rule test_pyroe_makesplicedunspliced:
input:
fasta="genome.fasta",
gtf="annotation.gtf",
spliced="extra_spliced.fasta", # Optional path to additional spliced sequences (FASTA)
unspliced="extra_unspliced.fasta", # Optional path to additional unspliced sequences (FASTA)
output:
... | |
93ddf6c7774c6bdd1aa8e82e782cc3f7508e893e | f487532281c1c6a36a5c62a29744d8323584891b | /sdk/python/pulumi_azure/appplatform/outputs.py | 6dab0c986249cef9444f16192288cd4f2bacacde | [
"BSD-3-Clause",
"MPL-2.0",
"Apache-2.0"
] | permissive | pulumi/pulumi-azure | a8f8f21c46c802aecf1397c737662ddcc438a2db | c16962e5c4f5810efec2806b8bb49d0da960d1ea | refs/heads/master | 2023-08-25T00:17:05.290397 | 2023-08-24T06:11:55 | 2023-08-24T06:11:55 | 103,183,737 | 129 | 57 | Apache-2.0 | 2023-09-13T05:44:10 | 2017-09-11T20:19:15 | Java | UTF-8 | Python | false | false | 124,866 | py | outputs.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... |
b5c1b3397a031519bb2e3488c1d1f8f16a73cda4 | 0760fb4901a75766921a205b55686d6d6f049b30 | /rllib/algorithms/pg/tests/test_pg.py | 9a289c827bd0b98cced58d854192d91f390bffbc | [
"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 | 8,122 | py | test_pg.py | from gymnasium.spaces import Box, Dict, Discrete, Tuple
import numpy as np
import unittest
import ray
import ray.rllib.algorithms.pg as pg
from ray.rllib.evaluation.postprocessing import Postprocessing
from ray.rllib.examples.env.random_env import RandomEnv
from ray.rllib.models.tf.tf_action_dist import Categorical
fr... |
8a5865032fa7cb33162cbb46b1dca9dc8b3131d0 | 8e68fa08e0275bb77a57f2dcb1b2082afbd928e9 | /tests/test_tokenizer.py | 6eddf6e81c974a8eb961439347987ce4e93401f4 | [
"MIT"
] | permissive | marcelm/cutadapt | a892a871ed8b5b8491c2177ede43a6ebe0b43810 | cefb3e0bc6bacf5e15a842174502852466bd6990 | refs/heads/main | 2023-09-01T08:14:21.694545 | 2023-08-31T08:18:46 | 2023-08-31T08:18:46 | 4,577,614 | 450 | 165 | MIT | 2023-09-11T06:48:19 | 2012-06-06T20:26:25 | Python | UTF-8 | Python | false | false | 633 | py | test_tokenizer.py | import pytest
from cutadapt.tokenizer import tokenize_braces, StringToken, BraceToken, TokenizeError
def test_tokenize_braces():
tokenize = tokenize_braces
assert list(tokenize("")) == []
assert list(tokenize("text")) == [StringToken("text")]
assert list(tokenize("before {variable} after")) == [
... |
d1777ad1c9469b9d1654385378f064cb99d06564 | 484341c71d06ebe09adc1b8ee7691eb516e5bb3d | /src/fava/beans/helpers.py | 84f824816405bfc61564c04eda8920d305f1b0e8 | [
"MIT"
] | permissive | beancount/fava | 076aa5f279a6ef40bbd48eaac61e18afcdf8dac0 | 216d7ddf5796dd46f12515e8c2726692393e545b | refs/heads/main | 2023-09-06T05:13:11.284042 | 2023-09-04T19:01:37 | 2023-09-04T19:01:37 | 47,411,155 | 1,630 | 292 | MIT | 2023-09-13T16:18:23 | 2015-12-04T15:12:55 | Python | UTF-8 | Python | false | false | 544 | py | helpers.py | """Helpers for Beancount entries."""
from __future__ import annotations
from typing import Any
from typing import TypeVar
from fava.beans.abc import Directive
from fava.beans.abc import Posting
T = TypeVar("T", Directive, Posting)
def replace(entry: T, **kwargs: Any) -> T:
"""Create a copy of the given directi... |
bc4bb118200d20030b8fa9645ea32e8462082464 | 83b8b30ebb633eecd29ca0a7a20cc43a293c9333 | /tests/basics/frozenset_difference.py | bc8b9c21cc6684eb84b192ec77dfaa14f856dc82 | [
"MIT",
"GPL-1.0-or-later"
] | permissive | adafruit/circuitpython | 430ec895149d1eb814b505db39b4977a35ee88a7 | 506dca71b0cbb7af749bb51f86b01021db5483b3 | refs/heads/main | 2023-08-21T16:30:46.781068 | 2023-08-20T00:39:44 | 2023-08-20T00:39:44 | 66,166,069 | 3,806 | 1,560 | MIT | 2023-09-14T19:23:51 | 2016-08-20T20:10:40 | C | UTF-8 | Python | false | false | 434 | py | frozenset_difference.py | try:
frozenset
except NameError:
print("SKIP")
raise SystemExit
l = [1, 2, 3, 4]
s = frozenset(l)
outs = [s.difference(),
s.difference(frozenset({1})),
s.difference(frozenset({1}), [1, 2]),
s.difference(frozenset({1}), {1, 2}, {2, 3})]
for out in outs:
print(type(out), sorted(ou... |
79013f8f960cff6c8de0b30e0b69ce0d82559b0f | 7dfc958846a98c9dc90829ace237adb0f4e79057 | /tests/tasks/test_link.py | f56692a42bb0afef7b0a759c2926e7574f87e74c | [
"Apache-2.0"
] | permissive | ploomber/ploomber | b4fad542106ed85bb3a195f38ee547da111bd049 | 516b64e531b13eeda36b747a268506fa8dd4dc98 | refs/heads/master | 2023-08-08T07:18:12.419524 | 2023-08-03T04:40:19 | 2023-08-03T04:40:19 | 235,190,220 | 3,076 | 219 | Apache-2.0 | 2023-08-29T03:56:08 | 2020-01-20T20:13:06 | Python | UTF-8 | Python | false | false | 1,820 | py | test_link.py | from pathlib import Path
import pytest
from ploomber import DAG
from ploomber.tasks import Link, PythonCallable
from ploomber.products import File
# TODO: merge this with test_task_input.py and parametrize tests
def touch_root(product):
Path(str(product)).touch()
def touch(product, upstream):
Path(str(pr... |
19f10fe377cbe9664f9abfaf5b645863844f7037 | 0d9b5e2fa71b51b532f38d92ac7caff7d70f0110 | /playlistor/urls.py | 007ccd809e3a07657a5e8216154bae2bef43c0a0 | [
"MIT"
] | permissive | akornor/playlistor | 7edf05739bfb1acc51965c6724cba4e074c08387 | 2b9a6774bcdc3f4a788392f246f0b1a38d32064d | refs/heads/master | 2023-07-12T12:09:31.793107 | 2023-07-11T22:04:27 | 2023-07-11T22:04:27 | 161,928,541 | 362 | 29 | MIT | 2023-01-25T13:14:12 | 2018-12-15T17:30:44 | Python | UTF-8 | Python | false | false | 490 | py | urls.py | from django.urls import path, include
from main import views
urlpatterns = [
path("celery-progress/", include("celery_progress.urls"), name="celery-progress"),
path("login", views.login, name="login"),
path("expand", views.expand, name="expand"),
path("playlist", views.playlist, name="playlist"),
p... |
0a903d7d221bb7016a5f9ae99953eeb7552f5324 | 45434808785c1e76ee5992523cd5098eec138686 | /tests/test_readme.py | ef4338616a930c34ba2ee9f576e09a00312bb558 | [
"MIT"
] | permissive | EmilStenstrom/conllu | 7a14e77a44d95c165a107555a76eaaa08dd454cd | 1650915fd7edd883a63c3660d4c42277d8ca748b | refs/heads/master | 2023-09-01T15:41:20.388099 | 2023-08-02T02:22:52 | 2023-08-02T14:25:52 | 65,674,992 | 310 | 72 | MIT | 2023-08-02T14:25:54 | 2016-08-14T16:12:09 | Python | UTF-8 | Python | false | false | 1,656 | py | test_readme.py | import contextlib
import doctest
import os
import re
import tempfile
from doctest import OutputChecker
from pathlib import Path
from unittest import mock
class ReadmeOutputChecker(OutputChecker):
def check_output(self, want, got, optionflags):
# Allow dicts and lists to be formatted with whitespace around... |
34f151cd2138994b2f7b1edd732ca8f2de57f74d | 944a49e62bc79622fe01abee62403397a1b0504d | /openstackclient/tests/functional/network/v2/test_network_ndp_proxy.py | 62eecf869ffaaeec45fcb7445a73771af24f3cfb | [
"Apache-2.0"
] | permissive | openstack/python-openstackclient | 1c22984f9b29ae8ff9bbea26067981e2130ed039 | 78988d1786c0634ee055714910d1e6187f941673 | refs/heads/master | 2023-08-28T15:10:05.542862 | 2023-08-26T12:44:20 | 2023-08-26T12:44:20 | 4,170,310 | 286 | 224 | Apache-2.0 | 2022-09-19T13:29:49 | 2012-04-28T21:07:25 | Python | UTF-8 | Python | false | false | 9,357 | py | test_network_ndp_proxy.py | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... |
02e6206cd87c7b4cf77c1f7a35ae1814b9824952 | b40d1a26ea04a19ec0da7bf55db84b7ee36cc898 | /leetcode.com/python/406_Queue_Reconstruction_by_Height.py | 14327dae0b3f28a53d8f9fe35a3456521ab1e01c | [
"MIT"
] | permissive | partho-maple/coding-interview-gym | 5e8af7d404c28d4b9b52e5cffc540fd51d8025cf | 20ae1a048eddbc9a32c819cf61258e2b57572f05 | refs/heads/master | 2022-09-11T16:36:01.702626 | 2022-03-14T08:39:47 | 2022-03-14T08:39:47 | 69,802,909 | 862 | 438 | MIT | 2022-08-18T06:42:46 | 2016-10-02T14:51:31 | Python | UTF-8 | Python | false | false | 443 | py | 406_Queue_Reconstruction_by_Height.py | class Solution(object):
def reconstructQueue(self, people):
"""
:type people: List[List[int]]
:rtype: List[List[int]]
"""
people.sort(key = lambda x: (-x[0], x[1]))
output = []
for i in people:
output.insert(i[1], i)
return output
sol = ... |
62144df50ed7c6ba5700ec9ac33d62cd1beac6b8 | 9bc2e2961f6f7c4a47e6eebc897fbf14a4e85d61 | /studio/storage/storage_type.py | 099e1dd0e416543edd6bc7bfa47d08d104500ca6 | [
"Apache-2.0"
] | permissive | studioml/studio | 9ee8fd12a9fa0ac09144e2520b1a3be8756ab2fa | e8aedf9c15baa872eb7aee4d6b28ad6208a9fca2 | refs/heads/master | 2023-08-16T01:54:59.184542 | 2023-01-09T20:06:01 | 2023-01-09T20:06:01 | 91,284,550 | 406 | 59 | Apache-2.0 | 2023-09-06T17:23:10 | 2017-05-15T01:49:28 | Python | UTF-8 | Python | false | false | 200 | py | storage_type.py | from enum import Enum
class StorageType(Enum):
storageHTTP = 1
storageS3 = 2
storageLocal = 3
storageFirebase = 4
storageDockerHub = 5
storageSHub = 6
storageInvalid = 99 |
e4e4d461df9e02b6412c7847a3b41fe3a858f5b4 | 420e7db695f82c7cf9d29735df956fa86bc0f14f | /tests/test_dns_server.py | 4d2d0aa41fe2c8c9add4c5409980edfa80619c2f | [
"BSD-3-Clause"
] | permissive | Kkevsterrr/geneva | bf929e3056dc6215bca079f1fd587866907a1cd5 | 6b091060ed0946b98a2ff9196dfbf93d85cbb28a | refs/heads/master | 2023-08-23T22:30:49.750259 | 2023-05-18T21:24:14 | 2023-05-18T21:24:14 | 221,001,148 | 1,771 | 168 | BSD-3-Clause | 2023-05-26T10:04:58 | 2019-11-11T14:37:39 | Python | UTF-8 | Python | false | false | 17,303 | py | test_dns_server.py | # Scapy modules
from scapy.layers.dns import IP, UDP, raw, DNS as DNS_, DNSQR, struct
# DNS Modules
import dns.zone
# Import the root of the project: used to import DNSServer
import os
import sys
import inspect
import logging
import pytest
basepath = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentfr... |
33773c27a58711669b1b0ad2fcb0706a1f0e504b | 444a9480bce2035565332d4d4654244c0b5cd47b | /research/cv/AttGAN/preprocess.py | eb91b27f116dcc7ac00e8ff9142b6c828673e5ea | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-proprietary-license"
] | permissive | mindspore-ai/models | 7ede9c6454e77e995e674628204e1c6e76bd7b27 | eab643f51336dbf7d711f02d27e6516e5affee59 | refs/heads/master | 2023-07-20T01:49:34.614616 | 2023-07-17T11:43:18 | 2023-07-17T11:43:18 | 417,393,380 | 301 | 92 | Apache-2.0 | 2023-05-17T11:22:28 | 2021-10-15T06:38:37 | Python | UTF-8 | Python | false | false | 4,882 | py | preprocess.py | # Copyright 2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... |
8da89c18915a97732a6e79d90ada3a3e3efdf1cf | b28019656242b4245d31b4c9179c5aa20cf69801 | /lsp_model/__init__.py | 20e879b7ff0dedd01490b38a126e3d310edd4910 | [
"MIT",
"LicenseRef-scancode-generic-cla"
] | permissive | microsoft/DialoGPT | e45f859f4a9ce167b5f6be787323302d6535e9fe | 61194e44363a48b4cb323752a4bbb33c8a84a8a4 | refs/heads/master | 2023-09-04T06:39:30.550296 | 2022-10-17T23:41:52 | 2022-10-17T23:41:52 | 205,250,704 | 2,274 | 377 | MIT | 2022-09-09T20:29:15 | 2019-08-29T21:07:46 | Python | UTF-8 | Python | false | false | 401 | py | __init__.py | __version__ = "0.0.1"
from pytorch_pretrained_bert.tokenization_gpt2 import GPT2Tokenizer
from pytorch_pretrained_bert.file_utils import PYTORCH_PRETRAINED_BERT_CACHE, cached_path
from pytorch_pretrained_bert.modeling_gpt2 import GPT2Config, GPT2Model, GPT2Config
from pytorch_pretrained_bert.tokenization_gpt2 import GP... |
c1f6f234780cfd4eab1e763d52bb775415a87adc | 8f2c55a2530c3e59dab5907c0044c618b88dd09b | /third_party/isort_container/isort/__main__.py | 91cc154dcb62bae3eed88014d0e0d03028af4c6e | [
"Apache-2.0",
"EPL-1.0"
] | permissive | fabioz/PyDev.Debugger | 5a9c6d4c09be85a0e2d9fb93567fd65faf04c81d | 26864816cbfcf002a99913bcc31ebef48042a4ac | refs/heads/main | 2023-08-18T01:08:34.323363 | 2023-04-15T11:15:47 | 2023-04-15T11:15:47 | 21,870,144 | 363 | 126 | Apache-2.0 | 2023-07-30T23:03:31 | 2014-07-15T18:01:12 | Python | UTF-8 | Python | false | false | 205 | py | __main__.py | from __future__ import absolute_import
from isort.pie_slice import apply_changes_to_python_environment
apply_changes_to_python_environment()
from isort.main import main # noqa: E402 isort:skip
main()
|
b1bfa44078ab2dc1366638a28053dffd310976c4 | e7f662e18141c11bb452a31b844dd5555cca11dd | /nitime/analysis/correlation.py | 27359c4fd03be61a664269c77e6856aa0621102e | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | nipy/nitime | 75c7786e17514ecc7045c42760cd42b1c16ca0d6 | 4411b3047e37d21354e399aaaca77810f50c5fe2 | refs/heads/master | 2023-06-29T21:13:24.231303 | 2023-06-15T22:33:13 | 2023-06-15T22:33:13 | 294,865 | 198 | 69 | BSD-3-Clause | 2023-08-25T20:49:40 | 2009-09-02T00:29:57 | Python | UTF-8 | Python | false | false | 5,327 | py | correlation.py | import numpy as np
from nitime import descriptors as desc
from nitime import timeseries as ts
from nitime import algorithms as tsa
# To support older versions of numpy that don't have tril_indices:
from nitime.index_utils import tril_indices
from .base import BaseAnalyzer
class CorrelationAnalyzer(BaseAnalyzer):
... |
971592a22bb06af22e8ff0e53d84c8ccc44ca9e7 | ff5ef4d13a31943d8b22342eb3d6b3291b44f15f | /pychromecast/controllers/plex.py | f610522272728dacb5e31483860b1be0abe11291 | [
"MIT"
] | permissive | home-assistant-libs/pychromecast | d158252ca2d3ef58c75153ed451ba5de141c0611 | a21d3ac9c2e55d34b3834251186877a17ea869ce | refs/heads/master | 2023-09-05T12:28:13.014909 | 2023-09-05T11:16:20 | 2023-09-05T11:16:20 | 13,265,524 | 574 | 137 | MIT | 2023-09-12T09:55:29 | 2013-10-02T07:58:34 | Python | UTF-8 | Python | false | false | 18,187 | py | plex.py | """
Controller to interface with the Plex-app.
"""
import json
import threading
from copy import deepcopy
from urllib.parse import urlparse
from . import BaseController
from ..const import MESSAGE_TYPE
STREAM_TYPE_UNKNOWN = "UNKNOWN"
STREAM_TYPE_BUFFERED = "BUFFERED"
STREAM_TYPE_LIVE = "LIVE"
SEEK_KEY = "currentTime... |
77fd3911f197a4a0ee00880b0d571f0efe159116 | 45e376ae66b78b17788b1d3575b334b2cb1d0b1c | /checkov/cloudformation/graph_manager.py | df8881456a366d2c39c462f657fbf9982b94fa75 | [
"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 | 2,905 | py | graph_manager.py | from __future__ import annotations
import json
import logging
from typing import List, Dict, Optional, Tuple, TYPE_CHECKING, Any
from checkov.cloudformation.cfn_utils import get_folder_definitions
from checkov.cloudformation.context_parser import ContextParser
from checkov.cloudformation.graph_builder.graph_to_defini... |
19eb938b94c3774e01a31859abe556c7885ee383 | 96dcea595e7c16cec07b3f649afd65f3660a0bad | /tests/components/light/test_significant_change.py | 6bececc02443581530c1b3eec68f0e8075c09f76 | [
"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 | 1,989 | py | test_significant_change.py | """Test the Light significant change platform."""
from homeassistant.components.light import (
ATTR_BRIGHTNESS,
ATTR_COLOR_TEMP,
ATTR_EFFECT,
ATTR_HS_COLOR,
)
from homeassistant.components.light.significant_change import (
async_check_significant_change,
)
async def test_significant_change() -> No... |
5ac08a48ebf06ac4d913e553dcb291bb08a8edfd | f79dec3c4033ca3cbb55d8a51a748cc7b8b6fbab | /lang/nodejs4/patches/patch-tools_install.py | 76368b1e3760eb8fc0111e030cdedd7c8ade34f7 | [] | no_license | jsonn/pkgsrc | fb34c4a6a2d350e8e415f3c4955d4989fcd86881 | c1514b5f4a3726d90e30aa16b0c209adbc276d17 | refs/heads/trunk | 2021-01-24T09:10:01.038867 | 2017-07-07T15:49:43 | 2017-07-07T15:49:43 | 2,095,004 | 106 | 47 | null | 2016-09-19T09:26:01 | 2011-07-23T23:49:04 | Makefile | UTF-8 | Python | false | false | 599 | py | patch-tools_install.py | $NetBSD: patch-tools_install.py,v 1.2 2016/01/21 11:43:44 fhajny Exp $
Install man pages under the right directory.
--- tools/install.py.orig 2016-01-20 19:09:38.000000000 +0000
+++ tools/install.py
@@ -140,10 +140,7 @@ def files(action):
action(['deps/v8/tools/gdbinit'], 'share/doc/node/')
- if 'freebsd' in ... |
e331d176914c4bf46767f51d45394f29b3a777b5 | 96dcea595e7c16cec07b3f649afd65f3660a0bad | /homeassistant/components/peco_opower/__init__.py | a0d26cf7b136acec26684658b6f70f8e3af1b2d9 | [
"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 | 55 | py | __init__.py | """Virtual integration: PECO Energy Company (PECO)."""
|
b3e23f9891d89f173d3ed8c1faf9e8d1f4fc8a82 | 7427adca4c012c4efea43a96486a246bfc518f66 | /toppra/algorithm/algorithm.py | 45805a3959c55726d5de922e0743044c384b6ed2 | [
"MIT"
] | permissive | hungpham2511/toppra | a2f77608f6ab2be7bcceb5842fe876f3e0fcf542 | 7fd6e900897d811311f22e2e877aae565ee710ae | refs/heads/develop | 2023-07-23T21:14:56.992296 | 2023-06-14T08:19:35 | 2023-06-14T08:19:35 | 97,661,949 | 497 | 161 | MIT | 2023-09-13T08:54:18 | 2017-07-19T02:03:19 | Python | UTF-8 | Python | false | false | 7,757 | py | algorithm.py | """
toppra.algorithm.algorithm
^^^^^^^^^^^^^^^^^^^^^^^^^^
This module defines the abstract data types that define TOPP algorithms.
"""
from typing import Dict, Any, List, Tuple, Optional
import typing as T
import abc
import enum
import numpy as np
import time
import matplotlib.pyplot as plt
from toppra.constants imp... |
7927f50f1c65b5ee49486ced76661ee78c5261ff | 64695990d45b3adbc812089c75fb498c267e10d2 | /examples/bench_diskless.py | dd7a78315bcc95e826072d081e1e21282b2c90f4 | [
"MIT"
] | permissive | Unidata/netcdf4-python | f9e3df1b67143bfef541a949f5c5cba49d66d0e9 | e1d3c1f3aaa30643be5b71c94a4b6cf095d59dee | refs/heads/master | 2023-08-09T22:09:27.304569 | 2023-07-10T00:43:11 | 2023-07-10T00:43:11 | 15,884,459 | 696 | 294 | MIT | 2023-09-05T03:59:29 | 2014-01-13T22:41:52 | Cython | UTF-8 | Python | false | false | 2,750 | py | bench_diskless.py | # benchmark reads and writes, with and without compression.
# tests all four supported file formats.
from numpy.random.mtrand import uniform
import netCDF4
from timeit import Timer
import os, sys
# create an n1dim by n2dim by n3dim random array.
n1dim = 30
n2dim = 15
n3dim = 73
n4dim = 144
ntrials = 10
sys.stdout.writ... |
94787a41272be1848cd01f8d5c28320c8b8e87e8 | 98f1a0bfa5b20a0b81e9e555d76e706c62d949c9 | /python/dgl/cuda/__init__.py | f478e131c2c29d5c844a07a1d2fbb039f59c45b1 | [
"Apache-2.0"
] | permissive | dmlc/dgl | 3a8fbca3a7f0e9adf6e69679ad62948df48dfc42 | bbc8ff6261f2e0d2b5982e992b6fbe545e2a4aa1 | refs/heads/master | 2023-08-31T16:33:21.139163 | 2023-08-31T07:49:22 | 2023-08-31T07:49:22 | 130,375,797 | 12,631 | 3,482 | Apache-2.0 | 2023-09-14T15:48:24 | 2018-04-20T14:49:09 | Python | UTF-8 | Python | false | false | 150 | py | __init__.py | """ CUDA wrappers """
from .. import backend as F
from .gpu_cache import GPUCache
if F.get_preferred_backend() == "pytorch":
from . import nccl
|
c2e4a5bdfba4cc7d6726d2bde176129fc5b76594 | d7b9b490c954c7a9160b69f8ce2c907ef4681ecb | /nominations/templatetags/nominations.py | 8e449dfcc6f310e4dc0869f6b6778e0ca663b8e1 | [
"Apache-2.0"
] | permissive | python/pythondotorg | 00db93a4b1789a4d438806d106d9cee3349ad78c | c4ee749942227ca75c8e670546afe67232d647b2 | refs/heads/main | 2023-08-28T20:04:24.735314 | 2023-08-03T19:12:29 | 2023-08-03T19:12:29 | 6,127,047 | 1,131 | 646 | Apache-2.0 | 2023-08-24T15:57:04 | 2012-10-08T16:00:15 | Python | UTF-8 | Python | false | false | 172 | py | nominations.py | import random
from django import template
register = template.Library()
@register.filter
def shuffle(arg):
aux = list(arg)[:]
random.shuffle(aux)
return aux
|
879dc2be79fc064ffac86ea60b159a0c08d3172a | 3a6a211ea0d32405497fbd6486c490bb147e25f9 | /telemetry/telemetry/internal/snap_page_util_unittest.py | 2ac0175a1d2c1cd6d1fb61081c190733567d053b | [
"BSD-3-Clause"
] | permissive | catapult-project/catapult | e2cbdd5eb89f3b1492fc8752494e62ea1df4bae0 | 53102de187a48ac2cfc241fef54dcbc29c453a8e | refs/heads/main | 2021-05-25T07:37:22.832505 | 2021-05-24T08:01:49 | 2021-05-25T06:07:38 | 33,947,548 | 2,032 | 742 | BSD-3-Clause | 2022-08-26T16:01:18 | 2015-04-14T17:49:05 | HTML | UTF-8 | Python | false | false | 4,689 | py | snap_page_util_unittest.py | # Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from __future__ import absolute_import
import hashlib
import os
import shutil
import tempfile
import unittest
try:
from StringIO import StringIO
except Imp... |
8e49a4c01d3a9268876010f6ee045b672566d112 | 6647c484a6601f70dd348076c484843807238ddf | /google/datalab/bigquery/__init__.py | bf708a7f633f9d24cf4ad43c24a6bdfc42eed8ef | [
"Apache-2.0"
] | permissive | googledatalab/pydatalab | 43624c271e25edfd97ac0ecf39ec4f55e9ad27b2 | 8bf007da3e43096aa3a3dca158fc56b286ba6f5c | refs/heads/master | 2022-09-13T10:23:59.112507 | 2022-09-02T21:16:23 | 2022-09-02T21:16:23 | 58,776,721 | 200 | 91 | Apache-2.0 | 2023-03-28T20:55:15 | 2016-05-13T22:42:57 | Python | UTF-8 | Python | false | false | 1,437 | py | __init__.py | # Copyright 2015 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 agreed ... |
7e7c20fdfae97028e99baa9172fb58d838aa1176 | 2a1b8a671aceda6bc446f8ce26400aa84fa444a6 | /Packs/Confluera/Scripts/ConflueraProgressionsDataWarroom/ConflueraProgressionsDataWarroom.py | 2a63dedcc077a1c32d8bfb8d02e7fd14886038ca | [
"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 | 927 | py | ConflueraProgressionsDataWarroom.py | from CommonServerPython import *
from CommonServerUserPython import *
# Executes confluera-fetch-progressions command/script
progressions_data = demisto.executeCommand('confluera-fetch-progressions', {'hours': '72'})
if progressions_data[1] and progressions_data[1]['Contents']:
progressions = progressions_data[1]... |
63513803ba1ecd11581321797cc1103e1f1f5d3d | 0d40af0c10fd47af5ea88675e5be3b7ee98cbcd8 | /tools/lint/test/test_rst.py | e540081a94168d63b89566764185461517153f83 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | mozilla/gecko-dev | f02cdc9e61197c1d2a038cf1ad8cb5339e8cb62a | 304e9eaa3d7dbfab38d5b5401cbae227b20efe37 | refs/heads/master | 2023-09-01T20:40:41.588946 | 2023-09-01T11:38:17 | 2023-09-01T11:38:17 | 13,509,108 | 3,025 | 1,882 | NOASSERTION | 2023-09-05T04:11:13 | 2013-10-11T20:35:42 | null | UTF-8 | Python | false | false | 603 | py | test_rst.py | import mozunit
import pytest
from mozfile import which
LINTER = "rst"
pytestmark = pytest.mark.skipif(
not which("rstcheck"), reason="rstcheck is not installed"
)
def test_basic(lint, paths):
results = lint(paths())
assert len(results) == 2
assert "Title underline too short" in results[0].message
... |
c88b8e87a4ed3a8bd8c017765562ebc167b88fa7 | 6793f3b093478fdde550d8669b9b955081af5e0e | /nbconvert/postprocessors/base.py | 06aee67497219d7c4966ed1c7a4e49a5a33afc53 | [
"BSD-3-Clause"
] | permissive | jupyter/nbconvert | 0afe110c4ec39b68661c601f8f3b20fd21a9ba13 | 51c6e0a7d40918366e2a68c5ea471fd2c65722cb | refs/heads/main | 2023-09-03T16:05:25.981152 | 2023-08-29T13:57:58 | 2023-08-29T13:57:58 | 33,653,617 | 1,645 | 654 | BSD-3-Clause | 2023-09-11T10:42:26 | 2015-04-09T06:58:23 | Python | UTF-8 | Python | false | false | 1,154 | py | base.py | """
Basic post processor
"""
# -----------------------------------------------------------------------------
# Copyright (c) 2013, the IPython Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
# ---------------... |
b535a26b0ea9d2a66892c16e60503d7abe4b71e5 | 3dc647cd07a7361ed401e40d2b7cce8c826c8f6c | /Lib/_weakrefset.py | 2a27684324d80ab32f576040fb80ec666a8f7ff8 | [
"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 | 5,923 | py | _weakrefset.py | # Access WeakSet through the weakref module.
# This code is separated-out because it is needed
# by abc.py to load everything else at startup.
from _weakref import ref
from types import GenericAlias
__all__ = ['WeakSet']
class _IterationGuard:
# This context manager registers itself in the current iterators of ... |
01db71c35f46c287487fa9e038438af6d4b579f8 | 10ddfb2d43a8ec5d47ce35dc0b8acf4fd58dea94 | /Python/find-smallest-letter-greater-than-target.py | f9971d734dc8093e560190433aa6fa75df9a7b45 | [
"MIT"
] | permissive | kamyu104/LeetCode-Solutions | f54822059405ef4df737d2e9898b024f051fd525 | 4dc4e6642dc92f1983c13564cc0fd99917cab358 | refs/heads/master | 2023-09-02T13:48:26.830566 | 2023-08-28T10:11:12 | 2023-08-28T10:11:12 | 152,631,182 | 4,549 | 1,651 | MIT | 2023-05-31T06:10:33 | 2018-10-11T17:38:35 | C++ | UTF-8 | Python | false | false | 339 | py | find-smallest-letter-greater-than-target.py | # Time: O(logn)
# Space: O(1)
import bisect
class Solution(object):
def nextGreatestLetter(self, letters, target):
"""
:type letters: List[str]
:type target: str
:rtype: str
"""
i = bisect.bisect_right(letters, target)
return letters[0] if i == len(letters... |
20e636e454be5bb719cdb5ff624eecf8fbad6f1d | 7e6afb4986a53c420d40a2039240f8c5ed3f9549 | /python/stubs-out/mrpt/pymrpt/mrpt/opengl/stock_objects.pyi | 11fb46aa9505efb5465f85cd99456a656c5a7642 | [
"BSD-3-Clause"
] | permissive | MRPT/mrpt | 9ea3c39a76de78eacaca61a10e7e96646647a6da | 34077ec74a90b593b587f2057d3280ea520a3609 | refs/heads/develop | 2023-08-17T23:37:29.722496 | 2023-08-17T15:39:54 | 2023-08-17T15:39:54 | 13,708,826 | 1,695 | 646 | BSD-3-Clause | 2023-09-12T22:02:53 | 2013-10-19T21:09:23 | C++ | UTF-8 | Python | false | false | 533 | pyi | stock_objects.pyi | from typing import Any
def BumblebeeCamera(*args, **kwargs) -> Any: ...
def CornerXYSimple(*args, **kwargs) -> Any: ...
def CornerXYZ(*args, **kwargs) -> Any: ...
def CornerXYZEye(*args, **kwargs) -> Any: ...
def CornerXYZSimple(*args, **kwargs) -> Any: ...
def Hokuyo_URG(*args, **kwargs) -> Any: ...
def Hokuyo_UTM(*a... |
8db5ea29af3e053a332bf214fc258aa2d05f66e9 | ad61cc119a42abfd3d64224a753817ae0f9ba058 | /tests/unit/customizations/s3/test_filegenerator.py | c69c1f5dc12d5e1d97001d7b555cc5038534cde9 | [
"Apache-2.0"
] | permissive | aws/aws-cli | 30b0e5b0fb6d736f1540990955f0a7351ee7a908 | 147d16dfdb72dc9cf362b676a57e46a49375afbd | refs/heads/develop | 2023-09-03T19:52:07.955543 | 2023-09-01T20:37:50 | 2023-09-01T20:37:50 | 6,780,767 | 13,038 | 4,107 | NOASSERTION | 2023-09-13T19:48:11 | 2012-11-20T16:07:36 | Python | UTF-8 | Python | false | false | 28,544 | py | test_filegenerator.py | # Copyright 2013 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 acc... |
d1e9c3e2156f612d36a4e87bcf7d15a4417dc1ea | d05c946e345baa67e7894ee33ca21e24b8d26028 | /gui-programming/hangman-game-gui/hangman.py | 1763c3bd91207ac4aa96498472921c013306f9d1 | [
"MIT"
] | permissive | x4nth055/pythoncode-tutorials | 327255550812f84149841d56f2d13eaa84efd42e | d6ba5d672f7060ba88384db5910efab1768c7230 | refs/heads/master | 2023-09-01T02:36:58.442748 | 2023-08-19T14:04:34 | 2023-08-19T14:04:34 | 199,449,624 | 1,858 | 2,055 | MIT | 2023-08-25T20:41:56 | 2019-07-29T12:35:40 | Jupyter Notebook | UTF-8 | Python | false | false | 5,418 | py | hangman.py | import pygame
from pygame.locals import *
import random
from string import ascii_letters
pygame.init()
pygame.font.init()
screen = pygame.display.set_mode((400, 500))
pygame.display.set_caption("Hangman")
class Hangman():
def __init__(self):
with open("./words.txt", "r") as file:
# picks secr... |
a8b96532682ad95ff2cf1d38fa06b6908ef22640 | 5a52ccea88f90dd4f1acc2819997fce0dd5ffb7d | /alipay/aop/api/domain/ProdLORelationVO.py | 5a04ea1b0ec542fae1b594b05f8972beeafbb4a3 | [
"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,311 | py | ProdLORelationVO.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class ProdLORelationVO(object):
def __init__(self):
self._lo_code = None
self._lo_type = None
self._prod_code = None
self._prod_version = None
@property
def lo_... |
dd581cdbddc00b4b4c9b113fccbb89260fa88bc6 | f305f84ea6f721c2391300f0a60e21d2ce14f2a5 | /13_回溯算法/221028天池-02. 巡检周期.py | a00360277171c5a4cb1e820779bb4df16332a07d | [] | 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 | 1,156 | py | 221028天池-02. 巡检周期.py | # 221028天池-02. 巡检周期
# https://leetcode.cn/problems/zL2zJU/
# 2 <= record.length <= 12
# 1 <= robot.length <= 5
# 0 <= record[i] <= robot.length
# 0 <= robot[i] < record.length
# 现给定一段时间内的巡检记录,record[i] 表示在时刻 i 出发巡检的机器人数量,
# robot[j] 表示第 j 台机器人首次巡检的时刻。
# 请分离出 record 中各个机器人的记录,并按 robot 的顺序返回各机器人的 巡检周期 。
# 若存在多... |
bb9aeb2798377b96b857d0f694f12681c4ae34eb | 704976ea552111c6a5af9cd7cb62b9d9abaf3996 | /pypy/module/_collections/test/test_deque.py | 21fcfcd401420acce726ba0f75fde715f3514192 | [
"BSD-3-Clause"
] | permissive | mesalock-linux/mesapy | 4f02c5819ce7f2f6e249d34840f1aa097577645d | ed546d59a21b36feb93e2309d5c6b75aa0ad95c9 | refs/heads/mesapy2.7 | 2023-08-16T21:33:02.239581 | 2019-08-13T10:29:43 | 2019-08-13T18:06:45 | 136,080,721 | 396 | 33 | NOASSERTION | 2020-04-01T03:05:18 | 2018-06-04T20:45:17 | Python | UTF-8 | Python | false | false | 8,946 | py | test_deque.py |
class AppTestBasic:
spaceconfig = dict(usemodules=['_collections'])
def test_basics(self):
from _collections import deque
assert deque.__module__ == 'collections'
d = deque(xrange(-5125, -5000))
d.__init__(xrange(200))
for i in xrange(200, 400):
d.append(i)... |
f512d32a7f315ff4bca8c48566256aa057f776a5 | 5eb52c07e5b1bd00af77306f927f382b684cd6ff | /indy_node/test/auth_rule/auth_framework/node_services.py | a0491dfe66a30123783100376638e9a7bb709932 | [
"Apache-2.0"
] | permissive | hyperledger/indy-node | bce39486988f5114581cff4f6d14fc1b7684143c | e6bb87d4c605aff9914491d062248b6ec857334c | refs/heads/main | 2023-09-03T15:33:08.187153 | 2023-05-08T22:48:21 | 2023-05-08T22:48:21 | 77,021,566 | 691 | 783 | Apache-2.0 | 2023-05-09T15:42:43 | 2016-12-21T05:45:04 | Python | UTF-8 | Python | false | false | 10,460 | py | node_services.py | import pytest
from abc import abstractmethod
from plenum.test.test_node import ensureElectionsDone
from indy_common.authorize.auth_actions import split_action_id
from indy_common.authorize.auth_constraints import AuthConstraint
from indy_node.test.auth_rule.auth_framework.basic import AuthTest
from plenum.common.cons... |
770841e975ebad8e175065db1e02275668956bc7 | 450b551bd5f5c99bcf175ebdd114ecfb55788f3e | /actions/mail.py | c51e6f350f9e22f059de23ec3385dbe5cfefe74f | [] | no_license | LogicJake/MLCompetitionHub | 2482f8ce3ac7eb9d46a5fc62fa92147405cb1561 | ab5e68b5aa424b98bd9ea98cf094b35bd12bb49d | refs/heads/master | 2023-09-03T17:54:33.843632 | 2023-09-03T08:01:13 | 2023-09-03T08:01:13 | 234,690,463 | 144 | 27 | null | 2023-05-22T22:38:21 | 2020-01-18T06:10:35 | Python | UTF-8 | Python | false | false | 2,671 | py | mail.py | import copy
import os
import smtplib
from email.header import Header
from email.mime.text import MIMEText
from jinja2 import Environment, PackageLoader
STANDARD_TIME_FORMAT = '%Y-%m-%dT%H:%M:%S+08:00'
def generate(datas_):
datas = copy.deepcopy(datas_)
try:
with open('urls.txt', 'r') as f:
... |
8d86ea63554a44f405869e00f25338accb3f06f9 | 495809d075e5faeb35dd519e411a583359aa69de | /algebric expression.py | fa8c3a75e312c272079279808530d5d06d210ddb | [] | no_license | samirthapaliya/python-file | f09b833431a584bb64f40fb440e6258c4352ffc5 | 47ae0b720f8ec48b4173756c0be9f2e5b17f7d42 | refs/heads/master | 2021-06-26T07:21:51.964423 | 2021-03-15T12:52:19 | 2021-03-15T12:52:19 | 220,886,454 | 123 | 0 | null | null | null | null | UTF-8 | Python | false | false | 80 | py | algebric expression.py | a=int(input("x"))
b=int(input("y"))
c=("x**3+3*x**2*y+3*x*y**2+y**3")
print(c)
|
e7b87fe3ab1800e756db7c0543fb99510e0bda01 | f2034c76a11ce6296131d2bab89a5dae7d59edfe | /python/nano/src/bigdl/nano/deps/automl/optuna_backend.py | dfa42c1f81df8e33a33e71566e6a0df0c76ef5bc | [
"Apache-2.0"
] | permissive | intel-analytics/BigDL | e22cd917eecc7340bda3df4356acba0623a62ef6 | 4ffa012a426e0d16ed13b707b03d8787ddca6aa4 | refs/heads/main | 2023-08-22T06:31:37.923091 | 2023-08-22T02:58:42 | 2023-08-22T02:58:42 | 66,823,715 | 4,913 | 1,327 | Apache-2.0 | 2023-09-14T10:41:50 | 2016-08-29T07:59:50 | Jupyter Notebook | UTF-8 | Python | false | false | 6,876 | py | optuna_backend.py | #
# Copyright 2016 The BigDL Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... |
b880d753ed18370f2de87c0e6aa7dac73f166df5 | 4960036fd0b875527c2e749b75680fe4a80177d6 | /server/server/common/queries.py | a75a8a1d7905dd0f82ec850e7bcdbbdc02ef0801 | [] | no_license | suttacentral/suttacentral | ab62257d56c056b361d39a27029a94c2accb58ae | f6c4eb768c0ad8714a6b0a93d0160144048c5e7c | refs/heads/master | 2023-08-31T21:51:06.761377 | 2023-08-29T03:35:25 | 2023-08-29T03:35:25 | 89,286,697 | 133 | 31 | null | 2023-09-14T12:09:05 | 2017-04-24T21:00:39 | JavaScript | UTF-8 | Python | false | false | 54,662 | py | queries.py | LANGUAGES = '''
FOR l in language
SORT l.name
RETURN {
"uid": l.uid,
"name": l.name,
"iso_code": l.iso_code,
"is_root": l.is_root,
"localized": !!l.localized,
"localized_percent": l.localized_percent ? l.localized_percent : 0
}
'''
TEXTS_BY_LANG = '''
FOR tex... |
01c881c0ab92ff7e52bc88913f0b3bb7463d5766 | c4b8e1e09dedbccd37ca008ecaaca4438610bbaf | /google_or_tools/car_sat.py | ae3d5669226b121c855ef4d4eeb44dcaeb7bf1e4 | [
"MIT"
] | permissive | hakank/hakank | 4806598b98cb36dd51b24b0ab688f52dadfe9626 | c337aaf8187f15dcdc4d5b09cd2ed0dbdb2e72c2 | refs/heads/master | 2023-08-15T00:21:52.750270 | 2023-07-27T16:21:40 | 2023-07-27T16:21:40 | 11,933,517 | 336 | 97 | MIT | 2023-07-27T11:19:42 | 2013-08-06T20:12:10 | JavaScript | UTF-8 | Python | false | false | 4,202 | py | car_sat.py | # Copyright 2021 Hakan Kjellerstrand hakank@gmail.com
#
# 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 ... |
6889bbf6ec024d6759fa9cf4ba00210122c93922 | 7c91ff850f81bf8759b055971d592a71ef025732 | /pyglet/media/devices/base.py | a439c74f665917abd922f29f0d696a5f1bdcc3db | [
"BSD-3-Clause",
"LicenseRef-scancode-free-unknown"
] | permissive | pyglet/pyglet | d9da2cccd52a6bc5c09548536876602f6e1412f0 | 094c638f0529fecab4e74556487b92453a78753c | refs/heads/master | 2023-08-17T15:08:09.192350 | 2023-08-17T01:51:50 | 2023-08-17T01:51:50 | 191,043,601 | 1,687 | 427 | BSD-3-Clause | 2023-09-14T08:51:31 | 2019-06-09T18:55:00 | Python | UTF-8 | Python | false | false | 3,218 | py | base.py | from abc import ABCMeta, abstractmethod
from enum import Enum, auto
from typing import Dict, Optional
from pyglet import event
class DeviceState(Enum):
ACTIVE = auto()
DISABLED = auto()
MISSING = auto()
UNPLUGGED = auto()
class DeviceFlow(Enum):
OUTPUT = auto()
INPUT = auto()
INPUT_OUTP... |
b902776be757ba73cde3be5be5235a819d534fe9 | b06340ae3dfcb551bacefa362c034b064809fd28 | /examples/test_example_context_manager_fail.py | 3ce9df793b1ff89f7ba0191e155e623ffd27aa0a | [
"MIT"
] | permissive | okken/pytest-check | cd3b82ae31932d54550822abb6cc96fa6b4e7c88 | c7e7741e4d5665a07b0985932acc484aac2d5095 | refs/heads/main | 2023-08-19T09:10:40.776832 | 2023-08-11T20:44:36 | 2023-08-11T20:44:36 | 108,791,429 | 282 | 35 | MIT | 2023-08-11T20:37:17 | 2017-10-30T02:22:27 | Python | UTF-8 | Python | false | false | 521 | py | test_example_context_manager_fail.py | """
Everything should fail in this file.
This test is useful for testing:
- messages
- stop on fail (-x)
- pseudo-tracebacks
- lack of tracebacks (--tb=no)
"""
from pytest_check import check
def test_3_failed_checks():
with check:
assert 1 == 0
with check:
assert 1 > 2
with check:
... |
e4077590fea1af4f9bb015090b34fe7f8d274cca | fa39269e490c6ad0065c97875d4d4c5023bed480 | /tests/test_scripts.py | b7a02f4783294c532d09b670f69b806d7a91fc54 | [
"Apache-2.0"
] | permissive | InsightSoftwareConsortium/SimpleITK-Notebooks | ad40d28462f4877b8b9918bfece5efc2f251d956 | 1fd9796e424624d5f4ea82dd72fc0cb5547aad6d | refs/heads/master | 2023-09-04T08:55:09.819104 | 2023-08-24T20:38:52 | 2023-08-24T20:38:52 | 7,489,426 | 794 | 366 | Apache-2.0 | 2023-08-24T20:38:53 | 2013-01-07T20:37:52 | Jupyter Notebook | UTF-8 | Python | false | false | 4,245 | py | test_scripts.py | import os
import pytest
import pathlib
import hashlib
import sys
import pandas as pd
# Add the script source directory to the path so that we can import
sys.path.append(str(pathlib.Path(__file__).parent.parent.absolute() / "Python/scripts"))
from characterize_data import characterize_data
class TestScripts:
de... |
3c893f9150d15f46f420a3619af6003fabf47fc8 | 8a87f5b889a9ce7d81421515f06d9c9cbf6ce64a | /3rdParty/boost/1.78.0/libs/mpl/doc/src/docutils/setup.py | 73a9195e5f023da841b163fa9fd614d3b2a4000e | [
"BSL-1.0",
"Apache-2.0",
"BSD-3-Clause",
"ICU",
"Zlib",
"GPL-1.0-or-later",
"OpenSSL",
"ISC",
"LicenseRef-scancode-gutenberg-2020",
"MIT",
"GPL-2.0-only",
"CC0-1.0",
"LicenseRef-scancode-autoconf-simple-exception",
"LicenseRef-scancode-pcre",
"Bison-exception-2.2",
"LicenseRef-scancode... | permissive | arangodb/arangodb | 0980625e76c56a2449d90dcb8d8f2c485e28a83b | 43c40535cee37fc7349a21793dc33b1833735af5 | refs/heads/devel | 2023-08-31T09:34:47.451950 | 2023-08-31T07:25:02 | 2023-08-31T07:25:02 | 2,649,214 | 13,385 | 982 | Apache-2.0 | 2023-09-14T17:02:16 | 2011-10-26T06:42:00 | C++ | UTF-8 | Python | false | false | 825 | py | setup.py | #!/usr/bin/env python
# Copyright Aleksey Gurtovoy 2007-2009
#
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
import sys, os
from distutils.core import setup
setup(
name="html_refdoc",
version=".1",
... |
622292e87beb9d495327107152442a1fe6988116 | 3c41443364da8b44c74dce08ef94a1acd1b66b3e | /api_tests/actions/views/test_action_detail.py | 15d9fb20d845f1f7900965fb9c0fdf2188c17dd3 | [
"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,330 | py | test_action_detail.py | import pytest
from api.base.settings.defaults import API_BASE
from api_tests.requests.mixins import NodeRequestTestMixin, PreprintRequestTestMixin
@pytest.mark.django_db
class TestActionDetailNodeRequests(NodeRequestTestMixin):
@pytest.fixture()
def url(self, node_request):
action = node_request.acti... |
deeacf5e7270f2610cad2523f47ea50005c100ba | df307de92fe1937a4933c9c5872cfb900bef8159 | /KG-Search-Flask/app.py | 90ebf7d183ec25007f2a2867131f54015788fbd8 | [
"MIT"
] | permissive | xyjigsaw/Knowledge-Graph-And-Visualization-Demo | d1f849077f9244848e476d4a60e39b6df36224ec | c42958023fe3af270a2bbd68075582cfb0ec1d85 | refs/heads/master | 2023-05-29T04:20:57.170940 | 2023-05-22T12:03:04 | 2023-05-22T12:03:04 | 244,573,834 | 172 | 53 | MIT | 2021-09-24T10:16:13 | 2020-03-03T07:50:58 | JavaScript | UTF-8 | Python | false | false | 5,385 | py | app.py | from flask import Flask, render_template, flash, request
from flask_restful import reqparse, abort, Api, Resource
from forms import KeywordSearchForm
from neo4j_models import Neo4jTool
from jieba import posseg
import raw2json
import json
import cpca
app = Flask(__name__)
api = Api(app)
app.config.update(RES... |
291a10a0b2ccadabcdd67596e98adc90a64b8cc9 | 36dc453a64869574eec11b698d8fb368bba894dc | /setup.py | edfe3eec5637c514f124deff6b0d2a45c2ae9dba | [
"LicenseRef-scancode-free-unknown",
"AGPL-3.0-only",
"AGPL-3.0-or-later",
"Apache-2.0"
] | permissive | SimonBiggs/scriptedforms | 32b2688f3975455d5b4f177d6983009fd49623e0 | 070bc94fe5288d1d7872a18da196b8411b54763d | refs/heads/master | 2022-10-10T07:47:47.104081 | 2022-09-27T22:50:37 | 2022-09-27T22:50:37 | 96,386,447 | 537 | 41 | Apache-2.0 | 2022-09-27T22:45:50 | 2017-07-06T03:55:12 | TypeScript | UTF-8 | Python | false | false | 1,462 | py | setup.py | import os
from glob import glob
from setuptools import setup
here = os.path.dirname(os.path.abspath(__file__))
name = 'scriptedforms'
pjoin = os.path.join
tar_path = pjoin(here, 'scriptedforms', '*.tgz')
version_ns = {}
with open(pjoin(here, name, '_version.py')) as file:
code = file.read()
exec(code, version... |
b169e65ffddeddde474e62ca729c1fd6e6e045e2 | 391fb5b11425d59ea917c6fed51fe1fa9c672764 | /opytimizer/optimizers/swarm/kh.py | 4a368d87440505635f1fff8572028286c99cebd4 | [
"Apache-2.0"
] | permissive | gugarosa/opytimizer | 89e60d582dee9e31b1723e35d08103d7f8f5d3e1 | 7326a887ed8e3858bc99c8815048d56d02edf88c | refs/heads/master | 2023-08-01T08:09:12.055317 | 2023-05-11T15:21:58 | 2023-05-11T15:21:58 | 109,152,650 | 602 | 45 | Apache-2.0 | 2023-09-07T14:26:13 | 2017-11-01T16:04:01 | Python | UTF-8 | Python | false | false | 18,505 | py | kh.py | """Krill Herd.
"""
import copy
from typing import Any, Dict, List, Optional, Tuple
import numpy as np
import opytimizer.math.general as g
import opytimizer.math.random as r
import opytimizer.utils.constant as c
import opytimizer.utils.exception as e
from opytimizer.core import Optimizer
from opytimizer.core.agent im... |
02f86f7dfbdeda363ab6c309ab6b50307c843f6c | c5952aa93ddede4cbe8e027f8ac507ffdbca6124 | /factors.py | 23aa72db5504bf14ef1e85456b0aee0386acf5fe | [] | no_license | hackingmath/Math-Adventures | 1cea476ee5aea807367670aefc062bc2530218ba | 327751c5db4526e858ab240b29b9cc55bb742586 | refs/heads/master | 2023-07-06T00:25:25.391354 | 2023-06-23T15:57:18 | 2023-06-23T15:57:18 | 125,400,295 | 114 | 51 | null | null | null | null | UTF-8 | Python | false | false | 218 | py | factors.py | #factors.py
def factors(num):
'''Returns a list of the factors of num'''
factorList = []
for i in range(1,num+1):
if num % i == 0:
factorList.append(i)
return factorList
|
8322d78ef9137a65018ac340482b6634e23ce8fa | 33be4b8a076a83adb73ff6b267d8135dbbdd16fc | /chapter2/code/os module/platform_version.py | d6984892ef25dfbf9c1c281e89c74ebb6fa0cf56 | [
"MIT"
] | permissive | PacktPublishing/Mastering-Python-for-Networking-and-Security-Second-Edition | 73bbe8bd6464585bb3cef788eb8fd62ec89f8983 | b748cca5841b013b44c98f1884611b66676fef1a | refs/heads/master | 2023-01-27T10:59:59.868438 | 2023-01-18T10:10:33 | 2023-01-18T10:10:33 | 254,302,959 | 117 | 67 | null | null | null | null | UTF-8 | Python | false | false | 158 | py | platform_version.py | from platform import python_implementation, python_version_tuple
print(python_implementation())
for attribute in python_version_tuple():
print(attribute)
|
d44aae2200f017c355aa197cc9c4ade4f8c4f0fc | f8b1bb830377785ac65be495795dd711cfc0fb17 | /setup.py | 68dbc78e2978b6a2f76208422886323eb4a21d2e | [
"MIT"
] | permissive | bactopia/bactopia | 97d0bed69cc4938e35f87908dae1035bc1d8a081 | cee87a2ccecf2305850a915bbe8944942c477ce9 | refs/heads/master | 2023-08-17T08:16:07.862308 | 2022-11-28T21:30:51 | 2022-11-28T21:30:51 | 172,074,074 | 286 | 53 | MIT | 2023-09-11T04:37:35 | 2019-02-22T13:49:38 | Nextflow | UTF-8 | Python | false | false | 651 | py | setup.py | from setuptools import setup, find_packages
import glob
import os
import pkg_resources
from bactopia import __version__
setup(
author="Robert A. Petit III",
author_email='robbie.petit@gmail.com',
description="A Python package for working with Bactopia.",
entry_points={
'console_scripts': [
... |
9b767fe7a96221c1a65240df09ba70076c22e6b2 | db12b990924703cd74748d8585cd9c11fafa6746 | /h2o-py/tests/testdir_algos/automl/pyunit_automl_algo_parameters.py | 9fc3fe5c88e12133b8ef81663dd81d225d162de6 | [
"Apache-2.0"
] | permissive | h2oai/h2o-3 | 919019a8f297eec676011a9cfd2cc2d97891ce14 | d817ab90c8c47f6787604a0b9639b66234158228 | refs/heads/master | 2023-08-17T18:50:17.732191 | 2023-08-17T16:44:42 | 2023-08-17T16:44:42 | 17,371,412 | 6,872 | 2,345 | Apache-2.0 | 2023-09-14T18:05:40 | 2014-03-03T16:08:07 | Jupyter Notebook | UTF-8 | Python | false | false | 2,056 | py | pyunit_automl_algo_parameters.py | import sys, os
import re
sys.path.insert(1, os.path.join("..","..",".."))
import h2o
import h2o.exceptions
from h2o.automl import H2OAutoML
from tests import pyunit_utils as pu
from _automl_utils import import_dataset, get_partitioned_model_names
max_models = 5
def test_algo_parameter_can_be_applied_only_to_a_spe... |
54a3cd3440645332642e17e38f46e236a3271b3d | 2ac03b8c24df220ea32ea525e1d65aeb294cd1a4 | /custom_components/waste_collection_schedule/waste_collection_schedule/source/circulus_nl.py | 9cb68f185eac1e3144b60645a834a56f292269c9 | [
"MIT"
] | permissive | mampfes/hacs_waste_collection_schedule | a7b98319a7483dedc8cf78b724f93932934c1702 | 1dc9476efef9963a141b9ac987e2708224b9eaaf | refs/heads/master | 2023-08-16T21:14:46.088962 | 2023-08-16T10:05:24 | 2023-08-16T10:05:24 | 254,347,436 | 495 | 428 | MIT | 2023-09-12T18:59:07 | 2020-04-09T11:02:16 | Python | UTF-8 | Python | false | false | 2,017 | py | circulus_nl.py | from datetime import date, datetime, timedelta
import requests
from waste_collection_schedule import Collection
TITLE = "Circulus"
DESCRIPTION = "Source for circulus.nl waste collection."
URL = "https://mijn.circulus.nl"
TEST_CASES = {
"Test1": {"postal_code": "7206AC", "house_number": "1"},
}
ICON_MAP = {
... |
56af1e84ea0f783f577dd97031515caece893e41 | c36d64932d3e5623923acb31d3b4a0d87fb5c00d | /src/repair/testing.py | 0a1fee8528aa7c8d38614309c19ad92e713ce218 | [
"MIT"
] | permissive | mechtaev/angelix | 25ccf8d80a698d1bedc19d857253d09ff473ebb2 | d50f3234dc06d443d8c54dbab44d8bc3f2ac0722 | refs/heads/master | 2022-10-12T02:54:05.827587 | 2022-09-26T07:55:26 | 2022-09-26T07:55:26 | 42,175,803 | 102 | 43 | MIT | 2022-09-26T03:35:19 | 2015-09-09T12:00:57 | Java | UTF-8 | Python | false | false | 3,236 | py | testing.py | import os
from os.path import basename, join, exists
from utils import cd
import subprocess
import logging
import sys
import tempfile
from glob import glob
logger = logging.getLogger(__name__)
class Tester:
def __init__(self, config, oracle, workdir):
self.config = config
self.oracle = oracle
... |
661385525be1f23b553b14116af286978e45c42f | ec85250addb7357dfe7bb3e0680d53fc7b0fd8fb | /python_modules/libraries/dagster-aws/dagster_aws_tests/ecs_tests/launcher_tests/repo.py | 0a04980cd82db4f51d686eceb78defd6fb75ab71 | [
"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 | 162 | py | repo.py | import dagster
@dagster.op
def node(_):
pass
@dagster.job
def job():
node()
@dagster.repository
def repository():
return {"jobs": {"job": job}}
|
f85de56aeb5cb07889983800a67b86779376ad3f | ace570f65d70e6ce9461bcb81aaaac31c57ec111 | /host/greatfet/interfaces/led.py | a4448e5fbe8556d874400a8a2b0c5fc347e49fd8 | [
"BSD-3-Clause"
] | permissive | greatscottgadgets/greatfet | 9ed060aec2d293844c0ac59612f09ecae9c7632b | 2409575d28fc7c9cae44c9085c7457ddfb54f893 | refs/heads/master | 2023-05-12T18:12:31.748720 | 2023-05-05T07:18:21 | 2023-05-05T07:18:21 | 48,184,998 | 273 | 95 | BSD-3-Clause | 2023-05-05T07:18:22 | 2015-12-17T16:17:35 | C | UTF-8 | Python | false | false | 1,104 | py | led.py | #
# This file is part of GreatFET
#
from ..interface import GreatFETInterface
class LED(GreatFETInterface):
""" Simple periheral that allows control of an LED through the GreatFET HAL."""
def __init__(self, board, led_number):
"""Create a new object representing a GreatFET LED.
board -- The... |
d08214f95c14556f13b375f787cf8cd2aaa58335 | 307d3837d31f9e3728af2b62ca51ebf63fe6ec6b | /hall_of_fame/lysuk96/List/LTC_105.py | 93e8e54b53a56760589857e684bb63fa62fe57f9 | [] | no_license | ellynhan/challenge100-codingtest-study | 905043497d154b8a7333ca536e536d013f6e7454 | bcdc6d04f13b12ba80b42e066f9d244d7c2cc698 | refs/heads/master | 2023-09-01T14:10:13.481013 | 2023-08-27T14:38:52 | 2023-08-27T14:38:52 | 401,561,230 | 162 | 176 | null | 2023-09-09T14:56:25 | 2021-08-31T03:30:36 | C++ | UTF-8 | Python | false | false | 979 | py | LTC_105.py | '''
Given a string s, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.
Example 1:
Input: s = "A man, a plan, a canal: Panama"
Output: true
Explanation: "amanaplanacanalpanama" is a palindrome.
Example 2:
Input: s = "race a car"
Output: false
Explanation: "raceacar" is ... |
34eded580a3d73d3c1eb18e0f6ce245890e0d086 | 5d55e0885bacd718588f25b71675c1127c93fc0a | /river/base/transformer.py | defc0c80f87a160ebb3d0387c646abd6c44d9ea1 | [
"BSD-3-Clause"
] | permissive | online-ml/river | 5698b60e65493eba28d0c0c1992f19eb996c0bfa | c658393084ed4147a782daa6bcd4a467c3abb0cb | refs/heads/main | 2023-09-03T00:12:55.121301 | 2023-08-29T12:04:20 | 2023-08-29T12:04:20 | 167,388,434 | 3,372 | 389 | BSD-3-Clause | 2023-09-12T08:11:15 | 2019-01-24T15:18:26 | Python | UTF-8 | Python | false | false | 4,259 | py | transformer.py | from __future__ import annotations
import abc
import typing
from river import base
if typing.TYPE_CHECKING:
import pandas as pd
class BaseTransformer:
def __add__(self, other):
"""Fuses with another Transformer into a TransformerUnion."""
from river import compose
return compose.Tr... |
73674f9d73d4a0246977ef7ddbdac14ac302df67 | 5e255ad1360c90478393744586663741a9569c21 | /linebot/v3/module/__init__.py | d514b844b31f312b21a9e48e47d6fc1801bbc9c7 | [
"Apache-2.0"
] | permissive | line/line-bot-sdk-python | d76268e8b542060d6eccbacc5dbfab16960ecc35 | cffd35948238ae24982173e30b1ea1e595bbefd9 | refs/heads/master | 2023-08-31T22:12:31.698183 | 2023-08-28T01:10:09 | 2023-08-28T01:10:09 | 70,553,423 | 1,898 | 1,181 | Apache-2.0 | 2023-09-11T05:14:07 | 2016-10-11T03:42:26 | Python | UTF-8 | Python | false | false | 1,382 | py | __init__.py | # coding: utf-8
# flake8: noqa
"""
LINE Messaging API
This document describes LINE Messaging API. # noqa: E501
The version of the OpenAPI document: 0.0.1
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
"""
__version__ = "3.3.0"
# import apis i... |
ea7f36d9f97a6a3e0f1f50c714827260ed48428a | d594f3926f6379ef7c382c608cb211f507240420 | /csunplugged/resources/utils/get_resource_generator.py | 6ce38edba388fc7a1947853a928373f4510ef246 | [
"LicenseRef-scancode-secret-labs-2011",
"MIT",
"OFL-1.1",
"LGPL-2.0-or-later",
"AGPL-3.0-only",
"CC-BY-4.0",
"Apache-2.0",
"BSD-3-Clause",
"CC-BY-SA-4.0",
"LicenseRef-scancode-public-domain",
"LicenseRef-scancode-other-copyleft",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | uccser/cs-unplugged | 0b9151f84dd490d5b90771a3706327a623d39edc | 363e281ff17cefdef0ec61078b1718eef2eaf71a | refs/heads/develop | 2023-08-25T08:45:29.833025 | 2023-08-22T02:58:35 | 2023-08-22T02:58:35 | 66,315,075 | 200 | 41 | MIT | 2023-09-14T02:15:40 | 2016-08-22T23:16:40 | Python | UTF-8 | Python | false | false | 688 | py | get_resource_generator.py | """Module for importing a resource view module."""
import importlib
from django.conf import settings
def get_resource_generator(generator_module, requested_options=None):
"""Return view module for resource.
Args:
generator_module: Name of resource generator (str).
requested_options: QueryDic... |
53f40d06683c3dd7089366ebc78cfb1ef0fc2af6 | 7eb606a7957e5500f163c93dc4b19418cf9cf335 | /tests/integration_tests/test_model_training_options.py | 1e46a5a4b233af83c3c18a6c33fdc23d35d84e2e | [
"Apache-2.0",
"MIT"
] | permissive | ludwig-ai/ludwig | 024f74da86567a57ec8e30efcb4600f0c52333a1 | e1d023e41606c9b76b35e1d231c2f13368a30eca | refs/heads/master | 2023-09-03T08:07:32.978301 | 2023-09-01T19:39:32 | 2023-09-01T19:39:32 | 163,346,054 | 2,567 | 285 | Apache-2.0 | 2023-09-14T20:34:52 | 2018-12-27T23:58:12 | Python | UTF-8 | Python | false | false | 17,878 | py | test_model_training_options.py | import json
import logging
import os.path
import re
import numpy as np
import pandas as pd
import pytest
import torch
from ludwig import globals as global_vars
from ludwig.api import LudwigModel
from ludwig.backend import LOCAL_BACKEND
from ludwig.constants import (
BATCH_SIZE,
CATEGORY,
DEFAULTS,
EPO... |
61d54f5be1c6d684aa9d54695f21ad7f8007a597 | dd221d1ab80a49190a0c93277e2471debaa2db95 | /hanlp/common/structure.py | cc9c61c75ce3c5a6014eaf1f2017ddb377ba4f29 | [
"Apache-2.0",
"CC-BY-NC-SA-4.0"
] | permissive | hankcs/HanLP | 29a22d4e240617e4dc67929c2f9760a822402cf7 | be2f04905a12990a527417bd47b79b851874a201 | refs/heads/doc-zh | 2023-08-18T12:48:43.533453 | 2020-02-15T17:19:28 | 2023-03-14T02:46:03 | 24,976,755 | 32,454 | 9,770 | Apache-2.0 | 2023-08-13T03:11:39 | 2014-10-09T06:36:16 | Python | UTF-8 | Python | false | false | 2,454 | py | structure.py | # -*- coding:utf-8 -*-
# Author: hankcs
# Date: 2019-08-26 14:58
from typing import Dict
from hanlp_common.configurable import Configurable
from hanlp_common.reflection import classpath_of
from hanlp_common.structure import SerializableDict
class ConfigTracker(Configurable):
def __init__(self, locals_: Dict, ex... |
25ad2d47c5a793213cd4dba57e110f81b8e3ac91 | 63ace5832d453e325681d02f6496a0999b72edcb | /bip_utils/substrate/conf/substrate_conf_getter.py | 4a653186e77beba8df917fd1e6e19bf415191cf0 | [
"MIT"
] | permissive | ebellocchia/bip_utils | c9ec04c687f4247e57434319e36b2abab78f0b32 | d15c75ddd74e4838c396a0d036ef6faf11b06a4b | refs/heads/master | 2023-09-01T13:38:55.567370 | 2023-08-16T17:04:14 | 2023-08-16T17:04:14 | 251,130,186 | 244 | 88 | MIT | 2023-08-23T13:46:19 | 2020-03-29T20:42:48 | Python | UTF-8 | Python | false | false | 3,104 | py | substrate_conf_getter.py | # Copyright (c) 2021 Emanuele Bellocchia
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish,... |
44a31d0154da99ed41c1d10be65b265fab0213ba | de181afb1d7286dd82b6253ab927bb6d2fa4b975 | /src/bepasty/tests/test_app.py | 7597b5065bd3c800a8dba4e0ef797a00b08f96e1 | [
"BSD-2-Clause"
] | permissive | bepasty/bepasty-server | a3bab0b4e9d0dcf18aabeec7d934b08f313f2cd5 | b006fc27bc872d859c09a5d873c80c33de7eed7d | refs/heads/master | 2023-08-31T14:53:22.594826 | 2023-08-28T18:48:58 | 2023-08-28T18:48:58 | 16,217,714 | 151 | 45 | BSD-2-Clause | 2023-08-28T18:49:00 | 2014-01-24T21:37:55 | Python | UTF-8 | Python | false | false | 2,016 | py | test_app.py | #
# app tests
#
from flask import request, url_for
from flask.views import MethodView
from ..app import create_app
from ..config import Config
def test_secret_key(monkeypatch):
monkeypatch.setattr(Config, 'PERMISSIONS', {
'admin': 'admin,list,create,read,delete',
'full': 'list,create,read,delete... |
5d646305b7e26fe40cfd69abecf152deca5a50b1 | 07df6279388a17192eb4e4e417383a1f56208839 | /mmdet3d/datasets/pipelines/loading.py | 96a3a8d0d41145c8c09d0616d1d3c03fc6738ccf | [
"Apache-2.0"
] | permissive | HuangJunJie2017/BEVDet | 11d4ca45286739c9bd099f715cb0edc9408a914f | f71858d02eb0fbd09860150ade67558d7984b1be | refs/heads/dev2.1 | 2023-05-23T15:35:45.216750 | 2023-05-07T16:35:04 | 2023-05-07T16:35:04 | 432,979,408 | 985 | 192 | Apache-2.0 | 2023-04-28T15:06:51 | 2021-11-29T09:28:12 | Python | UTF-8 | Python | false | false | 43,433 | py | loading.py | # Copyright (c) OpenMMLab. All rights reserved.
import os
import mmcv
import numpy as np
import torch
from PIL import Image
from pyquaternion import Quaternion
from mmdet3d.core.points import BasePoints, get_points_type
from mmdet.datasets.pipelines import LoadAnnotations, LoadImageFromFile
from ...core.bbox import L... |
0480d17bd3be0401fab48ec4d85543f87658473a | 5917ffcb780cfcfe4e2b87b11fca1f68f387b239 | /plenum/server/quota_control.py | 3356c0ba46e195a4d7acf3be38c9d03632269b18 | [
"Apache-2.0"
] | permissive | hyperledger/indy-plenum | 6ff9f705af80dfa28d4cb92743683f78bb937aa3 | 698b9500ad3a7a15993af72a1c35a406c5673262 | refs/heads/main | 2023-08-29T01:32:26.384729 | 2023-06-20T16:42:11 | 2023-06-20T16:42:11 | 51,585,028 | 171 | 420 | Apache-2.0 | 2023-06-20T16:42:14 | 2016-02-12T12:03:16 | Python | UTF-8 | Python | false | false | 2,169 | py | quota_control.py | from abc import ABC, abstractmethod
from stp_zmq.zstack import Quota
class QuotaControl(ABC):
@abstractmethod
def update_state(self, state: dict):
pass
@property
@abstractmethod
def node_quota(self) -> Quota:
pass
@property
@abstractmethod
def client_quota(self) -> Q... |
1d503e8dc046beb558a62da0cbb28f1b2342e656 | 0d543b6f877114fc7ff7f5c2485230f606f6d98d | /2022/13.py | e7fde3adb06a8efcb7bf1f55c91ab868f0adb95a | [] | no_license | jonathanpaulson/AdventOfCode | eca9d1732ec80dd640d6eed01b3a18d3b3ee455b | 215f18d7d5b9761ec181954d2e62b6fed3bd12f5 | refs/heads/master | 2023-01-08T00:25:09.651009 | 2022-12-25T05:39:11 | 2022-12-25T05:39:11 | 321,228,487 | 227 | 103 | null | 2022-12-01T09:31:36 | 2020-12-14T04:03:53 | Python | UTF-8 | Python | false | false | 1,474 | py | 13.py | #!/usr/bin/python3
import sys
import math
from copy import deepcopy
from collections import defaultdict, deque
infile = sys.argv[1] if len(sys.argv)>1 else '13.in'
data = open(infile).read().strip()
lines = [x for x in data.split('\n')]
def compare(p1,p2):
if isinstance(p1, int) and isinstance(p2,int):
if... |
51a0260aac1b11b11ebfdf787105a9d27c89f62b | 15f0514701a78e12750f68ba09d68095172493ee | /Python3/65.py | c08d2daa8e181900e7f2c32de4187e2a5ecb7fd0 | [
"MIT"
] | permissive | strengthen/LeetCode | 5e38c8c9d3e8f27109b9124ae17ef8a4139a1518 | 3ffa6dcbeb787a6128641402081a4ff70093bb61 | refs/heads/master | 2022-12-04T21:35:17.872212 | 2022-11-30T06:23:24 | 2022-11-30T06:23:24 | 155,958,163 | 936 | 365 | MIT | 2021-11-15T04:02:45 | 2018-11-03T06:47:38 | null | UTF-8 | Python | false | false | 685 | py | 65.py | __________________________________________________________________________________________________
sample 20 ms submission
class Solution:
def isNumber(self, s: str) -> bool:
try:
float(s)
return True
except:
return False
__________________________________... |
10c435fe36af9c75467c3925474260c9570eb7b7 | ac235a23f22be0d6f1818bb53902177f9969813a | /tests/integration/test_encoding.py | 0f0deb991da87a4422172e444c85447017f3897d | [
"Apache-2.0",
"BSD-3-Clause"
] | permissive | DataDog/dd-trace-py | f09d6d48c4c69aea68f999fc8a458ade5c6150cf | 1e3bd6d4edef5cda5a0831a6a7ec8e4046659d17 | refs/heads/1.x | 2023-09-01T20:25:26.746324 | 2023-09-01T18:54:37 | 2023-09-01T18:54:37 | 61,572,326 | 461 | 426 | NOASSERTION | 2023-09-14T20:38:57 | 2016-06-20T18:52:23 | Python | UTF-8 | Python | false | false | 2,457 | py | test_encoding.py | # -*- coding: utf-8 -*-
import os
import mock
import pytest
from ddtrace import Tracer
AGENT_VERSION = os.environ.get("AGENT_VERSION")
class TestTraceAcceptedByAgent:
def test_simple_trace_accepted_by_agent(self):
tracer = Tracer()
with mock.patch("ddtrace.internal.writer.writer.log") as log:
... |
152171b86ea00e2d4fe95703358cf1abcbab9938 | 524619551b87670456f06d417c514e28778963bc | /federation/tests/entities/activitypub/test_mappers.py | 566503fd5f9e25a0029233881cb3ef610ebcc54d | [
"BSD-3-Clause"
] | permissive | jaywink/federation | a91979c3d64eb3d2822d1cffa41ce93f13794ad4 | 60694662a5a323d28c82c44609935638e4d55eab | refs/heads/master | 2023-08-08T00:04:03.472996 | 2023-06-04T13:08:23 | 2023-06-04T13:08:23 | 38,371,381 | 109 | 11 | BSD-3-Clause | 2021-09-13T23:04:00 | 2015-07-01T13:01:20 | Python | UTF-8 | Python | false | false | 18,502 | py | test_mappers.py | from datetime import datetime
from unittest.mock import patch, Mock, DEFAULT
import json
import pytest
#from federation.entities.activitypub.entities import (
# models.Follow, models.Accept, models.Person, models.Note, models.Note,
# models.Delete, models.Announce)
import federation.entities.activitypub.models ... |
a4e5e2a0168a7903974ea379987e4eb9860d76d7 | f1c2e4b3147af77e23306f841610aafd6db1c6b0 | /submarine-sdk/pysubmarine/setup.py | 69320be650fc8d786fcc5108a2b36fb9f2281a22 | [
"Apache-2.0",
"LicenseRef-scancode-unknown",
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause",
"BSD-2-Clause",
"GPL-2.0-only",
"LicenseRef-scancode-public-domain",
"MIT",
"CDDL-1.1",
"Classpath-exception-2.0"
] | permissive | apache/submarine | a2927f5f4f7f5faff4701139f2f0f88a98195e7f | 0c10613f39b707d5e446c515c12fa28295c8052e | refs/heads/master | 2023-08-30T14:35:43.145942 | 2023-08-20T00:19:54 | 2023-08-24T23:50:49 | 209,459,144 | 663 | 269 | Apache-2.0 | 2023-09-03T09:05:06 | 2019-09-19T04:00:17 | Java | UTF-8 | Python | false | false | 3,542 | py | setup.py | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... |
92780096f4c2781c9417edd592ec59a98612f73c | bb33e6be8316f35decbb2b81badf2b6dcf7df515 | /source/res/scripts/client/gui/battle_results/presenter/events/quests.py | 59bc85d2a5dd61ba4aaa382a8265bd9ed87977d6 | [] | no_license | StranikS-Scan/WorldOfTanks-Decompiled | 999c9567de38c32c760ab72c21c00ea7bc20990c | d2fe9c195825ececc728e87a02983908b7ea9199 | refs/heads/1.18 | 2023-08-25T17:39:27.718097 | 2022-09-22T06:49:44 | 2022-09-22T06:49:44 | 148,696,315 | 103 | 39 | null | 2022-09-14T17:50:03 | 2018-09-13T20:49:11 | Python | UTF-8 | Python | false | false | 395 | py | quests.py | # Python bytecode 2.7 (decompiled from Python 2.7)
# Embedded file name: scripts/client/gui/battle_results/presenter/events/quests.py
import typing
if typing.TYPE_CHECKING:
from gui.battle_results.reusable import ReusableInfo
from gui.impl.gen.view_models.views.lobby.postbattle.events.base_event_model import Ba... |
af3fa07f5606596d0379cf930183d90e7b7d4d51 | bc2ccaed5cf0367d196cedeef51d4b89db310db0 | /astroNN/neuralode/odeint.py | 56e0c2b8f3b5c7a0a04e33bf7caf756f1de6703a | [
"MIT"
] | permissive | henrysky/astroNN | 6477f816bd18037a62f65038f61a0c15f39bbd7f | 4b15c14ca6d7300276e55114fc0c23c81d30c5f3 | refs/heads/master | 2023-07-21T07:45:35.428248 | 2023-07-10T05:57:38 | 2023-07-10T05:57:38 | 106,888,772 | 184 | 55 | MIT | 2023-09-11T14:42:15 | 2017-10-14T01:40:28 | Python | UTF-8 | Python | false | false | 3,886 | py | odeint.py | import tensorflow as tf
from astroNN.neuralode.dop853 import dop853
from astroNN.neuralode.runge_kutta import rk4
method_list = {"dop853": dop853, "rk4": rk4}
def odeint(
func=None,
x=None,
t=None,
aux=None,
method="dop853",
precision=tf.float32,
*args,
**kwargs,
):
"""
To com... |
157125e96d040805ebfd4c83373ed69665d9f822 | 21ae99905ba4fc33e484eb55f27bcaa60207536a | /web/datasets/tests/management/commands/test_cityhall.py | db6b6de8d612240047af450e9cbc6528454c2000 | [
"MIT"
] | permissive | DadosAbertosDeFeira/maria-quiteria | 416f3e4d9fb531dd0c56d34227756e63cde9d7d8 | 9d55015aaaeb5e2107cc97ee8a84a04d1b56c798 | refs/heads/main | 2023-08-30T21:07:51.448228 | 2023-08-19T22:10:47 | 2023-08-19T22:10:47 | 220,512,724 | 177 | 84 | MIT | 2023-09-10T16:37:40 | 2019-11-08T17:07:12 | Python | UTF-8 | Python | false | false | 7,797 | py | test_cityhall.py | from datetime import datetime
import pytest
from django.utils.timezone import make_aware
from web.datasets.management.commands._cityhall import save_bid
@pytest.mark.django_db
class TestSaveBid:
def test_save_bid(self, mock_backup_file):
item = {
"crawled_at": make_aware(datetime(2020, 3, 21... |
3302a93b2a76a2898f601a9cf0312ed31f38ae0e | b7163b44b679e082fe97cf7fcd0c73b2fcdb38eb | /modules/dbnd-airflow-monitor/test_dbnd_airflow_monitor/runtime_syncer/test_error_aggregator.py | b82eab758afbcf1a1ed7dbb389f8b194009b886d | [
"Apache-2.0"
] | permissive | databand-ai/dbnd | 70c95d95e12bfb8ab471a6dce27691ed658cb92d | d59c99dcdcd280d7eec36a693dd80f8c8c831ea2 | refs/heads/develop | 2023-06-24T18:07:56.524526 | 2023-05-28T07:57:36 | 2023-05-28T07:57:36 | 231,361,064 | 257 | 33 | Apache-2.0 | 2023-08-06T08:30:28 | 2020-01-02T10:42:47 | Python | UTF-8 | Python | false | false | 1,358 | py | test_error_aggregator.py | # © Copyright Databand.ai, an IBM Company 2022
from airflow_monitor.shared.error_aggregator import ErrorAggregator
from . import random_text
def test_01_same_reporter():
e = ErrorAggregator()
assert not e.report("reporter", None).should_update
msg1 = random_text()
res = e.report("reporter", msg1)
... |
e59357b0de18f789720b0caec3fdd4515e8bc73c | 87491323e6295845dd7239fc213bc6b7955873c0 | /scorers/classification/binary/average_mcc.py | 8ac2984d20570340bd4e72b764ac6ebb93ce1756 | [
"Apache-2.0"
] | permissive | h2oai/driverlessai-recipes | e32d5632dfed52f19c9caeb406d30b956829658c | aeb082cfb773d6a0e45fbb7514610987f97b2799 | refs/heads/master | 2023-09-03T17:50:45.184460 | 2023-08-21T12:48:47 | 2023-08-21T12:48:47 | 174,063,977 | 239 | 103 | Apache-2.0 | 2023-08-21T12:48:49 | 2019-03-06T03:26:19 | Python | UTF-8 | Python | false | false | 1,825 | py | average_mcc.py | """Averaged Matthews Correlation Coefficient (averaged over several thresholds, for imbalanced problems). Example how to use Driverless AI's internal scorer."""
import typing
import numpy as np
from h2oaicore.metrics import CustomScorer
from h2oaicore.metrics import MccScorer
from sklearn.preprocessing import LabelEnco... |
90b67cf71aab3098142cabee4909ca694c43b97d | e061ab21018ac80573d03ef0c3cba8f448c4b7cc | /inference/server/alembic/versions/2023_05_29_1551-5ed411a331f4_add_active_thread_tail_messsage_id_and_.py | e4c5045f7af8b77614013fa8e62e73fe7025a4ff | [
"LicenseRef-scancode-warranty-disclaimer",
"Apache-2.0"
] | permissive | LAION-AI/Open-Assistant | 8b82c24fac954da421d66c3e90fbae6776ae6280 | 8c0e1a31bea1542dd39716b1dbbecd46785d9d23 | refs/heads/main | 2023-08-25T23:33:38.114219 | 2023-08-22T21:04:33 | 2023-08-22T21:04:33 | 577,603,990 | 34,014 | 3,206 | Apache-2.0 | 2023-09-11T19:13:48 | 2022-12-13T05:24:17 | Python | UTF-8 | Python | false | false | 2,091 | py | 2023_05_29_1551-5ed411a331f4_add_active_thread_tail_messsage_id_and_.py | """add_active_thread_tail_messsage_id_and_message_eval
Revision ID: 5ed411a331f4
Revises: 5b4211625a9f
Create Date: 2023-05-29 15:51:41.857262
"""
import sqlalchemy as sa
import sqlmodel
from alembic import op
from sqlalchemy.dialects import postgresql
# revision identifiers, used by Alembic.
revision = "5ed411a331f... |
2ceeb406e90ae4a18d4e5901ce0cc71ea6eadf0d | fc1dbf86c08788d9d47b933a206331e0d3af3f58 | /Chapter_13/test_ch13_r01_ut.py | ba69b297bc5d3baa9006d2711340e06e5edf2e4a | [] | no_license | PacktPublishing/Modern-Python-Cookbook-Second-Edition | 819e17fe1f3d7e4389a290bde699fb45e08543ab | 43c2549d51f05df6d897753a0d1e979f71b0729d | refs/heads/master | 2023-08-01T09:35:33.833038 | 2023-07-29T13:27:30 | 2023-07-29T13:27:30 | 225,331,228 | 107 | 60 | null | 2023-07-29T13:28:03 | 2019-12-02T09:06:30 | Python | UTF-8 | Python | false | false | 2,612 | py | test_ch13_r01_ut.py | """Python Cookbook
Chapter 13, recipe 1.
"""
from pathlib import Path
import unittest
from unittest.mock import Mock, patch, mock_open, MagicMock, call
import Chapter_13.ch13_r01
class GIVEN_get_config_WHEN_load_THEN_overrides_found(unittest.TestCase):
def setUp(self):
self.system_exist = Mock(
... |
9ddb30ea49802e58a4b659f77f283ec745ed288f | 8e6bb9c1a620a162b7d017c2373dd01be54ea86d | /bio/purge_dups/pbcstat/wrapper.py | 9909e4cf2b75f47bfe877f18c37390232c017ef6 | [] | no_license | snakemake/snakemake-wrappers | 5d0963502c26eb709513567e25422871fe477cf2 | 996bdcf2a96535b967dfa483c363a5496f4b3906 | refs/heads/master | 2023-08-19T05:18:44.337503 | 2023-08-18T12:03:38 | 2023-08-18T12:03:38 | 213,319,194 | 184 | 189 | null | 2023-09-12T11:38:35 | 2019-10-07T07:20:59 | CAP CDS | UTF-8 | Python | false | false | 573 | py | wrapper.py | __author__ = "Filipe G. Vieira"
__copyright__ = "Copyright 2022, Filipe G. Vieira"
__license__ = "MIT"
import tempfile
from snakemake.shell import shell
extra = snakemake.params.get("extra", "")
log = snakemake.log_fmt_shell(stdout=True, stderr=True)
with tempfile.TemporaryDirectory() as tmpdir:
shell("pbcsta... |
e433fc04521ebdb229b9758e65d1c17e77388291 | dcfc88503e3a8df5d9083b512178d254727d1a31 | /axelrod/tests/unit/test_deterministic_cache.py | 7d3929a2d4f4a62d8b19aca1b0873f3110ae41e0 | [
"MIT"
] | permissive | Axelrod-Python/Axelrod | b8502822da103fbf1a56ffbc090453b95bf9f2d8 | fa748627cd4f0333bb2dbfcb1454372a78a9098a | refs/heads/dev | 2023-09-04T06:41:55.216809 | 2023-07-10T19:42:54 | 2023-07-14T02:37:16 | 30,959,449 | 673 | 289 | NOASSERTION | 2023-07-14T02:37:18 | 2015-02-18T09:37:17 | Python | UTF-8 | Python | false | false | 3,980 | py | test_deterministic_cache.py | import os
import pathlib
import pickle
import unittest
import axelrod as axl
from axelrod.load_data_ import axl_filename
C, D = axl.Action.C, axl.Action.D
class TestDeterministicCache(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.test_key = (axl.TitForTat(), axl.Defector())
cls.t... |
733b8907e8b603219122518f56a1eef77671fb82 | 44ba493efd0fd7ae78880d3d93cc0d66166935e5 | /tests/integrations/xcode/test_ensure_xcode_is_installed.py | a83b52236b929f5bf7c65ed5294100ade5499345 | [
"BSD-3-Clause"
] | permissive | beeware/briefcase | 1b3eaebf0791728c68986809aa07abc436e422c6 | cc2dae1ffc58f9700d0ca57461cb05909bc01bec | refs/heads/main | 2023-09-01T19:24:15.424713 | 2023-09-01T04:35:53 | 2023-09-01T04:35:53 | 39,841,700 | 1,609 | 256 | BSD-3-Clause | 2023-09-11T10:04:34 | 2015-07-28T15:20:03 | Python | UTF-8 | Python | false | false | 13,252 | py | test_ensure_xcode_is_installed.py | import os
import subprocess
from unittest import mock
import pytest
from briefcase.exceptions import BriefcaseCommandError
from briefcase.integrations.xcode import Xcode
@pytest.fixture
def default_xcode_install_path(tmp_path):
return tmp_path / "Applications" / "Xcode.app"
@pytest.fixture
def xcode(default_x... |
43cd152e8b10c40081353dde2937352d880c793f | 5ecd6c73e60e15f5d426ae8dfcc5fb34540010f7 | /tryalgo/graph.py | 95907f47d6259a0897da3f8fa6e2f5abae32531f | [
"MIT"
] | permissive | jilljenn/tryalgo | 736568f223d9a08db9ec392a2420b478aff6039a | 634645707ebf2489356009a6f91f012b55b1ee39 | refs/heads/master | 2023-08-24T21:30:57.871068 | 2023-07-09T18:08:33 | 2023-07-09T18:08:33 | 50,119,000 | 390 | 124 | MIT | 2023-01-29T09:47:45 | 2016-01-21T16:05:54 | Python | UTF-8 | Python | false | false | 14,038 | py | graph.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""\
Reading graphs from files and writing into files
jill-jênn vie et christoph dürr - 2015-2019
"""
# pylint: disable=bad-whitespace, line-too-long, missing-docstring
# pylint: disable=dangerous-default-value, too-many-locals, too-many-branches
# from __future__ import... |
2c7b9d1ac72767c9148eefda6b13ca96c1d2f6a8 | 568fa58296378fa129ab3349adf010daa44ed45b | /tests/common/test_op/ascend/SecondOrder_trace_extract.py | 0a313fd6084ccc6735009bbd441727921073641c | [
"Apache-2.0",
"BSD-3-Clause",
"NCSA",
"X11-distribute-modifications-variant",
"Zlib",
"MIT",
"LicenseRef-scancode-unknown-license-reference",
"Unlicense",
"LLVM-exception",
"BSD-2-Clause"
] | permissive | mindspore-ai/akg | 37f471badc66de6a831f1f45ad84344f34d23ef2 | 99f33858d6972741748cbfc9ab0bf9600428fef7 | refs/heads/master | 2023-07-25T23:03:17.672665 | 2023-07-11T07:33:57 | 2023-07-11T07:33:57 | 274,077,856 | 319 | 36 | Apache-2.0 | 2021-12-30T13:43:08 | 2020-06-22T08:09:05 | Python | UTF-8 | Python | false | false | 1,570 | py | SecondOrder_trace_extract.py | # Copyright 2019-2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agre... |
dd51b3622a7ffe8e369fad6155207f49983fdf5c | 88f469b619b1e5a90ca9d117f56faa43324cd6d4 | /tests/response/unmarshal_response_test.py | cc302ea2f9b4f02ac1ab068f3c1d0e466a91f9f5 | [
"BSD-3-Clause"
] | permissive | Yelp/bravado-core | 6a6967259302ce28144c2969218cb44527862a74 | f2428528dd77a72d1a83e8da8421cb706a50d287 | refs/heads/master | 2023-08-31T05:16:14.256092 | 2023-07-19T01:14:48 | 2023-07-19T01:14:48 | 33,146,014 | 124 | 133 | NOASSERTION | 2023-08-27T19:17:04 | 2015-03-30T20:23:27 | Python | UTF-8 | Python | false | false | 6,324 | py | unmarshal_response_test.py | # -*- coding: utf-8 -*-
import msgpack
import pytest
from jsonschema import ValidationError
from mock import Mock
from mock import patch
from bravado_core.content_type import APP_JSON
from bravado_core.content_type import APP_MSGPACK
from bravado_core.response import IncomingResponse
from bravado_core.response import ... |
b81aa93bccd38701bab271b06b32fe72cb518c02 | 4a62772f2ddb531f033ced6832ec628597406a0e | /django_structlog/celery/steps.py | 85914b513eab8de80f756d33a913e27c866f5028 | [
"MIT"
] | permissive | jrobichaud/django-structlog | e753210f2612452f836cfb22adca8649250c62c4 | 7392c38a9776361cfb5570f98cf2d5bf386ae356 | refs/heads/master | 2023-08-17T14:52:34.154151 | 2023-08-14T10:24:22 | 2023-08-14T10:24:22 | 180,026,172 | 301 | 37 | MIT | 2023-09-12T10:09:41 | 2019-04-07T21:29:34 | Python | UTF-8 | Python | false | false | 1,450 | py | steps.py | from celery import bootsteps
from . import receivers
class DjangoStructLogInitStep(bootsteps.Step):
"""``celery`` worker boot step to initialize ``django_structlog``.
>>> from celery import Celery
>>> from django_structlog.celery.steps import DjangoStructLogInitStep
>>>
>>> app = Celery("django_... |
f6f5713641c0b37fa09a8e8ae553954668c4ac5c | 319251020b7aafa853a941dde8f2c4154dc5b833 | /tests/sensor_samples.py | b6f757ae58ec7e665b04e6f287a6a73df8c9f3b2 | [] | no_license | robmarkcole/Hue-sensors-HASS | 2df7ca8a4320d6f7248fe7a827ea9072ee2b6ad1 | efeafb4ee47966f3e6ce1253912cea494c90e1bc | refs/heads/master | 2023-09-03T03:20:06.350646 | 2021-05-19T03:28:15 | 2021-05-19T03:28:15 | 98,039,328 | 376 | 112 | null | 2021-07-20T11:19:03 | 2017-07-22T15:15:01 | Python | UTF-8 | Python | false | false | 3,139 | py | sensor_samples.py | """Examples of raw and parsed data for known sensors."""
# Binary sensors
MOCK_ZLLPresence = {
"state": {"presence": False, "lastupdated": "2020-02-06T07:28:08"},
"swupdate": {"state": "noupdates", "lastinstall": "2019-05-06T13:14:45"},
"config": {
"on": True,
"battery": 58,
"reacha... |
e24be6e95004f30d5bb76fd197a58f118b3915c1 | e95e60cb698b7b2e7622b33643df944c0362c02c | /daprApps_v1/socialNetwork/socialgraph/test/test_follow.py | 844c7eb8e04ba3a4c3d16283ee173c9d3a9d4ca5 | [
"MIT",
"Apache-2.0",
"GPL-1.0-or-later"
] | permissive | delimitrou/DeathStarBench | 5ae251e87052a83f0daadfe2f60231ee5e999dda | ef9823b441aec5a8133304f1cc322f882f767812 | refs/heads/master | 2023-09-01T02:23:38.342474 | 2023-08-28T17:37:44 | 2023-08-28T17:37:44 | 180,669,714 | 576 | 364 | Apache-2.0 | 2023-09-01T17:20:13 | 2019-04-10T21:57:24 | C | UTF-8 | Python | false | false | 4,151 | py | test_follow.py | import requests
import time
getfollow_url = 'http://localhost:31992/v1.0/invoke/dapr-social-graph/method/getfollow'
getfollower_url = 'http://localhost:31992/v1.0/invoke/dapr-social-graph/method/getfollower'
follow_url = 'http://localhost:31992/v1.0/invoke/dapr-social-graph/method/follow'
unfollow_url = 'http://localh... |
69df84d27f76d380cddfe300a2b1bb9778f32e41 | b08798b5b9b1aefa557fcf5aae2d7fcfc8310f32 | /beets/mediafile.py | 46288a71dc645079362775ef1e8594efc33e47e1 | [
"MIT"
] | permissive | beetbox/beets | f0f361fafd57977497e1981f27946fd52d428b27 | 0e5ade4f711dbf563d35c290affb0254eee41235 | refs/heads/master | 2023-09-01T20:50:06.125904 | 2023-08-27T19:07:13 | 2023-08-27T19:07:13 | 827,590 | 8,977 | 1,768 | MIT | 2023-09-13T02:33:14 | 2010-08-09T23:17:20 | Python | UTF-8 | Python | false | false | 1,186 | py | mediafile.py | # This file is part of beets.
# Copyright 2016, Adrian Sampson.
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, ... |
422c4e0d04c3bff09ace19a80f8cdc9177f38515 | ab40571d5051ad53c0f205fa797ba36eac516d06 | /language/compir/transform/apply_transformation.py | 4c202b18d67fb5969a61a0704486cd7b7a784b30 | [
"Apache-2.0",
"LicenseRef-scancode-generic-cla"
] | permissive | google-research/language | e941b1a92ab46d40d8d03bb0c314905cb6902ce2 | ac9447064195e06de48cc91ff642f7fffa28ffe8 | refs/heads/master | 2023-08-24T23:10:13.207294 | 2023-05-25T20:47:18 | 2023-05-25T22:29:27 | 153,201,352 | 1,567 | 371 | Apache-2.0 | 2023-07-06T23:03:15 | 2018-10-16T00:58:14 | Python | UTF-8 | Python | false | false | 2,954 | py | apply_transformation.py | # coding=utf-8
# Copyright 2018 The Google AI Language Team 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 ... |
1dc0583776fc6ef502836d20403ec9d076b517ce | a3d6556180e74af7b555f8d47d3fea55b94bcbda | /chrome/browser/extensions/api/image_writer_private/DEPS | 911cdbeda57f15272f79b5627e7d80b149411765 | [
"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 | 44 | DEPS | include_rules = [
"+device/udev_linux",
]
| |
67061d167af808a573b42dc61051370975cc3d2c | e4b940707c32882d248fda5cccdf513af8f52188 | /src/byro/members/signals.py | 6e0ffa0570f2047ed8517c66033173969f5ae2e1 | [
"Apache-2.0"
] | permissive | byro/byro | 5ca0d5cd6470ee18400432e85420d5594f54d927 | 3b757a4fd567a352f34c9e6638408bc98d144d03 | refs/heads/main | 2023-09-02T04:16:12.817733 | 2023-08-01T23:45:44 | 2023-08-02T11:44:34 | 100,076,395 | 144 | 56 | Apache-2.0 | 2023-09-12T23:39:11 | 2017-08-11T23:21:34 | Python | UTF-8 | Python | false | false | 1,353 | py | signals.py | import django.dispatch
new_member_mail_information = django.dispatch.Signal()
"""
Receives the new member as signal. Response will be added to the email
welcoming the new member.
"""
new_member_office_mail_information = django.dispatch.Signal()
"""
Receives the new member as signal. Response will be added to the email... |
f14dc058143f82dd9563650fe4d79a06e2a9cf5c | eb9f655206c43c12b497c667ba56a0d358b6bc3a | /python/helpers/typeshed/stubs/SQLAlchemy/sqlalchemy/sql/dml.pyi | ee31b23435b04446559eed63544c2cd216e15d4d | [
"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 | 3,275 | pyi | dml.pyi | from typing import Any
from . import roles
from .base import CompileState, DialectKWArgs, Executable, HasCompileState
from .elements import ClauseElement
from .selectable import HasCTE, HasPrefixes, ReturnsRows
class DMLState(CompileState):
isupdate: bool
isdelete: bool
isinsert: bool
def __init__(sel... |
f93479bd762f99f902119cefcb2b54202fc2c349 | 730430ba3b45d5728ef044863598199bfa33aaaa | /benchmark/torch/NeurIPS2020-Learning-to-Run-a-Power-Network-Challenge/track2/evaluate.py | 9de5bf39d8cb033108a25e47dd9fcd6e50a3e98a | [
"Apache-2.0"
] | permissive | PaddlePaddle/PARL | 062d1b4a5335553be6cdfc33ad12f07ebbcd7310 | 3bb5fe36d245f4d69bae0710dc1dc9d1a172f64d | refs/heads/develop | 2023-08-09T02:12:39.741551 | 2023-05-19T17:52:25 | 2023-05-19T17:52:25 | 131,044,128 | 3,818 | 988 | Apache-2.0 | 2023-07-28T03:59:20 | 2018-04-25T17:54:22 | Python | UTF-8 | Python | false | false | 3,707 | py | evaluate.py | # Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.