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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2532106e13739cc47d2b1f558f5d81b88e58769e | 09a6d8dbad5b92f93791948b5bf9b75f5cb2e5ce | /tests/transforms/test_hamiltonian_expand.py | b6d4581e157db6c5f240a2cd363965a713780af8 | [
"Apache-2.0"
] | permissive | PennyLaneAI/pennylane | 458efd5d9457e90ada31ca2ef0fb6bb96a24e9a7 | 0843183ff15a013c2622af5e61fea431d18076d3 | refs/heads/master | 2023-09-03T17:00:43.105784 | 2023-09-01T16:15:07 | 2023-09-01T16:15:07 | 129,936,360 | 1,431 | 410 | Apache-2.0 | 2023-09-14T21:30:56 | 2018-04-17T16:45:42 | Python | UTF-8 | Python | false | false | 20,552 | py | test_hamiltonian_expand.py | # Copyright 2018-2020 Xanadu Quantum Technologies 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... |
0e562b78ae1578dc4f6ea5d3ca8791d858e7e6d9 | 5ea4a3a0e50d2cee386f497c8449d13cd80450f9 | /xsdata/utils/text.py | 5f9ac680ebce72afd525f426e3def91a11d73bfb | [
"MIT"
] | permissive | tefra/xsdata | 8df028ff79cd04b29ecf24401810562b8917b7be | 31f672af84fd040a97996871916a41b1046fe46b | refs/heads/main | 2023-08-17T03:20:06.912750 | 2023-08-12T15:24:40 | 2023-08-12T15:24:40 | 217,130,848 | 243 | 49 | MIT | 2023-08-30T15:25:31 | 2019-10-23T18:51:12 | Python | UTF-8 | Python | false | false | 4,961 | py | text.py | import re
import string
from typing import Any
from typing import List
from typing import Match
from typing import Tuple
stop_words = {
"",
"Any",
"Decimal",
"Dict",
"Enum",
"False",
"List",
"Meta",
"None",
"Optional",
"QName",
"True",
"Type",
"Tuple",
"Union... |
3acf7a6415478c3ee9d33ade1024ff1a653df1c1 | 444a9480bce2035565332d4d4654244c0b5cd47b | /research/cv/nnUNet/src/nnunet/preprocessing/cropping.py | 1c675a488a0c92df1aa2b79767a62f10a2f81f87 | [
"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 | 8,710 | py | cropping.py | # Copyright 2022 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... |
6a13db60ad9cf8ea2294d7e2a87ec008de68daf3 | a825b6f0d5aced82d5c2a0ec8ba4ff14e1631456 | /pysyncobj/tcp_connection.py | 6260b601be5e6ed4ddeb59dff6dddafc10586feb | [
"MIT"
] | permissive | bakwc/PySyncObj | 76cc6457d6b15c876b931372fdc64220378ab441 | 3ae622afbc92f506820a835a64595db51ba3de1e | refs/heads/master | 2023-08-20T00:50:31.259996 | 2023-07-27T09:15:06 | 2023-07-27T09:15:06 | 50,359,688 | 690 | 118 | MIT | 2023-07-27T09:15:08 | 2016-01-25T15:26:03 | Python | UTF-8 | Python | false | false | 10,895 | py | tcp_connection.py | import time
import socket
from sys import platform
import zlib
import struct
import pysyncobj.pickle as pickle
import pysyncobj.win_inet_pton
from .poller import POLL_EVENT_TYPE
from .monotonic import monotonic as monotonicTime
class CONNECTION_STATE:
DISCONNECTED = 0
CONNECTING = 1
CONNECTED = 2
def _... |
cfe8803fb0d0878cc21ec74d87d8fab115e7ecf7 | 2a1b8a671aceda6bc446f8ce26400aa84fa444a6 | /Packs/CommonScripts/Scripts/ResolveShortenedURL/ResolveShortenedURL_test.py | c14f318a5947b270fd0cdc8cdf1b96699c44d216 | [
"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 | 12,600 | py | ResolveShortenedURL_test.py | from pathlib import Path
import pytest
from requests import Response
from ResolveShortenedURL import *
def load_test_data(folder: str, file_name: str) -> dict:
"""
A function for loading and returning data from json files within the "test_data" folder.
Args:
folder (str): Name of the parent fol... |
d46d6ef597f294daecce0c622e864bf21e0cb8c3 | edc1134436a79ca883a0d25f3c8dfffc4235c514 | /tests/contrib/tracking/test_measurements.py | f946311906478c7e818281dfe04b999287753718 | [
"Apache-2.0"
] | permissive | pyro-ppl/pyro | 2283d8ca528fc090c724a3a6e0f344e505ebbf77 | 0e82cad30f75b892a07e6c9a5f9e24f2cb5d0d81 | refs/heads/dev | 2023-08-18T00:35:28.014919 | 2023-08-06T21:01:36 | 2023-08-06T21:01:36 | 94,506,832 | 3,647 | 606 | Apache-2.0 | 2023-09-14T13:52:14 | 2017-06-16T05:03:47 | Python | UTF-8 | Python | false | false | 934 | py | test_measurements.py | # Copyright (c) 2017-2019 Uber Technologies, Inc.
# SPDX-License-Identifier: Apache-2.0
import torch
from pyro.contrib.tracking.measurements import PositionMeasurement
def test_PositionMeasurement():
dimension = 3
time = 0.232
frame_num = 5
measurement = PositionMeasurement(
mean=torch.rand(... |
d34369185b7df8dbfc667583fe3a7694be35ec96 | d110546d747d7e3865ce5742d5fca09f404623c0 | /tests/pytests/functional/states/file/test_pruned.py | 80d4f94b6c2ba9bec902e766705fa009aa12655e | [
"Apache-2.0",
"MIT",
"BSD-2-Clause"
] | permissive | saltstack/salt | 354fc86a7be1f69514b3dd3b2edb9e6f66844c1d | 1ef90cbdc7203f97775edb7666db86a41eb9fc15 | refs/heads/master | 2023-07-19T20:56:20.210556 | 2023-06-29T23:12:28 | 2023-07-19T11:47:47 | 1,390,248 | 11,026 | 6,296 | Apache-2.0 | 2023-09-14T20:45:37 | 2011-02-20T20:16:56 | Python | UTF-8 | Python | false | false | 2,502 | py | test_pruned.py | import pytest
pytestmark = [
pytest.mark.windows_whitelisted,
pytest.mark.slow_test,
]
@pytest.fixture(scope="module")
def file(states):
return states.file
@pytest.fixture(scope="function")
def single_dir_with_file(tmp_path):
file = tmp_path / "stuff.txt"
file.write_text("things")
yield str... |
eaab593330465305c05934a2de2bfb1ef5152829 | a2e87d991a31e103b6142c9cc71aeef7158e196d | /src/etc/server.py | f6cc4d62b0be4caa1542c33321b185c12b59eec5 | [] | no_license | ytanaka-/menthas | 3b5ca7c486856a929d67703209ce73d99bee5667 | db07569241f5995f0582766ff118e5d2b4c2dde2 | refs/heads/master | 2023-02-01T16:43:30.330526 | 2023-01-23T20:21:54 | 2023-01-23T20:21:54 | 35,497,180 | 164 | 21 | null | 2023-09-11T17:52:55 | 2015-05-12T15:42:13 | JavaScript | UTF-8 | Python | false | false | 1,807 | py | server.py | from sklearn.metrics.pairwise import cosine_similarity
from bottle import route, request, abort, run
from gensim.models import Word2Vec as word2vec
import os
import json
import numpy as np
import pymongo
MONGO_URL = os.getenv("MONGO_URL", "mongodb://localhost:27017/")
client = pymongo.MongoClient(MONGO_URL)
MONGO_DB_NA... |
7486b98dd31e79c3197cdbde96406a8f05aa42f2 | a5622dafafd782af153be2bc0bd19cb086fd07b2 | /rest-service/manager_rest/test/endpoints/test_filters.py | 5cb80e5517d6e483b2cee1a39d0573050941ec41 | [
"Apache-2.0"
] | permissive | cloudify-cosmo/cloudify-manager | 8b2d226ad5a9dd8103d7690b2f8081bef24078e1 | c0de6442e1d7653fad824d75e571802a74eee605 | refs/heads/master | 2023-09-06T09:11:51.753912 | 2023-09-04T08:01:58 | 2023-09-04T08:01:58 | 18,326,574 | 146 | 84 | Apache-2.0 | 2023-09-04T08:02:00 | 2014-04-01T11:06:47 | Python | UTF-8 | Python | false | false | 23,983 | py | test_filters.py | from cloudify.models_states import VisibilityState
from cloudify_rest_client.exceptions import CloudifyClientError
from manager_rest.test import base_test
from manager_rest.utils import get_formatted_timestamp
from manager_rest.manager_exceptions import BadFilterRule
from manager_rest.storage import models
from manage... |
e55b54ac0746dac749ac627bd1d8782dfed40a34 | 7c593f4cc70ee56106cc9cce105e6b9e7839431e | /objax/optimizer/adam.py | 9e091b8b06747ac644343d387402e6a8570713d9 | [
"Apache-2.0"
] | permissive | google/objax | 84e397cafb70813a1e89467f745facf828ed24b8 | a2d025d9e1da8660a1883404207c41d4327d8c48 | refs/heads/master | 2023-09-02T07:04:26.801269 | 2023-06-12T22:12:53 | 2023-06-12T22:12:53 | 288,923,752 | 801 | 80 | Apache-2.0 | 2023-06-12T22:12:54 | 2020-08-20T06:20:40 | Python | UTF-8 | Python | false | false | 2,898 | py | adam.py | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... |
877d95c9b31ff6b73350a64956adf781aaccb23f | f07e66293cc41a9fe71fc44f765b432fd7a0997c | /selfdrive/controls/plannerd.py | f592c213c5acb18cc47fb3b99ec8f7b7e5f833ba | [
"MIT",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | kegman/openpilot | c9ba96a72d905956f02c684e065091e023942883 | b35291c91783657a5fc83abfff012d3bb49dd89f | refs/heads/kegman-ultimate | 2022-05-22T17:07:16.656336 | 2021-10-25T13:35:28 | 2021-10-25T13:35:28 | 229,979,925 | 105 | 212 | MIT | 2022-03-13T05:47:51 | 2019-12-24T17:27:11 | C | UTF-8 | Python | false | false | 1,540 | py | plannerd.py | #!/usr/bin/env python3
from cereal import car
from common.params import Params
from common.realtime import Priority, config_realtime_process
from selfdrive.swaglog import cloudlog
from selfdrive.controls.lib.longitudinal_planner import Planner
from selfdrive.controls.lib.vehicle_model import VehicleModel
from selfdrive... |
6834203db3fae6ca572fc8737e77b6e08d22a039 | 3526b979d4860971f517edc12e307d714f48c354 | /razorpay/resources/__init__.py | 68917d25d2a08b8a20013718fb62203d1ce61a35 | [
"MIT"
] | permissive | razorpay/razorpay-python | 9adda56cc9dd25b6ff5f7f1a5879844f35666811 | c07bf8baf100541786998b87ada035eaec308aaf | refs/heads/master | 2023-08-17T10:15:11.744848 | 2023-08-16T08:21:45 | 2023-08-16T08:21:45 | 46,411,248 | 153 | 93 | MIT | 2023-08-16T08:21:47 | 2015-11-18T10:20:33 | Python | UTF-8 | Python | false | false | 1,081 | py | __init__.py | from .payment import Payment
from .refund import Refund
from .order import Order
from .invoice import Invoice
from .payment_link import PaymentLink
from .customer import Customer
from .card import Card
from .token import Token
from .transfer import Transfer
from .virtual_account import VirtualAccount
from .addon import... |
82969ba06b4992e40ebd73af8730df7dc2676c8a | 470f8a4fe5f7d38b9ed482d2c5260dbfd5d448a3 | /app-tasks/rf/src/rf/models/scene.py | 62a251d89ccca1b5634dc356d70c7cec7010dbc0 | [
"Apache-2.0"
] | permissive | raster-foundry/raster-foundry | 4f817a5cbfaa8b0561ea119ac25dadfa96f3dce5 | eee86bf45b9ebabbbee7bb36a73dd60bd8a807bf | refs/heads/develop | 2022-11-21T13:24:28.723720 | 2022-11-07T16:36:37 | 2022-11-07T16:36:37 | 36,464,140 | 117 | 35 | Apache-2.0 | 2022-11-04T21:58:44 | 2015-05-28T20:25:45 | Scala | UTF-8 | Python | false | false | 7,727 | py | scene.py | """Python class representation of a Raster Foundry Scene"""
import uuid
from requests.exceptions import HTTPError
import logging
from rf.models.base import BaseModel
from rf.models.thumbnail import Thumbnail
from rf.models.image import Image
from rf.models.footprint import Footprint
logger = logging.getLogger(__name... |
07da3363afd16827136a7d4dd5e98f169690272c | 479a9c76b19b84d6cde69305828031cd2531aa56 | /testing/MLDB-2100_fetcher_timeout_test.py | d10d429e5430b4f385ed7a1136b7933b68972a44 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | mldbai/mldb | d36801bd99dd3f82d7557cd0f438b0121f63f22c | 19bc4bc92a41ee8ad4eab0979dffd9c985d95758 | refs/heads/master | 2023-09-03T22:59:11.621839 | 2022-12-30T18:42:24 | 2022-12-30T18:42:24 | 47,634,692 | 701 | 107 | Apache-2.0 | 2023-02-10T23:08:05 | 2015-12-08T16:34:16 | C++ | UTF-8 | Python | false | false | 1,628 | py | MLDB-2100_fetcher_timeout_test.py | #
# MLDB-2100_fetcher_timeout_test.py
# Francois-Michel L'Heureux, 2016-11-20
# This file is part of MLDB. Copyright 2016 mldb.ai inc. All rights reserved.
#
import socket
import threading
import time
class MyThread(threading.Thread):
def run(self):
try:
threading.Thread.run(self)
excep... |
25ebab0a1895598ba7622713acc69b811d1858a9 | 082cb56436631f16585dc6c667a8b384cee3335f | /script/talk/source/t400262.py | a905952b7a98280675d557169a98cc455d0b8028 | [] | no_license | vawser/Cinders-DS3 | abf2c5e1c163f2e556a0d89e437eead3ddd6992c | d086ebce45b27806f757e04778dad1615e405dab | refs/heads/master | 2023-09-01T00:48:00.500866 | 2023-08-07T12:25:24 | 2023-08-07T12:25:24 | 230,333,994 | 192 | 203 | null | 2022-02-13T21:09:26 | 2019-12-26T22:08:06 | Python | UTF-8 | Python | false | false | 10,847 | py | t400262.py | #-------------------------------------------
#-- Irina of Carim
#-------------------------------------------
# -*- coding: utf-8 -*-
def t400262_1():
""" State 0,1 """
assert GetCurrentStateElapsedTime() > 1
""" State 2 """
while True:
call = t400262_x12()
assert IsClientPlayer() == 1
... |
6b10764b851f6799e85e5e15a5f61236a74a078e | 61b95ee2aefbcfbd6c4abf9511d976d0b9d0e100 | /faker/providers/automotive/es_CO/__init__.py | 27ee8f825f7dcb42186069562dba1efcf2521b8d | [
"MIT"
] | permissive | joke2k/faker | fed7472580ced2bce326fe4ea0c3d1c810853d5e | 33e36b1b6cc9c6f039fe387988853771bab60624 | refs/heads/master | 2023-09-04T00:43:33.599705 | 2023-08-31T16:15:04 | 2023-08-31T16:15:04 | 6,662,075 | 14,544 | 2,215 | MIT | 2023-09-11T16:06:14 | 2012-11-12T23:00:09 | Python | UTF-8 | Python | false | false | 359 | py | __init__.py | from collections import OrderedDict
from .. import Provider as AutomotiveProvider
class Provider(AutomotiveProvider):
license_formats = OrderedDict(
[
("???###", 0.6),
("???##?", 0.3),
("T####", 0.03),
("??####", 0.01),
("R#####", 0.03),
... |
7e4b64cdd22d529e477d6aac70047a877543d3c7 | 8d44e796eaf0c8e11bbc2a27ef093e97a25b6f4a | /haystack/nodes/file_converter/csv.py | ac69203f2aa4d1e22e6178ac79cc34bd3d1199cb | [
"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 | 2,978 | py | csv.py | from typing import Union, List, Optional, Any, Dict
import logging
from pathlib import Path
import pandas as pd
from haystack import Document
from haystack.nodes.file_converter import BaseConverter
logger = logging.getLogger(__name__)
class CsvTextConverter(BaseConverter):
"""
Converts a CSV file contain... |
9eb33ece9833448becca0710af3dcd8473a7744c | 3eb78230ac1700a95c0d4fcad3653251088a2b57 | /unfurl/lib/blackboxprotobuf/lib/types/varint.py | 45eaafbd8175fcf3c5f8e0e04ffe94696b52945b | [
"Apache-2.0",
"MIT"
] | permissive | obsidianforensics/unfurl | 61d9f90eab0996af34b4617ae1d473449b5da28f | 3363420baf689a665715cd748c4f5b9880822a04 | refs/heads/main | 2023-09-01T15:06:12.996876 | 2023-03-04T03:30:49 | 2023-03-04T03:30:49 | 219,613,650 | 532 | 67 | Apache-2.0 | 2023-09-13T17:23:38 | 2019-11-04T23:06:57 | Python | UTF-8 | Python | false | false | 2,893 | py | varint.py | """Classes for encoding and decoding varint types"""
import binascii
import struct
from google.protobuf.internal import wire_format, encoder, decoder
import six
from unfurl.lib.blackboxprotobuf.lib.exceptions import EncoderException, DecoderException
def _gen_append_bytearray(arr):
def _append_bytearray(x):
... |
8cee960656e4a3cabce628766d2c1295549ef533 | 50203b4a349dcb2ed1e72c9f5463d84db8a6e983 | /skyline/mirage/mirage_labelled_metrics.py | fa60661baa71c496e5cf9ef7f6ad5177d2dfc8ae | [
"MIT"
] | permissive | earthgecko/skyline | 97e43df824d7c92d68086f529f0f3d051a7debb0 | c2edc451e63d5eb57117ddcfbc6e79100e706460 | refs/heads/master | 2023-08-30T08:36:50.740285 | 2023-06-28T15:33:47 | 2023-06-28T15:33:47 | 20,475,900 | 482 | 74 | NOASSERTION | 2023-06-28T15:33:49 | 2014-06-04T08:33:15 | Python | UTF-8 | Python | false | false | 161,139 | py | mirage_labelled_metrics.py | """
mirage_labelled_metrics.py
"""
import logging
try:
from Queue import Empty
except:
from queue import Empty
# from redis import StrictRedis
from time import time, sleep, strftime, gmtime
from threading import Thread
from collections import defaultdict
# @modified 20190522 - Task #3034: Reduce multiprocessing... |
90da589bc817513933373384b0fd4e89fc044ef3 | c3542b98289c1ba85f62d08b5edbe1a3c18f3c80 | /dec_to_hex.py | adce0ab816ebc16874e2b176026f3540e41589c0 | [
"LicenseRef-scancode-unknown",
"GPL-1.0-or-later",
"MIT"
] | permissive | geekcomputers/Python | 16674289843f89f6cc287097f033b928f4181d84 | bc55e2a2c5a98f4c7597e901a04457dfb9d5df0c | refs/heads/master | 2023-08-18T21:04:18.163283 | 2023-08-17T17:38:16 | 2023-08-17T17:38:16 | 2,881,789 | 32,418 | 15,024 | MIT | 2023-09-02T18:40:33 | 2011-11-30T09:04:08 | Python | UTF-8 | Python | false | false | 71 | py | dec_to_hex.py | dec_num = input("Enter the decimal number\n")
print(hex(int(dec_num)))
|
92d9aca807a44ee804d882504c4712dd1dc4ff14 | 927a94b9fd97a12c74302adc994d6b0bf3f4e27a | /codalab/apps/web/tests/test_competition_download_csv.py | f790cabe7f80ba48950ed35eeeabf91ff0c26743 | [
"Apache-2.0"
] | permissive | codalab/codalab-competitions | 0a7f77c690ad6bca3769a272d423d958917b8256 | a3e12648ea80e23f21938103d41d70eb0917d833 | refs/heads/develop | 2023-08-30T21:39:02.989301 | 2023-08-21T16:15:34 | 2023-08-21T16:15:34 | 10,556,194 | 425 | 116 | NOASSERTION | 2023-08-26T15:23:30 | 2013-06-07T18:23:37 | Python | UTF-8 | Python | false | false | 4,260 | py | test_competition_download_csv.py | import mock
import datetime
from django.conf import settings
from django.core.urlresolvers import reverse
from django.test import TestCase
from django.core.files.uploadedfile import SimpleUploadedFile
from django.contrib.auth import get_user_model
from apps.customizer.models import Configuration
from apps.web.models ... |
c0c42532253ba4257ca35c37fd508287c9fcd21c | ec85250addb7357dfe7bb3e0680d53fc7b0fd8fb | /examples/with_pyspark_emr/with_pyspark_emr/definitions.py | 4e81f44566b80ddb243b8c9539e2a51aae25d46c | [
"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 | 2,115 | py | definitions.py | from pathlib import Path
from typing import Any
from dagster import ConfigurableIOManager, Definitions, ResourceParam, asset
from dagster_aws.emr import emr_pyspark_step_launcher
from dagster_aws.s3 import S3Resource
from dagster_pyspark import PySparkResource
from pyspark.sql import DataFrame, Row
from pyspark.sql.ty... |
5437dfc0fb1155468319907d0c365747c69cd987 | d2a4cf4e6fff810e94c85c1c94ebef6638469ff4 | /Sorting Algorithm/Counting Sort/Python/counting_sort.py | 3d5b5e8e523f80492d211e179048448de1276b3a | [
"MIT"
] | permissive | iam-abbas/cs-algorithms | 8be8dd665cb3abd5fce2b9de09519d0597e59e45 | d04aa8fd9a1fa290266dde96afe9b90ee23c5a92 | refs/heads/master | 2021-10-07T09:57:04.943048 | 2021-10-01T18:24:24 | 2021-10-01T18:24:24 | 213,309,115 | 255 | 443 | MIT | 2021-10-01T18:23:12 | 2019-10-07T06:18:54 | C++ | UTF-8 | Python | false | false | 1,673 | py | counting_sort.py | def counting_sort(array: list) -> list:
"""
Implementation of the linear O(n) Counting Sort algorithm
Arguments:
array - array of integers to be sorted
Returns:
Contents of array argument
"""
# Number of items to be sorted
n: int = len(array)
# Get maximum value in arr... |
d2a38fd2d4344cf944f06de96b7469aee779f94c | 37a420e606a51195b9d82d4dd8682b6010523fee | /keras_unet_collection/_model_unet_3plus_2d.py | c52a5c21c1a66d32412b147d604928446d7528cd | [
"MIT"
] | permissive | yingkaisha/keras-unet-collection | cee50c21dae011c5312f87b589e6058ddb4def50 | d30f14a259656d2f26ea11ed978255d6a7d0ce37 | refs/heads/main | 2023-04-18T15:55:13.460006 | 2022-07-05T21:43:04 | 2022-07-05T21:43:04 | 323,426,984 | 548 | 161 | MIT | 2023-02-22T08:58:53 | 2020-12-21T19:16:34 | Python | UTF-8 | Python | false | false | 18,136 | py | _model_unet_3plus_2d.py |
from __future__ import absolute_import
from keras_unet_collection.layer_utils import *
from keras_unet_collection.activations import GELU, Snake
from keras_unet_collection._backbone_zoo import backbone_zoo, bach_norm_checker
from keras_unet_collection._model_unet_2d import UNET_left, UNET_right
from tensorflow.keras... |
dd82ab59c11873ecb7386b56eddca0feadb0b43e | a40ad075eeadf753167a7e9be2bb41253bb443e9 | /lit_nlp/components/minimal_targeted_counterfactuals_test.py | 4cba2f6800ce2bea741bc6060f25486aec9fb7c8 | [
"Apache-2.0"
] | permissive | PAIR-code/lit | 1cd55c5471bd24a8205174d3a40a2ec91ea56d27 | a41130960d6ccb92acf6ffc603377eaecce8a62b | refs/heads/main | 2023-09-05T15:35:22.731062 | 2022-12-02T19:48:37 | 2022-12-02T19:48:37 | 283,215,238 | 3,201 | 351 | Apache-2.0 | 2023-09-14T06:08:56 | 2020-07-28T13:07:26 | TypeScript | UTF-8 | Python | false | false | 16,111 | py | minimal_targeted_counterfactuals_test.py | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... |
cb80d453551b673af8391dddd3d8c9b47b71eca6 | fa0bd730981a4a7333e7858c03e2a16c75e9cf5c | /Chapter 2/batch_datasets.py | 2c118a9a35ca9710d8fbd92a11b1ba4484141bf4 | [
"MIT"
] | permissive | PacktPublishing/Deep-Learning-with-TensorFlow-2-and-Keras | 4cb5f7249dcd1efe6ea5a5263fb862240ce303bb | e23d2b4a4292386b70977473805acb2f93ef16ca | refs/heads/master | 2023-02-13T04:04:57.531730 | 2023-02-07T19:23:47 | 2023-02-07T19:23:47 | 228,759,428 | 311 | 214 | MIT | 2021-06-01T14:06:06 | 2019-12-18T04:42:07 | Jupyter Notebook | UTF-8 | Python | false | false | 368 | py | batch_datasets.py | import tensorflow as tf
import tensorflow_datasets as tfds
import numpy as np
builder = tfds.builder('imdb_reviews')
builder.download_and_prepare()
datasets, info = tfds.load('imdb_reviews', with_info=True, as_supervised=True)
train_dataset = datasets['train']
train_dataset = train_dataset.batch(5).shuffle(50).take... |
35d89b29dfc334409599b486bd28314a59f61d7c | 59bb398c5f23770e4725f35f932f3a5fd013efae | /jwst/ami/tests/test_ami_analyze.py | 8fb464b44ec9b377852ef5c76524df59b311939a | [
"BSD-2-Clause"
] | permissive | spacetelescope/jwst | 9826d86781c6e01aced951882471f8b967fa1f6e | a4a0e8ad2b88249f01445ee1dcf175229c51033f | refs/heads/master | 2023-09-04T09:54:04.504036 | 2023-08-31T20:19:27 | 2023-08-31T20:19:27 | 60,551,519 | 449 | 106 | NOASSERTION | 2023-09-14T21:21:33 | 2016-06-06T18:34:23 | Jupyter Notebook | UTF-8 | Python | false | false | 33,018 | py | test_ami_analyze.py | """
Unit tests for ami_analyze
"""
import numpy as np
import math
import pytest
from stdatamodels.jwst import datamodels
from jwst.ami import utils, leastsqnrm, hexee, webb_psf
from jwst.ami.leastsqnrm import hexpb, ffc, ffs, closure_amplitudes
from jwst.ami.leastsqnrm import closurephase, redundant_cps
from jwst.... |
abb423112311980c9078ce8f2c0c75880f3686d9 | cad91ae76d2746a6c28ddda0f33a58f9d461378f | /TensorFlow2/Segmentation/MaskRCNN/mrcnn_tf2/object_detection/balanced_positive_negative_sampler.py | f0b734f967ea9c7fe7f642caa9f338084ba4c8e4 | [
"Apache-2.0"
] | permissive | NVIDIA/DeepLearningExamples | fe677521e7e2a16e3cb0b77e358f9aab72f8c11a | a5388a45f71a949639b35cc5b990bd130d2d8164 | refs/heads/master | 2023-08-31T20:57:08.798455 | 2023-08-23T10:09:12 | 2023-08-23T10:09:12 | 131,881,622 | 11,838 | 3,124 | null | 2023-08-28T16:57:33 | 2018-05-02T17:04:05 | Jupyter Notebook | UTF-8 | Python | false | false | 12,648 | py | balanced_positive_negative_sampler.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... |
4ac268113dcf1741242576dc23e7ef42c6c2437b | 52b49f3c5d0b17f81790e2d7ee37045694aa6bca | /grammarinator/runtime/dispatching_listener.py | 704d00b31bf276323fae5a85c356fc81c934a673 | [
"BSD-3-Clause"
] | permissive | renatahodovan/grammarinator | 7cd436639ae68665641560d11477011a31aa6eb5 | da9ef71b31665e6e5f7ce799ccd0e983fe69bf14 | refs/heads/master | 2023-07-23T22:08:14.173371 | 2023-05-13T20:50:54 | 2023-07-15T22:38:15 | 91,344,700 | 311 | 65 | NOASSERTION | 2023-07-15T21:55:53 | 2017-05-15T14:02:45 | Python | UTF-8 | Python | false | false | 1,104 | py | dispatching_listener.py | # Copyright (c) 2020-2023 Renata Hodovan, Akos Kiss.
#
# Licensed under the BSD 3-Clause License
# <LICENSE.rst or https://opensource.org/licenses/BSD-3-Clause>.
# This file may not be copied, modified, or distributed except
# according to those terms.
from .listener import Listener
class DispatchingListener(Listene... |
49a26c4556b1eab041f143b139155e5191572f4d | bbfc9f05efefe29b6ce9832bb3506efb900c1c93 | /tencentcloud/dlc/v20210125/models.py | 80341184ac02c11fb491f1673607b39a1b0890c8 | [
"Apache-2.0"
] | permissive | TencentCloud/tencentcloud-sdk-python | a2fab235926b0a27e9cfdf55e085a8bb15b3f506 | 6baf00a5a56ba58b6a1123423e0a1422d17a0201 | refs/heads/master | 2023-09-04T10:52:28.060438 | 2023-09-01T03:09:16 | 2023-09-01T03:09:16 | 130,147,399 | 594 | 300 | Apache-2.0 | 2023-09-06T07:03:24 | 2018-04-19T02:23:12 | Python | UTF-8 | Python | false | false | 572,416 | py | models.py | # -*- coding: utf8 -*-
# Copyright (c) 2017-2021 THL A29 Limited, a Tencent company. 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... |
283345ee21e4e92f068247b6cf9e909fa5053b21 | e65a4dbfbfb0e54e59787ba7741efee12f7687f3 | /devel/plasma/files/patch-setup.py | 0c59c85a3327c7fbd9bad30622e9a6cc0d4bc3ce | [
"BSD-2-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 | 1,518 | py | patch-setup.py | --- setup.py.orig 2018-04-15 11:48:52 UTC
+++ setup.py
@@ -6,30 +6,33 @@ except ImportError:
from distutils.core import setup
-from pip.req import parse_requirements
+#from pip.req import parse_requirements
from distutils.core import Extension
import plasma
-requirements = parse_requirements('requirements.... |
277d9b643ff68933de579e9e57fd31fd0539709a | 48fe63dd60fb7641ee86c0a5c4a60df6ae7a577b | /scripts/map_datasets.py | f4ebccdd62deceb91f8c4ac1495f3de29e53d584 | [
"MIT"
] | permissive | facebookresearch/KILT | 5a587a11b28845586cb334281b91c2e8ee91dd88 | 2664322b9a994be686e4c3a9e8f75a0b70927f22 | refs/heads/main | 2023-08-21T13:04:02.003196 | 2022-03-31T11:01:39 | 2022-03-31T11:01:39 | 271,075,510 | 851 | 90 | MIT | 2022-03-31T11:01:40 | 2020-06-09T18:07:11 | Python | UTF-8 | Python | false | false | 726 | py | map_datasets.py | # Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
from kilt import dataset_mapper
from kilt.datasets import (
base_dataset,
entity_linking,
fact_verification,
... |
39e363f31de203d05263e7421bc0410a4e713225 | b3950a2a6912c9b494d22b9353322c3357df0110 | /tock/api/tests.py | 4b4209d4e13d1f9b4e40b4aeeefc3351d7ea15c6 | [
"CC0-1.0",
"LicenseRef-scancode-public-domain",
"MIT"
] | permissive | 18F/tock | df1fa5e817e690ce0bff315a15799e2f78915882 | 99005d8f6c4605a69fbb620c41f38447ecbee459 | refs/heads/main | 2023-08-31T01:34:55.299577 | 2023-08-23T18:49:10 | 2023-08-23T18:49:10 | 30,162,008 | 135 | 50 | NOASSERTION | 2023-09-07T18:40:30 | 2015-02-01T22:19:32 | Python | UTF-8 | Python | false | false | 19,946 | py | tests.py | # -*- coding: utf-8 -*-
import datetime
from django.contrib.auth import get_user_model
from django.test import TestCase
from django.urls import reverse
from django_webtest import WebTest
from api.views import get_timecardobjects, get_user_timecard_count, TimecardList
from employees.models import EmployeeGrade, User... |
d63aa7028cf67e591d84314d592697984fecfce9 | cbc4eec2c39bc954d05d28be812592a205106b8b | /python/app/svmsvc.py | 27ed08323c9e1f71abfcd2077567a97165b7bfd3 | [] | no_license | pranab/avenir | 756abaf6dc1d11bdafb61a5df77b0ed3ce56008c | 4381166d61f7bc6088be34e6b35927a37ef6ba98 | refs/heads/master | 2022-10-07T20:58:12.992960 | 2022-09-06T04:28:47 | 2022-09-06T04:28:47 | 4,390,566 | 171 | 84 | null | null | null | null | UTF-8 | Python | false | false | 2,012 | py | svmsvc.py | #!/Users/pranab/Tools/anaconda/bin/python
# avenir-python: Machine Learning
# Author: Pranab Ghosh
#
# 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... |
5f901a2dcaa0e77cf38c0a16ac38a2cc2079bc93 | 6436d1e6c23f9f43a8025889dc4414a3ad66acf2 | /Assets/Python/Victory/GoalHandlers.py | 384ec98c9f58999460795965064b4b1140352123 | [
"MIT"
] | permissive | dguenms/Dawn-of-Civilization | b710195c4f46fe11d9229182c3b1e07b77f42637 | a305e7846d085d6edf1e9c472e8dfceee1c07dd4 | refs/heads/develop | 2023-09-04T04:57:00.086384 | 2023-09-01T15:24:28 | 2023-09-01T15:24:28 | 45,362,597 | 116 | 121 | MIT | 2023-02-08T00:18:53 | 2015-11-01T23:52:28 | C++ | UTF-8 | Python | false | false | 6,845 | py | GoalHandlers.py | from Core import *
from inspect import ismethod
from Events import events
class Handlers(object):
def __init__(self):
self.handlers = []
self.other_handlers = []
self.any_handlers = []
def __len__(self):
return len(self.handlers) + len(self.other_handlers) + len(self.any_handlers)
def add(self, eve... |
328dc55ce71f5481745078b03aa63b7bc51a8beb | 0d48af5cb8012a79b3327a1d3e7ff0e65af54ea8 | /hadoop-ozone/fault-injection-test/network-tests/src/test/blockade/test_blockade_datanode_isolation.py | 7f1d34efdeeba1b1a07a197e483d9e9868ebdbc0 | [
"Apache-2.0",
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference",
"MIT",
"LicenseRef-scancode-unknown"
] | permissive | apache/ozone | 4426dd1ae18716d0585f1e846f7881970e3c4279 | a3b89e73185894f905b4ad96cd6d78429497d0c9 | refs/heads/master | 2023-09-04T05:26:08.656890 | 2023-09-02T15:16:12 | 2023-09-02T15:16:12 | 212,382,406 | 509 | 386 | Apache-2.0 | 2023-09-14T19:54:21 | 2019-10-02T15:56:19 | Java | UTF-8 | Python | false | false | 5,458 | py | test_blockade_datanode_isolation.py | #!/usr/bin/python
# 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"... |
d0dabc1b18fec846e0ed93e12c384f2e507c2507 | 3a16a7311f2df0a7ac4e1bb5f2fcea1c18facaf1 | /setup.py | 1f85bcc05969d4f11dd99248f3ac1cbf429f3466 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | SAP/python-pyodata | 5eb220e0aacebb8f9b240f05d9f7b75083112151 | 35f30025ad39a2b49d5f08d4d4f7ad98e8ea38b9 | refs/heads/master | 2023-09-01T12:08:11.429932 | 2023-08-02T09:41:47 | 2023-08-02T09:41:47 | 158,290,900 | 187 | 110 | Apache-2.0 | 2023-08-15T16:36:04 | 2018-11-19T21:13:30 | Python | UTF-8 | Python | false | false | 2,504 | py | setup.py | # Copyright 2018 SAP SE.
#
# 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,
# softw... |
3fd86a98538cec42dff6abd6d22e5321b65f5852 | 5a52ccea88f90dd4f1acc2819997fce0dd5ffb7d | /alipay/aop/api/domain/ContributeDetailInfo.py | 03f82556c04a8230081649638557b5e1c7ec2804 | [
"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 | 1,576 | py | ContributeDetailInfo.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class ContributeDetailInfo(object):
def __init__(self):
self._contribute_amount = None
self._contribute_type = None
@property
def contribute_amount(self):
return self._... |
69ccdc6e99390fbb2a0a6a2745c735f6533b7597 | f509ab9825c542e09b0c6591d86ef1f9feb540a6 | /pkgs/sdk-pkg/src/genie/libs/sdk/apis/nxos/n3k/platform/execute.py | 18ef8dd09dc15920a6d7ae715a4a1f49df251c68 | [
"Apache-2.0"
] | permissive | CiscoTestAutomation/genielibs | 97f597117193aaa18028defeb69078ebb241173a | e42e51475cddcb10f5c7814d0fe892ac865742ba | refs/heads/master | 2023-08-11T16:39:41.959947 | 2023-07-27T17:58:42 | 2023-07-27T17:58:42 | 130,717,047 | 109 | 60 | Apache-2.0 | 2023-08-29T22:32:08 | 2018-04-23T15:21:56 | Python | UTF-8 | Python | false | false | 722 | py | execute.py | '''NXOS n3k execute functions for platform'''
# Python
import logging
from unicon.core.errors import SubCommandFailure
# Logger
log = logging.getLogger(__name__)
def execute_delete_boot_variable(device, timeout=300):
''' Delete the boot variables
Args:
device ('obj'): Device object
... |
a6528c42b7ac62bc8958867ac24df89fa7e1559f | 578db86c51d44ebddd0dc7b1738985b3dc69eb74 | /corehq/apps/hqwebapp/doc_info.py | 06ca2fe0aa0adef6e15bb3cb65f68c286995d067 | [
"BSD-3-Clause"
] | permissive | dimagi/commcare-hq | a43c7dd32b5f89c89fd5aa1b1359ab7301f4ff6b | e7391ddae1af1dbf118211ecb52c83fc508aa656 | refs/heads/master | 2023-08-16T22:38:27.853437 | 2023-08-16T19:07:19 | 2023-08-16T19:07:19 | 247,278 | 499 | 203 | BSD-3-Clause | 2023-09-14T19:03:24 | 2009-07-09T17:00:07 | Python | UTF-8 | Python | false | false | 9,421 | py | doc_info.py | from django.urls import reverse
from django.utils.translation import gettext as _
from corehq.apps.hqwebapp.doc_lookup import lookup_doc_id
from corehq.apps.locations.permissions import can_edit_form_location, user_can_access_case
from corehq.apps.users.models import HqPermissions
from corehq.apps.users.util import ra... |
9da27c7d2264fc057e64c0a234e37adb065b8ed3 | ca93302d06425c04492e92b801277496ecde68d3 | /redis/commands/search/indexDefinition.py | a668e85b42c99ce5f8e6bdbaa29bdd7ddfaec871 | [
"MIT"
] | permissive | redis/redis-py | 2c34d4511e31033ed85b70437454ff5c0c2c67d1 | e3de026a90ef2cc35a5b68934029a0ef2a5b2f53 | refs/heads/master | 2023-09-04T09:53:01.713856 | 2023-08-31T09:26:48 | 2023-08-31T09:26:48 | 363,150 | 2,213 | 513 | MIT | 2023-09-14T14:05:30 | 2009-11-06T10:22:26 | Python | UTF-8 | Python | false | false | 2,489 | py | indexDefinition.py | from enum import Enum
class IndexType(Enum):
"""Enum of the currently supported index types."""
HASH = 1
JSON = 2
class IndexDefinition:
"""IndexDefinition is used to define a index definition for automatic
indexing on Hash or Json update."""
def __init__(
self,
prefix=[],
... |
eab8b3d7e3218028679c4e44ebdca1ac7ef1d4f7 | 8f267fe1157904023004aa1fcee8cdcaf1d69f74 | /tempest/api/volume/test_volumes_backup.py | 89ff4977619855d65af0b83dccb3d2de7c0c3a18 | [
"Apache-2.0"
] | permissive | openstack/tempest | a65737f3e62d4ebeb7e387feac7bcc636d3f5fe0 | 3932a799e620a20d7abf7b89e21b520683a1809b | refs/heads/master | 2023-08-28T15:04:21.241805 | 2023-08-28T10:16:57 | 2023-08-28T10:16:57 | 2,356,406 | 270 | 407 | Apache-2.0 | 2022-06-29T15:52:45 | 2011-09-09T15:56:02 | Python | UTF-8 | Python | false | false | 8,789 | py | test_volumes_backup.py | # Copyright 2016 Red Hat, 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... |
ba68ab5865c4ede7e4688a543905485933916f91 | 6c066611b11a8de5e2c22c30cfcc578a4c49edce | /Color/lp_Tweaky/lp_Tweaky.py | abeeb20285bec98dc4270fd1870f25dc33ab5d72 | [] | no_license | NatronGitHub/natron-plugins | ad2d9227637b4b86b45f92856fa54d327872a0a6 | b0c499fb6391024f54be9f26ed41b5cf7475d574 | refs/heads/master | 2022-12-12T10:02:20.252222 | 2022-11-30T02:29:04 | 2022-11-30T02:29:04 | 130,576,224 | 332 | 67 | null | 2022-11-30T02:29:05 | 2018-04-22T14:39:29 | Python | UTF-8 | Python | false | false | 37,811 | py | lp_Tweaky.py | # -*- coding: utf-8 -*-
# DO NOT EDIT THIS FILE
# This file was automatically generated by Natron PyPlug exporter version 10.
# Hand-written code should be added in a separate file named lp_TweakyExt.py
# See http://natron.readthedocs.org/en/master/devel/groups.html#adding-hand-written-code-callbacks-etc
# Note that V... |
3e5e439fe90312f277c0c2b5e742c2ee37add0c1 | b049a961f100444dde14599bab06a0a4224d869b | /sdk/python/pulumi_azure_native/synapse/v20210601preview/get_sql_pool_vulnerability_assessment_rule_baseline.py | 6e33e815ff3a67046ae43820bd9ccbe426c77051 | [
"BSD-3-Clause",
"Apache-2.0"
] | permissive | pulumi/pulumi-azure-native | b390c88beef8381f9a71ab2bed5571e0dd848e65 | 4c499abe17ec6696ce28477dde1157372896364e | refs/heads/master | 2023-08-30T08:19:41.564780 | 2023-08-28T19:29:04 | 2023-08-28T19:29:04 | 172,386,632 | 107 | 29 | Apache-2.0 | 2023-09-14T13:17:00 | 2019-02-24T20:30:21 | Python | UTF-8 | Python | false | false | 6,731 | py | get_sql_pool_vulnerability_assessment_rule_baseline.py | # coding=utf-8
# *** WARNING: this file was generated by pulumi. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
from . im... |
04f64a2a18a2e6b52cc191f3380ed3243d90f15a | 35b6013c1943f37d1428afd2663c8aba0a02628d | /securitycenter/snippets/snippets_security_marks_test.py | 10405b7a74378710043004cb92eff09b58b7ec68 | [
"Apache-2.0"
] | permissive | GoogleCloudPlatform/python-docs-samples | d2a251805fbeab15d76ed995cf200727f63f887d | 44e819e713c3885e38c99c16dc73b7d7478acfe8 | refs/heads/main | 2023-08-28T12:52:01.712293 | 2023-08-28T11:18:28 | 2023-08-28T11:18:28 | 35,065,876 | 7,035 | 7,593 | Apache-2.0 | 2023-09-14T20:20:56 | 2015-05-04T23:26:13 | Jupyter Notebook | UTF-8 | Python | false | false | 4,667 | py | snippets_security_marks_test.py | #!/usr/bin/env python
#
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... |
03b7f8b8ffc3f3ca734167af1637dacb7a26ccb8 | b8d80a23cb27af08a1c4d34b478c76228ae5fbb4 | /insights/client/subp.py | da2e3e5424e6c3694800736be1fc93c2d1825cf8 | [
"Apache-2.0"
] | permissive | RedHatInsights/insights-core | bb243e2bf8a52446fefb95ebe05478d6e35efe2e | b0ea07fc3f4dd8801b505fe70e9b36e628152c4a | refs/heads/master | 2023-09-04T21:15:40.456257 | 2023-09-04T10:46:56 | 2023-09-04T10:46:56 | 92,518,221 | 144 | 290 | Apache-2.0 | 2023-09-14T02:40:13 | 2017-05-26T14:23:11 | Python | UTF-8 | Python | false | false | 521 | py | subp.py | #!/usr/bin/python
import subprocess
import collections
ReturnTuple = collections.namedtuple('ReturnTuple',
['return_code', 'stdout', 'stderr'])
def subp(cmd):
"""
Run a command as a subprocess.
Return a triple of return code, standard out, standard err.
"""
pr... |
f7c1022ae84128bcc790ff8afd8c054e913d7013 | a9ef46a7e991e062779f7e2ae09569138c1bb86c | /scripts/timeline_coverage.py | bf947b3890f9a489d9b7575596af0edd1ae5292e | [
"MIT"
] | permissive | ForAllSecure/bncov | 5adcb8dee1825a7c1e1db9a6e6b38cf488dac6cd | 0a3cebcf888659aefeee37eb3225b6174be9de0d | refs/heads/master | 2023-02-20T17:11:12.066890 | 2023-02-15T18:46:44 | 2023-02-15T18:46:44 | 184,456,686 | 119 | 18 | MIT | 2023-02-15T18:46:46 | 2019-05-01T17:47:24 | Python | UTF-8 | Python | false | false | 3,373 | py | timeline_coverage.py | #!/usr/bin/env python
import sys
import os
import time
from binaryninja import *
# this line allows these scripts to be run portably on python2/3
sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))))
import bncov
USAGE = "USAGE: %s <target_file> <seed_directory> <coverage_dire... |
5d65395f78654d42c816c67414cd97e5b83afa44 | 2d5f297ec3274ce93f1f5592d5b80c2605f8edc5 | /apps/single_curve_tf.py | cbd7634b91b74b633e2f8e907fc7e51fb36fadb4 | [
"Apache-2.0"
] | permissive | BachiLi/diffvg | 9ec3e3e7b3674c82ca42b18fe49c69991c076370 | 6f60468bfdef5b9fec8cc3fa47b441dc2720eefc | refs/heads/master | 2023-06-21T18:49:09.604301 | 2023-06-13T17:16:46 | 2023-06-13T17:16:46 | 292,727,955 | 747 | 134 | Apache-2.0 | 2023-06-13T17:16:47 | 2020-09-04T02:23:40 | Python | UTF-8 | Python | false | false | 4,518 | py | single_curve_tf.py | import pydiffvg_tensorflow as pydiffvg
import tensorflow as tf
import skimage
import numpy as np
canvas_width, canvas_height = 256, 256
num_control_points = tf.constant([2, 2, 2])
points = tf.constant([[120.0, 30.0], # base
[150.0, 60.0], # control point
[ 90.0, 198.0],... |
9dc639ee1e56f34333dbd2150776ef70286e03c2 | 344456e94b06352452aed3166eb834739faaf480 | /src/entities/background.py | 6e1226ed8455355f7a42aef3a5e19c3d6a4f3c48 | [
"MIT"
] | permissive | sourabhv/FlapPyBird | ebf33fd367c44345235717e51eb9648bf1525bc5 | 95af73307f7c05f2ba8f208e911097cbb56b689a | refs/heads/master | 2023-06-26T08:55:29.705222 | 2023-06-18T23:13:42 | 2023-06-18T23:13:42 | 18,402,682 | 1,086 | 889 | MIT | 2023-06-16T14:43:35 | 2014-04-03T12:46:02 | Python | UTF-8 | Python | false | false | 329 | py | background.py | from ..utils import GameConfig
from .entity import Entity
class Background(Entity):
def __init__(self, config: GameConfig) -> None:
super().__init__(
config,
config.images.background,
0,
0,
config.window.width,
config.window.height,
... |
c009ee790734193dc29d20ba6e35af27f065c57f | 5dc77586e3e0f9de1f032fd2ca68494d8e58928f | /contrib/experimental/great_expectations_experimental/expectations/expect_column_values_to_be_hexadecimal.py | 57d61622e360f607e32ee80e3bdf72829b2ca052 | [
"Apache-2.0"
] | permissive | great-expectations/great_expectations | dd7c22e6277d6b08bee3ff38a015e6e8cd434df6 | b0290e2fd2aa05aec6d7d8871b91cb4478e9501d | refs/heads/develop | 2023-09-04T09:30:26.395518 | 2023-09-02T00:00:13 | 2023-09-02T00:00:13 | 103,071,520 | 8,931 | 1,535 | Apache-2.0 | 2023-09-14T19:57:16 | 2017-09-11T00:18:46 | Python | UTF-8 | Python | false | false | 4,878 | py | expect_column_values_to_be_hexadecimal.py | from typing import Optional
from great_expectations.core import ExpectationConfiguration
from great_expectations.expectations.regex_based_column_map_expectation import (
RegexBasedColumnMapExpectation,
)
class ExpectColumnValuesToBeHexadecimal(RegexBasedColumnMapExpectation):
"""Expect column values to be va... |
ab4bca087f2b0af22471871e59f916c4621c1908 | 54b31b705d88e21bc0b23aabe1df15ca13a07de2 | /bayespy/inference/vmp/nodes/deterministic.py | 76509512421adbff80d502681ced33fab63c1bcd | [
"MIT",
"LicenseRef-scancode-proprietary-license",
"LicenseRef-scancode-unknown-license-reference",
"AFL-3.0",
"GPL-1.0-or-later",
"BSD-3-Clause",
"Apache-2.0"
] | permissive | bayespy/bayespy | 307ef4c51d511e14d4693cce9929dda37124d11d | 5fe58f7160ebc3a9df7f9e96e50d2bd47837794a | refs/heads/develop | 2023-08-18T21:35:27.744022 | 2023-05-25T08:16:36 | 2023-05-25T08:16:36 | 5,568,322 | 655 | 164 | MIT | 2023-08-15T09:31:55 | 2012-08-27T08:10:20 | Python | UTF-8 | Python | false | false | 11,968 | py | deterministic.py | ################################################################################
# Copyright (C) 2013-2014 Jaakko Luttinen
#
# This file is licensed under the MIT License.
################################################################################
import functools
import numpy as np
from bayespy.utils import m... |
ea23907eb44f0102cc14d86364a5014efde519fe | 6868ac40614689637c7626b192ecb7cf815a6320 | /src/exceptionite/blocks/PackagesUpdates.py | 0d2fa9482e601756b03263f33cd7b30770f787cc | [
"MIT"
] | permissive | MasoniteFramework/exceptionite | e89af07eb0862c2e19a7e0faf422711979e8a7d6 | f9ecc09522e59740038acbbe94e5c2a3509d610c | refs/heads/master | 2023-04-13T17:43:24.393105 | 2023-04-02T16:29:28 | 2023-04-02T16:29:28 | 227,259,824 | 114 | 5 | MIT | 2023-09-11T05:02:24 | 2019-12-11T02:34:55 | Python | UTF-8 | Python | false | false | 1,442 | py | PackagesUpdates.py | import pkg_resources
import requests
from ..Block import Block
def get_latest_version(name):
r = requests.get(f"https://pypi.org/pypi/{name}/json")
if r.status_code == 200:
version = r.json()["info"]["version"]
return version
return None
class PackagesUpdates(Block):
id = "packages_... |
890339b4aa4e04bfaa4cfac83cfbf0a5e0aaa0df | a64eeba4575eee849b459dab9c7000350ee636f1 | /mediapipe/model_maker/python/text/text_classifier/dataset_test.py | 2fa90b860e1a0bda73a76bb99e82c863a7fd161d | [
"Apache-2.0",
"dtoa"
] | permissive | google/mediapipe | 0b6b56aff8bacc7b680c205f0788f1b49dd33f5e | 007824594bf1d07c7c1467df03a43886f8a4b3ad | refs/heads/master | 2023-09-01T16:11:21.218234 | 2023-09-01T11:55:21 | 2023-09-01T11:57:34 | 191,820,100 | 23,940 | 5,164 | Apache-2.0 | 2023-09-14T09:01:36 | 2019-06-13T19:16:41 | C++ | UTF-8 | Python | false | false | 2,985 | py | dataset_test.py | # Copyright 2022 The MediaPipe 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 i... |
329305dc20015c77b77a73a0e14aa99c40f350fc | 374b3f27fe3cf032e88eccac5992c83eba0ad1b2 | /tutorials/W3D4_ReinforcementLearning/solutions/W3D4_Tutorial1_Solution_6e708fa1.py | e4cbd92e102051e198623c8e7ef7cc8fcc6428b9 | [
"CC-BY-4.0",
"BSD-3-Clause"
] | permissive | NeuromatchAcademy/course-content | e2fdca96bcbdc78afaa209e4e77438f44a56c82d | 3d638d00f02d9fd269fa2aff7d062558afdcb126 | refs/heads/main | 2023-08-16T16:09:09.314153 | 2023-08-02T06:21:49 | 2023-08-02T06:21:49 | 262,856,980 | 2,678 | 1,079 | CC-BY-4.0 | 2023-08-17T00:32:24 | 2020-05-10T19:09:05 | Jupyter Notebook | UTF-8 | Python | false | false | 634 | py | W3D4_Tutorial1_Solution_6e708fa1.py |
"""
The multi-reward and probabilistic reward environments are the same. You
could simulate a probabilistic reward of 10 units, delivered 50% of the time,
by having a mixture of 10 and 0 unit rewards, or vice versa. The take home message
from these last three exercises is that the *average* or expected reward is
what ... |
aa18bb9377b43c09ad18ee34ef0bf67094b2e656 | e9f8704efe416f28dfd868f8a3c4ecf876809af7 | /tests/filtering/test_harmonize_undefined_inchikey.py | b0a2523656966bb4c866f460369efa5585cb95b3 | [
"Apache-2.0"
] | permissive | matchms/matchms | 8ee1285f19bb0bbd340562cc7d702803972eba5c | a161325b2edfa35e2a6f3fb2de30e1de171ba676 | refs/heads/master | 2023-09-01T20:08:05.453420 | 2023-09-01T11:30:07 | 2023-09-01T11:30:07 | 265,598,917 | 140 | 55 | Apache-2.0 | 2023-09-12T08:48:10 | 2020-05-20T14:55:48 | Python | UTF-8 | Python | false | false | 1,173 | py | test_harmonize_undefined_inchikey.py | import pytest
from matchms.filtering import harmonize_undefined_inchikey
from ..builder_Spectrum import SpectrumBuilder
@pytest.mark.parametrize("metadata, aliases, undefined, expected", [
[{"inchikey": ""}, ["", "N/A", "NA", "n/a", "no data"], "", ""],
[{"inchikey": "n/a"}, ["", "N/A", "NA", "n/a", "no data"... |
f6d33c165555a21b301d95c76b83e5b9e1d74678 | bc8509d57a162fb685da06a98c67dc8130d96316 | /src/nninst/backend/tensorflow/model/__init__.py | 5c7acb4f256144d89a7a9a7b9457dfd876726d77 | [
"Apache-2.0"
] | permissive | Ptolemy-DL/Ptolemy | 2065e2d157d641010567062410bee4608691d059 | f72a531286d17c69e0e2e84d0ad8a5b0587e2e08 | refs/heads/master | 2023-05-29T08:58:18.328258 | 2021-06-15T09:28:16 | 2021-06-15T09:28:16 | 284,590,756 | 115 | 5 | NOASSERTION | 2020-10-24T04:18:51 | 2020-08-03T03:06:35 | Python | UTF-8 | Python | false | false | 150 | py | __init__.py | from .alexnet import AlexNet
from .inception_v4 import InceptionV4
from .lenet import LeNet
from .resnet_50 import ResNet50
from .vgg_16 import VGG16
|
2ce82eb3983944c43f40a2c5cf24dfd2b13e58ac | fc160694094b89ab09e5c9a0f03db80437eabc93 | /java-errorreporting/owlbot.py | ac63d8a3a16b83e42a4e3d1c197bb8edd82dc0de | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | googleapis/google-cloud-java | 4f4d97a145e0310db142ecbc3340ce3a2a444e5e | 6e23c3a406e19af410a1a1dd0d0487329875040e | refs/heads/main | 2023-09-04T09:09:02.481897 | 2023-08-31T20:45:11 | 2023-08-31T20:45:11 | 26,181,278 | 1,122 | 685 | Apache-2.0 | 2023-09-13T21:21:23 | 2014-11-04T17:57:16 | Java | UTF-8 | Python | false | false | 3,494 | py | owlbot.py | # Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... |
36cd9c4c469b25304fb641c6034d3b5d1c0e8df0 | 620323fc090cebaf7aca456ff3f7fbbe1e210394 | /search_for_similar_images__perceptual_hash__phash/ui/FieldsProgressDialog.py | 3c1a6e0dad2cd1cb31ae14b0fe63af6164f6f84f | [
"CC-BY-4.0"
] | permissive | gil9red/SimplePyScripts | bd2733372728bf9b9f00570e90316fa12116516b | 773c2c9724edd8827a1dbd91694d780e03fcb05a | refs/heads/master | 2023-08-31T04:26:09.120173 | 2023-08-30T17:22:59 | 2023-08-30T17:22:59 | 22,650,442 | 157 | 46 | null | 2023-09-08T17:51:33 | 2014-08-05T16:19:52 | Python | UTF-8 | Python | false | false | 1,077 | py | FieldsProgressDialog.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = "ipetrash"
from PyQt5.QtWidgets import QProgressDialog
from PyQt5.QtCore import Qt
from .KeyValueLabel import KeyValueLabel
class FieldsProgressDialog(QProgressDialog):
def __init__(
self,
minimum,
maximum,
window_titl... |
04369402caa7a11e864c120de65973a113a393be | 07b4bfb23ab70df70c1657f075e33af5d6005f41 | /instant/tests/test_conf.py | 05a70e4d1178e5673011a0ed8aa450883b586b1e | [
"MIT"
] | permissive | synw/django-instant | 132bcabc29cdab958076635165d6a0d6b5b464fb | edd6b0164385d282aaa5805d5322fc59a3c556e8 | refs/heads/master | 2022-12-23T12:49:10.385945 | 2022-12-19T11:02:16 | 2022-12-19T11:02:16 | 64,665,381 | 128 | 15 | MIT | 2022-12-19T10:52:51 | 2016-08-01T12:35:34 | Python | UTF-8 | Python | false | false | 1,503 | py | test_conf.py | from typing import Any, Dict
from .base import InstantBaseTest
from instant.init import generate_settings_from_conf
from instant.conf import (
CENTRIFUGO_API_KEY,
CENTRIFUGO_HMAC_KEY,
CENTRIFUGO_HOST,
CENTRIFUGO_PORT,
SITE_SLUG,
SITE_NAME,
)
class InstantTestConf(InstantBaseTest):
def tes... |
cc116ddf74eab9aba75e93cc8b206de31b74a4b4 | f2e3a255615a6360fc3bb9e285a2a8ab752e8b29 | /benchmarks/django/simple/test_f.py | 4ddf8f3d6a4eb3d0a009453e63a79d86c2031b7d | [] | no_license | tortoise/orm-benchmarks | cc32e3658b6e714c9d57e41c7123ccdeca7205c0 | ff2a5875f802ac0c6ea1bee57eb87efcc5b052cb | refs/heads/master | 2023-03-04T10:37:04.550558 | 2022-03-21T11:05:52 | 2022-03-21T11:05:52 | 148,795,219 | 148 | 21 | null | 2023-02-15T18:25:35 | 2018-09-14T13:50:21 | Python | UTF-8 | Python | false | false | 417 | py | test_f.py | try:
import django # noqa
django.setup() # noqa
finally:
pass
import os
import time
from random import randint
from simple.models import Journal
count = int(os.environ.get("ITERATIONS", "1000"))
maxval = count - 1
count *= 2
start = time.time()
for _ in range(count):
Journal.objects.get(id=randi... |
3aaf7448c2eaa24f19dd573beb4f6098f495b967 | 2a1b8a671aceda6bc446f8ce26400aa84fa444a6 | /Packs/ApiModules/Scripts/HTTPFeedApiModule/HTTPFeedApiModule.py | 2913b959587af74fd414d1e8c4d82f35592811d2 | [
"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 | 25,662 | py | HTTPFeedApiModule.py | import demistomock as demisto
from CommonServerPython import *
from CommonServerUserPython import *
''' IMPORTS '''
import urllib3
import requests
from typing import Optional, Pattern, List
# disable insecure warnings
urllib3.disable_warnings()
''' GLOBALS '''
TAGS = 'tags'
TLP_COLOR = 'trafficlightprotocol'
DATE_FO... |
923d6a7715e6e97fb131b92a52eb5794d81fa877 | 72eda38ed90de892c13473963b8fe6a768862693 | /tests/test_transforms.py | 68dcce3f5b9c6c09c3ffd08a70e9d3768818d6f3 | [
"MIT"
] | permissive | wolny/pytorch-3dunet | 22af692a79d38fe10b2d9ad841b54d797ea96cc4 | 5137f914f8c0f2af30123aacfc3091bc6de1e062 | refs/heads/master | 2023-09-05T17:02:08.668258 | 2023-07-31T11:03:34 | 2023-07-31T11:03:34 | 149,826,542 | 1,754 | 503 | MIT | 2023-08-28T09:30:44 | 2018-09-21T22:53:31 | Jupyter Notebook | UTF-8 | Python | false | false | 9,040 | py | test_transforms.py | import numpy as np
from pytorch3dunet.augment.transforms import RandomLabelToAffinities, LabelToAffinities, Transformer, Relabel, \
CropToFixed
class TestTransforms:
config = {'dtype': 'long'}
def test_random_label_to_boundary(self):
size = 20
label = _diagonal_label_volume(size)
... |
1d096062db4e045a9b60bd48369f6f02700e4d44 | e8201f803bb23a1b9a3eab9fc0fc9b1709e65d2e | /manim_ml/neural_network/layers/convolutional_2d.py | 48849d89b71a4332919b767ea1fa49a46380dab2 | [
"MIT"
] | permissive | helblazer811/ManimML | 20bc3548ceab75745a8d8088929fec51057e130f | 5df233ea90aba16611d29c6a4b7717eb08ae7e09 | refs/heads/main | 2023-08-09T07:50:38.605540 | 2023-07-22T02:43:52 | 2023-07-22T02:43:52 | 454,906,591 | 1,339 | 73 | MIT | 2023-04-11T02:22:49 | 2022-02-02T19:26:55 | Python | UTF-8 | Python | false | false | 10,815 | py | convolutional_2d.py | from typing import Union
from manim_ml.neural_network.activation_functions import get_activation_function_by_name
from manim_ml.neural_network.activation_functions.activation_function import (
ActivationFunction,
)
import numpy as np
from manim import *
import manim_ml
from manim_ml.neural_network.layers.parent_la... |
f95c573b950795f59ec602ce43bd9848317d979e | c13063d05915b91650f08ef209fc89bd2ed617d6 | /uer/trainer.py | 34a345f875af77dc616fd650d939d550b50764d9 | [
"MIT"
] | permissive | autoliuweijie/K-BERT | aad3fadb382e51cf8df1ed58cd8c9c26fb35f3e9 | da9358edb3b3f59e3ad6b5aab6af6df624b881ab | refs/heads/master | 2023-02-07T15:40:46.979324 | 2022-08-15T06:45:47 | 2022-08-15T06:45:47 | 208,968,100 | 940 | 225 | null | 2023-01-27T09:41:49 | 2019-09-17T05:40:54 | Python | UTF-8 | Python | false | false | 20,038 | py | trainer.py | # -*- encoding:utf-8 -*-
import os
import sys
import time
import math
import torch
import torch.nn as nn
import torch.distributed as dist
import torch.multiprocessing as mp
from torch.nn.parallel import DistributedDataParallel
from uer.model_saver import save_model
from uer.model_builder import build_model
from uer.u... |
1d3106b98beb1a341ce13d5cb52585914b45b6c8 | 80f94bea418d7956df1ba19d4d6a1d7715a94ade | /lib/galaxy/webapps/galaxy/services/quotas.py | ca6ef0545924b12dc3ae586ee0c48f52dd5a0f6f | [
"CC-BY-2.5",
"MIT",
"CC-BY-3.0",
"AFL-3.0"
] | permissive | galaxyproject/galaxy | 5748409eb6693b1611f289d164f85e20c3237495 | b9ae7a16ba0465995e880ae9701b7e87226b9bab | refs/heads/dev | 2023-08-28T22:35:51.248138 | 2023-08-26T08:02:33 | 2023-08-26T08:02:33 | 31,211,061 | 1,277 | 1,137 | NOASSERTION | 2023-09-14T19:39:01 | 2015-02-23T14:18:06 | Python | UTF-8 | Python | false | false | 6,143 | py | quotas.py | import logging
from typing import Optional
from sqlalchemy import (
false,
true,
)
from galaxy import (
model,
util,
)
from galaxy.managers.context import ProvidesUserContext
from galaxy.managers.quotas import QuotaManager
from galaxy.quota._schema import (
CreateQuotaParams,
CreateQuotaResult... |
7935e7e73e2f3e9ea639823afd139f2cf40f2af8 | 93b858db8d5fd4990c36a6c9eed3b75047152863 | /magpylib/_src/obj_classes/class_BaseGeo.py | f6b3a57c137e1da0d7c2077552d76f4ef9f790e4 | [
"BSD-2-Clause"
] | permissive | magpylib/magpylib | c4dc908c4e1a0109f65f15cd73584693ddc71f4b | 7fa3514afceb28e8b7ba94f2821f5e9c789cc996 | refs/heads/main | 2023-09-01T00:04:39.420872 | 2023-08-27T05:32:14 | 2023-08-27T05:32:14 | 169,390,106 | 174 | 39 | BSD-2-Clause | 2023-09-03T18:34:52 | 2019-02-06T10:39:43 | Python | UTF-8 | Python | false | false | 12,677 | py | class_BaseGeo.py | """BaseGeo class code"""
# pylint: disable=cyclic-import
# pylint: disable=too-many-instance-attributes
# pylint: disable=protected-access
import numpy as np
from scipy.spatial.transform import Rotation as R
from magpylib._src.exceptions import MagpylibBadUserInput
from magpylib._src.input_checks import check_format_i... |
0d72ae3a2668968f8b37283f7e5f073f377011a6 | 549270020f6c8724e2ef1b12e38d11b025579f8d | /recipes/c-blosc2/all/conanfile.py | 9cfb0264ed537ac57e61aadda1289bf620e74fc3 | [
"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 | 5,821 | py | conanfile.py | from conan import ConanFile
from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout
from conan.tools.env import VirtualBuildEnv
from conan.tools.files import export_conandata_patches, apply_conandata_patches, get, copy, rm, rmdir
from conan.tools.microsoft import is_msvc
from conan.tools.scm import... |
3b88ff07b318cf3e6827c8db70427854350cfd31 | ced3f2cdcfe770f2d018a4837c42326fb6e0d27d | /examples/graph/test_prbcd_cora.py | ffcd99950c82a7f6b74cd4a00a0687cbf69dcec4 | [
"MIT",
"CC0-1.0",
"GPL-1.0-or-later"
] | permissive | DSE-MSU/DeepRobust | 308a4c03887eb1394a6d68b64ac3d7837b32f395 | d25d95b33724af9ab0385d5171c989f9b4ff2359 | refs/heads/master | 2023-08-11T00:42:08.091214 | 2023-06-29T13:24:19 | 2023-06-29T13:24:19 | 210,014,892 | 978 | 200 | MIT | 2023-09-11T02:56:14 | 2019-09-21T16:09:07 | Python | UTF-8 | Python | false | false | 2,150 | py | test_prbcd_cora.py | from torch_geometric.datasets import Planetoid
from torch_geometric.utils import to_undirected
import torch_geometric.transforms as T
import argparse
import torch
import deeprobust.graph.utils as utils
from deeprobust.graph.global_attack import PRBCD
from deeprobust.graph.defense_pyg import GCN, SAGE, GAT
parser = arg... |
e2b1f2d3199d79cd787fbe13e4c2276cac644f68 | ffdc77394c5b5532b243cf3c33bd584cbdc65cb7 | /mindspore/python/mindspore/ops/_vmap/vmap_convolution_ops.py | a3dfc2201f1ae31372cf7ca0281bd36007f9c0a2 | [
"Apache-2.0",
"LicenseRef-scancode-proprietary-license",
"MPL-1.0",
"OpenSSL",
"LGPL-3.0-only",
"LicenseRef-scancode-warranty-disclaimer",
"BSD-3-Clause-Open-MPI",
"MIT",
"MPL-2.0-no-copyleft-exception",
"NTP",
"BSD-3-Clause",
"GPL-1.0-or-later",
"0BSD",
"MPL-2.0",
"LicenseRef-scancode-f... | permissive | mindspore-ai/mindspore | ca7d5bb51a3451c2705ff2e583a740589d80393b | 54acb15d435533c815ee1bd9f6dc0b56b4d4cf83 | refs/heads/master | 2023-07-29T09:17:11.051569 | 2023-07-17T13:14:15 | 2023-07-17T13:14:15 | 239,714,835 | 4,178 | 768 | Apache-2.0 | 2023-07-26T22:31:11 | 2020-02-11T08:43:48 | C++ | UTF-8 | Python | false | false | 17,797 | py | vmap_convolution_ops.py | # Copyright 2022 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... |
7ee27c1441fd74f6e6c59b8b073d821985567382 | f89de0a45083225cb4eb9525244c2b89a73f14f0 | /django_comments_xtd/tests/test_models.py | a66edf07d6a9ced38f9e6f297ee34c9c70da9ac7 | [
"BSD-2-Clause"
] | permissive | danirus/django-comments-xtd | eb6f82b9476e4e94ae214892cac94ccd6eaa5692 | 4a92d06e7aca75917fccec23de81abbf740c7fb1 | refs/heads/master | 2023-08-30T13:49:36.849509 | 2023-07-08T15:23:04 | 2023-07-08T15:23:04 | 3,033,940 | 559 | 172 | BSD-2-Clause | 2023-09-02T06:49:19 | 2011-12-22T13:22:50 | Python | UTF-8 | Python | false | false | 31,852 | py | test_models.py | from unittest.mock import patch
from datetime import datetime, timedelta
from django.db.models.signals import pre_save
from django.contrib.contenttypes.models import ContentType
from django.contrib.sites.models import Site
from django.test import TestCase as DjangoTestCase
from django_comments_xtd import get_model
fr... |
9c64b2f060bee09256749b642379bc3707077bef | 7d605f3eec7059bedc98b5962c7fe7ae16fdf54b | /tests/monitors/logstash_tcp/logstash_tcp_test.py | 46156d3ae0dbd7aef4ce20738c1cd8a706500e45 | [
"Apache-2.0"
] | permissive | signalfx/signalfx-agent | d1cc49d8e945252132d36e0734f438f5f7f30a76 | fbc24b0fdd3884bd0bbfbd69fe3c83f49d4c0b77 | refs/heads/main | 2023-08-10T08:07:38.518125 | 2023-06-30T22:40:19 | 2023-06-30T23:10:27 | 80,042,799 | 129 | 230 | Apache-2.0 | 2023-07-07T23:43:17 | 2017-01-25T18:17:17 | Go | UTF-8 | Python | false | false | 3,776 | py | logstash_tcp_test.py | import re
from functools import partial as p
from pathlib import Path
from textwrap import dedent
import pytest
from tests.helpers.agent import Agent
from tests.helpers.assertions import has_datapoint, tcp_socket_open
from tests.helpers.util import (
container_ip,
copy_file_content_into_container,
get_host... |
a1c21b0ea8a7e89340dcc0e20adf2e048edafe74 | cadb6dceb7bb67ce47ef48b2c83f480a65d6b01a | /s3prl/upstream/decoar2/hubconf.py | 612b3900afd1fc87f69c2affc095916b4fa98a2d | [
"Apache-2.0",
"CC-BY-NC-4.0"
] | permissive | s3prl/s3prl | 52ec2ae4df5a61c786c122085603aa9c5e8c2681 | 76a9432b824f6ae3eae09a35a67782c4ed582832 | refs/heads/main | 2023-08-17T02:26:57.524087 | 2023-06-10T17:12:27 | 2023-06-10T17:12:27 | 196,905,457 | 1,549 | 398 | Apache-2.0 | 2023-09-14T13:07:05 | 2019-07-15T01:54:52 | Python | UTF-8 | Python | false | false | 1,030 | py | hubconf.py | import os
import torch
from s3prl.util.download import _urls_to_filepaths
from .expert import UpstreamExpert as _UpstreamExpert
def decoar2_custom(ckpt: str, refresh=False, *args, **kwargs):
if ckpt.startswith("http"):
ckpt = _urls_to_filepaths(ckpt, refresh=refresh)
return _UpstreamExpert(ckpt, *... |
d07e5b8c51c029145b5aa8e9a344992ac466a7d2 | d7fd46dfd8aab520c4958fa065367e168b6bfee7 | /tests/service/connection_test.py | c51e58463de8458051f118a3ea1013ec60fdbe97 | [
"MIT"
] | permissive | facebookresearch/CompilerGym | f04a79fbfdbaf8afd6920ec205db6f1b6003d073 | 9e0c0beb12da1e1ea82ae6ce920713ee28dda4c9 | refs/heads/development | 2023-08-31T09:17:48.967970 | 2023-03-10T19:29:56 | 2023-03-10T19:29:56 | 312,059,069 | 787 | 126 | MIT | 2023-03-10T19:29:58 | 2020-11-11T18:44:35 | Python | UTF-8 | Python | false | false | 3,291 | py | connection_test.py | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
"""Unit tests for //compiler_gym/service:connection."""
import gym
import pytest
import compiler_gym.envs # noqa Register LLVM environments.
... |
b1574c0b74cb7f0dc18a652d9ad32553d65ef179 | d70e3750c600da2cd14f5a07f6cc4bc4d2261cd3 | /src/nba_api/stats/static/__init__.py | 725f3f696bfac950f868567fa7feb8686b1b0dd6 | [
"MIT"
] | permissive | swar/nba_api | 93d794123a856dcf2005e6c2856c2a369d29839e | 8480b574c286a22c9064c014505ae61f7dd84fc1 | refs/heads/master | 2023-09-05T07:03:01.612102 | 2023-09-01T00:59:16 | 2023-09-01T00:59:16 | 149,062,453 | 1,909 | 554 | MIT | 2023-09-14T18:56:46 | 2018-09-17T03:13:07 | Python | UTF-8 | Python | false | false | 31 | py | __init__.py | __all__ = ['players', 'teams']
|
fd2314e72dd3801e0eb07289c288c173e49b900d | dff8e90423ad3883f37f1ffe282ace59ed54c72d | /lambdas/molecule/setup.py | ebfe8e05bb0fc4fb3e45b8a5123efeb88a73b4db | [
"Apache-2.0"
] | permissive | quiltdata/quilt | 50ba1c97486b6865a63558b684aa6e83c179938c | 9dc817aea82355a07e598e18007eea7bbebf5b32 | refs/heads/master | 2023-09-03T18:09:02.933492 | 2023-08-31T20:02:12 | 2023-08-31T20:02:12 | 81,518,954 | 1,261 | 100 | Apache-2.0 | 2023-09-14T13:30:25 | 2017-02-10T02:46:03 | Jupyter Notebook | UTF-8 | Python | false | false | 234 | py | setup.py | from setuptools import find_packages, setup
setup(
name="t4_lambda_molecule",
version="0.0.1",
packages=find_packages(where="src"),
package_dir={"": "src"},
install_requires=[
"requests==2.31.0",
],
)
|
e387c3d09769aaefc5170775ae19461178fba166 | 3dc3bbe607ab7b583eb52dbaae86636eb642960a | /configs/detection/slowonly/slowonly_k700-pre-r50-context_8xb8-8x8x1-10e_ava-kinetics-rgb.py | 344668f8528efe5dabe475c1921fc4ef5dce6ae8 | [
"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 | 198 | py | slowonly_k700-pre-r50-context_8xb8-8x8x1-10e_ava-kinetics-rgb.py | _base_ = ['slowonly_k700-pre-r50_8xb8-8x8x1-10e_ava-kinetics-rgb.py']
model = dict(
roi_head=dict(
bbox_roi_extractor=dict(with_global=True),
bbox_head=dict(in_channels=4096)))
|
c3db0d4f552e78daf8e82e77d5b780902d3848f3 | 58cfad962e57b935e7782bb214a2008d689751d6 | /xero_python/file/models/__init__.py | 1e354185b250b6ede19fdfb79b2e5157db661c02 | [
"MIT"
] | permissive | XeroAPI/xero-python | ce43c060c216a42efd5f47159987468deb0e4622 | 07efa3bfc87a3bd08ba217dd2b642f6a3515ddff | refs/heads/master | 2023-07-21T04:01:27.461727 | 2023-07-11T02:35:44 | 2023-07-11T02:35:44 | 240,158,613 | 109 | 42 | MIT | 2023-07-11T02:35:45 | 2020-02-13T02:17:05 | Python | UTF-8 | Python | false | false | 736 | py | __init__.py | # coding: utf-8
# flake8: noqa
"""
Xero Files API
These endpoints are specific to Xero Files API # noqa: E501
Contact: api@xero.com
Generated by: https://openapi-generator.tech
"""
# import models into model package
from xero_python.file.models.association import Association
from xero_python.file.... |
b43dd76192268813ae41b9b9f45b732b35c2f14f | 6e964d46b8fab9bccbd199ea7ade41297282b0a7 | /plugin/PySrc/space_tracer/traced_finder.py | 8b30f7e148e0029967367eb6c5ba6a35533cf527 | [
"MIT"
] | permissive | donkirkby/live-py-plugin | 1a4cb87a796983245094d7c97c3e72f3cea0c540 | 165b447cc1288c94f24f1e660e0c45a6ef476826 | refs/heads/master | 2023-08-29T15:14:37.585327 | 2023-07-23T21:12:19 | 2023-07-23T21:12:19 | 4,332,096 | 257 | 59 | MIT | 2023-09-09T18:18:40 | 2012-05-15T04:41:18 | Python | UTF-8 | Python | false | false | 1,490 | py | traced_finder.py | from ast import parse, NodeVisitor
PSEUDO_FILENAME = 'live_source.py'
DEFAULT_MODULE_NAME = '__main__'
LIVE_MODULE_NAME = '__live_coding__'
class TracedFinder(object):
""" Find which nodes to trace in a module. """
def __init__(self, source_code, traced, filename=None):
""" Initialize the finder.
... |
650798f790f15fec337d9cb90ea83413d4041bdd | eb9f655206c43c12b497c667ba56a0d358b6bc3a | /python/testData/inspections/PyUnresolvedReferencesInspection/ConditionalImports/a.py | 24a1622f48efab3fbf1a801c00692c03fdf850b6 | [
"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 | 245 | py | a.py | def f(c, x):
if c > 2:
from lib1 import f #pass
elif c > 1:
from lib2 import f #pass
else:
<warning descr="Unused import statement 'from lib2 import g #fail'">from lib2 import g #fail</warning>
return f(x) |
33110d55f7bb0ebee62d7d5a33af76d52d9578de | 2342b8737b9ffeb9715158b8ec74a33c7a4947f6 | /koku/reporting/provider/ocp/costs/models.py | 1e0380f2d0853c6209903c63ec140cd4ec57367c | [
"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 | 2,355 | py | models.py | #
# Copyright 2021 Red Hat Inc.
# SPDX-License-Identifier: Apache-2.0
#
"""Models for OCP cost view tables."""
from django.contrib.postgres.indexes import GinIndex
from django.db import models
from django.db.models import JSONField
class CostSummary(models.Model):
"""A summary table of OCP costs."""
class Me... |
b9d6ba3eb0ba902d499338701d8e1fa0b27368b9 | 96dcea595e7c16cec07b3f649afd65f3660a0bad | /homeassistant/components/qnap_qsw/button.py | acd8d3bd1ef1b676fedfb8e029779f5f6555f5c9 | [
"Apache-2.0"
] | permissive | home-assistant/core | 3455eac2e9d925c92d30178643b1aaccf3a6484f | 80caeafcb5b6e2f9da192d0ea6dd1a5b8244b743 | refs/heads/dev | 2023-08-31T15:41:06.299469 | 2023-08-31T14:50:53 | 2023-08-31T14:50:53 | 12,888,993 | 35,501 | 20,617 | Apache-2.0 | 2023-09-14T21:50:15 | 2013-09-17T07:29:48 | Python | UTF-8 | Python | false | false | 2,296 | py | button.py | """Support for the QNAP QSW buttons."""
from __future__ import annotations
from collections.abc import Awaitable, Callable
from dataclasses import dataclass
from typing import Final
from aioqsw.localapi import QnapQswApi
from homeassistant.components.button import (
ButtonDeviceClass,
ButtonEntity,
Butto... |
aa0956c1c3725fb756edb1696f075a484923a227 | e4523061fa8e4dc20ec74f7fbebdd407dabd6443 | /colmap_runner/run_colmap_posed.py | eadd60953faf889791c26959c630392c2a4cbd78 | [
"BSD-2-Clause"
] | permissive | Kai-46/nerfplusplus | a3d19f4d966449cc30b139fa8606691879736bd4 | ebf2f3e75fd6c5dfc8c9d0b533800daaf17bd95f | refs/heads/master | 2022-07-22T20:26:42.549489 | 2022-03-16T14:44:03 | 2022-03-16T14:44:03 | 303,247,907 | 841 | 114 | null | 2022-02-21T15:17:21 | 2020-10-12T01:31:04 | Python | UTF-8 | Python | false | false | 9,983 | py | run_colmap_posed.py | import os
import json
from database import COLMAPDatabase
from pyquaternion import Quaternion
import numpy as np
import imageio
import subprocess
def bash_run(cmd):
# local install of colmap
env = os.environ.copy()
env['LD_LIBRARY_PATH'] = '/home/zhangka2/code/colmap/build/__install__/lib'
colmap... |
f92d536eb3677efe8b5cc7b97dcfc7abb65402c6 | 008c1eaa9354c76bc42700c81df1a65b8ecc5f0d | /backend/projects/permissions.py | aa6691518cb40100cffb9cdbaf92b616610e0b1f | [
"MIT"
] | permissive | doccano/doccano | d3417706fa8a431fe2ac36a2a9b87c8604a0e4d6 | 63870976cc62811807648075d04a2531a1a6734d | refs/heads/master | 2023-08-18T04:33:46.271524 | 2023-08-10T04:32:53 | 2023-08-10T04:32:53 | 132,709,824 | 6,297 | 1,393 | MIT | 2023-09-06T05:55:55 | 2018-05-09T06:10:05 | Python | UTF-8 | Python | false | false | 1,617 | py | permissions.py | from django.conf import settings
from rest_framework.permissions import SAFE_METHODS, BasePermission
from .models import Member
class RolePermission(BasePermission):
UNSAFE_METHODS = ("POST", "PATCH", "DELETE")
unsafe_methods_check = True
role_name = ""
@classmethod
def get_project_id(cls, reque... |
1eef7aabeed3100792e53c8139c1a8845193ff5d | 944a49e62bc79622fe01abee62403397a1b0504d | /openstackclient/tests/functional/compute/v2/test_aggregate.py | d5d7c579673a1ffaab85b0b3f3188ff59923305e | [
"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 | 5,478 | py | test_aggregate.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... |
e2b40f4f32082cb0a26c95ccfc6909f0671deb7e | 829a7b38243821a1d3f274952fd7c4e5140c9f40 | /mahotas/zernike.py | 7cc5a04264b1fc870a0a2e3079ea800aba143ac5 | [
"MIT",
"BSL-1.0"
] | permissive | luispedro/mahotas | e6f9c1e21acaded80946ebf8b1c0366cbcd91d2f | f7edeb22a4b47e6c5200c008a8e7386067d72443 | refs/heads/master | 2023-08-23T22:38:05.018281 | 2023-06-09T12:57:00 | 2023-06-09T22:11:37 | 495,613 | 648 | 175 | NOASSERTION | 2023-05-26T18:46:28 | 2010-01-31T00:13:06 | Python | UTF-8 | Python | false | false | 141 | py | zernike.py | import warnings
warnings.warn(
'''Use
from mahotas.features import zernike
''', DeprecationWarning)
from mahotas.features.zernike import *
|
e80a4b06d4b352d5227cbd1d8c25eb54ecb8044d | fc645876cbd921cef92768f1d73c7c7b97fba673 | /learntools/game_ai/ex1.py | e7191ee1828b6b2996270d5f9e5e0aa63fd08bbb | [
"Apache-2.0"
] | permissive | Kaggle/learntools | a91b07473f8244a2fda2a6be4f0f65d516ccddea | 55574bf6512577688c9d0bcde665683903594910 | refs/heads/master | 2023-08-31T17:58:12.314620 | 2023-08-30T02:16:17 | 2023-08-30T02:16:17 | 126,507,129 | 447 | 258 | Apache-2.0 | 2023-08-30T02:16:18 | 2018-03-23T15:51:22 | Jupyter Notebook | UTF-8 | Python | false | false | 7,877 | py | ex1.py | from learntools.core import *
import numpy as np
import os
class MyConfig(object):
def __init__(self):
self.columns = 7
self.rows = 6
self.inarow = 4
config = MyConfig()
class MyBoard(object):
def __init__(self, board, mark):
self.board = board
self.mark = mark
def... |
33aa7a3e71edf4f96b6848b4cd87511554e78ec0 | 607dc8df19fc5248f6289cdda97857b5d58ca16f | /examples/1_basics/5_continue.py | 025856fee0059fd0626923a50cc4e07fd718bb61 | [
"BSD-3-Clause",
"LicenseRef-scancode-philippe-de-muyter",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | automl/SMAC3 | 7dce243a33023c52d6819deff966f7b502e90ed0 | 541ee7e0383b491b86d1a23dcff669f2efad616d | refs/heads/main | 2023-08-31T17:36:06.067579 | 2023-08-01T13:02:51 | 2023-08-01T13:02:51 | 65,900,469 | 943 | 259 | NOASSERTION | 2023-09-11T02:36:57 | 2016-08-17T10:58:05 | Python | UTF-8 | Python | false | false | 3,506 | py | 5_continue.py | """
Continue an Optimization
^^^^^^^^^^^^^^^^^^^^^^^^
SMAC can also be continued from a previous run. To do so, it reads in old files (derived from scenario's name,
output_directory and seed) and sets the corresponding components. In this example, an optimization of a simple quadratic
function is continued.
First, af... |
033ee974e119b645a713182eb48bb67548be2910 | e9acc55fb26cb741dd9ac70562fdea3fc200a531 | /tests/test_vector.py | ac9ff2b161b88ae80f3940ad1504097a1483b9f9 | [
"MIT"
] | permissive | ESA-PhiLab/OpenSarToolkit | 3ce9bb89bf87a31905464f511ca170b34ba5673d | ecf7327638c5207f37ffc3240d13392bce2f3bdb | refs/heads/main | 2023-07-19T17:40:41.448959 | 2022-05-06T10:44:48 | 2022-05-06T10:44:48 | 158,724,393 | 177 | 51 | MIT | 2023-07-06T22:56:57 | 2018-11-22T16:17:11 | Python | UTF-8 | Python | false | false | 1,021 | py | test_vector.py | # from ost.helpers import vector
# test aoi_to_wkt
# aoi = vector.aoi_to_wkt("IRL")
# assert type(aoi) == str and aoi.startswith("POLYGON")
# aoi = vector.aoi_to_wkt("POLYGON((1 2,1 4,3 4,3 2,1 2))")
# assert type(aoi) == str and aoi.startswith("POLYGON")
# aoi = vector.aoi_to_wkt("tests/testdata/test_polygon.geojso... |
68e8a6f05455f83d53f187beb4f4c08685b1ed9d | 3c582a006b945cd95974d910ab5b0ff551ab42fa | /tsuru_dashboard/__init__.py | 0dbc67e39f9b8b706324af2dbb38dba7e79cd0ed | [] | no_license | tsuru/tsuru-dashboard | f8be15a72366a5cefeadd4a3aac117ed760e85bc | c94b0b1a6ec30d7f59b939adcff41646bad00e87 | refs/heads/master | 2023-06-22T12:01:20.024933 | 2022-10-20T19:50:47 | 2022-10-20T19:50:47 | 5,112,553 | 119 | 60 | null | 2023-06-13T17:53:35 | 2012-07-19T16:31:42 | Python | UTF-8 | Python | false | false | 66 | py | __init__.py | from tsuru_dashboard import apps # NOQA
__version__ = "0.15.7"
|
e5979fc6150c1ae9bb27ee710a3f96afdd7d4764 | 49173bc5a31caa2adf5f304f2f55cc3f5fda452a | /qutip/settings.py | 29ee053b75a13db0b24f3031575a832f909609b3 | [
"BSD-3-Clause"
] | permissive | qutip/qutip | a35e73670501c33898e24fe72bf255f8fb4a6632 | 2dc5f3f0a6ad2175e6dc015649989125401fc3bf | refs/heads/master | 2023-09-01T01:09:53.422153 | 2023-08-25T14:18:15 | 2023-08-25T14:18:15 | 6,136,261 | 1,489 | 679 | BSD-3-Clause | 2023-09-07T14:16:03 | 2012-10-09T06:20:46 | Python | UTF-8 | Python | false | false | 8,248 | py | settings.py | """
This module contains settings for the QuTiP graphics, multiprocessing, and
tidyup functionality, etc.
"""
import os
import sys
from ctypes import cdll
import platform
import numpy as np
__all__ = ['settings']
def _blas_info():
config = np.__config__
if hasattr(config, 'blas_ilp64_opt_info'):
blas... |
d13bb8decf9725c88d4e49eea764036710fc2d55 | 3a50c0712e0a31b88d0a5e80a0c01dbefc6a6e75 | /thrift/compiler/test/fixtures/py-kwargs/gen-py/module/ttypes.py | 93589a2e79b7642d959207fbcedc0f93f86f96d6 | [
"Apache-2.0"
] | permissive | facebook/fbthrift | 3b7b94a533666c965ce69cfd6054041218b1ea6f | 53cf6f138a7648efe5aef9a263aabed3d282df91 | refs/heads/main | 2023-08-24T12:51:32.367985 | 2023-08-24T08:28:35 | 2023-08-24T08:28:35 | 11,131,631 | 2,347 | 666 | Apache-2.0 | 2023-09-01T01:44:39 | 2013-07-02T18:15:51 | C++ | UTF-8 | Python | false | false | 175,902 | py | ttypes.py | #
# Autogenerated by Thrift
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
# @generated
#
from __future__ import absolute_import
import sys
from thrift.util.Recursive import fix_spec
from thrift.Thrift import TType, TMessageType, TPriority, TRequestContext, TProcessorEventHandler, TServerInterfa... |
9de3129279abeb713af43eff2aa0fbad1d3bfe1b | 3196488df20871d5196e7a7224577c6bb345477e | /darwin/utils/__init__.py | fc7c082fbc9fa6c4f8a6632e316a63c3066a5cd2 | [
"MIT"
] | permissive | v7labs/darwin-py | 60360d94c12fc5170643588a2fa890981aeab075 | 3cc2d5299fb48d48aeac10e01f79f49e856e6967 | refs/heads/master | 2023-08-31T10:06:55.334381 | 2023-08-31T09:51:01 | 2023-08-31T09:51:01 | 192,462,056 | 110 | 36 | MIT | 2023-09-13T17:25:24 | 2019-06-18T03:58:27 | Python | UTF-8 | Python | false | false | 60 | py | __init__.py | from .flatten_list import flatten_list
from .utils import *
|
e66e189d3001b1ea13b63a0def1c7f91ef8bbebc | 61b95ee2aefbcfbd6c4abf9511d976d0b9d0e100 | /faker/providers/ssn/en_CA/__init__.py | 6df8f8bb253ff4adbe89dc33f34c6c4e7069b631 | [
"MIT"
] | permissive | joke2k/faker | fed7472580ced2bce326fe4ea0c3d1c810853d5e | 33e36b1b6cc9c6f039fe387988853771bab60624 | refs/heads/master | 2023-09-04T00:43:33.599705 | 2023-08-31T16:15:04 | 2023-08-31T16:15:04 | 6,662,075 | 14,544 | 2,215 | MIT | 2023-09-11T16:06:14 | 2012-11-12T23:00:09 | Python | UTF-8 | Python | false | false | 2,966 | py | __init__.py | from .. import Provider as SsnProvider
def checksum(sin):
"""
Determine validity of a Canadian Social Insurance Number.
Validation is performed using a modified Luhn Algorithm. To check
the Every second digit of the SIN is doubled and the result is
summed. If the result is a multiple of ten, the... |
cac48c4b06fde9eacd4ea3cb3db9cd2874b2f080 | 5105403f2b75990654519438d8ceabcf80962ebf | /tests/unit/bokeh/models/test_annotations.py | 2a1ba9db5f0c38763b9db22a8a49487adf7f1374 | [
"BSD-3-Clause"
] | permissive | bokeh/bokeh | ed1d81eb07d27d27c6710c9fec9114886047f528 | 310cb2cbeabc4c4b8180cbda566df16039737cdc | refs/heads/branch-3.3 | 2023-08-31T23:53:06.537061 | 2023-08-30T03:43:05 | 2023-08-30T03:43:05 | 3,834,332 | 17,174 | 5,251 | BSD-3-Clause | 2023-09-14T11:37:23 | 2012-03-26T15:40:01 | Python | UTF-8 | Python | false | false | 19,277 | py | test_annotations.py | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2023, Anaconda, Inc., and Bokeh Contributors.
# All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#-------------------------------------------------------------------... |
2ce380d061efafc44ec8c71293c883bf4ac3ccd1 | f9d564f1aa83eca45872dab7fbaa26dd48210d08 | /huaweicloud-sdk-iam/huaweicloudsdkiam/v3/iam_credentials.py | 30345b66d9218d8733aa31868056232dff1666cd | [
"Apache-2.0"
] | permissive | huaweicloud/huaweicloud-sdk-python-v3 | cde6d849ce5b1de05ac5ebfd6153f27803837d84 | f69344c1dadb79067746ddf9bfde4bddc18d5ecf | refs/heads/master | 2023-09-01T19:29:43.013318 | 2023-08-31T08:28:59 | 2023-08-31T08:28:59 | 262,207,814 | 103 | 44 | NOASSERTION | 2023-06-22T14:50:48 | 2020-05-08T02:28:43 | Python | UTF-8 | Python | false | false | 747 | py | iam_credentials.py | from huaweicloudsdkcore.signer.signer import Signer
class IamCredentials:
_X_AUTH_TOKEN = "X-Auth-Token"
def __init__(self, auth_token=None):
self.auth_token = auth_token
def with_x_auth_token(self, auth_token):
self.auth_token = auth_token
return self
def get_update_path_p... |
90e0b04015a496cbe5abc7bf71869da72e4673f0 | a5a99f646e371b45974a6fb6ccc06b0a674818f2 | /FastSimulation/TrajectoryManager/python/TrackerSimHits_cfi.py | dcd28a1e09ac4a993603649079ae8f52684b3f83 | [
"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 | 500 | py | TrackerSimHits_cfi.py | import FWCore.ParameterSet.Config as cms
TrackerSimHitsBlock = cms.PSet(
TrackerSimHits = cms.PSet(
# Smallest charged particle pT for which SimHit's are saved (GeV/c)
pTmin = cms.untracked.double(0.2),
# Save SimHit's only for the first loop
firstLoop = cms.untracked.bool(True)
... |
72d4e619b24e918222f1608d85263228dabd75c5 | a3d6556180e74af7b555f8d47d3fea55b94bcbda | /third_party/blink/web_tests/external/wpt/webdriver/tests/classic/new_session/response.py | 43a8d57931143f9cf2b5cb0946f982b003afd85c | [
"LGPL-2.0-or-later",
"LicenseRef-scancode-warranty-disclaimer",
"LGPL-2.1-only",
"GPL-1.0-or-later",
"GPL-2.0-only",
"LGPL-2.0-only",
"BSD-2-Clause",
"LicenseRef-scancode-other-copyleft",
"BSD-3-Clause",
"MIT",
"Apache-2.0"
] | permissive | chromium/chromium | aaa9eda10115b50b0616d2f1aed5ef35d1d779d6 | a401d6cf4f7bf0e2d2e964c512ebb923c3d8832c | refs/heads/main | 2023-08-24T00:35:12.585945 | 2023-08-23T22:01:11 | 2023-08-23T22:01:11 | 120,360,765 | 17,408 | 7,102 | BSD-3-Clause | 2023-09-10T23:44:27 | 2018-02-05T20:55:32 | null | UTF-8 | Python | false | false | 1,496 | py | response.py | import uuid
import pytest
from tests.support.asserts import assert_success
def test_sessionid(new_session, add_browser_capabilities):
response, _ = new_session({"capabilities": {"alwaysMatch": add_browser_capabilities({})}})
value = assert_success(response)
assert isinstance(value["sessionId"], str)
... |
f26e78d3daaa38b4614a0540d9321474dbc2f1a0 | 5c04ad01f19732cb164047e4e4e3dcb830ec3ac7 | /marge/single_merge_job.py | 1f8155ba0dd4fa5170affaec2b71becb4f6c4ea2 | [
"BSD-3-Clause"
] | permissive | smarkets/marge-bot | f7dcb9c3d9a1ad8dbb0ee6737dc0ec82bdcd8257 | 91b23058afbec984aa23d3981fa0fca63159e5ca | refs/heads/master | 2023-08-30T02:07:30.674075 | 2023-06-15T14:13:32 | 2023-06-15T14:13:32 | 95,782,585 | 647 | 154 | BSD-3-Clause | 2023-08-08T16:05:29 | 2017-06-29T13:50:25 | Python | UTF-8 | Python | false | false | 8,857 | py | single_merge_job.py | # pylint: disable=too-many-locals,too-many-branches,too-many-statements
import logging as log
import time
from datetime import datetime
from . import git, gitlab
from .commit import Commit
from .job import CannotMerge, GitLabRebaseResultMismatch, MergeJob, SkipMerge
class SingleMergeJob(MergeJob):
def __init__(... |
4ded0a160cb02e4dac24bff0ba410b0a0c072a45 | 620323fc090cebaf7aca456ff3f7fbbe1e210394 | /job_compassplus/tx_parse_xml/show_db_views.py | 46755d2cbf228006f367a802a580e645596a9a70 | [
"CC-BY-4.0"
] | permissive | gil9red/SimplePyScripts | bd2733372728bf9b9f00570e90316fa12116516b | 773c2c9724edd8827a1dbd91694d780e03fcb05a | refs/heads/master | 2023-08-31T04:26:09.120173 | 2023-08-30T17:22:59 | 2023-08-30T17:22:59 | 22,650,442 | 157 | 46 | null | 2023-09-08T17:51:33 | 2014-08-05T16:19:52 | Python | UTF-8 | Python | false | false | 1,808 | py | show_db_views.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = "ipetrash"
import xml.etree.ElementTree as ET
from collections import defaultdict
from dataclasses import dataclass
from pathlib import Path
@dataclass
class View:
id: str
name: str
db_name: str
def get_views(model_path: Path) -> list[View]... |
623964b18e3f875eb15eaf9bc0ecd747f6f22ab6 | ec85250addb7357dfe7bb3e0680d53fc7b0fd8fb | /python_modules/dagster/dagster_tests/core_tests/test_compute_only_job.py | 5b9000a03ac4896df504cb0bb00e4997b8f36511 | [
"Apache-2.0"
] | permissive | dagster-io/dagster | 6adb5deee8bcf3ea1866a6a64f2ed81e1db5e73a | fe21995e0402878437a828c6a4244025eac8c43b | refs/heads/master | 2023-09-05T20:46:08.203794 | 2023-09-05T19:54:52 | 2023-09-05T19:54:52 | 131,619,646 | 8,565 | 1,154 | Apache-2.0 | 2023-09-14T21:57:37 | 2018-04-30T16:30:04 | Python | UTF-8 | Python | false | false | 1,132 | py | test_compute_only_job.py | from typing import Dict, TypeVar
from dagster import job, op
T = TypeVar("T")
def _set_key_value(ddict: Dict[str, object], key: str, value: T) -> T:
ddict[key] = value
return value
def test_execute_op_with_dep_only_inputs_no_api():
did_run_dict = {}
@op
def step_one_op(_):
_set_key_va... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.