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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
366ec5a806ff6bf11680dcbbaff0751281364ddd | b40d1a26ea04a19ec0da7bf55db84b7ee36cc898 | /leetcode.com/python/801_Minimum_Swaps_To_Make_Sequences_Increasing.py | 6fb8c63199f28bbbb5cf3751df594d4bdf08e015 | [
"MIT"
] | permissive | partho-maple/coding-interview-gym | 5e8af7d404c28d4b9b52e5cffc540fd51d8025cf | 20ae1a048eddbc9a32c819cf61258e2b57572f05 | refs/heads/master | 2022-09-11T16:36:01.702626 | 2022-03-14T08:39:47 | 2022-03-14T08:39:47 | 69,802,909 | 862 | 438 | MIT | 2022-08-18T06:42:46 | 2016-10-02T14:51:31 | Python | UTF-8 | Python | false | false | 910 | py | 801_Minimum_Swaps_To_Make_Sequences_Increasing.py |
# Source: https://tinyurl.com/tzx7wpv
class Solution(object):
def minSwap(self, A, B):
"""
:type A: List[int]
:type B: List[int]
:rtype: int
"""
arrLen = len(A)
swaps, noSwaps = [arrLen] * arrLen, [arrLen] * arrLen
swaps[0], noSwaps[0] = 1, 0
... |
b64b3ba780687ce21d8651cc566d0f92d8d0fb64 | 66fc3d58e94e8340a0d825501776a1dea37c0198 | /tests/python/ContextTest.py | 5cfc847fd890f9d10a4ed25fd7a2b4e41fc0b032 | [
"BSD-3-Clause",
"CC-BY-4.0"
] | permissive | AcademySoftwareFoundation/OpenColorIO | dad370b54be147ae94f18ed6414d53bd76e9ef74 | 96f528fdfb7f9fb24388e33f6a968d29a3909cf8 | refs/heads/main | 2023-08-29T08:51:45.625957 | 2023-08-29T01:42:37 | 2023-08-29T01:42:37 | 775,131 | 843 | 236 | BSD-3-Clause | 2023-09-14T02:56:01 | 2010-07-14T18:22:06 | C++ | UTF-8 | Python | false | false | 2,652 | py | ContextTest.py | # SPDX-License-Identifier: BSD-3-Clause
# Copyright Contributors to the OpenColorIO Project.
import copy, unittest, os, sys
import PyOpenColorIO as OCIO
class ContextTest(unittest.TestCase):
def test_copy(self):
"""
Test the deepcopy() method.
"""
cont = OCIO.Context()
con... |
f7ee13a4f32148e4c656056221b627061bd9ecce | 703b4a4c5e1baa34e0b09628db99bc3bc06d1b6e | /wgdi/peaksfit.py | 6834a8e07eeb2e8430630caf6e7f9527c87b30a0 | [
"BSD-3-Clause",
"BSD-2-Clause"
] | permissive | SunPengChuan/wgdi | 2c1c4b6a44e5fb18fc6045b0d4494991150d08b2 | 333a3910f32a0e5c273f034ce26c1a53b2aa92d5 | refs/heads/master | 2023-06-01T04:21:49.055744 | 2023-05-11T13:34:41 | 2023-05-11T13:34:41 | 146,754,483 | 103 | 20 | BSD-2-Clause | 2021-03-27T19:23:55 | 2018-08-30T13:33:59 | Python | UTF-8 | Python | false | false | 3,443 | py | peaksfit.py | import re
import sys
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from scipy.optimize import curve_fit
from scipy.stats import gaussian_kde, linregress
import wgdi.base as base
class peaksfit():
def __init__(self, options):
self.figsize = 10, 6.18
self.fontsize = 9
... |
48beca0df04aef322e311d32cd17f9dd08691024 | 6146e33102797407ede06ce2daa56c28fdfa2812 | /contrib/ops/convertAnimCache.py | a14000509f26f9955baf8c4eb5825f3db466c254 | [
"BSD-3-Clause"
] | permissive | GafferHQ/gaffer | e1eb78ba8682bfbb7b17586d6e7b47988c3b7d64 | 59cab96598c59b90bee6d3fc1806492a5c03b4f1 | refs/heads/main | 2023-09-01T17:36:45.227956 | 2023-08-30T09:10:56 | 2023-08-30T09:10:56 | 9,043,124 | 707 | 144 | BSD-3-Clause | 2023-09-14T09:05:37 | 2013-03-27T00:04:53 | Python | UTF-8 | Python | false | false | 3,648 | py | convertAnimCache.py | ##########################################################################
#
# Copyright (c) 2012, John Haddon. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of so... |
0799190515b8e4e9b12bd97abd2b2d3f57efdad1 | ed62b03278a3dec0237e9a405e624baf11724469 | /fastmri_recon/models/training/image_tboard_cback.py | 7a5fd4006b8dbcfe57c1c5d810c733bdcfecf8f4 | [
"MIT"
] | permissive | zaccharieramzi/fastmri-reproducible-benchmark | f93b460bade2b6301caa9526e5c6385369971366 | 4a4ec09524437d11153fc5a525621783689bed38 | refs/heads/master | 2023-05-01T01:27:19.117953 | 2022-05-04T11:31:11 | 2022-05-04T11:31:11 | 193,113,083 | 147 | 50 | MIT | 2023-04-12T12:17:00 | 2019-06-21T14:36:25 | Jupyter Notebook | UTF-8 | Python | false | false | 1,293 | py | image_tboard_cback.py | """Inspired by https://github.com/sicara/tf-explain/blob/master/tf_explain/callbacks/grad_cam.py"""
import numpy as np
import tensorflow as tf
from tensorflow.keras.callbacks import Callback
class TensorBoardImage(Callback):
def __init__(self, log_dir, image, model_input):
super().__init__()
self.l... |
f48cb365ce355863f126c744d7db4ddf878cfba8 | 3a6a211ea0d32405497fbd6486c490bb147e25f9 | /common/py_vulcanize/third_party/rcssmin/bench/cssmin.py | cbfbf8d4966b33c3014ee33354cc73e8c2a963cd | [
"MIT",
"BSD-3-Clause",
"Apache-2.0"
] | permissive | catapult-project/catapult | e2cbdd5eb89f3b1492fc8752494e62ea1df4bae0 | 53102de187a48ac2cfc241fef54dcbc29c453a8e | refs/heads/main | 2021-05-25T07:37:22.832505 | 2021-05-24T08:01:49 | 2021-05-25T06:07:38 | 33,947,548 | 2,032 | 742 | BSD-3-Clause | 2022-08-26T16:01:18 | 2015-04-14T17:49:05 | HTML | UTF-8 | Python | false | false | 7,426 | py | cssmin.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""`cssmin` - A Python port of the YUI CSS compressor.
:Copyright:
Copyright 2011 - 2014
Andr\xe9 Malo or his licensors, as applicable
:License:
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the ... |
8e51b75357cde464cbd05440c64e8847e55a6667 | 1534531d248728e583310214c84cd329cfeb243b | /accelerator/shell/ds.py | c1b3cf76833047362a980999a28f77cd126312af | [
"Apache-2.0"
] | permissive | eBay/accelerator | 415a006d18283940661c0f3cbae2c311acc1ffaa | 8376d289e39cd90562de7dc2e3cdaa0bf080587b | refs/heads/master | 2023-03-10T11:08:58.828517 | 2022-07-14T19:15:46 | 2022-07-14T19:15:46 | 130,265,539 | 146 | 30 | null | null | null | null | UTF-8 | Python | false | false | 9,762 | py | ds.py | ############################################################################
# #
# Copyright (c) 2017 eBay Inc. #
# Modifications copyright (c) 2019-2021 Carl Drougge #
# Modificati... |
99fb39002c8c4487e0da3413a88b2b1b8b059835 | 32809f6f425bf5665fc19de2bc929bacc3eeb469 | /src/0873-Length-of-Longest-Fibonacci-Subsequence/0873.py | 41b03b83352a55448b812b2b9f717659cc431133 | [] | no_license | luliyucoordinate/Leetcode | 9f6bf01f79aa680e2dff11e73e4d10993467f113 | bcc04d49969654cb44f79218a7ef2fd5c1e5449a | refs/heads/master | 2023-05-25T04:58:45.046772 | 2023-05-24T11:57:20 | 2023-05-24T11:57:20 | 132,753,892 | 1,575 | 569 | null | 2023-05-24T11:57:22 | 2018-05-09T12:30:59 | C++ | UTF-8 | Python | false | false | 484 | py | 0873.py | class Solution:
def lenLongestFibSubseq(self, A: List[int]) -> int:
A_s = set(A)
n = len(A)
res = 0
for i in range(n):
for j in range(i+1, n):
x, y = A[j], A[i] + A[j]
l = 2
if x*(res - 2) > A[-1]:
break
... |
abf4336317ead36c9713540591d3a83f27edf720 | 057a475216e9beed41983481aafcaf109bbf58da | /tests/integration/test_grpc_protocol/test.py | efc7d98e820ce87853b3457370284465a5ae003d | [
"Apache-2.0"
] | permissive | ClickHouse/ClickHouse | fece5204263a5b4d693854b6039699265f1bb27f | 6649328db809d51a694c358571539bc5820464be | refs/heads/master | 2023-08-31T18:48:36.615225 | 2023-08-31T17:51:24 | 2023-08-31T17:51:24 | 60,246,359 | 23,878 | 5,449 | Apache-2.0 | 2023-09-14T20:10:52 | 2016-06-02T08:28:18 | C++ | UTF-8 | Python | false | false | 24,784 | py | test.py | import os
import pytest
import sys
import time
import pytz
import uuid
import grpc
from helpers.cluster import ClickHouseCluster, run_and_check
from threading import Thread
import gzip
import lz4.frame
GRPC_PORT = 9100
SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__))
DEFAULT_ENCODING = "utf-8"
# Use grpcio-t... |
184a910ba8181ec327296287f0df4fe4cb052c8b | 091a6200be74bf6577c86f623665bcc24e16b02b | /PyGamer_Improved_Thermal_Camera/code.py | d14feb1d8c2ca886d39441448ff7cbce1dd929c7 | [
"MIT"
] | permissive | adafruit/Adafruit_Learning_System_Guides | b5f7bce40a16da64e7a79d4b39de032f2cca41d4 | 5eaa7a15a437c533b89f359a25983e24bb6b5438 | refs/heads/main | 2023-09-05T18:31:41.621956 | 2023-09-05T15:36:09 | 2023-09-05T15:36:09 | 105,065,494 | 937 | 937 | MIT | 2023-09-12T18:48:53 | 2017-09-27T20:22:44 | C | UTF-8 | Python | false | false | 18,544 | py | code.py | # SPDX-FileCopyrightText: 2022 Jan Goolsbey for Adafruit Industries
# SPDX-License-Identifier: MIT
"""
`thermalcamera`
================================================================================
PyGamer/PyBadge Thermal Camera Project
"""
import time
import gc
import board
import keypad
import busio
from ulab imp... |
a1b5b68958d3eec2a719a580320b133816dfcc2d | ab7d5ec2e40b26c33da957210b5d2da77f9b696d | /repos/emily-python/contents/py/parser.py | daf8b8f3d03b532056999c5e126cf816210aed81 | [] | no_license | mcclure/bitbucket-backup | e49d280363ff7ef687f03473e463865a7ad8a817 | b6a02ca8decf843fa0a765c842c24e7eccf59307 | refs/heads/archive | 2023-01-24T21:15:14.875131 | 2020-02-02T20:56:23 | 2020-02-02T20:56:23 | 237,833,969 | 115 | 6 | null | 2023-01-07T14:24:14 | 2020-02-02T20:43:56 | C | UTF-8 | Python | false | false | 24,192 | py | parser.py | # Parser: Transformations ("macros") applied to parse tree to gradually make it executable
from core import *
from util import switch
import reader
import execution
class ParserException(EmilyException):
pass
# Standard macros-- "ast"
class Macro(object):
def __init__(s, progress):
s.progress = progress
# Macr... |
e7587fe68c668a903f57925f3a0669a0c21ce055 | d3b468ef0938ec32edf71ea1ceeb5b5d06ebf171 | /autotest/generate_parquet_test_file.py | 2768254d2c26574a2b03de1a40314c035b489d35 | [
"LicenseRef-scancode-warranty-disclaimer",
"SunPro",
"LicenseRef-scancode-info-zip-2005-02",
"BSD-3-Clause",
"MIT",
"ISC",
"Apache-2.0",
"LicenseRef-scancode-public-domain",
"BSD-2-Clause"
] | permissive | OSGeo/gdal | 30a1e1fb0909d758d4f636d481bf03fcd7affe3c | 1e7746b2546b8c4878f4bfdb20c87f87e561745b | refs/heads/master | 2023-09-03T19:37:50.027999 | 2023-09-03T18:29:31 | 2023-09-03T18:29:31 | 6,148,317 | 4,100 | 2,611 | NOASSERTION | 2023-09-14T20:23:19 | 2012-10-09T21:39:58 | C++ | UTF-8 | Python | false | false | 26,536 | py | generate_parquet_test_file.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# $Id$
#
# Project: GDAL/OGR Test Suite
# Purpose: Test read functionality for OGR Parquet driver.
# Author: Even Rouault <even dot rouault at spatialys.com>
#
##############################... |
c1d3125275bcdde936407abec26a9b88de181e87 | 6ffd23679939f59f0a09c9507a126ba056b239d7 | /imperative/python/test/unit/functional/test_tensor.py | a4a81e3f9e986a9cb578d3d05fd3d495d1709fc5 | [
"LicenseRef-scancode-generic-cla",
"Apache-2.0"
] | permissive | MegEngine/MegEngine | 74c1c9b6022c858962caf7f27e6f65220739999f | 66b79160d35b2710c00befede0c3fd729109e474 | refs/heads/master | 2023-08-23T20:01:32.476848 | 2023-08-01T07:12:01 | 2023-08-11T06:04:12 | 248,175,118 | 5,697 | 585 | Apache-2.0 | 2023-07-19T05:11:07 | 2020-03-18T08:21:58 | C++ | UTF-8 | Python | false | false | 32,283 | py | test_tensor.py | # -*- coding: utf-8 -*-
import os
import platform
from typing import Tuple
import numpy as np
import pytest
from utils import get_var_value, make_tensor, opr_test
import megengine.functional as F
from megengine import Tensor
from megengine.core._imperative_rt.core2 import create_complex
from megengine.core._trace_opt... |
d55326a7676a41567a5e45b876039dd1dc120c60 | cde096ba977b63becc1b9066677331ef4594a797 | /csfieldguide/chapters/migrations/0006_chapter_number.py | 24ac6360c07eb778fbe7cf436b2862fb7bba6ba3 | [
"CC-BY-NC-SA-4.0",
"BSD-3-Clause",
"CC0-1.0",
"ISC",
"Unlicense",
"LicenseRef-scancode-secret-labs-2011",
"WTFPL",
"Apache-2.0",
"LGPL-3.0-only",
"MIT",
"CC-BY-SA-4.0",
"LicenseRef-scancode-public-domain",
"CC-BY-NC-2.5",
"LicenseRef-scancode-other-copyleft",
"LicenseRef-scancode-unknown... | permissive | uccser/cs-field-guide | 655524b161fab0ab422679dd80720f660f2cfa98 | ea3281ec6f4d17538f6d3cf6f88d74fa54581b34 | refs/heads/develop | 2023-08-28T14:33:58.789843 | 2023-08-28T08:24:03 | 2023-08-28T08:24:03 | 34,356,619 | 364 | 97 | MIT | 2023-09-14T08:58:55 | 2015-04-21T23:00:26 | JavaScript | UTF-8 | Python | false | false | 504 | py | 0006_chapter_number.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.7 on 2017-12-01 01:29
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('chapters', '0005_delete_interactive'),
]
operations = [
migrations.AddField... |
efb71d90b0b9f4ca50189d04f3b49f6f438e2efe | fbd2702e8c45d5e6cec39877295ef45f2f61d426 | /tests/test_expressions.py | 698366f503eb9e7ed56010abb8005a196805889a | [
"MIT"
] | permissive | pynamodb/PynamoDB | 365961a5cd7b2d7e924f8edf367dde641d00914a | 335c7cde6732c5121347207e60479d96e47338f6 | refs/heads/master | 2023-08-22T06:19:59.762796 | 2023-07-18T05:37:13 | 2023-07-18T05:37:13 | 16,058,979 | 1,987 | 412 | MIT | 2023-08-29T14:48:51 | 2014-01-20T02:18:35 | Python | UTF-8 | Python | false | false | 30,876 | py | test_expressions.py | from typing import Any
from typing import Dict
from unittest import TestCase
from pynamodb.attributes import ListAttribute, MapAttribute, NumberSetAttribute, UnicodeAttribute, UnicodeSetAttribute, \
NumberAttribute
from pynamodb.expressions.condition import Condition, size
from pynamodb.expressions.operand import ... |
56f937ba3b0b0f2c6789f7b035c7ab06752ee842 | d139ef8d18fcde584b06c1d7d25477d7d31ee59b | /google/ads/googleads/v14/resources/types/google_ads_field.py | 4b6069782ab5ad0aac6903f1d4a25c337ed7bfda | [
"Apache-2.0"
] | permissive | googleads/google-ads-python | a53993e6be057d3aa61f276b69e97b8b338d1c12 | 146d7070c1ea2140555d49d73c77892430b37314 | refs/heads/main | 2023-08-31T01:58:16.738997 | 2023-06-05T08:18:42 | 2023-08-28T19:08:38 | 143,435,091 | 422 | 525 | Apache-2.0 | 2023-09-12T17:46:52 | 2018-08-03T14:08:04 | Python | UTF-8 | Python | false | false | 6,179 | py | google_ads_field.py | # -*- coding: utf-8 -*-
# Copyright 2023 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... |
a3d80089ac2e850fa5304023e43ed71333948028 | 831c6ac1fa3253a5ef49b493ab211590d39e220e | /platforms/windows-64/SConscript | db11486675a8ace59bf23d2bd0a716e66fee53b4 | [
"MIT",
"CC-BY-3.0"
] | permissive | touilleMan/godot-python | a61bd686e929f62962b196243c0edf17b662271f | b9757da859a4d9fae86c330224881738d6b97392 | refs/heads/master | 2023-09-04T15:02:44.858077 | 2022-08-20T13:22:02 | 2022-08-20T13:22:02 | 69,164,674 | 1,766 | 168 | NOASSERTION | 2023-02-11T21:26:19 | 2016-09-25T13:03:54 | Python | UTF-8 | Python | false | false | 3,313 | SConscript | import zstandard
import tarfile
import json
import shutil
import subprocess
from pathlib import Path
Import("env")
cpython_build = Dir("cpython_build")
env["bits"] = "64"
env["godot_binary_download_platform"] = "win64.exe"
env["cpython_build"] = cpython_build
env["cpython_build_dir"] = cpython_build
env["DIST_SIT... | |
e21dcdf5810279381f2617911ce2aabb071f802a | b5ce6908490cfb8e6a1e1cbe4745d675122ddce0 | /questions/combination-sum-iv/Solution.py | 05f19a9f1046663685a097106615a806a5e3cc67 | [
"MIT"
] | permissive | franklingu/leetcode-solutions | 8895910f13208e1d8e604100d84c2dd35684cde4 | 7ad7e5c1c040510b7b7bd225ed4297054464dbc6 | refs/heads/master | 2023-01-09T01:34:08.097518 | 2023-01-02T02:05:35 | 2023-01-02T02:05:35 | 43,345,677 | 155 | 66 | MIT | 2020-10-02T03:41:36 | 2015-09-29T04:54:38 | Python | UTF-8 | Python | false | false | 1,283 | py | Solution.py | """
Given an integer array with all positive numbers and no duplicates, find the number of possible combinations that add up to a positive integer target.
Example:
nums = [1, 2, 3]
target = 4
The possible combination ways are:
(1, 1, 1, 1)
(1, 1, 2)
(1, 2, 1)
(1, 3)
(2, 1, 1)
(2, 2)
(3, 1)
Note that di... |
c4231224fbe39e55ae5f4d9c14f5a99dce586e43 | 4d6935a26f211987f54b980fe174971e4a1366e8 | /ddparser/run.py | d6f00f4ba03df25a047c4d9eb3f37d25a915d197 | [
"MIT",
"Apache-2.0"
] | permissive | baidu/DDParser | 17e6d7c653172a93a30caa5aa52c01264067d41a | 144c09bd058cea53810a45789812aa50aa0f711c | refs/heads/master | 2023-08-29T00:02:21.543273 | 2023-02-05T03:05:09 | 2023-02-05T03:05:57 | 284,605,403 | 946 | 165 | Apache-2.0 | 2022-10-29T16:12:08 | 2020-08-03T04:45:58 | Python | UTF-8 | Python | false | false | 20,002 | py | run.py | # -*- coding: UTF-8 -*-
################################################################################
#
# Copyright (c) 2020 Baidu, 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... |
cd570a27b8dc15900facf858ac100b50adc2f260 | 448dccb21fdd5be407d7202fefecb00a1b5ef65d | /cadquery/vis.py | 401ef94c3d6293d0fd3ac332443d43ec1342cf8a | [
"Apache-2.0"
] | permissive | CadQuery/cadquery | 6be365a29713f8ddef15da142e85910d2f965313 | e8d74474ca4869d014cba6e1f835cdabad86bf88 | refs/heads/master | 2023-08-28T06:23:43.229880 | 2023-08-21T16:54:37 | 2023-08-21T16:54:37 | 155,099,400 | 2,345 | 272 | NOASSERTION | 2023-09-09T21:21:52 | 2018-10-28T17:57:18 | Python | UTF-8 | Python | false | false | 2,888 | py | vis.py | from . import Shape, Workplane, Assembly, Sketch, Compound, Color
from .occ_impl.exporters.assembly import _vtkRenderWindow
from .occ_impl.jupyter_tools import DEFAULT_COLOR
from typing import Union
from OCP.TopoDS import TopoDS_Shape
from vtkmodules.vtkInteractionWidgets import vtkOrientationMarkerWidget
from vtkmo... |
35abbfde518ad23d420f268846a90c3b89503438 | 0c8ac66ae050e1a98dd8afd7525c9ed74ec5d300 | /config/settings/base.py | fda579e9752e4dc387901f87cb4b33541da6b38d | [] | no_license | TareqMonwer/Django-School-Management | 5b1c8145d04082063bc14fc9db1ce38b4db97a9d | 3d425d300a77ad505089a3a4c0a9dc71cacbe89a | refs/heads/master | 2023-08-19T23:36:34.359488 | 2023-08-13T05:53:42 | 2023-08-13T05:53:42 | 221,053,244 | 409 | 163 | null | 2023-08-13T05:53:44 | 2019-11-11T19:22:28 | JavaScript | UTF-8 | Python | false | false | 9,517 | py | base.py | import os
from pathlib import Path
import environ
import sentry_sdk
from sentry_sdk.integrations.django import DjangoIntegration
from django.core.exceptions import ImproperlyConfigured
from django.contrib.messages import constants as messages
from utilities.constants import settings_message_constants
#############... |
c9b1cce05b5c81ea7dc66f2f0c063733513302b6 | 391fb5b11425d59ea917c6fed51fe1fa9c672764 | /tests/opytimizer/optimizers/science/test_wwo.py | a0fb03596c61e38e5494dc3d8a1d3350e767bf3a | [
"Apache-2.0"
] | permissive | gugarosa/opytimizer | 89e60d582dee9e31b1723e35d08103d7f8f5d3e1 | 7326a887ed8e3858bc99c8815048d56d02edf88c | refs/heads/master | 2023-08-01T08:09:12.055317 | 2023-05-11T15:21:58 | 2023-05-11T15:21:58 | 109,152,650 | 602 | 45 | Apache-2.0 | 2023-09-07T14:26:13 | 2017-11-01T16:04:01 | Python | UTF-8 | Python | false | false | 3,451 | py | test_wwo.py | import numpy as np
from opytimizer.optimizers.science import wwo
from opytimizer.spaces import search
np.random.seed(0)
def test_wwo_params():
params = {"h_max": 5, "alpha": 1.001, "beta": 0.001, "k_max": 1}
new_wwo = wwo.WWO(params=params)
assert new_wwo.h_max == 5
assert new_wwo.alpha == 1.001
... |
04f64bda474a229148ed249d175902f4e78830a2 | 2d7b921f9f82268fdfa871d7087de5422c230c24 | /src/roles/harlot.py | d0a7be7b2692da095831f1e7b8a9329c13005b76 | [
"BSD-2-Clause"
] | permissive | lykoss/lykos | 11e01119d1d63e97b2c0fa35835accd3e4960365 | f4b52e0e5a31645d67bac7713c0b35c4308c50b9 | refs/heads/master | 2023-08-31T05:49:08.117378 | 2023-08-27T04:41:56 | 2023-08-27T04:41:56 | 16,919,993 | 128 | 103 | NOASSERTION | 2023-07-13T22:09:19 | 2014-02-17T17:02:57 | Python | UTF-8 | Python | false | false | 5,426 | py | harlot.py | from __future__ import annotations
import random
import re
from typing import Optional, Union
from src import users
from src.cats import Wolf
from src.containers import UserSet, UserDict
from src.decorators import command
from src.dispatcher import MessageDispatcher
from src.events import Event, event_listener
from s... |
f18c569758f070cbf22d50ad8e3ab5ffd5180fb0 | 1e528494a929deada984822438b3ab569762e6c6 | /rx/testing/mockdisposable.py | 4307a4ee0b375de5d308e00466d4b7b5ede038fa | [
"MIT"
] | permissive | Sprytile/Sprytile | a0233a00a243f263691921d7e1f6af05c5eb5442 | 6b68d0069aef5bfed6ab40d1d5a94a3382b41619 | refs/heads/master | 2022-07-10T06:54:01.003723 | 2020-09-26T07:25:35 | 2020-09-26T07:25:35 | 72,276,917 | 860 | 91 | MIT | 2022-07-07T23:37:19 | 2016-10-29T09:47:09 | Python | UTF-8 | Python | false | false | 299 | py | mockdisposable.py | from .reactive_assert import AssertList
class MockDisposable():
def __init__(self, scheduler):
self.scheduler = scheduler
self.disposes = AssertList()
self.disposes.append(self.scheduler.clock)
def dispose(self):
self.disposes.append(self.scheduler.clock)
|
bc9e6a1bdf6da52ffd2c2c835100a52d67d09595 | 5f21b3194ca63301ea9eaa22f7d46a11b4068ea2 | /iredis/__init__.py | 4b67c39d7e3b39d3ea20d65b8a3c081a50320293 | [
"BSD-3-Clause"
] | permissive | laixintao/iredis | f326b36bb21293d4ba7710d624d180924bb6cecd | 5d9832f7d18d098c6c763fd25f40d513c9db1738 | refs/heads/master | 2023-08-08T22:28:39.269150 | 2023-07-24T05:30:28 | 2023-07-24T05:30:28 | 166,371,259 | 2,455 | 131 | BSD-3-Clause | 2023-07-24T05:30:29 | 2019-01-18T08:31:15 | Python | UTF-8 | Python | false | false | 23 | py | __init__.py | __version__ = "1.13.1"
|
5a03c4e592404caafab87045b6037a4f5426c957 | afbae26b958b5ef20548402a65002dcc8e55b66a | /release/stubs.min/Autodesk/Revit/DB/__init___parts/PolylineSegments.py | 3bf33d71ff0d114ea28c4f7c411ff3e9a9ecdebf | [
"MIT"
] | permissive | gtalarico/ironpython-stubs | d875cb8932c7644f807dc6fde9dd513d159e4f5c | c7f6a6cb197e3949e40a4880a0b2a44e72d0a940 | refs/heads/master | 2023-07-12T01:43:47.295560 | 2022-05-23T18:12:06 | 2022-05-23T18:12:06 | 95,340,553 | 235 | 88 | NOASSERTION | 2023-07-05T06:36:28 | 2017-06-25T05:30:46 | Python | UTF-8 | Python | false | false | 2,604 | py | PolylineSegments.py | class PolylineSegments(object,IDisposable):
""" An output node that represents a tessellated polyline segments. """
def Dispose(self):
""" Dispose(self: PolylineSegments) """
pass
def GetVertices(self):
"""
GetVertices(self: PolylineSegments) -> IList[XYZ]
Returns an array of vertices of t... |
3999197948855f5952eca9705da1d2178f14f93a | 952dc66c61966f099756cdb6c2d13b40352f63cc | /puppet/zulip/files/nagios_plugins/zulip_app_frontend/check_queue_worker_errors | f7b83d6b1949e28db9e7af230ba75075c10e4d9a | [
"Apache-2.0",
"LicenseRef-scancode-free-unknown"
] | permissive | zulip/zulip | 5ae6aad35fd9f72996c0a2a9cdd674400966ebf6 | 965a25d91b6ee2db54038f5df855215fa25146b0 | refs/heads/main | 2023-08-28T23:43:00.971110 | 2023-08-28T16:47:09 | 2023-08-28T19:33:02 | 43,160,685 | 20,239 | 8,996 | Apache-2.0 | 2023-09-14T20:57:47 | 2015-09-25T16:37:25 | Python | UTF-8 | Python | false | false | 457 | check_queue_worker_errors | #!/usr/bin/env python3
"""
Nagios plugin to check that none of our queue workers have reported errors.
"""
import glob
import os
import sys
# settings.QUEUE_ERROR_DIR; not importing Django so that this can run
# as the nagios user.
wildcard = os.path.join("/var/log/zulip/queue_error", "*.errors")
clean = True
for fn ... | |
0223724403c931b04c866f37c8c65d7b5db3ab6e | b097b7caa954a0447bef9a7144e15fbc1b08a96b | /examples/hubert/evaluate.py | 55c58226a9c8a0d45219aa1f94a07455bdd07468 | [
"CC-BY-NC-4.0",
"BSD-2-Clause"
] | permissive | pytorch/audio | 3fa7006404020c9ce731f27b94f0257195d2efe3 | e057d7d144e2716588b80255f0a143662fd5c10d | refs/heads/main | 2023-09-03T15:46:06.918708 | 2023-09-02T00:39:15 | 2023-09-02T00:39:15 | 90,321,822 | 2,319 | 675 | BSD-2-Clause | 2023-09-13T22:09:20 | 2017-05-05T00:38:05 | Python | UTF-8 | Python | false | false | 6,462 | py | evaluate.py | import argparse
import logging
from typing import Dict, List
import torch
import torch.nn.functional as F
import torchaudio
from torchaudio.models.decoder import ctc_decoder, CTCDecoder, download_pretrained_files
from utils import _get_id2label
logger = logging.getLogger(__name__)
def _load_checkpoint(checkpoint: s... |
d3bfa5b311b3598ce09cc87a645c36ac253e0a04 | 8d3ec6437b83eb3d6f7176e6bd2a756848f6956b | /src/nsupdate/main/iptools.py | 9309afa7ad5664bc636dbf3d731a1897835a9948 | [
"BSD-3-Clause"
] | permissive | nsupdate-info/nsupdate.info | 4430c6b6a47a72d045f9a24ccf052cda004cee30 | a9df0ae0d5a7d8480142678bfd7d1834c90160a0 | refs/heads/master | 2023-09-05T09:24:24.562117 | 2023-08-28T19:40:15 | 2023-08-28T19:40:15 | 13,284,138 | 918 | 114 | NOASSERTION | 2023-09-05T12:26:02 | 2013-10-02T22:01:02 | Python | UTF-8 | Python | false | false | 636 | py | iptools.py | """
Misc. IP tools: normalize, handle mapped addresses
"""
from netaddr import IPAddress
def normalize_mapped_address(ipaddr):
"""
Converts a IPv4-mapped IPv6 address into a IPv4 address. Handles both the
::ffff:192.0.2.128 format as well as the deprecated ::192.0.2.128 format.
:param ipaddr: IP add... |
89b7c017b78f94764d52916d453384b9cb2dc34a | ec85250addb7357dfe7bb3e0680d53fc7b0fd8fb | /python_modules/dagster/dagster_tests/asset_defs_tests/asset_package/__init__.py | 0c14133ec993e946a1be608a83008ee7290db21a | [
"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 | 767 | py | __init__.py | from dagster import AssetKey, SourceAsset, asset
@asset
def little_richard():
pass
def make_list_of_assets():
# these assets are stashed inside a function so that they need to be discovered through
# a list
@asset
def james_brown():
pass
@asset
def fats_domino():
pass
... |
45048fcc9036d7f3ca2dcb0917fba3f95a8c14d7 | f74e34e1f308f2d453d66b4a531a88c44cfd4a5f | /fiducial_slam/scripts/move_origin.py | 0cb7b17eb352d8b40a6657bdafef0e79267f7c55 | [
"BSD-3-Clause"
] | permissive | UbiquityRobotics/fiducials | 40059bd4a3e3098dba18e3408ec84c638c39c43d | 6c09104dd183925549e73825d50123ba5339d258 | refs/heads/noetic-devel | 2023-01-06T19:04:33.108565 | 2022-09-23T20:37:23 | 2022-09-23T20:37:23 | 30,819,640 | 263 | 143 | BSD-3-Clause | 2022-11-17T12:20:13 | 2015-02-15T06:11:15 | C | UTF-8 | Python | false | false | 648 | py | move_origin.py | #!/usr/bin/python
"""
Move origin of fiducial co-ordinate system
"""
import numpy, sys, os
from fiducial_slam.map import Map
if __name__ == "__main__":
argc = len(sys.argv)
if argc != 4 and argc != 5:
print "Usage: %s x y z [file]" % sys.argv[0]
sys.exit(1)
offset = numpy.array([float(sys... |
251cc20cbcabc16ebc6ed19d563927f53738651a | f9d564f1aa83eca45872dab7fbaa26dd48210d08 | /huaweicloud-sdk-dds/huaweicloudsdkdds/v3/model/recycle_instance.py | 8f495c2566c86db0733490324b1e57b98684bf87 | [
"Apache-2.0"
] | permissive | huaweicloud/huaweicloud-sdk-python-v3 | cde6d849ce5b1de05ac5ebfd6153f27803837d84 | f69344c1dadb79067746ddf9bfde4bddc18d5ecf | refs/heads/master | 2023-09-01T19:29:43.013318 | 2023-08-31T08:28:59 | 2023-08-31T08:28:59 | 262,207,814 | 103 | 44 | NOASSERTION | 2023-06-22T14:50:48 | 2020-05-08T02:28:43 | Python | UTF-8 | Python | false | false | 10,792 | py | recycle_instance.py | # coding: utf-8
import six
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
class RecycleInstance:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute na... |
57319f356674a0580e608ec6b895595890192554 | a3d6556180e74af7b555f8d47d3fea55b94bcbda | /weblayer/browser/safe_browsing/DEPS | 031570e0746cfbfc1b689d7ea1385f89ed01d18b | [
"BSD-3-Clause"
] | permissive | chromium/chromium | aaa9eda10115b50b0616d2f1aed5ef35d1d779d6 | a401d6cf4f7bf0e2d2e964c512ebb923c3d8832c | refs/heads/main | 2023-08-24T00:35:12.585945 | 2023-08-23T22:01:11 | 2023-08-23T22:01:11 | 120,360,765 | 17,408 | 7,102 | BSD-3-Clause | 2023-09-10T23:44:27 | 2018-02-05T20:55:32 | null | UTF-8 | Python | false | false | 141 | DEPS | include_rules = [
"+components/safe_browsing/content/browser",
"+components/safe_browsing/content/common",
"+services/network/test",
]
| |
f5c577714b2ca640617169c3d0a2d6467493c93c | 7d60cde80c322ff41b233967456f9a5b9f938d16 | /sqlalchemy/orm-6-joins.py | 861866cc3ba5939bfa4f2d091dccbdde0ea24547 | [] | no_license | besnik/tutorials | e8a9f9a0a6709f69746b51f5a5bdc3c7520c49d5 | 600494b7296854f873aac7b9ff3c4cc23be7d989 | refs/heads/master | 2020-05-21T20:28:21.944713 | 2020-03-28T07:25:14 | 2020-03-28T07:25:14 | 65,710,896 | 113 | 39 | null | 2017-03-07T19:13:13 | 2016-08-15T06:47:56 | Python | UTF-8 | Python | false | false | 3,623 | py | orm-6-joins.py | from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import Column, Integer, String
# Base
Base = declarative_base()
# Concrete type
class User(Base):
__tablename__ = "user"
id = Column(Integer, primary_key=True)
name = Column(String)
def __repr__(self):
return "<User(id:... |
13bcc19a509d5d4c73d250a508a03c69bde9212e | 4cccbd59c06b10f3bbe1d5e8c3082c8b0c9a8145 | /edb/server/protocol/auth_ext/data.py | e713d5a7146323725af8731e750e4e2f5158f25f | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | edgedb/edgedb | ff26656ee449208b88ae85a6ad9823fce4f2ecad | 4d614ce5de15e0b08575b0bf6738ece02c516ded | refs/heads/master | 2023-09-05T07:10:05.409260 | 2023-09-01T23:20:13 | 2023-09-01T23:20:13 | 95,817,032 | 11,683 | 404 | Apache-2.0 | 2023-09-14T17:25:49 | 2017-06-29T20:30:48 | Python | UTF-8 | Python | false | false | 2,059 | py | data.py | #
# This source file is part of the EdgeDB open source project.
#
# Copyright 2016-present MagicStack Inc. and the EdgeDB 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... |
edd0128e167ee91824904ea48d5f88b634106bf6 | 7d571b303508d302bf22e4fba3e19044af309fb8 | /batchflow/run_notebook.py | 436ade8df27c0ca518b26959da055e7410ae7914 | [
"Apache-2.0"
] | permissive | analysiscenter/batchflow | 0a62943836ff41c24274118c410af763750b490b | bcc2c723976cb5780d7b2876f2c2df74c186d343 | refs/heads/master | 2023-09-01T08:29:06.906776 | 2023-08-23T14:11:03 | 2023-08-23T14:11:03 | 84,835,419 | 110 | 42 | Apache-2.0 | 2023-09-08T10:25:34 | 2017-03-13T14:22:53 | Python | UTF-8 | Python | false | false | 10,615 | py | run_notebook.py | """ Utility functions for running Jupyter Notebooks."""
import os
import time
def run_notebook(path, inputs=None, outputs=None, inputs_pos=1, out_path_db=None, execute_kwargs=None,
out_path_ipynb=None, out_path_html=None, add_timestamp=True, hide_code_cells=False, display_links=True,
... |
1bb431dbee6001d1761a9cb491f279ee5391131d | 73a0f661f1423d63e86489d4b2673f0103698aab | /python/oneflow/test/modules/test_higher_derivative_slice.py | c06842c02c5e1e15c04664a43250647fb7d380c8 | [
"Apache-2.0"
] | permissive | Oneflow-Inc/oneflow | 4fc3e081e45db0242a465c4330d8bcc8b21ee924 | 0aab78ea24d4b1c784c30c57d33ec69fe5605e4a | refs/heads/master | 2023-08-25T16:58:30.576596 | 2023-08-22T14:15:46 | 2023-08-22T14:15:46 | 81,634,683 | 5,495 | 786 | Apache-2.0 | 2023-09-14T09:44:31 | 2017-02-11T06:09:53 | C++ | UTF-8 | Python | false | false | 2,288 | py | test_higher_derivative_slice.py | """
Copyright 2020 The OneFlow Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agr... |
a2369fea8d42797ae48d2b3ac1a387f16f09d63b | a0447b03ad89a41a5c2e2073e32aeaf4d6279340 | /ironic/drivers/modules/redfish/firmware_utils.py | feeec2df23b5fb821f9e2edbcd9b8820b4fc4b5b | [
"Apache-2.0"
] | permissive | openstack/ironic | 2ae87e36d7a62d44b7ed62cad4e2e294d48e061b | ab76ff12e1c3c2208455e917f1a40d4000b4e990 | refs/heads/master | 2023-08-31T11:08:34.486456 | 2023-08-31T04:45:05 | 2023-08-31T04:45:05 | 10,066,301 | 411 | 365 | Apache-2.0 | 2023-07-25T02:05:53 | 2013-05-14T22:28:24 | Python | UTF-8 | Python | false | false | 10,767 | py | firmware_utils.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
# ... |
9452f475137fe8d7cbcad999a67b96554872b28c | b728c792b5171f6be6ad91919b4a76a6f198b3e9 | /src/lib/python/bundy/util/cio/__init__.py | 935160a7ee10e012622b3d37df1632e9e38d31a6 | [
"LicenseRef-scancode-unknown-license-reference",
"ISC",
"BSL-1.0"
] | permissive | bundy-dns/bundy | c8beeca2c051924590794c92a3a58d1980a86024 | 3d41934996b82b0cd2fe22dd74d2abc1daba835d | refs/heads/master | 2021-09-28T16:24:39.037808 | 2021-09-22T06:04:17 | 2021-09-22T06:04:17 | 19,160,469 | 110 | 33 | NOASSERTION | 2021-09-22T06:04:18 | 2014-04-25T20:54:37 | C++ | UTF-8 | Python | false | false | 88 | py | __init__.py | """
Here are function and classes for forwarding socket sessions between processes.
"""
|
f3061407c826cdc3a18800d76611a4094caa6dac | 96dcea595e7c16cec07b3f649afd65f3660a0bad | /homeassistant/components/recorder/table_managers/recorder_runs.py | 455c8375b1cf043b7a24f687fcbff94f30295ed2 | [
"Apache-2.0"
] | permissive | home-assistant/core | 3455eac2e9d925c92d30178643b1aaccf3a6484f | 80caeafcb5b6e2f9da192d0ea6dd1a5b8244b743 | refs/heads/dev | 2023-08-31T15:41:06.299469 | 2023-08-31T14:50:53 | 2023-08-31T14:50:53 | 12,888,993 | 35,501 | 20,617 | Apache-2.0 | 2023-09-14T21:50:15 | 2013-09-17T07:29:48 | Python | UTF-8 | Python | false | false | 5,031 | py | recorder_runs.py | """Track recorder run history."""
from __future__ import annotations
import bisect
from dataclasses import dataclass
from datetime import datetime
from sqlalchemy.orm.session import Session
import homeassistant.util.dt as dt_util
from ..db_schema import RecorderRuns
from ..models import process_timestamp
def _fin... |
d59be39c9409831bc132f879d3b880b3339c1805 | fa1ad2e2ac7e376fc7cb3b3a6e1bb88eed3e80be | /olap/doris/extension/dbt-doris/dbt/include/doris/profile_template.yml | 1e62e6de94a9dd238107cb8926df19d8b76544f5 | [
"OpenSSL",
"Apache-2.0",
"BSD-3-Clause",
"LicenseRef-scancode-facebook-patent-rights-2",
"PSF-2.0",
"dtoa",
"MIT",
"GPL-2.0-only",
"LicenseRef-scancode-public-domain"
] | permissive | alldatacenter/alldata | 7bc7713c9f1d56ad6b8e59ea03206d1073b7e047 | 8d5f9a2d49ab8f9e85ccf058cb02c2fda287afc6 | refs/heads/master | 2023-08-05T07:32:25.442740 | 2023-08-03T13:17:24 | 2023-08-03T13:17:24 | 213,321,771 | 774 | 250 | Apache-2.0 | 2023-09-06T17:35:32 | 2019-10-07T07:36:18 | null | UTF-8 | Python | false | false | 1,386 | yml | profile_template.yml | #!/usr/bin/env python
# encoding: utf-8
# 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, Ver... |
11b374bff1a583893023a8bb12380f3db840e151 | fbe68d84e97262d6d26dd65c704a7b50af2b3943 | /third_party/virtualbox/src/VBox/ValidationKit/testboxscript/win/fix_stale_refs.py | 5a17161df45401e78cbd3d68d771ae8fce9483b7 | [
"MIT",
"GPL-2.0-only",
"LicenseRef-scancode-unknown-license-reference",
"CDDL-1.0",
"LicenseRef-scancode-warranty-disclaimer",
"GPL-1.0-or-later",
"LGPL-2.1-or-later",
"GPL-2.0-or-later",
"MPL-1.0",
"LicenseRef-scancode-generic-exception",
"Apache-2.0",
"OpenSSL"
] | permissive | thalium/icebox | c4e6573f2b4f0973b6c7bb0bf068fe9e795fdcfb | 6f78952d58da52ea4f0e55b2ab297f28e80c1160 | refs/heads/master | 2022-08-14T00:19:36.984579 | 2022-02-22T13:10:31 | 2022-02-22T13:10:31 | 190,019,914 | 585 | 109 | MIT | 2022-01-13T20:58:15 | 2019-06-03T14:18:12 | C++ | UTF-8 | Python | false | false | 6,098 | py | fix_stale_refs.py | # -*- coding: utf-8 -*-
# $Id: fix_stale_refs.py $
"""
This module must be used interactively!
Use with caution as it will delete some values from the regisry!
It tries to locate client references to products that no longer exist.
"""
__copyright__ = \
"""
Copyright (C) 2012-2017 Oracle Corporation
This file is par... |
951088bc16807a0a5243b515d7c5c7c854599ada | b06437eddb77e6d4fb6a4196295fce08845874b0 | /packages/python-google-compute-engine/google_compute_engine/distro_lib/helpers.py | c20b24198587048ebb44419e18d13a9f6c793f71 | [
"Apache-2.0",
"LicenseRef-scancode-generic-cla"
] | permissive | GoogleCloudPlatform/compute-image-packages | 0601abba643dd95d7ae730994bf92dbecae2a2c7 | cf4b33214f770da2299923a5fa73d3d95f66ec35 | refs/heads/master | 2023-08-11T18:26:53.981415 | 2021-10-28T19:42:19 | 2021-10-28T19:42:19 | 11,852,493 | 329 | 220 | Apache-2.0 | 2021-03-30T18:03:34 | 2013-08-02T20:52:04 | Python | UTF-8 | Python | false | false | 5,922 | py | helpers.py | #!/usr/bin/python
# Copyright 2018 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... |
992bfe4a9d23f9389807ee2fe97f124c465ffc9b | bd2cef65bfaad1d7a3b675c26d8fa9010611bb97 | /core/friendly_organizer.py | 6c3d4e8bf31faec892c2813281455b168e5527aa | [] | no_license | nyu-mlab/iot-inspector-client | 44310d94abe803cc1c8bc1fb5c524e83ddb71105 | 7eba33c62f74fdf842dbefbda3db56ba7f0eb135 | refs/heads/master | 2023-08-31T01:53:25.305641 | 2023-08-24T18:28:55 | 2023-08-24T18:28:55 | 158,865,806 | 101 | 24 | null | 2023-09-11T10:27:14 | 2018-11-23T18:23:07 | Python | UTF-8 | Python | false | false | 9,735 | py | friendly_organizer.py | """
Add friendly names to entities.
"""
import core.model as model
import core.common as common
import core.global_state as global_state
import core.networking as networking
import core.config as config
import core.anonymization as anonymization
from core.oui_parser import get_vendor
from core.ttl_cache import ttl_cac... |
889b61372e44b3f3e131f6b5aae8f7d1690ff62d | cde096ba977b63becc1b9066677331ef4594a797 | /csfieldguide/tests/chapters/loaders/test_chapter_sections_loader.py | cff76b39715de194d335e1845d67c0919ce7b093 | [
"CC-BY-NC-SA-4.0",
"BSD-3-Clause",
"CC0-1.0",
"ISC",
"Unlicense",
"LicenseRef-scancode-secret-labs-2011",
"WTFPL",
"Apache-2.0",
"LGPL-3.0-only",
"MIT",
"CC-BY-SA-4.0",
"LicenseRef-scancode-public-domain",
"CC-BY-NC-2.5",
"LicenseRef-scancode-other-copyleft",
"LicenseRef-scancode-unknown... | permissive | uccser/cs-field-guide | 655524b161fab0ab422679dd80720f660f2cfa98 | ea3281ec6f4d17538f6d3cf6f88d74fa54581b34 | refs/heads/develop | 2023-08-28T14:33:58.789843 | 2023-08-28T08:24:03 | 2023-08-28T08:24:03 | 34,356,619 | 364 | 97 | MIT | 2023-09-14T08:58:55 | 2015-04-21T23:00:26 | JavaScript | UTF-8 | Python | false | false | 11,744 | py | test_chapter_sections_loader.py | import os.path
from unittest import mock
from tests.BaseTestWithDB import BaseTestWithDB
from tests.chapters.ChaptersTestDataGenerator import ChaptersTestDataGenerator
from tests.interactives.InteractivesTestDataGenerator import InteractivesTestDataGenerator
from chapters.management.commands._ChapterSectionsLoader impo... |
eb1cb8f1cf6a06ecc37ceaca94c160ae830a3e81 | 21800ee29401e359877efa834dee08fe175cfd06 | /panostretch.py | 97f5efd813819cc537e497e402b3298cc02d2fd9 | [
"MIT"
] | permissive | zouchuhang/LayoutNetv2 | 7050fdcf899d54a85102cd8d1851fa47c9d1677b | 74002f8d4535534f24d0ac44520d66b0283c0bad | refs/heads/master | 2021-11-24T02:43:22.587330 | 2021-11-18T19:16:45 | 2021-11-18T19:16:45 | 199,546,402 | 207 | 36 | null | null | null | null | UTF-8 | Python | false | false | 6,044 | py | panostretch.py | import functools
import numpy as np
from scipy.ndimage import map_coordinates
def uv_meshgrid(w, h):
uv = np.stack(np.meshgrid(range(w), range(h)), axis=-1)
uv = uv.astype(np.float64)
uv[..., 0] = ((uv[..., 0] + 0.5) / w - 0.5) * 2 * np.pi
uv[..., 1] = ((uv[..., 1] + 0.5) / h - 0.5) * np.pi
return... |
2c1d1c66690c635b6808855b42e743f8889ded3f | 50dd46b8ece33f3cdd174284b15d1d51f89669d4 | /2018/finals/re-drm/validator/hash_asparagus.py | 4a1d95d154648ea47f80e169fcd9dfd0f2a67bbd | [
"LicenseRef-scancode-generic-cla",
"Apache-2.0"
] | permissive | google/google-ctf | f99da1ee07729bbccb869fff1cbaed6a80e43bcc | df02323eaf945d15e124801c74abaadca2749dc7 | refs/heads/master | 2023-08-31T14:30:27.548081 | 2023-08-29T13:04:20 | 2023-08-29T13:04:20 | 131,317,137 | 4,136 | 607 | Apache-2.0 | 2023-08-30T22:17:02 | 2018-04-27T15:56:03 | Go | UTF-8 | Python | false | false | 3,373 | py | hash_asparagus.py | #!/usr/bin/python
#
# Copyright 2018 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 ag... |
2b72900f1815d99fe13e9eee61e2751c34c8b0f8 | 82a7c9ae5392d847df4b01ae864c81bd14caab74 | /users/models.py | c113aca796eab9b49c13bb32d533418f96f0e99c | [
"MIT"
] | permissive | DjangoChinaOrg/Django-China-API | d4ab9be99d94d74f9f5f93620ea6d062d4fa18a6 | 79a5d85fe88ba7784d08d370b8e7519f7274f208 | refs/heads/dev | 2021-07-23T17:37:59.471725 | 2018-11-08T09:55:03 | 2018-11-08T09:55:03 | 122,849,421 | 190 | 52 | MIT | 2018-10-13T12:18:09 | 2018-02-25T15:37:58 | Python | UTF-8 | Python | false | false | 2,117 | py | models.py | import os
from django.core.files.base import ContentFile
from django.contrib.auth.models import AbstractUser
from django.contrib.auth.signals import user_logged_in
from django.db import models
from .mugshot import Avatar
from .utils import get_ip_address_from_request
def user_mugshot_path(instance, filename):
r... |
fca474ec43d169fa6aa9c699eb1bb64f42690802 | 2a1b8a671aceda6bc446f8ce26400aa84fa444a6 | /Packs/Pipl/Scripts/CheckSender/CheckSender_test.py | 3a5cfd69380084b10c5c8bf9a73615d32101664c | [
"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 | 1,109 | py | CheckSender_test.py | from CheckSender import get_sender_from_text, format_data
def test_get_sender_from_text():
"""
Given:
- Text with email address.
When:
- Running the get_sender_from_text function.
Then:
- Validating the sender email is correct.
"""
sender = get_sender_from_text('from: t... |
f0af48e1b30edb9d4be3bb0d8468f01a4144236d | 59bb398c5f23770e4725f35f932f3a5fd013efae | /jwst/residual_fringe/residual_fringe_step.py | a422f3c69e37bb0d3085d5f84c064cea40fa83b5 | [
"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 | 5,109 | py | residual_fringe_step.py | #! /usr/bin/env python
from stdatamodels.jwst import datamodels
from ..stpipe import Step
from . import residual_fringe
from functools import partial
__all__ = ["ResidualFringeStep"]
class ResidualFringeStep(Step):
"""
ResidualFringeStep: Apply residual fringe correction to a science image
using paramet... |
d5197bb74f7e6c581efc946fe09059d973f8d924 | ccb4cb8358fb896a88bbf0c6771462d898d7a492 | /skyfield/naifcodes.py | 08de5dc64081da58a42d3fa53f19ae6461e418ad | [
"MIT"
] | permissive | skyfielders/python-skyfield | a30d34a680dcd285bc8cd39cedc2629f792d5821 | 61fb6324e312715e20aa75ec24dc87286442be1a | refs/heads/master | 2023-08-31T13:10:32.863587 | 2023-08-10T14:25:56 | 2023-08-10T14:25:56 | 7,924,113 | 1,040 | 204 | MIT | 2023-08-28T19:44:50 | 2013-01-30T21:19:21 | Python | UTF-8 | Python | false | false | 797 | py | naifcodes.py | from jplephem.names import (
target_name_pairs as code_name_pairs,
target_names as code_names
)
name_codes = dict((name, code) for code, name in code_name_pairs)
def numbered_name_of(code):
"""Given a code, return a string giving both the code and name.
>>> numbered_name_of(301)
'301 Moon'
"... |
cbc6a7ff60b0e7ac1a96e61852c83966853c524c | 07c27d72f10dbf64c11b6d6cae83d4dc757a2384 | /tests/pbxsections/TestPBXCopyFilesBuildPhase.py | a683cf5c57f584a076e598cf5b5df86b8f37a851 | [
"MIT"
] | permissive | kronenthaler/mod-pbxproj | a481cded65a4f082338c1c8b290aa3382124b6ce | e0c42005cdcee3b10522ba5709f4228ec10c049c | refs/heads/master | 2023-06-09T03:12:32.120613 | 2022-10-04T12:14:11 | 2022-10-04T12:14:11 | 8,949,989 | 1,089 | 278 | MIT | 2023-01-09T10:50:43 | 2013-03-22T10:50:15 | Python | UTF-8 | Python | false | false | 446 | py | TestPBXCopyFilesBuildPhase.py | import unittest
from pbxproj.pbxsections.PBXCopyFilesBuildPhase import PBXCopyFilesBuildPhase
class PBXCopyFilesBuildPhaseTest(unittest.TestCase):
def testGetComment(self):
phase = PBXCopyFilesBuildPhase()
self.assertEqual(phase._get_comment(), "CopyFiles")
def testGetCommentFromParent(self)... |
98692834263b40517c502ddef7617ae937e4a985 | f7e0780b4d73ebf6e50fe4053c01fd3cc4d6b227 | /auctioning_platform/auctions/auctions/application/repositories/__init__.py | 21cd12bce44f5828c90ecac831edf6bfcf29fae8 | [
"MIT"
] | permissive | Enforcer/clean-architecture | 78d663585f913c51a0460bcafa4af35515cdf549 | f0c1c0a8364996d309e7381b44933807529200b1 | refs/heads/master | 2023-02-20T01:40:24.653512 | 2022-08-02T20:59:03 | 2022-08-02T20:59:03 | 208,138,785 | 454 | 51 | MIT | 2023-02-16T01:31:26 | 2019-09-12T20:16:08 | Python | UTF-8 | Python | false | false | 108 | py | __init__.py | __all__ = ["AuctionsRepository"]
from auctions.application.repositories.auctions import AuctionsRepository
|
e9f0ce4e2e6103bb7a28224181ede025518d2b3d | b3cde44e48d293d94b612a34506e03feb2ab7fcc | /src/python/fsqio/pants/tags/validate.py | 8e40208ecdb863b87fa404fabc515720dbbed29e | [
"Apache-2.0"
] | permissive | foursquare/fsqio | 0cfd51e71d572f9f5682c03fdaba7c79ffff6785 | f5a5699c18babaa6810de84bcc6dd1522bcfe259 | refs/heads/master | 2022-08-10T10:29:28.004139 | 2022-06-28T22:42:39 | 2022-06-28T22:42:39 | 48,192,426 | 267 | 66 | Apache-2.0 | 2022-06-28T22:42:40 | 2015-12-17T18:53:44 | Scala | UTF-8 | Python | false | false | 8,054 | py | validate.py | # coding=utf-8
# Copyright 2013 Foursquare Labs Inc. All Rights Reserved.
from __future__ import absolute_import, division, print_function
from hashlib import sha1
import os
import textwrap
from pants.base.exceptions import TaskError
from pants.base.fingerprint_strategy import FingerprintStrategy
from pants.task.tas... |
bbda5458c7c6d1f9f7cfc1bb83b79b0346dedc6c | bb12da8a0d637b68255b04b182fdd47558bec12e | /tests/test_eyaml_eyamlprocessor.py | 150749df92e90efd95520ce93f36d5cb8e691af1 | [
"ISC"
] | permissive | wwkimball/yamlpath | 03f1dffc0c5d5208d43fca33578de9ad0074c395 | be7af7de60e920659b535aaae39046e84c85c248 | refs/heads/master | 2023-08-25T07:42:53.174510 | 2023-03-30T22:32:16 | 2023-03-30T22:32:16 | 184,194,939 | 102 | 20 | ISC | 2023-03-30T22:32:17 | 2019-04-30T05:05:17 | Python | UTF-8 | Python | false | false | 12,201 | py | test_eyaml_eyamlprocessor.py | import pytest
from subprocess import run, CalledProcessError
from ruamel.yaml import YAML
from yamlpath.func import unwrap_node_coords
from yamlpath.enums import YAMLValueFormats
from yamlpath.eyaml.enums import EYAMLOutputFormats
from yamlpath.eyaml import EYAMLProcessor
from yamlpath.wrappers import ConsolePrinter... |
969e09d079505ff4a84fff3ff9347497a60aea81 | e9ee565cfff9e6b2a1ea6f73368f4a8948274795 | /src/pybel/io/line_utils.py | b33d8ea6eef8583d3a519fc53c2767c4154e4769 | [
"MIT"
] | permissive | pybel/pybel | 7e79530b454e23ae48486a5c0e3207744b7fa139 | ed66f013a77f9cbc513892b0dad1025b8f68bb46 | refs/heads/master | 2022-08-26T18:41:25.724850 | 2022-02-11T12:22:35 | 2022-02-11T12:22:35 | 68,376,693 | 133 | 40 | MIT | 2022-02-11T12:11:24 | 2016-09-16T12:09:49 | Python | UTF-8 | Python | false | false | 11,090 | py | line_utils.py | # -*- coding: utf-8 -*-
"""This module contains helper functions for reading BEL scripts."""
import logging
import os
import re
import time
from typing import Any, Iterable, List, Mapping, Optional, Tuple
from bel_resources import ResourceError, split_file_to_annotations_and_definitions
from pyparsing import ParseEx... |
756effc61738a99f933fd7b70642c529e2bea1e9 | e75c5412063078c9ea3e7c71a8dc7a2026083a34 | /astropy/table/tests/conftest.py | a888d9222a18ab899d11f9db5a271ebe3f0aa9c4 | [
"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 | 7,690 | py | conftest.py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
All of the pytest fixtures used by astropy.table are defined here.
`conftest.py` is a "special" module name for pytest that is always
imported, but is not looked in for tests, and it is the recommended
place to put fixtures that are shared between mod... |
274c678dcfe33ced8748712cc6c34d69d56eb291 | c46754b9600a12df4f9d7a6320dfc19aa96b1e1d | /tests/models/auto/test_modeling_tf_auto.py | c8754ca42702fc07482c393e6f5083bf3ff7cfba | [
"Apache-2.0"
] | permissive | huggingface/transformers | ccd52a0d7c59e5f13205f32fd96f55743ebc8814 | 4fa0aff21ee083d0197a898cdf17ff476fae2ac3 | refs/heads/main | 2023-09-05T19:47:38.981127 | 2023-09-05T19:21:33 | 2023-09-05T19:21:33 | 155,220,641 | 102,193 | 22,284 | Apache-2.0 | 2023-09-14T20:44:49 | 2018-10-29T13:56:00 | Python | UTF-8 | Python | false | false | 13,164 | py | test_modeling_tf_auto.py | # coding=utf-8
# Copyright 2020 The HuggingFace Team. 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 requir... |
1dd16a6c44e6509c31d623fb400ff7bb88e886a1 | 96dcea595e7c16cec07b3f649afd65f3660a0bad | /homeassistant/components/home_connect/switch.py | 61dd11dbc6f248c892f9eed1f942361f49192b48 | [
"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 | 6,024 | py | switch.py | """Provides a switch for Home Connect."""
import logging
from typing import Any
from homeconnect.api import HomeConnectError
from homeassistant.components.switch import SwitchEntity
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_DEVICE, CONF_ENTITIES
from homeassistant.core ... |
6bad3e27e2536a83572d834ddc4a32b5e1a14c7d | 578db86c51d44ebddd0dc7b1738985b3dc69eb74 | /corehq/apps/hqadmin/urls.py | dcb3fef66c3bd4308691b2c2d5130108a3f9a736 | [
"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 | 3,629 | py | urls.py | from django.conf.urls import include, re_path as url
from corehq.apps.api.urls import admin_urlpatterns as admin_api_urlpatterns
from corehq.apps.domain.views.tombstone import TombstoneManagement, create_tombstone
from corehq.apps.hqadmin.views.data import doc_in_es, download_blob, raw_doc
from corehq.apps.hqadmin.vie... |
a8d4dedd161d9e0a036ce0ed9c3cafd70d5c4d27 | 3257372291236aac1737b057c9ac6c61da9ccca0 | /tutorials/W0D3_LinearAlgebra/solutions/W0D3_Tutorial1_Solution_b89ad2ef.py | 14f3bd4d630901803f32927f70feaea19936b55c | [
"CC-BY-4.0",
"BSD-3-Clause",
"MIT"
] | permissive | NeuromatchAcademy/precourse | 230ead0d11ae7b0dba21c8df97695a1796e9797d | b7f2432c6a68a7984ca923ceed8e07d5cfdb77c3 | refs/heads/main | 2023-07-26T11:18:24.493966 | 2023-07-09T14:42:49 | 2023-07-09T14:42:49 | 256,327,558 | 639 | 174 | MIT | 2023-07-09T14:42:50 | 2020-04-16T20:54:03 | Jupyter Notebook | UTF-8 | Python | false | false | 546 | py | W0D3_Tutorial1_Solution_b89ad2ef.py |
"""
1) They are linearly dependent as one can be formed as a linear combination of
the others (a + b = c). You could also have known this because you have four
3D vectors. You don't need 4 vectors to get anywhere in 3D space!
2) The span of a, b, c, and d is all of 3D space (R^3).
3) The span of a, b... |
5fa8052413b1ef4a3330828dead0fa1f9fd56c4f | 993f18c21402d7a4ff21ddb7ff2ec6c80e466f20 | /onnx/backend/test/case/node/det.py | 9b28320eff557d8ad0c95af83ae960fe3b0e93a4 | [
"Apache-2.0"
] | permissive | onnx/onnx | 10d3916803c7babff89ec0fa9045127bcccad376 | 8a475b34cb3875df311a46f57571646498f5bda7 | refs/heads/main | 2023-08-18T18:50:03.388353 | 2023-08-16T22:18:46 | 2023-08-16T22:18:46 | 102,692,863 | 16,164 | 4,150 | Apache-2.0 | 2023-09-14T17:10:38 | 2017-09-07T04:53:45 | Python | UTF-8 | Python | false | false | 975 | py | det.py | # Copyright (c) ONNX Project Contributors
#
# SPDX-License-Identifier: Apache-2.0
import numpy as np
import onnx
from onnx.backend.test.case.base import Base
from onnx.backend.test.case.node import expect
class Det(Base):
@staticmethod
def export_2d() -> None:
node = onnx.helper.make_node(
... |
03a1323a0e4894fc33fa2ac1d88cb69cbb5e8fae | cadb6dceb7bb67ce47ef48b2c83f480a65d6b01a | /s3prl/problem/superb/ks.py | 2d0bf71457c691a90d3c809a8d6fdbb325362be0 | [
"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 | 2,987 | py | ks.py | from s3prl import Container
from s3prl.corpus.speech_commands import gsc_v1_for_superb
from s3prl.dataset.utterance_classification_pipe import UtteranceClassificationPipe
from s3prl.nn import MeanPoolingLinear
from s3prl.sampler import BalancedWeightedSampler, FixedBatchSizeBatchSampler
from s3prl.task.utterance_classi... |
5932013716c9b33959771252d3dfa6a715a5bbe8 | 681ee1b3339a394a7a8c1dcab4529fbf371975d3 | /tasks/__behave.py | 1c98389b02ab680c1b733d52758fe080860941f5 | [
"BSD-2-Clause"
] | permissive | behave/behave | 0c26624d48a8a3e8dce53e792cf6a71fabd4a79a | 1c6197b35c15e07b5bae62b3131a98f9caa88f4e | refs/heads/main | 2023-08-31T13:23:37.644488 | 2023-07-31T20:06:53 | 2023-07-31T20:11:27 | 2,642,784 | 2,744 | 665 | NOASSERTION | 2023-09-01T19:32:05 | 2011-10-25T11:02:35 | Python | UTF-8 | Python | false | false | 1,479 | py | __behave.py | # -*- coding: UTF-8 -*-
"""
Invoke build script (python based).
.. seealso:: https://github.com/pyinvoke/invoke
"""
from __future__ import print_function
import sys
from invoke import task, Collection
# USE_PTY = os.isatty(sys.stdout)
USE_PTY = sys.stdout.isatty()
# -------------------------------------------------... |
5b674f65a4d3596eba97516113fc4893f142c2d0 | d8a5893ed1c75f4da55ca904b9f61ca2690f1caf | /databricks_cli/jobs/api.py | 9e64071cb9a5455d0ed2ba36aae14b7b0b7f0e03 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | databricks/databricks-cli | 082718a7729c67160a316cae76d687bdcde49ccd | 9bb7f5b0e3da5d6386b0ca89bfbe68c942d8298c | refs/heads/main | 2023-08-31T10:14:17.970777 | 2023-07-05T11:09:13 | 2023-07-05T11:09:13 | 93,211,371 | 375 | 270 | NOASSERTION | 2023-08-08T19:45:28 | 2017-06-02T23:38:47 | Python | UTF-8 | Python | false | false | 3,069 | py | api.py | # Databricks CLI
# Copyright 2017 Databricks, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"), except
# that the use of services to which certain application programming
# interfaces (each, an "API") connect requires that the user first obtain
# a license for the use of the APIs from Databricks,... |
4189e4b9175e3a001cca7fbe0afcd5d09d36e182 | 2b9f0e11bca4cbaad224654884cac1e50667d7d5 | /egs/dns_challenge/baseline/eval_on_synthetic.py | eaf91752ff5c2847111979deee403726038c1f31 | [
"MIT"
] | permissive | asteroid-team/asteroid | 6dcfe6bc1571c7cc92dbab49962b002bab195c25 | cd5b35d84381f325ad5f4bee861d8cb26ba7dae9 | refs/heads/master | 2023-08-22T19:18:14.649055 | 2023-07-19T11:38:26 | 2023-07-19T11:38:26 | 215,969,476 | 1,284 | 278 | MIT | 2023-09-12T07:09:36 | 2019-10-18T07:48:15 | Python | UTF-8 | Python | false | false | 5,569 | py | eval_on_synthetic.py | import glob
import os
import random
import soundfile as sf
import torch
import yaml
import json
import argparse
import pandas as pd
from tqdm import tqdm
from pprint import pprint
from asteroid.metrics import get_metrics
from model import load_best_model
from local.preprocess_dns import make_wav_id_dict
parser = arg... |
65d228fae63e010dc0fd30b98faeeee2aa3455fb | e9869359c839c8c175ae7877bc35dcfdfe4058f8 | /kornia/utils/_compat.py | 5e94f77a98b531131d4e1bed912151a7f96d1649 | [
"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 | 1,857 | py | _compat.py | from typing import TYPE_CHECKING, Callable, ContextManager, List, Optional, Tuple, TypeVar
import torch
from packaging import version
from torch import Tensor
def torch_version() -> str:
"""Parse the `torch.__version__` variable and removes +cu*/cpu."""
return torch.__version__.split('+')[0]
def torch_vers... |
b1f1204c41a44118727a5da64ea1a0a5f2c4343f | b049a961f100444dde14599bab06a0a4224d869b | /sdk/python/pulumi_azure_native/healthcareapis/v20221001preview/_inputs.py | 98f71cba7c9085b56c5816cd74cdbdf20d9021d9 | [
"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 | 8,659 | py | _inputs.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 ._en... |
d70ffa5205db4b3f5a6d6bb2861d7f29434ac583 | a411a55762de11dc2c9d913ff33d2f1477ac02cf | /dp/cloud/python/magma/configuration_controller/tests/unit/test_dp_logs.py | b20911641a4b76c066d2d8b01df26733f057c1a5 | [
"BSD-3-Clause"
] | permissive | magma/magma | 0dc48c1513d9968bd05fb7589f302c192b7c0f94 | 0e1d895dfe625681229e181fbc2dbad83e13c5cb | refs/heads/master | 2023-09-04T09:31:56.140395 | 2023-08-29T13:54:49 | 2023-08-29T13:54:49 | 170,803,235 | 1,219 | 525 | NOASSERTION | 2023-09-07T17:45:42 | 2019-02-15T04:46:24 | C++ | UTF-8 | Python | false | false | 4,126 | py | test_dp_logs.py | """
Copyright 2022 The Magma Authors.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES O... |
d91ff182242877278244dc2bdedab8547ecf430b | c19bcbc98555ef06276f9f0dcffc9ac35942a7c4 | /jc/parsers/clf_s.py | fc43ed1e46d47af62c0e03257d10779bbaa5fb4d | [
"MIT"
] | permissive | kellyjonbrazil/jc | 4e81a5421cd20be5965baf375f4a5671c2ef0410 | 4cd721be8595db52b620cc26cd455d95bf56b85b | refs/heads/master | 2023-08-30T09:53:18.284296 | 2023-07-30T17:08:39 | 2023-07-30T17:08:39 | 215,404,927 | 6,278 | 185 | MIT | 2023-09-08T14:52:22 | 2019-10-15T22:04:52 | Python | UTF-8 | Python | false | false | 6,863 | py | clf_s.py | """jc - JSON Convert Common Log Format file streaming parser
> This streaming parser outputs JSON Lines (cli) or returns an Iterable of
> Dictionaries (module)
This parser will handle the Common Log Format standard as specified at
https://www.w3.org/Daemon/User/Config/Logging.html#common-logfile-format.
Combined Log... |
08f5773a359cd26b113b39e26be7e70ddbe15bb0 | 0621aabcfeac5e4a08d49aa3f791fe46f366a734 | /doc/Programs/LecturePrograms/programs/PDE/python/2dwave/testnew.py | f6f940b6e110e1be424ccfbdc0a0314c93c3dde7 | [
"CC0-1.0"
] | permissive | CompPhysics/ComputationalPhysics | 16341df05a7094ea6442c98466a704249c7085dc | be73eb8bbb989a69fb27e87d7d2686451e7e81f9 | refs/heads/master | 2022-03-20T17:41:39.981703 | 2022-03-04T17:36:23 | 2022-03-04T17:36:23 | 48,985,734 | 287 | 146 | CC0-1.0 | 2020-12-04T12:55:37 | 2016-01-04T09:01:24 | null | UTF-8 | Python | false | false | 1,981 | py | testnew.py | #!/usr/bin/env python
# This script reads in data from file with the solutions of the
# 2dim wave function. The data are organized as
# time
# l, i, j, u(i,j) where k is the time index t_l, i refers to x_i and j to y_j
# At the end it converts a series of png files to a movie
# file movie.gif. You can run this mov... |
d91ee45167e7f11bcdc52d699d3c59607a8d7040 | 646ed67b2b4d730fa17bbc8693771c6047f5213b | /post.py | 0e5acd4903d667d707b35875a9166d0a6c0783db | [
"MIT"
] | permissive | zhou13/lcnn | f5d67b5c50d67b5d298a94ee676eed44678654c6 | 57524636bc4614a32beac1af3b31f66ded2122ae | refs/heads/master | 2022-05-25T20:11:21.470252 | 2022-05-10T06:44:05 | 2022-05-10T06:44:05 | 185,550,840 | 448 | 101 | MIT | 2021-09-27T03:44:49 | 2019-05-08T07:03:02 | Python | UTF-8 | Python | false | false | 4,160 | py | post.py | #!/usr/bin/env python3
"""Post-processing the output of neural network
Usage:
post.py [options] <input-dir> <output-dir>
post.py ( -h | --help )
Examples:
post.py logs/logname/npz/000336000 result/logname
Arguments:
input-dir Directory that stores the npz
output-dir ... |
68495114a874133690291bc785504ade50aa9ecf | d7b9b490c954c7a9160b69f8ce2c907ef4681ecb | /jobs/migrations/0014_merge.py | 0b65016dae5f0d0f98a6760dd4eb4c30017b77a0 | [
"Apache-2.0"
] | permissive | python/pythondotorg | 00db93a4b1789a4d438806d106d9cee3349ad78c | c4ee749942227ca75c8e670546afe67232d647b2 | refs/heads/main | 2023-08-28T20:04:24.735314 | 2023-08-03T19:12:29 | 2023-08-03T19:12:29 | 6,127,047 | 1,131 | 646 | Apache-2.0 | 2023-08-24T15:57:04 | 2012-10-08T16:00:15 | Python | UTF-8 | Python | false | false | 226 | py | 0014_merge.py | from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('jobs', '0013_auto_20170810_1627'),
('jobs', '0013_auto_20170810_1625'),
]
operations = [
]
|
a460f20ac1fc2c8a48f26cb233aa2a1f2076d170 | 9335c48ecf8e8c003d014b8fc2a2fe1ad22ea379 | /pytorch_toolbelt/losses/logcosh.py | abc82e5d0d8cf1f66a00e65aab84376dd962a9a4 | [
"MIT"
] | permissive | BloodAxe/pytorch-toolbelt | 7f86f3f3f9a7cdcb8d49a5f45882f7d16556c535 | 75e6f467472702acbbb7e690d8cbf5496b859c29 | refs/heads/develop | 2023-08-28T18:57:51.377858 | 2023-08-27T09:50:01 | 2023-08-27T09:50:01 | 175,851,515 | 1,503 | 126 | MIT | 2023-08-19T14:23:55 | 2019-03-15T16:02:49 | Python | UTF-8 | Python | false | false | 334 | py | logcosh.py | import torch
from pytorch_toolbelt.losses.functional import log_cosh_loss
from torch import nn
__all__ = ["LogCoshLoss"]
class LogCoshLoss(nn.Module):
def __init__(self):
super().__init__()
def forward(self, y_pred: torch.Tensor, y_true: torch.Tensor) -> torch.Tensor:
return log_cosh_loss(y_... |
2cbe247c6eb733a37d8fbbe96fe97f2f66820b39 | 06cb7dc8d34b13de8c3ab617089a986ce91d9510 | /pymysql/tests/test_basic.py | e77605fdf477d011f1539d13060f9ba85ebd43fc | [
"MIT"
] | permissive | PyMySQL/PyMySQL | 060c12ead432563f5f881f65475fb7ab308b1908 | 6b10225c94087d47782049aafc8e12efa512337b | refs/heads/main | 2023-08-29T19:37:22.643725 | 2023-06-30T16:29:58 | 2023-06-30T16:29:58 | 2,114,213 | 7,442 | 1,604 | MIT | 2023-09-14T21:55:03 | 2011-07-27T17:38:47 | Python | UTF-8 | Python | false | false | 15,010 | py | test_basic.py | import datetime
import json
import time
import pytest
import pymysql.cursors
from pymysql.tests import base
__all__ = ["TestConversion", "TestCursor", "TestBulkInserts"]
class TestConversion(base.PyMySQLTestCase):
def test_datatypes(self):
"""test every data type"""
conn = self.connect()
... |
8bd19c783cf2196afad3657801691244fd15065d | 0a3c2a81392328633e59a1020304c31b50acde62 | /skmob/measures/tests/test_individual.py | 548b65aac3d3666b781cf5f3acb73dd533ec7fc7 | [
"BSD-3-Clause"
] | permissive | scikit-mobility/scikit-mobility | dcd350163263ade9455ad8c5e8ab64cd405b37cf | 9433d05a4cf7f42144e2e92279098740521493e2 | refs/heads/master | 2023-08-13T10:54:04.719179 | 2023-01-20T17:43:20 | 2023-01-20T17:43:20 | 184,337,448 | 679 | 161 | BSD-3-Clause | 2023-07-02T03:30:10 | 2019-04-30T22:02:13 | Python | UTF-8 | Python | false | false | 17,616 | py | test_individual.py | from ...core.trajectorydataframe import TrajDataFrame
from ...utils import constants, gislib
from ...measures import individual
import numpy as np
import pandas as pd
import math
from collections import Counter
import operator
import pytest
earth_distance_km = gislib.getDistance
latitude = constants.LATITUDE
longi... |
3b849b674f31ab326abcd61317187709d56fda43 | da769d44cfb931914ff51c0f1f302b056837c388 | /elpis/engines/__init__.py | e61417d8f48651a96da4d443d46342aa2a36a9d2 | [
"Apache-2.0"
] | permissive | CoEDL/elpis | d7ef5d8c5daf450df10ca57371291d953555eaa7 | 9a019483b4440a96f80486142fb53c7b95c8f983 | refs/heads/master | 2023-07-08T05:06:13.276450 | 2023-03-09T00:17:37 | 2023-03-09T00:17:37 | 154,595,187 | 142 | 40 | Apache-2.0 | 2023-09-05T09:41:13 | 2018-10-25T02:00:37 | Python | UTF-8 | Python | false | false | 1,225 | py | __init__.py | from abc import ABC
from typing import Type
from elpis.engines.common.objects.interface import Interface
from elpis.engines.common.objects.model import Model
from elpis.engines.common.objects.transcription import Transcription
from elpis.engines.kaldi.objects.model import KaldiModel
from elpis.engines.kaldi.objects.tr... |
29a51fe8647264764cc64f1250607f5132167034 | df1254b56f35b24644e00493c50d4b6eb3c15b7b | /colour/examples/appearance/examples_hke.py | 392c377a780047ead3b3837efd941e75b1737b34 | [
"BSD-3-Clause"
] | permissive | colour-science/colour | 908400b227cf81668675e41099256ce50b23ae4b | 1fdf3b3042922e8d4f86b989b00a06e7e5d81102 | refs/heads/develop | 2023-09-01T23:17:07.186869 | 2023-08-26T09:40:45 | 2023-08-26T09:40:45 | 17,114,363 | 1,756 | 301 | BSD-3-Clause | 2023-09-14T10:24:37 | 2014-02-23T18:55:40 | Python | UTF-8 | Python | false | false | 2,225 | py | examples_hke.py | """Showcases Helmholtz—Kohlrausch effect estimation computations."""
import colour
from colour.plotting import colour_style, plot_multi_colour_swatches
from colour.utilities import message_box
wp = colour.xy_to_Luv_uv([0.31271, 0.32902])
average_luminance = 0.14
swatches = [
[0.45079660, 0.52288689],
[0.191... |
fca61a03d4778c5ae0426866df4cfeb99a975440 | fa3f6d4e9169fb95f828013d179d03accdff381b | /grr/server/grr_response_server/databases/db_signed_binaries_test.py | 83c1983e9c904f63679a5f9ada2a58285564258b | [
"Apache-2.0"
] | permissive | google/grr | c51a2bd251ed2f7adae538541990a2cc01fdcc8c | 44c0eb8c938302098ef7efae8cfd6b90bcfbb2d6 | refs/heads/master | 2023-09-05T20:02:36.823914 | 2023-07-26T09:34:09 | 2023-07-26T09:34:09 | 14,909,673 | 4,683 | 927 | Apache-2.0 | 2023-07-26T09:34:10 | 2013-12-04T00:17:53 | Python | UTF-8 | Python | false | false | 3,325 | py | db_signed_binaries_test.py | #!/usr/bin/env python
"""Tests for signed-binary DB functionality."""
from grr_response_server.databases import db
from grr_response_server.rdfvalues import objects as rdf_objects
_test_id1 = rdf_objects.SignedBinaryID(
binary_type=rdf_objects.SignedBinaryID.BinaryType.EXECUTABLE,
path="linux/test/hello")
_te... |
5722dfb22d4abd50af03f73be475d2dc90a713f0 | bffbde8cc7a544f1b5d6c1bc4b84ca607226e134 | /benchmarks/engine/utils/imagenet_utils/__init__.py | 24340fca4777d63c4c6e97b994a17f42cd3cc884 | [
"MIT"
] | permissive | VainF/Torch-Pruning | c006d274e69c5c592ca1e302a70f6603504b8e07 | e2478a72022c96af3b9053da359a726939e1adaf | refs/heads/master | 2023-09-05T02:38:36.804176 | 2023-09-04T11:26:29 | 2023-09-04T11:26:29 | 228,203,350 | 1,606 | 231 | MIT | 2023-09-06T16:45:28 | 2019-12-15T15:07:24 | Python | UTF-8 | Python | false | false | 49 | py | __init__.py | from . import presets, sampler, transforms, utils |
dcf15c81af2b9cabd6eca2b7b08819ecb287941a | a3d6556180e74af7b555f8d47d3fea55b94bcbda | /third_party/jinja2/visitor.py | 17c6aaba570742652f70bf1e7bf1a576c9d256ae | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference",
"GPL-1.0-or-later",
"MIT",
"LGPL-2.0-or-later",
"Apache-2.0"
] | permissive | chromium/chromium | aaa9eda10115b50b0616d2f1aed5ef35d1d779d6 | a401d6cf4f7bf0e2d2e964c512ebb923c3d8832c | refs/heads/main | 2023-08-24T00:35:12.585945 | 2023-08-23T22:01:11 | 2023-08-23T22:01:11 | 120,360,765 | 17,408 | 7,102 | BSD-3-Clause | 2023-09-10T23:44:27 | 2018-02-05T20:55:32 | null | UTF-8 | Python | false | false | 3,568 | py | visitor.py | """API for traversing the AST nodes. Implemented by the compiler and
meta introspection.
"""
import typing as t
from .nodes import Node
if t.TYPE_CHECKING:
import typing_extensions as te
class VisitCallable(te.Protocol):
def __call__(self, node: Node, *args: t.Any, **kwargs: t.Any) -> t.Any:
... |
aeecc9f3ba8317bd6088a0e1400af3c605b16405 | 51b38967e871e1d8bbdf170fbcb9bd7a4c48eda3 | /python/RawNet1/Keras/01-trn_RawNet.py | fcaa82c3d5f4af8dc2914e42ec768ac82d3563c6 | [
"MIT"
] | permissive | Jungjee/RawNet | e9c97ac67aeb3d6f756d7b3bfc657149776dfd60 | a49fc21942dd3414ac2100f26f5c208379f90adc | refs/heads/master | 2022-06-25T09:12:44.572839 | 2022-06-22T08:53:01 | 2022-06-22T08:53:01 | 176,226,132 | 298 | 64 | MIT | 2022-06-22T08:52:55 | 2019-03-18T07:21:51 | Python | UTF-8 | Python | false | false | 14,745 | py | 01-trn_RawNet.py | import os
import numpy as np
np.random.seed(1016)
import yaml
import queue
import struct
import pickle as pk
from multiprocessing import Process
from threading import Thread
from tqdm import tqdm
from time import sleep
from keras.utils import multi_gpu_model, plot_model, to_categorical
from keras.optimizers import *
fr... |
459502d6a2a402385efa0b56791367e1cd0af205 | c4b8e1e09dedbccd37ca008ecaaca4438610bbaf | /cpmpy/volsay3.py | ce064f5f75ec6b6216a2c086f4f8a39c84b4a717 | [
"MIT"
] | permissive | hakank/hakank | 4806598b98cb36dd51b24b0ab688f52dadfe9626 | c337aaf8187f15dcdc4d5b09cd2ed0dbdb2e72c2 | refs/heads/master | 2023-08-15T00:21:52.750270 | 2023-07-27T16:21:40 | 2023-07-27T16:21:40 | 11,933,517 | 336 | 97 | MIT | 2023-07-27T11:19:42 | 2013-08-06T20:12:10 | JavaScript | UTF-8 | Python | false | false | 2,083 | py | volsay3.py | """
Volsay problem in cpmpy.
From the OPL model volsay.mod
'''
Consider a Belgian company Volsay, which specializes in producing ammoniac gas
(NH3) and ammonium chloride (NH4Cl). Volsay has at its disposal 50 units of
nitrogen (N), 180 units of hydrogen (H), and 40 units of chlorine (Cl). The company
makes a profit... |
42b14b3f9d1a30b8bb3b87cc96210636f4e05b15 | 3f5f778f973e229037007b1eb00e5171cbe2560e | /examples/statisticslearning/gaussian_statistics_learning_DrawFromPrior_reload_NNs.py | 3363ade6664728647f5fad86edb715188a8fa5f5 | [
"BSD-3-Clause-Clear",
"BSD-3-Clause"
] | permissive | eth-cscs/abcpy | 9f568b66f66ebc0b835c837dac481c9c2ef199fe | caf0fd899424da69c0ef0bcd499696c5a077cdb1 | refs/heads/master | 2023-03-16T12:34:34.650734 | 2023-03-13T16:07:26 | 2023-03-13T16:07:26 | 79,544,398 | 107 | 43 | BSD-3-Clause-Clear | 2023-08-16T11:04:51 | 2017-01-20T09:15:25 | Python | UTF-8 | Python | false | false | 7,971 | py | gaussian_statistics_learning_DrawFromPrior_reload_NNs.py | import logging
import numpy as np
def infer_parameters(steps=2, n_sample=50, n_samples_per_param=1, logging_level=logging.WARN):
"""Perform inference for this example.
Parameters
----------
steps : integer, optional
Number of iterations in the sequential PMCABC algorithm ("generations"). The... |
a0d767d773751a0f3039216f4b33aed3b98eaaa8 | d6bcc2a87c2e419528c0edc98ebd3d3717a16716 | /test/lib/ufe/testComboCmd.py | ca216dd2b1e098dc586f8fce8c224caff58476bd | [
"DOC"
] | permissive | Autodesk/maya-usd | ac9e03f39132c6b221032f21dc98805b4aa52d31 | dc1c13a3f8012b2a99a45e46fb30250fd4b82487 | refs/heads/dev | 2023-09-05T07:39:58.640296 | 2023-09-01T19:56:30 | 2023-09-01T19:56:30 | 198,889,624 | 692 | 208 | null | 2023-09-14T20:49:17 | 2019-07-25T19:25:28 | Mathematica | UTF-8 | Python | false | false | 44,894 | py | testComboCmd.py | #!/usr/bin/env python
#
# Copyright 2020 Autodesk
#
# 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 ... |
48183dcf00dbb48bafca3bd51c3517b8e64c103b | 0fd8922e6b9c6ed20a9c89fb2887056aad16b5e6 | /examples/bidirect_functional.py | 661b7c7a1a80b1f6e5a7f0e28d154efac7637891 | [
"MIT"
] | permissive | philipperemy/cond_rnn | 52b1fbe4bdf44927d73b7de31b68f5b3ff69b778 | fd6b2c33f0d961b6bab78255a950deb4e51b87b9 | refs/heads/master | 2023-08-16T14:14:34.440172 | 2023-08-08T04:49:03 | 2023-08-08T04:49:03 | 191,509,198 | 219 | 37 | MIT | 2023-08-07T08:05:53 | 2019-06-12T06:15:04 | Python | UTF-8 | Python | false | false | 941 | py | bidirect_functional.py | import numpy as np
from tensorflow.keras import Input, Model
from tensorflow.keras.layers import LSTM, Bidirectional
from cond_rnn import ConditionalRecurrent
forward_layer = ConditionalRecurrent(LSTM(units=12, return_sequences=True))
backward_layer = ConditionalRecurrent(LSTM(units=13, return_sequences=True, go_back... |
c4bc2c7d36e9f27a54922e621a8ca2fd7e6f84b3 | 45d48130937378975cd7b9f356f53ae815ee8fb6 | /examples/smime-sign-hsm.py | be19ea751c42b9f6350a4c248f7ff5d03ba62a17 | [
"MIT",
"LGPL-3.0-only",
"BSD-3-Clause"
] | permissive | m32/endesive | e8e329d97f6531acbaa7f2010ce91c70857b7ea0 | 20df6cb8a45b126cc50c604a41cdd36c4c170e11 | refs/heads/master | 2023-05-11T11:12:37.525467 | 2023-05-05T04:49:18 | 2023-05-05T04:49:18 | 143,915,688 | 222 | 101 | MIT | 2023-04-27T07:41:48 | 2018-08-07T19:03:27 | Python | UTF-8 | Python | false | false | 4,264 | py | smime-sign-hsm.py | #!/usr/bin/env vpython3
# *-* coding: utf-8 *-*
import os
import stat
import subprocess
import datetime
import base64
import email
from email.mime.multipart import MIMEMultipart
from email.mime.application import MIMEApplication
from email.mime.text import MIMEText
from email.mime.base import MIMEBase
from cryptograp... |
7390683472dc6541e6e361551e1240edf807bbe3 | 83963c19fd120dcc7498b726cc56de7fbb900a47 | /osxphotos/cli/info.py | 84012d07c6e515eeb5838db2a76980a6f6cc00d4 | [
"BSD-3-Clause",
"MIT",
"ISC",
"Apache-2.0",
"LicenseRef-scancode-public-domain"
] | permissive | RhetTbull/osxphotos | 55ad4f1257bcd26bb3fbadde6ce5dd59c0917354 | 2cb5a4d18a27be6ccf68f5f35abd39418d238016 | refs/heads/main | 2023-09-02T18:11:06.227191 | 2023-09-02T16:06:51 | 2023-09-02T16:06:51 | 192,160,985 | 1,287 | 93 | MIT | 2023-09-14T14:10:58 | 2019-06-16T07:07:49 | Python | UTF-8 | Python | false | false | 2,292 | py | info.py | """info command for osxphotos CLI"""
import json
import click
import yaml
import osxphotos
from osxphotos._constants import _PHOTOS_4_VERSION
from .cli_params import DB_ARGUMENT, DB_OPTION, JSON_OPTION
from .common import get_photos_db
from .list import _list_libraries
@click.command()
@DB_OPTION
@JSON_OPTION
@DB... |
239fb3bee3b32daa93c423eb45f43bac460d1887 | 45ba55b4fbdaf1657fde92beaeba4f173265afcd | /tests/tools/test_merge_types.py | 76315752177494d93092fea9b58ec0fd5605feff | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | strawberry-graphql/strawberry | af96afd4edd1788c59e150597a12501fbc7bf444 | 6d86d1c08c1244e00535840d9d87925431bc6a1c | refs/heads/main | 2023-08-30T03:34:12.929874 | 2023-08-24T12:01:09 | 2023-08-24T12:01:09 | 162,690,887 | 3,408 | 529 | MIT | 2023-09-14T21:49:44 | 2018-12-21T08:56:55 | Python | UTF-8 | Python | false | false | 2,330 | py | test_merge_types.py | from textwrap import dedent
import pytest
import strawberry
from strawberry.tools import merge_types
@strawberry.type
class Person:
@strawberry.field
def name(self) -> str:
return "Eve"
@strawberry.field
def age(self) -> int:
return 42
@strawberry.type
class SimpleGreeter:
@st... |
92bfb0e56773f453264b4f1ce7ee9ea9cce02950 | fcc3fcd8da44b7d6bd46098df9693d6fb01cef73 | /jans-linux-setup/jans_setup/setup_app/installers/eleven.py | 1dd263a93374b8f6fb34b995fc451bb50c64dd96 | [
"Apache-2.0",
"MIT"
] | permissive | JanssenProject/jans | cb633472825787b68ecfba7db97b5b7e5c87e7a5 | 66c4ef766a62788437cce88974357a9a2b20de21 | refs/heads/main | 2023-09-01T07:04:48.645163 | 2023-08-31T10:57:05 | 2023-08-31T10:57:05 | 309,721,058 | 400 | 68 | Apache-2.0 | 2023-09-14T17:42:33 | 2020-11-03T15:00:37 | Java | UTF-8 | Python | false | false | 2,673 | py | eleven.py | import os
import glob
import shutil
from setup_app import paths
from setup_app.utils import base
from setup_app.utils.package_utils import packageUtils
from setup_app.static import AppType, InstallOption
from setup_app.config import Config
from setup_app.installers.jetty import JettyInstaller
class ElevenInstaller(J... |
e5a87e410b74ba113fe8cea0296b43f956588d26 | 15eb68a30bd1bcd8c153ce3c8774e09ef3f4135d | /Examples/torch/quantization/qat_range_learning_ddp_training_lightining.py | 3e909b0ced3cce9c399aa2a23013412d60690bd2 | [
"BSD-3-Clause"
] | permissive | quic/aimet | 77a984af68fc3c46d98c707d18a14c95a3efdacf | 5a406e657082b6a4f6e4bf48f0e46e085cb1e351 | refs/heads/develop | 2023-08-21T12:51:10.500286 | 2023-08-18T18:35:39 | 2023-08-18T18:35:39 | 257,688,216 | 1,676 | 339 | NOASSERTION | 2023-09-08T06:59:39 | 2020-04-21T18:57:10 | Python | UTF-8 | Python | false | false | 10,036 | py | qat_range_learning_ddp_training_lightining.py | # =============================================================================
#
# @@-COPYRIGHT-START-@@
#
# Copyright (c) 2022, Qualcomm Innovation Center, Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following con... |
8da45e9f12719a0da1544fde1d3d7d6f6b12528f | 8cb7399499d582efbc900b530cd7075dd82ec0bd | /spockbot/mcdata/recipes.py | 5525b37d5e854b425684cc9cd0b1a4550af9f3c7 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | SpockBotMC/SpockBot | 115334d3ebb6db806e859a9ea20ea476761702b3 | f89911551f18357720034fbaa52837a0d09f66ea | refs/heads/master | 2021-01-15T15:33:00.003492 | 2016-05-01T14:57:55 | 2016-05-01T14:57:55 | 7,111,791 | 188 | 61 | null | 2016-04-25T00:06:56 | 2012-12-11T13:01:23 | Python | UTF-8 | Python | false | false | 2,639 | py | recipes.py | from collections import defaultdict, namedtuple
from minecraft_data.v1_8 import recipes as raw_recipes
RecipeItem = namedtuple('RecipeItem', 'id meta amount')
class Recipe(object):
def __init__(self, raw):
self.result = reformat_item(raw['result'], None)
if 'ingredients' in raw:
sel... |
77206b6dfa06e01cdb36d756f80d9f6a7d269c1a | 8a40a3db07eec18178c9b8757aafdb35724ff324 | /tests/common/test_payload.py | 06c3289b125f0657ea44adca00b6ae259a144201 | [
"MIT"
] | permissive | miguelgrinberg/python-engineio | 52313e7fd2cd740e5a083976231c056d53c9a590 | 35cc5ec0a69b5274697928af4a163e0ca42e1afb | refs/heads/main | 2023-08-18T05:55:37.901376 | 2023-08-15T18:02:04 | 2023-08-15T18:02:04 | 37,830,040 | 236 | 175 | MIT | 2023-09-03T15:13:49 | 2015-06-21T23:17:21 | Python | UTF-8 | Python | false | false | 2,454 | py | test_payload.py | import unittest
import pytest
from engineio import packet
from engineio import payload
class TestPayload(unittest.TestCase):
def test_encode_empty_payload(self):
p = payload.Payload()
assert p.packets == []
assert p.encode() == ''
def test_decode_empty_payload(self):
p = pay... |
5a5bbc8083d052e249073c819383126a7d1e0a29 | 7ff3ede9c16952a3874bf941f92a04fdbfe5a089 | /flamby/strategies/utils.py | 4f552cd8604e3244f94d1c96a3e200a640f9b799 | [
"MIT"
] | permissive | owkin/FLamby | 2be93062d4b4f3db4552d2b62bb491cc97f616a3 | 6d403afca752d21dd25b509cfd9e698a2e7f9cc5 | refs/heads/main | 2023-07-19T18:15:45.830543 | 2023-07-17T15:39:25 | 2023-07-17T15:39:25 | 463,146,427 | 156 | 18 | MIT | 2023-07-21T13:08:50 | 2022-02-24T12:49:40 | Python | UTF-8 | Python | false | false | 17,629 | py | utils.py | import copy
import os
import time
from datetime import datetime
import numpy as np
import torch
from opacus import PrivacyEngine
from torch.utils.tensorboard import SummaryWriter
class DataLoaderWithMemory:
"""This class allows to iterate the dataloader infinitely batch by batch.
When there are no more batch... |
2b09b17248bbcec59d7490a26fd7d585d54e8c54 | 49b861ac5ca3adfe8861a10839b18d9448eb8020 | /python/blur.py | 1369c47d5075a0f7296e8a55a5b8cb7910dac3f9 | [
"BSD-2-Clause"
] | permissive | symisc/pixlab | deee8dcd8b4816c135ad666340e4023dbcefbb66 | b4ffb1d6b8ff2204ac0db51842ada921478ed66c | refs/heads/master | 2023-08-04T19:39:44.813119 | 2023-07-31T03:51:16 | 2023-07-31T03:51:16 | 85,357,712 | 107 | 34 | null | null | null | null | UTF-8 | Python | false | false | 427 | py | blur.py | import requests
import json
# Blur the bird picture
# https://pixlab.io/#/cmd?id=blur for more info.
req = requests.get('https://api.pixlab.io/blur',params={
'img':'https://www.allaboutbirds.org/guide/PHOTO/LARGE/blue_jay_8.jpg',
'radius':50,
'sigma':30,
'key':'My_PixLab_Key'
})
reply = req.json()
if reply['st... |
dfea669c4519269a2654b492fe8a992552b69e3a | 010279e2ba272d09e9d2c4e903722e5faba2cf7a | /contrib/python/scipy/py2/scipy/optimize/tests/test__basinhopping.py | 84deeb847253a4b53ed032c0aaecd9b4a43171a0 | [
"Python-2.0",
"MIT",
"LicenseRef-scancode-unknown-license-reference",
"Qhull",
"BSD-3-Clause",
"Apache-2.0",
"BSD-2-Clause"
] | permissive | catboost/catboost | 854c1a1f439a96f1ae6b48e16644be20aa04dba2 | f5042e35b945aded77b23470ead62d7eacefde92 | refs/heads/master | 2023-09-01T12:14:14.174108 | 2023-09-01T10:01:01 | 2023-09-01T10:22:12 | 97,556,265 | 8,012 | 1,425 | Apache-2.0 | 2023-09-11T03:32:32 | 2017-07-18T05:29:04 | Python | UTF-8 | Python | false | false | 15,398 | py | test__basinhopping.py | """
Unit tests for the basin hopping global minimization algorithm.
"""
from __future__ import division, print_function, absolute_import
import copy
from numpy.testing import assert_almost_equal, assert_equal, assert_
from pytest import raises as assert_raises
import numpy as np
from numpy import cos, sin
from scipy.... |
da3e79c306cbf178f8d704d99e3a83120d52f3d6 | bb33e6be8316f35decbb2b81badf2b6dcf7df515 | /source/res/scripts/client/gui/prb_control/entities/epic_battle_training/requester.py | e175785666bc58a391f7c40e78ed909aca29047e | [] | no_license | StranikS-Scan/WorldOfTanks-Decompiled | 999c9567de38c32c760ab72c21c00ea7bc20990c | d2fe9c195825ececc728e87a02983908b7ea9199 | refs/heads/1.18 | 2023-08-25T17:39:27.718097 | 2022-09-22T06:49:44 | 2022-09-22T06:49:44 | 148,696,315 | 103 | 39 | null | 2022-09-14T17:50:03 | 2018-09-13T20:49:11 | Python | UTF-8 | Python | false | false | 2,147 | py | requester.py | # Python bytecode 2.7 (decompiled from Python 2.7)
# Embedded file name: scripts/client/gui/prb_control/entities/epic_battle_training/requester.py
import BigWorld
from PlayerEvents import g_playerEvents
from constants import PREBATTLE_TYPE, PREBATTLE_CACHE_KEY
from debug_utils import LOG_ERROR
from gui.prb_control.enti... |
b36b771fc1ec53b7dcd30750d0bbeec71f58c927 | c24b28c0dc4ad8f83845f4c61882f1e04d49b5cd | /Dash Components/Daq_Components/daq.py | 92ddc4567612b37bd027b41631c04a84f113ba77 | [] | no_license | Coding-with-Adam/Dash-by-Plotly | 759e927759513d96060a770b1e0b0a66db13f54f | 9f178f1d52536efd33827758b741acc4039d8d9b | refs/heads/master | 2023-08-31T17:23:02.029281 | 2023-08-08T05:12:50 | 2023-08-08T05:12:50 | 234,687,337 | 1,293 | 1,822 | null | 2023-07-31T15:47:07 | 2020-01-18T05:36:28 | Jupyter Notebook | UTF-8 | Python | false | false | 3,184 | py | daq.py | # Video: [Introduction to Dash DAQ for manufacturing dashboards](https://youtu.be/t3cLkzJAUgo)
# Docs: [Dash DAQ](https://dash.plotly.com/dash-daq)
import dash # pip install dash
from dash import dcc, html, Input, Output
import dash_daq as daq
import plotly.graph_objects ... |
a41c271c6e7ac3392f3423024226cc4b77aa72a7 | c6759b857e55991fea3ef0b465dbcee53fa38714 | /tools/nntool/nntool/importer/common/broadcast_mixin.py | 3cda3a186ccda48059fcb38aa30df8bf90a39bdd | [
"AGPL-3.0-or-later",
"AGPL-3.0-only",
"GPL-1.0-or-later",
"LicenseRef-scancode-other-copyleft",
"Apache-2.0"
] | permissive | GreenWaves-Technologies/gap_sdk | 1b343bba97b7a5ce62a24162bd72eef5cc67e269 | 3fea306d52ee33f923f2423c5a75d9eb1c07e904 | refs/heads/master | 2023-09-01T14:38:34.270427 | 2023-08-10T09:04:44 | 2023-08-10T09:04:44 | 133,324,605 | 145 | 96 | Apache-2.0 | 2023-08-27T19:03:52 | 2018-05-14T07:50:29 | C | UTF-8 | Python | false | false | 3,562 | py | broadcast_mixin.py | # Copyright (C) 2020 GreenWaves Technologies, SAS
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
# This progr... |
97a80ac286d7cd3339989f454b918b38779c7460 | 32712c478ff9dff44de085cb50a1302bfc2eba67 | /debug/utils_for_tests.py | bd30ee48d73779bb33c03004fa34a8b65f449b5e | [
"MIT"
] | permissive | vas3k/vas3k.club | 158af17c329fe693178ca1bce36466922604df3b | b3ff2fd95ef1d6c593c57d3bcd501240f2705fbb | refs/heads/master | 2023-09-03T07:10:10.859004 | 2023-09-01T09:08:32 | 2023-09-01T09:08:32 | 254,190,180 | 697 | 326 | MIT | 2023-09-04T09:02:12 | 2020-04-08T20:11:44 | Python | UTF-8 | Python | false | false | 1,622 | py | utils_for_tests.py | def todict(obj, include_class_attrs=False, convert_private=False, include_none_fields=True):
"""Convert object to dict"""
if isinstance(obj, dict):
data = {}
for (k, v) in obj.items():
data[k] = todict(v, include_class_attrs, convert_private)
return data
elif hasattr(obj,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.