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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9df026c59e821730f268df55618abaf9c8173f10 | 76a1601da076db21fca2061252c542b146db5d42 | /tests/test_benchmark.py | e5f2ebc14f4800cc6c543fcde634abed0f22c01b | [
"MIT"
] | permissive | kyan001/ping3 | 247a9fc8439e5c4c506d866fe3f32d1a40e00296 | 9fff91181ea605d1957643af381ee5fb7f3e558a | refs/heads/master | 2023-06-07T22:20:44.020341 | 2022-12-15T11:55:18 | 2022-12-15T11:55:18 | 111,969,722 | 293 | 72 | MIT | 2023-04-18T16:15:11 | 2017-11-25T02:16:11 | Python | UTF-8 | Python | false | false | 706 | py | test_benchmark.py | import os
import sys
import timeit
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
import ping3 # noqa: linter (pycodestyle) should not lint this line.
dev_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
stmt = "ping3.ping('127.0.0.1')"
setup = "import sys; sys.path.... |
a2fc00c6148574a23da0f795067dd568150e9003 | a5a99f646e371b45974a6fb6ccc06b0a674818f2 | /PhysicsTools/Utilities/python/pileupFilter_cff.py | 9b997348489bb365ba2d5acf1a6e3de34edd3de8 | [
"Apache-2.0"
] | permissive | cms-sw/cmssw | 4ecd2c1105d59c66d385551230542c6615b9ab58 | 19c178740257eb48367778593da55dcad08b7a4f | refs/heads/master | 2023-08-23T21:57:42.491143 | 2023-08-22T20:22:40 | 2023-08-22T20:22:40 | 10,969,551 | 1,006 | 3,696 | Apache-2.0 | 2023-09-14T19:14:28 | 2013-06-26T14:09:07 | C++ | UTF-8 | Python | false | false | 1,041 | py | pileupFilter_cff.py | import FWCore.ParameterSet.Config as cms
from PhysicsTools.Utilities.pileupFilter_cfi import *
pileupFilter.pileupInfoSummaryInputTag = cms.InputTag("addPileupInfo")
pu20to25 = pileupFilter.clone()
pu20to25.minPU = cms.double(20)
pu20to25.maxPU = cms.double(25)
pu25to30 = pileupFilter.clone()
pu25to30.minPU = cms.d... |
5bb7f587be6b14c83c23642ebac70d864c5860eb | 66ce19daa74e0d1e796300b27f66aedea0820b13 | /cramming/backend/optimizers/schedulers.py | 840b63eb0be04800b6a076980585fb2b3e422f03 | [
"MIT"
] | permissive | JonasGeiping/cramming | 5a8026858fb730660959439c47c3c5e4ebf1722a | 1397b8c8ecf11e7a8e714d17d44f44e3664af711 | refs/heads/main | 2023-08-17T07:18:49.370984 | 2023-08-07T14:13:26 | 2023-08-07T14:13:26 | 583,172,165 | 1,111 | 87 | MIT | 2023-06-13T16:49:39 | 2022-12-29T01:29:41 | Python | UTF-8 | Python | false | false | 20,537 | py | schedulers.py | """Misc. optimizer implementations."""
import transformers
import math
from torch.optim.lr_scheduler import LambdaLR
import time
from functools import partial
def get_schedule_fn(initial_time, cfg_train):
"""Returns a callable scheduler_fn(optimizer).
Todo: Sanitize and unify these schedulers...
"""
... |
13ac927d432c78b0aaa7dc3f1af5b05adf07ab90 | d93f40ed89e9e393cee0d10e720783b48deccaf2 | /porespy/metrics/_meshtools.py | ad5717634e7be0c25a2d9b745a4050268041ad8e | [
"MIT"
] | permissive | PMEAL/porespy | 05a169dd67e28c17ff63a43276640d54bc6e037e | e78aa70e29697a381b7f26beb4adfdde513eaa45 | refs/heads/dev | 2023-08-16T12:55:53.343643 | 2023-07-31T15:29:50 | 2023-07-31T15:29:50 | 35,181,546 | 232 | 102 | MIT | 2023-09-14T04:46:19 | 2015-05-06T20:35:41 | Python | UTF-8 | Python | false | false | 10,114 | py | _meshtools.py | import logging
import numpy as np
import scipy.ndimage as spim
from porespy.tools import extend_slice, ps_round
from porespy.tools import _check_for_singleton_axes, Results
from porespy.tools import mesh_region
from skimage import measure
from porespy.tools import get_tqdm
from porespy import settings
__all__ = [
... |
d97102dc5ff93107494ccf1e07c30505b3de951e | 05209150ee39fac5d470516689e126bf5d8da55b | /setup.py | ed54028b3ce03da2fc8f7d77a6526a3c4c1dbea9 | [
"BSD-3-Clause"
] | permissive | aio-libs/aiocache | 7b694237583b233511d8ca6018d478405626b366 | 63600a6ebc39c1f4f1cd2677d8629b71cbbcf380 | refs/heads/master | 2023-08-21T23:18:33.890923 | 2023-08-16T18:23:56 | 2023-08-16T18:23:56 | 69,653,334 | 488 | 84 | BSD-3-Clause | 2023-09-13T18:16:11 | 2016-09-30T09:25:51 | Python | UTF-8 | Python | false | false | 1,174 | py | setup.py | import re
from pathlib import Path
from setuptools import setup
p = Path(__file__).with_name("aiocache") / "__init__.py"
try:
version = re.findall(r"^__version__ = \"([^']+)\"\r?$", p.read_text(), re.M)[0]
except IndexError:
raise RuntimeError("Unable to determine version.")
readme = Path(__file__).with_name... |
9bec401442b75400dd4bf52aa20c91df88929e37 | 380face90c8169eeca9e61af566ab1ba7590c05b | /vimdoc/regex.py | 8e977cd163ec74d26e34a5f2b1b6cb79dc93d804 | [
"Apache-2.0"
] | permissive | google/vimdoc | 778d41b742e611aeea7e6e5645a360395f9c8bbe | ed17321a17a8cf4c21d2f7f77352fc9b0fb42e66 | refs/heads/main | 2023-08-26T05:16:55.444522 | 2022-11-26T18:56:21 | 2022-11-26T18:56:21 | 17,838,265 | 250 | 37 | Apache-2.0 | 2023-04-10T00:01:12 | 2014-03-17T18:12:29 | Python | UTF-8 | Python | false | false | 10,764 | py | regex.py | # -*- coding: utf-8 -*-
"""When you gaze into the abyss, the abyss gazes also into you.
>>> comment_leader.match(' echo "string"')
>>> comment_leader.match(' " Woot') is not None
True
>>> comment_leader.match('"') is not None
True
>>> comment_leader.sub('', '" foo')
'foo'
>>> comment_leader.sub('', '"bar')
'bar'
>>... |
24c4e55bb1e841c320a2d6ddc5261194d6254e89 | 010279e2ba272d09e9d2c4e903722e5faba2cf7a | /contrib/python/plotly/py2/plotly/validators/layout/updatemenu/__init__.py | df6ff4d558631535a70577513194dba767a93d50 | [
"MIT",
"Apache-2.0"
] | permissive | catboost/catboost | 854c1a1f439a96f1ae6b48e16644be20aa04dba2 | f5042e35b945aded77b23470ead62d7eacefde92 | refs/heads/master | 2023-09-01T12:14:14.174108 | 2023-09-01T10:01:01 | 2023-09-01T10:22:12 | 97,556,265 | 8,012 | 1,425 | Apache-2.0 | 2023-09-11T03:32:32 | 2017-07-18T05:29:04 | Python | UTF-8 | Python | false | false | 13,418 | py | __init__.py | import _plotly_utils.basevalidators
class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self, plotly_name="yanchor", parent_name="layout.updatemenu", **kwargs
):
super(YanchorValidator, self).__init__(
plotly_name=plotly_name,
parent_... |
6fe5add4f2550aceb7747c3c1e436f8719081c2f | 85c668af40853f5ee48fbe8c4045df1a5dd4104e | /examples/volumetric/volumeFromMesh.py | ac6cb09ee9159de03c4492e7e1892f47437275b5 | [
"MIT",
"LicenseRef-scancode-public-domain",
"OFL-1.1"
] | permissive | marcomusy/vedo | 771db91bca05cda864fc7d1776d9140726676704 | 9a9f7c5e9ebf135e5c745c521c898866e3ede0ef | refs/heads/master | 2023-08-21T12:56:35.545713 | 2023-08-14T14:39:37 | 2023-08-14T14:39:37 | 110,261,047 | 1,419 | 206 | MIT | 2023-09-02T18:38:22 | 2017-11-10T15:17:47 | Python | UTF-8 | Python | false | false | 422 | py | volumeFromMesh.py | """Generate a Volume with the signed distance from a Mesh,
then generate the isosurface at distance -0.5"""
from vedo import *
mesh = Mesh(dataurl+"beethoven.ply").subdivide()
mesh.color('k').point_size(3) # render mesh as points
# Generate signed distance volume
vol = mesh.signed_distance(dims=(40,40,40))
# Generat... |
69300c5e172f267d2cd6f0c51643b012570d2039 | 88ab2245b599c7143e22e163151866130675bf0d | /tests/test_encoding.py | 560a6e5a3b15935476dc8af0a36a3c44f537b134 | [
"MIT"
] | permissive | jendrikseipp/vulture | 0181d47f29db9a9257735faf58d2ca8b54ed1864 | 2586ee6003ea0b5822838bb2072bad9289b130d3 | refs/heads/main | 2023-09-01T20:02:18.612664 | 2023-08-31T07:58:17 | 2023-08-31T08:03:20 | 84,045,805 | 2,745 | 147 | MIT | 2023-08-31T08:03:21 | 2017-03-06T08:00:18 | Python | UTF-8 | Python | false | false | 993 | py | test_encoding.py | import codecs
from . import v
from vulture.utils import ExitCode
assert v # Silence pyflakes.
def test_encoding1(v):
v.scan(
"""\
# -*- coding: utf-8 -*-
pass
"""
)
assert v.exit_code == ExitCode.NoDeadCode
def test_encoding2(v):
v.scan(
"""\
#! /usr/bin/env python
# -*- coding: u... |
49b6cd71576243aa736e24e8642000ff35287dad | d0cfa67c47fe18efe0d3658171b6a88174e22706 | /tests/test_system/test_system.py | 0f69d041c36a0b046b2759b3a5d1418fd472e991 | [
"Apache-2.0"
] | permissive | gilesknap/gphotos-sync | 42fd20a5eef6131377ced0d3c7c669c011e5494b | 1516059399de213ccb2be87c6abc61cb61af0e60 | refs/heads/main | 2023-09-02T12:18:26.157304 | 2023-08-29T20:00:36 | 2023-08-29T20:00:36 | 98,652,766 | 1,853 | 173 | Apache-2.0 | 2023-08-05T20:51:38 | 2017-07-28T13:35:07 | Python | UTF-8 | Python | false | false | 18,395 | py | test_system.py | import os
from datetime import datetime
from pathlib import Path
from typing import List
from unittest import TestCase
from unittest.mock import Mock, patch
from requests.exceptions import HTTPError
import gphotos_sync.Utils as Utils
import tests.test_setup as ts
from gphotos_sync.BadIds import BadIds
from gphotos_sy... |
dbce2be2823b80284cff474a855423319d4b2bcf | fab5ffec1370326b89a04513f0362b66ed132357 | /tests/fake_response.py | 3ae728c29153cf3cc91bbf1058d95f541fe97bbf | [
"MIT"
] | permissive | kmadac/bitstamp-python-client | a413da3167900659bb5848a4bc6a0a546e269aaa | c0f31b73d5e2cc4d5b29800d285b8ba777c77ad1 | refs/heads/master | 2022-10-31T19:14:18.249426 | 2022-10-26T18:17:48 | 2022-10-26T18:17:48 | 9,040,839 | 122 | 84 | MIT | 2022-10-24T07:06:08 | 2013-03-26T21:28:31 | Python | UTF-8 | Python | false | false | 265 | py | fake_response.py | import requests
class FakeResponse(requests.Response):
def __init__(self, content='', status_code=200):
super(FakeResponse, self).__init__()
self._content = content
self._content_consumed = True
self.status_code = status_code
|
e0549c06e25d256f9769b063285b3a2ce0db3a6c | 8d44e796eaf0c8e11bbc2a27ef093e97a25b6f4a | /haystack/nodes/other/__init__.py | a92291f4ed1382ef1b5dfc577e542ee5f8391ea7 | [
"Apache-2.0"
] | permissive | deepset-ai/haystack | caa5287051d1771395ea624b58097000825bad81 | 5f1256ac7e5734c2ea481e72cb7e02c34baf8c43 | refs/heads/main | 2023-09-01T02:41:23.490526 | 2023-08-31T15:33:12 | 2023-08-31T15:33:12 | 221,654,678 | 10,599 | 1,558 | Apache-2.0 | 2023-09-14T17:09:42 | 2019-11-14T09:05:28 | Python | UTF-8 | Python | false | false | 396 | py | __init__.py | from haystack.nodes.other.docs2answers import Docs2Answers
from haystack.nodes.other.join_docs import JoinDocuments
from haystack.nodes.other.route_documents import RouteDocuments
from haystack.nodes.other.join_answers import JoinAnswers
from haystack.nodes.other.join import JoinNode
from haystack.nodes.other.document_... |
26d2d7c7e2602999dedbed71f88ac915ffd98506 | 860c31e414c4c280b70ec0872042d715a2d56978 | /benchmarks/train_crnn_cinc2021/special_detectors.py | c2934284246a24abd05fd619425b0f6b2c7fb80b | [
"MIT"
] | permissive | DeepPSP/torch_ecg | 255e49ff436e13044a1f049141f982680e56970e | a40c65f4fefa83ba7d3d184072a4c05627b7e226 | refs/heads/master | 2023-09-01T06:47:17.153216 | 2023-08-31T18:00:47 | 2023-08-31T18:00:47 | 298,482,237 | 111 | 16 | MIT | 2023-08-21T11:25:07 | 2020-09-25T06:03:17 | Python | UTF-8 | Python | false | false | 24,662 | py | special_detectors.py | """
special detectors using rules,
for (perhaps auxiliarily) detecting PR, Brady (including SB), LQRSV, RAD, LAD, STach
pending arrhythmia classes: LPR, LQT
NOTE:
-----
1. ALL signals are assumed to have units in mV
2. almost all the rules can be found in `utils.ecg_arrhythmia_knowledge`
3. "PR" is superior to electr... |
2d4cd451c3611fc4d048a98931df59cb9d06fba0 | 8e90a7759ec7143427823547e0fbff58e0343aaa | /inference_api/src/main/object_detection/core/anchor_generator.py | 69e29d84db8817c79f00f4fdf4ee4aa14b9828a1 | [
"LicenseRef-scancode-free-unknown",
"Apache-2.0"
] | permissive | BMW-InnovationLab/BMW-TensorFlow-Training-GUI | 646a6f86f26887e94351b4c572b7fe7f0842f75c | 06531dae14365986c86baf735fd149317f4bb67a | refs/heads/master | 2023-07-20T01:48:27.299962 | 2023-07-12T15:22:22 | 2023-07-12T15:22:22 | 227,429,492 | 1,030 | 198 | Apache-2.0 | 2023-05-22T17:40:23 | 2019-12-11T18:06:11 | Python | UTF-8 | Python | false | false | 6,512 | py | anchor_generator.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... |
fe4a09cde8f36bfd6e351c4c35264defeaa8df92 | 799fee946fa3f4773cb1340bb36af5b465fdc570 | /configs/expose/hrnet_hmr_expose_body.py | e9e760d1b72ed13b23bfaf8d9d5f1680e1434ae1 | [
"Apache-2.0"
] | permissive | open-mmlab/mmhuman3d | 8c534d3c252f68f2d14d3e67fe67bfbccadfad36 | 9431addec32f7fbeffa1786927a854c0ab79d9ea | refs/heads/main | 2023-08-31T13:30:59.894842 | 2023-07-10T02:32:20 | 2023-07-10T02:32:20 | 432,877,190 | 966 | 139 | Apache-2.0 | 2023-08-31T08:49:16 | 2021-11-29T02:10:31 | Python | UTF-8 | Python | false | false | 9,416 | py | hrnet_hmr_expose_body.py | _base_ = ['../_base_/default_runtime.py']
use_adversarial_train = True
img_res = 256
# evaluate
evaluation = dict(interval=10, metric=['pa-mpjpe', 'mpjpe'])
optimizer = dict(
backbone=dict(type='Adam', lr=1.0e-4, weight_decay=1.0e-4),
head=dict(type='Adam', lr=1.0e-4, weight_decay=1.0e-4),
)
optimizer_config... |
ae2d81b991d4f8475bd420f680ad4c45700d3091 | 3dc3bbe607ab7b583eb52dbaae86636eb642960a | /tools/data/hacs/write_feature_csv.py | 9fb098b4bfbc0190dff2765c62d6e0496c78923f | [
"Apache-2.0"
] | permissive | open-mmlab/mmaction2 | 659c36c6083fd3d9d072e074a8d4b3a50342b9bd | 582b78fd6c3240500d5cacd292339d7d1ddbb056 | refs/heads/main | 2023-08-28T18:14:50.423980 | 2023-08-10T09:20:06 | 2023-08-10T09:20:06 | 278,810,244 | 3,498 | 1,028 | Apache-2.0 | 2023-09-07T06:50:44 | 2020-07-11T07:19:10 | Python | UTF-8 | Python | false | false | 689 | py | write_feature_csv.py | # Copyright (c) OpenMMLab. All rights reserved.
import mmengine
features = mmengine.load('result.pkl')
video_list = mmengine.list_from_file('hacs_data.txt')
feature_dir = '../../../data/HACS/slowonly_feature'
mmengine.mkdir_or_exist(feature_dir)
head = ','.join([f'f{i}' for i in range(700)]) + '\n'
for feature, vide... |
9fce1d817bb7c256f8ab75b0f87c1b0be73ba681 | 2342b8737b9ffeb9715158b8ec74a33c7a4947f6 | /koku/reporting_common/migrations/0029_costusagereportmanifest_operator_info.py | 0bf172be84a8b8a7a3ccee6dc26b96f436ae884d | [
"Apache-2.0"
] | permissive | project-koku/koku | 444d8df05da5416c9cee606c42481c99be45f13d | 0416e5216eb1ec4b41c8dd4999adde218b1ab2e1 | refs/heads/main | 2023-08-20T11:30:17.510182 | 2023-08-17T18:27:30 | 2023-08-17T18:27:30 | 126,496,611 | 225 | 94 | Apache-2.0 | 2023-09-14T17:38:08 | 2018-03-23T14:29:23 | Python | UTF-8 | Python | false | false | 913 | py | 0029_costusagereportmanifest_operator_info.py | # Generated by Django 3.1.12 on 2021-07-29 19:02
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):
dependencies = [("reporting_common", "0028_costusagereportmanifest_operator_version")]
operations = [
migrations.AddField(
model_name="cos... |
8ccfc748f893fc11e7befec5e50c6978eb181a30 | 7aa58030cd72c9f9c7906042e6c89693d373f065 | /ct/py/shell_utils.py | 96bb4f839c78f0e8a35a9dd49e8205168bd2e471 | [
"BSD-3-Clause"
] | permissive | google/skia-buildbot | 991162a936819f2be95ae9dbc86bd7a7fc649e6a | 9f1fad0fdc31563f6b43ec469b0550f2eeece804 | refs/heads/main | 2023-08-29T07:36:11.102029 | 2023-08-29T04:01:01 | 2023-08-29T04:15:54 | 15,773,235 | 131 | 63 | BSD-3-Clause | 2023-07-19T00:21:42 | 2014-01-09T17:10:17 | Go | UTF-8 | Python | false | false | 8,697 | py | shell_utils.py | #!/usr/bin/env python
# Copyright (c) 2012 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.
""" This module contains tools for running commands in a shell. """
import datetime
import os
import queue
import select
import su... |
3784868bfa49dfc8364768464b0465ccae6a2a14 | 0b134572e3ac3903ebb44df6d4138cbab9d3327c | /app/grandchallenge/verifications/views.py | 90c03fd20eab9ae8c5a7d1d7b37da27aee0da57a | [
"Apache-2.0"
] | permissive | comic/grand-challenge.org | 660de3bafaf8f4560317f1dfd9ae9585ec272896 | dac25f93b395974b32ba2a8a5f9e19b84b49e09d | refs/heads/main | 2023-09-01T15:57:14.790244 | 2023-08-31T14:23:04 | 2023-08-31T14:23:04 | 4,557,968 | 135 | 53 | Apache-2.0 | 2023-09-14T13:41:03 | 2012-06-05T09:26:39 | Python | UTF-8 | Python | false | false | 3,576 | py | views.py | from django.contrib import messages
from django.contrib.auth.mixins import (
PermissionRequiredMixin,
UserPassesTestMixin,
)
from django.core.exceptions import ObjectDoesNotExist
from django.http import Http404
from django.utils.html import format_html
from django.utils.timezone import now
from django.views.gen... |
41c38ebc2a7a0e1ed27e9f667428698471d8683c | 7ae27ce9a8c477855f8fd5fac54685716d868349 | /installer/lib/installer.py | aaf5779801ce1cffbf056c3c96023d37555df5cb | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | invoke-ai/InvokeAI | 5f7a2c1f19b1f686099a8cf4cec85aa9c7b6d81d | 2bd3cf28eabff2dcf3339669be222061dd208cb8 | refs/heads/main | 2023-08-31T07:06:56.721576 | 2023-08-30T19:05:17 | 2023-08-30T19:05:17 | 525,592,995 | 15,987 | 1,678 | Apache-2.0 | 2023-09-14T20:29:39 | 2022-08-17T01:04:27 | TypeScript | UTF-8 | Python | false | false | 16,886 | py | installer.py | # Copyright (c) 2023 Eugene Brodsky (https://github.com/ebr)
"""
InvokeAI installer script
"""
import os
import platform
import shutil
import subprocess
import sys
import venv
from pathlib import Path
from tempfile import TemporaryDirectory
from typing import Union
SUPPORTED_PYTHON = ">=3.9.0,<=3.11.100"
INSTALLER_RE... |
47b10ae853b0b97fee72dc1bcb08b81773ed79f2 | e75c5412063078c9ea3e7c71a8dc7a2026083a34 | /astropy/io/fits/tests/test_table.py | bac9d3c56b409255990304d3e18483b7d794eecf | [
"BSD-3-Clause"
] | permissive | astropy/astropy | d6636f24acdf2b18fc3e413ca0c4b1162a63dd41 | 53188c39a23c33b72df5850ec59e31886f84e29d | refs/heads/main | 2023-08-27T18:16:44.061375 | 2023-08-27T16:07:35 | 2023-08-27T16:07:35 | 2,081,289 | 3,922 | 1,935 | BSD-3-Clause | 2023-09-14T09:23:26 | 2011-07-21T01:33:49 | Python | UTF-8 | Python | false | false | 153,101 | py | test_table.py | # Licensed under a 3-clause BSD style license - see PYFITS.rst
import contextlib
import copy
import gc
import pickle
import re
import sys
import warnings
import numpy as np
import pytest
from numpy import char as chararray
try:
import objgraph
HAVE_OBJGRAPH = True
except ImportError:
HAVE_OBJGRAPH = Fal... |
60c430af250d419b2593c3f7513b0967f64fbece | 1180c0bfe29959d95f3c131e6e839950e528d4ee | /28/mjhea0/project/tests/test__config.py | 07dfaa41463bfd7f517cc6bd338c8f245b8f7355 | [
"MIT"
] | permissive | pybites/challenges | e3e461accd8e7f890aee8007ba5070086ef983fc | 02b77652d0901e6e06cb9b1e7cb3e59c675445c2 | refs/heads/community | 2023-08-20T18:19:02.982214 | 2022-11-17T09:23:31 | 2022-11-17T09:23:31 | 78,264,928 | 764 | 3,115 | null | 2023-07-21T05:58:19 | 2017-01-07T07:17:50 | Jupyter Notebook | UTF-8 | Python | false | false | 1,291 | py | test__config.py | # project/server/tests/test_config.py
import unittest
from flask import current_app
from flask_testing import TestCase
from project.server import app
class TestDevelopmentConfig(TestCase):
def create_app(self):
app.config.from_object('project.server.config.DevelopmentConfig')
return app
... |
c61142d5ad71b8f61f75309864e26c7f77882ccf | a5a36aa7200b0be6ea11ad669ba0534ee1b896a6 | /packages/vaex-core/vaex/multiprocessing.py | 0ea9249a020630739f23a4d7ca135138072ee8dc | [
"MIT",
"MPL-2.0"
] | permissive | vaexio/vaex | ec42919f272a723f884fece3c83975112e7a6f30 | 15245cf4332d4423ac58bd737aee27d911a1b252 | refs/heads/master | 2023-08-11T08:03:33.248943 | 2023-07-21T10:40:58 | 2023-07-21T10:40:58 | 24,528,468 | 7,892 | 686 | MIT | 2023-09-04T05:07:11 | 2014-09-27T09:44:42 | Python | UTF-8 | Python | false | false | 919 | py | multiprocessing.py | import threading
import pyarrow as pa
import vaex.arrow.convert
import vaex.multithreading
import vaex.utils
_pool = None
_pool_lock = threading.Lock()
def _get_pool():
global _pool
global _mempool
# Fast path avoiding lock
if _pool is not None:
return _pool
with _pool_lock:
if ... |
18638b34cce37e9ef67079ebf02ea4540cf80f44 | 725ac5a0bf72829be627bf8dc82fdc51ba0f94ae | /Text_Generation/GPT2_TitleGen/train.py | 7128f36c194bf6e473898542d1fc4b165d02dba4 | [] | no_license | shawroad/NLP_pytorch_project | fa14b6e4a156229765e1d552901d0492d8e1def3 | 1272fed2dc8fef78a9ded0f1ae1644d613a3b57b | refs/heads/master | 2023-06-25T02:37:35.503251 | 2023-06-12T10:57:11 | 2023-06-12T10:57:11 | 229,694,655 | 530 | 104 | null | 2020-12-08T09:21:47 | 2019-12-23T06:54:29 | Python | UTF-8 | Python | false | false | 7,487 | py | train.py | """
@file : train.py
@author : xiaolu
@email : luxiaonlp@163.com
@time : 2021-04-30
"""
import torch
import random
import os
from tqdm import tqdm
import numpy as np
from config import set_args
from model import GPT2LMHeadModel
from transformers import BertTokenizer, GPT2Config
from transformers import AdamW, get_... |
ecc8ca8bb5de122bf46d6a107ba9e5c165b1e2b7 | a64358585c6833b254abc909e41f91126ce156b5 | /scripts/kilt/convert_kilt_100w_passage_tsv_to_jsonl.py | 8c85bd324b0d1b64d650291ffe74e1d3b61e4a43 | [
"Apache-2.0"
] | permissive | castorini/pyserini | 97219f9fea4be31c6276b51b19ba271c9ecd6fd4 | 42b354914b230880c91b2e4e70605b472441a9a1 | refs/heads/master | 2023-09-01T18:38:44.259026 | 2023-09-01T01:35:47 | 2023-09-01T01:35:47 | 219,078,084 | 1,070 | 298 | Apache-2.0 | 2023-09-14T21:52:50 | 2019-11-01T23:36:34 | Python | UTF-8 | Python | false | false | 2,332 | py | convert_kilt_100w_passage_tsv_to_jsonl.py | #
# Pyserini: Reproducible IR research with sparse and dense representations
#
# 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... |
2475d926ee4456689651f3f7b20e2bc8aed434b6 | a2dbff3e4f7cb1c84fed0835dc76106621e75cb9 | /UnityPy/math/Color.py | fced5e1c55b57f0e680147cc8e3574d3304b87f7 | [
"MIT"
] | permissive | K0lb3/UnityPy | e3325c9b993ad910bd68fdfcf6c55889ebb894ab | 2fe1be2abfb8e3d53ba062f70390a517f41cfae7 | refs/heads/master | 2023-08-19T04:51:40.863686 | 2023-07-18T12:38:31 | 2023-07-18T12:38:31 | 198,518,141 | 612 | 126 | MIT | 2023-08-31T11:02:15 | 2019-07-23T22:36:09 | Python | UTF-8 | Python | false | false | 1,539 | py | Color.py | from .Vector4 import Vector4
class Color:
R: float
G: float
B: float
A: float
def __init__(self, r: float = 0.0, g: float = 0.0, b: float = 0.0, a: float = 0.0):
self.R = r
self.G = g
self.B = b
self.A = a
def __eq__(self, other):
if isinstance(other, ... |
649e36987442b8b2fe903381a2a193251e38cb97 | 028ddc5e85d89c26f8320b70d8ffe80f3d5aec52 | /docs/code/stochastic_processes/spectral/spectral_1d_1v.py | 25b9d7e1d96f2c4e6dfae00d4a849db6720b9198 | [
"MIT"
] | permissive | SURGroup/UQpy | 3b516706e9072c6fac80da0bdfbd23e2193f5844 | 9e98a6279aa5a2ec2d6d4c61226c34712547bcc6 | refs/heads/master | 2023-09-04T03:38:35.294389 | 2023-08-04T12:55:02 | 2023-08-04T12:55:02 | 112,795,497 | 215 | 70 | MIT | 2023-09-14T14:18:22 | 2017-12-01T23:05:13 | Python | UTF-8 | Python | false | false | 1,921 | py | spectral_1d_1v.py | """
One-dimensional & one variable
=================================================================
In this example, the Spectral Representation Method is used to generate stochastic processes from a prescribed Power
Spectrum. This example illustrates how to use the SRM class for a one dimensional and one variable c... |
927df458c06693e36a6dbc813092e97271523879 | 150a7b11cb531f8bc2a045aefcf2ebe1d151efa3 | /ocs_ci/ocs/exceptions.py | e43f68d7e34f65198eee84b3c64f0ff4e4df5935 | [
"MIT"
] | permissive | red-hat-storage/ocs-ci | c7ac414e1b86552da0439223dfa9bca39977f31a | 5e9e504957403148e413326f65c3769bf9d8eb39 | refs/heads/master | 2023-08-17T16:19:51.154403 | 2023-08-17T13:27:12 | 2023-08-17T13:27:12 | 179,558,938 | 146 | 210 | MIT | 2023-09-14T16:38:44 | 2019-04-04T19:00:02 | Python | UTF-8 | Python | false | false | 9,358 | py | exceptions.py | class CommandFailed(Exception):
pass
class UnexpectedDeploymentConfiguration(Exception):
pass
class UnsupportedOSType(Exception):
pass
class CephHealthException(Exception):
pass
class NoobaaHealthException(Exception):
pass
class NoobaaCliChecksumFailedException(Exception):
pass
class... |
f523f5f1acee7719b07a933eb131e4fb973625bc | 96dcea595e7c16cec07b3f649afd65f3660a0bad | /tests/components/esphome/test_media_player.py | ffbe8f50e4855efba1f0477c08adf06ad0a2fa53 | [
"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 | 7,402 | py | test_media_player.py | """Test ESPHome media_players."""
from unittest.mock import AsyncMock, Mock, call
from aioesphomeapi import (
APIClient,
MediaPlayerCommand,
MediaPlayerEntityState,
MediaPlayerInfo,
MediaPlayerState,
)
import pytest
from homeassistant.components import media_source
from homeassistant.components.m... |
ba6a3e1806f58ab64c1abf3ac6351950930e4912 | 3c41443364da8b44c74dce08ef94a1acd1b66b3e | /api/wb/views.py | c67eee23c158a4124e296855a3c4ae13abe69a88 | [
"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 | 3,365 | py | views.py | from rest_framework import status
from rest_framework.exceptions import ValidationError, NotFound
from rest_framework.response import Response
from osf.models import Guid
from rest_framework.views import APIView
from addons.osfstorage.models import OsfStorageFileNode, OsfStorageFolder
from api.base.parsers import HMAC... |
2bc4dd1e461f90f0a3193479ec15ddaaaee3d845 | 08ea46c0a9fb71ef222cf6afa2e9094f5663dcfb | /tests/test_filter.py | dae128a441028ff016b2a4722a9243df0efd95d2 | [
"BSD-3-Clause-Clear"
] | permissive | griffithlab/pVACtools | e358919eee76100f79dbe8d40d02b3fce8b227ac | 3317d2c18e82edb5ea183ae09820beb68c39d256 | refs/heads/master | 2023-08-09T15:42:06.725426 | 2023-08-09T14:28:44 | 2023-08-09T14:28:44 | 102,625,109 | 124 | 64 | BSD-3-Clause-Clear | 2023-09-08T14:17:22 | 2017-09-06T15:23:04 | Python | UTF-8 | Python | false | false | 5,407 | py | test_filter.py | import unittest
import os
import tempfile
from filecmp import cmp
import py_compile
from pvactools.lib.filter import Filter, FilterCriterion
from tests.utils import *
class FilterTests(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.filter_path = os.path.join(pvactools_directory(), "pvactool... |
d1284a710fe6c315d06565133c81991ba0a12bb3 | 018b3938de032c476442936fcae108b7e2101c2f | /jira_agile_metrics/cli_test.py | 5098bfc95d49e9b63d00e8666ac78aa6f0ad5fba | [
"MIT"
] | permissive | DeloitteDigitalUK/jira-agile-metrics | f18c62eb760c278286a95d077ed2dabfebd83ad6 | 1fb00bfa9e80db21e1aba2a4ec61eb9fe9d4c111 | refs/heads/master | 2023-07-09T16:45:21.799194 | 2023-06-29T12:32:47 | 2023-06-29T12:32:47 | 131,981,157 | 240 | 96 | MIT | 2023-06-29T12:32:49 | 2018-05-03T10:44:18 | Python | UTF-8 | Python | false | false | 2,098 | py | cli_test.py | import json
import tempfile
from .cli import (
override_options,
run_command_line,
configure_argument_parser,
get_trello_client,
)
def test_override_options():
class FauxArgs:
def __init__(self, opts):
self.__dict__.update(opts)
for k, v in opts.items():
... |
7c8a2154e2e36a69c8afb5dba42f860e43cd3c9c | afbeee6a3a83946449e5fccf7c74457461ed921f | /docs/source/reference/plots/factory/vectors_labels_plot.py | 179c8f5475fc22866097de8381c7585599bb7e6f | [
"MIT"
] | permissive | K3D-tools/K3D-jupyter | d69e541de90835415be5516d3e6758b1fcd530d2 | 5973d30947f6bc80b2a50ba260f198bec57ddfc1 | refs/heads/main | 2023-09-01T20:41:01.159202 | 2023-08-26T20:45:56 | 2023-08-26T20:45:56 | 44,377,817 | 859 | 134 | MIT | 2023-08-26T20:33:59 | 2015-10-16T10:14:20 | Python | UTF-8 | Python | false | false | 686 | py | vectors_labels_plot.py | import k3d
import numpy as np
def generate():
o = np.array([[1, 2, 3],
[2, -3, 0]]).astype(np.float32)
v = np.array([[1, 1, 1],
[-4, 2, 3]]).astype(np.float32)
labels = ['(1, 1, 1)', '(2, -3, 0)']
plt_vectors = k3d.vectors(origins=o,
... |
e616c870159da21fc0fbf9962c4433c49e3fb73e | 5f1881006aaf4f3c2515f375ad29c15fd6612de2 | /poset_decoding/traversal_path_prediction/MatchZoo-py/matchzoo/preprocessors/units/unit.py | 4dd3390e650795788d6462af5c8f89e9691ebd97 | [
"MIT",
"LicenseRef-scancode-generic-cla",
"LicenseRef-scancode-proprietary-license",
"LicenseRef-scancode-free-unknown",
"LicenseRef-scancode-unknown-license-reference",
"LGPL-2.1-or-later",
"Apache-2.0",
"LicenseRef-scancode-public-domain",
"BSD-2-Clause"
] | permissive | microsoft/ContextualSP | 4edb598d40f683f9a1143b92a9d24e1066d51ec4 | 4198ebce942f4afe7ddca6a96ab6f4464ade4518 | refs/heads/master | 2023-08-02T22:08:40.503853 | 2023-07-14T07:22:50 | 2023-07-14T07:22:50 | 255,534,819 | 332 | 70 | MIT | 2023-07-25T19:23:48 | 2020-04-14T07:01:54 | Python | UTF-8 | Python | false | false | 272 | py | unit.py | import abc
import typing
class Unit(metaclass=abc.ABCMeta):
"""Process unit do not persive state (i.e. do not need fit)."""
@abc.abstractmethod
def transform(self, input_: typing.Any):
"""Abstract base method, need to be implemented in subclass."""
|
60ccb9cd76271cfb37b101336876ab9b85649085 | 79cd7118917561ab5b8d25f04143e0975578b74f | /pytorch_widedeep/utils/deeptabular_utils.py | 234c65b96aab2bcd40c799b3c1e592b075eabb69 | [
"Apache-2.0",
"MIT"
] | permissive | jrzaurin/pytorch-widedeep | aac80263ba8e94d36b41fb1f47181a66471d7594 | 74f1ab6feb2e231fdb8c10478638d9e8d5cf3a47 | refs/heads/master | 2023-09-06T06:41:41.800801 | 2023-09-04T15:32:38 | 2023-09-04T15:32:38 | 107,763,164 | 1,036 | 124 | Apache-2.0 | 2023-09-04T15:32:39 | 2017-10-21T08:11:44 | Python | UTF-8 | Python | false | false | 9,761 | py | deeptabular_utils.py | import warnings
import numpy as np
import torch
import pandas as pd
from scipy.ndimage import gaussian_filter1d
from sklearn.exceptions import NotFittedError
from scipy.signal.windows import triang
from pytorch_widedeep.wdtypes import List, Union, Tensor, Literal, Optional
from pytorch_widedeep.utils.general_utils im... |
2ec8da6ffc29a6b2ff17c5b08c7659051213328c | e3e2dc80c5827a4597949e458c723225f7dafb66 | /petastorm/spark/spark_dataset_converter.py | 9b6d0d51332422e13c2fc5d8064a1418fdb683ed | [
"Apache-2.0",
"LicenseRef-scancode-free-unknown",
"GPL-1.0-or-later",
"LicenseRef-scancode-python-cwi",
"LicenseRef-scancode-other-copyleft",
"Python-2.0"
] | permissive | uber/petastorm | 5c2403a353bde1367b86f64664ed7c12d9cfe662 | 0b0775af42539189d913702d9695566431dabd8a | refs/heads/master | 2023-09-01T22:23:46.457386 | 2023-02-03T00:10:35 | 2023-02-03T00:10:35 | 137,539,238 | 1,677 | 284 | Apache-2.0 | 2023-05-12T14:47:41 | 2018-06-15T23:15:29 | Python | UTF-8 | Python | false | false | 31,333 | py | spark_dataset_converter.py | # Copyright (c) 2020 Databricks, 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... |
36d8db00928e9dc63c1825680753c90f4ca3e0b6 | 69d8d91954f6623f3674d52d734d589f72383628 | /openstack_dashboard/test/test_plugins/panel_config/_10_admin_add_panel.py | ed490549ea45fc52fd917849570547a1590b4e30 | [
"Apache-2.0"
] | permissive | openstack/horizon | d031cebe126c06ad9717bbc52790b3d890e8661e | 7896fd8c77a6766a1156a520946efaf792b76ca5 | refs/heads/master | 2023-09-04T06:57:58.069907 | 2023-09-01T20:17:10 | 2023-09-01T20:17:10 | 2,665,166 | 1,060 | 1,175 | Apache-2.0 | 2023-08-07T02:33:44 | 2011-10-28T13:12:05 | Python | UTF-8 | Python | false | false | 1,329 | py | _10_admin_add_panel.py | # The name of the panel to be added to HORIZON_CONFIG. Required.
PANEL = 'plugin_panel'
# The name of the dashboard the PANEL associated with. Required.
PANEL_DASHBOARD = 'admin'
# The name of the panel group the PANEL is associated with.
PANEL_GROUP = 'admin'
# Python panel class of the PANEL to be added.
ADD_PANEL =... |
199321bce526cab9ae7a0f7bb4ece53a1606e802 | 8ef61b6b4cd0c533524d23c3e77a9caf70077023 | /tests/network/test_providers__tvmaze.py | 9e00a22707f6c6381e866fe34c279ef4e3242b62 | [
"MIT"
] | permissive | jkwill87/mnamer | 73e68d27d184193218605484a0db1c935f256ca6 | 82da0712ab99e9d80c60adda3db6a3225fdf49b4 | refs/heads/main | 2023-08-30T21:48:34.567239 | 2023-08-15T19:31:04 | 2023-08-15T19:31:04 | 107,178,928 | 656 | 69 | MIT | 2023-09-11T15:02:41 | 2017-10-16T20:23:27 | Python | UTF-8 | Python | false | false | 6,450 | py | test_providers__tvmaze.py | import pytest
from mnamer.exceptions import MnamerNotFoundException
from mnamer.metadata import MetadataEpisode
from mnamer.providers import TvMaze
from tests import EPISODE_META, JUNK_TEXT, TEST_DATE
pytestmark = [
pytest.mark.network,
pytest.mark.tvmaze,
pytest.mark.flaky(reruns=1),
]
@pytest.fixture(... |
4254244a006411c17592bdd840f91ffa4ec9cdef | eb9f655206c43c12b497c667ba56a0d358b6bc3a | /python/testData/intentions/paramTypeInNewGoogleDocString_after.py | 3427a1256e77f475bfd6c4f3b8559264e3ec496b | [
"Apache-2.0"
] | permissive | JetBrains/intellij-community | 2ed226e200ecc17c037dcddd4a006de56cd43941 | 05dbd4575d01a213f3f4d69aa4968473f2536142 | refs/heads/master | 2023-09-03T17:06:37.560889 | 2023-09-03T11:51:00 | 2023-09-03T12:12:27 | 2,489,216 | 16,288 | 6,635 | Apache-2.0 | 2023-09-12T07:41:58 | 2011-09-30T13:33:05 | null | UTF-8 | Python | false | false | 71 | py | paramTypeInNewGoogleDocString_after.py | def f(x):
"""
Args:
x (object):
"""
return 42 |
5912c5105fc327385d1ea559dbdeb6a05699d24b | 163bad17c2ba0aeeb05e29d1a7f870e675ee28eb | /hikyuu/util/singleton.py | 4bd348a3f88db227e645efc651001bec990c6dab | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | fasiondog/hikyuu | 8b7bc4fd99ff915c621586a480c3663ef3fae464 | 86b0fa5b0e847d9a04905bca93660a7a33fc9fc2 | refs/heads/master | 2023-09-03T15:04:33.983389 | 2023-09-03T11:17:46 | 2023-09-03T11:17:46 | 5,103,141 | 1,884 | 547 | MIT | 2023-09-06T16:53:51 | 2012-07-18T23:21:42 | C++ | UTF-8 | Python | false | false | 764 | py | singleton.py | #!/usr/bin/python
# -*- coding: utf8 -*-
# cp936
#==========================================================
# History
# 1. 20200822, Added by fasiondog
#==========================================================
import threading
class SingletonType(type):
"""基于 metalclass 实现单例
示例:
class MyClass(metacl... |
6ff695df794174d470f3a93489d82796ffb211b4 | ef77030fb29c5bb01c6dd553df1fb52d4ef9fb69 | /migrate.py | 066711f333e047abb89f1c920ca6157a541574e3 | [
"MIT"
] | permissive | Run1e/AceBot | 8c9aaaf27b710fd70b6c85d4c65bb4be71af9117 | b4640f633947f0a9fd902e8ddc95a4b667b85602 | refs/heads/master | 2023-08-08T10:30:14.962290 | 2023-06-26T23:24:59 | 2023-06-26T23:24:59 | 95,386,761 | 107 | 38 | MIT | 2023-07-20T15:47:24 | 2017-06-25T21:28:32 | Python | UTF-8 | Python | false | false | 30,547 | py | migrate.py | import asyncio
import asyncpg
from config import DB_BIND
QUERIES = open("migrate.sql", "r").read()
def log(connection, message):
print(message)
async def main():
db = await asyncpg.connect(DB_BIND)
db.add_log_listener(log)
async with db.transaction():
await db.execute(QUERIES)
#... |
d18bef91e4b0162e6bcd3f41c3e38bfb3db3b78b | 6cdb2951be6088b11125f34047cddfb8f231169f | /models/DGI.py | ed5fdc64c31623a62e37f9d8c3b431e9cdaf7956 | [] | no_license | pcy1302/DMGI | 4159d0307b675855782799209b802a0fe13fab36 | 06e17067dd919aa87ad5813e8090312a53223a89 | refs/heads/master | 2023-04-14T22:40:16.581565 | 2023-03-31T05:34:01 | 2023-03-31T05:34:01 | 205,034,242 | 133 | 31 | null | null | null | null | UTF-8 | Python | false | false | 3,756 | py | DGI.py | # Code based on https://github.com/PetarV-/DGI/blob/master/models/dgi.py
import torch
torch.manual_seed(0)
torch.cuda.manual_seed_all(0)
torch.backends.cudnn.deterministic = True
torch.backends.cudnn.benchmark = False
import torch.nn as nn
from embedder import embedder
from layers import GCN, Discriminator
import numpy... |
2a636cc6a8d5036e04a9bf01f429a377583f06c4 | f305f84ea6f721c2391300f0a60e21d2ce14f2a5 | /11_动态规划/dp分类/树上dp/Ways to Remove Leaves of a Tree.py | b67316c497a7d92b9f7267de0eba33a63095de95 | [] | 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 | 754 | py | Ways to Remove Leaves of a Tree.py | # 移除二叉树叶子节点的方案数
from math import comb
from typing import Tuple
class Tree:
def __init__(self, val, left=None, right=None):
self.val = val
self.left = left
self.right = right
class Solution:
def solve(self, root: Tree) -> int:
def dfs(root: Tree) -> Tuple[int, in... |
3a12c849da684eb60b817322b1da8866debf05c3 | 5b78eb7c4fbf2c0ae1846507a60503caaf8de2f9 | /aspynb/chapter03_problems.py | 6acd4174ee2d5b1dc1bca66229230dc2e5dfb580 | [
"MIT"
] | permissive | minireference/noBSLAnotebooks | ff95a809cebfe91df9933be6305bcd6cbbbf1a6a | 423c0041882268daa15d57c2472c82cf2b340e78 | refs/heads/master | 2022-04-30T03:55:57.096192 | 2022-03-14T19:43:04 | 2022-03-14T19:43:04 | 56,690,720 | 142 | 33 | MIT | 2018-06-17T15:56:37 | 2016-04-20T13:48:35 | Jupyter Notebook | UTF-8 | Python | false | false | 5,067 | py | chapter03_problems.py | def cells():
'''
# 3/ Problem solutions
'''
'''
'''
from sympy import *
init_printing()
'''
'''
'''
'''
'''
## P3.1
'''
'''
'''
AUG = Matrix([
[1, 5, 25],
[2, 1, 32]])
AUG
'''
'''
AUG.rref()
'''
''... |
d3496bca5422af1d75a41827477874afa1576140 | e65a4dbfbfb0e54e59787ba7741efee12f7687f3 | /devel/electron24/files/patch-third__party_blink_renderer_build_scripts_run__with__pythonpath.py | 7d56dad775befc32ee74f79c7f8c389753f0befe | [
"BSD-2-Clause",
"BSD-3-Clause"
] | permissive | freebsd/freebsd-ports | 86f2e89d43913412c4f6b2be3e255bc0945eac12 | 605a2983f245ac63f5420e023e7dce56898ad801 | refs/heads/main | 2023-08-30T21:46:28.720924 | 2023-08-30T19:33:44 | 2023-08-30T19:33:44 | 1,803,961 | 916 | 918 | NOASSERTION | 2023-09-08T04:06:26 | 2011-05-26T11:15:35 | null | UTF-8 | Python | false | false | 492 | py | patch-third__party_blink_renderer_build_scripts_run__with__pythonpath.py | --- third_party/blink/renderer/build/scripts/run_with_pythonpath.py.orig 2022-02-07 13:39:41 UTC
+++ third_party/blink/renderer/build/scripts/run_with_pythonpath.py
@@ -22,6 +22,7 @@ def main():
existing_pp = (
os.pathsep + env['PYTHONPATH']) if 'PYTHONPATH' in env else ''
env['PYTHONPATH... |
c1c77de2875259efd61d601af116ef3bcf97d8ec | f8c5b73c9706470c4dd60d523096e18bc448a960 | /certbot/certbot/_internal/tests/plugins/storage_test.py | a6f8f876d178afec644db4df3b34a427bc749ef3 | [
"MIT",
"Apache-2.0"
] | permissive | certbot/certbot | 14ab43d76fcf0242d875d551f0d98334c43e7957 | b1978ff18837e40d16eedf2090330af53d8ceaa5 | refs/heads/master | 2023-09-04T00:37:03.739195 | 2023-08-26T23:19:38 | 2023-08-26T23:19:38 | 26,516,210 | 18,581 | 3,265 | NOASSERTION | 2023-09-12T15:18:59 | 2014-11-12T02:52:20 | Python | UTF-8 | Python | false | false | 5,541 | py | storage_test.py | """Tests for certbot.plugins.storage.PluginStorage"""
import json
import sys
from typing import Iterable
from typing import List
from typing import Optional
import unittest
from unittest import mock
import pytest
from certbot import errors
from certbot.compat import filesystem
from certbot.compat import os
from certb... |
bf664c8fac2a9235b2a012c1e5499a76922c7680 | 51a75d73097a460d362908ebf6db9cd623558e7d | /query_strategies/strategy.py | 3a96ba61671c59697d65e754a373756509698cb4 | [
"MIT"
] | permissive | ej0cl6/deep-active-learning | 6e72b4ab07b24ff445da06977836eb6dc96ab9b2 | eea3d2c703b83ce412f7dd6f518c017713d15ced | refs/heads/master | 2022-10-17T23:36:07.207405 | 2022-10-03T20:23:35 | 2022-10-03T20:23:35 | 131,947,745 | 715 | 192 | MIT | 2022-01-23T07:51:42 | 2018-05-03T05:51:17 | Python | UTF-8 | Python | false | false | 1,188 | py | strategy.py | import numpy as np
import torch
import torch.nn.functional as F
import torch.optim as optim
from torch.utils.data import DataLoader
class Strategy:
def __init__(self, dataset, net):
self.dataset = dataset
self.net = net
def query(self, n):
pass
def update(self, pos_idxs, neg_idxs=... |
3668f38dbec0d7ed902d25030804193ececd430b | ea7e87037d0a859250b3b0768fe657ab8520c8be | /Python/tigre/algorithms/single_pass_algorithms.py | 3fac062145eff8c48683c283c92149469b0304d8 | [
"BSD-3-Clause"
] | permissive | CERN/TIGRE | 80e99d4a49a2af2ec2248db8be3c48142df37134 | aa4651538e9bce7d0fee2cd2fcf0baa9fcb2ae19 | refs/heads/master | 2023-09-03T15:12:02.100453 | 2023-08-16T09:54:34 | 2023-08-16T09:54:34 | 61,034,131 | 473 | 194 | BSD-3-Clause | 2023-09-11T11:41:49 | 2016-06-13T12:22:21 | MATLAB | UTF-8 | Python | false | false | 3,750 | py | single_pass_algorithms.py | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import copy
import numpy as np
from tigre.utilities.Atb import Atb
from tigre.utilities.filtering import filtering
def FDK(proj, geo, angles, **kwargs):
"""
solves CT image reconstruct... |
e26cd3c46c526be1f4d380f1b492812165e583b5 | eb9f655206c43c12b497c667ba56a0d358b6bc3a | /python/testData/debug/stepping/test_smart_step_into_comparison_operator.py | de3cc2d10add833590c83fb1ca0346bc569e2692 | [
"Apache-2.0"
] | permissive | JetBrains/intellij-community | 2ed226e200ecc17c037dcddd4a006de56cd43941 | 05dbd4575d01a213f3f4d69aa4968473f2536142 | refs/heads/master | 2023-09-03T17:06:37.560889 | 2023-09-03T11:51:00 | 2023-09-03T12:12:27 | 2,489,216 | 16,288 | 6,635 | Apache-2.0 | 2023-09-12T07:41:58 | 2011-09-30T13:33:05 | null | UTF-8 | Python | false | false | 326 | py | test_smart_step_into_comparison_operator.py | from __future__ import print_function
class A:
def __init__(self, a):
self.a = a
def __gt__(self, other):
if (self.a > other.a):
return True
else:
return False
if (A(2) > A(3) > A(1)):
print("ob1 is greater than ob2")
else:
print("ob2 is greater than ... |
cd120abeaa3c1f7dca17c8d7bdf4bcdd4b6aa412 | 1c7622f563fac18d9644e883742b6f539665aa26 | /pytradfri/device/__init__.py | 182d5fb1d62e20eafc85f33db791fd03e33eea88 | [
"MIT"
] | permissive | home-assistant-libs/pytradfri | 3708d65edb236c3b8f430cdf59f45b1d4849352f | 0d7bfbfc63670c050570c96bf3f4a1b20c8091a3 | refs/heads/master | 2023-08-29T08:44:07.477619 | 2023-08-28T06:10:00 | 2023-08-28T06:10:00 | 87,844,301 | 233 | 44 | MIT | 2023-09-13T02:00:41 | 2017-04-10T18:30:17 | Python | UTF-8 | Python | false | false | 7,044 | py | __init__.py | """Classes to interact with devices."""
from __future__ import annotations
from datetime import datetime
from pydantic import BaseModel, Field
from ..const import (
ATTR_APPLICATION_TYPE,
ATTR_DEVICE_BATTERY,
ATTR_DEVICE_FIRMWARE_VERSION,
ATTR_DEVICE_INFO,
ATTR_DEVICE_MANUFACTURER,
ATTR_DEVIC... |
e6914bd73ff8cfa9d0f7421265f985fdd0bdebb7 | 13aa7b9d76c364eb6b112ad057f81ea2fa63da3a | /modules/vulnerability-analysis/skipfish.py | 1c895907a3a5c7975524addabde9c090ef313c22 | [] | no_license | trustedsec/ptf | df2ed6671c9efd05db756faec41298fbfb50bc5a | f87dfa8b3b62f2157fc51e8abe31bf3f0bf8541c | refs/heads/master | 2023-08-31T08:01:58.033518 | 2023-03-15T17:04:49 | 2023-03-15T17:04:49 | 35,505,904 | 5,087 | 1,434 | null | 2023-08-27T22:33:41 | 2015-05-12T18:37:25 | Python | UTF-8 | Python | false | false | 934 | py | skipfish.py | #!/usr/bin/env python
#####################################
# Installation module for skipfish
#####################################
# AUTHOR OF MODULE NAME
AUTHOR="Mauro Risonho de Paula Assumpcao (firebits)"
# DESCRIPTION OF THE MODULE
DESCRIPTION="This module will install/update skipfish - web application security... |
8783f7ad7c726420f4ed0031b05c220ca3b628b5 | 2f1e3f24f2798507c9eb73185a955c9bfb735140 | /libserving/serialization/knn.py | 59812b179d2dba82dbd9f6cc0c4fa18f3d753a23 | [
"MIT"
] | permissive | massquantity/LibRecommender | e4f55b06b2208c794a3f97f7ff89413fa9beaffa | 8d5fbe9c177f5b91c2b6f19a155a83320dd0e20c | refs/heads/master | 2023-08-31T23:48:37.634663 | 2023-08-20T11:58:15 | 2023-08-20T11:58:15 | 174,493,761 | 251 | 55 | MIT | 2023-08-20T11:58:16 | 2019-03-08T07:58:27 | Python | UTF-8 | Python | false | false | 1,190 | py | knn.py | import os
from scipy import sparse
from libreco.bases import CfBase
from .common import (
check_path_exists,
save_id_mapping,
save_model_name,
save_to_json,
save_user_consumed,
)
def save_knn(path: str, model: CfBase, k: int):
"""Save KNN model to disk.
Parameters
----------
pa... |
e6f2a88b8ce2cddc0030b6d372e0aeb074949359 | e9869359c839c8c175ae7877bc35dcfdfe4058f8 | /kornia/feature/sosnet.py | 7d13bfa8667fd6096555fa19978d0b8cc5e179ae | [
"Apache-2.0"
] | permissive | kornia/kornia | 80f93eae6a70b8bc0c9784f92a842ab9a6ab54ae | 1e0f8baa7318c05b17ea6dbb48605691bca8972f | refs/heads/master | 2023-08-31T06:32:45.960859 | 2023-08-30T21:59:41 | 2023-08-30T21:59:41 | 145,693,916 | 7,351 | 833 | Apache-2.0 | 2023-09-12T21:59:29 | 2018-08-22T10:31:37 | Python | UTF-8 | Python | false | false | 2,733 | py | sosnet.py | from typing import Dict
import torch
from torch import nn
from kornia.core.check import KORNIA_CHECK_SHAPE
from kornia.utils.helpers import map_location_to_cpu
urls: Dict[str, str] = {}
urls["lib"] = "https://github.com/yuruntian/SOSNet/raw/master/sosnet-weights/sosnet_32x32_liberty.pth"
urls["hp_a"] = "https://gith... |
e7c0709c7a3f1301a74908e3c6e163249706a104 | f597af39c32bb29d2be446d3c83cc512efd66a9d | /website/build_rules.py | 66790f4ae1df4ea3556a25bf50a34be76c16ccdb | [
"MIT",
"LicenseRef-scancode-public-domain"
] | permissive | thibaudcolas/curlylint | dc099b1bb5f438be065bd3a5da1b1b0dfcd39236 | 4c36043873f973aa49ed471c238a1de17d603db5 | refs/heads/main | 2023-08-17T18:10:10.941564 | 2022-03-30T08:45:04 | 2022-03-30T08:45:04 | 236,965,316 | 215 | 30 | MIT | 2023-06-08T01:35:40 | 2020-01-29T11:18:14 | HTML | UTF-8 | Python | false | false | 8,962 | py | build_rules.py | # -*- coding: utf-8 -*-
# type: ignore
import codecs
import json
import os
import toml
from curlylint.rules.aria_role import aria_role
from curlylint.rules.django_forms_rendering import django_forms_rendering
from curlylint.rules.html_has_lang import html_has_lang
from curlylint.rules.image_alt import image_alt
from... |
25c98dd3f2584b2cdea96a150d6c2fe74082d25b | 518bf342bc4138982af3e2724e75f1d9ca3ba56c | /solutions/2014. Longest Subsequence Repeated k Times/2014.py | 89feb5df1e6cd0c83c2f3c33040973593b880203 | [
"MIT"
] | permissive | walkccc/LeetCode | dae85af7cc689882a84ee5011f0a13a19ad97f18 | a27be41c174565d365cbfe785f0633f634a01b2a | refs/heads/main | 2023-08-28T01:32:43.384999 | 2023-08-20T19:00:45 | 2023-08-20T19:00:45 | 172,231,974 | 692 | 302 | MIT | 2023-08-13T14:48:42 | 2019-02-23T15:46:23 | C++ | UTF-8 | Python | false | false | 950 | py | 2014.py | class Solution:
def longestSubsequenceRepeatedK(self, s: str, k: int) -> str:
ans = ''
count = [0] * 26
possibleChars = []
q = collections.deque(['']) # Store subseqs, length grows by 1 each time
for c in s:
count[ord(c) - ord('a')] += 1
for c in string.ascii_lowercase:
if count... |
94ddbfea0c1f1cd03d330c2a88e703733354e66f | 66333a96a8806181228a860085ee5d01888c7b2f | /image_classification/resnet50/resnet50.py | ec66a39b19af9c8bf5f4190bade2d020bb038879 | [
"MIT"
] | permissive | axinc-ai/ailia-models | 7c5c15d813a58fcae678a8107ebc9c39ee9912f2 | da1c277b602606586cd83943ef6b23eb705ec604 | refs/heads/master | 2023-08-31T07:43:39.848448 | 2023-08-29T05:06:27 | 2023-08-29T05:06:27 | 206,917,330 | 1,554 | 286 | null | 2023-09-14T19:56:14 | 2019-09-07T04:50:59 | Python | UTF-8 | Python | false | false | 6,193 | py | resnet50.py | import sys
import time
import ailia
import cv2
import numpy as np
import resnet50_labels
# import original modules
sys.path.append('../../util')
# logger
from logging import getLogger # noqa: E402
import webcamera_utils # noqa: E402
from classifier_utils import (plot_results, print_results, # noqa: E402
... |
f5040cc88008c8b125286c93781c74531a3ed787 | 549270020f6c8724e2ef1b12e38d11b025579f8d | /recipes/quickjs/all/conanfile.py | 8e68a544366f1d85f602af721a2435b46c9a29fc | [
"MIT"
] | permissive | conan-io/conan-center-index | 1bcec065ccd65aa38b1fed93fbd94d9d5fe6bc43 | 3b17e69bb4e5601a850b6e006e44775e690bac33 | refs/heads/master | 2023-08-31T11:34:45.403978 | 2023-08-31T11:13:23 | 2023-08-31T11:13:23 | 204,671,232 | 844 | 1,820 | MIT | 2023-09-14T21:22:42 | 2019-08-27T09:43:58 | Python | UTF-8 | Python | false | false | 2,991 | py | conanfile.py | from conan import ConanFile
from conan.tools.files import get, copy
from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout
from conan.tools.microsoft import is_msvc
from conan.errors import ConanInvalidConfiguration
import os
required_conan_version = ">=1.47.0"
class QuickJSConan(ConanFile):
name = "q... |
9ca264de8ccfd0f41e72f4f432d870c926d3a217 | a5a99f646e371b45974a6fb6ccc06b0a674818f2 | /Configuration/Skimming/test/skimmingMatrix.py | a8baa0f7f99ddb2cc17dcd13146cfb7e50ce6a99 | [
"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 | 583 | py | skimmingMatrix.py | from __future__ import print_function
import optparse
import os
usage="--list"
parser = optparse.OptionParser(usage)
parser.add_option("--GT")
parser.add_option("--option",default="")
(options,args)=parser.parse_args()
from Configuration.Skimming.autoSkim import autoSkim
for PD in autoSkim:
com='cmsDriver.py skim... |
74a418af4c2f7b2f98f26b840d5c8a067ac19d23 | 57ad04cc8cbedd2ec38d4924860dc394f8234430 | /tests/acceptance/steps/django_test_client.py | ca3c39c00859459f4f9b10a5a12dd774c7162d3c | [
"MIT"
] | permissive | behave/behave-django | 6e703f4deeca6d93371635765c828cc52a5c6658 | 5637bcdac5f3fc84fd2fdffc1ce3222af4744c7b | refs/heads/main | 2023-08-30T23:14:18.627602 | 2023-08-24T01:56:40 | 2023-08-24T06:16:25 | 53,788,968 | 215 | 63 | MIT | 2023-08-24T06:16:26 | 2016-03-13T14:21:55 | Python | UTF-8 | Python | false | false | 312 | py | django_test_client.py | from behave import then, when
@when(u'I use django\'s test client to visit "{url}"')
def use_django_client(context, url):
context.response = context.test.client.get(url)
@then(u'it should return a successful response')
def it_should_be_successful(context):
assert context.response.status_code == 200
|
b5cf7b2ab3548c74041c195fc3d2c36c5e66446e | 2388c65a174c03100347c6a2042a6a0662e67b36 | /arrow/api.py | d8ed24b978506c40a32e8a4b35001ddd746bdfee | [
"Apache-2.0"
] | permissive | arrow-py/arrow | 0fd0897cbdc94207339439ac6b99e945ca93ecd8 | 74a759b88447b6ecd9fd5de610f272c8fb6130a2 | refs/heads/master | 2023-09-04T02:56:23.565103 | 2022-11-15T16:25:22 | 2022-11-15T16:25:22 | 6,750,871 | 2,410 | 175 | Apache-2.0 | 2023-09-12T05:30:58 | 2012-11-18T20:23:27 | Python | UTF-8 | Python | false | false | 2,755 | py | api.py | """
Provides the default implementation of :class:`ArrowFactory <arrow.factory.ArrowFactory>`
methods for use as a module API.
"""
from datetime import date, datetime
from datetime import tzinfo as dt_tzinfo
from time import struct_time
from typing import Any, List, Optional, Tuple, Type, Union, overload
from arrow.... |
99ae3a743e309adf704fe4886747c9325fc4a7bd | b8bbdfc593b6d816e67a344f720f90ec05236778 | /tests/utils/test_state.py | 16153c7637d3a7e2c1baa68d48331309efe4324a | [
"Apache-2.0",
"BSD-3-Clause",
"MIT"
] | permissive | apache/airflow | ed78db0a8bab7e096990e143926e52f518e288ab | 1b122c15030e99cef9d4ff26d3781a7a9d6949bc | refs/heads/main | 2023-09-01T08:37:34.556097 | 2023-09-01T06:49:05 | 2023-09-01T06:49:05 | 33,884,891 | 22,756 | 11,558 | Apache-2.0 | 2023-09-14T20:12:36 | 2015-04-13T18:04:58 | Python | UTF-8 | Python | false | false | 2,364 | py | test_state.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 u... |
7a00f9e110e71d0606ac792e7986931a26c0bb6e | 59864cbd213b5da6f50d6255b0a021564b3d5bd4 | /challenges/Single-Sign-On/poller/for-release/machine.py | 25a8815eadf6df81e60475be35b03393b705cbfe | [
"MIT",
"BSD-3-Clause",
"LicenseRef-scancode-unknown",
"BSD-2-Clause"
] | permissive | trailofbits/cb-multios | 8af96a4fbc3b34644367faa135347f88e0e0d0a3 | 810d7b24b1f62f56ef49b148fe155b0d0629cad2 | refs/heads/master | 2023-09-05T03:56:20.229403 | 2022-12-27T15:47:54 | 2022-12-27T15:47:54 | 41,688,943 | 522 | 133 | MIT | 2023-06-29T02:47:13 | 2015-08-31T17:04:31 | C | UTF-8 | Python | false | false | 7,079 | py | machine.py | #!/usr/bin/env python
#
# Copyright (C) 2014 Narf Industries <info@narfindustries.com>
#
# 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
# th... |
24e6fb5974019e08b95e0e5e411d2fd5fa607b5a | 38d86234ef4ba4ed5ac3bf585bcff8615004d2a6 | /ssseg/modules/models/segmentors/pspnet/__init__.py | c537604462f5fe493767070b9160a31d7be51044 | [
"Apache-2.0"
] | permissive | SegmentationBLWX/sssegmentation | e57e7a071b03214c55248c4b1e64c85796744bf1 | fe3d0dac83055b728fe3c5df964507fc7cc4948c | refs/heads/main | 2023-08-05T02:49:57.370911 | 2023-08-01T13:49:17 | 2023-08-01T13:49:17 | 306,540,019 | 725 | 97 | null | null | null | null | UTF-8 | Python | false | false | 81 | py | __init__.py | '''initialize'''
from .pspnet import PSPNet
from .ppm import PyramidPoolingModule |
934cb4ef0b70cdc4365ccbd82c48803334819726 | f305f84ea6f721c2391300f0a60e21d2ce14f2a5 | /11_动态规划/acwingdp专项练习/计数类dp/N 个节点的无向连通图有多少个.py | b976432c59a8837985df9b8d6a0de7af5ee50c62 | [] | 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 | 180 | py | N 个节点的无向连通图有多少个.py | # N 个节点的无向连通图有多少个
# 1≤N≤50
# https://www.acwing.com/solution/content/87369/
# https://oeis.org/search?q=1%2C1%2C4%2C38&language=english&go=Search
|
f7544e6a4e0b9395da12f455521c8eaf25ed516f | 82db07aef13ed906dd52816f01c8e2f4a5825295 | /tests/basic/test_basic.py | b546b541a85a777d29b106a641b5fb115b46f26c | [
"BSD-3-Clause"
] | permissive | jrialland/python-astar | 4a2e1c1564d85be724dbd79f8ea8f06df0b7ba55 | 8efaf3873f6ef9a762ec545d82f4e40ada763a37 | refs/heads/master | 2023-08-08T15:51:07.988273 | 2023-08-01T10:18:15 | 2023-08-01T10:18:15 | 22,218,925 | 183 | 74 | BSD-3-Clause | 2023-09-13T21:58:42 | 2014-07-24T15:44:31 | Python | UTF-8 | Python | false | false | 1,758 | py | test_basic.py | import unittest
from astar import AStar
class BasicAStar(AStar):
def __init__(self, nodes):
self.nodes = nodes
def neighbors(self, n):
for n1, d in self.nodes[n]:
yield n1
def distance_between(self, n1, n2):
for n, d in self.nodes[n1]:
if n == n2:
... |
254ae87e14b0237df8b68798e90ce88467c3c755 | 76908a765b4b430167bfeb6a12ecc3e247552c2a | /widgets/pose_control/generic_daq_slider_ui.py | fbbbfe0512bdbb02880966346cfe8fc458ea6b12 | [
"MIT"
] | permissive | mithi/hexapod-robot-simulator | 3159a345645d2d82451c45ddc17cbbc4ed5ab5ee | 47eda0bdd3556220fa0cfcb197fbc0be1fed4c49 | refs/heads/master | 2023-09-06T06:26:48.099190 | 2023-04-09T11:53:51 | 2023-04-09T11:53:51 | 240,484,880 | 759 | 114 | MIT | 2023-05-01T21:37:40 | 2020-02-14T10:37:49 | Python | UTF-8 | Python | false | false | 428 | py | generic_daq_slider_ui.py | from widgets.pose_control.joint_widget_maker import (
make_all_joint_widgets,
make_daq_slider,
)
from widgets.pose_control.kinematics_section_maker import make_section
# ................................
# COMPONENTS
# ................................
widgets = make_all_joint_widgets(joint_input_function=make_... |
9ae96e10aaa310875adc834e11c54bb4e6d3c4f2 | f43a1f64cb5c483fad6782c866508d8724622f24 | /PyViCare/PyViCare.py | 163b54bd9ea0614928124ece31f7ace355b1ea04 | [
"Apache-2.0"
] | permissive | somm15/PyViCare | 88bfca043e739f7b662be0dc0a05e443e7a31825 | 8ba411483a865e074d1146fd1b8b7a8c4f4be122 | refs/heads/master | 2023-08-31T11:34:36.605842 | 2023-06-08T20:17:01 | 2023-06-08T20:17:01 | 164,931,903 | 110 | 89 | Apache-2.0 | 2023-09-11T22:18:11 | 2019-01-09T20:20:53 | Python | UTF-8 | Python | false | false | 4,081 | py | PyViCare.py | import logging
from datetime import datetime
from PyViCare.PyViCareAbstractOAuthManager import AbstractViCareOAuthManager
from PyViCare.PyViCareBrowserOAuthManager import ViCareBrowserOAuthManager
from PyViCare.PyViCareCachedService import ViCareCachedService
from PyViCare.PyViCareDeviceConfig import PyViCareDeviceCon... |
397a97e894be370c958392180acfa9764f2fdd32 | 9efca95a55cb4df52d895d42f1ec10331516a734 | /tools/c7n_left/c7n_left/test.py | c95f38b2c94081ac2756b7333b47f1082b37176a | [
"Apache-2.0"
] | permissive | cloud-custodian/cloud-custodian | 519e602abe00c642786441b64cc40857ef5bc9de | 27563cf4571040f923124e1acb2463f11e372225 | refs/heads/main | 2023-09-04T10:54:55.963703 | 2023-09-01T17:40:17 | 2023-09-01T17:40:17 | 52,837,350 | 3,327 | 1,096 | Apache-2.0 | 2023-09-14T14:03:30 | 2016-03-01T01:11:20 | Python | UTF-8 | Python | false | false | 7,178 | py | test.py | # Copyright The Cloud Custodian Authors.
# SPDX-License-Identifier: Apache-2.0
#
import operator
import time
from c7n.config import Config
from c7n.data import Data as DataMatcher
from c7n.utils import load_file
from c7n.output import NullTracer
from .core import CollectionRunner
from .output import RichCli, Output
... |
7eca00e3fe2d64c55900410d97d971f14bfb8fb8 | e6a5c54d3ba5e8ec69c1aebc7ba4992b1e3fdb68 | /test/test_indexer.py | c0215644dac8a4979cb74d9c12df6a668545d98a | [
"MIT"
] | permissive | arun1729/cog | 6697bb5d6120705712bc84d297a7895020a18b06 | 24a362880fb7bc501787dd695fcdf979e77212c7 | refs/heads/master | 2023-08-04T04:54:30.743451 | 2023-07-30T02:03:06 | 2023-07-30T02:03:06 | 111,333,972 | 258 | 25 | MIT | 2023-07-30T02:03:07 | 2017-11-19T21:35:00 | Python | UTF-8 | Python | false | false | 2,087 | py | test_indexer.py | from cog.core import Record
from cog.core import Table
from cog import config
import logging
import os
import shutil
from logging.config import dictConfig
import string
import random
import unittest
DIR_NAME = "TestIndexer"
class TestIndexer(unittest.TestCase):
@classmethod
def setUpClass(cls):
path... |
805736b425d1278574733cffdbad0303bd428b8c | ac061521667ca29d3e722fac91c553f5a2357238 | /Chapter_12/12-6/echopong | a7a5e8219195f351a37b35f076341c197cbfa8ae | [] | no_license | stanleylst/ansibleUI | 41c5e1bacac818af5d6416fe14f1a1f28a2877a7 | 629ff046452fc85f44153bbc18ef190cb1a64ed0 | refs/heads/master | 2020-05-22T00:00:13.747773 | 2019-01-09T08:35:48 | 2019-01-09T08:35:48 | 55,881,270 | 122 | 99 | null | 2018-06-20T06:04:24 | 2016-04-10T04:46:23 | JavaScript | UTF-8 | Python | false | false | 442 | echopong | #!/usr/bin/python
from ansible.module_utils.basic import *
import os
module = AnsibleModule(
argument_spec = dict(
args=dict(required=True)),
supports_check_mode=True
)
args = module.params['args']
rc = os.system('echo {0}'.format(args))
if rc == 0:
result = dict(echo=args... | |
2004ea83426510457f4975d4646dc1076f444bdb | fe62120411ed637989e584294150637c48565522 | /hubspot3/owners.py | f213a01ccb90a7620579baa7512586eebe4aa628 | [
"MIT"
] | permissive | jpetrucciani/hubspot3 | a8fbeb7c30b20c4c9858a41753167b73bdbaf5df | f8806f3ccc89ff1ec4468319ae742dc6dd96a819 | refs/heads/master | 2023-06-24T16:17:01.003178 | 2023-06-15T22:06:26 | 2023-06-15T22:06:26 | 88,071,177 | 147 | 84 | MIT | 2023-06-15T21:58:13 | 2017-04-12T16:03:05 | Python | UTF-8 | Python | false | false | 2,185 | py | owners.py | """
hubspot owners api
"""
from hubspot3.crm_associations import CRMAssociationsClient
from hubspot3.base import BaseClient
OWNERS_API_VERSION = "v2"
class OwnersClient(BaseClient):
"""
hubspot3 Owners client
:see: https://developers.hubspot.com/docs/methods/owners/owners_overview
"""
def _get_... |
8d0602271d9af459fed60723a498c88e26c9d900 | fdb9bdc6c4ab2f14ba71e544493706d5e275899f | /fhir/resources/R4B/tests/test_regulatedauthorization.py | e2c96ddbedbf51702e05e2304f5e0c2e2f737a94 | [
"BSD-3-Clause"
] | permissive | nazrulworld/fhir.resources | 6ae8aea8180c611b0c5050759c6dcdf63e4cb061 | 1fd6ea476b27b3fcb8c4ef8f23bc51cf161e69e3 | refs/heads/main | 2023-08-30T18:27:27.277249 | 2023-07-03T19:57:06 | 2023-07-03T19:57:06 | 165,297,877 | 256 | 83 | NOASSERTION | 2023-08-24T15:34:05 | 2019-01-11T19:26:41 | Python | UTF-8 | Python | false | false | 5,638 | py | test_regulatedauthorization.py | # -*- coding: utf-8 -*-
"""
Profile: http://hl7.org/fhir/StructureDefinition/RegulatedAuthorization
Release: R4B
Version: 4.3.0
Build ID: c475c22
Last updated: 2022-05-28T12:47:40.239+10:00
"""
from pydantic.validators import bytes_validator # noqa: F401
from .. import fhirtypes # noqa: F401
from .. import regulated... |
c49eae5791e5e0e761c4b340547bdfb81a397975 | f576f0ea3725d54bd2551883901b25b863fe6688 | /sdk/security/azure-mgmt-security/azure/mgmt/security/v2022_03_01/models/_models_py3.py | c621e73948f6a297a3b424bcc81e288106482bad | [
"LicenseRef-scancode-generic-cla",
"MIT",
"LGPL-2.1-or-later"
] | permissive | Azure/azure-sdk-for-python | 02e3838e53a33d8ba27e9bcc22bd84e790e4ca7c | c2ca191e736bb06bfbbbc9493e8325763ba990bb | refs/heads/main | 2023-09-06T09:30:13.135012 | 2023-09-06T01:08:06 | 2023-09-06T01:08:06 | 4,127,088 | 4,046 | 2,755 | MIT | 2023-09-14T21:48:49 | 2012-04-24T16:46:12 | Python | UTF-8 | Python | false | false | 8,205 | py | _models_py3.py | # coding=utf-8
# pylint: disable=too-many-lines
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRe... |
f1c5d824034c721d4e791ba79398e76ddb263f0d | d1c2d00078520cd556f60b7213c27856f8b3460d | /playground/infrastructure/helper.py | f211650f7bba3f6544969daf462f75b0b271e757 | [
"BSD-3-Clause",
"MIT",
"LicenseRef-scancode-protobuf",
"Apache-2.0",
"Python-2.0"
] | permissive | apache/beam | ed11b9e043465c720659eac20ac71b5b171bfa88 | 6d5048e05087ea54abc889ce402ae2a0abb9252b | refs/heads/master | 2023-09-04T07:41:07.002653 | 2023-09-01T23:01:05 | 2023-09-01T23:01:05 | 50,904,245 | 7,061 | 4,522 | Apache-2.0 | 2023-09-14T21:43:38 | 2016-02-02T08:00:06 | Java | UTF-8 | Python | false | false | 13,598 | py | helper.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 ... |
07d4527881067f158c4f087a0bd714475ebf8acb | d5c85f2800cf9c0c07f767d072ac43869b2b7ece | /src/macad_gym/envs/urban_2car.py | 22aca64c9717b3ec4351ee5d8537587224757c96 | [
"MIT"
] | permissive | praveen-palanisamy/macad-gym | 86f1125355f9a658994ca513b89a969d27a7e993 | 1006e849ff4c5bf5d29cb43ab8c2a0bdcc992367 | refs/heads/master | 2023-05-24T22:42:39.737106 | 2023-01-29T08:09:34 | 2023-01-29T08:09:34 | 186,694,187 | 282 | 65 | MIT | 2023-05-20T22:22:12 | 2019-05-14T20:20:03 | Python | UTF-8 | Python | false | false | 3,703 | py | urban_2car.py | #!/usr/bin/env python
import time
from env.carla.multi_env import MultiCarlaEnv
# from env.carla.multi_env import get_next_actions
# config_file = open("urban_2_car_1_ped.json")
# configs = json.load(config_file)
U2C_CONFIGS = {
"env": {
"enable_planner": True,
"server_map": "/Game/Carla/Maps/To... |
1a4a2ba4c381a83969e1f220d65cb6fcef31d540 | 0265181df8e2fbea2f1cb34e9901e2d8c5dae188 | /examples/simple_generator_consumer.py | 106b61c1681737e906f7fffb68a5bffc93a2d0c6 | [
"MIT"
] | permissive | eandersson/amqpstorm | 5fd33d8ec47b7058ec1ce09c488ecdb612726c0a | f5f8031ee57b0d00a2316bce9c47d5767f4ba668 | refs/heads/2.x | 2023-08-31T11:25:36.344175 | 2023-08-26T19:57:02 | 2023-08-26T20:05:56 | 23,178,253 | 166 | 43 | MIT | 2023-01-02T12:57:12 | 2014-08-21T07:32:19 | Python | UTF-8 | Python | false | false | 422 | py | simple_generator_consumer.py | import logging
from amqpstorm import Connection
logging.basicConfig(level=logging.INFO)
with Connection('localhost', 'guest', 'guest') as connection:
with connection.channel() as channel:
channel.queue.declare('simple_queue')
channel.basic.consume(queue='simple_queue', no_ack=False)
for m... |
0ff61d349e7a9d5c37830f8d1fdb1d9a1098cb5c | 62179a165ec620ba967dbc20016e890978fbff50 | /tests/openvino/test_telemetry.py | e5cb604d2246eef7781fa4b057dc0b2c3db139a0 | [
"Apache-2.0"
] | permissive | openvinotoolkit/nncf | 91fcf153a96f85da166aacb7a70ca4941e4ba4a4 | c027c8b43c4865d46b8de01d8350dd338ec5a874 | refs/heads/develop | 2023-08-24T11:25:05.704499 | 2023-08-23T14:44:05 | 2023-08-23T14:44:05 | 263,687,600 | 558 | 157 | Apache-2.0 | 2023-09-14T17:06:41 | 2020-05-13T16:41:05 | Python | UTF-8 | Python | false | false | 1,395 | py | test_telemetry.py | # Copyright (c) 2023 Intel Corporation
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writ... |
154c95e1e579b192d524451d0dba82e536fe14fe | f54290f045fd150f9be640bf8ab4a91f6b9ae3e3 | /evennia/contrib/grid/extended_room/__init__.py | 53a673c7932efd9701e9b4edd2bff887cfc06320 | [
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause"
] | permissive | evennia/evennia | 54d075093f0ff125be40e17a7bc4e1e0e22cf77b | b3ca58b5c1325a3bf57051dfe23560a08d2947b7 | refs/heads/main | 2023-09-02T05:29:35.678676 | 2023-09-01T19:06:05 | 2023-09-01T19:06:05 | 16,120,959 | 1,781 | 1,004 | BSD-3-Clause | 2023-09-12T18:37:23 | 2014-01-21T22:22:28 | Python | UTF-8 | Python | false | false | 454 | py | __init__.py | """
Extended Room - Griatch 2012, vincent-lg 2019, Griatch 2023
"""
from .extended_room import CmdExtendedRoomDesc # noqa
from .extended_room import CmdExtendedRoomDetail # noqa
from .extended_room import CmdExtendedRoomGameTime # noqa
from .extended_room import CmdExtendedRoomLook # noqa
from .extended_room impo... |
e59a4f1ac813bf736fc0d5b4d8d5a94518905464 | 14f40e51d1f2b0671650ee6c350756b42262c6f2 | /platformio/registry/mirror.py | 4b4508f6623dfce96c919f4ef82b4273ee7be86e | [
"Apache-2.0"
] | permissive | platformio/platformio-core | 7cfb8bb60661122f883ca175b6c48c9299fc3262 | 897844ebc172bd8a2e313bdb9011fc7d986863c2 | refs/heads/develop | 2023-08-22T01:48:10.215800 | 2023-08-18T11:39:03 | 2023-08-18T11:39:03 | 19,606,299 | 6,058 | 707 | Apache-2.0 | 2023-09-07T05:23:55 | 2014-05-09T09:38:42 | Python | UTF-8 | Python | false | false | 3,748 | py | mirror.py | # Copyright (c) 2014-present PlatformIO <contact@platformio.org>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... |
9f0cfcfd557cad81042f13b803aa195a6f0a27bf | 860c31e414c4c280b70ec0872042d715a2d56978 | /benchmarks/train_mtl_cinc2022/utils/springer_dwt.py | 06cf9cb904102db087af818f182c3249d9117028 | [
"MIT"
] | permissive | DeepPSP/torch_ecg | 255e49ff436e13044a1f049141f982680e56970e | a40c65f4fefa83ba7d3d184072a4c05627b7e226 | refs/heads/master | 2023-09-01T06:47:17.153216 | 2023-08-31T18:00:47 | 2023-08-31T18:00:47 | 298,482,237 | 111 | 16 | MIT | 2023-08-21T11:25:07 | 2020-09-25T06:03:17 | Python | UTF-8 | Python | false | false | 3,106 | py | springer_dwt.py | """
"""
from typing import Union, Optional
import pywt
import numpy as np
from easydict import EasyDict as ED
__all__ = [
"get_dwt_features",
"get_full_dwt_features",
]
def get_dwt_features(
signal: np.ndarray, fs: int, config: Optional[dict] = None
) -> np.ndarray:
"""
compute the discrete w... |
ebd10e5d5840d1aced0ff82dc9afa1bb848390e5 | 766ee8ce546cdc82b4da89f3a3422ba2c378b14a | /siim_acr/src/utils/common_util.py | 03e020d26a4e064b7a397948e022d9d47075b97d | [] | no_license | bestfitting/kaggle | 13c5c2fdc43709c6860ffaad88ee4424910c4294 | fd2ac94fba182182fd86b8e8d6afec9b4a0408e3 | refs/heads/master | 2023-07-23T11:14:32.988474 | 2021-12-31T13:56:36 | 2021-12-31T13:56:36 | 98,124,366 | 314 | 70 | null | 2023-07-06T21:26:56 | 2017-07-23T20:46:23 | Python | UTF-8 | Python | false | false | 134 | py | common_util.py | import os
osp = os.path
ope = os.path.exists
opj = os.path.join
from utils.mask_functions import run_length_encode, run_length_decode |
2fe9efc5a77ef4ae257c8c61e137a1fc7607cf3f | 61c456f574fbda51fed682b0727b54165f8aa92c | /library/digital_ocean_floating_ip.py | 963403ce73b67ed0e501989609c1278c1d13dfbd | [
"AGPL-3.0-only"
] | permissive | dan-v/algo | d31733bfcf126664bd9bf93b6e78eaf7daa31967 | 35d295701ab25d1013c63bc4243a33c20abb4522 | refs/heads/master | 2021-07-16T16:32:02.783491 | 2020-05-27T00:16:43 | 2020-05-27T00:16:43 | 164,184,734 | 132 | 13 | MIT | 2019-04-21T20:46:34 | 2019-01-05T05:23:37 | Python | UTF-8 | Python | false | false | 8,443 | py | digital_ocean_floating_ip.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# (c) 2015, Patrick F. Marques <patrickfmarques@gmail.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_versi... |
7ba86046ac3e9726f4e38ac2972816192f002a7e | a5a99f646e371b45974a6fb6ccc06b0a674818f2 | /HLTriggerOffline/Btag/test/compareDQM.py | f43c81a26e933282b61effc8284c10f82ee5421b | [
"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,464 | py | compareDQM.py | #!/usr/bin/env python
#
# Launch the script with the command: ./compareDQM.py
# Set below the two DQM input files (DQMfileOld,DQMfileNew)
#
# This script compares the plots cointained in two DQM files and save the superimposed plots
#
from __future__ import print_function
DQMfileOld="/afs/cern.ch/user/s/sdonato/AFSwo... |
0ab039175c863183ebf83412ca24c920d76e0587 | 985fa63e9c2751bb4fe531f60c33e4ff951ef0b9 | /xterm256lut_gen.py | 16d8f4b366b70d2b2e8aeefe12b63054589132c1 | [
"WTFPL"
] | permissive | jaseg/lolcat | f1c61e89a79c2a3d231755dd2c9a0c79fb59ffdb | dc3ddf395017bf903f5bfb8f0c5c6d08d84fcdc0 | refs/heads/main | 2023-03-20T02:30:47.266302 | 2023-02-26T17:54:34 | 2023-02-26T17:57:20 | 25,680,568 | 366 | 62 | NOASSERTION | 2022-11-19T12:01:36 | 2014-10-24T09:12:12 | C | UTF-8 | Python | false | false | 670 | py | xterm256lut_gen.py |
xterm_colors = []
# This is ripped out of pygments
# I leave out the 16 standard colors since people tend to re-define them to their liking.
# colors 16..232: the 6x6x6 color cube
_valuerange = (0x00, 0x5f, 0x87, 0xaf, 0xd7, 0xff)
for i in range(217):
r = _valuerange[(i // 36) % 6]
g = _valuerange[(i // 6) % 6]
b... |
64f6c1d46ea618340f780497ac81f050708d05c5 | 14a5208b7f301ac38b3ce8022ce3d0e3c0e6bc96 | /libfmp/c2/__init__.py | af8974c856fa77a1655989abb503a4ba49388dec | [
"MIT"
] | permissive | meinardmueller/libfmp | 99d78b3c761766d2c0e12919a869c0dfeb93ccc1 | 424127f2cd8317f796ab1591f7c0ec408208e782 | refs/heads/master | 2023-06-07T15:12:10.101521 | 2023-05-25T14:42:29 | 2023-05-25T14:42:29 | 320,262,227 | 133 | 18 | NOASSERTION | 2023-05-25T07:32:05 | 2020-12-10T12:13:47 | Python | UTF-8 | Python | false | false | 749 | py | __init__.py | from .c2_complex import generate_figure, \
plot_vector
from .c2_fourier import generate_matrix_dft, \
generate_matrix_dft_inv, \
dft, \
idft, \
fft, \
ifft_noscale, \
ifft, \
stft_basic, \
istft_basic, \
stft, istft, \
stft_convention_fmp
from .c2_interpolation import compu... |
6319d5758714c72085099e0604e909f93d8846a7 | 0d543b6f877114fc7ff7f5c2485230f606f6d98d | /2021/6.py | ef8531f43992c2519a849cde577cf8cd9e6b5695 | [] | 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 | 520 | py | 6.py | #!/usr/bin/python3
import sys
from collections import defaultdict, Counter
infile = sys.argv[1] if len(sys.argv)>1 else '6.in'
X = Counter([int(x) for x in open(infile).read().strip().split(',')])
def solve(S, n):
X = S
for day in range(n):
Y = defaultdict(int)
for x,cnt in X.items():
... |
22dd341133f90756b54c0eb8093b651e56f759c8 | 2ac03b8c24df220ea32ea525e1d65aeb294cd1a4 | /custom_components/waste_collection_schedule/waste_collection_schedule/wizard/offenbach_de.py | 98f614bceba8f2877c08f52a18c65c053cd8e7ab | [
"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,511 | py | offenbach_de.py | #!/usr/bin/env python3
import re
import site
import inquirer
import requests
import traceback
s = requests.Session()
def get_streets(answers):
url = "https://www.insert-it.de/BmsAbfallkalenderOffenbach/Main/GetStreets"
params = { "text": answers['street'],
"filter%5Bfilters%5D%5B0%5D%5Bvalue... |
aae58e6411440ca1c95553f917c05fb573db5e2d | 9882a8d98429fe0f227b062b0e89da9b881e902c | /model/blocks/resnet_blocks.py | 0b2f0ccd623cff8cf8345660b13099b6b4b91752 | [
"Apache-2.0"
] | permissive | grib0ed0v/face_recognition.pytorch | 87306a5b8c7ded2bf61ddaf2166bb868be8e72cc | 05cb9b30e8220445fcb27988926d88f330091c12 | refs/heads/develop | 2020-04-26T04:11:51.213924 | 2019-04-10T11:04:21 | 2019-04-10T11:04:21 | 173,293,569 | 170 | 23 | Apache-2.0 | 2019-04-10T11:04:22 | 2019-03-01T11:49:14 | Python | UTF-8 | Python | false | false | 2,829 | py | resnet_blocks.py | """
Copyright (c) 2018 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writin... |
50c22aa91c15ebd25f3475ba298f575b474f9644 | eb9f655206c43c12b497c667ba56a0d358b6bc3a | /python/testData/inspections/PyNumpyType/ArgSort.py | 59e682cb7a1da8f7b52061291916f9e7de5a8835 | [
"Apache-2.0"
] | permissive | JetBrains/intellij-community | 2ed226e200ecc17c037dcddd4a006de56cd43941 | 05dbd4575d01a213f3f4d69aa4968473f2536142 | refs/heads/master | 2023-09-03T17:06:37.560889 | 2023-09-03T11:51:00 | 2023-09-03T12:12:27 | 2,489,216 | 16,288 | 6,635 | Apache-2.0 | 2023-09-12T07:41:58 | 2011-09-30T13:33:05 | null | UTF-8 | Python | false | false | 2,403 | py | ArgSort.py |
def argsort(a, axis=-1, kind='quicksort', order=None):
"""
Returns the indices that would sort an array.
Perform an indirect sort along the given axis using the algorithm specified
by the `kind` keyword. It returns an array of indices of the same shape as
`a` that index data along the given axis ... |
21692fc23afc6ebda3b84cff0cd60f0ddcbe0131 | 21ec50d37212bae1714b28ede8cc9bf7b07e2122 | /src/mwparserfromhell/nodes/extras/attribute.py | fc3421a59557d6e09e7e7211a448de01c544dd3b | [
"MIT"
] | permissive | earwig/mwparserfromhell | c669936e6b3cbc2fa6c20d89461cb98d4cf2ef01 | 0f89f4426bdd9e184ae8c8223672a7a0bf36eb76 | refs/heads/main | 2023-08-05T10:31:15.885448 | 2023-04-06T03:39:51 | 2023-04-06T03:39:51 | 4,386,648 | 612 | 79 | MIT | 2023-09-05T04:44:13 | 2012-05-20T18:45:54 | Python | UTF-8 | Python | false | false | 5,294 | py | attribute.py | # Copyright (C) 2012-2020 Ben Kurtovic <ben.kurtovic@gmail.com>
#
# 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, ... |
d81b5d0e7f5a616ca7fa0dab716a92f8ccbe42c2 | a2b20597759990445081057d35d113434cfcf970 | /source/interprocedural_analyses/taint/test/integration/side_effects.py | a5c0623c329996fdf4a0b38d0a3fc4d2cc6f54a1 | [
"MIT"
] | 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,141 | py | side_effects.py | # 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 builtins import _test_sink, _test_source
def test_from_1_to_0():
x = 0
change_arg0(x, _test_source())
return x
def test... |
b0283d1be35a74ee8175310ea74a93b25eb2366a | 67ce6a1d1369463b15023cc5bd1be9e823bab398 | /lib/pymedphys/_utilities/compression.py | 7d512877a5f78c335ca0c166c69b7091cfcedf0d | [
"Apache-2.0"
] | permissive | pymedphys/pymedphys | 2487efe7259cc4e226e93d32fe86cef01673016e | f6acdf9bd2e8a32e372966879284fbd71c612358 | refs/heads/main | 2023-08-05T06:27:48.110296 | 2023-06-07T18:22:09 | 2023-06-07T18:22:09 | 168,238,552 | 288 | 79 | Apache-2.0 | 2023-05-30T03:23:50 | 2019-01-29T22:20:04 | Python | UTF-8 | Python | false | false | 1,113 | py | compression.py | # Copyright (C) 2018 Simon Biggs
# 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,... |
d60ce4975bac96f5d6296a29561b36380bb65afc | 6c3259af340d28cdfe7aad63cfb1fb6bc81fb3da | /pytest_django/fixtures.py | ffc9d4c96b63c6b7c5292ba0adf9a46dfa3fdccc | [
"BSD-3-Clause"
] | permissive | pytest-dev/pytest-django | df91bfb5536d6fb0a94cff647c4eb68c005c9e0d | 53373573f905ec5e0ec5786f49efdcdca5ae41fd | refs/heads/master | 2023-08-31T08:33:58.355321 | 2023-04-05T08:15:33 | 2023-04-05T08:15:33 | 2,484,397 | 1,169 | 344 | NOASSERTION | 2023-08-05T14:24:05 | 2011-09-29T19:35:55 | Python | UTF-8 | Python | false | false | 19,147 | py | fixtures.py | """All pytest-django fixtures"""
import os
from contextlib import contextmanager
from functools import partial
from typing import Any, Generator, Iterable, List, Optional, Tuple, Union
import pytest
from . import live_server_helper
from .django_compat import is_django_unittest
from .lazy_django import skip_if_no_djan... |
b3d1a03e2d6b95fa90e0e8f3272f8d0cde1cd104 | 2e038c642350e9a29bcd845b2f922f9c017fa7d8 | /src/westpa/cli/tools/plothist.py | 1a2416ff2e55525696e93c592c641d16e407981a | [
"MIT"
] | permissive | westpa/westpa | e8e0952bdbe9a95f06eca07762e1e9372156dd9a | 85ed1c54159d639d2fcb9e23c45f93743bfed2e0 | refs/heads/westpa2 | 2023-09-01T11:21:44.944424 | 2023-08-11T21:56:40 | 2023-08-11T21:56:40 | 24,576,160 | 181 | 66 | MIT | 2023-09-14T16:46:54 | 2014-09-29T02:04:49 | Python | UTF-8 | Python | false | false | 28,051 | py | plothist.py | import logging
import os
import re
import h5py
import numpy as np
import matplotlib
from matplotlib import pyplot
from matplotlib.image import NonUniformImage
from westpa.tools import WESTMasterCommand, WESTSubcommand
from westpa.core import h5io, textio
from westpa.fasthist import normhistnd
from westpa.core.extloa... |
78f9b886fcf294b16cb2e967b3d7ab182ee947b8 | f42cd8413ac5bec6526cc1013253d00fd9becc62 | /examples/test_examples.py | 4e29a5635dbd50a97153c83bdefea34914aff201 | [
"Apache-2.0"
] | permissive | planetlabs/planet-client-python | dda964d1d0a02e6413965fffa2f24f8a0b9d51f9 | 8b29a9300f8a144cc56a171f102b1a068fd6b692 | refs/heads/main | 2023-08-08T07:24:51.429307 | 2023-07-20T19:49:08 | 2023-07-20T19:49:08 | 37,222,273 | 269 | 89 | Apache-2.0 | 2023-08-01T00:52:42 | 2015-06-10T20:58:37 | Python | UTF-8 | Python | false | false | 1,980 | py | test_examples.py | # Copyright 2020 Planet Labs, Inc.
# Copyright 2022 Planet Labs PBC.
#
# 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 a... |
40a877126e5d3db3539c58e1ecf0c1a7324f4fab | a5a99f646e371b45974a6fb6ccc06b0a674818f2 | /RecoBTag/SecondaryVertex/python/pfInclusiveSecondaryVertexFinderNegativeTagInfos_cfi.py | e52505593f5951527436e9ed3f2195b1a5108d86 | [
"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 | 515 | py | pfInclusiveSecondaryVertexFinderNegativeTagInfos_cfi.py | import FWCore.ParameterSet.Config as cms
from RecoBTag.SecondaryVertex.pfInclusiveSecondaryVertexFinderTagInfos_cfi import *
pfInclusiveSecondaryVertexFinderNegativeTagInfos = pfInclusiveSecondaryVertexFinderTagInfos.clone(
extSVDeltaRToJet = -0.3,
extSVCollection = 'inclusiveCandidateNegativeSecondaryVertic... |
b4100eb7549ae12f0e3ee621699f4a29afa2a893 | 9b66a01edfddf1b48d0fe99645658f2632444546 | /models/pytorch/pna/scalers.py | 8053b719697935db38f59595a917bc5f4278514f | [
"MIT"
] | permissive | lukecavabarrett/pna | b1893f08153246c6f644677458992087794ac15b | 0c630c2e2d88bb1ef784c850dd8f3a069fcd9489 | refs/heads/master | 2022-08-19T18:14:32.116725 | 2022-08-07T11:30:17 | 2022-08-07T11:30:17 | 252,297,818 | 321 | 52 | MIT | 2022-07-25T22:29:20 | 2020-04-01T22:11:12 | Python | UTF-8 | Python | false | false | 1,443 | py | scalers.py | import torch
# each scaler is a function that takes as input X (B x N x Din), adj (B x N x N) and
# avg_d (dictionary containing averages over training set) and returns X_scaled (B x N x Din) as output
def scale_identity(X, adj, avg_d=None):
return X
def scale_amplification(X, adj, avg_d=None):
# log(D + 1... |
1aa9aea1cf01c44f6b6ab8375aa73fd08291c3ea | c67f2d0677f8870bc1d970891bbe31345ea55ce2 | /zippy/benchmarks/src/micro/object-layout-change.py | 9c5bc206498a2ddb7ce4276a993b81cf908e3902 | [
"BSD-3-Clause"
] | permissive | securesystemslab/zippy | a5a1ecf5c688504d8d16128ce901406ffd6f32c2 | ff0e84ac99442c2c55fe1d285332cfd4e185e089 | refs/heads/master | 2022-07-05T23:45:36.330407 | 2018-07-10T22:17:32 | 2018-07-10T22:17:32 | 67,824,983 | 324 | 27 | null | null | null | null | UTF-8 | Python | false | false | 525 | py | object-layout-change.py | # zwei 05/02/2015
# object layout change
import time
class Foo:
def __init__(self, a):
self.a = a
def mod(self, b):
self.b = b % 5
def dochange(n):
res = 0
for i in range(n):
f = Foo(i)
f.mod(res)
res += f.a + f.b
return res
def main(n):
for i in range(n):
res = dochange(100)
def measure(n):
p... |
0fc47b95948645c5cf05db7f96fe78455754bf73 | 150a7b11cb531f8bc2a045aefcf2ebe1d151efa3 | /ocs_ci/ocs/clients.py | a2d88dbbb3558c4c83d3f35ef725595a0521c4c9 | [
"MIT"
] | permissive | red-hat-storage/ocs-ci | c7ac414e1b86552da0439223dfa9bca39977f31a | 5e9e504957403148e413326f65c3769bf9d8eb39 | refs/heads/master | 2023-08-17T16:19:51.154403 | 2023-08-17T13:27:12 | 2023-08-17T13:27:12 | 179,558,938 | 146 | 210 | MIT | 2023-09-14T16:38:44 | 2019-04-04T19:00:02 | Python | UTF-8 | Python | false | false | 3,913 | py | clients.py | import logging
import paramiko
import string
from time import sleep
from ocs_ci.ocs.exceptions import CommandFailed, TimeoutException
log = logging
class WinNode(object):
def __init__(self, **kw):
self.login = "Administrator"
self.password = "CephUser123"
self.ip_address = kw["ip_address... |
8f607ead3e3ed7a87915ae539db37c2729533c31 | 8caa926fa767898a0a8fba1d5b3bef73d96be410 | /sagemaker-pyspark-sdk/tests/algorithms/linear_learner_multi_class_classifier_test.py | ad455eb812c1cd3595cac620559091e0af0b7847 | [
"Apache-2.0"
] | permissive | aws/sagemaker-spark | 72122fd3675487050965c9d35f3b26295c9f174b | e27ccff05cd4f062b67712411b3c9ac95308502c | refs/heads/master | 2023-05-11T12:38:13.951884 | 2022-08-26T16:19:57 | 2022-08-26T16:19:57 | 111,010,291 | 297 | 141 | Apache-2.0 | 2023-05-10T02:39:27 | 2017-11-16T18:58:56 | Scala | UTF-8 | Python | false | false | 22,477 | py | linear_learner_multi_class_classifier_test.py | import os
import pytest
from pyspark import SparkConf, SparkContext
from sagemaker_pyspark import (S3DataPath, EndpointCreationPolicy, RandomNamePolicyFactory,
SageMakerClients, IAMRole, classpath_jars)
from sagemaker_pyspark.algorithms import LinearLearnerMultiClassClassifier
from sag... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.