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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8a0dd434f8cd8d79756d2431dad7228d9f78abf8 | ff0588bb35375440f44f19350a361028bdfd9735 | /examples/threathunter/threat_intelligence/stix_parse.py | 8663c5494e895d038fe19ea3c83bb77d2253afef | [
"MIT",
"BSD-3-Clause"
] | permissive | carbonblack/cbapi-python | c277bcf7fceeb3dda607be08ce3f425c70d3a833 | 32dd08d2185f7113f87834002e720db31c8c910e | refs/heads/master | 2023-02-08T07:24:14.464026 | 2023-02-01T18:11:25 | 2023-02-01T18:11:25 | 52,364,316 | 158 | 123 | NOASSERTION | 2023-02-01T18:11:27 | 2016-02-23T14:21:22 | Python | UTF-8 | Python | false | false | 14,872 | py | stix_parse.py | """Parses STIX observables from the XML data returned by the TAXII server.
The following IOC types are extracted from STIX data:
* MD5 Hashes
* Domain Names
* IP-Addresses
* IP-Address Ranges
"""
from cybox.objects.domain_name_object import DomainName
from cybox.objects.address_object import Address
from cybox.objec... |
41f8193677c8862212cbfd32e56aaa1fe1b4eefd | 7bc1d8634529eac952490399fb71f10bcedf05cc | /tests/scripts/thread-cert/border_router/test_border_router_as_fed.py | ec705c582fc071878125266251df3b80fb37ebaf | [
"LicenseRef-scancode-warranty-disclaimer",
"BSD-3-Clause"
] | permissive | openthread/openthread | 6a9e25d1cd224bde9796d9616f04f423dba27d77 | 102a631cb3f8938389d0d10199a14c59184039cd | refs/heads/main | 2023-08-18T10:46:03.820124 | 2023-08-17T22:20:55 | 2023-08-17T22:20:55 | 55,808,787 | 3,485 | 1,296 | BSD-3-Clause | 2023-09-14T15:50:53 | 2016-04-08T20:47:41 | C++ | UTF-8 | Python | false | false | 3,360 | py | test_border_router_as_fed.py | #!/usr/bin/env python3
#
# Copyright (c) 2021, The OpenThread Authors.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright
# ... |
b35173f1ac8c8e89c1af4afacac428de6c4dbf7b | 6f797bae522927214b4c4065d88b92d6fff127e0 | /kur/model/hooks/kurhub_hook.py | 3067a74aecb245c1bd734f71caa4cf421e7c8470 | [
"Apache-2.0",
"Python-2.0"
] | permissive | deepgram/kur | 5a3c6b5dba462327ccb134dcde53bf60ee4bf1fd | fd0c120e50815c1e5be64e5dde964dcd47234556 | refs/heads/master | 2023-08-17T11:38:47.613445 | 2020-11-04T19:09:50 | 2020-11-04T19:09:50 | 74,182,569 | 873 | 139 | Apache-2.0 | 2023-01-28T21:50:24 | 2016-11-19T02:42:09 | Python | UTF-8 | Python | false | false | 4,957 | py | kurhub_hook.py | """
Copyright 2017 Deepgram
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
distri... |
ca9729fb7d2877a309adf7984bc75574664eefba | e7ebc88fe9c84a29e02db87a5198f3265c36273c | /hordak/tests/admin/test_admin.py | aa107de11b653305654cbe5e2adce7925ba977b3 | [
"MIT"
] | permissive | adamcharnock/django-hordak | de24b571c7a5f313de0387e3b1a592fc14b27ddf | 0108808204fd41e40f7f4d7dfa05ec440e1070cc | refs/heads/master | 2023-08-06T02:09:37.370711 | 2023-08-03T14:00:19 | 2023-08-03T14:31:34 | 67,291,607 | 220 | 57 | MIT | 2023-09-08T12:58:13 | 2016-09-03T13:29:39 | Python | UTF-8 | Python | false | false | 2,895 | py | test_admin.py | from django.contrib.auth import get_user_model
from django.test.testcases import TestCase
from django.urls import reverse
from hordak.models import Account, Leg, Transaction
from hordak.tests.utils import DataProvider
class TestAdmin(DataProvider, TestCase):
def setUp(self):
self.user_account = self.acco... |
af7035674f65974c926fa31f7d68d814cc8b153b | f509ab9825c542e09b0c6591d86ef1f9feb540a6 | /pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/system/configure.py | 660b7b12b29479831faa03fd0707a5fa85660244 | [
"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 | 2,308 | py | configure.py | """Common configure functions for system"""
# Python
import logging
# Unicon
from unicon.core.errors import SubCommandFailure
log = logging.getLogger(__name__)
def config_license(device, license):
""" Config license on Device
Args:
device (`obj`): Device object
license (`str`)... |
dad040d8ebe02312011c40cdb3ba9f7037b70a4f | 010279e2ba272d09e9d2c4e903722e5faba2cf7a | /contrib/python/asttokens/asttokens/line_numbers.py | aaf76cef6d040cab1e7eaa1719c03d0e720a3d85 | [
"Apache-2.0"
] | permissive | catboost/catboost | 854c1a1f439a96f1ae6b48e16644be20aa04dba2 | f5042e35b945aded77b23470ead62d7eacefde92 | refs/heads/master | 2023-09-01T12:14:14.174108 | 2023-09-01T10:01:01 | 2023-09-01T10:22:12 | 97,556,265 | 8,012 | 1,425 | Apache-2.0 | 2023-09-11T03:32:32 | 2017-07-18T05:29:04 | Python | UTF-8 | Python | false | false | 2,842 | py | line_numbers.py | # Copyright 2016 Grist Labs, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... |
95e57ce8a6562a24b8d6cd4916f7fffe918f1dd5 | 713b2497bc3bc256e71d59837de2c772c1d1f566 | /test/test_chaos.py | bba425571c33ed968f877c4f09b14cfe5dad6b65 | [
"Apache-2.0"
] | permissive | bbc/chaos-lambda | 6ef0b94980c1de03f02e0c9c56bd917bc8d8c0d3 | f00cedca76f3842256d8bc9a088dc419b0a05411 | refs/heads/master | 2022-12-05T00:04:42.158342 | 2022-11-29T15:31:51 | 2022-12-02T12:15:20 | 47,708,500 | 172 | 27 | NOASSERTION | 2022-12-02T15:39:52 | 2015-12-09T17:47:29 | Python | UTF-8 | Python | false | false | 20,116 | py | test_chaos.py | from __future__ import print_function
import json
import re
from unittest import mock
from base import mock_imports, PatchingTestCase
mock_imports([
"boto3"
]) # noqa
import chaos
class TestGetASGTag(PatchingTestCase):
def test_finds_tag_key_case_insensitively(self):
asg = {"Tags": [{"Key": "na... |
df0b7a19d64cf774a1733a9f6a758ea561779dd9 | 6a531e292af43d3e7aec6d3019e0333362afe454 | /src/cactus/refmap/cactus_graphmap.py | e842daf665e2cbbaad16604883cc17d848185faa | [
"MIT"
] | permissive | ComparativeGenomicsToolkit/cactus | 2d4d891b6b3af0a22b64aba11f18a867a7666e58 | 41d99360cfa79ada5bdca307883c30c7fb59a06d | refs/heads/master | 2023-09-01T20:38:37.550816 | 2023-09-01T14:47:06 | 2023-09-01T14:47:06 | 1,317,650 | 369 | 106 | NOASSERTION | 2023-09-05T20:27:44 | 2011-02-01T20:17:33 | C | UTF-8 | Python | false | false | 28,627 | py | cactus_graphmap.py | #!/usr/bin/env python3
"""jobs and command for running the minigraph pan-genome building pipeline, which takes
input: usual list of fasta files + a minigraph-compatible GFA graph
output: PAF file containing alignment of each input Fasta to the contig sequences of the graph
(these contig sequences are ... |
7505766c613bd4b5b040d5e0aa1886cddcc1fa2d | d64bfb18b93bb9d237ddbaad5a8fa61379685faa | /test/test_grid.py | 4d0792562fbf3ecddc6d96d3871a892a8f3e3419 | [
"Apache-2.0"
] | permissive | UXARRAY/uxarray | 9f178b9896d9768825011809afbc00264046fba8 | 805e15114ccc6f606bb9b6f6a43bbfd73f07347d | refs/heads/main | 2023-08-23T20:06:41.670476 | 2023-08-18T21:54:05 | 2023-08-18T21:54:05 | 421,447,986 | 118 | 23 | Apache-2.0 | 2023-09-11T18:18:17 | 2021-10-26T14:00:08 | Python | UTF-8 | Python | false | false | 32,857 | py | test_grid.py | import os
import numpy as np
import numpy.testing as nt
import xarray as xr
from unittest import TestCase
from pathlib import Path
import uxarray as ux
from uxarray.grid.connectivity import _build_edge_node_connectivity, _build_face_edges_connectivity
from uxarray.grid.coordinates import _populate_cartesian_xyz_coo... |
fede0f06455559526c652d858175802d578f7774 | 12f0bd77926127cdacc2452d6f9cfed91806b2fe | /idaes/core/dmf/experiment.py | a41004ac4b284b2872033e5166c9c7d84c37df04 | [
"BSD-2-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | IDAES/idaes-pse | e03d2583ae1ba968a7099f9f439fd8c3efa12904 | deacf4c422bc9e50cb347e11a8cbfa0195bd4274 | refs/heads/main | 2023-08-16T19:13:00.355572 | 2023-08-04T04:19:29 | 2023-08-04T04:19:29 | 168,622,088 | 173 | 227 | NOASSERTION | 2023-09-11T16:04:55 | 2019-02-01T01:12:51 | Python | UTF-8 | Python | false | false | 4,328 | py | experiment.py | #################################################################################
# The Institute for the Design of Advanced Energy Systems Integrated Platform
# Framework (IDAES IP) was produced under the DOE Institute for the
# Design of Advanced Energy Systems (IDAES).
#
# Copyright (c) 2018-2023 by the software own... |
bd5cd34d65ba7442bb0a3cd9d67c6f17dc77a63f | 4bdbd0756f56732e44d57c291ffaca4d0c8dfe90 | /fastparquet/benchmarks/columns.py | fe59834d29c23e57c4f30e08704e9303cabc7f51 | [
"Apache-2.0"
] | permissive | dask/fastparquet | 5e9dbce2d1ce74f55b95374357e1888a6dcff320 | df1219300a96bc1baf9ebad85f4f5676a130c9e8 | refs/heads/main | 2023-09-04T08:51:25.940003 | 2023-08-30T15:00:51 | 2023-08-30T15:00:51 | 45,694,060 | 716 | 210 | Apache-2.0 | 2023-08-30T14:30:53 | 2015-11-06T16:42:17 | Python | UTF-8 | Python | false | false | 7,066 | py | columns.py | import numpy as np
import os
import pandas as pd
import shutil
import sys
import tempfile
import time
from contextlib import contextmanager
from fastparquet import write, ParquetFile
from fastparquet.util import join_path
@contextmanager
def measure(name, result):
t0 = time.time()
yield
t1 = time.time()
... |
2da81a6e69d367454d7cb2e9acfae7a8a36714ab | 8d585fa3b2419d9b993be2f2652e448cfeedc8b2 | /tests/core/test_datadog.py | afb6b9a99da136a02f7bd50d7d88707cf0f17e77 | [
"BSD-3-Clause",
"BSD-2-Clause"
] | permissive | DataDog/dd-agent | bd4ef0edb234293b51d30894a529ce94b37060f8 | 16fa4ec9ae11ca0adfffbd260c5b4899dc73509f | refs/heads/master | 2023-08-16T09:52:21.816487 | 2023-07-11T15:37:34 | 2023-07-11T15:37:34 | 1,210,071 | 1,227 | 991 | NOASSERTION | 2023-06-28T12:20:19 | 2010-12-31T03:02:47 | Python | UTF-8 | Python | false | false | 22,293 | py | test_datadog.py | # stdlib
import calendar
from datetime import datetime
import logging
import os
import re
from tempfile import gettempdir, NamedTemporaryFile
import time
import unittest
# 3p
from nose.plugins.attrib import attr
# project
from checks.datadog import Dogstreams, EventDefaults
log = logging.getLogger('datadog.test')
... |
8112fa618345a2771b995ba9ea2eb43ea606ac7a | ac2f43c8e0d9649a7f063c59b3dffdfed9fd7ed7 | /tools/Redfish-Interface-Emulator/api_emulator/redfish/templates/session.py | 2fbeff4e4264dc95d9974788f447a6394d45b5a5 | [
"BSD-3-Clause"
] | permissive | facebook/openbmc | bef10604ced226288600f55248b7f1be9945aea4 | 32777c66a8410d767eae15baabf71c61a0bef13c | refs/heads/helium | 2023-08-17T03:13:54.729494 | 2023-08-16T23:24:18 | 2023-08-16T23:24:18 | 31,917,712 | 684 | 331 | null | 2023-07-25T21:19:08 | 2015-03-09T19:18:35 | C | UTF-8 | Python | false | false | 1,133 | py | session.py | # Copyright Notice:
# Copyright 2017-2019 DMTF. All rights reserved.
# License: BSD 3-Clause License. For full text see link: https://github.com/DMTF/Redfish-Interface-Emulator/blob/master/LICENSE.md
# Session Template File
import copy
import strgen
_TEMPLATE = \
{
"@Redfish.Copyright":"Copyright 2014-2021 DMTF.... |
e5f6f55ac74e1d3d94781908bbf87f2e74fd10eb | b8bbdfc593b6d816e67a344f720f90ec05236778 | /airflow/providers/ftp/operators/ftp.py | 4489839d8f493b770575699592ee4f6cdab522a7 | [
"Apache-2.0",
"BSD-3-Clause",
"MIT"
] | permissive | apache/airflow | ed78db0a8bab7e096990e143926e52f518e288ab | 1b122c15030e99cef9d4ff26d3781a7a9d6949bc | refs/heads/main | 2023-09-01T08:37:34.556097 | 2023-09-01T06:49:05 | 2023-09-01T06:49:05 | 33,884,891 | 22,756 | 11,558 | Apache-2.0 | 2023-09-14T20:12:36 | 2015-04-13T18:04:58 | Python | UTF-8 | Python | false | false | 8,171 | py | ftp.py | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... |
4178005be32014aa1dc23037ddb528c7f5af6874 | 45e376ae66b78b17788b1d3575b334b2cb1d0b1c | /checkov/common/checks_infra/solvers/attribute_solvers/number_of_words_greater_than_or_equal_attribute_solver.py | ef4d2d3ea19464af1e9711e018a441283d16f921 | [
"Apache-2.0"
] | permissive | bridgecrewio/checkov | aeb8febed2ed90e61d5755f8f9d80b125362644d | e64cbd27ffb6f09c2c9f081b45b7a821a3aa1a4d | refs/heads/main | 2023-08-31T06:57:21.990147 | 2023-08-30T23:01:47 | 2023-08-30T23:01:47 | 224,386,599 | 5,929 | 1,056 | Apache-2.0 | 2023-09-14T20:10:23 | 2019-11-27T08:55:14 | Python | UTF-8 | Python | false | false | 904 | py | number_of_words_greater_than_or_equal_attribute_solver.py | from typing import Optional, Any, Dict
from checkov.common.checks_infra.solvers.attribute_solvers.base_number_of_words_attribute_solver import \
BaseNumberOfWordsAttributeSolver
from checkov.common.graph.checks_infra.enums import Operators
class NumberOfWordsGreaterThanOrEqualAttributeSolver(BaseNumberOfWordsAtt... |
514fcc51dad8e155b96c6ce633ec442da5f28a80 | 83b8b30ebb633eecd29ca0a7a20cc43a293c9333 | /tests/basics/string_strip.py | 971a4aae539b17d8ed4ed9fa2c677f5f574ea97e | [
"MIT",
"GPL-1.0-or-later"
] | permissive | adafruit/circuitpython | 430ec895149d1eb814b505db39b4977a35ee88a7 | 506dca71b0cbb7af749bb51f86b01021db5483b3 | refs/heads/main | 2023-08-21T16:30:46.781068 | 2023-08-20T00:39:44 | 2023-08-20T00:39:44 | 66,166,069 | 3,806 | 1,560 | MIT | 2023-09-14T19:23:51 | 2016-08-20T20:10:40 | C | UTF-8 | Python | false | false | 988 | py | string_strip.py | print("".strip())
print(" \t\n\r\v\f".strip())
print(" T E S T".strip())
print("abcabc".strip("ce"))
print("aaa".strip("b"))
print("abc efg ".strip("g a"))
print(' spacious '.lstrip())
print('www.example.com'.lstrip('cmowz.'))
print(' spacious '.rstrip())
print('mississippi'.rstrip('ipz'))
print(b'mississip... |
4834075104b7848319f9c93780e12a29c3c99e4b | f251667b6c1e708c3ff00b52d090f53763a0a90d | /setup.py | af08081bb9ad441eb2b338d01144e92634bcc511 | [
"CC-BY-SA-4.0",
"MIT"
] | permissive | karask/python-bitcoin-utils | e0d89f0b28ef29a6b19db77e02eb1170cdf1a47c | 0c419fcc51ac7e245d412da48ad3690735ff88fa | refs/heads/master | 2023-08-17T19:30:31.826879 | 2023-08-03T11:06:55 | 2023-08-03T11:06:55 | 149,975,129 | 186 | 68 | MIT | 2022-04-12T07:43:45 | 2018-09-23T10:47:09 | Python | UTF-8 | Python | false | false | 1,074 | py | setup.py | from setuptools import setup
from bitcoinutils import __version__
#with open('requirements.txt') as f:
# requirements = f.read().splitlines()
#install_reqs = parse_requirements('requirements.txt', session=False)
#requirements = [str(ir.req) for ir in install_reqs]
with open('README.rst') as readme:
long_descr... |
caaf57c16c05b91d11588b8b361bf0d78d3ca437 | 2e038c642350e9a29bcd845b2f922f9c017fa7d8 | /src/westpa/oldtools/aframe/mcbs.py | f42a855ab043e4a6a3dcd77e0af2b2d9b23cf7e3 | [
"MIT"
] | permissive | westpa/westpa | e8e0952bdbe9a95f06eca07762e1e9372156dd9a | 85ed1c54159d639d2fcb9e23c45f93743bfed2e0 | refs/heads/westpa2 | 2023-09-01T11:21:44.944424 | 2023-08-11T21:56:40 | 2023-08-11T21:56:40 | 24,576,160 | 181 | 66 | MIT | 2023-09-14T16:46:54 | 2014-09-29T02:04:49 | Python | UTF-8 | Python | false | false | 5,928 | py | mcbs.py | '''
Tools for Monte Carlo bootstrap error analysis
'''
import logging
import math
import numpy as np
import westpa
from westpa.oldtools.aframe import AnalysisMixin
log = logging.getLogger(__name__)
class MCBSMixin(AnalysisMixin):
def __init__(self):
super().__init__()
self.mcbs_alpha = None
... |
cfebcb99b3aa558075648b07af2bdaa949c5ff73 | 3ca67d69abd4e74b7145b340cdda65532f90053b | /programmers/난이도별/level01.약수의_개수와_덧셈/Go-yj.py | 3479dc5ab3922effd8ed14a0dd378c6e7af4ca21 | [] | no_license | DKU-STUDY/Algorithm | 19549516984b52a1c5cd73e1ed1e58f774d6d30e | 6f78efdbefd8eedab24e43d74c7dae7f95c2893b | refs/heads/master | 2023-02-18T06:48:39.309641 | 2023-02-09T07:16:14 | 2023-02-09T07:16:14 | 258,455,710 | 175 | 49 | null | 2023-02-09T07:16:16 | 2020-04-24T08:42:27 | Python | UTF-8 | Python | false | false | 457 | py | Go-yj.py | '''
링크 : https://programmers.co.kr/learn/courses/30/lessons/77884
문제 : 약수의 개수와 덧셈
약수의 개수가 홀수일때는 제곱근이 정수일때이기 때문에 이를 판별하여 홀, 짝을 구해줬습니다.
'''
import math
def solution(left, right):
answer = 0
for i in range(left, right+1) :
num = math.sqrt(i)
if int(num) == num :
answer -= i
el... |
7fdd313d94c60f4d8e34e1edf26e2666a0917f48 | d38ab28cf6ee680b5a82f37e7841d31617750da4 | /Examples/ImageGridManipulation/ImageGridManipulation.py | d537a1f9ca36e7a85f5d12720647755d925514e9 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | SimpleITK/SimpleITK | cdd9f417acc7f7fe20b006a75dc483d6bb6d9b20 | cfb40ba1149ba9f186793ccdd206f7179c8ba7a3 | refs/heads/master | 2023-09-01T15:01:04.024343 | 2023-08-31T19:09:36 | 2023-08-31T19:09:36 | 1,069,177 | 764 | 216 | Apache-2.0 | 2023-09-13T17:48:23 | 2010-11-10T18:56:04 | SWIG | UTF-8 | Python | false | false | 2,382 | py | ImageGridManipulation.py | #!/usr/bin/env python
# =========================================================================
#
# Copyright NumFOCUS
#
# 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:/... |
54a8f5b8fc283c3033e644e4e1e914be459184b7 | e993a7972529f60210d9dd6d7c4097c62c37bcdf | /eval/unconstrained/metrics/kid.py | f56c63f34953cdd8304711d8b88c8009a1bc19fc | [
"MIT"
] | permissive | GuyTevet/motion-diffusion-model | 64756013105a80ea2a3180a73ac86519b361e53b | 8139dda55d90a58aa5a257ebf159b2ecfb78c632 | refs/heads/main | 2023-09-01T05:00:14.156745 | 2023-06-06T23:42:33 | 2023-06-06T23:42:33 | 543,082,997 | 2,302 | 265 | MIT | 2023-08-29T09:27:54 | 2022-09-29T11:24:35 | Python | UTF-8 | Python | false | false | 4,848 | py | kid.py | import torch
import numpy as np
from tqdm import tqdm
from sklearn.metrics.pairwise import polynomial_kernel
import sys
# from: https://github.com/abdulfatir/gan-metrics-pytorch/blob/master/kid_score.py
def polynomial_mmd_averages(codes_g, codes_r, n_subsets=50, subset_size=1000,
ret_var=Tr... |
313e30746c37d0459b985c33f4987d28655ac4fb | a3d6556180e74af7b555f8d47d3fea55b94bcbda | /third_party/blink/web_tests/external/wpt/webdriver/tests/classic/get_element_rect/get.py | 942f119f43c9bb30eaefd52f3c793d7e47cfbfc4 | [
"GPL-1.0-or-later",
"MIT",
"LGPL-2.0-or-later",
"Apache-2.0",
"BSD-3-Clause",
"LicenseRef-scancode-warranty-disclaimer",
"LGPL-2.1-only",
"GPL-2.0-only",
"LGPL-2.0-only",
"BSD-2-Clause",
"LicenseRef-scancode-other-copyleft"
] | 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,057 | py | get.py | import pytest
from webdriver import Element
from tests.support.asserts import assert_error, assert_success
from tests.support.helpers import element_rect
def get_element_rect(session, element_id):
return session.transport.send(
"GET",
"session/{session_id}/element/{element_id}/rect".format(
... |
8a8a2906b10bad5605bd1c252388930653ad978a | 55f6a9b8f90ae308a90739fd8f77f4e7cd10ff19 | /spacy/tests/test_language.py | 51eec32399c192e15ea012c0cd8451633fcdd0fd | [
"MIT"
] | permissive | explosion/spaCy | cce07ee403aa398de7ba8941a2c11d22aea68021 | 3e4264899c3b12f8eabc5cd700146177a34824d0 | refs/heads/master | 2023-08-31T07:18:13.598768 | 2023-08-30T09:58:14 | 2023-08-30T09:58:14 | 21,467,110 | 26,348 | 4,983 | MIT | 2023-09-13T17:56:22 | 2014-07-03T15:15:40 | Python | UTF-8 | Python | false | false | 26,993 | py | test_language.py | import itertools
import logging
from unittest import mock
import pytest
from thinc.api import CupyOps, NumpyOps, get_current_ops
import spacy
from spacy.lang.de import German
from spacy.lang.en import English
from spacy.language import Language
from spacy.scorer import Scorer
from spacy.tokens import Doc, Span
from s... |
0e0b758646d77aafdf0a22db81928e6b96583db3 | 7bea5adf7d6284fbad0131d665e957d58adfe7c7 | /allauth/socialaccount/providers/paypal/views.py | 4f769c0b0af2eaff5bf95d39386446231d7065b2 | [
"MIT"
] | permissive | pennersr/django-allauth | 50c9e71c3666785368e92ed9e19ea0f6a5438cd2 | 6b8911a5ebbabda0d446f2743bd4d00d250ed500 | refs/heads/main | 2023-09-03T16:48:10.988418 | 2023-09-02T08:00:53 | 2023-09-02T08:00:53 | 976,994 | 7,719 | 3,481 | MIT | 2023-09-14T15:06:57 | 2010-10-10T20:10:52 | Python | UTF-8 | Python | false | false | 1,480 | py | views.py | import requests
from allauth.socialaccount.providers.oauth2.views import (
OAuth2Adapter,
OAuth2CallbackView,
OAuth2LoginView,
)
from .provider import PaypalProvider
class PaypalOAuth2Adapter(OAuth2Adapter):
provider_id = PaypalProvider.id
supports_state = False
@property
def authorize_... |
cd5e6a88168f88a8ca1d5f1555c759b787a852fe | 3c537c49c3acde75556f3e88033a72aae4b675c2 | /train_affectnet.py | 6369325f9fe0b4c1bb8a3ef18ef0bd2f03ef67e7 | [] | no_license | yangyuke001/FIIQA-PyTorch | a121a34f48131512688bd286ec06883703521239 | 29ab6af25a4e5beeffc6709752ff983fc6e7f4a6 | refs/heads/master | 2023-07-08T19:04:59.210444 | 2023-06-13T01:19:04 | 2023-06-13T01:19:04 | 185,769,820 | 325 | 31 | null | null | null | null | UTF-8 | Python | false | false | 7,057 | py | train_affectnet.py | '''Train CK+ with PyTorch.'''
# 10 crop for data enhancement
from __future__ import print_function
import torch
import torch.nn as nn
import torch.optim as optim
import torch.nn.functional as F
import torch.backends.cudnn as cudnn
import torchvision
from torchvision import transforms,utils
from torch.utils.data import... |
a6b9d2389e8602933ffcc95b8a31434c64c5a928 | 71c64688447767d68f680045ab6e760da2079081 | /scripts/checkpoint_averaging.py | 894c535ca9b1310394e06b5551c479f64793d498 | [
"BSD-3-Clause"
] | permissive | bzhangGo/zero | c5d347612f29b58218e82ed0c00573f7d4b67002 | d97e2c21b1c6d0467fe821223042247bf2b46bf9 | refs/heads/master | 2023-05-27T09:52:09.549934 | 2023-05-08T11:04:16 | 2023-05-08T11:04:16 | 152,663,011 | 145 | 27 | BSD-3-Clause | 2023-05-08T11:04:17 | 2018-10-11T22:25:09 | Python | UTF-8 | Python | false | false | 4,253 | py | checkpoint_averaging.py | # coding: utf-8
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import argparse
import operator
import os
import numpy as np
import tensorflow as tf
def parseargs():
msg = "Average checkpoints"
usage = "average.py [<args>] [-h | --help]"
pars... |
908ff09b8bc1158641137bdf1dd0a16f3460347f | 080db1ae362de6823e7c78ab6071c82e347ce967 | /jina/serve/runtimes/servers/__init__.py | 195a08ed5e4f6efd24c19b65a98e191768d27d12 | [
"Apache-2.0"
] | permissive | jina-ai/jina | c06898dc31dd3de1f917f30305e9460efedf97c3 | 23c7b8c78fc4ad67d16d83fc0c9f0eae9e935e71 | refs/heads/master | 2023-08-30T23:04:45.267920 | 2023-08-24T13:49:49 | 2023-08-24T13:49:49 | 240,315,046 | 20,687 | 2,460 | Apache-2.0 | 2023-09-14T12:30:45 | 2020-02-13T17:04:44 | Python | UTF-8 | Python | false | false | 10,011 | py | __init__.py | import abc
import time
from types import SimpleNamespace
from typing import TYPE_CHECKING, Dict, Optional, Union
from jina.logging.logger import JinaLogger
from jina.serve.instrumentation import InstrumentationMixin
from jina.serve.runtimes.monitoring import MonitoringMixin
import threading
__all__ = ['BaseServer']
... |
8a7dcc3b64a165480e46808647df43276e718e9f | 302ce5ab1045ee93845608c96580c63d54d730af | /src/spikeinterface/sortingcomponents/clustering/random_projections.py | fcbcac097f52a89b7c009bf7c4b4e565dd876cab | [
"MIT"
] | permissive | SpikeInterface/spikeinterface | f900b62720860b2881d2e6b5fa4441e0e560f625 | ee2237b3f5ce2347b2ec9df90e97b0ee6c738dcf | refs/heads/main | 2023-09-02T11:27:54.687021 | 2023-09-01T13:48:29 | 2023-09-01T13:48:29 | 196,581,117 | 295 | 133 | MIT | 2023-09-14T19:12:16 | 2019-07-12T13:07:46 | Python | UTF-8 | Python | false | false | 9,425 | py | random_projections.py | # """Sorting components: clustering"""
from pathlib import Path
import shutil
import numpy as np
try:
import hdbscan
HAVE_HDBSCAN = True
except:
HAVE_HDBSCAN = False
import random, string, os
from spikeinterface.core import get_global_tmp_folder, get_noise_levels, get_channel_distances, get_random_data_... |
3a92296bbb7899449b0193069ebd79108e445d62 | b7163b44b679e082fe97cf7fcd0c73b2fcdb38eb | /modules/dbnd/src/dbnd/_vendor/pendulum/lang/ko.py | 60d1bc38d71153ea9248bb727582620e82832b20 | [
"Apache-2.0"
] | permissive | databand-ai/dbnd | 70c95d95e12bfb8ab471a6dce27691ed658cb92d | d59c99dcdcd280d7eec36a693dd80f8c8c831ea2 | refs/heads/develop | 2023-06-24T18:07:56.524526 | 2023-05-28T07:57:36 | 2023-05-28T07:57:36 | 231,361,064 | 257 | 33 | Apache-2.0 | 2023-08-06T08:30:28 | 2020-01-02T10:42:47 | Python | UTF-8 | Python | false | false | 1,626 | py | ko.py | # -*- coding: utf-8 -*-
translations = {
# Days
'days': {
0: '일요일',
1: '월요일',
2: '화요일',
3: '수요일',
4: '목요일',
5: '금요일',
6: '토요일'
},
'days_abbrev': {
0: '일',
1: '월',
2: '화',
3: '수',
4: '목',
5: '금',
... |
cc103c98d0e6f321e01c2dbe2e963cefa470807a | 4e1dd6791505a154d92d6352e619c254e12ed574 | /wagtail_localize/tests/test_tasks.py | b96eff6284a31a3a843d7578634c096eb3190c4d | [
"BSD-3-Clause"
] | permissive | wagtail/wagtail-localize | fba4b9db6c1b043a96d59178dede31dc117f9674 | 3f060bd061249815a8fbc79dc1c6e3e954ee3ecb | refs/heads/main | 2023-08-04T14:32:06.683373 | 2023-07-27T15:02:52 | 2023-07-27T15:02:52 | 179,706,908 | 183 | 72 | NOASSERTION | 2023-09-07T08:33:48 | 2019-04-05T15:21:14 | Python | UTF-8 | Python | false | false | 647 | py | test_tasks.py | from unittest import mock
from django.test import TestCase, override_settings
from wagtail_localize.tasks import get_backend
@override_settings(
WAGTAILLOCALIZE_JOBS={
"BACKEND": "wagtail_localize.tasks.DjangoRQJobBackend",
"OPTIONS": {"queue": "test_queue"},
}
)
@mock.patch("django_rq.get_q... |
268942093cce70a3a832241466b76cdcecd7172b | 360ef22d5900573a4f0ed69b5f36109acea05e2b | /vumi/tests/test_utils.py | 7478a3e0b02b246e09c02848075e271e8689d9d8 | [
"BSD-2-Clause"
] | permissive | praekeltfoundation/vumi | 8e756580b9027f2d7e7ffd06dcf07694188e4a39 | b74b5dac95df778519f54c670a353e4bda496df9 | refs/heads/develop | 2023-08-28T15:04:56.021337 | 2020-11-16T07:55:34 | 2020-11-16T07:55:34 | 1,081,665 | 117 | 18 | BSD-3-Clause | 2023-06-19T17:44:45 | 2010-11-15T11:34:03 | Python | UTF-8 | Python | false | false | 19,072 | py | test_utils.py | import os.path
from twisted.internet import reactor
from twisted.internet.defer import Deferred, inlineCallbacks, returnValue
from twisted.internet.error import ConnectionDone
from twisted.internet.protocol import Protocol, Factory
from twisted.internet.task import Clock
from twisted.web.server import Site, NOT_DONE_Y... |
976676019b1ebf5e645d7884c3960c559d5d7ec5 | e5e0d729f082999a9bec142611365b00f7bfc684 | /tensorflow/contrib/checkpoint/python/containers.py | a25d51980ea760dfb7f323497a397fbd94fd5f23 | [
"Apache-2.0"
] | permissive | NVIDIA/tensorflow | ed6294098c7354dfc9f09631fc5ae22dbc278138 | 7cbba04a2ee16d21309eefad5be6585183a2d5a9 | refs/heads/r1.15.5+nv23.03 | 2023-08-16T22:25:18.037979 | 2023-08-03T22:09:23 | 2023-08-03T22:09:23 | 263,748,045 | 763 | 117 | Apache-2.0 | 2023-07-03T15:45:19 | 2020-05-13T21:34:32 | C++ | UTF-8 | Python | false | false | 2,943 | py | containers.py | """Trackable data structures."""
# 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... |
413bd7ab86efe9fdc979bb22c4e5bdacad0714b4 | fa6e1299ef52ca2d4a13b3788d2a4d0540728f81 | /tests/unit/transform/test_post.py | e21802afacbbdd0de900b3169e0168468fc964d9 | [
"Apache-2.0"
] | permissive | Project-MONAI/MONAILabel | c3abd164255a50279fc5aa6a87f4336fff4d6833 | c90f42c0730554e3a05af93645ae84ccdcb5e14b | refs/heads/main | 2023-09-01T21:44:42.465238 | 2023-08-31T17:17:08 | 2023-08-31T17:17:08 | 351,826,770 | 448 | 167 | Apache-2.0 | 2023-09-14T12:06:28 | 2021-03-26T15:25:10 | Python | UTF-8 | Python | false | false | 4,996 | py | test_post.py | # Copyright (c) MONAI Consortium
# 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, so... |
5d016b723c6a2759ba956d4216796798639f3747 | b5a6d68eabc99fcd8ff9a456cc52fb8ec7f588e6 | /chapter_10/p02_group_anagrams.py | 968e525e2bc9b3c1c3ce15baf5cb12a0d3be4f85 | [] | no_license | careercup/CtCI-6th-Edition-Python | 89ce160feddc3065e53dee9ea0f3565fec4466c4 | 6be09720f400e892d416747adde383545bc650d2 | refs/heads/master | 2023-08-31T05:51:25.107342 | 2022-11-06T09:23:08 | 2022-12-18T05:12:18 | 51,567,632 | 5,034 | 2,089 | null | 2023-09-12T05:11:10 | 2016-02-12T04:47:40 | Python | UTF-8 | Python | false | false | 859 | py | p02_group_anagrams.py | from collections import defaultdict
def group_anagrams(words):
anagrams = defaultdict(list)
for word in words:
sorted_word = "".join(sorted(word.lower()))
anagrams[sorted_word].append(word)
sorted_words = []
for similar_words in anagrams.values():
sorted_words.extend(similar_w... |
43036e61e7214b561c485f11e07a5cb95336e7b6 | a4dd3fc9021a2b6e218da7ffd35fd4dba48b8f86 | /Python/Sorting Algorithms/topological-sort.py | e01a7486ffb02be6c5d0f0a0ab4c074985baa8e5 | [
"MIT"
] | permissive | starkblaze01/Algorithms-Cheatsheet-Resources | 19d23705e32c5e5c5408bcd3a3d1d9df289e0cd9 | ac59f34f3f03b189d858ed1afe6a2ab83402d408 | refs/heads/master | 2023-05-26T18:15:31.006039 | 2023-01-31T10:00:01 | 2023-01-31T10:00:01 | 158,492,042 | 289 | 146 | MIT | 2023-05-23T02:22:20 | 2018-11-21T04:45:37 | Python | UTF-8 | Python | false | false | 510 | py | topological-sort.py |
def topological_sort(graph, start):
seen = set()
stack = [] #path variable is gone, stack and order are new
order = [] #order will be in reverse order at first
s = [start]
while s:
x = s.pop()
if x not in seen:
seen.add(x) #no need to apend to path
... |
bf43e991eea554cbb7477dd87bc6a02ae4df918c | 80d505489f5354d4b29156d6eea7e3516162bcc7 | /exercises/practice/markdown/markdown.py | 3c4bd2fa86a7d9863bf41868b21b133787a6d2b6 | [
"Python-2.0",
"BSD-3-Clause",
"MIT"
] | permissive | exercism/python | 419e89690070eef42fc4c932faa0df0706d5c222 | 1e71b8a00c8b34c251d785f0a10843efc5234994 | refs/heads/main | 2023-08-29T03:18:02.845245 | 2023-08-25T12:50:16 | 2023-08-25T12:50:16 | 17,274,389 | 1,588 | 1,513 | MIT | 2023-09-14T20:33:13 | 2014-02-28T03:48:58 | Python | UTF-8 | Python | false | false | 2,720 | py | markdown.py | import re
def parse(markdown):
lines = markdown.split('\n')
res = ''
in_list = False
in_list_append = False
for i in lines:
if re.match('###### (.*)', i) is not None:
i = '<h6>' + i[7:] + '</h6>'
elif re.match('##### (.*)', i) is not None:
i = '<h5>' + i[6:]... |
0235f1167782cc328f44f056bf6362e789994654 | ddd46f20859c48fd35136ffe775a4b5c7b549949 | /code/chp12-scraping/selenium_form_submit.py | d3e9e5623241b2470403b89f13c9d45eb55e61c8 | [] | no_license | jackiekazil/data-wrangling | 0a0200d5350dc686907d0abc472f5dce92ac5985 | 9d56a0c6cf8067246d9ee70246db4578fdd08354 | refs/heads/master | 2023-02-22T09:25:15.015542 | 2022-11-08T16:05:06 | 2022-11-08T16:05:06 | 40,521,573 | 583 | 651 | null | 2023-02-10T20:20:17 | 2015-08-11T04:36:09 | HTML | UTF-8 | Python | false | false | 634 | py | selenium_form_submit.py | from selenium import webdriver
from time import sleep
browser = webdriver.Firefox()
browser.get('http://google.com')
inputs = browser.find_elements_by_css_selector('form input')
for i in inputs:
if i.is_displayed():
search_bar = i
break
search_bar.send_keys('web scraping with python')
search_bu... |
755c87fbd73ec97ac75e678ff62cd32aa1f3d886 | 99833651e4a6a0bc1221d577d9fc43b8568abedd | /nltk_contrib/misc/langid.py | 2211a17bf35489dce107a86b4c7b031d93a15a32 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | nltk/nltk_contrib | 689e2683aa01b120c7473b9a4fc50bc49f014390 | 95d1806e2f4e89e960b76a685b1fba2eaa7d5142 | refs/heads/master | 2023-07-31T13:32:47.358897 | 2022-11-21T18:49:33 | 2022-11-21T18:49:33 | 2,530,774 | 145 | 127 | NOASSERTION | 2022-11-21T18:49:34 | 2011-10-07T05:59:13 | Python | UTF-8 | Python | false | false | 1,582 | py | langid.py | """
Sam Huston 2007
This is a simulation of the article:
"Evaluation of a language identification system for mono- and multilingual text documents"
by Artemenko, O; Mandl, T; Shramko, M; Womser-Hacker, C.
presented at: Applied Computing 2006, 21st Annual ACM Symposium on Applied Computing; 23-27 April 2006
This imple... |
3c5e57f85ee34f53625744a15de825f1e3e9041a | 2d6323b8ccaf08a8929dba79fb9575c436977bd4 | /docassemble_demo/docassemble/demo/fruit_database.py | efbb815b7e063e14ef55f0ebacf1e18651947345 | [
"MIT"
] | permissive | jhpyle/docassemble | f1c36e73d02807a7052b860dfceecdfa88e728c7 | 8726242cfbe3a15cad610dc2b518346be68ab142 | refs/heads/master | 2023-09-01T20:03:39.497473 | 2023-08-26T12:44:45 | 2023-08-26T12:44:45 | 34,148,903 | 691 | 300 | MIT | 2023-09-09T20:08:14 | 2015-04-18T02:09:32 | Python | UTF-8 | Python | false | false | 835 | py | fruit_database.py | import pandas
from docassemble.base.util import path_and_mimetype
__all__ = ['get_fruit_names', 'fruit_info']
fruit_info_by_name = {}
fruit_names = []
def read_data(filename):
the_xlsx_file, mimetype = path_and_mimetype(filename) # pylint: disable=unused-variable
df = pandas.read_excel(the_xlsx_file)
f... |
311c9025e49d1111702d194bb78fe4ca54bef031 | 8de1480d6511ac81c43ebb1fa50875adb1505c3b | /awx/main/tests/conftest.py | 28565901b06a879f8e8554258d679c980ed371e6 | [
"Apache-2.0"
] | permissive | ansible/awx | bbbb0f3f43835a37fbb3eb3dcd7cfe98116fbbba | 5e105c2cbd3fe828160540b3043cf6f605ed26be | refs/heads/devel | 2023-08-31T11:45:01.446444 | 2023-08-31T04:58:57 | 2023-08-31T04:58:57 | 91,594,105 | 13,353 | 4,186 | NOASSERTION | 2023-09-14T20:20:07 | 2017-05-17T15:50:14 | Python | UTF-8 | Python | false | false | 6,607 | py | conftest.py | # Python
import pytest
from unittest import mock
from contextlib import contextmanager
from awx.main.models import Credential, UnifiedJob, Instance
from awx.main.tests.factories import (
create_organization,
create_job_template,
create_instance,
create_instance_group,
create_notification_template,
... |
e2e7a50045556e59f438ab2eb9760f6ab3e26acf | a3d6556180e74af7b555f8d47d3fea55b94bcbda | /third_party/fuchsia-gn-sdk/src/prepare_package_inputs.py | a1a25252ed4a5f164688d478bc1d9f5c38641867 | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference",
"BSD-2-Clause",
"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 | 12,497 | py | prepare_package_inputs.py | #!/usr/bin/env python3.8
# Copyright 2019 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# Derivative work of https://chromium.googlesource.com/chromium/src/+/HEAD/build/config/fuchsia/prepare_package_inputs.py
#
"""Crea... |
fed0ffe9ab1a1f40f3fb785db6a6ece9ed25aa42 | bbd69601912a3361d788efd03a47f9d4e3bac09e | /docs/sphinx/rest_substitutions/snippets/python/converted/wx.Font.__init__.2.py | 68d30a6818c7f33320bb5c3db74cafcc3683a991 | [] | no_license | wxWidgets/Phoenix | 56929484460a0399a8f1d9582bc77c20aa14748d | a1184286703cf24c4b88e5bc14cf2979c1b1ea00 | refs/heads/master | 2023-09-01T07:10:17.437093 | 2023-08-31T05:38:01 | 2023-08-31T05:38:01 | 5,078,061 | 2,268 | 677 | null | 2023-09-09T17:06:59 | 2012-07-17T06:22:25 | Python | UTF-8 | Python | false | false | 147 | py | wx.Font.__init__.2.py | # Create a font using the old-style constructor
font = wx.Font(10, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD, True)
|
0ae5dcb54d3c96d94b5cf015a5889d1522735443 | f7a656e5676e90e6b70674be59907360a5ceaaa2 | /docker-images/app/main.py | 0abccfdd0f67e17f18cb45c3347917e579e47d9a | [
"MIT"
] | permissive | tiangolo/uvicorn-gunicorn-docker | c54c342e1df477f3196729b46ad5506609aa4797 | 49d3538121828a20f22b609c8278246e94a71d82 | refs/heads/master | 2023-09-03T17:24:42.410151 | 2023-07-09T13:12:47 | 2023-07-09T13:12:47 | 164,100,644 | 564 | 291 | MIT | 2023-09-05T06:51:24 | 2019-01-04T11:44:13 | Python | UTF-8 | Python | false | false | 640 | py | main.py | import sys
class App:
def __init__(self, scope):
assert scope["type"] == "http"
self.scope = scope
async def __call__(self, receive, send):
await send(
{
"type": "http.response.start",
"status": 200,
"headers": [[b"content-ty... |
ef0a7c5cf367e725b59795e1b6c0fa1478a83600 | fa1ad2e2ac7e376fc7cb3b3a6e1bb88eed3e80be | /dts/airbyte/airbyte-integrations/connectors/source-jira/unit_tests/test_source.py | 0abeb53115bbfa82d781be40e14b802df33a9ac1 | [
"MIT",
"Elastic-2.0",
"Apache-2.0",
"BSD-3-Clause"
] | 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,142 | py | test_source.py | #
# Copyright (c) 2023 Airbyte, Inc., all rights reserved.
#
from unittest.mock import MagicMock
import responses
from source_jira.source import SourceJira
@responses.activate
def test_streams(config):
source = SourceJira()
streams = source.streams(config)
expected_streams_number = 51
assert len(str... |
ff81c2fc86d433c70375980a41274ed0cd717c7d | 05e634a232574f676434dfa8e4183f3d0a1a4bc9 | /paddlecv/ppcv/ops/models/ocr/__init__.py | acb84341c2f526d0dec86229261ca8b97dc030ca | [
"Apache-2.0"
] | permissive | PaddlePaddle/models | 67ac00d93c5255ac64a9d80ae5be2e8927e47cee | 8042c21b690ffc0162095e749a41b94dd38732da | refs/heads/release/2.4 | 2023-09-04T15:23:59.543625 | 2023-07-20T11:54:16 | 2023-07-20T11:54:16 | 88,868,842 | 7,633 | 3,597 | Apache-2.0 | 2023-09-05T23:23:54 | 2017-04-20T13:30:15 | Python | UTF-8 | Python | false | false | 1,039 | py | __init__.py | # Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Un... |
976bad63fe79aa3184435b7999e5382e94b02648 | 975b2d421d3661e6770b601929d5f11d981d8985 | /msgraph/generated/models/delegated_admin_relationship_operation.py | 681ef839589a7410c71a753c293ace9210deae6c | [
"MIT"
] | permissive | microsoftgraph/msgraph-sdk-python | a7c551b85daadeebf76ec4ae12668664ea639b42 | 27de7ccbe688d7614b2f6bde0fdbcda4bc5cc949 | refs/heads/main | 2023-09-03T21:45:27.989672 | 2023-08-31T06:22:18 | 2023-08-31T06:22:18 | 534,665,999 | 135 | 18 | MIT | 2023-09-14T11:04:11 | 2022-09-09T14:00:17 | Python | UTF-8 | Python | false | false | 3,868 | py | delegated_admin_relationship_operation.py | from __future__ import annotations
import datetime
from dataclasses import dataclass, field
from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter
from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union
if TYPE_CHECKING:
from .delegated_admin_relationship_operati... |
5b88c445feee4f592768769ff319ea991d24e9b9 | d4558f1008f672686f2cb238ab5d86a2c2080b40 | /OpenCV models/ImageHistogram.py | efd75a5801a91f2097ed6aa16258c342326679f6 | [
"BSD-2-Clause",
"MIT"
] | permissive | amarlearning/Finger-Detection-and-Tracking | 9e5f323f8cb49ad403877d4e7f6ab3cf640a531c | 0bf6aef056a1850fe101317a72a57d2b4abb8bc9 | refs/heads/master | 2023-05-30T11:19:45.405599 | 2023-05-12T12:01:52 | 2023-05-12T12:01:52 | 135,921,262 | 341 | 163 | MIT | 2023-05-12T11:57:23 | 2018-06-03T16:29:59 | Python | UTF-8 | Python | false | false | 998 | py | ImageHistogram.py | import cv2
import matplotlib.pyplot as plt
import numpy as np
def main():
image = cv2.imread("../data/4.1.03.tiff", 1)
image_rgb = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
red_hist = cv2.calcHist([image_rgb], [0], None, [256], [0, 255])
green_hist = cv2.calcHist([image_rgb], [1], None, [256], [0, 255])... |
fea036349acdca61b65891ddcd8c462b2a0f738c | b305d7e8d309d963750ecfca62a4ea4b16d01b1f | /examples/pytest/test_commands.py | 339829ee2202ed431f2e73c93b8d38e5e1a63a92 | [
"MIT"
] | permissive | JosXa/tgintegration | 67440042039e67e70402cce01c018d354e841104 | 39dfc82eb5c80bb6845c12edf0c112e2fa7de26f | refs/heads/master | 2023-07-21T17:08:09.425620 | 2022-12-01T18:38:50 | 2022-12-01T18:38:50 | 131,617,892 | 132 | 20 | MIT | 2023-07-20T11:37:36 | 2018-04-30T16:11:49 | Python | UTF-8 | Python | false | false | 504 | py | test_commands.py | import pytest
from tgintegration import BotController
from tgintegration import Response
@pytest.mark.asyncio
async def test_commands(controller: BotController):
# The BotController automatically loads the available commands and we test them all here
for c in controller.command_list:
async with contr... |
2c426f555da3dae5915ad72fcba8a48c1789e0e2 | 8d44e796eaf0c8e11bbc2a27ef093e97a25b6f4a | /haystack/pipelines/ray.py | 891e276094703c6c1edef2a1e69b226be5612278 | [
"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 | 23,577 | py | ray.py | from __future__ import annotations
import inspect
import logging
from time import time
from typing import Any, Dict, List, Optional, Tuple, Union
from pathlib import Path
import networkx as nx
try:
from ray import serve
import ray
except:
ray = None # type: ignore
serve = None # type: ignore
from h... |
2d2756f516f6899bce1ece648ac6ab8c5d9451bd | a2a7506038b69541523f98f2f98613d731ad2acf | /intensity_normalization/cli/nyul.py | 93726ec9a761c29874826cc456226c9148ff2a02 | [
"Apache-2.0"
] | permissive | jcreinhold/intensity-normalization | 163e3ed26ea80acef1513e448b7fef78a2c6ddf2 | ce53748bb6b6721acad031d3b98a2e8f9921e4c6 | refs/heads/master | 2023-06-10T03:25:17.287607 | 2023-05-31T21:03:26 | 2023-05-31T21:03:26 | 136,844,850 | 283 | 62 | NOASSERTION | 2022-02-25T22:59:54 | 2018-06-10T21:05:58 | Python | UTF-8 | Python | false | false | 337 | py | nyul.py | """CLI for Nyul & Udupa normalization
Author: Jacob Reinhold <jcreinhold@gmail.com>
Created on: 13 Oct 2021
"""
__all__ = ["nyul_main", "nyul_parser"]
from intensity_normalization.normalize.nyul import NyulNormalize
# main functions and parsers for CLI
nyul_parser = NyulNormalize.parser()
nyul_main = NyulNormalize.m... |
6ede53e97cc1dfbf44d0e837d39530f357f0d5b5 | 0af82f2ffe99791edf241c8664a88d6e154936fd | /modules/life.py | ae872287d465d5496a5f8b2d3aa18fbdfa29fe08 | [
"MIT"
] | permissive | yoda-pa/yoda | 4d47a219d9adf283e1a43a842c10a4ef1faeaf97 | 83616f28e5e69aac40ed54247091a2f93f8f9464 | refs/heads/master | 2023-04-13T16:50:17.693638 | 2023-04-10T04:03:27 | 2023-04-10T04:03:27 | 77,321,225 | 777 | 245 | MIT | 2023-08-30T14:49:33 | 2016-12-25T10:35:07 | Python | UTF-8 | Python | false | false | 17,989 | py | life.py | from __future__ import division
from __future__ import absolute_import
from builtins import input
from builtins import str
from past.utils import old_div
import json
import os.path
import time
import datetime
from Crypto.Cipher import AES
from .config import get_config_file_paths
from modules.setup import cypher_pass... |
9fa3ca5e0d3888e3a818747ca52710df45a6ff54 | 807438e6974bf68762208ec24cf824dd0e5fabd6 | /libcloud/common/aws.py | b575b66ccb5eb234302ce45537948efeeaffb55c | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | apache/libcloud | 019c5bd839dedd2423f9604936886eaff252e04b | abba8c1719a8bda6db8efde2d46fd1b423ae4304 | refs/heads/trunk | 2023-08-31T20:14:22.369970 | 2023-08-21T20:17:57 | 2023-08-21T20:17:57 | 419,555 | 1,644 | 968 | Apache-2.0 | 2023-09-13T19:34:44 | 2009-12-11T09:00:14 | Python | UTF-8 | Python | false | false | 16,555 | py | aws.py | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... |
288f11c758be309fdb989a9839243638e0eb1d1b | d110546d747d7e3865ce5742d5fca09f404623c0 | /salt/roster/ansible.py | 52c16cedb0d45e1bca1defbaa819f9ead99eff01 | [
"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 | 4,902 | py | ansible.py | """
Read in an Ansible inventory file or script.
Flat inventory files should be in the regular ansible inventory format.
.. code-block:: ini
# /tmp/example_roster
[servers]
salt.gtmanfred.com ansible_ssh_user=gtmanfred ansible_ssh_host=127.0.0.1 ansible_ssh_port=22 ansible_ssh_pass='password' ansible_sud... |
6c0b0e50b22fce8e53dd207ae0b3d2be280c0bdd | 5ef6c8d47864f471e26b9902d61f8c687e941f05 | /src/genie/libs/parser/iosxe/tests/ShowPlatformTcamAcl/cli/equal/golden_output_1_expected.py | 3a7242b823ce309d5869f43ef9cb9c786119ed5c | [
"Apache-2.0"
] | permissive | CiscoTestAutomation/genieparser | 169c196558f1c1a0f0d10650876096f993224917 | b531eff760b2e44cd69d7a2716db6f866907c239 | refs/heads/master | 2023-09-03T08:56:18.831340 | 2023-08-29T22:32:02 | 2023-08-29T22:32:02 | 131,621,824 | 247 | 409 | Apache-2.0 | 2023-08-29T22:32:04 | 2018-04-30T16:51:50 | Python | UTF-8 | Python | false | false | 1,069 | py | golden_output_1_expected.py | expected_output = {
'index': {
'1152': {
'labels': {
'M:': {
'dstaddr': 00000000,
'l3err': 00,
'l3len': 0000,
'l3pro': 00,
'l3tos': 00,
'mtrid': 00,
... |
e17b99cd2aaf418d35985fd3ee476b3551469320 | eced4731f9ad808ed47f037ebf5462b98376583f | /arelle/XhtmlValidate.py | f0ce874645b7cfe22e008bfb58faf7dbb9ae2b71 | [
"BSD-3-Clause",
"LicenseRef-scancode-warranty-disclaimer",
"Apache-2.0",
"MIT"
] | permissive | Arelle/Arelle | 05afdec4eb5a13cdd981accdbd01b87bad72ea5e | 2c522ed0ffe57e273d6596dd38bf62568d2eb4d8 | refs/heads/master | 2023-08-30T21:53:05.997184 | 2023-08-29T16:00:01 | 2023-08-29T16:00:01 | 1,866,915 | 395 | 253 | NOASSERTION | 2023-09-14T14:13:10 | 2011-06-08T18:33:19 | Python | UTF-8 | Python | false | false | 6,462 | py | XhtmlValidate.py | '''
See COPYRIGHT.md for copyright information.
(originally part of XmlValidate, moved to separate module)
'''
from arelle import XbrlConst, XmlUtil, XmlValidate, ValidateFilingText, UrlUtil
from arelle.ModelXbrl import ModelXbrl
from arelle.ModelObject import ModelObject
from lxml import etree
import os, posixpath
h... |
85b32ec0f7030e95b68efc3f4655d1f94e8c2f91 | 0a8a4bfd6b4ffcfb7c99119c83cb3abe17c4a8f6 | /openhtf/plugs/__init__.py | f3dfbc0be97a24045391961e2e802fa2e2523b73 | [
"MIT",
"Apache-2.0"
] | permissive | google/openhtf | 58c06e07508f9bb2079070a5ac03898fc68c1778 | 3a9a24987b2b34782fca55a8df8d007167dbb19a | refs/heads/master | 2023-08-23T12:12:54.917649 | 2023-07-27T01:51:17 | 2023-07-27T01:51:43 | 41,519,483 | 471 | 253 | Apache-2.0 | 2023-09-12T00:47:42 | 2015-08-28T01:14:17 | Python | UTF-8 | Python | false | false | 14,633 | py | __init__.py | # Copyright 2014 Google Inc. All Rights Reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agre... |
2ebb7e852fdd28955e5da4ec5fd58949e64ef5d7 | c899cccda9a8cd73a1942a4f8b897e6d5347a246 | /tests/cli/test_shell.py | c95d918c9198c68dff1d6438cf8bd8f2f5962012 | [
"MIT"
] | permissive | tmux-python/tmuxp | f2a03749058750e0c378f4179e844d702be182d7 | e0880e7574fab66c8be5a1fb521938733d3056f4 | refs/heads/master | 2023-09-04T12:31:16.099042 | 2023-09-04T12:13:40 | 2023-09-04T12:13:40 | 12,398,170 | 2,072 | 144 | MIT | 2023-09-02T10:32:11 | 2013-08-27T05:51:11 | Python | UTF-8 | Python | false | false | 7,301 | py | test_shell.py | import contextlib
import io
import pathlib
import subprocess
import typing as t
import pytest
from libtmux.server import Server
from libtmux.session import Session
from tmuxp import cli, exc
@pytest.mark.parametrize("cli_cmd", [["shell"], ["shell", "--pdb"]])
@pytest.mark.parametrize(
"cli_args,inputs,env,expec... |
7d4346c7c9722be0b41cd9059a674f7a0a239d0a | 45e376ae66b78b17788b1d3575b334b2cb1d0b1c | /tests/config/TestConfigFile.py | 44555049428693ec178b13920c2724eabb155753 | [
"Apache-2.0"
] | permissive | bridgecrewio/checkov | aeb8febed2ed90e61d5755f8f9d80b125362644d | e64cbd27ffb6f09c2c9f081b45b7a821a3aa1a4d | refs/heads/main | 2023-08-31T06:57:21.990147 | 2023-08-30T23:01:47 | 2023-08-30T23:01:47 | 224,386,599 | 5,929 | 1,056 | Apache-2.0 | 2023-09-14T20:10:23 | 2019-11-27T08:55:14 | Python | UTF-8 | Python | false | false | 1,571 | py | TestConfigFile.py | import unittest
import configargparse
from checkov.common.util.ext_argument_parser import ExtArgumentParser
class TestConfigFile(unittest.TestCase):
def test_pass(self):
argv = ['--ca-certificate', '----- BEGIN CERTIFICATE ----- <KEY> ----- END CERTIFICATE -----',
'--compact', '--director... |
6bb230de8d562da7e56133f7dd7fb6476f550ee7 | 620323fc090cebaf7aca456ff3f7fbbe1e210394 | /html_parsing/wikipedia/get_seasons_anime_Dorohedoro.py | 091db02c3f79ee3ec04d30ef09601543542923b8 | [
"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 | 417 | py | get_seasons_anime_Dorohedoro.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = "ipetrash"
import re
import requests
def get_seasons() -> list[str]:
rs = requests.get("https://en.wikipedia.org/wiki/List_of_Dorohedoro_episodes")
rs.raise_for_status()
items = re.findall(r"Season \w+", rs.text, flags=re.IGNORECASE)
retu... |
d994a0438c8fc84f302ceb983db65550826247e6 | 7af0ff378525ef6132f74bac0b1eb54ce4c40c08 | /indico/modules/users/api.py | f3b8f9d2c5da1eb5056ada0b2166e0850df5ab2f | [
"MIT"
] | permissive | indico/indico | 1126ee0ac3e9d36510a64989ce71be9c02680831 | 463951511d3a8409f944f98f29875c4323f3e897 | refs/heads/master | 2023-08-31T11:15:00.092526 | 2023-08-30T11:07:25 | 2023-08-30T11:07:25 | 2,113,067 | 1,549 | 429 | MIT | 2023-09-13T20:09:56 | 2011-07-27T13:56:30 | Python | UTF-8 | Python | false | false | 1,490 | py | api.py | # This file is part of Indico.
# Copyright (C) 2002 - 2023 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.
from flask import jsonify, session
from indico.modules.users import User
from indico.web.http_api.hooks.b... |
c3afc7fe9b734691c1f36252e9650569af53c306 | 13ce98780a7e6e7e1412ae91a0fa97a91cf66a73 | /examples/translations/chinese_test_1.py | 7b417ce3da9dcc44fcef0fd41bf4d66d3d00f4ad | [
"MIT"
] | permissive | seleniumbase/SeleniumBase | c607312c0b8f45297088c1283150eb73ea32c553 | 63d95c42fc84bbcea415c6d8a3a201587b89c92e | refs/heads/master | 2023-09-06T05:58:07.923058 | 2023-09-02T14:14:03 | 2023-09-02T14:14:03 | 17,420,614 | 3,656 | 944 | MIT | 2023-09-13T21:12:20 | 2014-03-04T23:07:33 | Python | UTF-8 | Python | false | false | 1,193 | py | chinese_test_1.py | # Chinese Language Test
from seleniumbase.translate.chinese import 硒测试用例
硒测试用例.main(__name__, __file__)
class 我的测试类(硒测试用例):
def test_例子1(self):
self.开启("https://zh.wikipedia.org/wiki/")
self.断言标题("维基百科,自由的百科全书")
self.断言元素('a[title="Wikipedia:关于"]')
self.断言文本("新闻动态", "span#新闻动态")
... |
465edd34bbf7882132ad86baba5118824723d658 | 02ef81922198f93ea3848d38dac06bf97f481dfa | /tests/urls.py | c249b021bbd808dacd3825bdab8e67074b0cffb7 | [
"BSD-3-Clause"
] | permissive | carltongibson/django-filter | e409976a37e6fb7bbf4598d0c45ac4fcbb65a36e | e5fc05dc00c420ae4dc9390ec6126eb9fc09ae06 | refs/heads/main | 2023-09-03T23:54:34.574330 | 2023-08-31T15:33:35 | 2023-08-31T15:45:32 | 117,741 | 3,009 | 651 | NOASSERTION | 2023-09-04T16:46:32 | 2009-01-30T00:35:57 | Python | UTF-8 | Python | false | false | 354 | py | urls.py | from django.urls import path
from django_filters.views import FilterView, object_filter
from .models import Book
def _foo():
return "bar"
urlpatterns = [
path(
"books-legacy/",
object_filter,
{"model": Book, "extra_context": {"foo": _foo, "bar": "foo"}},
),
path("books/", F... |
a05276e7029d2488f44179b85311b9f4aa900045 | 9f84d91a8ae3df53b07fe3267992fba00a99ac9e | /test/nn/conv/test_gps_conv.py | a1acd496d360ce682fb338834514904a96c828c8 | [
"MIT"
] | permissive | pyg-team/pytorch_geometric | ebea601eae228f3905465b5c2349d3fb3bb5cb26 | a52af694b8ce6a80811e20966fe6d08a3e7511fe | refs/heads/master | 2023-08-31T04:13:40.943308 | 2023-08-30T12:48:42 | 2023-08-30T12:48:42 | 106,024,057 | 6,775 | 1,563 | MIT | 2023-09-14T17:10:18 | 2017-10-06T16:03:03 | Python | UTF-8 | Python | false | false | 1,413 | py | test_gps_conv.py | import pytest
import torch
import torch_geometric.typing
from torch_geometric.nn import GPSConv, SAGEConv
from torch_geometric.typing import SparseTensor
from torch_geometric.utils import to_torch_csc_tensor
@pytest.mark.parametrize('attn_type', ['multihead', 'performer'])
@pytest.mark.parametrize('norm', [None, 'ba... |
bca5711b87161e56e677bc93122074d54eddb599 | 2337351b228818e41be3002bd38f68f77c2aa074 | /tests/test_0003_migrate_lb.py | 18cb63df669224e1c339299dc847e5895dfe5ad9 | [
"BSD-3-Clause"
] | permissive | nocproject/noc | 57d40c680a1499374463e472434f9595ed6d1374 | 6e6d71574e9b9d822bec572cc629a0ea73604a59 | refs/heads/master | 2023-08-31T01:11:33.544573 | 2023-08-30T17:31:11 | 2023-08-30T17:31:11 | 107,815,776 | 105 | 33 | BSD-3-Clause | 2023-07-31T07:57:45 | 2017-10-21T21:04:33 | Python | UTF-8 | Python | false | false | 631 | py | test_0003_migrate_lb.py | # ----------------------------------------------------------------------
# Test migrate-liftbridge
# ----------------------------------------------------------------------
# Copyright (C) 2007-2020 The NOC Project
# See LICENSE for details
# ----------------------------------------------------------------------
# Thir... |
8fecbc735a6a5b44db2216eed9a7972cc6a506f0 | 660c4c4c14b29109a772b00169a0fd50108273fa | /tests/test_compute.py | 76e9d4e11845a1e12662c1c1b79a8523a7348208 | [
"Apache-2.0"
] | permissive | matrix-profile-foundation/matrixprofile | 80c3e026c11b39e6431b0e248cdd04f9eb482858 | 6fbd5fe2fd0e93162ef77c4da1b30188072dd404 | refs/heads/master | 2022-11-28T13:26:12.289263 | 2022-11-25T13:40:05 | 2022-11-25T13:40:05 | 198,119,545 | 345 | 77 | Apache-2.0 | 2023-08-17T17:40:45 | 2019-07-22T00:33:37 | Python | UTF-8 | Python | false | false | 5,959 | py | test_compute.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
range = getattr(__builtins__, 'xrange', range)
# end of py2 compatability boilerplate
import os
import pytest
import nump... |
30b969ecae5de9e3cec4beade197ce8e91e5efad | 9b391863599ecc26a6804f9f272f8c7f2aee8a8c | /tick/preprocessing/tests/longitudinal_features_lagger_test.py | 5aec583b737891920a670445037bdf6ff6d97ed1 | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | X-DataInitiative/tick | 4db1bce7471bb48757b54e86b0f7946f36e78dde | 04dbb377b47783036a8343c6a61b60fc9f430dc3 | refs/heads/master | 2023-08-13T10:28:15.560632 | 2023-03-05T00:16:57 | 2023-03-05T00:16:57 | 75,284,069 | 475 | 120 | BSD-3-Clause | 2023-03-05T00:16:58 | 2016-12-01T10:59:08 | Python | UTF-8 | Python | false | false | 1,464 | py | longitudinal_features_lagger_test.py | # License: BSD 3 clause
import numpy as np
from scipy.sparse import csr_matrix
import unittest
from tick.preprocessing import LongitudinalFeaturesLagger
class Test(unittest.TestCase):
def setUp(self):
self.features = [
np.array([[0, 1, 0], [0, 0, 0], [0, 1, 1]], dtype="float64"),
... |
7bc4afaf174c0fcef48f415dab8b0c6c42c838e2 | c618bbf2719431999b1007461df0865bab60c883 | /dali/python/nvidia/dali/_autograph/operators/__init__.py | 7599ef59f80b86cdb4488385d6f683df96e8ebc4 | [
"Apache-2.0"
] | permissive | NVIDIA/DALI | 3d0d061135d19e092647e6522046b2ff23d4ef03 | 92ebbe5c20e460050abd985acb590e6c27199517 | refs/heads/main | 2023-09-04T01:53:59.033608 | 2023-09-01T13:45:03 | 2023-09-01T13:45:03 | 135,768,037 | 4,851 | 648 | Apache-2.0 | 2023-09-12T18:00:22 | 2018-06-01T22:18:01 | C++ | UTF-8 | Python | false | false | 3,467 | py | __init__.py | # Copyright 2018 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... |
93e6ce1908f01a1bc149db9e56bc8f3b2d74cce0 | 636849fc7edd9dcb095cf3410a121ab37de69f02 | /SoftLayer/CLI/order/package_list.py | 97e435e840701f522b55012cbd64385df1560ff5 | [
"MIT"
] | permissive | softlayer/softlayer-python | bcb09306c3367fdbd2f1407f770c4959729b074c | 5798373055d9f34dfd531d81638a64d0a7901a13 | refs/heads/master | 2023-08-23T19:32:36.990701 | 2023-08-21T03:29:44 | 2023-08-21T03:29:44 | 622,291 | 126 | 182 | MIT | 2023-09-14T15:04:48 | 2010-04-21T20:36:31 | Python | UTF-8 | Python | false | false | 1,584 | py | package_list.py | """List packages."""
# :license: MIT, see LICENSE for more details.
import click
from SoftLayer.CLI.command import SLCommand as SLCommand
from SoftLayer.CLI import environment
from SoftLayer.CLI import formatting
from SoftLayer.managers import ordering
COLUMNS = ['id',
'name',
'keyName',
... |
30b28f5609c4d3a92542f258140f5f6d890649aa | b4cfd4949cab5dc5bd27fb028596a9fc02f4e1db | /examples/plot_clustering.py | e4c968f112aa853876fa9ab12b01caf4520f8c00 | [
"BSD-3-Clause"
] | permissive | GAA-UAM/scikit-fda | dabfd995f2c82efb0d44fa1d2005b2a8ca67442b | dfbce35cc9e67d93306dddf0edf4f95aaacd8aff | refs/heads/develop | 2023-08-31T09:11:31.407423 | 2023-08-18T08:19:21 | 2023-08-18T08:19:21 | 96,133,420 | 231 | 55 | BSD-3-Clause | 2023-08-18T08:19:22 | 2017-07-03T17:06:56 | Python | UTF-8 | Python | false | false | 6,777 | py | plot_clustering.py | """
Clustering
==========
In this example, the use of the clustering plot methods is shown applied to the
Canadian Weather dataset. K-Means and Fuzzy K-Means algorithms are employed to
calculate the results plotted.
"""
# Author: Amanda Hernando Bernabé
# License: MIT
# sphinx_gallery_thumbnail_number = 6
import ma... |
824daec0baf2011cebccf5f13a0abb33c7f2f571 | ed83a8a01473055b6563f0a1122738442f69be0a | /world/__init__.py | d22fd785803b8651c3e371f1b228f4446fb78e29 | [] | no_license | cs50/problems | 528a6a09e533d7dabaebd5d67bd8d7052d35681b | 96f8dd1c6b8202dcc67f36f06471a178acc4237f | refs/heads/2023/x | 2023-09-03T20:10:55.654530 | 2023-08-30T21:17:54 | 2023-08-30T21:17:54 | 137,074,067 | 128 | 221 | null | 2023-09-04T17:39:14 | 2018-06-12T13:15:17 | Python | UTF-8 | Python | false | false | 369 | py | __init__.py | import check50
import check50.c
@check50.check()
def exists():
"""hello.c exists"""
check50.exists("hello.c")
@check50.check(exists)
def compiles():
"""hello.c compiles"""
check50.c.compile("hello.c", lcs50=True)
@check50.check(compiles)
def world():
"""hello.c prints \"hello, world\""""
chec... |
6c95bcd5062b7d1afe834bff9d816eef58860e85 | 5d4b70ac5e555e3c8b68534ef1790ce041a0f65e | /pyunittests/pyluxcoreunittests/tests/scene/testDeleteObjects.py | d8f13b519c86558361347383a74b722bf6b66911 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | LuxCoreRender/LuxCore | eddb0e3710cbc8fa28cb80f16d908f1ec3cc72db | 2f35684a04d9e1bd48d6ffa88b19a88871e90942 | refs/heads/master | 2023-08-17T01:28:23.931381 | 2023-05-28T22:25:00 | 2023-05-28T22:25:00 | 111,695,279 | 1,055 | 154 | Apache-2.0 | 2023-08-03T20:21:05 | 2017-11-22T14:36:32 | C++ | UTF-8 | Python | false | false | 3,998 | py | testDeleteObjects.py | # -*- coding: utf-8 -*-
################################################################################
# Copyright 1998-2018 by authors (see AUTHORS.txt)
#
# This file is part of LuxCoreRender.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with ... |
8d39a4ae8d23995b3e226ee61f19ba9a712795a0 | d36388e75a43746c415f417e6fc026daa4a52f72 | /sciluigi/slurm.py | 85d475de074d6a4e8cde15336d13179f6a2d019f | [
"MIT"
] | permissive | pharmbio/sciluigi | bfab10161cd476813c583c559c61e4123df7e11b | 11daa90eb49b97e71a02e8bf4965feed33df05b3 | refs/heads/master | 2023-06-07T09:48:40.188139 | 2023-01-07T22:35:52 | 2023-01-07T22:35:52 | 35,960,208 | 309 | 59 | MIT | 2023-01-06T22:05:29 | 2015-05-20T16:31:45 | Python | UTF-8 | Python | false | false | 8,310 | py | slurm.py | '''
This module contains functionality related to integration with the SLURM HPC
resource manger.
'''
import datetime
import logging
import re
import time
import sciluigi.parameter
import sciluigi.task
import subprocess as sub
# ================================================================================
# Setup... |
002ebfc9eacf0a532bceb2791277cc8ed820ca06 | bd3a1843e2b0dc15837628c77f73e95a9bb1264f | /tests/dataset/test_public_suffix.py | 297ff64e1dc5ee680aede2efca9bf3ea6a487206 | [
"Apache-2.0"
] | permissive | funilrys/PyFunceble | 404c64d1b281d4ae06a939b54f4088d63e12b828 | 214a57d0eca3df7c4ed3421937aaff9998452ba6 | refs/heads/dev | 2023-06-24T18:39:29.372775 | 2023-06-18T13:15:39 | 2023-06-18T13:15:39 | 106,995,518 | 267 | 62 | Apache-2.0 | 2023-08-25T16:05:17 | 2017-10-15T08:25:14 | Python | UTF-8 | Python | false | false | 8,051 | py | test_public_suffix.py | """
The tool to check the availability or syntax of domain, IP or URL.
::
██████╗ ██╗ ██╗███████╗██╗ ██╗███╗ ██╗ ██████╗███████╗██████╗ ██╗ ███████╗
██╔══██╗╚██╗ ██╔╝██╔════╝██║ ██║████╗ ██║██╔════╝██╔════╝██╔══██╗██║ ██╔════╝
██████╔╝ ╚████╔╝ █████╗ ██║ ██║██╔██╗ ██║██║ █████╗ █... |
129611b947626af8ec17955752fffa6ac91743f3 | f2d4c0eac2b12a64c499b533f3fe0883262f6293 | /examples/hyperlink.py | db4c6f4c2d384837d643aeef3a86bf921fbde2da | [
"MIT"
] | permissive | mozman/svgwrite | 716ef150734b42f42474fdaecc11eb646ac29bab | cd10a7ed1982de77ba85ff4556e154187d7f14bc | refs/heads/master | 2022-08-10T03:19:14.453560 | 2022-07-14T13:59:39 | 2022-07-14T13:59:39 | 79,704,670 | 512 | 109 | NOASSERTION | 2022-07-14T13:34:27 | 2017-01-22T08:29:23 | Python | UTF-8 | Python | false | false | 735 | py | hyperlink.py | #!/usr/bin/env python
#coding:utf-8
# Author: mozman
# Purpose: svg hyperlink examples
# Created: 05.05.2017
# Copyright (C) 2017, Manfred Moitzi
# License: MIT License
try:
import svgwrite
except ImportError:
# if svgwrite is not 'installed' append parent dir of __file__ to sys.path
import sys
from pa... |
6cfea640a0e75534d208bca5d08d7695122c766a | 1f20484efc357aae4b7e2f98a191e7a9256f3a58 | /irc3/plugins/search.py | e0e64ce20f6f14d8502db1b725b5bd6e77b23cf6 | [
"CC-BY-3.0",
"MIT",
"LicenseRef-scancode-ietf"
] | permissive | gawel/irc3 | 55b2e4d01ca95f45077f8bad231394551584d7bd | 76d6849d5e7a531d649aca766f623f9f30a55545 | refs/heads/master | 2023-07-15T20:49:40.188267 | 2023-04-17T09:02:31 | 2023-04-17T09:02:31 | 14,820,406 | 187 | 58 | MIT | 2023-02-27T10:18:41 | 2013-11-30T12:09:48 | Python | UTF-8 | Python | false | false | 1,527 | py | search.py | # -*- coding: utf-8 -*-
from irc3.plugins.command import command
import irc3
__doc__ = '''
==============================================
:mod:`irc3.plugins.search` Search plugin
==============================================
.. autoclass:: Search
'''
@irc3.plugin
class Search:
requires = [
__name__.rep... |
45106de6277c1dcc4430f1b2f914fcbea32cee3e | a3d6556180e74af7b555f8d47d3fea55b94bcbda | /third_party/blink/web_tests/external/wpt/webdriver/tests/classic/perform_actions/pointer_tripleclick.py | b45709da3cb06bb037ecb8b18a92ce325a5380dd | [
"BSD-3-Clause",
"GPL-1.0-or-later",
"MIT",
"LGPL-2.0-or-later",
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer",
"LGPL-2.1-only",
"GPL-2.0-only",
"LGPL-2.0-only",
"BSD-2-Clause",
"LicenseRef-scancode-other-copyleft"
] | 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,369 | py | pointer_tripleclick.py | import math
from tests.classic.perform_actions.support.refine import get_events
from tests.support.asserts import assert_move_to_coordinates
from tests.support.helpers import filter_dict
lots_of_text = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor "\
"incididunt ut lab... |
46966ca8a9ad42a89412aa48b90d56a95f2efcbb | 48cd6a93fe538693fec65aaa81306e6b69b642ad | /dask/dataframe/tests/test_optimize_dataframe.py | 7443d2a454b7bc8042145865b53014c15c36a4fc | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | dask/dask | 0138cc2fb9aad27287643fe5ee240b8b09f2300d | 18098d35298bad21c878c339d73de784612566c7 | refs/heads/main | 2023-09-04T02:39:37.886054 | 2023-09-01T19:02:00 | 2023-09-01T19:02:00 | 28,782,747 | 11,423 | 2,116 | BSD-3-Clause | 2023-09-14T17:36:04 | 2015-01-04T18:50:00 | Python | UTF-8 | Python | false | false | 1,067 | py | test_optimize_dataframe.py | from __future__ import annotations
import pandas as pd
import dask
import dask.dataframe as dd
dsk = {
("x", 0): pd.DataFrame({"a": [1, 2, 3], "b": [4, 5, 6]}, index=[0, 1, 3]),
("x", 1): pd.DataFrame({"a": [4, 5, 6], "b": [3, 2, 1]}, index=[5, 6, 8]),
("x", 2): pd.DataFrame({"a": [7, 8, 9], "b": [0, 0, ... |
aaa2aa641c238365a9aa5f850ea1ac2149e0058e | a156285f264c2d327075f5d8a57f909e17d901ba | /tools/sample_idxs_to_text.py | ff35e19f51004a9a79385b96376a6592206cc190 | [
"Apache-2.0",
"MIT"
] | permissive | bigscience-workshop/Megatron-DeepSpeed | 2f0d53b047af3e05a3ffa277184a37dd13022308 | e52bdabbde3c6895aceb76c1bced295c2646121f | refs/heads/main | 2023-08-04T06:31:58.462403 | 2023-02-21T16:56:28 | 2023-02-21T16:56:28 | 382,420,841 | 979 | 199 | NOASSERTION | 2023-07-25T07:14:20 | 2021-07-02T17:40:35 | Python | UTF-8 | Python | false | false | 6,363 | py | sample_idxs_to_text.py | """
A script which prints the training data according to the given sample index.
Note, that it's crucial that exactly the same corresponding arguments are passed as in the training script. Including the seed. Only then the random sequence from the generated by megatron .npy files will match.
Here is how to decipher t... |
2fd16d2cb82a247e1551cf5e2960afd4cdddf4d4 | 309205c535375ffc82b4f59d56e5594d208c9a80 | /pythonbrasil-14/mas_da_pra_abrir_no_excel_exportar_para_txt_csv_json/demos_slides/03_exporta_csv.py | 3237b24c02713c910cfcf60971cfbb8a1518d48d | [] | no_license | pythonbrasil/talks | e8209d36681900e645ddc994f3ff318309c56b58 | b0bd9f1a98e63bc0b1863ff11485fbfbfbeb32a9 | refs/heads/master | 2022-11-05T08:47:37.750164 | 2022-10-28T18:52:31 | 2022-10-28T18:52:31 | 71,194,771 | 140 | 59 | null | 2022-10-28T18:52:33 | 2016-10-18T01:04:54 | HTML | UTF-8 | Python | false | false | 435 | py | 03_exporta_csv.py | import csv
locations = [('PUNE', '20th October 2018'),
('Sao Leopoldo', '20th October 2018'),
('Oko , Anambra', '3rd November 2018'),
('Abeokuta, Ogun', '3rd November 2018')]
filename = 'django_girls.csv'
with open(filename, 'w', newline='') as csvfile:
write_location = csv... |
ebfa169c921d11d76eb9f6c0d691abcaffe2d434 | bb33e6be8316f35decbb2b81badf2b6dcf7df515 | /source/res/scripts/client/gui/miniclient/event.py | 30237320472432c0665a7453fc3662334a8bc362 | [] | 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 | 772 | py | event.py | # Python bytecode 2.7 (decompiled from Python 2.7)
# Embedded file name: scripts/client/gui/miniclient/event.py
from helpers import aop
class _ParametrizeInitAspect(aop.Aspect):
def atCall(self, cd):
cd.avoid()
return False
class _DisableEventBoards(aop.Aspect):
def atCall(self, cd):
... |
4dba1126c5912e6ffe0fffe864fe0a656a09286b | 0948f5944bcb95af55ac258d6104044ddbedab6b | /extras/widgets/calendar.py | ae6141139b946c414ed4320d6f231a067d2205bb | [
"MIT"
] | permissive | peterhinch/micropython-nano-gui | e9b7ca20535bbb52c695083deb28721074cfa71e | 5eef93317e83bc767da88fba8acdfc2a167db794 | refs/heads/master | 2023-06-22T09:27:18.739604 | 2023-06-12T13:43:47 | 2023-06-12T13:43:47 | 146,632,615 | 360 | 78 | MIT | 2023-09-02T09:08:16 | 2018-08-29T17:07:07 | Python | UTF-8 | Python | false | false | 2,569 | py | calendar.py | # calendar.py Calendar object
# Released under the MIT License (MIT). See LICENSE.
# Copyright (c) 2023 Peter Hinch
from extras.widgets.grid import Grid
from gui.widgets.label import Label, ALIGN_CENTER
from extras.date import DateCal
class Calendar:
def __init__(
self, wri, row, col, colwidth, fgcolor, ... |
61cac04dfb8cbaf2d06e62a1587fb94e1e7001da | 12ac38b4146253c5778d0e53eb4128dce2ae1860 | /doc/examples/creating_data_type_packages.py | e5f3686eec49488dbccdae61e325e4a589cdb86d | [
"MIT"
] | permissive | cogu/autosar | a75e12186877b4ace807ab5e14daa89c6fb42935 | 5db06cc46f27c1ef8edec92f6883850cfd9e61f1 | refs/heads/master | 2023-08-30T19:59:59.277984 | 2023-05-08T19:10:21 | 2023-05-08T19:10:21 | 63,766,974 | 291 | 152 | MIT | 2022-03-27T18:30:55 | 2016-07-20T09:05:26 | Python | UTF-8 | Python | false | false | 545 | py | creating_data_type_packages.py | import autosar
ws = autosar.workspace(version="4.2.2")
package=ws.createPackage('DataTypes')
baseTypes = package.createSubPackage('BaseTypes')
BaseTypeUint8 = baseTypes.createSwBaseType('uint8', 8, nativeDeclaration='uint8')
implTypes = package.createSubPackage('ImplementationTypes', role='DataType')
implTypes.... |
cb54b66c397780cc31eaba2082eeced706c66770 | 15b3470cfed1d6363096b7dc4abfd12d4337ddff | /parsivar/normalizer.py | 7ccd021af695e7360e1c7372adbe044e00f1c6f6 | [
"MIT"
] | permissive | ICTRC/Parsivar | 82071d0e8a81963986055de477e78276e5048329 | aad5da1ba08cbca7f1bd0ef2f3a13c3d515651b5 | refs/heads/master | 2023-03-07T13:40:39.195414 | 2023-03-05T13:21:13 | 2023-03-05T13:21:13 | 121,358,179 | 216 | 38 | MIT | 2023-03-05T13:21:14 | 2018-02-13T08:37:29 | Python | UTF-8 | Python | false | false | 25,365 | py | normalizer.py | from re import sub
import copy
import os
from .tokenizer import Tokenizer
from .data_helper import DataHelper
from .token_merger import ClassifierChunkParser
class Normalizer():
def __init__(self,
half_space_char='\u200c',
statistical_space_correction=False,
... |
52b480c7864215325e293173930a36f355a88280 | 7bc1d8634529eac952490399fb71f10bcedf05cc | /tests/scripts/thread-cert/pktverify/verify_result.py | 012cce407d4bc03d72a62a31427af1d7eec02028 | [
"LicenseRef-scancode-warranty-disclaimer",
"BSD-3-Clause"
] | permissive | openthread/openthread | 6a9e25d1cd224bde9796d9616f04f423dba27d77 | 102a631cb3f8938389d0d10199a14c59184039cd | refs/heads/main | 2023-08-18T10:46:03.820124 | 2023-08-17T22:20:55 | 2023-08-17T22:20:55 | 55,808,787 | 3,485 | 1,296 | BSD-3-Clause | 2023-09-14T15:50:53 | 2016-04-08T20:47:41 | C++ | UTF-8 | Python | false | false | 3,167 | py | verify_result.py | #!/usr/bin/env python3
#
# Copyright (c) 2019, The OpenThread Authors.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright
# ... |
b4845737c38b5c97dc166b3a263fe1f0c4b7f158 | 3daf74bdadb46f4aa18918f1b6938c714b331723 | /poco/drivers/windows/__init__.py | 4bb6c09a18ad4f62e4f67f1955e98ac05f7141b2 | [
"Apache-2.0"
] | permissive | AirtestProject/Poco | d173b465edefbae72f02bb11d60edfa5af8d4ec4 | 65c2c5be0c0c1de680eedf34ac18ae065c5408ee | refs/heads/master | 2023-08-15T23:00:11.805669 | 2023-03-29T08:58:41 | 2023-03-29T08:58:41 | 118,706,014 | 1,703 | 312 | Apache-2.0 | 2023-08-08T10:30:21 | 2018-01-24T03:24:01 | Python | UTF-8 | Python | false | false | 76 | py | __init__.py | # coding=utf-8
from poco.drivers.windows.windowsui_poco import WindowsPoco
|
8d14d7975d7923676f576cd11c063dce717afef4 | d3aa7d6fdb3aeb627a5951ab4826108b58341d7f | /apps/base/models/location_models.py | 1441c2225cf80e651e90e148df538ea418e91b73 | [] | no_license | JoneXiong/YouPBX | d92b58ea036570afbc2f7f4e52d6e8ca11a4ec7c | 4e3156877e22e19959f6f8978feae53089e9b97c | refs/heads/master | 2023-05-05T17:35:06.185313 | 2022-05-15T09:29:49 | 2022-05-15T09:29:49 | 67,493,869 | 269 | 124 | null | 2023-04-17T11:19:33 | 2016-09-06T09:29:34 | Python | UTF-8 | Python | false | false | 476 | py | location_models.py | # coding=utf-8
from django.db import models
'''
location & domain
'''
class Location(models.Model):
'''
Domain
'''
location_name = models.CharField(u'名称', max_length=64)
domain_name = models.CharField(u'域标识', max_length=64)
class Meta:
app_label = 'base'
verbose_name = u'域(Loc... |
fc50c40aae77ed89987c77dfe3dbbe01482fe268 | 6a559bd73851b7a19c2a9ad1a995aa89b42915a0 | /migrations/versions/59264050f39_.py | d714e320010745bdc4b5d16dd7dfee7ad2a8973f | [
"MIT"
] | permissive | eleweek/WatchPeopleCode | b1825088eb225a6a737db5f9f9fe80dbc0a9138a | 2389fe0b8eb040f553f847b9e1686883c4bd1388 | refs/heads/master | 2022-12-12T12:59:12.262107 | 2017-11-05T15:26:20 | 2017-11-05T15:26:20 | 29,928,164 | 200 | 24 | MIT | 2022-12-08T00:39:04 | 2015-01-27T18:26:00 | Python | UTF-8 | Python | false | false | 610 | py | 59264050f39_.py | """empty message
Revision ID: 59264050f39
Revises: 20e031b23d18
Create Date: 2015-02-04 17:18:39.703657
"""
# revision identifiers, used by Alembic.
revision = '59264050f39'
down_revision = '20e031b23d18'
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated by Alembic - pl... |
1f19c3062ddd9a9789f8b50e3abd9217a72e84ab | 27b86f422246a78704e0e84983b2630533a47db6 | /examples/addons/dont_use_dimline_addons.py | 2c0ee749c1f1a39723ffdf58abba68e30c8dac23 | [
"MIT"
] | permissive | mozman/ezdxf | 7512decd600896960660f0f580cab815bf0d7a51 | ba6ab0264dcb6833173042a37b1b5ae878d75113 | refs/heads/master | 2023-09-01T11:55:13.462105 | 2023-08-15T11:50:05 | 2023-08-15T12:00:04 | 79,697,117 | 750 | 194 | MIT | 2023-09-14T09:40:41 | 2017-01-22T05:55:55 | Python | UTF-8 | Python | false | false | 2,792 | py | dont_use_dimline_addons.py | # Copyright (c) 2010-2022, Manfred Moitzi
# License: MIT License
import pathlib
import ezdxf
from ezdxf.addons import dimstyles, LinearDimension, AngularDimension
from ezdxf.addons import ArcDimension, RadialDimension
CWD = pathlib.Path("~/Desktop/Outbox").expanduser()
if not CWD.exists():
CWD = pathlib.Path(".")
... |
d4cb3114b129583810bf51233f1e35ed27d8fcdc | cc771eb1ed772713fbc303c8db828d5552186c7f | /mmdetection/yolov3_mobilenetv2_320_300e_coco.py | 26965c0dcab9df0cd0b3b459939f91d417b8663b | [
"Apache-2.0"
] | permissive | Lipurple/Grounded-Diffusion | 49a48a0904f9eae1394e31d7503708ce84c4e005 | 7c4aa8c974171b74501c0f60db50a3a5a463a3df | refs/heads/main | 2023-05-22T09:35:06.443563 | 2023-02-27T15:20:21 | 2023-02-27T15:20:21 | 587,403,131 | 119 | 9 | null | null | null | null | UTF-8 | Python | false | false | 7,183 | py | yolov3_mobilenetv2_320_300e_coco.py | checkpoint_config = dict(interval=1)
log_config = dict(interval=50, hooks=[dict(type='TextLoggerHook')])
custom_hooks = [dict(type='NumClassCheckHook')]
dist_params = dict(backend='nccl')
log_level = 'INFO'
load_from = None
resume_from = None
workflow = [('train', 1)]
opencv_num_threads = 0
mp_start_method = 'fork'
aut... |
b7904d157bee07cef5c5b209a1923225cf10178f | 64ab5b65afdf8d950c4b56ad2259133b95fc2fec | /zeus/api/resources/build_jobs.py | 63bf4c84c22f95175ffda9e95b10191a56131376 | [
"Apache-2.0"
] | permissive | getsentry/zeus | 3e88895443b23278fdb4c25121422ee214630512 | 6d4a490c19ebe406b551641a022ca08f26c21fcb | refs/heads/master | 2023-09-01T14:20:11.396306 | 2021-04-30T17:08:33 | 2021-04-30T17:08:33 | 96,131,433 | 222 | 27 | Apache-2.0 | 2022-06-01T03:17:16 | 2017-07-03T16:39:35 | Python | UTF-8 | Python | false | false | 1,467 | py | build_jobs.py | from sqlalchemy.exc import IntegrityError
from sqlalchemy.orm import subqueryload_all
from zeus.config import celery, db
from zeus.constants import Status
from zeus.models import Build, Job
from zeus.utils import timezone
from .base_build import BaseBuildResource
from ..schemas import JobSchema
job_schema = JobSchem... |
edbb6262562b084b1fa20078e439588526ee1694 | 96dcea595e7c16cec07b3f649afd65f3660a0bad | /tests/components/cloud/test_tts.py | ba88ae2af2d4b4b08e4dece15c8a0990fdf60428 | [
"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 | 3,324 | py | test_tts.py | """Tests for cloud tts."""
from unittest.mock import Mock
from hass_nabucasa import voice
import pytest
import voluptuous as vol
from homeassistant.components.cloud import const, tts
from homeassistant.core import HomeAssistant
@pytest.fixture
def cloud_with_prefs(cloud_prefs):
"""Return a cloud mock with prefs... |
851d3aac3a0292152536abefcaa78142f813e2b3 | f509ab9825c542e09b0c6591d86ef1f9feb540a6 | /pkgs/sdk-pkg/src/genie/libs/sdk/libs/abstracted_libs/nxos/ha.py | 5068d1f5cedf4f93455a5cb4a4ba109798a1ff16 | [
"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 | 23,042 | py | ha.py | '''HA NXOS implement function'''
# Parser
from genie.abstract import Lookup
from genie.libs import parser
from unicon.core.errors import SubCommandFailure
from unicon.eal.dialogs import Statement, Dialog
from os.path import basename, getsize
from datetime import datetime
import re
import logging
import time
import os... |
b15b9251c6ea0b14b6580b3322935f737d99e25e | 10cb11f83e1c8b51b9d72c28d6259a56ff1a97c8 | /tests/unit/lib/utils/test_architecture.py | 860c513a07f6ed99b3eb3fd3ab11746df64fad97 | [
"Apache-2.0",
"BSD-3-Clause",
"MIT",
"BSD-2-Clause"
] | permissive | aws/aws-sam-cli | 6d4411aacf7f861e75e5cf4882a32858797a276d | b297ff015f2b69d7c74059c2d42ece1c29ea73ee | refs/heads/develop | 2023-08-30T23:28:36.179932 | 2023-08-30T21:58:26 | 2023-08-30T21:58:26 | 92,205,085 | 1,402 | 470 | Apache-2.0 | 2023-09-14T21:14:23 | 2017-05-23T18:16:23 | Python | UTF-8 | Python | false | false | 2,434 | py | test_architecture.py | from unittest import TestCase
from unittest.mock import Mock
from parameterized import parameterized
from samcli.commands.local.lib.exceptions import UnsupportedRuntimeArchitectureError
from samcli.lib.utils.architecture import (
ARM64,
InvalidArchitecture,
validate_architecture,
X86_64,
validate_... |
088ac256a3cf15785085c494bc69912280c63774 | 2a1b8a671aceda6bc446f8ce26400aa84fa444a6 | /Packs/PrismaCloud/Integrations/PrismaCloudIAM/PrismaCloudIAM_test.py | ddf486565194d86947daf93ba2b32da169f0e000 | [
"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 | 13,964 | py | PrismaCloudIAM_test.py | from requests import Response, Session
from PrismaCloudIAM import Client, get_mapping_fields
from IAMApiModule import *
APP_USER_OUTPUT = {
"user_id": "mock_id",
"user_name": "mock_user_name",
"first_name": "mock_first_name",
"last_name": "mock_last_name",
"active": "true",
"email": "testdemist... |
edbe746710ae80812d7618940092b25068883542 | 64e5f76a15d0178e851d64573196a33043e68164 | /lib/build/__init__.py | 35375e8659eb76fe9650f934ec0fe24306c43d9d | [
"BSD-2-Clause"
] | permissive | ganeti/ganeti | 759aa20d2d3e15c816fa3ba5019d7d143b2d1294 | 456ea285a7583183c2c8e5bcffe9006ec8a9d658 | refs/heads/master | 2023-07-24T21:23:49.389657 | 2023-05-25T15:37:44 | 2023-05-28T10:17:36 | 25,163,509 | 465 | 126 | BSD-2-Clause | 2023-08-18T17:06:33 | 2014-10-13T15:03:51 | Python | UTF-8 | Python | false | false | 1,843 | py | __init__.py | #
#
# Copyright (C) 2009 Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and ... |
617a409f3cafef6c5aa10cd598b83f652067c8bc | c0e45bc202a50f4b0dcc645b5f805596d10958b8 | /losses.py | 7404b39e49a493237d9ecf7dbb5cd66dcf922b8d | [
"Apache-2.0"
] | permissive | visinf/self-mono-sf | 532d3a09ebdce9abb4177517ba521f5f2dc66687 | eec356d95038da49e6705194e6dc0780b750f2b0 | refs/heads/master | 2022-05-17T07:47:37.688855 | 2022-04-18T07:45:27 | 2022-04-18T07:45:27 | 246,596,511 | 240 | 55 | Apache-2.0 | 2022-04-18T07:45:28 | 2020-03-11T14:40:46 | Python | UTF-8 | Python | false | false | 60,956 | py | losses.py | from __future__ import absolute_import, division, print_function
import torch
import torch.nn as nn
import torch.nn.functional as tf
from models.forwardwarp_package.forward_warp import forward_warp
from utils.interpolation import interpolate2d_as
from utils.sceneflow_util import pixel2pts_ms, pts2pixel_ms, reconstruc... |
5cfdaf1b9075960ad7b9d05b07fd5b52dbcb85dc | 40dd8330e5f78c4348bbddc2c5acfd59d793dd51 | /mmseg/datasets/night_driving.py | 3ead91ec77cbd8e3f0a870dee3462549183e9c9b | [
"Apache-2.0"
] | permissive | open-mmlab/mmsegmentation | 0d12092312e2c465ede1fd7dd9847b6f2b37049c | 30a3f94f3e2916e27fa38c67cc3b8c69c1893fe8 | refs/heads/main | 2023-09-04T10:54:52.299711 | 2023-07-24T07:28:21 | 2023-07-24T07:28:21 | 272,133,018 | 6,534 | 2,375 | Apache-2.0 | 2023-09-14T01:22:32 | 2020-06-14T04:32:33 | Python | UTF-8 | Python | false | false | 514 | py | night_driving.py | # Copyright (c) OpenMMLab. All rights reserved.
from mmseg.registry import DATASETS
from .cityscapes import CityscapesDataset
@DATASETS.register_module()
class NightDrivingDataset(CityscapesDataset):
"""NightDrivingDataset dataset."""
def __init__(self,
img_suffix='_leftImg8bit.png',
... |
aebcb716e8abdd34cd7f37d0751148b9204451ad | 6855e57c80b2ae8563c9aeb7837b722966527169 | /PyBioMed/PyGetMol/Getmol.py | c66b335ae9feb0c9e981e4d7874acdea28f42989 | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | gadsbyfly/PyBioMed | 613612ac9dac02676eab25fc3609a3ba376939ee | 45440d8a70b2aa2818762ceadb499dd3a1df90bc | refs/heads/master | 2023-04-14T11:42:12.406985 | 2023-04-10T11:46:54 | 2023-04-10T11:46:54 | 115,875,908 | 112 | 61 | BSD-3-Clause | 2022-09-07T13:27:35 | 2017-12-31T17:11:14 | Python | UTF-8 | Python | false | false | 6,259 | py | Getmol.py | # -*- coding: utf-8 -*-
# Copyright (c) 2016-2017, Zhijiang Yao, Jie Dong and Dongsheng Cao
# All rights reserved.
# This file is part of the PyBioMed.
# The contents are covered by the terms of the BSD license
# which is included in the file license.txt, found at the root
# of the PyBioMed source tree.
"""
This ... |
e3b7b38ba8d5ebce09cd03694a5e5069f392542c | 3c41443364da8b44c74dce08ef94a1acd1b66b3e | /api_tests/nodes/views/test_node_contributors_and_group_members_list.py | 5c31326ff2c2cc857f8f8668079385df9644f499 | [
"MIT",
"BSD-3-Clause",
"LicenseRef-scancode-free-unknown",
"LicenseRef-scancode-warranty-disclaimer",
"AGPL-3.0-only",
"LGPL-2.0-or-later",
"LicenseRef-scancode-proprietary-license",
"MPL-1.1",
"CPAL-1.0",
"LicenseRef-scancode-unknown-license-reference",
"BSD-2-Clause",
"Apache-2.0"
] | permissive | CenterForOpenScience/osf.io | 71d9540be7989f7118a33e15bc4a6ce2d2492ac1 | a3e0a0b9ddda5dd75fc8248d58f3bcdeece0323e | refs/heads/develop | 2023-09-04T03:21:14.970917 | 2023-08-31T14:49:20 | 2023-08-31T14:49:20 | 10,199,599 | 683 | 390 | Apache-2.0 | 2023-09-14T17:07:52 | 2013-05-21T15:53:37 | Python | UTF-8 | Python | false | false | 3,509 | py | test_node_contributors_and_group_members_list.py | import pytest
from api.base.settings.defaults import API_BASE
from osf_tests.factories import (
ProjectFactory,
OSFGroupFactory,
AuthUserFactory,
)
from osf.utils.permissions import READ, WRITE
@pytest.fixture()
def non_contributor():
return AuthUserFactory()
@pytest.fixture()
def admin_contributor()... |
b07302ce51f26925318defaf9fcae27934747875 | 2ae0b8d95d439ccfd55ea7933ad4a2994ad0f6c5 | /tools/mo/openvino/tools/mo/utils/ir_reader/extenders/experimental_extender.py | a9780696fd29ebfd014b582e38a7186d93c35b8f | [
"Apache-2.0"
] | permissive | openvinotoolkit/openvino | 38ea745a247887a4e14580dbc9fc68005e2149f9 | e4bed7a31c9f00d8afbfcabee3f64f55496ae56a | refs/heads/master | 2023-08-18T03:47:44.572979 | 2023-08-17T21:24:59 | 2023-08-17T21:24:59 | 153,097,643 | 3,953 | 1,492 | Apache-2.0 | 2023-09-14T21:42:24 | 2018-10-15T10:54:40 | C++ | UTF-8 | Python | false | false | 412 | py | experimental_extender.py | # Copyright (C) 2018-2023 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
from openvino.tools.mo.utils.graph import Node
from openvino.tools.mo.utils.ir_reader.extender import Extender
class ExperimentalDetectronROIFeatureExtractor_extender(Extender):
op = 'ExperimentalDetectronROIFeatureExtractor'
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.