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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
bc5d495c1e22bef9ea9fefd9230f2288007a0c7c | dcd772f567ef8a8a1173a9f437cd68f211fb9362 | /developer_tools/createSQAtracebilityMatrix.py | 36d16040ede6d52ed2c18f3f8dc4b7ba1154d5ae | [
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer",
"BSD-2-Clause",
"BSD-3-Clause"
] | permissive | idaholab/raven | 39cdce98ad916c638399232cdc01a9be00e200a2 | 2b16e7aa3325fe84cab2477947a951414c635381 | refs/heads/devel | 2023-08-31T08:40:16.653099 | 2023-08-29T16:21:51 | 2023-08-29T16:21:51 | 85,989,537 | 201 | 126 | Apache-2.0 | 2023-09-13T21:55:43 | 2017-03-23T19:29:27 | C++ | UTF-8 | Python | false | false | 4,543 | py | createSQAtracebilityMatrix.py | # Copyright 2017 Battelle Energy Alliance, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... |
fb5d2260b6e11e5aa8d02b0a631283ec1ea6cb06 | 951c578186220f2499a7aecf99a314e46778fa75 | /tests/numpy/columns/test_bool.py | 0c7dbefdefc2389b1bb92036319419a98207d369 | [
"MIT",
"Python-2.0"
] | permissive | mymarilyn/clickhouse-driver | 0d06fb1d3b28f61b267307fb6cea1a33d7997df4 | ce712b5bc7a7900e844c7c8f99a1e3426aa326f7 | refs/heads/master | 2023-07-20T08:41:27.193499 | 2023-06-30T08:29:06 | 2023-06-30T08:29:31 | 90,912,724 | 1,108 | 229 | NOASSERTION | 2023-05-24T02:54:41 | 2017-05-10T22:13:04 | Python | UTF-8 | Python | false | false | 2,376 | py | test_bool.py | try:
import numpy as np
except ImportError:
np = None
from tests.numpy.testcase import NumpyBaseTestCase
class BoolTestCase(NumpyBaseTestCase):
n = 10
# https://clickhouse.com/docs/en/whats-new/changelog/2021
required_server_version = (21, 12, 0)
def check_result(self, rv, col_type):
... |
18f8e65842177b58932ba049761bfc95e0b5655e | 92432bcbe06e86d66d37fe527f5711a32f2f995a | /darknet/parser.py | 65495d4d3f9290409df43a3371600b9ba5025843 | [
"MIT"
] | permissive | s045pd/DarkNet_ChineseTrading | de1e0ed83ec9d0a1555bb4f1b53b50ca402c58de | 2911be68ca25b54ad4e84c9e470166c45e0860e4 | refs/heads/new_site_2019 | 2023-08-18T06:25:11.347382 | 2022-10-11T02:18:16 | 2022-10-11T02:18:16 | 162,710,415 | 404 | 83 | MIT | 2021-08-25T00:45:24 | 2018-12-21T12:14:26 | Python | UTF-8 | Python | false | false | 3,148 | py | parser.py | import platform
import re
from io import BytesIO
from imgcat import imgcat
from PIL import Image
import ddddocr
from darknet.common import convert_num, error_log
from darknet.log import *
ocr = ddddocr.DdddOcr()
class Parser:
@staticmethod
@error_log()
def predict_captcha(func, path="/entrance/code76.p... |
3fa962e325ed9b4df80fe107383e5bc75aed890e | 8de1480d6511ac81c43ebb1fa50875adb1505c3b | /awx/main/migrations/0162_alter_unifiedjob_dependent_jobs.py | 94e91be43f4b30cc2cb8b7688b9e31c3ecefa713 | [
"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 | 475 | py | 0162_alter_unifiedjob_dependent_jobs.py | # Generated by Django 3.2.13 on 2022-05-02 21:27
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('main', '0161_unifiedjob_host_status_counts'),
]
operations = [
migrations.AlterField(
model_name='unifiedjob',
name=... |
de1b6fbc4e6cdf3bf4ce0aed17bcdf8b53107a38 | f82728b6f868a2275e63848f936d2c22354dc024 | /Basic/Convert Decimal To Binary/SolutionByVaibhavTripathi.py | 6b76278cd9e03fec621bf954e9491e4fff85c6db | [
"MIT"
] | permissive | shoaibrayeen/Programmers-Community | 0b0fa4ba1427fa472126e640cda52dff3416b939 | cd0855e604cfd54101aaa9118f01a3e3b4c48c1c | refs/heads/master | 2023-03-16T03:13:48.980900 | 2023-03-12T00:25:37 | 2023-03-12T00:25:37 | 209,997,598 | 285 | 424 | MIT | 2023-03-12T00:25:38 | 2019-09-21T14:17:24 | C++ | UTF-8 | Python | false | false | 187 | py | SolutionByVaibhavTripathi.py | num = int(input('Enter a number: '))
def decimalToBinary(n):
if(n > 1):
decimalToBinary(n//2)
print(n%2, end='')
decimalToBinary(num)
|
fa7d056776ac078612a33250c5a76798d79eeb6b | 67e76c827181fb3be7290ae13d58ef261e543924 | /_old/URLChangeV2/urlchangev2.py | d1fca57194f69ecd6e2e12ea7d2a87d38d24dbab | [
"BSD-3-Clause"
] | permissive | voussoir/reddit | d2a6dd53663cb89e02e35e5a75f5f4b2f5d83216 | d928ca56a4ab54c6aff5250a228bf063c2a27818 | refs/heads/master | 2023-08-23T17:09:45.100744 | 2022-10-01T21:33:46 | 2022-10-01T21:33:46 | 20,117,004 | 477 | 205 | null | 2017-04-15T22:58:01 | 2014-05-23T23:19:46 | HTML | UTF-8 | Python | false | false | 5,402 | py | urlchangev2.py | #/u/GoldenSights
import praw # simple interface to the reddit API, also handles rate limiting of requests
import time
import sqlite3
'''USER CONFIGURATION'''
APP_ID = ""
APP_SECRET = ""
APP_URI = ""
APP_REFRESH = ""
# https://www.reddit.com/comments/3cm1p8/how_to_make_your_bot_use_oauth2/
USERAGENT = ""
#This is a sh... |
14261f5a1d596f720c67f24f1401fb5c253db72d | e3b2af12e7ca91895e42401b2be32f9b731f226a | /openff/toolkit/_tests/test_parameters.py | 10ca8f4fbeb38d4f7a9f924d84d6cd58438f03d0 | [
"MIT"
] | permissive | openforcefield/openff-toolkit | c2f4b654f6b47ea01c52fad9ea88134c3d381fa3 | 7fd1a2123b9895d1631d252aeb2708aedf5bfc4c | refs/heads/main | 2023-09-01T14:04:01.282978 | 2023-08-30T19:34:52 | 2023-08-30T19:34:52 | 86,884,600 | 129 | 49 | MIT | 2023-09-14T00:40:57 | 2017-04-01T04:48:05 | Python | UTF-8 | Python | false | false | 102,308 | py | test_parameters.py | """
Test classes and function in module openff.toolkit.typing.engines.smirnoff.parameters.
"""
from collections import defaultdict
from inspect import isabstract, isclass
from typing import Dict, List, Tuple
import numpy
import pytest
from numpy.testing import assert_almost_equal
from openff.units import unit
from pa... |
facf672b9cbd869516a5a52aaf254ca8c2fa788d | 3a6a211ea0d32405497fbd6486c490bb147e25f9 | /telemetry/telemetry/internal/testing/dependency_test_dir/other_animals/moose/moose/horn/horn_object.py | 1a883eff0748c7fd596cbfa27ee4310f737dda1b | [
"BSD-3-Clause"
] | permissive | catapult-project/catapult | e2cbdd5eb89f3b1492fc8752494e62ea1df4bae0 | 53102de187a48ac2cfc241fef54dcbc29c453a8e | refs/heads/main | 2021-05-25T07:37:22.832505 | 2021-05-24T08:01:49 | 2021-05-25T06:07:38 | 33,947,548 | 2,032 | 742 | BSD-3-Clause | 2022-08-26T16:01:18 | 2015-04-14T17:49:05 | HTML | UTF-8 | Python | false | false | 218 | py | horn_object.py | # Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
class Horn(object):
def IsBig(self):
return True
|
06d5cc975fddf8c59ed3d0716f508fc8db4e37c9 | f487532281c1c6a36a5c62a29744d8323584891b | /sdk/python/pulumi_azure/loganalytics/cluster.py | 8bf4cca86815016905662054b5b3abbf466ce322 | [
"BSD-3-Clause",
"MPL-2.0",
"Apache-2.0"
] | permissive | pulumi/pulumi-azure | a8f8f21c46c802aecf1397c737662ddcc438a2db | c16962e5c4f5810efec2806b8bb49d0da960d1ea | refs/heads/master | 2023-08-25T00:17:05.290397 | 2023-08-24T06:11:55 | 2023-08-24T06:11:55 | 103,183,737 | 129 | 57 | Apache-2.0 | 2023-09-13T05:44:10 | 2017-09-11T20:19:15 | Java | UTF-8 | Python | false | false | 24,389 | py | cluster.py | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
fr... |
ee750241d1f1b25bd6ac63a8e27cccd357fccb63 | 5c00bd92979f6e20038926ec45068fe8e6a61565 | /mushroom_rl/algorithms/policy_search/black_box_optimization/pgpe.py | 9f504fca96e68626571de7494eb654c0a539fa21 | [
"MIT"
] | permissive | MushroomRL/mushroom-rl | 2bf34ce38664a114ad37dc0468e1721e048359ab | 2decae31459a3481130afe1263bc0a5ba7954a99 | refs/heads/dev | 2023-08-30T16:33:56.100589 | 2023-08-05T15:24:13 | 2023-08-05T15:24:13 | 83,158,675 | 477 | 128 | MIT | 2023-08-27T20:30:43 | 2017-02-25T19:59:57 | Python | UTF-8 | Python | false | false | 1,902 | py | pgpe.py | import numpy as np
from mushroom_rl.algorithms.policy_search.black_box_optimization import BlackBoxOptimization
class PGPE(BlackBoxOptimization):
"""
Policy Gradient with Parameter Exploration algorithm.
"A Survey on Policy Search for Robotics", Deisenroth M. P., Neumann G.,
Peters J.. 2013.
"""... |
6dfd1553ac3ac689c8a7459122af0820b1bf9843 | 507103d591ed6993203db92fd8dffc992e8bcd5c | /k2/python/host/tests/properties_test.py | c34eb2cbe27121eb684d0b5496ff31a067a2d088 | [
"Apache-2.0"
] | permissive | k2-fsa/k2 | 6e661bd505f06583af779f4249bbb8ea87a0d662 | 2b2ac14b326d61d79d04e53fbd69b1ff6d630411 | refs/heads/master | 2023-09-03T11:57:13.505432 | 2023-08-23T21:58:26 | 2023-08-23T21:58:26 | 256,463,281 | 851 | 192 | Apache-2.0 | 2023-08-26T06:51:21 | 2020-04-17T09:44:05 | Cuda | UTF-8 | Python | false | false | 8,162 | py | properties_test.py | #!/usr/bin/env python3
#
# Copyright 2020 Xiaomi Corporation (author: Haowen Qiu)
#
# See ../../../LICENSE for clarification regarding multiple 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 ... |
d8eddc22616deb418cf6836af94374c9c3aeb854 | aee26a4c731a84481a499679c3d4cef9ec954aed | /tacker/vnfm/policy_actions/respawn/respawn.py | 1a89d0b81e0e7679ffaca52a9382a47a65875b1f | [
"Apache-2.0"
] | permissive | openstack/tacker | 6976cbee3afadfd9390849b56da2837feb93e912 | 9c7918f0b501cdeaffae40f585b76fc92b8e196e | refs/heads/master | 2023-09-04T01:22:43.106241 | 2023-08-31T00:06:42 | 2023-08-31T00:42:20 | 21,259,951 | 125 | 172 | Apache-2.0 | 2021-05-09T06:13:08 | 2014-06-27T01:11:56 | Python | UTF-8 | Python | false | false | 3,613 | py | respawn.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
# ... |
7dd4916ae86f5e33f43fb509fa1cbac449ee64a8 | f3806d9fb54773908cd9704121a543b114470aca | /angr/state_plugins/heap/heap_ptmalloc.py | d9e4a7aed9c688dfce7f8751e28a72a2857cb118 | [
"BSD-2-Clause"
] | permissive | angr/angr | 8ae95fceca51b0a001de56477d984dd01193ac1d | 37e8ca1c3308ec601ad1d7c6bc8081ff38a7cffd | refs/heads/master | 2023-08-17T03:15:21.007865 | 2023-08-15T18:44:57 | 2023-08-15T18:44:57 | 40,328,394 | 7,184 | 1,306 | BSD-2-Clause | 2023-09-14T20:14:23 | 2015-08-06T21:46:55 | Python | UTF-8 | Python | false | false | 28,967 | py | heap_ptmalloc.py | from ..plugin import SimStatePlugin
from .heap_freelist import SimHeapFreelist, Chunk
from .utils import concretize
from ...errors import SimHeapError, SimMergeError, SimSolverError
import logging
l = logging.getLogger("angr.state_plugins.heap.heap_ptmalloc")
sml = logging.getLogger("angr.state_plugins.symbolic_mem... |
0d4fa6f52b42aa9d3ee3ea267af1e0975dddc915 | ea68fad8ce90c488fe9846d6fe636ef94d35fc8c | /tests/split-test.py | 6c283eccb758af4f7bd0b8a3340271e550ee86e3 | [
"NCSA",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | runtimeverification/iele-semantics | 03eb1bf28c1afbf682bb83f86f269f36f374adaf | e030f7592753ee3dd6452757a5fdcfe3baacf037 | refs/heads/master | 2023-08-04T15:02:32.863523 | 2023-07-20T13:54:42 | 2023-07-20T13:54:42 | 105,186,520 | 131 | 39 | NOASSERTION | 2023-07-18T16:39:18 | 2017-09-28T18:44:13 | HTML | UTF-8 | Python | false | false | 823 | py | split-test.py | #!/usr/bin/env python
import sys
import json
import os
import subprocess
# Example usage: tests/ethereum-tests/VMTests/abc.json tests/VMTests/abc/
source_file = sys.argv[1]
target_dir = sys.argv[2]
evm_test_to_iele = os.path.join(os.path.dirname(__file__), "evm-to-iele", "evm-test-to-iele")
with open (source_file,... |
6c281812cf84e31b24676ed2a9c1ff1462bdb61a | df87814cb32990ad8c27d0b13a821aabce012819 | /kolibri/core/auth/test/test_permissions_classes.py | ee80adc3851fae57c6f719bfd32889ac1aec6801 | [
"MIT"
] | permissive | learningequality/kolibri | 26812d4ae771f3b389d3317a586bc032fc84866b | cc9da2a6acd139acac3cd71c4cb05c15d4465712 | refs/heads/release-v0.16.x | 2023-09-01T18:07:29.720772 | 2023-08-31T15:43:47 | 2023-08-31T15:43:47 | 49,976,939 | 689 | 682 | MIT | 2023-09-14T20:02:29 | 2016-01-19T19:22:07 | Python | UTF-8 | Python | false | false | 5,952 | py | test_permissions_classes.py | from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
from django.test import TestCase
from mock import Mock
from ..api import KolibriAuthPermissions
from ..models import Facility
from ..models import FacilityUser
from ..models import KolibriAnonymousUser... |
f8aeeb64d2cb99ca7b104c8edaa13fcfde2592c1 | 41198b450282c36a1d39f361dd99fe423de989da | /mantraml/core/management/command_parser.py | f35573257337e2e5a25be69820e8a1f3074e73bf | [
"Apache-2.0"
] | permissive | RJT1990/mantra | 4ff49742e68471a11fc6b6060a9b8b1cd3ab3b88 | 7db4d272a1625c33eaa681b8c2e75c0aa57c6952 | refs/heads/master | 2022-12-10T07:29:27.803262 | 2019-12-10T23:05:23 | 2019-12-10T23:05:23 | 146,776,545 | 332 | 22 | Apache-2.0 | 2022-12-08T03:00:07 | 2018-08-30T16:25:10 | Python | UTF-8 | Python | false | false | 1,779 | py | command_parser.py | import argparse
from mantraml.core.management.commands.cloud import CloudCmd
from mantraml.core.management.commands.importcmd import ImportCmd
from mantraml.core.management.commands.makedata import MakeDataCmd
from mantraml.core.management.commands.makemodel import MakeModelCmd
from mantraml.core.management.commands.m... |
77064d15f2f036033e61f9d1ed835795c24fbbf3 | 9eb4da8fe0eb56a0b0e4c4d660f52f52838c91da | /tests/modules/core/test_pasource.py | 88ef4653931bdc0021dd64b3a1b17eda8e2da363 | [
"MIT"
] | permissive | tobi-wan-kenobi/bumblebee-status | bf53b44341f4d84c4684675af3dcb8c675579f23 | d03e6307f5e8c0b1c0451636ac9b1e84f3529a73 | refs/heads/main | 2023-08-31T11:52:12.140284 | 2023-07-21T12:18:17 | 2023-07-21T12:18:17 | 72,353,166 | 1,345 | 361 | MIT | 2023-09-13T19:25:17 | 2016-10-30T14:07:20 | Python | UTF-8 | Python | false | false | 80 | py | test_pasource.py | import pytest
def test_load_module():
__import__("modules.core.pasource")
|
e4e9e7656f17f5eb251ef81dd4ed9c1afdc53e8f | 22b8c680d7787cc9fcee678cdeed73dc685a4d0f | /sdk/python/core/samples/hello_xr.py | 89a109167c2bee45fe38698e3eeb48aaccb8becf | [
"Apache-2.0"
] | permissive | CiscoDevNet/ydk-gen | cf36433acb8d90b514f8748531a2cb06e66f7f2d | 27dd7d85134a62aa9e9fa48edc0359d32b6a31ec | refs/heads/master | 2023-05-13T22:52:26.135573 | 2023-02-01T03:27:31 | 2023-02-01T03:27:31 | 53,680,541 | 138 | 98 | Apache-2.0 | 2023-09-07T21:55:37 | 2016-03-11T16:27:20 | C++ | UTF-8 | Python | false | false | 2,857 | py | hello_xr.py | #!/usr/bin/env python
#
# ========================================================================
# Copyright 2018 Cisco Systems, 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
#
# ... |
34c12360ad0deb0e11dd41141d571d411f73c477 | e3a012bb52c519dce49d2e18893c336f64826bd8 | /pendulum/parsing/iso8601.py | cc4dd7aa07061cec5cb8683b0d87d9ef075784b0 | [
"MIT"
] | permissive | sdispater/pendulum | 3058257d15d7bc58d3f8f4eebf755fad262454d9 | d1a874dfc079d544e7a96478e2258bb2b01c3e72 | refs/heads/master | 2023-08-31T07:04:27.162631 | 2023-08-17T23:23:46 | 2023-08-17T23:23:46 | 62,095,504 | 5,914 | 445 | MIT | 2023-08-19T19:59:58 | 2016-06-27T23:37:53 | Python | UTF-8 | Python | false | false | 13,886 | py | iso8601.py | from __future__ import annotations
import datetime
import re
from typing import cast
from pendulum.constants import HOURS_PER_DAY
from pendulum.constants import MINUTES_PER_HOUR
from pendulum.constants import MONTHS_OFFSETS
from pendulum.constants import SECONDS_PER_MINUTE
from pendulum.duration import Duration
from... |
37dad8d8041bc0f61e52372eceaac5fa13e58021 | d7949f5b2075384075fa066d571144bbbe02ffd8 | /supervised/validation/validator_custom.py | e69e0864e2aea7a3854f508fc5751c9732ddadcc | [
"MIT"
] | permissive | mljar/mljar-supervised | 57fb56b05b1a53ea979bf9cb9b127f314853bdbd | 6722eb1e6441c11990f2aed01a444ddcae478c09 | refs/heads/master | 2023-08-30T23:48:28.692945 | 2023-08-28T15:09:39 | 2023-08-28T15:09:39 | 156,218,203 | 2,759 | 388 | MIT | 2023-08-28T10:24:12 | 2018-11-05T12:58:04 | Python | UTF-8 | Python | false | false | 4,267 | py | validator_custom.py | import os
import gc
import joblib
import logging
import numpy as np
import pandas as pd
import warnings
log = logging.getLogger(__name__)
from sklearn.model_selection import StratifiedKFold
from sklearn.model_selection import KFold
from supervised.validation.validator_base import BaseValidator
from supervised.except... |
829f0d8ec6aea62aaf236e6b5abc4c486ea6d048 | ab40571d5051ad53c0f205fa797ba36eac516d06 | /language/compgen/nqg/model/parser/training/input_utils.py | f642190b66f620db18170595d8db69090f77afc7 | [
"Apache-2.0",
"LicenseRef-scancode-generic-cla"
] | permissive | google-research/language | e941b1a92ab46d40d8d03bb0c314905cb6902ce2 | ac9447064195e06de48cc91ff642f7fffa28ffe8 | refs/heads/master | 2023-08-24T23:10:13.207294 | 2023-05-25T20:47:18 | 2023-05-25T22:29:27 | 153,201,352 | 1,567 | 371 | Apache-2.0 | 2023-07-06T23:03:15 | 2018-10-16T00:58:14 | Python | UTF-8 | Python | false | false | 4,185 | py | input_utils.py | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... |
46a8d90cabe677ea681c74f928e64f1da4af8a3a | 9ed3b16b3da72e4c47a04f2f2e3ef395e9fd9f20 | /main/libwacom/template.py | 78c9e5e23e3e4785690b1f9a79605b729a4093b6 | [
"BSD-2-Clause"
] | permissive | chimera-linux/cports | fdae59dc25856942be3041e10e3533dbf8f883c3 | 714680161cd719dd047452c95fbb9b447bc23a86 | refs/heads/master | 2023-09-03T19:30:40.720670 | 2023-09-03T15:07:40 | 2023-09-03T15:07:40 | 374,000,317 | 118 | 37 | BSD-2-Clause | 2023-09-14T20:31:08 | 2021-06-05T02:07:34 | Python | UTF-8 | Python | false | false | 714 | py | template.py | pkgname = "libwacom"
pkgver = "2.8.0"
pkgrel = 0
build_style = "meson"
configure_args = ["-Ddocumentation=disabled", "-Dtests=enabled"]
hostmakedepends = ["meson", "pkgconf"]
makedepends = ["libgudev-devel", "glib-devel", "libxml2-devel"]
checkdepends = ["bash"]
pkgdesc = "Library to handle Wacom tablets"
maintainer = ... |
034eab0ae10f793818530ab79d3a7f6bea076321 | 12f0bd77926127cdacc2452d6f9cfed91806b2fe | /idaes/core/surrogate/base/surrogate_base.py | cfc4d27e19785e6227cdcfa868de34db73444c18 | [
"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 | 14,453 | py | surrogate_base.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... |
ab7f7d1fffccbe12942b7eaa3a9768005e395df0 | 10ddfb2d43a8ec5d47ce35dc0b8acf4fd58dea94 | /Python/is-subsequence.py | 7f5086668d0cee86cf8ceecca1c8c61f87a52e7b | [
"MIT"
] | permissive | kamyu104/LeetCode-Solutions | f54822059405ef4df737d2e9898b024f051fd525 | 4dc4e6642dc92f1983c13564cc0fd99917cab358 | refs/heads/master | 2023-09-02T13:48:26.830566 | 2023-08-28T10:11:12 | 2023-08-28T10:11:12 | 152,631,182 | 4,549 | 1,651 | MIT | 2023-05-31T06:10:33 | 2018-10-11T17:38:35 | C++ | UTF-8 | Python | false | false | 379 | py | is-subsequence.py | # Time: O(n)
# Space: O(1)
class Solution(object):
def isSubsequence(self, s, t):
"""
:type s: str
:type t: str
:rtype: bool
"""
if not s:
return True
i = 0
for c in t:
if c == s[i]:
i += 1
if i ==... |
b891ba9f6022076c33dc994e250c27828b225fa0 | 9ed4d46aedd4d4acadb48d610e940594b5b7b3fd | /graphs/g_topological_sort.py | 77543d51f61d91ba84acfe1b8bae6ef74c58166e | [
"MIT"
] | permissive | TheAlgorithms/Python | 7596a0e236ed12a61f9db19a7ea68309779cc85b | 421ace81edb0d9af3a173f4ca7e66cc900078c1d | refs/heads/master | 2023-09-01T17:32:20.190949 | 2023-08-29T13:18:10 | 2023-08-29T13:18:10 | 63,476,337 | 184,217 | 48,615 | MIT | 2023-09-14T02:05:29 | 2016-07-16T09:44:01 | Python | UTF-8 | Python | false | false | 946 | py | g_topological_sort.py | # Author: Phyllipe Bezerra (https://github.com/pmba)
clothes = {
0: "underwear",
1: "pants",
2: "belt",
3: "suit",
4: "shoe",
5: "socks",
6: "shirt",
7: "tie",
8: "watch",
}
graph = [[1, 4], [2, 4], [3], [], [], [4], [2, 7], [3], []]
visited = [0 for x in range(len(graph))]
stack ... |
2e30c67c084c8eadda2f0d6dacb9c8fd6a34f965 | 9ba214bbcdb58f5134b96bd41f5f54b60faf77a4 | /avalanche/benchmarks/utils/data.py | 824aac473dd8cb76b2258558cf3ea5bf8e55439b | [
"MIT"
] | permissive | ContinualAI/avalanche | aedc55059d7b952beb50898f213b9c66953cb764 | deb2b3e842046f48efc96e55a16d7a566e022c72 | refs/heads/master | 2023-08-08T23:26:10.835875 | 2023-08-02T14:39:40 | 2023-08-02T14:39:40 | 245,145,949 | 1,424 | 270 | MIT | 2023-09-04T04:17:05 | 2020-03-05T11:32:13 | Python | UTF-8 | Python | false | false | 27,305 | py | data.py | ################################################################################
# Copyright (c) 2022 ContinualAI. #
# Copyrights licensed under the MIT License. #
# See the accompanying LICENSE file for terms. ... |
7e596ec1717ac4d7f71dbbd07f0f64c3fc962f89 | 6c8305ea1df9687df1c0d2b0ace56733516c6322 | /readthedocs/search/tests/test_api.py | 123b0bbd652adf4d3d5948caacc7690eacef70e0 | [
"MIT"
] | permissive | readthedocs/readthedocs.org | 9806083aa744c2308267919480a692e1e003e45d | bf88ce6d1085d922322a5fadce63a22c5544c830 | refs/heads/main | 2023-09-05T20:22:34.281891 | 2023-09-05T12:41:52 | 2023-09-05T12:41:52 | 841,835 | 2,894 | 1,509 | MIT | 2023-09-14T20:36:00 | 2010-08-16T19:18:06 | Python | UTF-8 | Python | false | false | 28,852 | py | test_api.py | import re
from unittest import mock
import pytest
from django.urls import reverse
from django_dynamic_fixture import get
from readthedocs.builds.models import Version
from readthedocs.projects.constants import (
MKDOCS,
MKDOCS_HTML,
PUBLIC,
SPHINX,
SPHINX_HTMLDIR,
SPHINX_SINGLEHTML,
)
from rea... |
0bdd617c41fc85fcb8aebfd87172cb5089c1545c | 6cf2903f7384272cf270f4a16e9b010b8778c165 | /mangle-infra-agent/Faults/DiskFillFault.py | bb4d3a2a4619b4badb0c99f70a10e8f88cc8a3fd | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | vmware/mangle | f0a814391e61936bd16ff88bdd1fe88139e5a2a3 | aa8e22adfd08f825d4d80be143c707f4fd2c5d86 | refs/heads/master | 2023-08-17T15:34:04.628269 | 2023-04-06T10:07:47 | 2023-04-06T10:07:47 | 172,835,741 | 166 | 52 | NOASSERTION | 2023-06-14T22:33:56 | 2019-02-27T03:25:47 | Java | UTF-8 | Python | false | false | 5,752 | py | DiskFillFault.py | from Faults import InfraFault
from Faults import FaultStatus
import time
import psutil
import subprocess
import os
import logging
import threading
import math
from Faults.helper import FaultHelper
log = logging.getLogger("python_agent")
class DiskFillFault(InfraFault.InfraFault):
def __init__(self... |
e084cfd1974239e5612e763b0acb5a14e6aacf96 | 0760fb4901a75766921a205b55686d6d6f049b30 | /python/ray/experimental/job/example_job/demo_script.py | 8bcc79611e26d404a7f7d0dbd86b22f1424420c9 | [
"MIT",
"BSD-3-Clause",
"Apache-2.0"
] | permissive | ray-project/ray | a4bb6940b08b59a61ef0b8e755a52d8563a2f867 | edba68c3e7cf255d1d6479329f305adb7fa4c3ed | refs/heads/master | 2023-08-31T03:36:48.164405 | 2023-08-31T03:20:38 | 2023-08-31T03:20:38 | 71,932,349 | 29,482 | 5,669 | Apache-2.0 | 2023-09-14T21:48:14 | 2016-10-25T19:38:30 | Python | UTF-8 | Python | false | false | 2,258 | py | demo_script.py | # Regular ray application that user wrote and runs on local cluster.
# intermediate status are dumped to GCS
import argparse
import time
import ray
import ray.experimental.internal_kv as ray_kv
@ray.remote
class StepActor:
def __init__(self, interval_s=1, total_steps=3):
self.interval_s = interval_s
... |
9ad556b2adaa62767d8a063a59a9292f9cffe5f6 | 8d1c7fba7cd15f8a1e33fd27d11eefd1c67d579f | /src/test/py/bazel/bazel_windows_cpp_test.py | f2b2b8792d0992d01869710da17c65cc4b6bf360 | [
"Apache-2.0"
] | permissive | bazelbuild/bazel | 5896162455f032efc899b8de60aa39b9d2cad4a6 | 171aae3f9c57b41089e25ec61fc84c35baa3079d | refs/heads/master | 2023-08-22T22:52:48.714735 | 2023-08-22T18:01:53 | 2023-08-22T18:01:53 | 20,773,773 | 20,294 | 4,383 | Apache-2.0 | 2023-09-14T18:38:44 | 2014-06-12T16:00:38 | Java | UTF-8 | Python | false | false | 41,655 | py | bazel_windows_cpp_test.py | # Copyright 2017 The Bazel 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 la... |
4c46c4ee93cc7503e21816eef57bb4c82c4a0227 | 4c8ce1a65c1543d8411b990340b0ccb84bfcf18a | /examples/finished/gcp.py | e434be5e2839c69e1cb8f5e258e6c2189002bc0f | [
"MIT"
] | permissive | scipopt/PySCIPOpt | e7b92c39ea1cdc32a123669614e4c06bee4b73eb | c6329760618a88e43e32d164e363ed233499de91 | refs/heads/master | 2023-09-03T13:35:16.769766 | 2023-07-03T08:33:49 | 2023-07-03T08:33:49 | 59,214,089 | 390 | 92 | MIT | 2023-08-07T10:44:19 | 2016-05-19T14:29:21 | Cython | UTF-8 | Python | false | false | 5,046 | py | gcp.py | ##@file gcp.py
#@brief model for the graph coloring problem
"""
Copyright (c) by Joao Pedro PEDROSO and Mikio KUBO, 2012
"""
from pyscipopt import Model, quicksum, multidict
def gcp(V,E,K):
"""gcp -- model for minimizing the number of colors in a graph
Parameters:
- V: set/list of nodes in the graph
... |
43894a055ae8d9f23efce29824851752e655a33c | a960e38868b3a157179bb576ac78b0f144140ed8 | /PyTorch/nlp/bert/pack_pretraining_data_pytorch.py | 88780c576aa520ced6c27112f1a10b245dfbcb47 | [
"Apache-2.0"
] | permissive | HabanaAI/Model-References | d339b211adf8be9575ebb1e3bb6afd6cd04312e6 | 3ca77c4a5fb62c60372e8a2839b1fccc3c4e4212 | refs/heads/master | 2023-08-17T06:32:28.714253 | 2023-08-14T15:22:08 | 2023-08-14T15:22:08 | 288,377,272 | 108 | 53 | null | 2023-08-18T02:30:16 | 2020-08-18T06:45:50 | Python | UTF-8 | Python | false | false | 26,607 | py | pack_pretraining_data_pytorch.py | ###############################################################################
# Copyright (c) 2021, Habana Labs Ltd. All rights reserved.
###############################################################################
import os
import time
import argparse
import random
import h5py
from tqdm import tqdm, trange
impor... |
78f73baeda8385f61f6c1733ca70e5175ce67fc7 | 8da41ffa2ccb09e04f95db0f211e0ed69a42a352 | /courses/machine_learning/deepdive2/structured/solutions/serving/application/lib/oauth2client/contrib/devshell.py | 691765f097640a9987ae217b7d380280f89508ac | [
"Apache-2.0"
] | permissive | GoogleCloudPlatform/training-data-analyst | 808af9b09a0e5f5657c4ca76cdd205f808d76d89 | 975a95032ce5b7012d1772c7f1f5cfe606eae839 | refs/heads/master | 2023-09-05T19:50:59.722334 | 2023-09-04T14:25:33 | 2023-09-04T14:25:33 | 56,459,948 | 7,311 | 5,917 | Apache-2.0 | 2023-09-13T21:45:54 | 2016-04-17T21:39:27 | Jupyter Notebook | UTF-8 | Python | false | false | 4,991 | py | devshell.py | # Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... |
e7425b1b7ccf2888efd0ce7682eba523f70614dd | fbbe424559f64e9a94116a07eaaa555a01b0a7bb | /Selenium_PhantomJS/source/pip/_vendor/re-vendor.py | 0a52123e4f248648117bc4599da04dd4634e5253 | [
"MIT"
] | permissive | ryfeus/lambda-packs | 6544adb4dec19b8e71d75c24d8ed789b785b0369 | cabf6e4f1970dc14302f87414f170de19944bac2 | refs/heads/master | 2022-12-07T16:18:52.475504 | 2022-11-29T13:35:35 | 2022-11-29T13:35:35 | 71,386,735 | 1,283 | 263 | MIT | 2022-11-26T05:02:14 | 2016-10-19T18:22:39 | Python | UTF-8 | Python | false | false | 773 | py | re-vendor.py | import os
import sys
import pip
import glob
import shutil
here = os.path.abspath(os.path.dirname(__file__))
def usage():
print("Usage: re-vendor.py [clean|vendor]")
sys.exit(1)
def clean():
for fn in os.listdir(here):
dirname = os.path.join(here, fn)
if os.path.isdir(dirname):
... |
92ab2cf6f57d7083305947966c802ce0e2791a9b | c7c73566784a7896100e993606e1bd8fdd0ea94e | /direct/src/gui/DirectGuiBase.py | f9bbb5b5f8d138755469b04cf27ae4532b5511dc | [
"BSD-3-Clause",
"BSD-2-Clause"
] | permissive | panda3d/panda3d | c3f94df2206ff7cfe4a3b370777a56fb11a07926 | 160ba090a5e80068f61f34fc3d6f49dbb6ad52c5 | refs/heads/master | 2023-08-21T13:23:16.904756 | 2021-04-11T22:55:33 | 2023-08-06T06:09:32 | 13,212,165 | 4,417 | 1,072 | NOASSERTION | 2023-09-09T19:26:14 | 2013-09-30T10:20:25 | C++ | UTF-8 | Python | false | false | 46,105 | py | DirectGuiBase.py | """
Base class for all DirectGui items. Handles composite widgets and
command line argument parsing.
Code overview:
1) Each widget defines a set of options (optiondefs) as a list of tuples
of the form ``('name', defaultValue, handler)``.
'name' is the name of the option (used during construction of configur... |
4675eb63dbbe904ffd9261ec934829869977bf7e | 0760fb4901a75766921a205b55686d6d6f049b30 | /python/ray/serve/tests/test_deployment_graph_config.py | 2e0c80a5998ae1e90832d630ebf344668f01b79c | [
"MIT",
"BSD-3-Clause",
"Apache-2.0"
] | permissive | ray-project/ray | a4bb6940b08b59a61ef0b8e755a52d8563a2f867 | edba68c3e7cf255d1d6479329f305adb7fa4c3ed | refs/heads/master | 2023-08-31T03:36:48.164405 | 2023-08-31T03:20:38 | 2023-08-31T03:20:38 | 71,932,349 | 29,482 | 5,669 | Apache-2.0 | 2023-09-14T21:48:14 | 2016-10-25T19:38:30 | Python | UTF-8 | Python | false | false | 2,743 | py | test_deployment_graph_config.py | import pytest
import os
import sys
from typing import Any
from ray import serve
from ray.serve.deployment_graph import RayServeDAGHandle
from ray.serve.dag import InputNode
from ray.serve._private.deployment_graph_build import build as pipeline_build
@serve.deployment(name="counter", num_replicas=2, user_config={"co... |
3aa4850b92b3b2db49e2cd808accc5cf05aca971 | 93a116442c782730ef774688b8f41a8c4bdc2a59 | /lldbhelpers/iblog.py | 11c139d4bbb0b4d70a4bbb6cfc48c74294e413e3 | [
"MIT"
] | permissive | keith/dotfiles | 016dddc45d194bd3f2b3224b3d830c833b0c9175 | 7ca92029cd03905159fa6433de915666c340d491 | refs/heads/main | 2023-08-04T00:49:38.487154 | 2023-07-26T04:05:51 | 2023-07-26T04:05:51 | 5,795,829 | 226 | 29 | MIT | 2022-07-25T15:00:22 | 2012-09-13T14:26:33 | Shell | UTF-8 | Python | false | false | 1,913 | py | iblog.py | import lldb
import re
class SectionNotFound(Exception):
pass
def _extract_address_from(memory_string):
result = re.match(
r"^data found at location: (0x[0-9a-fA-F]+)$",
memory_string,
re.MULTILINE,
)
return result.group(1)
def _find_section(module, section_name, segment_nam... |
9616d4add8e898369a8c1773989b22256172d5cf | d6a43cbb975c0d5dd2465d6f09c43767d35c121a | /tests/test_sql_utils.py | 9fafcc61fe72e2d9bcfc56eaa9bd788ae75e9c10 | [
"BSD-3-Clause"
] | permissive | lemon24/reader | a76f5fd3f8dbf9d86e3627bbf9a60732414721cb | 5e1682c9bfa36d341c03ab804adfb95cfc53f26e | refs/heads/master | 2023-08-17T00:38:03.405077 | 2023-08-16T21:11:25 | 2023-08-16T21:11:25 | 115,272,183 | 349 | 24 | BSD-3-Clause | 2022-06-20T19:37:32 | 2017-12-24T15:36:43 | Python | UTF-8 | Python | false | false | 4,724 | py | test_sql_utils.py | from copy import deepcopy
from textwrap import dedent
import pytest
from reader._sql_utils import BaseQuery
from reader._sql_utils import Query
def test_query_simple():
query = BaseQuery().SELECT('select').FROM('from').JOIN('join').WHERE('where')
assert str(query) == dedent(
"""\
SELECT
... |
d4c7b3aeac7c08c1909d13fa6fdfa79162078b3a | b5ce6908490cfb8e6a1e1cbe4745d675122ddce0 | /questions/maximum-difference-between-node-and-ancestor/Solution.py | 871c09b00a785d24b2f547e3ab0510571a40feff | [
"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,562 | py | Solution.py | """
Given the root of a binary tree, find the maximum value v for which there exist different nodes a and b where v = |a.val - b.val| and a is an ancestor of b.
A node a is an ancestor of b if either: any child of a is equal to b or any child of a is an ancestor of b.
Example 1:
Input: root = [8,3,10,1,6,null,14,n... |
24234dd23ae3eb71b736bea1c860cd650f23b213 | 4c6d31e726ee988ae652cbcc81c34fd95a279dc7 | /parent/uav/src/main/python/pyspookystuff/uav/utils.py | 8679755ebc8dfe4cdb6ac00511f4fa3f1f880e00 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | tribbloid/spookystuff | 4198a9a469b4d648e7b73a4f2faab035fabd0b91 | 477dabeba07519a9c042bb1e20c35f6b6be253cc | refs/heads/master | 2023-07-05T18:24:13.574276 | 2023-05-28T20:57:14 | 2023-06-11T17:59:52 | 20,600,369 | 120 | 42 | Apache-2.0 | 2023-01-19T21:37:42 | 2014-06-07T18:55:20 | Scala | UTF-8 | Python | false | false | 4,975 | py | utils.py | from __future__ import print_function
import os
import math
import time
from dronekit import LocationGlobal, LocationGlobalRelative
from math import radians, cos, sin, asin, sqrt
earth_radius = 6378137.0 # Radius of "spherical" earth
DEVNULL = open(os.devnull, 'w')
def _groundDistance(lon1, lat1, lon2, lat2):
... |
3834e33d62fbb5370f81c7dcf21d30cd1b3ff75a | 617f9a5c9ff8e710de7b43c031cdd97a671c68c3 | /tests/features/test_neurite.py | 90bea2a3b335113b15fba005885cd08dcdef2099 | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | BlueBrain/NeuroM | e136fc4a36fe1b5d8e590179dc3d8a111d6e5282 | 34d202cfb95d32cd985a423b65349aa1b01957d6 | refs/heads/master | 2023-08-17T18:42:43.125992 | 2023-08-08T07:14:38 | 2023-08-08T07:14:38 | 34,906,350 | 106 | 75 | BSD-3-Clause | 2023-09-14T10:58:38 | 2015-05-01T14:21:43 | Python | UTF-8 | Python | false | false | 9,400 | py | test_neurite.py | # Copyright (c) 2015, Ecole Polytechnique Federale de Lausanne, Blue Brain Project
# All rights reserved.
#
# This file is part of NeuroM <https://github.com/BlueBrain/NeuroM>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are ... |
b1a9afa70bfc77545507bbc488493403b56225c1 | c803d90920e31aa96a458ef217875ddd784cbd22 | /bindings/python/py_src/tokenizers/implementations/byte_level_bpe.py | c7e3dbc466259795ed9d168f57d8fcabe947e96e | [
"Apache-2.0"
] | permissive | huggingface/tokenizers | ae906154bf31d3aca9f8eee1a9a95e6e76e18a93 | 8e522a38d9721796f39d62fc67bfc8900a923de1 | refs/heads/main | 2023-09-04T06:26:20.217139 | 2023-08-29T11:15:26 | 2023-08-29T11:15:26 | 219,035,799 | 7,761 | 722 | Apache-2.0 | 2023-09-07T14:25:38 | 2019-11-01T17:52:20 | Rust | UTF-8 | Python | false | false | 4,289 | py | byte_level_bpe.py | from typing import Dict, Iterator, List, Optional, Tuple, Union
from tokenizers import AddedToken, Tokenizer, decoders, pre_tokenizers, processors, trainers
from tokenizers.models import BPE
from tokenizers.normalizers import Lowercase, Sequence, unicode_normalizer_from_str
from .base_tokenizer import BaseTokenizer
... |
516fb0ef4f35ea0f37c0a758e89bd649e33c627e | 1634f33c5021e8465a695fb5244504e2eeeecff5 | /kitsune/products/tests/test_templates.py | 86eba4bffcc7b9fa6c8e150123d8b7753a109c8c | [] | permissive | mozilla/kitsune | fee4b8598eb01f5b4add00f2f010b45e2a6ca901 | 67ec527bfc32c715bf9f29d5e01362c4903aebd2 | refs/heads/main | 2023-09-01T21:41:59.076570 | 2023-08-31T22:34:05 | 2023-08-31T22:34:05 | 489,645 | 1,218 | 697 | BSD-3-Clause | 2023-09-14T08:43:19 | 2010-01-26T18:53:57 | Python | UTF-8 | Python | false | false | 6,908 | py | test_templates.py | from django.conf import settings
from django.core.cache import cache
from pyquery import PyQuery as pq
from kitsune.products.models import HOT_TOPIC_SLUG
from kitsune.products.tests import ProductFactory, TopicFactory
from kitsune.questions.models import QuestionLocale
from kitsune.search.tests import Elastic7TestCase... |
e83cf13803cbef6d5421ddf9e56f1f28fa1e4c73 | b50df8a902f4e2c1ecd8667b7b97937da3371caf | /Parte002/ex1030_hora_actual_actualizada_por_segundo.py | 7bbfff7c36f5b217fe1c2b4f5793194ccf091efd | [] | no_license | Fhernd/PythonEjercicios | 5a5633855979baec89a3c257eb57aac076a7465f | 204d3d59ddeed6cbf263b23f14e950c20f81f608 | refs/heads/master | 2021-11-23T00:26:28.861302 | 2021-10-14T16:50:27 | 2021-10-14T16:50:27 | 230,629,743 | 124 | 84 | null | 2021-09-15T18:45:25 | 2019-12-28T15:45:28 | Python | UTF-8 | Python | false | false | 205 | py | ex1030_hora_actual_actualizada_por_segundo.py | # Ejercicio 1030: Usar el módulo time para mostrar la hora actual actualizada cada segundo.
import time
while True:
hora_actual = time.strftime('%H:%M:%S')
print(hora_actual)
time.sleep(1)
|
23c48116934763785d3daa1374d1b0e67deca3db | 5111b0c881c8d86705f2b237e14024396e34091a | /accounting_pdf_reports/__init__.py | ceea55ab52ece56c3b000518b2009c6c0efe8e04 | [] | no_license | odoomates/odooapps | a22fa15346694563733008c42549ebc0da7fc9f6 | 68061b6fa79818d17727ef620e28fff44b48df72 | refs/heads/16.0 | 2023-08-11T15:25:28.508718 | 2023-08-10T17:58:45 | 2023-08-10T17:58:45 | 173,598,986 | 182 | 306 | null | 2023-08-10T17:58:46 | 2019-03-03T16:20:23 | Python | UTF-8 | Python | false | false | 219 | py | __init__.py | # -*- coding: utf-8 -*-
from . import wizard
from . import models
from . import report
def _pre_init_clean_m2m_models(cr):
cr.execute("""DROP TABLE IF EXISTS account_journal_account_report_partner_ledger_rel""")
|
8532e46cc7f81fc59739f2cf405548f1891b36f7 | 6c3d132dc176c6bec03482318753e8c2dca6e5f9 | /test/test_remove_object.py | d4b454186c444dcde026e2f78430443fc24e372b | [
"MIT"
] | permissive | dflook/python-minifier | c396952f2c5ad0a2743b4d7610375f27a506a4c8 | 22513c33b3638e42802e2a2062ec800ff7aed3f6 | refs/heads/main | 2023-06-07T07:28:38.829374 | 2023-05-09T19:54:28 | 2023-05-09T19:54:28 | 137,584,140 | 482 | 42 | MIT | 2023-09-02T17:19:49 | 2018-06-16T13:53:14 | Python | UTF-8 | Python | false | false | 1,482 | py | test_remove_object.py | import ast
import pytest
import sys
from python_minifier.transforms.remove_object_base import RemoveObject
from python_minifier.ast_compare import compare_ast
def test_remove_object_py3():
if sys.version_info < (3, 0):
pytest.skip('This test is python3 only')
source = '''
class Test(object):
pas... |
fa1f15cba63bc385ff8f93828d963119ae92a774 | b39b31269db70d72d57959feaa0b063eb2b37e12 | /test/framework/functional/base_functional_test_case.py | 85bd6a187eee061ae7c31aba28daba9ce4edc121 | [
"Apache-2.0"
] | permissive | box/ClusterRunner | 477a1d1fa02d5cb5819ccdea891ea73ced347ffd | 55d18016f2c7d2dbb8aec5879459cae654edb045 | refs/heads/master | 2023-08-16T21:23:11.232430 | 2022-02-08T16:28:01 | 2022-02-09T06:40:51 | 25,371,175 | 168 | 45 | Apache-2.0 | 2022-10-15T03:04:49 | 2014-10-17T18:20:39 | Python | UTF-8 | Python | false | false | 9,844 | py | base_functional_test_case.py | from contextlib import suppress
import http.client
import os
import tempfile
from unittest import TestCase
from app.common.build_artifact import BuildArtifact
from app.master.slave import SlaveRegistry
from app.util import fs, log
from app.util.conf.base_config_loader import BaseConfigLoader
from app.util.conf.configu... |
d4358ffbc42101443b0645641608822050abe368 | 73a0f661f1423d63e86489d4b2673f0103698aab | /python/oneflow/test/modules/test_higher_derivative_conv.py | 05c5f5592749452b9544283050a1ef7576247881 | [
"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 | 4,759 | py | test_higher_derivative_conv.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... |
38c5536f1157a86e87b82ed7a89a3c8c6136564f | 0fd8922e6b9c6ed20a9c89fb2887056aad16b5e6 | /examples/bidirect.py | e2bbdb0a501dcbfb33a5927879a83e735f1be3ce | [
"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 | 790 | py | bidirect.py | import numpy as np
from tensorflow.keras import Sequential
from tensorflow.keras.layers import Bidirectional, GRU
from cond_rnn import ConditionalRecurrent
model = Sequential()
forward_layer = ConditionalRecurrent(GRU(units=12, return_sequences=True))
backward_layer = ConditionalRecurrent(GRU(units=13, return_sequen... |
e67917fe2f1dc9f3fa8c8dc0e4dc44d594c284a1 | c6759b857e55991fea3ef0b465dbcee53fa38714 | /tools/nntool/nntool/generation/generators/general/dsp_generators.py | 566dffb5c41bdd112f50dedeb1d6eebc9ceaabf5 | [
"Apache-2.0",
"AGPL-3.0-or-later",
"AGPL-3.0-only",
"GPL-1.0-or-later",
"LicenseRef-scancode-other-copyleft"
] | 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 | 7,634 | py | dsp_generators.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... |
1fb111a14ed6df0c561f10e8027972d7e1ade7a0 | df87814cb32990ad8c27d0b13a821aabce012819 | /kolibri/plugins/setup_wizard/test/test_api.py | 21ff4d6135b6324740d511c9a09bf0734f292183 | [
"MIT"
] | permissive | learningequality/kolibri | 26812d4ae771f3b389d3317a586bc032fc84866b | cc9da2a6acd139acac3cd71c4cb05c15d4465712 | refs/heads/release-v0.16.x | 2023-09-01T18:07:29.720772 | 2023-08-31T15:43:47 | 2023-08-31T15:43:47 | 49,976,939 | 689 | 682 | MIT | 2023-09-14T20:02:29 | 2016-01-19T19:22:07 | Python | UTF-8 | Python | false | false | 4,099 | py | test_api.py | from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
from django.urls import reverse
from rest_framework.test import APITestCase
from kolibri.core.auth.models import FacilityUser
from kolibri.core.auth.test.helpers import clear_process_cache
from kolibri... |
0c23e46a8a3acfc399c65d659cc2328ad9887349 | 1e8f44db6e7bfcc6d6899db033d4fe35a11cb5b4 | /morph_net/network_regularizers/resource_function_test.py | 4f4db0c928184ee49495ea145caa101f776fbd5c | [
"Apache-2.0",
"LicenseRef-scancode-generic-cla"
] | permissive | google-research/morph-net | abb3ab4b655d8e5aea00df975b479181e69584d6 | e575a05fb18327312cbf67e870e28af4ccd4a0e4 | refs/heads/master | 2023-09-01T07:37:36.349243 | 2023-07-27T11:42:41 | 2023-07-27T11:43:29 | 175,291,625 | 1,101 | 176 | Apache-2.0 | 2023-07-27T11:43:36 | 2019-03-12T20:30:12 | Python | UTF-8 | Python | false | false | 57,168 | py | resource_function_test.py | """Tests for network_regularizers.resource_function."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from absl.testing import parameterized
from morph_net.network_regularizers import resource_function
import numpy as np
import tensorflow.compat.v1 as tf
f... |
a34f92211a3f81b5510ea5d9dc6e439a76c7548e | 316e768ac2ba60fb393a8b914f5c761e077609d1 | /archivebox/parsers/medium_rss.py | a4159f286fa559b73b77e1cc82253dca5980d324 | [
"MIT",
"LicenseRef-scancode-free-unknown"
] | permissive | ArchiveBox/ArchiveBox | 88fc98ac08800d9785d4333572627a7f354f3a43 | 73a5f74d3840284bceaabced9cf99575b8c15d54 | refs/heads/dev | 2023-09-03T15:31:13.265845 | 2023-08-31T22:17:45 | 2023-08-31T22:17:45 | 90,356,372 | 9,794 | 606 | MIT | 2023-09-04T05:04:41 | 2017-05-05T08:50:14 | Python | UTF-8 | Python | false | false | 1,193 | py | medium_rss.py | __package__ = 'archivebox.parsers'
from typing import IO, Iterable
from datetime import datetime
from xml.etree import ElementTree
from ..index.schema import Link
from ..util import (
htmldecode,
enforce_types,
)
@enforce_types
def parse_medium_rss_export(rss_file: IO[str], **_kwargs) -> Iterable[Link]:
... |
4346279d861305c69a22ab87c38058fbe043fb1f | f4095ef092092399102bb21d1198e324f10f53ed | /pontoon/base/tests/test_utils.py | e32295be98168242bee81d20f08855cfaa68a49d | [
"BSD-3-Clause"
] | permissive | mozilla/pontoon | 2c53227570099ca666467d4e3d78e929bf456c9c | 0c4f74e15b1e442a9cee9b1cd636214b24f5352b | refs/heads/master | 2023-09-06T04:15:41.009180 | 2023-09-01T14:23:51 | 2023-09-01T14:23:51 | 1,385,890 | 1,367 | 713 | BSD-3-Clause | 2023-09-13T18:04:41 | 2011-02-19T11:25:51 | Python | UTF-8 | Python | false | false | 12,490 | py | test_utils.py | import pytest
from django.contrib.auth import get_user_model
from django.urls import reverse
from django.urls.exceptions import NoReverseMatch
from pontoon.base.models import Project
from pontoon.base.utils import (
aware_datetime,
extension_in,
get_m2m_changes,
get_object_or_none,
latest_datetim... |
764959b63695071d68c9790d51931c8ab2d64db3 | 80a3d98eae1d755d6914b5cbde63fd10f5cc2046 | /autox/autox_video/mmaction2/mmaction/utils/precise_bn.py | 2751b2e736c03ca41a6048b321e6f5527ca5bf94 | [
"Apache-2.0"
] | permissive | 4paradigm/AutoX | efda57b51b586209e1d58e1dab7d0797083aadc5 | 7eab9f4744329a225ff01bb5ec360c4662e1e52e | refs/heads/master | 2023-05-24T00:53:37.109036 | 2023-02-14T14:21:50 | 2023-02-14T14:21:50 | 388,068,949 | 752 | 162 | Apache-2.0 | 2022-07-12T08:28:09 | 2021-07-21T09:45:41 | Jupyter Notebook | UTF-8 | Python | false | false | 5,826 | py | precise_bn.py | # Adapted from https://github.com/facebookresearch/fvcore/blob/master/fvcore/nn/precise_bn.py # noqa: E501
# Original licence: Copyright (c) 2019 Facebook, Inc under the Apache License 2.0 # noqa: E501
import logging
import time
import mmcv
import torch
from mmcv.parallel import MMDistributedDataParallel
from mmcv.... |
6f278761279c84ce9fd678c76675fff9dd5627bc | 65d613ef216e674b6063e2716855aa47b3ad777d | /code/examples/dis_channels.py | 694ccad7b5abc9a3e1d980a60691b214986f84a7 | [
"Python-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | dsuch/pymqi | c7adb7d199baa0a55265da6ac3e6866f0d2e907e | de161f70d71fac9380c9d5e11479d9d9fcd3873f | refs/heads/main | 2023-01-20T12:06:36.844340 | 2023-01-08T04:42:31 | 2023-01-08T04:42:31 | 9,715,588 | 112 | 81 | NOASSERTION | 2022-10-15T14:35:17 | 2013-04-27T14:14:02 | Python | UTF-8 | Python | false | false | 968 | py | dis_channels.py | # More examples are at https://dsuch.github.io/pymqi/examples.html
# or in code/examples in the source distribution.
import logging
import pymqi
logging.basicConfig(level=logging.INFO)
queue_manager = 'QM1'
channel = 'DEV.APP.SVRCONN'
host = '127.0.0.1'
port = '1414'
conn_info = '%s(%s)' % (host, port)
user = 'app'... |
cbf636f71ac4937cb60a52e310b402dfa28b1971 | a50b71d12f5c304747d6ba803b9e2e4c0f61218b | /pyp2rpm/virtualenv.py | 77014e29131cc2bcec2094196b136f69d751e7cf | [
"MIT"
] | permissive | fedora-python/pyp2rpm | 6b8fc80b3272c50102094d6dda55fa53a1eab20a | 92399daa509d2769433f97cf7f07209f738139a2 | refs/heads/main | 2023-08-25T05:07:28.651158 | 2023-08-06T04:59:41 | 2023-08-06T05:39:13 | 39,019,167 | 123 | 54 | MIT | 2023-08-06T05:39:15 | 2015-07-13T15:03:09 | Python | UTF-8 | Python | false | false | 4,338 | py | virtualenv.py | import os
import glob
import logging
import pprint
from virtualenvapi.manage import VirtualEnvironment
import virtualenvapi.exceptions as ve
from pyp2rpm.exceptions import VirtualenvFailException
from pyp2rpm.settings import DEFAULT_PYTHON_VERSION, MODULE_SUFFIXES
logger = logging.getLogger(__name__)
def site_pack... |
8869541d2b90a4f88597c0dba212d5c860c42abc | 8355bc4e1ad1a863124c1d80d4a00b28ef587b48 | /src/probnum/randprocs/covfuncs/_covariance_linear_operator.py | 6d00de209d65a550c962a6095bb568c5f74c9d68 | [
"MIT"
] | permissive | probabilistic-numerics/probnum | af62f04253a08da71174e5c1b7d733deb1914eee | af410278783069542610d16b10ba12d2940a05a6 | refs/heads/main | 2023-08-31T05:12:08.877238 | 2023-06-19T20:34:15 | 2023-06-19T20:34:15 | 218,856,084 | 384 | 56 | MIT | 2023-09-10T18:52:24 | 2019-10-31T20:29:11 | Python | UTF-8 | Python | false | false | 3,347 | py | _covariance_linear_operator.py | """LinearOperator that represents pairwise covariances of evaluations."""
from typing import Callable, Optional
import warnings
import numpy as np
from probnum import linops
from probnum.typing import ShapeType
_USE_KEOPS = True
try:
from pykeops.numpy import LazyTensor
except ImportError: # pragma: no cover
... |
995a87d8923ab2779a4d782ba38fcfd1aebdd75d | 6946f9a3e9d57b00ea275b2303ced0dedcdba1d4 | /qf_lib/backtesting/events/event_manager.py | 89e6278757fddd6f748a757a43ad78a8fef85a56 | [
"Apache-2.0"
] | permissive | quarkfin/qf-lib | 8eaf76e3db385295ff8845b3250ba64a6fcfc7a6 | f707e51bc2ff45f6e46dcdd24d59d83ce7dc4f94 | refs/heads/master | 2023-08-31T17:41:57.213680 | 2023-08-29T10:01:49 | 2023-08-29T10:01:49 | 202,696,503 | 379 | 51 | Apache-2.0 | 2023-09-05T06:11:35 | 2019-08-16T09:10:20 | Python | UTF-8 | Python | false | false | 4,979 | py | event_manager.py | # Copyright 2016-present CERN – European Organization for Nuclear Research
#
# 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... |
2a0307f2952ba9fa757935df25bd6ad9b3304634 | 3abc1fef99ac6ce0b845a1090fae7f6875fee729 | /src/ralph/dc_view/urls/ui.py | 8cd6988ccd7108fbb3652db6e6cef074dd8a35d6 | [
"Apache-2.0"
] | permissive | allegro/ralph | 5ff9165a202e836061c99e8af20214e0d651622f | b4a72356f527b1f12c7babd7465d2d7fa3ffb0d3 | refs/heads/ng | 2023-09-02T01:13:43.672554 | 2023-09-01T09:48:38 | 2023-09-01T09:48:38 | 4,359,038 | 1,970 | 617 | Apache-2.0 | 2023-09-01T09:44:39 | 2012-05-17T14:04:57 | Python | UTF-8 | Python | false | false | 320 | py | ui.py | from django.conf.urls import url
from ralph.dc_view.views.ui import ServerRoomView, SettingsForAngularView
urlpatterns = [
url(
r'^dc_view/?$',
ServerRoomView.as_view(),
name='dc_view'
),
url(
r'^settings.js$', SettingsForAngularView.as_view(), name='settings-js',
),
]
|
6857d42299697f316af4b3f4dbc62b609ba2d814 | 5eb1db74d541708ba07fe24057b15279569c6fae | /bostonkeyparty-2016/reverse/Alewife/sudhackar/05223a3cae8b71d81592d5977fb1c3622bcbf793.py | 3841d9d24345b6fe7a135aad5d1410fe9721a40c | [] | no_license | ByteBandits/writeups | 4a66c62ce8a311211df8af6e6e6d0d3f6b34665e | 3fbdab90224cfe76cf98bcab081582f06d6deadb | refs/heads/master | 2021-12-13T13:55:58.855221 | 2021-12-06T06:32:21 | 2021-12-06T06:32:21 | 43,562,256 | 128 | 37 | null | 2016-07-03T05:54:48 | 2015-10-02T15:56:36 | C | UTF-8 | Python | false | false | 69,548 | py | 05223a3cae8b71d81592d5977fb1c3622bcbf793.py | primes=[2, 3, 5, 7, 11, 13, 17, 19, 23, 29 , 31, 37, 41, 43, 47, 53, 59, 61, 67, 71 , 73, 79, 83, 89, 97,101,103,107,109,113 ,127,131,137,139,149,151,157,163,167,173 ,179,181,191,193,197,199,211,223,227,229 ,233,239,241,251,257,263,269,271,277,281 ,283,293,307,311,313,317,331,337,347,349 ,353,359,367,373,379,383,389... |
5d7364b78f811c343a920a42b7cefd1f6a7bde49 | c83318a170bcf9728282820190918bd4c76ffaa6 | /synology_api/docker_api.py | 12cb733143933d7d5f3019398b82ea7abde054da | [
"MIT"
] | permissive | N4S4/synology-api | 9ae3ffb50f4a0d6aacff448a7fec000888076091 | e355c443a05289c366f85915982eb5006b874a25 | refs/heads/master | 2023-05-25T21:59:50.721096 | 2023-05-05T19:42:35 | 2023-05-05T19:42:35 | 138,232,891 | 418 | 119 | MIT | 2023-09-13T07:58:39 | 2018-06-21T23:43:47 | Python | UTF-8 | Python | false | false | 2,664 | py | docker_api.py | from __future__ import annotations
from typing import Optional
from . import base_api_core
class Docker(base_api_core.Core):
def __init__(self,
ip_address: str,
port: str,
username: str,
password: str,
secure: bool = False,
... |
bdf97fb676de2a5a805de6a375fea50ed4006875 | b095173b2dbc77c8ad61c42403258c76169b7a63 | /src/sagemaker/jumpstart/accessors.py | 8117606299a2f294b20ec3faedf2e2db1b5b2f38 | [
"Apache-2.0"
] | permissive | aws/sagemaker-python-sdk | 666665e717cfb76698ba3ea7563b45344634264d | 8d5d7fd8ae1a917ed3e2b988d5e533bce244fd85 | refs/heads/master | 2023-09-04T01:00:20.663626 | 2023-08-31T15:29:19 | 2023-08-31T15:29:19 | 110,621,895 | 2,050 | 1,255 | Apache-2.0 | 2023-09-14T17:37:15 | 2017-11-14T01:03:33 | Python | UTF-8 | Python | false | false | 9,415 | py | accessors.py | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You
# may not use this file except in compliance with the License. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompan... |
14771233d7f15cebbe39f3573dcd22bdabd7663f | 562e99134dbce70c96a7d5c1d746c175bcdddd5e | /example/core/migrations/0001_initial.py | 5105d7cda4e871ff81a54f0c3b5b47c017b0375f | [
"BSD-2-Clause"
] | permissive | mlavin/django-selectable | 5d1e7627df1d5200e1b339df90ee2fcb6ff8443d | 2281dc1b3b27f74ca5870109b5b49b8e03bf3f4a | refs/heads/master | 2023-07-06T08:23:06.412877 | 2023-06-22T11:33:40 | 2023-06-22T11:33:40 | 4,803,005 | 114 | 63 | BSD-2-Clause | 2023-06-22T09:44:06 | 2012-06-27T01:53:04 | JavaScript | UTF-8 | Python | false | false | 2,329 | py | 0001_initial.py | # -*- coding: utf-8 -*-
# Generated by Django 1.9.12 on 2017-02-25 01:13
from __future__ import unicode_literals
import django.db.models.deletion
import localflavor.us.models
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
depen... |
383d8b97a9ef1dfe45346b16b0274dc7dc19d225 | 364774e29ef2474552ea3839de0951e63cbae0a6 | /wouso/core/user/models.py | 0398c7e6ea68ebf9ee9f6dba7c617263d68d1f82 | [
"Apache-2.0"
] | permissive | rosedu/wouso | 66c50ef750cf79d6959768f7df93cc08607cc266 | ed34c62ac925db719388f27fe5acb40376d8d0c1 | refs/heads/master | 2022-10-29T14:28:51.818073 | 2022-09-24T18:54:04 | 2022-09-24T18:54:04 | 2,965,476 | 121 | 97 | NOASSERTION | 2019-11-15T09:33:50 | 2011-12-12T16:15:01 | Python | UTF-8 | Python | false | false | 12,436 | py | models.py | # coding=utf-8
import logging
from md5 import md5
from datetime import datetime, timedelta
from random import shuffle
from django.db import models
from django.db.models import Sum, Q
from django.contrib.auth.models import User, Permission
from django.conf import settings
from wouso.core.decorators import cached_method,... |
85a9e24173a33ce0f2af55ca541799fd4b1374b5 | afbae26b958b5ef20548402a65002dcc8e55b66a | /release/stubs.min/Tekla/Structures/Drawing/UI.py | 0c9db90e5075ee484cd997e7978ec762352f1bd3 | [
"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 | 4,329 | py | UI.py | # encoding: utf-8
# module Tekla.Structures.Drawing.UI calls itself UI
# from Tekla.Structures.Drawing,Version=2017.0.0.0,Culture=neutral,PublicKeyToken=2f04dbe497b71114
# by generator 1.145
# no doc
# no imports
# no functions
# classes
class DrawingObjectSelector(object):
# no doc
def GetSelected(self... |
947d7b229ffd0f1f6f739f2c36bc7ba8f34e42de | 0bdabe35aefc31cfcc7aa46e3d2463b67b46ee96 | /pyFileFixity/lib/profilers/pyinstrument/__main__.py | 95fee11c5ac945ba3d5446cee78df6ccbf3a8158 | [
"MIT",
"BSD-3-Clause"
] | permissive | lrq3000/pyFileFixity | 1bed7958a786110a06df33d846a2e844576686e8 | dd71ba67e08a5fe2ce50fb5403f93103284ad83e | refs/heads/master | 2023-08-18T11:36:37.905055 | 2023-08-15T18:04:15 | 2023-08-15T18:04:15 | 31,501,322 | 107 | 10 | MIT | 2022-12-09T01:36:05 | 2015-03-01T15:53:56 | Python | UTF-8 | Python | false | false | 4,960 | py | __main__.py | from optparse import OptionParser
import sys
import os
import codecs
from pyinstrument import Profiler
from pyinstrument.profiler import SignalUnavailableError
# Python 3 compatibility. Mostly borrowed from SymPy
PY3 = sys.version_info[0] > 2
if PY3:
import builtins
exec_ = getattr(builtins, "exec")
else:
... |
eeec088528a8b8ff6c4751c349983c137c8f9538 | 338fb36acc32ff4b127385a4c0946eed90324862 | /setup.py | 8b8595ccd6b832674d4baec332d5ea946438d79d | [
"BSD-3-Clause"
] | permissive | skorokithakis/django-loginas | 43a6202eecb899b4f0cdd2d306a6fbd65a1b4d4c | b1d252c04f15af05362ba58ddf3c9db1ee80a908 | refs/heads/master | 2023-09-04T10:29:46.426123 | 2023-07-29T17:09:52 | 2023-07-29T17:09:52 | 6,147,933 | 288 | 57 | BSD-3-Clause | 2023-07-24T23:06:23 | 2012-10-09T21:15:15 | Python | UTF-8 | Python | false | false | 1,362 | py | setup.py | #!/usr/bin/env python
from loginas import __version__
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(
name="django-loginas",
version=__version__,
author="Stochastic Technologies",
author_email="info@stochastictechnologies.com",
long_description... |
64145e9c7ab6a6b50fffa198fe7207ed2a51ce14 | 1ed25da5d1e27cd49fb4a02acfe99aadcf2fae57 | /pygeoapi/provider/filesystem.py | db2a824bea68c34991364452516a77dd89abb1db | [
"MIT"
] | permissive | geopython/pygeoapi | 6d2a7b0e8fe75d0c454a0b2fc3599a0b88c7567f | 2d3ec88320cf5e1ed47b4b794f40b453bad487e2 | refs/heads/master | 2023-09-04T04:30:59.768950 | 2023-09-03T02:00:23 | 2023-09-03T02:00:23 | 121,585,259 | 391 | 245 | MIT | 2023-09-13T18:13:00 | 2018-02-15T02:46:27 | Python | UTF-8 | Python | false | false | 13,113 | py | filesystem.py | # =================================================================
#
# Authors: Tom Kralidis <tomkralidis@gmail.com>
#
# Copyright (c) 2023 Tom Kralidis
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation
# files (the "Software"), to deal in ... |
5bdbcc3d2b23de1f3fa00999291982f07a0e2822 | 8e6bb9c1a620a162b7d017c2373dd01be54ea86d | /bio/deseq2/deseqdataset/test/Snakefile | 93b960589408a0996eb71e5f6ecf5be1b7486cf5 | [] | no_license | snakemake/snakemake-wrappers | 5d0963502c26eb709513567e25422871fe477cf2 | 996bdcf2a96535b967dfa483c363a5496f4b3906 | refs/heads/master | 2023-08-19T05:18:44.337503 | 2023-08-18T12:03:38 | 2023-08-18T12:03:38 | 213,319,194 | 184 | 189 | null | 2023-09-12T11:38:35 | 2019-10-07T07:20:59 | CAP CDS | UTF-8 | Python | false | false | 3,896 | Snakefile | rule test_DESeqDataSet_filtering:
input:
dds="dataset/dds.RDS",
output:
"dds_minimal.RDS",
threads: 1
log:
"logs/DESeqDataSet/txi.log",
params:
formula="~condition", # Required R statistical formula
factor="condition", # Optionally used for relevel
r... | |
078b664107681f834a8e112489d03b54cce5973e | 312839d6a1fe98ebf6f55a11ff3136c0d1fc4895 | /support/gadget_upgrade/download_and_checksum_gadget.py | 77c3481dd60b9a3f9f4b4be9cbf5f2bc5cd82e1c | [
"Apache-2.0"
] | permissive | puremourning/vimspector | e6e6e647919b68d740f42fcb9a4c8df635afebff | 4e49a1782e34433410f96602640a05c9ec00a65f | refs/heads/master | 2023-09-01T13:25:41.271070 | 2023-08-18T18:54:11 | 2023-08-18T18:54:11 | 134,156,823 | 4,156 | 235 | Apache-2.0 | 2023-09-10T18:57:07 | 2018-05-20T14:19:41 | Vim Script | UTF-8 | Python | false | false | 2,717 | py | download_and_checksum_gadget.py | #!/usr/bin/env python3
import sys
import os
import string
import fnmatch
if '--help' in sys.argv:
print( f"Usage: { os.path.basename( __file__ ) } [-v] gadget [gadget2 ...]" )
print( "" )
print( "Each gadget is a glob (fnmatch), so use * to do all " )
exit(0)
VERBOSE = 0
if '-v' in sys.argv:
VERBOSE = 1
... |
55417e8454ed47e4150e36545eb96ed0ebcd9d6c | 7c593f4cc70ee56106cc9cce105e6b9e7839431e | /objax/module.py | d2eade1a8bad9c534b2cc41257f95631196c0079 | [
"Apache-2.0"
] | permissive | google/objax | 84e397cafb70813a1e89467f745facf828ed24b8 | a2d025d9e1da8660a1883404207c41d4327d8c48 | refs/heads/master | 2023-09-02T07:04:26.801269 | 2023-06-12T22:12:53 | 2023-06-12T22:12:53 | 288,923,752 | 801 | 80 | Apache-2.0 | 2023-06-12T22:12:54 | 2020-08-20T06:20:40 | Python | UTF-8 | Python | false | false | 16,998 | py | module.py | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... |
d9c64c6e586719a4be3b1b39e6d02f8a0f8f93e3 | 0f85c7bfd4f29bcd856adc316cecc097fda744dc | /tests/plugins/tcp_mockserver/test_example.py | faa83d079beb3d8c2af5d812da25712f5ccaa8a9 | [
"MIT"
] | permissive | yandex/yandex-taxi-testsuite | 260f46731c9888a9efcc3372c3d92329f2fb4d56 | 8befda8c13ef58d83b2ea7d0444e34de0f67ac7f | refs/heads/develop | 2023-08-31T23:28:31.874786 | 2023-08-14T16:00:53 | 2023-08-14T16:00:53 | 244,937,107 | 150 | 41 | MIT | 2023-09-13T16:34:07 | 2020-03-04T15:35:09 | Python | UTF-8 | Python | false | false | 985 | py | test_example.py | import contextlib
import pytest
@pytest.fixture(scope='session')
async def _tcp_mockserver(create_tcp_mockserver):
"""
Returns base per-session server instance bound to random port.
"""
async with create_tcp_mockserver(host='localhost', port=0) as mockserver:
yield mockserver
@pytest.fixtur... |
9438bda06e5fee4a4e18b146cb49fab2726e0aaa | d87964cb5b12f542cd21f1ad7c6ed85b5325dc77 | /cibuildwheel/bashlex_eval.py | c5f8053723faa6b0cadb62870a34e94ddfa5818b | [
"BSD-2-Clause"
] | permissive | pypa/cibuildwheel | 65ddc98e9933ad4c7d408966c06cf4156941b68c | ce71f445deee7ac0dabd1ee900d6672370e60478 | refs/heads/main | 2023-08-17T02:56:29.658243 | 2023-08-14T16:15:53 | 2023-08-14T16:15:53 | 85,508,223 | 884 | 136 | NOASSERTION | 2023-09-13T20:10:43 | 2017-03-19T20:59:00 | Python | UTF-8 | Python | false | false | 3,996 | py | bashlex_eval.py | from __future__ import annotations
import subprocess
from collections.abc import Iterable, Mapping, Sequence
from dataclasses import dataclass
from typing import Callable, Dict, List # noqa: TID251
import bashlex
# a function that takes a command and the environment, and returns the result
EnvironmentExecutor = Cal... |
fb8effbc46a4905fd0b806022b44616c69bc8d43 | 63483feac7b6dcb4182eb7f66a731071f810224e | /object_detection/utils.py | 8634d1091bceccde35f39d630e07284ac5943c9a | [
"Apache-2.0"
] | permissive | Cartucho/OpenLabeling | 5a0788627a7af736eada4ff2ca84aba67831afd9 | d46c62a319b5d2be7374a90b937840e011945739 | refs/heads/master | 2022-08-08T15:10:12.025697 | 2020-05-07T10:22:27 | 2020-05-07T10:22:27 | 118,135,147 | 742 | 245 | Apache-2.0 | 2022-07-06T19:58:46 | 2018-01-19T14:30:09 | Python | UTF-8 | Python | false | false | 330 | py | utils.py | def format_results(boxes, scores, image_id, cat_id):
results = []
for box, score in zip(boxes, scores):
r = {
"image_id": image_id,
"category_id": cat_id,
"bbox": [float(i) for i in box],
"score": float(score),
}
results.append(r)
retur... |
5dc6cd62ff5dafbe0e08a546b532296ddbff131e | 9907672fcd81ab73ac63b2a83422a82bf31eadde | /yukicoder/tyama_yukicoder472.py | 76f5a81331ed9189edf2b8ec5b37c4e74c254756 | [
"0BSD"
] | permissive | cielavenir/procon | bbe1974b9bddb51b76d58722a0686a5b477c4456 | 746e1a91f574f20647e8aaaac0d9e6173f741176 | refs/heads/master | 2023-06-21T23:11:24.562546 | 2023-06-11T13:15:15 | 2023-06-11T13:15:15 | 7,557,464 | 137 | 136 | null | 2020-10-20T09:35:52 | 2013-01-11T09:40:26 | C++ | UTF-8 | Python | false | false | 405 | py | tyama_yukicoder472.py | #!/usr/bin/python
from functools import sys
import sys
sys.setrecursionlimit(1000000)
memo={}
def dfs(v,d,r):
if d==len(v): return 0
if (d,r) not in memo: memo[(d,r)]=reduce(lambda s,i: min(s,dfs(v,d+1,r-i)+v[d][i]), range(min(r,3)+1), 1<<30)
return memo[(d,r)]
n,k=map(int,sys.stdin.readline().split())
v=[list(map(... |
95d17844c682dd0fa41424564b25b21b02b9c9bb | 8d34a1f5cd773e7eaf21ed3dd36f5b5180794db5 | /tests/plot.py | fcac0bc3c22e2e5cb10fbb10bbaa6969f8f568a9 | [
"BSD-3-Clause",
"Apache-2.0"
] | permissive | grantjenks/python-diskcache | ff89f7deab24c70a09ff90a8fdbfe4ecac981c1b | 323787f507a6456c56cce213156a78b17073fe00 | refs/heads/master | 2023-09-01T05:46:40.781039 | 2023-08-31T06:10:27 | 2023-08-31T06:10:27 | 51,039,722 | 1,895 | 140 | NOASSERTION | 2023-08-31T05:56:39 | 2016-02-03T23:59:06 | Python | UTF-8 | Python | false | false | 3,892 | py | plot.py | """Plot Benchmarks for docs
$ export PYTHONPATH=/Users/grantj/repos/python-diskcache
$ python tests/plot.py --show tests/timings_core_p1.txt
"""
import argparse
import collections as co
import re
import sys
import matplotlib.pyplot as plt
def parse_timing(timing, limit):
"""Parse timing."""
if timing.endsw... |
4e95797ee7b9894af9684b5ef980a87410b3b0c6 | 14d02788a5e9fbf0f98a6d0f76cdfb376f22fa74 | /src/retype/__main__.py | c0d81676f39fed8f84641a0e1c7c600179a7b537 | [
"MIT"
] | permissive | ambv/retype | cab384828bdff77883dcfe8872403e1159ee088f | 8d534bf80345b1d4b7df512eaf13c19bbcccc7c5 | refs/heads/main | 2023-08-25T12:22:56.628291 | 2022-08-14T07:12:06 | 2022-08-14T07:12:06 | 84,633,594 | 139 | 22 | MIT | 2022-08-14T07:01:24 | 2017-03-11T07:54:58 | Python | UTF-8 | Python | false | false | 2,494 | py | __main__.py | from __future__ import annotations
import sys
from functools import partial
from pathlib import Path
import click
from . import retype_path
from .config import ReApplyFlags
from .version import __version__
Directory = partial(
click.Path,
exists=True,
file_okay=False,
dir_okay=True,
readable=Tru... |
fc5dc6dd33ea7e4c2e41d03d825043c5db974b09 | c46754b9600a12df4f9d7a6320dfc19aa96b1e1d | /src/transformers/models/convbert/tokenization_convbert_fast.py | 07447bb6a17caa7d92f5c604830f3db5ed2dfb8b | [
"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 | 8,765 | py | tokenization_convbert_fast.py | # coding=utf-8
# Copyright The HuggingFace Inc. 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... |
fc262b474009f4ba608156b2a54ed6d3fcceb5ee | 9940f6579e010bb7c1fa13885c49bbaf6164723b | /lbry/schema/mime_types.py | 62505be04fb9a4b61664aec912d44b2544093659 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | lbryio/lbry-sdk | feaf1143b178b496a9d81c99faf51fac60e6fed1 | eb5da9511e162ef1080cb34af2ee087383cfa94a | refs/heads/master | 2023-08-18T13:06:16.106204 | 2023-02-07T18:50:25 | 2023-04-03T17:34:36 | 41,103,286 | 5,272 | 291 | MIT | 2023-06-28T16:36:20 | 2015-08-20T15:24:10 | Python | UTF-8 | Python | false | false | 8,694 | py | mime_types.py | import os
import filetype
import logging
types_map = {
# http://www.iana.org/assignments/media-types
# Type mapping for automated metadata extraction (video, audio, image, document, binary, model)
'.a': ('application/octet-stream', 'binary'),
'.ai': ('application/postscript', 'image'),
'.aif': ('au... |
54902c33c39722a318fbaf56d21789404b8e438f | 7c045b4aae3ba8979422822b7b811afcde14710b | /zfit/util/temporary.py | 77134925a45084bbec38f913fa24942a313c0b15 | [
"BSD-3-Clause"
] | permissive | zfit/zfit | 204d27cfdde030b5ab6420d8cfe4dc12bbc040aa | fc1cc3859db4160e1c5713e490e842a545cc14c2 | refs/heads/develop | 2023-08-08T01:51:15.468478 | 2023-08-06T11:17:29 | 2023-08-06T11:17:45 | 126,311,570 | 164 | 55 | BSD-3-Clause | 2023-08-02T11:38:02 | 2018-03-22T09:31:20 | Python | UTF-8 | Python | false | false | 2,040 | py | temporary.py | # Copyright (c) 2022 zfit
from __future__ import annotations
from collections.abc import Callable
from typing import Any
class TemporarilySet:
def __init__(self, value: Any, setter: Callable, getter: Callable):
"""Temporarily set `value` with `setter` and reset to the old value after leaving the contex... |
d8162bd37efb122a80e5196b94c5162aa03305dd | 93f5395aff38d77d8717c604c027db97c59990ad | /pylib/algorithm.py | 80e3e744276cef1e5a3c8a855d12012da3638439 | [] | no_license | lilydjwg/winterpy | 690d3e8ed4f73855838886945626896c9ec54a61 | 2294a258074b8262d6f7482023f6d126189f9bc0 | refs/heads/master | 2023-08-22T23:14:54.067358 | 2023-06-05T03:25:25 | 2023-06-05T03:25:25 | 1,648,844 | 198 | 69 | null | 2023-06-05T03:25:26 | 2011-04-22T07:41:15 | Python | UTF-8 | Python | false | false | 2,821 | py | algorithm.py | '''一些算法'''
import bisect
def LevenshteinDistance(s, t):
'''字符串相似度算法(Levenshtein Distance算法)
一个字符串可以通过增加一个字符,删除一个字符,替换一个字符得到另外一个
字符串,假设,我们把从字符串A转换成字符串B,前面3种操作所执行的最少
次数称为AB相似度
这算法是由俄国科学家Levenshtein提出的。
Step Description
1 Set n to be the length of s.
Set m to be the length of t.
If n = 0, return m and exit.
... |
729d1d15e0a9eaad35bc3ca0061f62aba6f5fa94 | 10da9e96fdc5fc227222b7523155bde02fb58150 | /qlib_server/config.py | 75bda57d959f39ae69cf12692b47a14a6383d047 | [
"LicenseRef-scancode-generic-cla",
"MIT"
] | permissive | microsoft/qlib-server | fa82365db5f5b553b181d3cf6d426c641b432d3d | 6e7f326e23262062c81361a5d5642da88050f7e3 | refs/heads/main | 2023-07-06T02:31:11.539686 | 2022-07-08T02:15:09 | 2022-07-08T02:15:09 | 292,248,698 | 216 | 68 | MIT | 2022-07-08T02:15:10 | 2020-09-02T10:11:49 | Python | UTF-8 | Python | false | false | 3,629 | py | config.py | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
import qlib
# TODO: fix the default config to common settings while releasing.
_server_config = {
# flask port
"flask_server": "172.23.233.89",
"flask_port": 9710,
"flask_ping_interval": 1.0,
# rabitmq server
"queue_host"... |
194dc3ba2a628b49573e3a8e91c14b379de3c116 | f11912913e0e4ff9ad032e52fe9452187f6f54d5 | /yys.py | 95f6e79420de17cc430828f959f167c99bc8cb43 | [] | no_license | lisai9093/YYS | daeaba90bb6f3b5abb218359c3e944cd2f4fd5d4 | 15f14f36fd4dd4138cceaac9ac44b678b6d8bbdc | refs/heads/master | 2023-08-05T08:55:49.649209 | 2023-08-03T07:11:20 | 2023-08-03T07:11:20 | 207,671,389 | 273 | 76 | null | 2023-03-20T05:35:21 | 2019-09-10T22:04:50 | Python | UTF-8 | Python | false | false | 44,842 | py | yys.py | import cv2,time,random,os, datetime
import os,sys,pyautogui, traceback
import numpy as np
import mss
import action
#检测系统
print('操作系统:', sys.platform)
if sys.platform=='darwin':
scalar=True
else:
scalar=False
# 读取文件 精度控制 显示名字
imgs = action.load_imgs()
#pyautogui.PAUSE = 0.05
pyautogui.FAILSAFE=False
start_t... |
d549d3a0695aab9dcf9fedc6c532d45961f0f9b7 | e17660bcf07fe3221a18dc3da68f06c85c40cbf9 | /src/py2app/__main__.py | ceeecc8eb8e782c4fd024cc2e2a021c939d19df5 | [
"MIT",
"Python-2.0"
] | permissive | ronaldoussoren/py2app | bca832cab41b9a365342d400aed4ebbbe80bed0c | e9c7a88f34d79c41a3a344ccc14cd97c24904b9f | refs/heads/master | 2023-09-01T05:14:53.388393 | 2023-04-16T08:34:06 | 2023-04-16T08:34:06 | 233,826,136 | 292 | 34 | NOASSERTION | 2023-08-30T17:54:44 | 2020-01-14T11:27:41 | Python | UTF-8 | Python | false | false | 2,291 | py | __main__.py | import argparse
import pathlib
import sys
try:
import tomllib
except ImportError:
import tomli as tomllib
from . import _builder, _config, _progress
def parse_arguments(argv):
parser = argparse.ArgumentParser(
prog=f"{sys.executable} -mpy2app", description="Build macOS executable bundles"
)
... |
8aac95e21d67c74f324c2020f5939640dbd469f6 | ab7098a9f2f1363bae0b325fcdb0877cbb730699 | /examples/src/main/python/python_example.py | dcbe975027f4df9e2601fd2aaf93136cc3a06d31 | [
"Apache-2.0"
] | permissive | AbsaOSS/spline-spark-agent | 06ca449b0d8337324011812dd8dc6e905f688a42 | 0ed969ad4aee0518f4d1f83aab88b6130e431b16 | refs/heads/develop | 2023-08-31T09:19:40.314900 | 2023-08-28T12:35:30 | 2023-08-29T09:37:52 | 231,394,159 | 141 | 88 | Apache-2.0 | 2023-09-14T10:09:44 | 2020-01-02T14:06:46 | Scala | UTF-8 | Python | false | false | 1,181 | py | python_example.py | #
# Copyright 2017 ABSA Group Limited
#
# 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 ... |
afb756ba55e6d5532e5d80afdd2b72471e080db5 | 818322f58e5243fbffb016a8f3b440394e1e0115 | /tests/plugin/resolver_test.py | f30c76ff34178991ec2920c99697f206af6377e4 | [
"Apache-2.0"
] | permissive | aws-cloudformation/cloudformation-cli-python-plugin | 8a4c92d0f2d82014632d16f0309e5e4eba2feb9c | a672fb3f42de5ab751ae0e437b739b0db1a7ab36 | refs/heads/master | 2023-08-17T13:22:11.525308 | 2023-08-15T21:02:33 | 2023-08-15T21:02:33 | 162,644,504 | 101 | 40 | Apache-2.0 | 2023-08-15T21:02:35 | 2018-12-21T00:13:18 | Python | UTF-8 | Python | false | false | 2,524 | py | resolver_test.py | import pytest
from rpdk.core.jsonutils.resolver import ContainerType, ResolvedType
from rpdk.python.resolver import PRIMITIVE_TYPES, contains_model, translate_type
RESOLVED_TYPES = [
(ResolvedType(ContainerType.PRIMITIVE, item_type), native_type)
for item_type, native_type in PRIMITIVE_TYPES.items()
]
def t... |
62770fb24570eee4c00c52667ff22e7c36e93704 | 9935c1a1142a19d72dd8ca5b8a8ad2a70e2a7edb | /Plugins/Aspose_Words_Java_for_Jython/asposewords/quickstart/FindAndReplace.py | 1e14bb0299980640061630ea9d4cb2c0fd58228f | [
"MIT"
] | permissive | aspose-words/Aspose.Words-for-Java | 705ad9a8047b8d9b7986dd5569859af24632afc0 | 2dceb8acb5547bbc0a62c49587b97fd4f3159b36 | refs/heads/master | 2023-08-18T08:43:51.900921 | 2023-05-15T13:48:56 | 2023-05-15T13:48:56 | 2,849,872 | 347 | 194 | MIT | 2023-02-01T13:45:06 | 2011-11-25T13:43:55 | Java | UTF-8 | Python | false | false | 726 | py | FindAndReplace.py | from asposewords import Settings
from com.aspose.words import Document
class FindAndReplace:
def __init__(self):
dataDir = Settings.dataDir + 'quickstart/'
doc = Document(dataDir + 'ReplaceSimple.doc')
# Check the text of the document.
print "Original document tex... |
90da3e1425a9404cbea0d3bfe5a6288301480c01 | c5ddaaa915829e946762f83a610a3ef43ad1f190 | /src/pip/_vendor/distlib.pyi | ea94b159a69cb34c0121d1253ded7f0d62747e95 | [
"MIT",
"LicenseRef-scancode-python-cwi",
"LicenseRef-scancode-other-copyleft",
"Python-2.0",
"BSD-3-Clause",
"0BSD",
"GPL-1.0-or-later",
"LicenseRef-scancode-free-unknown"
] | permissive | pypa/pip | 4cebef8b5e8f69921a4cbd37d5b2021fd3200a16 | 0778c1c153da7da457b56df55fb77cbba08dfb0c | refs/heads/main | 2023-08-15T01:51:24.039937 | 2023-08-14T06:22:21 | 2023-08-14T06:22:21 | 1,446,467 | 8,612 | 3,321 | MIT | 2023-09-12T07:08:11 | 2011-03-06T14:30:46 | Python | UTF-8 | Python | false | false | 21 | pyi | distlib.pyi | from distlib import * |
d829478538b13b384478deee6eb4b47e266360e1 | c9ff14ff176600169b6e9f6490ab32f5c3af60e0 | /jcvi/graphics/assembly.py | 448c3b57ab3f6333dc89a7e5a4491add69a9bcdd | [
"BSD-3-Clause",
"BSD-2-Clause"
] | permissive | tanghaibao/jcvi | c7a070692d53784a34378e19e435cb9a86d2cd2e | 695bd2eee98b14118b54fc37e38cd0222ce6a5e9 | refs/heads/main | 2023-09-01T01:22:04.353148 | 2023-08-30T01:59:11 | 2023-08-30T01:59:11 | 1,130,393 | 641 | 193 | BSD-2-Clause | 2023-09-01T03:17:24 | 2010-12-01T23:18:02 | Python | UTF-8 | Python | false | false | 15,265 | py | assembly.py | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
"""
Assembly QC plots, including general statistics, base and mate coverages, and
scaffolding consistencies.
"""
import sys
import logging
import os.path as op
from jcvi.formats.fasta import Fasta
from jcvi.formats.bed import Bed, BedLine
from jcvi.formats.sizes import Si... |
e9c266b538da600bf18350bc9fa356d925dd03f3 | 2ad93a1cf25a580fe980482d2d17a657de3b2523 | /django-stubs/db/backends/oracle/client.pyi | a8e42a9e9fc26f6852f72e4ca278ca6fa3cf8e8b | [
"MIT"
] | permissive | typeddjango/django-stubs | f35dfcb001e54694a0a1e8c0afcc6e6a3d130c32 | 0117348c3c7713f25f96b46e53ebdeed7bdba544 | refs/heads/master | 2023-08-25T19:42:52.707151 | 2023-08-23T15:13:25 | 2023-08-23T15:13:25 | 142,779,680 | 1,133 | 376 | MIT | 2023-09-13T19:05:06 | 2018-07-29T17:08:50 | Python | UTF-8 | Python | false | false | 546 | pyi | client.pyi | from collections.abc import Iterable
from typing import Any
from django.db.backends.base.client import BaseDatabaseClient
from django.db.backends.oracle.base import DatabaseWrapper
class DatabaseClient(BaseDatabaseClient):
connection: DatabaseWrapper
executable_name: str
wrapper_name: str
@staticmetho... |
4c6408e06a77912e25613df567dad0785232e0b3 | 79131be69e6eb23e900dcce9162eb625804bb747 | /apprise/plugins/NotifyBark.py | 596a9a87d0021f55a0eea2625c230290bbcc8ba9 | [
"BSD-3-Clause"
] | permissive | caronc/apprise | c806c05636466c1f895b6c2d5221df8e34ab250e | be3baed7e3d33bae973f1714df4ebbf65aa33f85 | refs/heads/master | 2023-08-28T06:40:03.718237 | 2023-08-27T20:54:21 | 2023-08-27T20:54:21 | 112,024,290 | 8,426 | 370 | BSD-3-Clause | 2023-09-10T20:17:34 | 2017-11-25T18:06:38 | Python | UTF-8 | Python | false | false | 15,903 | py | NotifyBark.py | # -*- coding: utf-8 -*-
# BSD 3-Clause License
#
# Apprise - Push Notification Library.
# Copyright (c) 2023, Chris Caron <lead2gold@gmail.com>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of s... |
35aeda4fd2b93247d3ddefe06f95a5bcca6b9417 | 224a034669068398e59962d6470fb72dbe20e8c9 | /src/lightkurve/io/everest.py | d7be1efc593e929216ccb12f25869e0d118bb0e3 | [
"MIT"
] | permissive | lightkurve/lightkurve | b892b54ffbf3cb956f88300cb7d72b7e99fefdbf | 7d485b69e9bbe58a1e7ba8d988387dc5d469ab36 | refs/heads/main | 2023-08-28T05:20:55.072927 | 2023-08-22T20:42:53 | 2023-08-22T20:42:53 | 118,387,904 | 148 | 66 | MIT | 2023-09-14T02:24:36 | 2018-01-22T00:49:59 | Python | UTF-8 | Python | false | false | 2,316 | py | everest.py | """Reader for K2 EVEREST light curves."""
from ..lightcurve import KeplerLightCurve
from ..utils import KeplerQualityFlags
from .generic import read_generic_lightcurve
def read_everest_lightcurve(
filename, flux_column="flux", quality_bitmask="default", **kwargs
):
"""Read an EVEREST light curve file.
M... |
f9bc662e89582eaa370f468f62be5601f886fc57 | 6e0da41ccb571287b67637a7693b48e0d2323676 | /google_assistant/rootfs/usr/bin/hassio_oauth.py | e2c3730d1c0fb5b0137c0e8d8a7780df831a2126 | [
"Apache-2.0"
] | permissive | home-assistant/addons | 0152a7cea8b59c5ef02973a555110cd62bec9460 | bb8e979ad12759ce02adf7a830fe09aa1d3455df | refs/heads/master | 2023-09-04T10:13:58.489171 | 2023-09-01T08:21:14 | 2023-09-01T08:21:14 | 85,435,841 | 910 | 1,048 | Apache-2.0 | 2023-09-14T15:05:35 | 2017-03-18T22:23:14 | Shell | UTF-8 | Python | false | false | 4,546 | py | hassio_oauth.py | """Run small webservice for oath."""
import json
import sys
from pathlib import Path
import threading
import time
import cherrypy
from requests_oauthlib import OAuth2Session
from google.oauth2.credentials import Credentials
HEADERS = str("""
<link rel="icon" href="/static/favicon.ico?v=1">
<link href="/static/css... |
e9ce57fec92fb50a215f208ffebed6a9edcba7e7 | 8165a3055f53d754955c7201e32c8fcdb124c1c1 | /celerite/terms.py | e2fe3246dd73d13ae5846f03253089e30fc45464 | [
"MIT"
] | permissive | dfm/celerite | 103bc71892d1718df76b66bcf75946e6f7630664 | 9c85cb2ce87969e1e4ea5dfc4afd2e04fb3f70bd | refs/heads/main | 2023-09-01T18:05:11.870876 | 2023-08-14T12:36:49 | 2023-08-14T12:36:49 | 63,601,480 | 181 | 40 | MIT | 2023-09-11T01:52:44 | 2016-07-18T12:33:37 | C++ | UTF-8 | Python | false | false | 17,837 | py | terms.py | # -*- coding: utf-8 -*-
from __future__ import division, print_function
try:
import autograd # NOQA
except ImportError:
import numpy as np
HAS_AUTOGRAD = False
else:
import autograd.numpy as np
from autograd import jacobian, elementwise_grad
HAS_AUTOGRAD = True
from itertools import chain, p... |
f36e862b90cb29933fc100ee82749b20e8af0609 | 833ef1cc5cbd5cf76da144d10d393e30976d9185 | /froide/foisite/migrations/0001_initial.py | 502ae21a9d6ee0a389c6412ed06a0ee1806b78fa | [
"MIT"
] | permissive | okfde/froide | d022407ec30bf018e6ca587ae9df0b73a8625edf | 16e3c69b333fc82cb1e52378fc003ddf071152a7 | refs/heads/main | 2023-08-31T08:02:23.343743 | 2023-08-29T07:01:03 | 2023-08-29T07:01:03 | 1,700,944 | 230 | 48 | MIT | 2023-09-13T09:10:40 | 2011-05-04T12:20:51 | Python | UTF-8 | Python | false | false | 1,363 | py | 0001_initial.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = []
operations = [
migrations.CreateModel(
name="FoiSite",
fields=[
(
"id",
... |
895e9c5413de99b9d8d5f980b316b3926c52a665 | 7378aaee27ef676db95dce7702c48f8643c63313 | /grow/commands/subcommands/build.py | 6496ccfe3ee744906e2e0df3a8333c6f8b0d17d1 | [
"MIT"
] | permissive | grow/grow | 323fa25c7690643bf170cc4558fffdfbd406ac76 | 17471c436621ebfd978b51225fa4de05367a53e1 | refs/heads/main | 2023-06-15T09:51:08.288251 | 2022-07-21T16:19:33 | 2022-07-21T16:19:33 | 12,899,663 | 352 | 56 | MIT | 2023-02-08T02:35:36 | 2013-09-17T15:51:40 | Python | UTF-8 | Python | false | false | 4,553 | py | build.py | """Command for building pods into static deployments."""
import os
import click
from grow.commands import shared
from grow.common import bulk_errors
from grow.common import rc_config
from grow.common import utils
from grow.deployments import stats
from grow.deployments.destinations import local as local_destination
fr... |
22fb02adff7b5987369380da9ec6a64ad7a7c9bf | 45e376ae66b78b17788b1d3575b334b2cb1d0b1c | /checkov/terraform/checks/resource/kubernetes/Secrets.py | 28b0ac5bec8093c00bf312c342b47fa334641f1e | [
"Apache-2.0"
] | permissive | bridgecrewio/checkov | aeb8febed2ed90e61d5755f8f9d80b125362644d | e64cbd27ffb6f09c2c9f081b45b7a821a3aa1a4d | refs/heads/main | 2023-08-31T06:57:21.990147 | 2023-08-30T23:01:47 | 2023-08-30T23:01:47 | 224,386,599 | 5,929 | 1,056 | Apache-2.0 | 2023-09-14T20:10:23 | 2019-11-27T08:55:14 | Python | UTF-8 | Python | false | false | 2,772 | py | Secrets.py | from checkov.common.models.enums import CheckCategories, CheckResult
from checkov.terraform.checks.resource.base_resource_check import BaseResourceCheck
class Secrets(BaseResourceCheck):
def __init__(self):
# CIS-1.5 5.4.1
name = "Prefer using secrets as files over secrets as environment variable... |
edbc37a3295947fa42cc1a61406f921278d172ba | bb33e6be8316f35decbb2b81badf2b6dcf7df515 | /source/res/scripts/client/messenger/gui/scaleform/meta/channelcomponentmeta.py | 3db1c398fd53e222f76fee00de5efb165caee350 | [] | 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 | 1,344 | py | channelcomponentmeta.py | # Python bytecode 2.7 (decompiled from Python 2.7)
# Embedded file name: scripts/client/messenger/gui/Scaleform/meta/ChannelComponentMeta.py
from gui.Scaleform.framework.entities.BaseDAAPIComponent import BaseDAAPIComponent
class ChannelComponentMeta(BaseDAAPIComponent):
def isJoined(self):
self._printOve... |
83bbfad9d994ccd65d25177a609e132df2ee29a0 | 1742b6719b988e5519373002305e31d28b8bd691 | /sdk/python/pulumi_aws/ec2/get_vpc_endpoint.py | 78effb4d887cc5507f6a7c126aaf956b12ad9956 | [
"BSD-3-Clause",
"Apache-2.0",
"MPL-2.0"
] | permissive | pulumi/pulumi-aws | 4f7fdb4a816c5ea357cff2c2e3b613c006e49f1a | 42b0a0abdf6c14da248da22f8c4530af06e67b98 | refs/heads/master | 2023-08-03T23:08:34.520280 | 2023-08-01T18:09:58 | 2023-08-01T18:09:58 | 97,484,940 | 384 | 171 | Apache-2.0 | 2023-09-14T14:48:40 | 2017-07-17T14:20:33 | Java | UTF-8 | Python | false | false | 16,367 | py | get_vpc_endpoint.py | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
fr... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.