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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3d7665cab3ca64aacfe89c8055f3411cf595ea08 | 30eb066695925e8aef4e6511bff8b1a78bcbef99 | /models/odefunc.py | 76ccc69392c6a3b9ffbf48c88319c870f697c0df | [
"MIT"
] | permissive | stevenygd/PointFlow | 07c373045b1f25ed7cd587fe8ff3fafe20968ae7 | 4ab483f17d809853c55e38bbf780757d40d91f5a | refs/heads/master | 2023-06-09T17:46:31.361347 | 2023-06-04T05:20:31 | 2023-06-04T05:20:31 | 180,826,719 | 667 | 107 | MIT | 2023-01-25T14:49:02 | 2019-04-11T15:56:39 | Python | UTF-8 | Python | false | false | 4,562 | py | odefunc.py | import copy
import torch
import torch.nn as nn
from . import diffeq_layers
__all__ = ["ODEnet", "ODEfunc"]
def divergence_approx(f, y, e=None):
e_dzdx = torch.autograd.grad(f, y, e, create_graph=True)[0]
e_dzdx_e = e_dzdx.mul(e)
cnt = 0
while not e_dzdx_e.requires_grad and cnt < 10:
# print(... |
18c703e02d49f5c3733ac960014c0f14497847e2 | 15f0514701a78e12750f68ba09d68095172493ee | /Python3/187.py | 72b43de218d1424f40082d398de98c8dec502ea5 | [
"MIT"
] | permissive | strengthen/LeetCode | 5e38c8c9d3e8f27109b9124ae17ef8a4139a1518 | 3ffa6dcbeb787a6128641402081a4ff70093bb61 | refs/heads/master | 2022-12-04T21:35:17.872212 | 2022-11-30T06:23:24 | 2022-11-30T06:23:24 | 155,958,163 | 936 | 365 | MIT | 2021-11-15T04:02:45 | 2018-11-03T06:47:38 | null | UTF-8 | Python | false | false | 1,089 | py | 187.py | __________________________________________________________________________________________________
sample 48 ms submission
class Solution:
def findRepeatedDnaSequences(self, s: str) -> List[str]:
repeats = []
seen = set()
for index in range(0, len(s)-9, 1):
string = s[index:index... |
045475dae81ed6c71489820c7737f3275ab78fd4 | e1cddfd754d952134e72dfd03522c5ea4fb6008e | /test/test_ip6.py | 36c4122d6272ac6dda0cd295e631a76088681ded | [
"Apache-2.0"
] | permissive | FDio/vpp | 0ad30fa1bec2975ffa6b66b45c9f4f32163123b6 | f234b0d4626d7e686422cc9dfd25958584f4931e | refs/heads/master | 2023-08-31T16:09:04.068646 | 2022-03-14T09:49:15 | 2023-08-31T09:50:00 | 96,556,718 | 1,048 | 630 | Apache-2.0 | 2023-06-21T05:39:17 | 2017-07-07T16:29:40 | C | UTF-8 | Python | false | false | 131,794 | py | test_ip6.py | #!/usr/bin/env python3
import socket
from socket import inet_pton, inet_ntop
import unittest
from parameterized import parameterized
import scapy.compat
import scapy.layers.inet6 as inet6
from scapy.layers.inet import UDP, IP
from scapy.contrib.mpls import MPLS
from scapy.layers.inet6 import (
IPv6,
ICMPv6ND_... |
9ecc1a3e6e87d3db64ceee88d223630660bdc53e | 611e0544ff871e5df58f13a5f2898102f521ec8e | /tests/kafkatest/services/kafka_log4j_appender.py | 1212a7d5454da8c85b667afe40c950bc199e66b4 | [
"Apache-2.0",
"GPL-2.0-only",
"LicenseRef-scancode-public-domain",
"W3C",
"CC0-1.0",
"GPL-1.0-or-later",
"CPL-1.0",
"GPL-2.0-or-later",
"LicenseRef-scancode-generic-export-compliance",
"LicenseRef-scancode-other-permissive",
"CC-PDDC",
"BSD-3-Clause",
"APSL-2.0",
"LicenseRef-scancode-free-... | permissive | confluentinc/kafka | 3b0830c0afd81bc84ff409fa9eff61418636d697 | cae0baef40b0d5d97af32256800492cb9d6471df | refs/heads/master | 2023-09-03T12:54:24.118935 | 2023-08-31T18:05:22 | 2023-08-31T18:05:22 | 37,555,321 | 216 | 235 | Apache-2.0 | 2023-09-14T12:05:20 | 2015-06-16T20:48:28 | Java | UTF-8 | Python | false | false | 4,277 | py | kafka_log4j_appender.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 ... |
66200c7a5015e6ed6606b228c81d73c148a59975 | 35b6013c1943f37d1428afd2663c8aba0a02628d | /logging/cloud-client/get_sink.py | 1852c1decac79c658145a2efdeea4bdc814ff432 | [
"Apache-2.0"
] | permissive | GoogleCloudPlatform/python-docs-samples | d2a251805fbeab15d76ed995cf200727f63f887d | 44e819e713c3885e38c99c16dc73b7d7478acfe8 | refs/heads/main | 2023-08-28T12:52:01.712293 | 2023-08-28T11:18:28 | 2023-08-28T11:18:28 | 35,065,876 | 7,035 | 7,593 | Apache-2.0 | 2023-09-14T20:20:56 | 2015-05-04T23:26:13 | Jupyter Notebook | UTF-8 | Python | false | false | 1,179 | py | get_sink.py | # Copyright 2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, softw... |
2fe8dc5069a34647b757adeec0408f6eb2680629 | c3fb19c2e228fd1d32516fe64f38a9006772d260 | /botfw/gmocoin/order.py | 8031c934d95a5ef9a3e14cf6c99d6dd8cb99aa07 | [
"MIT"
] | permissive | penta2019/btc_bot_framework | 0642725cfd5c7b9f1c4e011f30b292cc4fc7ba50 | 3793c4c1d170db31a8017096f16946610c0a062e | refs/heads/master | 2022-01-24T01:25:17.346272 | 2022-01-18T10:29:28 | 2022-01-18T10:29:28 | 224,544,310 | 131 | 43 | MIT | 2022-01-18T10:29:29 | 2019-11-28T01:11:14 | Python | UTF-8 | Python | false | false | 1,501 | py | order.py | from ..base import order as od
from .websocket import GmocoinWebsocketPrivate
from .api import GmocoinApi
from ..etc.util import unix_time_from_ISO8601Z
class GmocoinOrderManager(od.OrderManagerBase):
WebsocketPrivate = GmocoinWebsocketPrivate
def __init__(self, api, ws=None, retention=60):
wspr = se... |
1c1be5f47b920303f551322674122e2a78c5f230 | 0bfdffafb30b8c7df81bba17585378fc8b4c1f49 | /safe_control_gym/envs/env_wrappers/vectorized_env/subproc_vec_env.py | e4fe9af02e3a5071aac6bdf69f7c769295dd7f8a | [
"MIT"
] | permissive | utiasDSL/safe-control-gym | 9c50bca04a255831108f386d5b228bcaa653fc75 | 140ed17dbd91d73a1f6537520b610adff732b9aa | refs/heads/main | 2023-07-26T13:25:07.592019 | 2023-06-13T18:50:09 | 2023-06-13T18:50:09 | 392,837,160 | 387 | 94 | MIT | 2023-07-02T11:39:33 | 2021-08-04T22:14:15 | Python | UTF-8 | Python | false | false | 10,498 | py | subproc_vec_env.py | '''Subprocess vectorized environments.
See also:
* https://github.com/openai/baselines/blob/master/baselines/common/vec_env/subproc_vec_env.py
* https://github.com/DLR-RM/stable-baselines3/blob/master/stable_baselines3/common/vec_env/subproc_vec_env.py
'''
import copy
import multiprocessing as mp
import nump... |
1581635bc0e0678c8abc2e4c6fb3e74d1c020b18 | 017090be7ab186cb6b47f49e1066ac5cfec3a542 | /tests/unit/neptune/new/cli/test_status.py | 503e6f7ff9dbfa1bd5c7774c39c9d1f324aa228f | [
"Apache-2.0"
] | permissive | neptune-ai/neptune-client | 9a79f9d93c84b3a20114e6e49a80652930399ece | 9b697ce548634c30dbc5881d4a0b223c8987515d | refs/heads/master | 2023-08-18T01:48:22.634432 | 2023-08-17T11:55:57 | 2023-08-17T11:55:57 | 170,117,229 | 408 | 55 | Apache-2.0 | 2023-09-13T12:51:03 | 2019-02-11T11:25:57 | Python | UTF-8 | Python | false | false | 4,031 | py | test_status.py | #
# Copyright (c) 2022, Neptune Labs Sp. z o.o.
#
# 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... |
32146713b6443e92a2186c6d78beb5e1e46225df | d36388e75a43746c415f417e6fc026daa4a52f72 | /test/test_dependencies.py | e6a317854ee61f4eb28cdd158c28ac17518870fc | [
"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 | 2,823 | py | test_dependencies.py | import logging
import luigi
import sciluigi as sl
import os
import six.moves as s
import time
import unittest
TESTFILE_PATH = '/tmp/test.out'
log = logging.getLogger('sciluigi-interface')
log.setLevel(logging.WARNING)
class MultiInOutWf(sl.WorkflowTask):
def workflow(self):
mo = self.new_task('mout', Mul... |
b8e6af4affac0d2ae50f36296cc55f52c6b44af3 | 84961c5b8a190f7e2a35107bc9abf2259617e8c2 | /Chapter04/defaultdict_example.py | 57a8df4b241d4ded9ef29d9aa5fc74224e0986bf | [
"MIT"
] | permissive | PacktPublishing/Software-Architecture-with-Python | f1002dafba83d74a7096dfad4ac4cd338ee9e425 | 446b78ba0f5e23039ae0de71fb433424170fac67 | refs/heads/master | 2023-02-06T11:11:46.699458 | 2023-01-30T09:38:05 | 2023-01-30T09:38:05 | 90,152,034 | 126 | 91 | MIT | 2019-05-08T06:46:58 | 2017-05-03T13:28:23 | Python | UTF-8 | Python | false | false | 1,374 | py | defaultdict_example.py | # Code Listing #7
"""
Examples of using defaultdict
"""
from collections import defaultdict
counts = {}
text="""Python is an interpreted language. Python is an object-oriented language.
Python is easy to learn. Python is an open source language. """
word="Python"
# Implementations with simple dictionary
for word ... |
a65ceb71da2ea00f6242688f021c543fe4e26af8 | 5130754859e274cd06f63260439e5203c2000a11 | /core/controllers/reader.py | d4d3334159200b0b5073d68ac14e9c4a22a43a24 | [
"Apache-2.0"
] | permissive | oppia/oppia | 8ebc9c7c7f2b336e9a79ce04533abe3956f48cbe | d16fdf23d790eafd63812bd7239532256e30a21d | refs/heads/develop | 2023-09-04T07:50:13.661276 | 2023-09-03T09:21:32 | 2023-09-03T09:21:32 | 40,687,563 | 6,172 | 4,666 | Apache-2.0 | 2023-09-14T18:25:11 | 2015-08-14T00:16:14 | Python | UTF-8 | Python | false | false | 90,460 | py | reader.py | # Copyright 2014 The Oppia 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 ... |
ab9cf9c44c42aa5d2cf9ac1a8f2052f31431a15d | c1ab5fc6d37749cf7dd693a8f6d5475dfa54cd45 | /kubernetes/client/models/v1_node_status.py | e189bbdd232e4314727caa378c5f8fa65b1afec9 | [
"Apache-2.0"
] | permissive | kubernetes-client/python | 2d10e5d7c1358aa4473c1fcd54d2c5a1085cf56e | 68d5a1479e7d735ea454021bc54e453c9b31baf7 | refs/heads/master | 2023-09-01T11:23:54.508420 | 2023-08-31T21:04:31 | 2023-08-31T21:04:31 | 72,473,727 | 5,792 | 3,654 | Apache-2.0 | 2023-09-13T18:34:16 | 2016-10-31T20:08:03 | Python | UTF-8 | Python | false | false | 13,823 | py | v1_node_status.py | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: release-1.28
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import si... |
913dd1af1c16fc08969ed6f07a3d8ec4e239f5b7 | 4c4deee160ee4a3056b2973f6202e5cbaafb5925 | /oio/cli/admin/service_list.py | 178543edbf9777c7918f6036e39b461b21090da7 | [
"AGPL-3.0-only",
"LGPL-3.0-only"
] | permissive | open-io/oio-sds | b9bc7cec283838a59b83b5279cb181cded69034f | 08abd65aac86e47cf324826487ab9b475e014938 | refs/heads/master | 2023-09-05T05:09:29.653325 | 2023-08-01T16:37:37 | 2023-08-31T16:05:19 | 32,169,193 | 663 | 121 | MIT | 2022-03-04T13:08:03 | 2015-03-13T17:06:25 | Python | UTF-8 | Python | false | false | 8,008 | py | service_list.py | # Copyright (C) 2019-2020 OpenIO SAS, as part of OpenIO SDS
# Copyright (C) 2023 OVH SAS
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 3.0 of the License, or (at your... |
1ffc63e5c5f349eae9e46bef3933e42708e42436 | 3a24f63c8742560993b5465b26339e7c0ed05a27 | /crates/ruff/resources/test/fixtures/flake8_django/DJ013.py | 16049b93689694d8ffbd8ac70a86ecd16e062f59 | [
"BSD-3-Clause",
"0BSD",
"LicenseRef-scancode-free-unknown",
"GPL-1.0-or-later",
"MIT",
"Apache-2.0"
] | permissive | astral-sh/ruff | 8f1de11263474c6293454b02c728df2f113801db | 82410524d9612f11387c2675a03869d489bb97ef | refs/heads/main | 2023-08-02T23:20:34.351174 | 2023-08-02T21:32:43 | 2023-08-02T21:32:43 | 523,043,277 | 2,264 | 122 | MIT | 2023-09-14T20:08:59 | 2022-08-09T17:17:44 | Rust | UTF-8 | Python | false | false | 740 | py | DJ013.py | from django.db.models.signals import pre_save
from django.dispatch import receiver
from myapp.models import MyModel
test_decorator = lambda func: lambda *args, **kwargs: func(*args, **kwargs)
@receiver(pre_save, sender=MyModel)
@test_decorator
def correct_pre_save_handler():
pass
@test_decorator
@receiver(pre_... |
954f0d6052129236963a3b171d53a843cdc45e66 | c268dcf432f3b7171be6eb307aafbe1bd173285a | /reddit2telegram/channels/~inactive/r_movieclub/app.py | 729bf62f05b986a1bd0e2ef86b604c02857cdc04 | [
"MIT"
] | permissive | Fillll/reddit2telegram | a7162da2cc08c81bcc8078ea4160d4ee07461fee | 5d8ee3097e716734d55a72f5a16ce3d7467e2ed7 | refs/heads/master | 2023-08-09T10:34:16.163262 | 2023-07-30T18:36:19 | 2023-07-30T18:36:19 | 67,726,018 | 258 | 205 | MIT | 2023-09-07T02:36:36 | 2016-09-08T17:39:46 | Python | UTF-8 | Python | false | false | 211 | py | app.py | #encoding:utf-8
subreddit = 'netflixbestof+bestofnetflix+movie_club+truefilm+shittymoviedetails+ijustwatched'
t_channel = '@r_movieclub'
def send_post(submission, r2t):
return r2t.send_simple(submission)
|
4fa0e490ab0d6c20cc81570f8536b13ff644f793 | 3a6a211ea0d32405497fbd6486c490bb147e25f9 | /third_party/html5lib-python/utils/spider.py | a7b8031974b131787fe9add17e5506cdc7b82f31 | [
"MIT",
"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 | 4,157 | py | spider.py | #!/usr/bin/env python
"""Spider to try and find bugs in the parser. Requires httplib2 and elementtree
usage:
import spider
s = spider.Spider()
s.spider("http://www.google.com", maxURLs=100)
"""
import urllib.request, urllib.error, urllib.parse
import urllib.robotparser
import md5
import httplib2
import html5lib
fro... |
0210be77921bb7a24d7680a4507c7bba405ed70c | 1518a6f41df47888bb5c14cf3c2576882bb583b7 | /tests/app/migrations/0001_initial.py | 3bebbd39eb5f0a942f05f89432ce1c4e5d943054 | [
"BSD-2-Clause"
] | permissive | jieter/django-tables2 | 38b20e2d9e241f2ce8cee668e9d136898f3d097b | 966a41c25e242652bae982e71fc3cdd9ed4a66bf | refs/heads/master | 2023-09-01T08:15:30.904311 | 2023-06-27T09:40:34 | 2023-06-27T09:40:34 | 1,145,581 | 1,041 | 273 | NOASSERTION | 2023-09-11T21:04:13 | 2010-12-07T05:26:16 | Python | UTF-8 | Python | false | false | 5,447 | py | 0001_initial.py | # Generated by Django 4.0a1 on 2021-09-22 18:51
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
("contenttypes", "0002_remove_content_type_name"),
]
operations = [
migrations.CreateModel... |
ce614fa9327d3b9a3963849ac4f8a7eb6d4c3963 | 30afd852703e2d23cb0b4b6e73e261d685aab08d | /tests/data/test_data_provider.py | 9d3ec48a963a8a9ea6c4e892f86a24b9d0f81f46 | [
"BSD-3-Clause"
] | permissive | diningphil/PyDGN | 688ca9faec3f17dc7c1fb65f548a202ccaa417ae | 8a0a1873a42eea13b582d59750afb3d0e0f4798c | refs/heads/main | 2023-08-07T09:07:42.936696 | 2023-07-30T14:30:20 | 2023-07-30T14:30:20 | 249,058,070 | 202 | 17 | BSD-3-Clause | 2023-09-09T07:05:57 | 2020-03-21T20:47:13 | Python | UTF-8 | Python | false | false | 20,835 | py | test_data_provider.py | from copy import deepcopy
from shutil import rmtree
from unittest.mock import patch
import pytest
import torch
from torch_geometric.loader import DataLoader
from torch_geometric.utils import sort_edge_index
from pydgn.data.dataset import DatasetInterface, ToyIterableDataset
from pydgn.data.provider import (... |
15ec27cce823c10b7425ee432efcd8b36a8cab77 | 22c47b4602212c54b022fd74e2f6c2c879d9699d | /chemml/chem/magpie_python/attributes/generators/composition/ElementPairPropertyAttributeGenerator.py | d15ac36bbf018985e11957720bd86ce67d61e7e1 | [
"BSD-3-Clause"
] | permissive | hachmannlab/chemml | 3b3c295c5de8b5f9e8127b7e11aae62d6c3507ef | d511d91500f757de46162d2f8331e353a68de6a0 | refs/heads/master | 2023-06-08T22:21:07.063302 | 2023-05-25T22:49:41 | 2023-05-25T22:49:41 | 113,404,097 | 140 | 34 | BSD-3-Clause | 2023-05-25T22:49:42 | 2017-12-07T04:48:18 | Python | UTF-8 | Python | false | false | 6,923 | py | ElementPairPropertyAttributeGenerator.py | import types
import numpy as np
import pandas as pd
from ....data.materials.CompositionEntry import CompositionEntry
from ....data.materials.util.LookUpData import LookUpData
class ElementPairPropertyAttributeGenerator:
"""Class to generate attributes based on the properties of constituent
binary systems.
... |
21d3e30bfc3f33747f2e30fe7ed5b5df3424271e | 8e32fb0852ec8889c8299e618822b42538d38f47 | /mmdet/models/__init__.py | bc269ab81e6ce6338c223a5600681f7d9218e87f | [
"Apache-2.0"
] | permissive | youtubevos/MaskTrackRCNN | 0967a3f207e15d460f512a3d78b85e6dc9d0b92c | 82dd49db3d5243374c3fea2f2966e11ccb96eb20 | refs/heads/master | 2023-03-16T17:38:26.853463 | 2022-03-23T23:56:05 | 2022-03-23T23:56:05 | 189,818,783 | 451 | 99 | Apache-2.0 | 2019-06-06T17:15:42 | 2019-06-02T07:48:31 | Python | UTF-8 | Python | false | false | 710 | py | __init__.py | from .backbones import * # noqa: F401,F403
from .necks import * # noqa: F401,F403
from .roi_extractors import * # noqa: F401,F403
from .anchor_heads import * # noqa: F401,F403
from .bbox_heads import * # noqa: F401,F403
from .mask_heads import * # noqa: F401,F403
from .track_heads import *
from .detectors import ... |
11b0e33812571d30e3bff1f9af01d1a3fa4380bf | 2dfbca22d0bacf7ba2bb4d270b2d3292f5f8a43b | /amulet/level/formats/anvil_world/data_pack/data_pack_manager.py | 789579eecc6a98fbabfc15fd036634ce6ab9c031 | [] | no_license | Amulet-Team/Amulet-Core | 9715d888e2faf6c41f9414fd105aaa926aa501c2 | dafef97fe4fd1f2f713ef1e3503d6b13b20c1c1f | refs/heads/main | 2023-08-18T17:45:48.775423 | 2023-08-16T09:37:55 | 2023-08-16T09:37:55 | 130,729,079 | 117 | 26 | null | 2023-08-16T09:37:57 | 2018-04-23T17:00:04 | Python | UTF-8 | Python | false | false | 2,250 | py | data_pack_manager.py | from typing import Iterable, BinaryIO
from .data_pack import DataPack
class DataPackManager:
"""
The DataPackManager class contains one or more data packs.
It manages loading them so that the stacking order is maintained.
"""
def __init__(self, data_packs: Iterable[DataPack]):
"""
... |
a0b19bab5c6d1c529ea8d2f7670b8a5a9c12803b | 2ac03b8c24df220ea32ea525e1d65aeb294cd1a4 | /custom_components/waste_collection_schedule/waste_collection_schedule/source/ambervalley_gov_uk.py | 92699ca990578f5e95523ceb50c1a293a0d024d0 | [
"MIT"
] | permissive | mampfes/hacs_waste_collection_schedule | a7b98319a7483dedc8cf78b724f93932934c1702 | 1dc9476efef9963a141b9ac987e2708224b9eaaf | refs/heads/master | 2023-08-16T21:14:46.088962 | 2023-08-16T10:05:24 | 2023-08-16T10:05:24 | 254,347,436 | 495 | 428 | MIT | 2023-09-12T18:59:07 | 2020-04-09T11:02:16 | Python | UTF-8 | Python | false | false | 1,737 | py | ambervalley_gov_uk.py | import json
import requests
from datetime import datetime
from waste_collection_schedule import Collection # type: ignore[attr-defined]
TITLE = "Amber Valley Borough Council"
DESCRIPTION = "Source for ambervalley.gov.uk services for Amber Valley Borough Council, UK."
URL = "https://ambervalley.gov.uk"
TEST_CASES = {... |
cdb789717cb037f16a79457dfd2869eb939c6865 | f8b1bb830377785ac65be495795dd711cfc0fb17 | /bactopia/parsers/ariba.py | bc467f8c282bb051ab8bd21d641ca378eb40546b | [
"MIT"
] | permissive | bactopia/bactopia | 97d0bed69cc4938e35f87908dae1035bc1d8a081 | cee87a2ccecf2305850a915bbe8944942c477ce9 | refs/heads/master | 2023-08-17T08:16:07.862308 | 2022-11-28T21:30:51 | 2022-11-28T21:30:51 | 172,074,074 | 286 | 53 | MIT | 2023-09-11T04:37:35 | 2019-02-22T13:49:38 | Nextflow | UTF-8 | Python | false | false | 2,718 | py | ariba.py | """
Parsers for Ariba related results.
"""
from .generic import get_file_type, parse_json, parse_table
RESULT_TYPE = 'ariba'
ACCEPTED_FILES = ["report.tsv", "summary.csv"]
def parse(report_file: str, summary_file: str) -> dict:
"""
Check input file is an accepted file, then select the appropriate parsing meth... |
853e14f0c090001c707f38e0880a5d17353fec95 | b095173b2dbc77c8ad61c42403258c76169b7a63 | /src/sagemaker/feature_store/feature_processor/lineage/_feature_group_lineage_entity_handler.py | 920e3d2c214d33b9c6a9646329e30bd861641638 | [
"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 | 7,337 | py | _feature_group_lineage_entity_handler.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... |
50cc62f59e2048bc810cb3edb0ba271f86a54117 | 8ce453de612c9024207d00d328df183c443c4e2d | /NodeGraphQt/qgraphics/node_base.py | e85474eeec73c64c40af651d94d9c43231080233 | [
"MIT"
] | permissive | jchanvfx/NodeGraphQt | 71f946d7547f6b79c57ee2565d171a30c130a74e | 4823b43642cce520ee88c5e89a0e1702c26ee9f0 | refs/heads/main | 2023-08-29T00:31:18.599300 | 2023-08-22T03:47:44 | 2023-08-22T03:47:44 | 101,639,727 | 1,015 | 255 | MIT | 2023-09-14T04:44:45 | 2017-08-28T12:13:27 | Python | UTF-8 | Python | false | false | 36,302 | py | node_base.py | #!/usr/bin/python
from collections import OrderedDict
from Qt import QtGui, QtCore, QtWidgets
from NodeGraphQt.constants import (
ITEM_CACHE_MODE,
ICON_NODE_BASE,
LayoutDirectionEnum,
NodeEnum,
PortEnum,
PortTypeEnum,
Z_VAL_NODE
)
from NodeGraphQt.errors import NodeWidgetError
from NodeGra... |
0bfb867a16078ce7683bd45fdeda11b599f3f402 | 620d3872dd3320a6c27f0d3eb072b603b99d9167 | /offline_test.py | 42688a6f09fab97b14da0c0aed018c9ac5f0a4f8 | [
"MIT"
] | permissive | ahmetgunduz/Real-time-GesRec | d7c90d731f386c0be96a4216ca806ae1982a0c15 | 7f201bf3d3e361f15934d2526f5473f7a11d498d | refs/heads/master | 2023-01-14T00:34:33.898871 | 2022-12-29T05:50:36 | 2022-12-29T05:50:36 | 164,872,108 | 575 | 172 | MIT | 2020-10-09T13:40:51 | 2019-01-09T13:53:10 | Python | UTF-8 | Python | false | false | 7,288 | py | offline_test.py | import argparse
import time
import os
import sys
import json
import shutil
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
import itertools
import torch
from torch.autograd import Variable
from sklearn.metrics import confusion_matrix
from torch.nn import functional as F
from opts import parse_... |
6ae52d2eeccb2a419825e36084b886aa95bbd98c | 46c0e11d52c6ebcd384a5759ce0868b0350d1c94 | /algorithms/c01_linear/linkedlist/lru_cache.py | a1ce6af212b41f204a79b8b32b864e1c77901455 | [
"Apache-2.0"
] | permissive | yidao620c/core-algorithm | 7835580109fe3b33d7984762cff043abea7eb3dc | 322cb388295e7085a3772b2dcd7b83c34165c98e | refs/heads/master | 2023-08-31T01:25:22.303598 | 2023-08-06T10:09:05 | 2023-08-06T10:09:05 | 13,033,144 | 869 | 346 | null | 2018-09-21T15:34:23 | 2013-09-23T10:42:19 | Python | UTF-8 | Python | false | false | 1,569 | py | lru_cache.py | # -*- encoding: utf-8 -*-
"""
Question:怎样用单链表实现LRU缓存淘汰算法?
我们维护一个单链表,越靠近链表尾部的结点是越早之前访问的。当有一个新的数据被访问时,
我们从链表头开始顺序遍历链表。
1. 如果此数据之前已经被缓存在链表中了,我们遍历得到这个数据对应的结点,并将其从原来的位置删除,
然后再插入到链表的头部。
2. 如果此数据没有在缓存链表中,又可以分为两种情况:
2.1 如果此时缓存未满,则将此结点直接插入到链表的头部;
2.2 如果此时缓存已满,则链表尾结点删除,将新的数据结点插入链表的头部。
"""
from algorithms.c01_linear import ... |
74e3b0db20533ed59a9b55ec59cb440ed83e6511 | 67597ae56a01fb8c2d7da2ee54c8237a9a19b3eb | /batchgenerators/augmentations/color_augmentations.py | 05f483be1f52d5e31f12c22346bbcc87913c2eff | [
"Apache-2.0"
] | permissive | MIC-DKFZ/batchgenerators | a5149ea4e69755218528956b95b0da32f647af9a | 7fb802b28b045b21346b197735d64f12fbb070aa | refs/heads/master | 2023-09-01T20:07:40.634814 | 2023-05-12T14:01:30 | 2023-05-12T14:01:30 | 108,544,874 | 1,059 | 237 | Apache-2.0 | 2023-09-14T13:44:22 | 2017-10-27T12:43:51 | Jupyter Notebook | UTF-8 | Python | false | false | 6,891 | py | color_augmentations.py | # Copyright 2021 Division of Medical Image Computing, German Cancer Research Center (DKFZ)
# and Applied Computer Vision Lab, Helmholtz Imaging Platform
#
# 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 L... |
7983d1cd18d9f7ab60ec242671eb52f72f4017d2 | 118c6f9425195db812d1898e03f08b279dd941df | /deprecated/MathsExpression/dynamic_maths_expression_node.py | 15afbd034860cfe7076c8e8fdec4f71fa5eaa3e7 | [] | no_license | baldingwizard/Blender-Addons | 48c685a1e5b2cc5dacc3bcb670e912c6f0387e00 | 1ab84dd04f9e90daeb07b2231c10af08bc26fe44 | refs/heads/master | 2022-09-08T19:18:54.909712 | 2022-05-19T22:42:30 | 2022-05-19T22:42:30 | 135,268,164 | 117 | 19 | null | 2022-07-31T17:17:14 | 2018-05-29T08:51:05 | Python | UTF-8 | Python | false | false | 10,352 | py | dynamic_maths_expression_node.py | # Author: Rich Sedman
# Description: Dynamic Maths Expresion node
# Version: (0.45)
# Date: May 2018
################################################### History ######################################################
# 0.4 01/06/2018 : Remove old redundant code
# 0.41 02/06/2018 : Fix pruning of group inputs that are n... |
98f7088a8057da068408903f4e04806cbf901f07 | bf82263f675f42d734fae3b5b837de4d44dba710 | /sdk/kamonohashi/op/rest/models/preprocessing_api_models_create_input_model.py | 30eb28b95f369c82a8053e4d62ab96b34b6bf550 | [
"Apache-2.0"
] | permissive | KAMONOHASHI/kamonohashi | 15b9d37cb73a6b8636b54334d5b926f5c4289d38 | 49ab21bfa9bc70ed211461f11498722473ef3fe7 | refs/heads/master | 2023-08-20T02:25:01.306904 | 2023-07-03T07:20:15 | 2023-07-03T07:20:15 | 188,967,625 | 106 | 39 | Apache-2.0 | 2023-08-29T04:35:20 | 2019-05-28T06:27:59 | C# | UTF-8 | Python | false | false | 8,929 | py | preprocessing_api_models_create_input_model.py | # coding: utf-8
"""
KAMONOHASHI API
A platform for deep learning # noqa: E501
OpenAPI spec version: v2
Contact: kamonohashi-support@jp.nssol.nipponsteel.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
class Preprocess... |
4ff6faaa84d49cb9edb90a6ab86babe49c8159dc | ef1f316534f2df302286eb168951255afe137a55 | /pynetdicom/apps/echoscu/echoscu.py | 2a8175b2323b922f732e7befcc7e9ffd9d61c027 | [
"MIT"
] | permissive | pydicom/pynetdicom | 5362b4f3d03bc47e570cf3d82684925cb3d4162d | 2aa9ed7e3f7f03a0c9af48fe8b0049c82e74ee48 | refs/heads/master | 2023-08-16T23:09:24.539133 | 2023-07-21T17:38:22 | 2023-07-21T17:38:22 | 69,436,608 | 342 | 122 | MIT | 2023-07-20T19:04:04 | 2016-09-28T07:18:02 | Python | UTF-8 | Python | false | false | 6,483 | py | echoscu.py | #!/usr/bin/env python
"""An Echo SCU application.
Used for verifying basic DICOM connectivity and as such has a focus on
providing useful debugging and logging information.
"""
import argparse
import sys
from pydicom.uid import (
ExplicitVRLittleEndian,
ImplicitVRLittleEndian,
ExplicitVRBigEndian,
De... |
81591939f81bbaddddbeae6f6f27ba33ecc1843c | 5ef6c8d47864f471e26b9902d61f8c687e941f05 | /src/genie/libs/parser/iosxr/tests/ShowL2vpnBridgeDomainDetail/cli/equal/golden1_expected.py | 8697bb745d3bbe275b5067458405e230855a34c4 | [
"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 | 8,708 | py | golden1_expected.py | expected_output = {
'bridge_group': {
'g1': {
'bridge_domain': {
'bd1': {
'state': 'up',
'id': 0,
'shg_id': 0,
'mst_i': 0,
'mac_learning': 'enab... |
10bfe3e3b48c2b7627d56658f1d93052bc2abec8 | e3b2af12e7ca91895e42401b2be32f9b731f226a | /openff/toolkit/_tests/test_parameter_plugins.py | 401b72a04296438db4d97e546be11d11d4ae8c5d | [
"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 | 2,195 | py | test_parameter_plugins.py | """
Test classes and function in module openff.toolkit.typing.engines.smirnoff.plugins
"""
import pytest
from openff.toolkit.typing.engines.smirnoff import ForceField
from openff.toolkit.typing.engines.smirnoff.plugins import (
_load_handler_plugins,
load_handler_plugins,
)
def test_force_field_custom_handle... |
db49e6b2e83ad9a0030e2a81c194e88734b65a10 | 78c8fdab5c566067cc2dd3b0c0f874abd1452932 | /python/src/Structural/Flyweight/TeaOrder.py | e8ae01bc1433cc2dfb3ebf570dd94c8e8c3d4feb | [] | no_license | markmontymark/patterns | acca4aa6918f3d7986c9401a28860cade3cc14e7 | 03e3ae83b7ee9bbfd528fe74c5100a75113df95a | refs/heads/master | 2022-06-19T20:58:38.639252 | 2022-06-03T17:51:12 | 2022-06-03T17:51:12 | 10,532,052 | 113 | 18 | null | 2015-10-01T16:42:55 | 2013-06-06T17:18:41 | Shell | UTF-8 | Python | false | false | 133 | py | TeaOrder.py | class TeaOrder:
def serveTea(self,teaOrderContext) :
raise Exception("Unimplemented method TeaOrder.serveTea( teaOrderContext )")
|
69bd8737880bcb9774d9ccdf3b1bb133e2a13f8d | 925131e2f4d4dc302f8a620451b63ff793baf77c | /tests/demo/urls.py | ad76f244a0e5af08e547baa78f4e21fd2548e133 | [
"LicenseRef-scancode-warranty-disclaimer",
"MIT"
] | permissive | saxix/django-adminactions | 1f10d709e29afc87cd0ebfe861a86efdbdddd4f6 | e5544288f49c0d168763498e52366aaed228d771 | refs/heads/develop | 2023-09-03T13:54:50.031169 | 2023-08-23T19:10:00 | 2023-08-23T19:10:00 | 5,646,851 | 558 | 95 | NOASSERTION | 2023-08-23T19:10:06 | 2012-09-02T08:27:42 | Python | UTF-8 | Python | false | false | 346 | py | urls.py | from django.contrib import admin
from django.urls import include, re_path
from adminactions import actions
admin.autodiscover()
actions.add_to_site(admin.site)
admin.site.enable_nav_sidebar = False
urlpatterns = (
re_path(r"admin/", admin.site.urls),
re_path(r"as/", include("adminactions.urls")),
re_path... |
95c8112eef8bba31d48c74e108b84529d5869ef6 | 0c6c4cae01de66819903fde46e184a81f284b94f | /opennmt/layers/position.py | 09a61967040eb019a025ee0c2075973fbacd9104 | [
"MIT"
] | permissive | OpenNMT/OpenNMT-tf | dd47a57bbc48cc287819c3c98c3200b62e663209 | 6f3b952ebb973dec31250a806bf0f56ff730d0b5 | refs/heads/master | 2023-08-18T07:09:43.073083 | 2023-08-04T07:47:43 | 2023-08-04T07:47:43 | 109,252,675 | 1,487 | 465 | MIT | 2023-08-04T07:45:34 | 2017-11-02T10:53:22 | Python | UTF-8 | Python | false | false | 4,160 | py | position.py | """Define position encoder classes."""
import abc
import math
import tensorflow as tf
from opennmt.layers.reducer import SumReducer
class PositionEncoder(tf.keras.layers.Layer):
"""Base class for position encoders."""
def __init__(self, reducer=None, **kwargs):
"""Initializes the position encoder.... |
3466f75b3b4f2df21bc2b6faa77e29a961a6428c | c89436cc9f87c4fcd543ad63fd3b840fa5bb59ea | /tests/core/test_import.py | 5747011bc004fd236f03fc2be0836b0567dad341 | [
"MIT"
] | permissive | ethereum/eth-account | 144054ba0eef1705e91c7c5c7edff514f6cd0ccc | 884d01eb960825ffe9663df9d9256b0e8475adc8 | refs/heads/master | 2023-08-30T00:53:46.774175 | 2023-08-28T19:56:59 | 2023-08-28T22:35:33 | 118,818,588 | 221 | 165 | MIT | 2023-09-08T21:38:57 | 2018-01-24T20:32:30 | Python | UTF-8 | Python | false | false | 56 | py | test_import.py | def test_import():
import eth_account # noqa: F401
|
f06bcf0d8eaf3d1ff93340d983fd3debf30bd448 | ec8d9e1595ccc252a57d1769382bb98d604e40a9 | /pyrolite/mineral/transform.py | a0767bf02e3a789da9bc978e756bc3e4e3f56ed8 | [
"BSD-3-Clause",
"MIT"
] | permissive | morganjwilliams/pyrolite | 2a8e738e14099f72282a80acb7139d71eec71efc | ac7cd52029909738a41143b89be880e0da419266 | refs/heads/main | 2023-08-31T09:20:33.282184 | 2023-07-21T06:45:24 | 2023-07-21T06:45:24 | 137,172,322 | 113 | 37 | NOASSERTION | 2023-08-29T10:49:17 | 2018-06-13T06:31:12 | Python | UTF-8 | Python | false | false | 4,145 | py | transform.py | import numpy as np
import pandas as pd
import periodictable as pt
from ..util.log import Handle
from ..util.pd import to_frame
logger = Handle(__name__)
def formula_to_elemental(formula, weight=True):
"""Convert a periodictable.formulas.Formula to elemental composition."""
formula = pt.formula(formula)
... |
c34649f6ae61f5119ca159028656649b16f57763 | 73c4fd604e9a97c0e8e3c8c064f566a93e49c275 | /rest_framework-stubs/serializers.pyi | 4676e63ccef7c15ad7fd27021dfa19f701b33828 | [
"MIT"
] | permissive | typeddjango/djangorestframework-stubs | 90c21914ce67bdf31e854c7a3dde48fa812db1a3 | e24da496216845cd6d5f4eb554b17ceb90e9a4b0 | refs/heads/master | 2023-08-17T05:45:04.654357 | 2023-08-14T03:11:31 | 2023-08-14T03:11:31 | 157,137,780 | 333 | 97 | MIT | 2023-09-12T21:38:31 | 2018-11-12T01:07:16 | Python | UTF-8 | Python | false | false | 12,002 | pyi | serializers.pyi | from collections.abc import Callable, Iterable, Iterator, Mapping, MutableMapping, Sequence
from typing import Any, Generic, Literal, NoReturn, TypeVar
from django.db import models
from django.db.models import Manager, Model, QuerySet
from django.utils.functional import cached_property
from django_stubs_ext import Str... |
8281a024929eeab0b86589fc9e13631800129d43 | e90bf4b372da78ceec15282d060b48d18ba8d4e9 | /supervisor/resolution/fixups/system_execute_rebuild.py | c4ad91d39e772b36bef5b6dcca9045d9994f873f | [
"Apache-2.0"
] | permissive | home-assistant/supervisor | 67f2e1755ff5fbf7cf2084351e1c32c6995274e0 | 4838b280adafed0997f32e021274b531178386cd | refs/heads/main | 2023-08-31T22:51:25.949277 | 2023-08-31T08:01:42 | 2023-08-31T08:01:42 | 84,926,758 | 928 | 477 | Apache-2.0 | 2023-09-14T17:11:27 | 2017-03-14T08:54:15 | Python | UTF-8 | Python | false | false | 1,642 | py | system_execute_rebuild.py | """Helper to fix an issue with the system by rebuilding containers."""
import asyncio
from ...coresys import CoreSys
from ..const import ContextType, IssueType, SuggestionType
from ..data import Issue
from .base import FixupBase
def setup(coresys: CoreSys) -> FixupBase:
"""Check setup function."""
return Fi... |
ff87927de383ff561caaeac2e3ea5a4973a707bc | ffdc77394c5b5532b243cf3c33bd584cbdc65cb7 | /tests/st/ops/gpu/test_hsigmoid_op.py | 0b9a02462a566fbf6d8b5a6f070441a3147c696c | [
"Apache-2.0",
"LicenseRef-scancode-proprietary-license",
"MPL-1.0",
"OpenSSL",
"LGPL-3.0-only",
"LicenseRef-scancode-warranty-disclaimer",
"BSD-3-Clause-Open-MPI",
"MIT",
"MPL-2.0-no-copyleft-exception",
"NTP",
"BSD-3-Clause",
"GPL-1.0-or-later",
"0BSD",
"MPL-2.0",
"LicenseRef-scancode-f... | permissive | mindspore-ai/mindspore | ca7d5bb51a3451c2705ff2e583a740589d80393b | 54acb15d435533c815ee1bd9f6dc0b56b4d4cf83 | refs/heads/master | 2023-07-29T09:17:11.051569 | 2023-07-17T13:14:15 | 2023-07-17T13:14:15 | 239,714,835 | 4,178 | 768 | Apache-2.0 | 2023-07-26T22:31:11 | 2020-02-11T08:43:48 | C++ | UTF-8 | Python | false | false | 3,736 | py | test_hsigmoid_op.py | # Copyright 2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... |
6bf38889d783cc3b2e7d0367bffa8f6000b66478 | eb9f655206c43c12b497c667ba56a0d358b6bc3a | /python/testData/refactoring/move/relativeImportSourceWithSpacesInsideMovedModule/after/src/a.py | 6fdb98275f1e5e0070aab8673dff53441fbcd4b0 | [
"Apache-2.0"
] | permissive | JetBrains/intellij-community | 2ed226e200ecc17c037dcddd4a006de56cd43941 | 05dbd4575d01a213f3f4d69aa4968473f2536142 | refs/heads/master | 2023-09-03T17:06:37.560889 | 2023-09-03T11:51:00 | 2023-09-03T12:12:27 | 2,489,216 | 16,288 | 6,635 | Apache-2.0 | 2023-09-12T07:41:58 | 2011-09-30T13:33:05 | null | UTF-8 | Python | false | false | 45 | py | a.py | from pkg.subpkg2.subsubpkg import b
print(b) |
0f5b6070877d5bf17bbb1005fbb8144ba80a1d5e | fa1ad2e2ac7e376fc7cb3b3a6e1bb88eed3e80be | /dts/airbyte/airbyte-integrations/connectors/destination-typesense/destination_typesense/destination.py | ee3674debbe3022f1a23ffa2480546ce79f3ed84 | [
"MIT",
"Apache-2.0",
"BSD-3-Clause",
"Elastic-2.0"
] | 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 | 2,620 | py | destination.py | #
# Copyright (c) 2023 Airbyte, Inc., all rights reserved.
#
from logging import Logger
from typing import Any, Iterable, Mapping
from airbyte_cdk.destinations import Destination
from airbyte_cdk.models import AirbyteConnectionStatus, AirbyteMessage, ConfiguredAirbyteCatalog, DestinationSyncMode, Status, Type
from d... |
3b99b2931c89a22231cf148916f50464d417e1c4 | eb9f655206c43c12b497c667ba56a0d358b6bc3a | /python/testData/performance/overloads/mainQualified.py | b5b87c22153fa247b090fe3fdcb5d475e9db2258 | [
"Apache-2.0"
] | permissive | JetBrains/intellij-community | 2ed226e200ecc17c037dcddd4a006de56cd43941 | 05dbd4575d01a213f3f4d69aa4968473f2536142 | refs/heads/master | 2023-09-03T17:06:37.560889 | 2023-09-03T11:51:00 | 2023-09-03T12:12:27 | 2,489,216 | 16,288 | 6,635 | Apache-2.0 | 2023-09-12T07:41:58 | 2011-09-30T13:33:05 | null | UTF-8 | Python | false | false | 59 | py | mainQualified.py | import overloads
expr = overloads.fu<caret>nc(999, 'foo')
|
11a810f1e5e9ffd4a14ba024cc6be282e2057ac0 | aaabf5c6cea75fb6649fafff57d4e92e9b7142b8 | /smote_variants/oversampling/_lvq_smote.py | 38a1884e320336d1c3e3637846aaa88202d3d05d | [
"MIT"
] | permissive | analyticalmindsltd/smote_variants | febcdad7c64c5d6bce5a69a51d7228ea629aa7c4 | 708568e5b44abdc798d9329f993ac6561ad1439d | refs/heads/master | 2023-05-12T21:24:57.222534 | 2023-04-17T10:43:06 | 2023-04-17T10:43:06 | 151,773,885 | 434 | 106 | MIT | 2023-05-04T14:18:28 | 2018-10-05T20:21:54 | Jupyter Notebook | UTF-8 | Python | false | false | 8,617 | py | _lvq_smote.py | """
This module implements the LVQ_SMOTE method.
"""
import warnings
import numpy as np
from sklearn.cluster import KMeans
from ..config import suppress_external_warnings
from ..base import NearestNeighborsWithMetricTensor
from ..base import OverSampling
from .._logger import logger
_logger = logger
... |
421afe22317a5f968e5d9ae0d1ca6e2c9cdef2ad | 3e63608e1cad90bc845c4580723e57ae7ca3f61d | /tests/unit/cartography/intel/okta/test_admin_roles.py | 91ada189c2a2fbc687f889fd2c50d9011490a6d8 | [
"Apache-2.0",
"LicenseRef-scancode-generic-cla"
] | permissive | lyft/cartography | 06dcbf13907cbb9a31b75cd8b21f5721f7cc1b01 | 830b8944879a01f52b21ee12b6fddf245f9733cb | refs/heads/master | 2023-08-31T12:27:59.752452 | 2023-08-28T20:42:12 | 2023-08-28T20:42:12 | 172,811,550 | 2,778 | 334 | Apache-2.0 | 2023-09-13T04:59:46 | 2019-02-27T00:16:29 | Python | UTF-8 | Python | false | false | 1,099 | py | test_admin_roles.py | from cartography.intel.okta.roles import transform_group_roles_data
from cartography.intel.okta.roles import transform_user_roles_data
from tests.data.okta.adminroles import LIST_ASSIGNED_GROUP_ROLE_RESPONSE
from tests.data.okta.adminroles import LIST_ASSIGNED_USER_ROLE_RESPONSE
def test_transform_user_roles():
o... |
772afcfaff2e7c380a1b19e5b894355ed84a86fe | 85373d45a83e4096affafa4f4e5b400787413e57 | /test/programytest/services/rest/goodreads/test_service.py | 805c0c09a3c24f0481295a3ecd3097aa55bdbfec | [
"MIT"
] | permissive | keiffster/program-y | a02bb9d8278835547cc875f4f9cd668d5b1f44da | fc7b0a3afa4fa6ed683e0c817a9aa89f9543bb20 | refs/heads/master | 2023-08-23T13:55:39.255535 | 2022-12-13T09:51:57 | 2022-12-13T09:51:57 | 74,462,571 | 379 | 173 | NOASSERTION | 2023-05-23T00:51:21 | 2016-11-22T10:43:41 | Python | UTF-8 | Python | false | false | 4,583 | py | test_service.py | import unittest
from unittest.mock import patch
from unittest.mock import Mock
import os
from programy.services.rest.goodreads.service import GoodReadsService
from programy.services.config import ServiceConfiguration
from programy.services.config import ServiceRESTConfiguration
from programytest.services.testclient imp... |
3b8d951faa3179c4a2288188dca32a76f873d053 | 0bcd128368e2de959ca648960ffd7944067fcf27 | /gn/push_to_android.py | 694439bf5a88924e98af3ff32cd8781c998b589d | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | google/skia | ac6e39179cd33cf0c8a46d29c1a70bf78b4d74ee | bf6b239838d3eb56562fffd0856f4047867ae771 | refs/heads/main | 2023-08-31T21:03:04.620734 | 2023-08-31T18:24:15 | 2023-08-31T20:20:26 | 15,773,229 | 8,064 | 1,487 | BSD-3-Clause | 2023-09-11T13:42:07 | 2014-01-09T17:09:57 | C++ | UTF-8 | Python | false | false | 631 | py | push_to_android.py | #!/usr/bin/env python
#
# Copyright 2016 Google Inc.
#
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
import subprocess
import sys
host, serial, stamp = sys.argv[1:]
device = '/data/local/tmp/' + os.path.basename(host)
restrict = [] if serial == 'auto'... |
f6ac2a5ded76973664affb22f68bc1e59ab3f68b | e2e34d01afc5b6bc6923a721ef92e8ffa8884f86 | /tests/endtoend/dependency_isolation_functions/.python_packages_azf_newer_version/lib/site-packages/azure/functions/_utils.py | ebfe82ab935278c5892f35527699bc0ef60f7fb0 | [
"LicenseRef-scancode-generic-cla",
"MIT"
] | permissive | Azure/azure-functions-python-worker | 094340eeb0c4728e3202749027f01ab75e908bd8 | d4bdf7edc544b6c15e541930f890da790b180ebd | refs/heads/dev | 2023-08-22T22:48:01.645722 | 2023-08-14T14:52:42 | 2023-08-14T14:52:42 | 117,730,503 | 329 | 122 | MIT | 2023-09-01T16:54:58 | 2018-01-16T19:23:54 | Python | UTF-8 | Python | false | false | 3,167 | py | _utils.py | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
from typing import List, Tuple, Optional
from datetime import datetime, timedelta
def try_parse_datetime_with_formats(
datetime_str: str,
datetime_formats: List[str]
) -> Tuple[Optional[datetime], Optional[str], Opt... |
f8f0fa4678c4c2354830a1de7d655b3eb2e8efd7 | bbd69601912a3361d788efd03a47f9d4e3bac09e | /unittests/test_lib_pubsub_notify4.py | 8d79ba8cfa0c87697c2319eb1b6b13816e882c37 | [] | 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 | 2,586 | py | test_lib_pubsub_notify4.py | """
:copyright: Copyright 2006-2009 by Oliver Schoenborn, all rights reserved.
:license: BSD, see LICENSE.txt for details.
"""
import unittest
from unittests import wtc
import six
from difflib import ndiff, unified_diff, context_diff
#---------------------------------------------------------------------------
... |
4cbd032ce541b2eae9768f3f5f01f1f16a352458 | 529e713a78e82de2ae5d44cfb8ef209e0894d72a | /queue/src/multiprocess_queue.py | 19a02a8beef250c1a4991ffb0e299c8b90929f84 | [
"MIT"
] | permissive | realpython/materials | cd2f548276be2c82f134ca03eadb1cd279e0f26e | d2d62756d3854f54a12a767f2bf9470486c0ceef | refs/heads/master | 2023-09-05T22:12:29.806738 | 2023-08-31T20:56:28 | 2023-08-31T20:56:28 | 132,374,697 | 4,678 | 6,482 | MIT | 2023-09-12T22:22:06 | 2018-05-06T20:46:18 | HTML | UTF-8 | Python | false | false | 3,244 | py | multiprocess_queue.py | # multiprocess_queue.py
import argparse
import multiprocessing
import queue
import time
from dataclasses import dataclass
from hashlib import md5
from string import ascii_lowercase
POISON_PILL = None
class Combinations:
def __init__(self, alphabet, length):
self.alphabet = alphabet
self.length =... |
5a821404e41779b4b7b5dcc2c2dadbd5822b7c82 | 8b4d84fcf32c03783dcaca0dd470dc60ed829282 | /misc/flow_control.py | df3e63ea63ae905f4ad447ec3f447ab2031efadf | [
"MIT"
] | permissive | lotspaih/automateBoringstuffPython | 1776c1054e3d3e6babf76f64e9147c32f6295e1a | 51a402e31df01c36ae45dccad662d04b30378fea | refs/heads/master | 2020-04-29T00:36:05.267875 | 2019-03-14T21:18:20 | 2019-03-14T21:18:20 | 60,571,508 | 107 | 51 | CC0-1.0 | 2018-01-10T06:54:00 | 2016-06-07T01:11:38 | Python | UTF-8 | Python | false | false | 146 | py | flow_control.py | # flow control
# Practice question 9
spam = 2
if spam == 1:
print('Hello')
elif spam == 2:
print('Howdy')
else:
print('Greetings!')
|
6c4587e4351b1d579913174eb19043977fafd441 | d813a392c7cbc8dbbec273b3a2366a50f9df45c9 | /bmtk/simulator/bionet/cell.py | 4236e8e081bc02b091b9cfdb604a60833d5c353f | [
"BSD-3-Clause"
] | permissive | AllenInstitute/bmtk | 1496d6e0bd7cbef7b1b8cac64a8589d01548f897 | ae9c24c415a3fbd60397b4ead160b72b4b3e4e4f | refs/heads/develop | 2023-08-24T20:09:32.763686 | 2023-08-20T18:29:19 | 2023-08-20T18:29:19 | 104,507,294 | 253 | 111 | BSD-3-Clause | 2023-08-24T14:38:57 | 2017-09-22T18:42:44 | Python | UTF-8 | Python | false | false | 3,883 | py | cell.py | # Copyright 2017. Allen Institute. 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 the follow... |
588c8fe34b43a5594c53c93438ca952f032f5aee | cfb41f392fac304095a80d08497727c621550c00 | /examples/shallow_sphere/Rossby_wave.py | 7310d001993f51c49719ba6858b1f6d3c3fb2411 | [
"BSD-3-Clause"
] | permissive | clawpack/pyclaw | 5b7121b63609c2cf9af30e012c9318e3b5244f18 | 6323b7295b80f33285b958b1a2144f88f51be4b1 | refs/heads/master | 2023-04-16T23:48:31.519427 | 2023-03-21T06:08:21 | 2023-03-21T06:08:21 | 1,628,711 | 124 | 97 | BSD-3-Clause | 2023-09-12T12:22:30 | 2011-04-18T03:11:21 | Fortran | UTF-8 | Python | false | false | 19,592 | py | Rossby_wave.py | #!/usr/bin/env python
# encoding: utf-8
"""
Shallow water flow on the sphere
================================
2D shallow water equations on a spherical surface. The approximation of the
three-dimensional equations is restricted to the surface of the sphere.
Therefore only the solution on the surface is updated.
Re... |
45b49eb2f6e003f2ea42a4c281b1bcbe4f57e909 | e07f9420fcc029c8c94779455c9f91fa12a80377 | /tests/test_bigtable/test_row_set.py | 893aced23e55c7253f8dad74214c12400a271ee4 | [
"Apache-2.0"
] | permissive | tensorflow/io | 8292baed67f272dc7eeb6b6a38a51e1c1d85361e | e219e295aa6a00b4b749487d56a79c18cc121574 | refs/heads/master | 2023-08-31T20:35:21.850041 | 2023-08-21T22:48:44 | 2023-08-21T22:48:44 | 156,926,195 | 694 | 386 | Apache-2.0 | 2023-09-14T13:00:38 | 2018-11-09T22:44:05 | C++ | UTF-8 | Python | false | false | 4,106 | py | test_row_set.py | # Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... |
e8e8db2001f5fc5fd8abb4216aee10903ccca06e | f8c5b73c9706470c4dd60d523096e18bc448a960 | /certbot-dns-linode/certbot_dns_linode/_internal/tests/__init__.py | b096c54b23cd1b170f2998313c710da910c26ef6 | [
"MIT",
"Apache-2.0"
] | permissive | certbot/certbot | 14ab43d76fcf0242d875d551f0d98334c43e7957 | b1978ff18837e40d16eedf2090330af53d8ceaa5 | refs/heads/master | 2023-09-04T00:37:03.739195 | 2023-08-26T23:19:38 | 2023-08-26T23:19:38 | 26,516,210 | 18,581 | 3,265 | NOASSERTION | 2023-09-12T15:18:59 | 2014-11-12T02:52:20 | Python | UTF-8 | Python | false | false | 31 | py | __init__.py | """certbot-dns-linode tests"""
|
e75e3d7a7c968f117eb346b54dec046679d721d5 | 961c62d9dc6c9699a9c9ce4f320447cf6441d108 | /src/human_aware_rl/ppo/ppo_rllib_from_params_client.py | 4a291fe942c9019ca950fbaa9293cdb4d4c7afc9 | [
"MIT"
] | permissive | HumanCompatibleAI/overcooked_ai | e6defb38c82e37b79d918318ea5ec07d9ab7d266 | 6bde8b27b5a1dcdba571e8f53d98c6fc836eca8c | refs/heads/master | 2023-07-20T17:18:53.025742 | 2023-07-11T23:36:49 | 2023-07-11T23:36:49 | 193,407,023 | 510 | 119 | MIT | 2023-07-11T23:36:51 | 2019-06-23T23:58:41 | Jupyter Notebook | UTF-8 | Python | false | false | 15,308 | py | ppo_rllib_from_params_client.py | # All imports except rllib
import argparse
import logging
import os
import sys
import numpy as np
from overcooked_ai_py.agents.benchmarking import AgentEvaluator
# environment variable that tells us whether this code is running on the server or not
LOCAL_TESTING = os.getenv("RUN_ENV", "production") == "local"
# Sac... |
813c6f7f14781d52ac217fc01c18fbb3c8a2a744 | 5e601244fbf32ee5190fb5210a0cd334473a0abe | /functions/net/tcp/http/key-value-parser.py | 666dea22626c187efeb6a298a3ce2cb32756811b | [] | no_license | DingGuodong/LinuxBashShellScriptForOps | 69ebe45cf3f92b741a078b9b78c2600328ce9b9e | b2ca1e4c870626dd078d447e2d1479b08602bdf6 | refs/heads/master | 2023-08-21T20:53:40.617397 | 2023-07-17T01:41:05 | 2023-07-17T01:41:05 | 57,015,255 | 453 | 343 | null | 2023-02-16T01:29:23 | 2016-04-25T05:55:28 | Python | UTF-8 | Python | false | false | 379 | py | key-value-parser.py | import ConfigParser
import StringIO
import os
# Read configurations
conf = StringIO.StringIO()
conf.write("[configuration]\n")
conf.write(open("key-value-config-example.conf").read())
conf.seek(0, os.SEEK_SET)
cp = ConfigParser.RawConfigParser()
cp.readfp(conf)
name = cp.get("configuration", "name")
myLove = cp.get("... |
ab0a5abb473bb8b90d80f6712e4f73b2442d7cc7 | 9ddf23c7fa4baff329e63b01987ae31009d6ad94 | /ariadne/interfaces.py | b6e18e641cfd1c366341873c209547a7fca477b1 | [
"BSD-3-Clause"
] | permissive | mirumee/ariadne | 0677dfe83946a198500a7a4b95ceca5085cd325f | a9cca4f6d8ce07b33d5fb5c6df991bd031d1168b | refs/heads/master | 2023-09-03T09:59:30.888896 | 2023-06-27T14:21:08 | 2023-06-27T14:21:08 | 140,265,025 | 2,168 | 204 | BSD-3-Clause | 2023-07-21T10:38:52 | 2018-07-09T09:46:17 | Python | UTF-8 | Python | false | false | 6,814 | py | interfaces.py | from typing import Optional, cast
from graphql.type import (
GraphQLInterfaceType,
GraphQLNamedType,
GraphQLSchema,
)
from .objects import ObjectType
from .types import Resolver
from .utils import type_implements_interface
class InterfaceType(ObjectType):
"""Bindable populating interfaces in a Graph... |
fa1a1949d2c5e49999395228e14a14098053cd5a | 7ae9aa9e9d359e2182bbab6ae7e083fc2c7fa815 | /rapidsms/tests/test_paginator.py | fa7fe2d0241c2ca9d396d63461dee9a39791a20b | [
"BSD-3-Clause"
] | permissive | rapidsms/rapidsms | 8ce6d3f46002146e76cf68fdca3288865578b17a | aaa2ddab68e19d979525c3823c3ec0e646e92c83 | refs/heads/develop | 2023-08-15T16:44:27.206841 | 2022-03-16T15:09:36 | 2022-03-16T15:09:36 | 132,857 | 409 | 196 | BSD-3-Clause | 2023-09-11T20:41:56 | 2009-02-19T22:21:40 | Python | UTF-8 | Python | false | false | 1,587 | py | test_paginator.py | from django.core.paginator import Paginator
from django.urls import reverse
from django.test import TestCase
from django.test.client import RequestFactory
from rapidsms.conf import settings
from rapidsms.templatetags.paginator_tags import paginator
class PaginatorTests(TestCase):
def test_paginator(self):
... |
661178776297edd4d77f9d0966753e07e5228e9f | 56a77194fc0cd6087b0c2ca1fb6dc0de64b8a58a | /applications/ConstitutiveModelsApplication/python_scripts/constitutive_laws/linear_elastic_constitutive_law.py | 8d808186ce5fba309c299047e2e3e39bb2368572 | [
"BSD-3-Clause",
"BSD-2-Clause"
] | permissive | KratosMultiphysics/Kratos | 82b902a2266625b25f17239b42da958611a4b9c5 | 366949ec4e3651702edc6ac3061d2988f10dd271 | refs/heads/master | 2023-08-30T20:31:37.818693 | 2023-08-30T18:01:01 | 2023-08-30T18:01:01 | 81,815,495 | 994 | 285 | NOASSERTION | 2023-09-14T13:22:43 | 2017-02-13T10:58:24 | C++ | UTF-8 | Python | false | false | 6,894 | py | linear_elastic_constitutive_law.py | #import kratos core and applications
import KratosMultiphysics
import KratosMultiphysics.ConstitutiveModelsApplication as KratosMaterial
class LinearElasticLaw:
def __init__(self):
#print(" python: elastic law ")
self.constitutive_law = KratosMaterial.Linear3DLaw()
#
def CallLaw(self):
... |
27d4a40e25e59e82675cafd079253110801383bb | 89f8dbda9956efb356af92fb4bc33c1e0f8a15b5 | /classy/typedef_dialog.py | e6a87b03a78a90dc30f9c6f4843c4e1629e9a251 | [] | no_license | RicBent/Classy | d8e3bd8aafbcbd5dab435c8686961cc1bb18394f | 00001342c6f61174713bd3aa946cd1506acc71a9 | refs/heads/master | 2022-05-29T20:22:52.585737 | 2022-02-04T23:30:03 | 2022-02-04T23:30:03 | 199,730,722 | 249 | 30 | null | 2022-08-15T08:35:18 | 2019-07-30T21:34:31 | Python | UTF-8 | Python | false | false | 2,855 | py | typedef_dialog.py | import idaapi
import idc
from PyQt5 import QtWidgets, QtCore
import classy.database as database
import classy.itanium_mangler as itanium_mangler
# Todo: Move some code to database_entries
class TypedefDialog(QtWidgets.QDialog):
def __init__(self):
super(TypedefDialog, self).__init__()
self.setW... |
204fd745ea572e5d1dc15fabdccbdad637e5c5cb | 5a52ccea88f90dd4f1acc2819997fce0dd5ffb7d | /alipay/aop/api/domain/EpInfo.py | 113cce7e43377769298530075ae8194dfeed9118 | [
"Apache-2.0"
] | permissive | alipay/alipay-sdk-python-all | 8bd20882852ffeb70a6e929038bf88ff1d1eff1c | 1fad300587c9e7e099747305ba9077d4cd7afde9 | refs/heads/master | 2023-08-27T21:35:01.778771 | 2023-08-23T07:12:26 | 2023-08-23T07:12:26 | 133,338,689 | 247 | 70 | Apache-2.0 | 2023-04-25T04:54:02 | 2018-05-14T09:40:54 | Python | UTF-8 | Python | false | false | 1,571 | py | EpInfo.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.EpElement import EpElement
class EpInfo(object):
def __init__(self):
self._ep_element_list = None
@property
def ep_element_list(self):
return self._e... |
894ff743717da60483461c95058f38dc76156031 | 2212a32833776a5d5d2164d8efd11bd18bd3f768 | /tf_agents/policies/py_tf_policy.py | 983deec1a6f4f896889653b05ba912d805684d62 | [
"Apache-2.0"
] | permissive | tensorflow/agents | f39805fb98ef9af712dcaff3ba49e1ac6d42804b | eca1093d3a047e538f17f6ab92ab4d8144284f23 | refs/heads/master | 2023-08-14T04:56:30.774797 | 2023-08-02T17:43:44 | 2023-08-02T17:44:09 | 157,936,206 | 2,755 | 848 | Apache-2.0 | 2023-07-26T02:35:32 | 2018-11-17T00:29:12 | Python | UTF-8 | Python | false | false | 8,882 | py | py_tf_policy.py | # coding=utf-8
# Copyright 2020 The TF-Agents 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... |
62abdb8fa95e6922a9610a75d3d777added6b7b6 | 80f94bea418d7956df1ba19d4d6a1d7715a94ade | /lib/galaxy/webapps/galaxy/api/groups.py | 11fd9df9f77e9c7b8abb07e32a8bfda850a95494 | [
"CC-BY-2.5",
"MIT",
"CC-BY-3.0",
"AFL-3.0",
"Apache-2.0"
] | permissive | galaxyproject/galaxy | 5748409eb6693b1611f289d164f85e20c3237495 | b9ae7a16ba0465995e880ae9701b7e87226b9bab | refs/heads/dev | 2023-08-28T22:35:51.248138 | 2023-08-26T08:02:33 | 2023-08-26T08:02:33 | 31,211,061 | 1,277 | 1,137 | NOASSERTION | 2023-09-14T19:39:01 | 2015-02-23T14:18:06 | Python | UTF-8 | Python | false | false | 1,625 | py | groups.py | """
API operations on Group objects.
"""
import logging
from typing import (
Any,
Dict,
)
from galaxy.managers.context import ProvidesAppContext
from galaxy.managers.groups import GroupsManager
from galaxy.schema.fields import EncodedDatabaseIdField
from galaxy.web import (
expose_api,
require_admin,
)... |
e03a9c9f6630599d250d1528a3fb0848d562cc3d | 456c9520c0391acf00e976502d66e560619212bf | /server/src/api/models/shape/shape.py | 489eff633b36ef47bd36166e885e6ef5cda41af3 | [
"MIT"
] | permissive | Kruptein/PlanarAlly | 1c7cb2442bf5e87be91720c005b79a761170a454 | 2605f34747023446d13cc12e65df5f0538b36f8d | refs/heads/dev | 2023-08-31T15:57:25.976911 | 2023-08-19T09:55:11 | 2023-08-19T09:55:11 | 122,332,775 | 378 | 87 | MIT | 2023-09-08T18:50:01 | 2018-02-21T12:20:36 | TypeScript | UTF-8 | Python | false | false | 1,187 | py | shape.py | from pydantic import Field
from ..aura import ApiAura
from ..helpers import TypeIdModel
from ..label import ApiLabel
from ..tracker import ApiTracker
from .owner import ApiShapeOwner
class ApiCoreShape(TypeIdModel):
uuid: str = Field(typeId="GlobalId")
type_: str
x: float
y: float
# todo: make st... |
b305872499ab27ceb70e47d091ffdf387f08d063 | b347bc4b850dee4a8a9a171b563a3f31230ce1c7 | /sktime/dists_kernels/tests/__init__.py | b5260fc823fde7ea26fe48a6cbdfecde650f9468 | [
"BSD-3-Clause"
] | permissive | sktime/sktime | 5963962df338c5931a2f9f1794d1203c50ddc27e | 70b2bfaaa597eb31bc3a1032366dcc0e1f4c8a9f | refs/heads/main | 2023-08-22T18:20:08.022950 | 2023-08-22T15:24:39 | 2023-08-22T15:24:39 | 156,401,841 | 1,117 | 268 | BSD-3-Clause | 2023-09-14T20:44:21 | 2018-11-06T15:08:24 | Python | UTF-8 | Python | false | false | 44 | py | __init__.py | """Tests for sktime.dist_kernels module."""
|
8cda88b08822f51a15a6d9188ad5099be0f09a96 | bb33e6be8316f35decbb2b81badf2b6dcf7df515 | /source/res/scripts/client/gui/wt_event/wt_event_notifications.py | 13dd28eae8e939970794fe36eb044757f18eb1ab | [] | 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 | 5,052 | py | wt_event_notifications.py | # Python bytecode 2.7 (decompiled from Python 2.7)
# Embedded file name: scripts/client/gui/wt_event/wt_event_notifications.py
import logging
from constants import IS_LOOT_BOXES_ENABLED
from gui import SystemMessages
from gui.ClientUpdateManager import g_clientUpdateManager
from gui.impl import backport
from gui.impl.g... |
d3cde8d853c9d8527e6e11138eb9024fb360637a | faf7ed9d56d408a261a69fcc9eb3b5f9c6e38873 | /alerta/tasks.py | a04e323f6baa9a67266d643ff7695002fc096195 | [
"Apache-2.0"
] | permissive | alerta/alerta | 53eaf5e491da46a8faae37824eebd02e92b25dac | 5b572c3aa9b086f02e366e3f8a2173174b0c5a87 | refs/heads/master | 2023-08-19T19:21:55.272638 | 2023-06-30T08:38:25 | 2023-06-30T08:38:25 | 3,877,327 | 1,468 | 282 | Apache-2.0 | 2023-09-04T17:32:20 | 2012-03-30T14:19:34 | Python | UTF-8 | Python | false | false | 1,456 | py | tasks.py | from typing import List, Optional
from flask import g
from alerta.app import create_celery_app
from alerta.exceptions import InvalidAction, RejectException
from alerta.models.alert import Alert
from alerta.utils.api import process_action, process_status
celery = create_celery_app()
@celery.task
def action_alerts(a... |
0b4f84e03c71f6334aa280604cf44066dc5c3d6f | c3ac37bb3397d84b516dc2b0a0e09bcef057458e | /dev/extract-dump | 6c3b64e8f55a26454ebe8f4b5c16a09a9ddf2f2e | [
"BSL-1.0"
] | permissive | jll63/yomm2 | 6c87247e2b1deff7cf361d289757d0c9086e7778 | 140378a808000321d71a19ca476cda0a909a5026 | refs/heads/master | 2023-08-30T10:19:54.450377 | 2023-08-26T15:58:09 | 2023-08-26T16:02:58 | 103,060,181 | 306 | 18 | BSL-1.0 | 2022-12-01T22:44:30 | 2017-09-10T20:39:12 | C++ | UTF-8 | Python | false | false | 794 | extract-dump | #!/usr/bin/env python3
import argparse
import fileinput
from itertools import count
import re
parser = argparse.ArgumentParser()
parser.add_argument("-s", "--simplify", nargs="*", default=[])
parser.add_argument("files", nargs="*", default=("-"))
args = parser.parse_args()
DUMP_RX = r"std::is_same_v<(.*),\s*yorel::y... | |
55d9e2cdea6c45dff950e7bf40604dbee829e1ca | 97b8ac68f203db3942ead6d2247ded15e24d0762 | /examples/server/server_errors.py | 61659ffef4c6905ba88e4a6b608fe294259e27bb | [
"Apache-2.0"
] | permissive | SAP/PyRFC | 494d765e778b25707e66c3d963086e8e3e98aad1 | 2c0432baf2b3c8d7bd86979030661bc806fa94dc | refs/heads/main | 2023-08-25T00:47:20.225633 | 2023-08-01T08:55:08 | 2023-08-01T08:55:08 | 16,623,330 | 461 | 138 | Apache-2.0 | 2023-03-23T16:27:45 | 2014-02-07T18:25:16 | Cython | UTF-8 | Python | false | false | 1,239 | py | server_errors.py | # SPDX-FileCopyrightText: 2013 SAP SE Srdjan Boskovic <srdjan.boskovic@sap.com>
#
# SPDX-License-Identifier: Apache-2.0
import sys
from backends import BACKEND
from pyrfc import ExternalRuntimeError, Server
backend_dest = sys.argv[1]
errorInfo = {
"code": 4,
"key": "Function not supported",
"message": ... |
a5447b27148a82911973acc7b9c32e7cb3422b8f | df1254b56f35b24644e00493c50d4b6eb3c15b7b | /colour/examples/plotting/examples_phenomena_plots.py | 2d33c4eb5f19a4c4ca058606463a45c29ed8fc0a | [
"BSD-3-Clause"
] | permissive | colour-science/colour | 908400b227cf81668675e41099256ce50b23ae4b | 1fdf3b3042922e8d4f86b989b00a06e7e5d81102 | refs/heads/develop | 2023-09-01T23:17:07.186869 | 2023-08-26T09:40:45 | 2023-08-26T09:40:45 | 17,114,363 | 1,756 | 301 | BSD-3-Clause | 2023-09-14T10:24:37 | 2014-02-23T18:55:40 | Python | UTF-8 | Python | false | false | 1,059 | py | examples_phenomena_plots.py | """Showcases optical phenomena plotting examples."""
from colour.phenomena import sd_rayleigh_scattering
from colour.plotting import (
colour_style,
plot_multi_sds,
plot_single_sd_rayleigh_scattering,
plot_the_blue_sky,
)
from colour.utilities import message_box
message_box("Optical Phenomena Plots")
... |
72a89a8b7eb47d96bf304267991cb4d4654e0f69 | 8a5580a3a3305bc7edca07266e6f22790ed5b7c6 | /stable_projects/predict_phenotypes/He2019_KRDNN/unit_tests/CBIG_KRDNN_unit_test_dnn.py | 9cfa14d53f19c9e9160b2ecd87285a289940e887 | [
"MIT"
] | permissive | ThomasYeoLab/CBIG | 7550d22aefbda437f7d263ce34e15bb867b699c0 | c773720ad340dcb1d566b0b8de68b6acdf2ca505 | refs/heads/master | 2023-07-06T08:20:16.900602 | 2023-06-28T07:39:37 | 2023-06-28T07:39:37 | 63,240,796 | 508 | 421 | MIT | 2023-03-09T18:42:08 | 2016-07-13T11:33:56 | MATLAB | UTF-8 | Python | false | false | 12,039 | py | CBIG_KRDNN_unit_test_dnn.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Written by Tong He and CBIG under MIT license:
https://github.com/ThomasYeoLab/CBIG/blob/master/LICENSE.md
"""
import os
import glob
import shutil
import unittest
import subprocess
import numpy as np
from cbig.He2019.config import config
from cbig.He2019.CBIG_prepare... |
7d40168fe63cad179cea4a3ac0ff7d37a462af1f | b594007649dbe4ebfc9a61e2c47e5482daeb0a27 | /twitchTransFN.py | 09be67837c420d664c187a924cc7c35a7a5a3f3c | [
"MIT"
] | permissive | sayonari/twitchTransFreeNext | 2e375fce431443ae9bbc76fb29e693c220443fc3 | 61ccb5e57479dfd4a5c956c413d2178c0a8b732e | refs/heads/master | 2023-03-21T18:30:57.089328 | 2022-11-10T06:33:56 | 2022-11-10T06:33:56 | 159,673,766 | 182 | 104 | MIT | 2023-08-31T21:26:47 | 2018-11-29T13:52:57 | Python | UTF-8 | Python | false | false | 22,214 | py | twitchTransFN.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from async_google_trans_new import AsyncTranslator, constant
from gtts import gTTS
from playsound import playsound
import os
from datetime import datetime
import threading
import queue
import time
import shutil
import re
import asyncio
import deepl
from twitchio.ext imp... |
eaeeabf3ca7b915159225aa47a6eaa29036aff68 | e90bf4b372da78ceec15282d060b48d18ba8d4e9 | /supervisor/hardware/manager.py | 6af0481a749365ced9e804d089c698a93d346fa3 | [
"Apache-2.0"
] | permissive | home-assistant/supervisor | 67f2e1755ff5fbf7cf2084351e1c32c6995274e0 | 4838b280adafed0997f32e021274b531178386cd | refs/heads/main | 2023-08-31T22:51:25.949277 | 2023-08-31T08:01:42 | 2023-08-31T08:01:42 | 84,926,758 | 928 | 477 | Apache-2.0 | 2023-09-14T17:11:27 | 2017-03-14T08:54:15 | Python | UTF-8 | Python | false | false | 3,746 | py | manager.py | """Hardware Manager of Supervisor."""
import logging
from pathlib import Path
import pyudev
from ..coresys import CoreSys, CoreSysAttributes
from ..exceptions import HardwareNotFound
from .const import UdevSubsystem
from .data import Device
from .disk import HwDisk
from .helper import HwHelper
from .monitor import Hw... |
f3779fe9180b1bd61a1a6932c59b5cbd7f6065d8 | f305f84ea6f721c2391300f0a60e21d2ce14f2a5 | /11_动态规划/经典题/dfs+cache/741. 摘樱桃.py | 5b39d468dfa0206b02cb9b82ca4fed9891a1baa5 | [] | no_license | 981377660LMT/algorithm-study | f2ada3e6959338ae1bc21934a84f7314a8ecff82 | 7e79e26bb8f641868561b186e34c1127ed63c9e0 | refs/heads/master | 2023-09-01T18:26:16.525579 | 2023-09-01T12:21:58 | 2023-09-01T12:21:58 | 385,861,235 | 225 | 24 | null | null | null | null | UTF-8 | Python | false | false | 1,970 | py | 741. 摘樱桃.py | from typing import List
from functools import lru_cache
# 0 表示这个格子是空的,所以你可以穿过它。
# 1 表示这个格子里装着一个樱桃,你可以摘到樱桃然后穿过它。
# -1 表示这个格子里有荆棘,挡着你的路。
# 从位置 (0, 0) 出发,最后到达 (N-1, N-1) ,只能`向下或向右走`,并且只能穿越有效的格子(即只可以穿过值为0或者1的格子);
# 当到达 (N-1, N-1) 后,你要继续走,直到返回到 (0, 0) ,只能`向上或向左走`,并且只能穿越有效的格子;
# 当你经过一个格子且这个格子包含一个樱桃时,你将摘到樱桃并且这个格子会变成空... |
a16f50940ffbe7ad40a4de3ca4a36608d6c878a4 | b8441dc1987be9e64fa3081d456b2a3060ec44d1 | /mars/services/task/api/web.py | 21dffd8e0cfd902db59668a2f9be945c87c864ce | [
"BSD-3-Clause",
"MIT",
"ISC",
"Apache-2.0",
"CC0-1.0",
"BSD-2-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | mars-project/mars | f99fefbce999d58a9249bc72046787a9731c9c73 | c36c53fa22e10ef9477d9c454401a2f281375f31 | refs/heads/master | 2023-07-23T00:23:55.133015 | 2023-07-03T11:44:54 | 2023-07-03T11:44:54 | 160,543,708 | 2,704 | 362 | Apache-2.0 | 2023-09-11T07:57:35 | 2018-12-05T16:04:03 | Python | UTF-8 | Python | false | false | 11,938 | py | web.py | # Copyright 1999-2021 Alibaba Group Holding Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... |
643d501f2dc0fc9e6a7f044a11abf90ad40e3bbd | e625107eb2f4aba3dfdc8ab271e777942dda98c4 | /misc/algen/algen.py | 74b104084df686052cc534e4cb8c8d622627cc0d | [
"Apache-2.0"
] | permissive | shaih/HElib | 8f92244b051cf7b63a9d459dbe5909d265d7205b | a7a7bbe844e0eb13ed892582b715d945d7f59043 | refs/heads/master | 2023-03-08T20:15:20.745780 | 2023-01-05T16:23:46 | 2023-01-05T16:23:46 | 180,177,669 | 255 | 88 | Apache-2.0 | 2020-09-01T09:26:25 | 2019-04-08T15:22:21 | C++ | UTF-8 | Python | false | false | 6,010 | py | algen.py | #! /usr/bin/env python3
# Copyright (C) 2020 IBM Corp.
# This program is Licensed under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by appli... |
badd7b8089a95900ace56357eb5e2e3033601f5d | dca770e1b56cf36ef1922a4293298a3e8e155a26 | /builder/frameworks/_embed_files.py | c89dc4338722988448394456849011d0b94d0855 | [
"Apache-2.0"
] | permissive | platformio/platform-espressif32 | 45c60ae0973a62ca7c4bc17f22a95c569528a905 | ceafaa7c176c18875538886b35e7291b2635f64a | refs/heads/develop | 2023-08-31T02:51:07.482741 | 2023-08-30T14:32:34 | 2023-08-30T14:32:34 | 71,603,115 | 787 | 576 | Apache-2.0 | 2023-09-11T13:27:05 | 2016-10-21T23:00:55 | Python | UTF-8 | Python | false | false | 5,847 | py | _embed_files.py | # Copyright 2014-present PlatformIO <contact@platformio.org>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... |
a2d6bd0e2b90d1cb9c35f5321b96d21cf7ccc731 | cadb6dceb7bb67ce47ef48b2c83f480a65d6b01a | /s3prl/utility/print_url_cache_path.py | 505cfe100b3e06ba571728f8825ec59f24420ed4 | [
"Apache-2.0",
"CC-BY-NC-4.0"
] | permissive | s3prl/s3prl | 52ec2ae4df5a61c786c122085603aa9c5e8c2681 | 76a9432b824f6ae3eae09a35a67782c4ed582832 | refs/heads/main | 2023-08-17T02:26:57.524087 | 2023-06-10T17:12:27 | 2023-06-10T17:12:27 | 196,905,457 | 1,549 | 398 | Apache-2.0 | 2023-09-14T13:07:05 | 2019-07-15T01:54:52 | Python | UTF-8 | Python | false | false | 400 | py | print_url_cache_path.py | import argparse
from s3prl.util.download import _urls_to_filepaths
def print_cache_path(url: str, refresh: bool):
print(_urls_to_filepaths(url, refresh=refresh))
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("url")
parser.add_argument("--refresh", action="store_tru... |
27ca127b8e4d28e3b444206350cb7f2fcaf9ee47 | b8bbdfc593b6d816e67a344f720f90ec05236778 | /airflow/providers/amazon/aws/triggers/emr.py | a928255fe04bc659ce5aecb57843d34357181d05 | [
"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 | 19,435 | py | emr.py | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... |
77cd6d07b114f4b1914c4c4646bc95582ce60e86 | 36a094a44450d1353e9dfc8242a54e2bb70bb9b5 | /examples/deployment/local.py | c9aab9e64519ac52bad1345c8cf9a2d42ecd4261 | [
"Apache-2.0"
] | permissive | zyfra/ebonite | 52843ce847a3fd28e4ba8ab64d986dcfb23671c0 | b01b662c43709d152940f488574d78ff25f89ecf | refs/heads/master | 2022-11-29T21:20:02.358797 | 2020-10-19T12:22:49 | 2020-10-19T12:22:49 | 221,721,146 | 275 | 18 | Apache-2.0 | 2022-11-21T22:44:02 | 2019-11-14T14:49:47 | Python | UTF-8 | Python | false | false | 771 | py | local.py | from ebonite import Ebonite, create_model
def model_function(data):
"""Dummy function is our model"""
return data
def main():
ebnt = Ebonite.local(clear=True)
task = ebnt.get_or_create_task('local_deployment', 'local_deployment')
model = create_model(model_function, 0, model_name='dummy_functio... |
ab20276cc357dcd5e59f8408f217f90b9ff05f86 | 157d84f8aafc76ba9ea0dbbf08ede744966b4250 | /tests/integration/cattletest/core/test_resource.py | af70c519677cb589710c467ca32cc37562150426 | [
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | rancher/cattle | 81d165a0339a41950561fe534c7529ec74203c56 | 82d154a53f4089fecfb9f320caad826bb4f6055f | refs/heads/v1.6 | 2023-08-27T20:19:31.989806 | 2020-05-01T18:15:55 | 2020-05-01T20:11:28 | 18,023,059 | 487 | 233 | Apache-2.0 | 2022-01-03T18:07:33 | 2014-03-23T00:19:52 | Java | UTF-8 | Python | false | false | 331 | py | test_resource.py | from common_fixtures import * # NOQA
# test that admin_client can list accounts
# (parent of project which has just been created)
def test_list_account(client):
client.list_account()
def test_schema_includeable_links(client):
schema = client.schema.types['service']
assert 'serviceLogs' in schema.includ... |
beb4e2ba5f960d44c2e048e84d45b01a32837274 | 2d05050d0ada29f7680b4df20c10bb85b0530e45 | /tests/python/contrib/test_ethosu/test_partition.py | 578485c8aa8819f64e08e1282255e2ba42735152 | [
"Apache-2.0",
"BSD-3-Clause",
"MIT",
"LicenseRef-scancode-unknown-license-reference",
"Unlicense",
"Zlib",
"LLVM-exception",
"BSD-2-Clause"
] | permissive | apache/tvm | 87cb617f9a131fa44e1693303aaddf70e7a4c403 | d75083cd97ede706338ab413dbc964009456d01b | refs/heads/main | 2023-09-04T11:24:26.263032 | 2023-09-04T07:26:00 | 2023-09-04T07:26:00 | 70,746,484 | 4,575 | 1,903 | Apache-2.0 | 2023-09-14T19:06:33 | 2016-10-12T22:20:28 | Python | UTF-8 | Python | false | false | 2,091 | py | test_partition.py | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... |
28d00d85be10c70e99baf6bc6de74b0fadbe0eee | ab40571d5051ad53c0f205fa797ba36eac516d06 | /language/compgen/nqg/model/parser/data/write_examples.py | 78b3c2806fd9a0790e71eb14086795380e977664 | [
"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 | 2,443 | py | write_examples.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 ... |
dfc81b278bef4bf6e6a231a0113856ffa7660360 | e8846f706a428a91659ac6e24974dc696089fe4a | /pandapower/converter/cim/__init__.py | 872eead1584b63d0af415443837a91b89c18d021 | [
"BSD-3-Clause"
] | permissive | e2nIEE/pandapower | 3e434bf81b29e9c88905abbd82fd0309e2191ffb | 5592ba1f6fcd727053a37dcf246b9bf36874c24a | refs/heads/develop | 2023-09-03T23:21:25.979973 | 2023-08-31T11:00:17 | 2023-08-31T11:00:17 | 78,748,060 | 608 | 481 | NOASSERTION | 2023-09-14T18:22:08 | 2017-01-12T13:27:53 | Python | UTF-8 | Python | false | false | 240 | py | __init__.py | # -*- coding: utf-8 -*-
# Copyright (c) 2016-2023 by University of Kassel and Fraunhofer Institute for Energy Economics
# and Energy System Technology (IEE), Kassel. All rights reserved.
from .cim2pp import from_cim
__version__ = '3.6.8'
|
43c337068982a2427496b7024bd0e702d13ab02e | aa4a3ccd4e5572396ec737c527c3b4da71a7ec30 | /pyne/fortranformat/_lexer.py | ca651285f4ba4c6f158518ca3c137c9c13324393 | [
"MIT",
"BSD-2-Clause"
] | permissive | pyne/pyne | 6c4d178eedfdeb464966e99a3d27d794a04d1add | 8a9ef7291ca5a23ec4da8794cd19cbac93f849ef | refs/heads/develop | 2023-08-31T16:00:04.363507 | 2023-08-26T14:25:38 | 2023-08-26T14:25:38 | 1,684,953 | 218 | 168 | NOASSERTION | 2023-09-12T08:21:55 | 2011-04-30T15:04:07 | C++ | UTF-8 | Python | false | false | 6,288 | py | _lexer.py | import sys
IS_PYTHON3 = sys.version_info[0] >= 3
if IS_PYTHON3:
exec("from ._edit_descriptors import *")
exec("from ._exceptions import *")
else:
exec("from _edit_descriptors import *")
exec("from _exceptions import *")
# Some lexer tokens to look out for
DIGITS = ["1", "2", "3", "4", "5"... |
7cc83c96d566469d712226fc7fd028d020955758 | 0760fb4901a75766921a205b55686d6d6f049b30 | /python/ray/tests/aws/test_autoscaler_aws.py | a57916c5f307a1da89394260662c12cc3f450331 | [
"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 | 48,089 | py | test_autoscaler_aws.py | import copy
from unittest.mock import Mock, patch
import pytest
from click.exceptions import ClickException
import ray.tests.aws.utils.helpers as helpers
import ray.tests.aws.utils.stubs as stubs
from ray.autoscaler._private.aws.config import (
DEFAULT_AMI,
_configure_subnet,
_get_subnets_or_die,
boot... |
229314e8c627bcc784c2e7b9df1a1df87b7f8773 | c338108b98baa268ddab98d3373aaab9de0990b8 | /examples/legacies/delta-tuning-main/tools/draw_mulstage_lr.py | aeae05ba90862ca721ff1ebdcee27ab159cdce10 | [
"Apache-2.0",
"MIT"
] | permissive | thunlp/OpenDelta | 491973555f40db5f2678c5260b40640b783b80f2 | 067eed2304cb1bdfe462094e42a37de4de98edff | refs/heads/main | 2023-08-17T10:51:35.731082 | 2023-08-16T09:50:10 | 2023-08-16T09:50:10 | 459,158,400 | 800 | 66 | Apache-2.0 | 2023-07-21T08:50:43 | 2022-02-14T12:45:00 | Python | UTF-8 | Python | false | false | 4,824 | py | draw_mulstage_lr.py | import os
import torch
import matplotlib.pyplot as plt
import matplotlib as mpl
import torch
from torch import device
mpl.rcParams['xtick.minor.size'] = 0
mpl.rcParams['xtick.minor.width'] = 0
mpl.rc('font', size=18)
xlabels = range(0, 18200, 2000)
xlabels_txt = [str(i) for i in xlabels]
param_to_dir = {}
log_file = ... |
2044000f8dac266ff78f207147a6c9bb881de10f | 7b7c570b30d6d7a0e9b904c7cb378cfb0d0f0e07 | /dev/custom_metrics_patch.py | dfc3510e7b057854f6f97c2e96278a70006b527b | [
"Apache-2.0"
] | permissive | mlflow/mlflow | ca97bfbbf32f8e59f454e428f5e46eb3d34d062f | 37298ffafcd34002352d01d579d4524790544267 | refs/heads/master | 2023-09-01T13:15:53.902815 | 2023-09-01T09:00:42 | 2023-09-01T09:00:42 | 136,202,695 | 14,102 | 3,748 | Apache-2.0 | 2023-09-14T21:52:42 | 2018-06-05T16:05:58 | Python | UTF-8 | Python | false | false | 260 | py | custom_metrics_patch.py | from sklearn.metrics import mean_squared_error
def weighted_mean_squared_error(eval_df, _builtin_metrics):
return mean_squared_error(
eval_df["prediction"],
eval_df["target"],
sample_weight=1 / eval_df["prediction"].values,
)
|
9c8b0866a380dfc2e49f7af16edcd87c4ffad69e | c5fd80ede07f0972a9b99d0c65a0df40e6d487fa | /pyocd/probe/stlink/stlink.py | 8ccfd6e6ff4d176e4256391a2417e1bb5bc99c83 | [
"CC-BY-4.0",
"Apache-2.0"
] | permissive | pyocd/pyOCD | 46330f3a10c9be381293d220cc025e0e347513ce | 9253740baf46ebf4eacbce6bf3369150c5fb8ee0 | refs/heads/main | 2023-08-18T07:56:54.205305 | 2023-08-13T19:11:01 | 2023-08-13T19:11:01 | 13,862,423 | 507 | 204 | Apache-2.0 | 2023-09-09T20:13:57 | 2013-10-25T14:10:05 | Python | UTF-8 | Python | false | false | 24,722 | py | stlink.py | # pyOCD debugger
# Copyright (c) 2018-2020 Arm Limited
# Copyright (c) 2021-2022 Chris Reed
# SPDX-License-Identifier: Apache-2.0
#
# 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:... |
b4196a5472a60e0a93c943eb91eb990b6de1dc0b | c46754b9600a12df4f9d7a6320dfc19aa96b1e1d | /tests/models/marian/test_modeling_marian.py | 0ae0876e503079389db88b33b2c487d54cd31b48 | [
"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 | 33,633 | py | test_modeling_marian.py | # coding=utf-8
# Copyright 2021, 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 ... |
9122a818fac93bda94e3cd77ae43208919934d83 | 6f9959709f015eea0d770d0c772ed09ab7f919bb | /munjong/make_patch.py | 25e3bd193b30ad029d5696d115e618005ec2efc6 | [
"BSD-3-Clause",
"MPL-2.0",
"BSL-1.0",
"BSD-2-Clause",
"MIT",
"Apache-2.0"
] | permissive | kakao/khaiii | 6c05e962e6babaf0c2001e39229d07b53a76b6b4 | e74fbd026ad17583d220ed8657d77916cc7fbad7 | refs/heads/master | 2023-08-03T00:04:17.300067 | 2023-06-27T07:54:23 | 2023-06-27T07:54:23 | 159,144,725 | 1,377 | 401 | Apache-2.0 | 2023-04-17T14:18:06 | 2018-11-26T09:37:19 | Python | UTF-8 | Python | false | false | 2,607 | py | make_patch.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
make patch from two Sejong corpora
__author__ = 'Jamie (jamie.lim@kakaocorp.com)'
__copyright__ = 'Copyright (C) 2019-, Kakao Corp. All rights reserved.'
"""
###########
# imports #
###########
from argparse import ArgumentParser, Namespace
import logging
import os... |
fe336c749b2b7af8649ce3807de3d5e741b57d23 | 7453911cee47edd9414ecfc66d189dc578f7e421 | /examples/udp_client.py | 45c95fef80e3a8af4e7b35ef6467171979bb3486 | [
"Python-2.0",
"MIT"
] | permissive | gevent/gevent | f20eca1852098e47f32eb062db646acfead36e71 | 6b22af0fa8eb2efa89fce36c35808948c67352b0 | refs/heads/master | 2023-08-31T19:27:29.410236 | 2023-08-31T10:26:35 | 2023-08-31T10:26:35 | 5,801,666 | 4,981 | 866 | NOASSERTION | 2023-09-13T14:16:59 | 2012-09-13T22:03:03 | Python | UTF-8 | Python | false | false | 675 | py | udp_client.py | # Copyright (c) 2012 Denis Bilenko. See LICENSE for details.
"""Send a datagram to localhost:9000 and receive a datagram back.
Usage: python udp_client.py MESSAGE
Make sure you're running a UDP server on port 9001 (see udp_server.py).
There's nothing gevent-specific here.
"""
from __future__ import print_function
im... |
7c18e52f08f516f2071778336df0c7df30cf038f | 4b36c14c643875c1ba4ed73d947f5d08c3aff0ce | /src/win/__init__.py | 901ec3978796b83e5cd69070bbd038ae169620a1 | [
"Apache-2.0"
] | permissive | JayHeng/NXP-MCUBootUtility | 3ba0bff017241c9fb22250e5062725680ea91684 | a5dd9033de177206a5ee7659cbd798435790e7c4 | refs/heads/master | 2023-07-20T00:23:06.350476 | 2023-07-14T01:27:45 | 2023-07-14T01:27:45 | 146,231,190 | 155 | 77 | Apache-2.0 | 2020-09-01T02:02:40 | 2018-08-27T01:22:45 | Python | UTF-8 | Python | false | false | 1,762 | py | __init__.py | #!/usr/bin/env python
import secBootWin
import bootDeviceWin_FlexspiNor
import bootDeviceWin_FDCB
import bootDeviceWin_LUT
import bootDeviceWin_FlexspiNand
import bootDeviceWin_SemcNor
import bootDeviceWin_SemcNand
import bootDeviceWin_UsdhcSd
import bootDeviceWin_UsdhcMmc
import bootDeviceWin_RecoverySpiNor
import bo... |
d2aad7802d7ebcf0f3850f71eb878fe6b0f4cb95 | 318142d18863d7d36c6a0cd26301448b2fee16c9 | /tools/paconn-cli/paconn/commands/help.py | 47820acc108255b7e8b166f86b4cf0070a9b520b | [
"LicenseRef-scancode-generic-cla",
"CC-BY-4.0",
"MIT",
"LGPL-2.1-or-later"
] | permissive | microsoft/PowerPlatformConnectors | 5db9af84af211f6c76fb35ba482125fb2e88f075 | 083da76dcfebe3401a9485c7eb2964fd30561258 | refs/heads/dev | 2023-08-31T07:42:00.871959 | 2023-08-28T15:24:05 | 2023-08-28T15:24:05 | 161,588,836 | 784 | 1,310 | MIT | 2023-09-14T19:45:17 | 2018-12-13T05:33:24 | C# | UTF-8 | Python | false | false | 1,532 | py | help.py | # -----------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# -----------------------------------------------------------------------------
""... |
239e83387280fb198929938029c54977a5f7b7f6 | 312a8fde11293cb142334a3860966ec1f75ac401 | /timesketch/api/v1/resources/datasource.py | 18741e04d6026dd08f2d8f27ef174302b1de7b2b | [
"Apache-2.0"
] | permissive | google/timesketch | f0fd09062a8a24bac581d2d4286d095d667d2f10 | 24f471b58ca4a87cb053961b5f05c07a544ca7b8 | refs/heads/master | 2023-08-31T21:48:19.602686 | 2023-08-31T11:24:17 | 2023-08-31T11:24:17 | 21,009,909 | 2,263 | 647 | Apache-2.0 | 2023-09-14T14:08:07 | 2014-06-19T17:49:45 | Python | UTF-8 | Python | false | false | 7,506 | py | datasource.py | # Copyright 2021 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 a... |
421cf425e0fb8d838664eaf3be1e80695ce1ed19 | 9577725de28e621e4b0ec275251a2b2e7ecb0261 | /test/integration_new/context_managers/box_retention_policy.py | 7390a374c73d52ff8e570da552366e511f4e492d | [
"Apache-2.0"
] | permissive | box/box-python-sdk | 0b7014d69da14baacf9ac777c347664b924325b5 | 4f11d7596488194fc740936fe987f42864003d41 | refs/heads/main | 2023-08-17T04:33:23.692675 | 2023-08-11T11:24:36 | 2023-08-11T11:24:36 | 30,386,388 | 424 | 285 | Apache-2.0 | 2023-09-14T11:43:27 | 2015-02-06T00:30:55 | Python | UTF-8 | Python | false | false | 1,274 | py | box_retention_policy.py | from typing import Any, Union
from boxsdk.object.retention_policy import RetentionPolicy
from test.integration_new import USER_CLIENT
class BoxRetentionPolicy:
DEFAULT_RETENTION_POLICY_NAME = "modifiable_retention_policy_for_integration_tests"
def __init__(
self,
*,
name... |
a5b342f12dbc131a2fe8f0fea3a034e592f6bb14 | a02ccb5dff094fad8bcd691dda234d50ff768299 | /tools/experimental/trt-engine-explorer/utils/device_info.py | 13efd5f65caadead2e497c4fbcc8e434a2583e1d | [
"Apache-2.0",
"BSD-3-Clause",
"MIT",
"ISC",
"BSD-2-Clause"
] | permissive | NVIDIA/TensorRT | 5520d5a6a5926a2b30dbdd2c5b2e4dfe6d1b429b | a167852705d74bcc619d8fad0af4b9e4d84472fc | refs/heads/release/8.6 | 2023-07-29T05:39:45.688091 | 2023-06-09T22:29:09 | 2023-06-09T23:04:18 | 184,657,328 | 8,026 | 2,096 | Apache-2.0 | 2023-09-13T17:30:16 | 2019-05-02T22:02:08 | C++ | UTF-8 | Python | false | false | 2,548 | py | device_info.py | #
# SPDX-FileCopyrightText: Copyright (c) 1993-2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# 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... |
e356ea78e394ff01dc57fa9d9809313625cb6160 | 3a3e715407bff57f7811356ddbb58d097d3ce6ab | /smartsheet/models/search_result_item.py | 66d346667e248736ad1bd867c044ccacc44f399c | [
"MIT",
"Apache-2.0"
] | permissive | smartsheet-platform/smartsheet-python-sdk | cc72585df2290ce89adc236f2c38e04717b75269 | e32cef3c7faeba30a4cec37f9ac15b5a1d72cc83 | refs/heads/master | 2023-01-12T19:22:31.806414 | 2022-12-06T16:35:04 | 2022-12-06T16:35:04 | 28,953,329 | 137 | 94 | Apache-2.0 | 2023-01-19T12:35:26 | 2015-01-08T06:59:27 | Python | UTF-8 | Python | false | false | 4,016 | py | search_result_item.py | # pylint: disable=C0111,R0902,R0904,R0912,R0913,R0915,E1101
# Smartsheet Python SDK.
#
# Copyright 2018 Smartsheet.com, 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.... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.