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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6f8876fff305088abd093d8ebb3d9b549b9a3963 | 518bf342bc4138982af3e2724e75f1d9ca3ba56c | /solutions/1935. Maximum Number of Words You Can Type/1935.py | 0494b94282b003cc4172cbabc98fe33c719f2a07 | [
"MIT"
] | permissive | walkccc/LeetCode | dae85af7cc689882a84ee5011f0a13a19ad97f18 | a27be41c174565d365cbfe785f0633f634a01b2a | refs/heads/main | 2023-08-28T01:32:43.384999 | 2023-08-20T19:00:45 | 2023-08-20T19:00:45 | 172,231,974 | 692 | 302 | MIT | 2023-08-13T14:48:42 | 2019-02-23T15:46:23 | C++ | UTF-8 | Python | false | false | 222 | py | 1935.py | class Solution:
def canBeTypedWords(self, text: str, brokenLetters: str) -> int:
ans = 0
broken = set(brokenLetters)
for word in text.split():
ans += all(c not in broken for c in word)
return ans
|
30f23775bb356fe02c72c373b093dfce7b621dbb | a3d6556180e74af7b555f8d47d3fea55b94bcbda | /third_party/blink/web_tests/external/wpt/workers/support/imported_script.py | 2f9c6a81d9d92a1a9f6d660abce74adc694f00e4 | [
"LGPL-2.0-or-later",
"LicenseRef-scancode-warranty-disclaimer",
"LGPL-2.1-only",
"GPL-1.0-or-later",
"GPL-2.0-only",
"LGPL-2.0-only",
"BSD-2-Clause",
"LicenseRef-scancode-other-copyleft",
"BSD-3-Clause",
"MIT",
"Apache-2.0"
] | permissive | chromium/chromium | aaa9eda10115b50b0616d2f1aed5ef35d1d779d6 | a401d6cf4f7bf0e2d2e964c512ebb923c3d8832c | refs/heads/main | 2023-08-24T00:35:12.585945 | 2023-08-23T22:01:11 | 2023-08-23T22:01:11 | 120,360,765 | 17,408 | 7,102 | BSD-3-Clause | 2023-09-10T23:44:27 | 2018-02-05T20:55:32 | null | UTF-8 | Python | false | false | 87 | py | imported_script.py | def main(request, response):
return [(b'Content-Type', request.GET[b'mime'])], u""
|
723979b07a124c7858019e53fbefefa4dc07ce24 | de4d86d528f6a45943e7f369144b91740b7ad67b | /scripts/generator/db.py | 689c048b07a941dbef2c519207f8fc29e256d799 | [
"MIT"
] | permissive | yihong0618/running_page | 4bf1fe654631cb2fd58c082d97cb990da34ce266 | 07e7c3219634ffa181b8f07defee9c75b9e68e31 | refs/heads/master | 2023-09-03T03:14:47.726778 | 2023-08-27T12:54:29 | 2023-08-27T12:54:29 | 296,233,312 | 2,875 | 1,095 | MIT | 2023-09-13T10:07:16 | 2020-09-17T05:59:22 | Python | UTF-8 | Python | false | false | 4,434 | py | db.py | import datetime
import random
import string
import time
from geopy.geocoders import Nominatim
from sqlalchemy import Column, Float, Integer, Interval, String, create_engine
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
Base = declarative_base()
import random
import s... |
b5b0442768432487e0413e22d8a215ec4ab1f3cb | e73547787354afd9b717ea57fe8dd0695d161821 | /tools/splat/segtypes/n64/segment.py | 8f9c3cccd35b5640776ca2bdb3b30385c335f1a5 | [
"MIT"
] | permissive | pmret/papermario | 8b514b19653cef8d6145e47499b3636b8c474a37 | 9774b26d93f1045dd2a67e502b6efc9599fb6c31 | refs/heads/main | 2023-08-31T07:09:48.951514 | 2023-08-21T18:07:08 | 2023-08-21T18:07:08 | 287,151,133 | 904 | 139 | null | 2023-09-14T02:44:23 | 2020-08-13T01:22:57 | C | UTF-8 | Python | false | false | 75 | py | segment.py | from segtypes.segment import Segment
class N64Segment(Segment):
pass
|
4678d72cfef22f308bd5b5027d2dc1f695ca362b | 07e810873aa0134ba5017ccfef641d1038ca9b92 | /hs_tracking/views.py | b58d4aca18cc1d4763ba6b51f25309c284d50e4e | [
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause"
] | permissive | hydroshare/hydroshare | 9093e6dce047a30d4b2b7720257a7841d209353f | 69855813052243c702c9b0108d2eac3f4f1a768f | refs/heads/develop | 2023-09-04T12:52:30.816709 | 2023-08-30T16:46:20 | 2023-08-30T16:46:20 | 24,703,136 | 207 | 57 | BSD-3-Clause | 2023-09-14T20:20:16 | 2014-10-02T02:19:41 | Python | UTF-8 | Python | false | false | 4,286 | py | views.py | import csv
import urllib.parse
from io import StringIO
from django.contrib.auth.decorators import user_passes_test
from django.http import HttpResponse, HttpResponseForbidden, HttpResponseRedirect
from django.utils.decorators import method_decorator
from django.views.generic import TemplateView
from . import models a... |
eb5a1445c23ede7b1a8eba786e0ef9080895cf4e | dbd1399c4e8d01e02f4f94de7b1bbdb123838c0c | /manual_test/cookbook.py | 7702a6ccec3c8b30fa4cb3908710ede9ae339f8b | [
"Apache-2.0",
"GPL-1.0-or-later"
] | permissive | xhtml2pdf/xhtml2pdf | fe4416904bf2cedcce5af67b413152545c7d2499 | f5bd8520699a2742aa2d960826b19d9594864fe0 | refs/heads/master | 2023-08-09T23:27:01.613275 | 2023-07-24T12:19:19 | 2023-07-24T12:19:19 | 1,755,413 | 1,218 | 398 | Apache-2.0 | 2023-07-24T12:19:20 | 2011-05-16T13:45:29 | Python | UTF-8 | Python | false | false | 3,709 | py | cookbook.py | # -*- coding: utf-8 -*-
# Copyright 2010 Dirk Holtwick, holtwick.it
#
# 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 ... |
2d9ef3dc420309241820c5b443f562257215d668 | 353730afc44b31cf4efded67a4e2835d19c75922 | /tensorly/__init__.py | acce8186fe3e30202c34e80e9916770183825c64 | [
"BSD-3-Clause"
] | permissive | tensorly/tensorly | 605529bf5206f1977c6067f96f47bec439355246 | de05e178850eb2abe43ec1a40f80624ca606807d | refs/heads/main | 2023-08-31T14:01:45.527525 | 2023-08-20T18:28:25 | 2023-08-20T18:28:25 | 71,603,727 | 1,533 | 334 | NOASSERTION | 2023-09-08T18:10:37 | 2016-10-21T23:14:52 | Python | UTF-8 | Python | false | false | 2,890 | py | __init__.py | __version__ = "0.8.1"
import sys
from .base import unfold, fold
from .base import tensor_to_vec, vec_to_tensor
from .base import partial_unfold, partial_fold
from .base import partial_tensor_to_vec, partial_vec_to_tensor
from .cp_tensor import (
cp_to_tensor,
cp_to_unfolded,
cp_to_vec,
cp_norm,
c... |
2c6707d8ac6cbd755eb1078bb5adcde4d980c0f8 | 99a5229ba31d633b202252e1fda6194c70c83c38 | /opsdroid/cli/logs.py | 4a11feb9ae79deace303ce46e5f30de0d65a419f | [
"Apache-2.0"
] | permissive | opsdroid/opsdroid | 1f5aeaa9a18e5c268ad7bfb46664f969f243814d | 41246da2f6f379a889dadd1d3b4e139b65d3c9fb | refs/heads/master | 2023-08-31T11:54:51.735969 | 2023-08-15T12:21:27 | 2023-08-15T12:21:27 | 64,034,523 | 835 | 593 | Apache-2.0 | 2023-08-27T13:54:59 | 2016-07-23T20:18:56 | Python | UTF-8 | Python | false | false | 1,061 | py | logs.py | """The logs subcommand for opsdroid cli."""
import click
import tailer
from opsdroid.const import DEFAULT_LOG_FILENAME
@click.group(invoke_without_command=True)
@click.option("-f", "follow", is_flag=True, help="Print the logs in real time")
@click.pass_context
def logs(ctx, follow):
"""Print the content of the l... |
99685cff9e253b395dc2c8e55e02eecc2c7ff08a | a3d6556180e74af7b555f8d47d3fea55b94bcbda | /ios/build/bots/scripts/plugin/test_plugins_test.py | 0fa254d31bd8bb23cdc2b308d2c883739e65b87a | [
"BSD-3-Clause"
] | permissive | chromium/chromium | aaa9eda10115b50b0616d2f1aed5ef35d1d779d6 | a401d6cf4f7bf0e2d2e964c512ebb923c3d8832c | refs/heads/main | 2023-08-24T00:35:12.585945 | 2023-08-23T22:01:11 | 2023-08-23T22:01:11 | 120,360,765 | 17,408 | 7,102 | BSD-3-Clause | 2023-09-10T23:44:27 | 2018-02-05T20:55:32 | null | UTF-8 | Python | false | false | 12,407 | py | test_plugins_test.py | #!/usr/bin/env vpython3
# Copyright 2022 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.
import unittest.mock as mock
import sys
import unittest
import subprocess
import os
import signal
import glob
# if the current direc... |
40aa492ac5493a569409a7a9869e6cc751314e1e | 3c30ac9d17f355e39111595ec8c0709b862769c7 | /gen_api.py | 318e6a519dacc4456e92ea2c84955e6102e7b339 | [] | permissive | zgpio/tree.nvim | 4804b2632f719f04c0b4fa8fe0c5c78bbf6d5255 | 2f540c2d00a2573b8b694a4d9e512f379cd5ea86 | refs/heads/master | 2022-06-21T12:06:23.308637 | 2022-06-10T09:46:54 | 2022-06-10T09:46:54 | 213,804,520 | 221 | 10 | BSD-3-Clause | 2020-08-07T05:22:23 | 2019-10-09T02:42:39 | C++ | UTF-8 | Python | false | false | 3,076 | py | gen_api.py | #!/usr/bin/python3
# -*- coding: utf-8 -*-
from jinja2 import Environment, FileSystemLoader
import msgpack, sys, os, subprocess
import re
class InvalidType(Exception):
pass
class NativeType:
def __init__(self, name, expect_ref = False):
self.name = name
self.expect_ref = expect_ref
REMAP_T =... |
617c1d259a78b451144bde517ebdff243af69b5f | e910318d01528d82040507a49eeeb8dade45b31f | /examples/hwapi/button_reaction.py | e5a139a575f2c27be84884d20c645fcee2987410 | [
"MIT"
] | permissive | pfalcon/pycopy | e844480a5e5cd463530328889daed2ba87552b8a | 3ac90ae9c3c6bbebfba9cada2d37025e35c62796 | refs/heads/pfalcon | 2023-08-30T09:39:52.290147 | 2022-09-08T16:42:38 | 2022-09-08T16:42:38 | 15,507,576 | 753 | 71 | MIT | 2021-05-08T04:59:21 | 2013-12-29T11:38:47 | C | UTF-8 | Python | false | false | 474 | py | button_reaction.py | import utime
import machine
from hwconfig import LED, BUTTON
# machine.time_pulse_us() function demo
print(
"""\
Let's play an interesting game:
You click button as fast as you can, and I tell you how slow you are.
Ready? Cliiiiick!
"""
)
while 1:
delay = machine.time_pulse_us(BUTTON, 1, 10 * 1000 * 1000)
... |
cbd73dfbeeb34eee5d032200c91358ac32830ce4 | 98f1a0bfa5b20a0b81e9e555d76e706c62d949c9 | /examples/pytorch/dimenet/main.py | eb154bcb776bb054b0368f3539d83c4387e8181b | [
"Apache-2.0"
] | permissive | dmlc/dgl | 3a8fbca3a7f0e9adf6e69679ad62948df48dfc42 | bbc8ff6261f2e0d2b5982e992b6fbe545e2a4aa1 | refs/heads/master | 2023-08-31T16:33:21.139163 | 2023-08-31T07:49:22 | 2023-08-31T07:49:22 | 130,375,797 | 12,631 | 3,482 | Apache-2.0 | 2023-09-14T15:48:24 | 2018-04-20T14:49:09 | Python | UTF-8 | Python | false | false | 9,971 | py | main.py | import copy
from pathlib import Path
import click
import dgl
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
from dgl.data.utils import Subset
from logzero import logger
from modules.dimenet import DimeNet
from modules.dimenet_pp import DimeNetPP
from ... |
44adead84336610a9048aa16631d4ad09ccc11c5 | 55ee564f2f152dc0a38f3cbf920b242ba1d19028 | /setup.py | 97ec77bf7ef04407e68d22cff42b1a0dcd029ef6 | [
"MIT",
"Python-2.0"
] | permissive | tasdikrahman/vocabulary | ab2e9aba6e3ff6fbda99b762f1a67545debe4a45 | 54403c5981af25dc3457796b57048ae27f09e9be | refs/heads/master | 2022-03-04T22:35:01.694549 | 2017-12-25T08:27:39 | 2017-12-25T08:27:39 | 47,144,923 | 269 | 62 | MIT | 2019-11-04T04:42:35 | 2015-11-30T20:45:03 | Python | UTF-8 | Python | false | false | 2,085 | py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
try:
from os import path
from setuptools import setup, find_packages
except ImportError:
from distutils.core import setup
from vocabulary.version import VERSION
__version__ = VERSION
# here = path.abspath(path.dirname(__file__))
# # get the depen... |
c209f0f6b9072245cddc6a7b90a23b6b5c8e90c7 | 8e342677ebe58bfb6c7360b555044acc6964f333 | /src/einsteinpy/examples.py | 6a05ffc7f404f8318d557667f0f7eab370d7829f | [
"LicenseRef-scancode-proprietary-license",
"MIT"
] | permissive | einsteinpy/einsteinpy | 5d48142cab52f7c629d78b47088d804ff3eafae9 | 1bd1b27e142b0a0ec2e26bf2611468dbf50d9cf8 | refs/heads/main | 2023-08-17T19:17:34.239265 | 2023-01-31T20:43:54 | 2023-01-31T20:43:54 | 168,302,584 | 594 | 292 | MIT | 2023-08-12T07:30:41 | 2019-01-30T07:56:15 | Python | UTF-8 | Python | false | false | 794 | py | examples.py | import numpy as np
from einsteinpy.geodesic import Timelike
__all__ = ["precession"]
def precession():
"""
An example to showcase the usage of the various modules in ``einsteinpy``.
Here, we assume a Schwarzschild spacetime and obtain a test particle orbit, that
shows apsidal precession.
Return... |
d27766e6bc24ad07c877da64a5dc73b45df133d7 | 23652304566b1869ca65b95b116ee43d16e134f3 | /tests/h/models/document/_meta_test.py | db2692f3fcd8ff23d955798c1bce9e3d18042bf1 | [
"BSD-2-Clause",
"BSD-3-Clause",
"BSD-2-Clause-Views"
] | permissive | hypothesis/h | 29399a26990856c336b05022e827541dd8aeedab | 232446d776fdb906d2fb253cf0a409c6813a08d6 | refs/heads/main | 2023-08-30T16:21:33.754658 | 2023-08-30T09:26:50 | 2023-08-30T09:40:48 | 3,910,945 | 2,558 | 452 | BSD-2-Clause | 2023-09-14T11:25:06 | 2012-04-02T19:56:59 | Python | UTF-8 | Python | false | false | 4,312 | py | _meta_test.py | from datetime import datetime, timedelta
from unittest.mock import Mock
import pytest
import sqlalchemy as sa
from h_matchers import Any
from h.models import Document, DocumentMeta
from h.models.document import ConcurrentUpdateError, create_or_update_document_meta
class TestDocumentMeta:
def test_repr(self):
... |
03b786441a9c02ac448ccea3e47087c4310bc7a2 | 7c3bace625eb6ece1b06326940b8e89ba3fdc68f | /tests/test_motionevents.py | 8d1edc1d523993ea97fd6bddc59162833fc94355 | [
"Apache-2.0"
] | permissive | AirtestProject/Airtest | 64c218a54e6a28cba42af0ffe8a81d30703ffcca | bf49dfad0be05125df75c64ea47a282132bc03d5 | refs/heads/master | 2023-08-31T05:31:32.059552 | 2023-08-22T06:23:36 | 2023-08-22T06:23:36 | 118,709,540 | 7,580 | 1,256 | Apache-2.0 | 2023-08-22T06:23:37 | 2018-01-24T04:00:35 | Python | UTF-8 | Python | false | false | 2,025 | py | test_motionevents.py | # encoding=utf-8
from airtest.core.android.android import ADB, Android
from airtest.core.android.touch_methods.base_touch import MotionEvent, DownEvent, UpEvent, MoveEvent, SleepEvent
import unittest
import warnings
import time
warnings.simplefilter("always")
class TestMotionEvents(unittest.TestCase):
@classmeth... |
cbf4c87670ea1be043918275f902a71c6de57020 | a98c221480dea8907aede403606b4450ec86b9f3 | /tests/test_models/test_deepar.py | f6d02d93335c66937a11c9e29f7758aca2e7ef56 | [
"MIT"
] | permissive | LongxingTan/Time-series-prediction | c38c05724b50e36e43647ddef591582556578822 | b6381e47fa110b76334b907ff3973bdb2d0f1091 | refs/heads/master | 2023-08-31T18:00:31.865106 | 2023-08-19T15:48:03 | 2023-08-19T15:48:03 | 131,993,562 | 746 | 152 | MIT | 2023-09-12T11:59:21 | 2018-05-03T12:43:20 | Python | UTF-8 | Python | false | false | 622 | py | test_deepar.py | import unittest
import tensorflow as tf
import tfts
from tfts import AutoModel, KerasTrainer, Trainer
from tfts.models.deepar import DeepAR
class DeepARTest(unittest.TestCase):
def test_model(self):
predict_sequence_length = 8
custom_model_params = {}
model = DeepAR(predict_sequence_leng... |
e261082c059ac91513602805f891b8dbc8bf8dad | beab4b9703df6c4e9bda54fada11a6d985ea2c5a | /sanic/base/root.py | 3f3ba58e56448a77ccf7700da95147636349b980 | [
"MIT"
] | permissive | sanic-org/sanic | d3db62482914061a1f6a8f7d94b6127c2876cb3e | 47215d4635184bdfb1d5cff000d19390f19219ab | refs/heads/main | 2023-09-05T01:04:31.432228 | 2023-08-30T17:03:22 | 2023-08-30T17:03:22 | 59,720,190 | 3,523 | 439 | MIT | 2023-09-14T05:45:11 | 2016-05-26T04:38:22 | Python | UTF-8 | Python | false | false | 2,075 | py | root.py | import re
from typing import Any, Optional
from sanic.base.meta import SanicMeta
from sanic.exceptions import SanicException
from sanic.mixins.exceptions import ExceptionMixin
from sanic.mixins.listeners import ListenerMixin
from sanic.mixins.middleware import MiddlewareMixin
from sanic.mixins.routes import RouteMixi... |
9a79f391b16bb0613072345a9bcfdb75c3c4fc3e | 559f3dec0964d2e0f86c6c871371fe779cf3726c | /contrib/CityscapesSOTA/scripts/train.py | a5a41202be788049f9f4cbc638e8f05d0733fd43 | [
"Apache-2.0"
] | permissive | PaddlePaddle/PaddleSeg | 319ab26665ea492527a1949671650135123ffc39 | 2c8c35a8949fef74599f5ec557d340a14415f20d | refs/heads/release/2.8 | 2023-08-31T09:08:06.724717 | 2023-08-18T01:59:56 | 2023-08-18T01:59:56 | 204,380,779 | 8,531 | 1,866 | Apache-2.0 | 2023-09-12T02:30:42 | 2019-08-26T02:32:22 | Python | UTF-8 | Python | false | false | 11,777 | py | train.py | # Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... |
8a8c5dc873ff682a87ad3bab54fa485dc4bac398 | fe85b4811c93510006b666858d6029156f167f89 | /scripts/speedtest-fs.py | 56eb234f3fb4e9a8ce4ecceea370de84c08e93e5 | [
"MIT",
"GPL-1.0-or-later"
] | permissive | 9001/copyparty | 39207421ccdc501566105da562a168996e0f9b4c | 48a3898aa692770735a926b0c18300d7da8b021f | refs/heads/hovudstraum | 2023-08-18T15:19:36.934124 | 2023-08-16T19:57:19 | 2023-08-16T19:57:19 | 188,700,274 | 273 | 21 | MIT | 2023-08-09T20:50:27 | 2019-05-26T15:28:33 | Python | UTF-8 | Python | false | false | 3,677 | py | speedtest-fs.py | #!/usr/bin/env python3
import os
import sys
import stat
import time
import signal
import traceback
import threading
from queue import Queue
"""speedtest-fs: filesystem performance estimate"""
__author__ = "ed <copyparty@ocv.me>"
__copyright__ = 2020
__license__ = "MIT"
__url__ = "https://github.com/9001/copyparty/"
... |
3c29eaf0b5550cf301aaa842cfe7659f2665d945 | c71b7a8a9dd7bf7c9496b1df2acc1e52a2a913d0 | /onadata/libs/serializers/user_profile_serializer.py | e1003f2a629bfece9549736b7484d85b14fc8fd0 | [
"BSD-2-Clause"
] | permissive | kobotoolbox/kobocat | a5c6fb6a9d3dabe71b5e3c082e4261c4475cbf7f | b8d93d4da649f323af111cf7247206554be7c8b1 | refs/heads/main | 2023-08-10T00:05:49.384348 | 2023-07-06T04:47:59 | 2023-07-06T04:47:59 | 14,497,749 | 101 | 135 | BSD-2-Clause | 2023-09-13T14:57:13 | 2013-11-18T16:16:32 | Python | UTF-8 | Python | false | false | 2,454 | py | user_profile_serializer.py | # coding: utf-8
from rest_framework import serializers
from onadata.apps.main.models import UserProfile
from onadata.libs.constants import CAN_VIEW_PROFILE
from onadata.libs.serializers.fields.json_field import JsonField
class UserProfileSerializer(serializers.Serializer):
id = serializers.ReadOnlyField(source='... |
07738ef51c6e6a0b0c2f95de84292af769799e61 | 4a6e511a6e931756390f0f26a79026e244bb8c63 | /esda/tests/test_topo.py | f4c002ca3e63d60133e21f16686c41c4bcac4328 | [
"BSD-3-Clause"
] | permissive | pysal/esda | a19bd295d805bd70048bd9ee1e4f4a003efe7c1e | 68125173e2992e02246711795b1e1b55c12f0db5 | refs/heads/main | 2023-08-22T02:12:25.327911 | 2023-08-04T00:00:22 | 2023-08-04T00:00:22 | 81,873,636 | 191 | 55 | BSD-3-Clause | 2023-09-05T10:39:41 | 2017-02-13T21:26:48 | Jupyter Notebook | UTF-8 | Python | false | false | 3,927 | py | test_topo.py | from unittest import TestCase
import numpy
import pandas
from ..topo import isolation, prominence, to_elevation, weights
class TopoTester(TestCase):
def setUp(self):
self.points = numpy.array(
[[0, 0], [0, 1], [1, 1], [2, 0.5], [0.5, 0.5], [0.75, 0]]
)
self.marks = numpy.arra... |
6fc9331ed9fc3855dac4f2f1565c421c2a35ed67 | a9d9df92f8a61fa3f3649b408e8457b8fdb0b85a | /knowledge_repo/app/utils/image.py | 4521f7cb34f6cf5196ee65484c50f7f3f1dfc8bf | [
"Apache-2.0"
] | permissive | airbnb/knowledge-repo | ae7e122e10e505c568511999cf55352eb74646e1 | 71fd3fd42db7866257f86f37235ca0b5d81f5378 | refs/heads/master | 2023-07-23T08:06:15.180434 | 2023-04-17T04:04:39 | 2023-04-17T04:04:39 | 65,949,398 | 5,668 | 846 | Apache-2.0 | 2023-07-20T11:16:46 | 2016-08-17T23:32:50 | Python | UTF-8 | Python | false | false | 1,411 | py | image.py | from knowledge_repo._version import __optional_dependencies__
from knowledge_repo.constants import PDF
from knowledge_repo.utils.dependencies import check_dependencies
import imghdr
import io
import os
ALLOWED_IMAGE_TYPES = ('png', 'jpeg', 'gif')
def get_file_extension(filepath):
return os.path.splitext(filepath... |
a38876a11d68f3db488d77498eae1eff14a04de9 | 069c2295076c482afadfe6351da5ae02be8e18e6 | /django/contrib/auth/admin.py | f9532abc14162cbbc2e737f09653b2688d7d2353 | [
"LicenseRef-scancode-other-copyleft",
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause",
"GPL-1.0-or-later",
"Python-2.0.1",
"LicenseRef-scancode-free-unknown",
"LicenseRef-scancode-other-permissive",
"Python-2.0"
] | permissive | django/django | 5eb557f57053631cd4f566f451e43197309dbeeb | c74a6fad5475495756a5bdb18b2cab2b68d429bc | refs/heads/main | 2023-09-01T03:43:44.033530 | 2023-08-31T08:27:32 | 2023-08-31T08:27:32 | 4,164,482 | 73,530 | 38,187 | BSD-3-Clause | 2023-09-14T20:03:48 | 2012-04-28T02:47:18 | Python | UTF-8 | Python | false | false | 9,153 | py | admin.py | from django.conf import settings
from django.contrib import admin, messages
from django.contrib.admin.options import IS_POPUP_VAR
from django.contrib.admin.utils import unquote
from django.contrib.auth import update_session_auth_hash
from django.contrib.auth.forms import (
AdminPasswordChangeForm,
UserChangeFor... |
7d5ac3b82ce17cd409388b5bff242ad932529bc9 | d0106bb9704e35392a96e20cc3d1ea2d33b6eab4 | /apps/document/__init__.py | 614a030ff8764263631334fab9f9aa2b6ffaeadc | [] | no_license | openitsystem/itops | f0fb716e3061900af2dea13017d2c12ae4367a31 | 5552af663ed2c668a16b9c687c2a50ed02595a01 | refs/heads/master | 2023-03-09T05:57:23.373691 | 2021-05-19T07:27:59 | 2021-05-19T07:27:59 | 185,988,028 | 144 | 55 | null | 2022-12-27T15:36:28 | 2019-05-10T12:52:43 | Python | UTF-8 | Python | false | false | 66 | py | __init__.py | # -*- coding: utf-8 -*-
# @Time : 2019/2/1 11:24
# @Author :
|
690eb3c2ae0c2e6a8d88f7e8596c8594b736a549 | ec7591c3f478c43e76257aaa500d8f6a2e763d74 | /stanza/tests/common/test_data_conversion.py | d6d45da7200d3f7f5b845b89c485fe30b6ec2251 | [
"Apache-2.0"
] | permissive | stanfordnlp/stanza | 5cc3dbe70a96dd565639b7dae1efde6b4fa76985 | c530c9af647d521262b56b717bcc38b0cfc5f1b8 | refs/heads/main | 2023-09-01T12:01:38.980322 | 2023-03-14T16:10:05 | 2023-03-14T16:10:05 | 104,854,615 | 4,281 | 599 | NOASSERTION | 2023-09-10T00:31:36 | 2017-09-26T08:00:56 | Python | UTF-8 | Python | false | false | 12,197 | py | test_data_conversion.py | """
Basic tests of the data conversion
"""
import pytest
import tempfile
from zipfile import ZipFile
import stanza
from stanza.utils.conll import CoNLL
from stanza.models.common.doc import Document
from stanza.tests import *
pytestmark = pytest.mark.pipeline
# data for testing
CONLL = [[['1', 'Nous', 'il', 'PRON', '... |
8945afa9a2b5db582feeeeee5a720d46baf893a8 | 9071dc219693bde591ad12fb31c43c635f3a3f5e | /git_machete/bin.py | 5f6d780e678dc1e72da35dd5fe4ce6ab749f519f | [
"MIT"
] | permissive | VirtusLab/git-machete | 67f51e49d44601daee4cc40fa27de87ecc029af6 | dca261b0f8c56edb65557d178321a21177872b05 | refs/heads/master | 2023-08-17T07:58:32.883018 | 2023-08-12T14:52:48 | 2023-08-12T14:52:48 | 122,743,101 | 711 | 45 | MIT | 2023-09-08T07:39:27 | 2018-02-24T13:32:07 | Python | UTF-8 | Python | false | false | 767 | py | bin.py | import sys
# Since this shim needs to be compatible with Python 2,
# let's skip mypy checks, as type annotations were only introduced in Python 3.5.
def main(): # type: ignore
def validate_python_version(): # type: ignore
if sys.version_info[:2] < (3, 6):
# String interpolations were only i... |
e89a6e08d47f4be355950e47b4f11f86bfc0deab | 4d28185e7a78a569f9a449f39f183cac3024f711 | /packages/Python/lldbsuite/test/lang/c/register_variables/TestRegisterVariables.py | af0ad2a08719deb58fe35f946483f16316bef416 | [
"NCSA",
"Apache-2.0",
"LLVM-exception"
] | permissive | apple/swift-lldb | 2789bf44f648609a1674ee520ac20b64c95de072 | d74be846ef3e62de946df343e8c234bde93a8912 | refs/heads/stable | 2023-04-06T00:28:15.882479 | 2019-10-25T22:46:59 | 2019-10-25T22:46:59 | 44,838,862 | 780 | 291 | Apache-2.0 | 2020-01-10T19:28:43 | 2015-10-23T21:13:18 | C++ | UTF-8 | Python | false | false | 7,610 | py | TestRegisterVariables.py | """Check that compiler-generated register values work correctly"""
from __future__ import print_function
import re
import lldb
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
# This method attempts to figure out if a given variable
# is in a register.... |
be50da08231ee501290a3dbb011b303d31fa7513 | 069c2295076c482afadfe6351da5ae02be8e18e6 | /tests/template_tests/syntax_tests/test_resetcycle.py | fb67b3368ee6e19553cead48be1ddf70bd668861 | [
"LicenseRef-scancode-other-copyleft",
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause",
"GPL-1.0-or-later",
"Python-2.0.1",
"LicenseRef-scancode-free-unknown",
"LicenseRef-scancode-other-permissive",
"Python-2.0"
] | permissive | django/django | 5eb557f57053631cd4f566f451e43197309dbeeb | c74a6fad5475495756a5bdb18b2cab2b68d429bc | refs/heads/main | 2023-09-01T03:43:44.033530 | 2023-08-31T08:27:32 | 2023-08-31T08:27:32 | 4,164,482 | 73,530 | 38,187 | BSD-3-Clause | 2023-09-14T20:03:48 | 2012-04-28T02:47:18 | Python | UTF-8 | Python | false | false | 4,329 | py | test_resetcycle.py | from django.template import TemplateSyntaxError
from django.test import SimpleTestCase
from ..utils import setup
class ResetCycleTagTests(SimpleTestCase):
@setup({"resetcycle01": "{% resetcycle %}"})
def test_resetcycle01(self):
with self.assertRaisesMessage(TemplateSyntaxError, "No cycles in templat... |
fbe1e0018fe32a5cdf401a90b67a7da2d587fb4a | b38247a5d84d8b52ce8363f8dd81629cfbe17f65 | /reagent/net_builder/parametric_dqn_net_builder.py | d37091cc7dcf81cdafc3094a787a06c4ca774a12 | [
"BSD-3-Clause"
] | permissive | facebookresearch/ReAgent | 7f2b82eaaf7a19e58cc50aacc307d7b001231440 | c5f1a8371a677b4f8fb0882b600bf331eba5259d | refs/heads/main | 2023-09-05T15:56:49.175072 | 2023-08-29T21:48:40 | 2023-08-29T21:48:40 | 98,565,575 | 1,480 | 290 | BSD-3-Clause | 2023-09-12T23:09:30 | 2017-07-27T17:53:21 | Python | UTF-8 | Python | false | false | 1,797 | py | parametric_dqn_net_builder.py | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
import abc
import torch
from reagent.core.fb_checker import IS_FB_ENVIRONMENT
from reagent.core.parameters import NormalizationData
from reagent.models.base import ModelBase
from reagent.prediction.predictor_wrapper import ... |
59d038437a69ab38dfccdc3468e2bf2bd532e0be | ebf2f274c49b5a19f02fc4bfd1eb79b31973bd6d | /docs/src/examples/python/mat_completion.py | 05bf3f46c13b3d933c10f4596423da8f16c7f753 | [
"MIT"
] | permissive | cvxgrp/scs | 6b07cfbdd1405ced6615608aa8f03c55cb809928 | f5f054be7dd71ee0d80c4c0eec0df1e9f0ccb123 | refs/heads/master | 2023-09-06T02:12:13.387138 | 2023-04-13T08:51:52 | 2023-04-13T08:51:52 | 14,811,835 | 496 | 131 | MIT | 2023-04-12T22:38:26 | 2013-11-29T23:11:16 | C | UTF-8 | Python | false | false | 2,935 | py | mat_completion.py | import scs
import numpy as np
import scipy as sp
from scipy import sparse
np.random.seed(1)
# The vec function as documented in api/cones
def vec(S):
n = S.shape[0]
S = np.copy(S)
S *= np.sqrt(2)
S[range(n), range(n)] /= np.sqrt(2)
return S[np.triu_indices(n)]
# The mat function as documented in... |
f9a68a8f7aacfc0561d06f0436f7b15c3178be67 | 15f0514701a78e12750f68ba09d68095172493ee | /Python/1180.py | 19222fbd1c668b58d35a5c5a8deb44e396134fed | [
"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 | 581 | py | 1180.py | __________________________________________________________________________________________________
class Solution:
def countLetters(self, S: str) -> int:
n = len(S)
res = 1
cur = 1
for i in range(1, n):
if S[i] == S[i - 1]:
cur += 1
else:
... |
aaa66432391b449effbe9801506cb74423333cde | b32df2ffae14c3ca8083f36f93165c220aef5e44 | /blueoil/networks/lmnet_multi.py | 9614de65ff82ef0c0c8affc9a8e2961f788a398a | [
"Apache-2.0"
] | permissive | blue-oil/blueoil | 213659909b6eac26dd249f878a03ed732b639539 | 0c9160b524b17482d59ae48a0c11384f1d26dccc | refs/heads/master | 2023-01-24T05:10:54.825811 | 2021-04-22T08:46:56 | 2021-04-22T08:46:56 | 153,597,157 | 252 | 111 | Apache-2.0 | 2021-05-10T05:02:45 | 2018-10-18T09:19:36 | Python | UTF-8 | Python | false | false | 4,732 | py | lmnet_multi.py | # -*- coding: utf-8 -*-
# Copyright 2018 The Blueoil 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
#
# Unles... |
32f6fb5dce560d167d1138216f59d118ac55e68f | c2c212ba42ebfa35f3b6122344978bc94ec8fa67 | /tests/test_addapinch_1.py | 7cc722bc157a7f4e3e3b2683c118a9140ccd42e1 | [
"MIT"
] | permissive | hhursev/recipe-scrapers | 0cd6b7db4ef23ca825f2354f5d1ba76076a14813 | 8ced0227b3b16c532fc5ebf3060c99ee0452adab | refs/heads/main | 2023-09-03T07:33:29.684121 | 2023-09-01T21:15:50 | 2023-09-01T21:15:50 | 42,446,168 | 1,276 | 443 | MIT | 2023-09-14T16:34:09 | 2015-09-14T12:05:00 | Python | UTF-8 | Python | false | false | 3,493 | py | test_addapinch_1.py | # mypy: allow-untyped-defs
from recipe_scrapers.addapinch import AddAPinch
from tests import ScraperTest
class TestAddAPinchScraper(ScraperTest):
scraper_class = AddAPinch
test_file_name = "addapinch_1"
def test_host(self):
self.assertEqual("addapinch.com", self.harvester_class.host())
def... |
3546d75b7796cf7b6a24821552dce529209b48fe | e7bf1ff05319acc59bba5af5890041bd82c3e197 | /mne/commands/__init__.py | 813e2309557515566064002ac0c00c0b81ab9d88 | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | mne-tools/mne-python | 7e8d7e945dfbbee6432a4955cf050fa823f2d34b | f44636f00666b8eb869417960926d01690ff4f42 | refs/heads/main | 2023-09-04T03:05:37.402100 | 2023-09-03T14:15:18 | 2023-09-03T14:15:18 | 1,301,584 | 2,437 | 1,418 | BSD-3-Clause | 2023-09-14T19:23:38 | 2011-01-28T03:31:13 | Python | UTF-8 | Python | false | false | 167 | py | __init__.py | """Command-line utilities."""
import lazy_loader as lazy
__getattr__, __dir__, __all__ = lazy.attach(
__name__,
submodules=["utils"],
submod_attrs={},
)
|
6f19d1a6898f24632c01c47ef6cfc6c36bc4be18 | 2247493654c160426c1655281aa7f1dca2bc98dd | /reg_tests/test_files/mixedTetPipe/pipe_tet_catalyst.py | deb8a0b3156f65788de1aaee452a726776da8cac | [
"BSD-2-Clause"
] | permissive | NaluCFD/Nalu | 12999b0e3b76dbeab8fc184f38b65a13b1180bce | 3286651e494894ac5948c41bf985f987d20c2370 | refs/heads/master | 2023-08-10T02:48:04.179859 | 2023-08-02T19:02:46 | 2023-08-02T19:02:46 | 69,712,764 | 138 | 185 | NOASSERTION | 2023-09-14T16:42:19 | 2016-10-01T01:25:20 | C | UTF-8 | Python | false | false | 7,190 | py | pipe_tet_catalyst.py | # script-version: 2.0
# Catalyst state generated using paraview version 5.9.0
#### import the simple module from the paraview
from paraview.simple import *
#### disable automatic camera reset on 'Show'
paraview.simple._DisableFirstRenderCameraReset()
# ----------------------------------------------------------------
... |
918f329e4fd99fb5b9a739d28b581dec78cbe00c | 417e21443179541fcf48fde9407b3fd3f58d4406 | /tests/components/test_dialogue_async.py | 39ee9e50faa01455a56fb3c966846a9c939e3f5c | [
"Apache-2.0"
] | permissive | cisco/mindmeld | 549e23eb6ee1385d2d1729ca532f1265d954276f | bd3547d5c1bd092dbd4a64a90528dfc2e2b3844a | refs/heads/master | 2023-08-28T07:34:09.771290 | 2023-01-31T18:12:37 | 2023-01-31T18:12:37 | 177,415,822 | 671 | 194 | Apache-2.0 | 2023-03-15T06:53:24 | 2019-03-24T13:05:00 | Python | UTF-8 | Python | false | false | 10,165 | py | test_dialogue_async.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_dialogue
----------------------------------
Tests for dialogue module.
These tests apply only when async/await are supported.
"""
# pylint: disable=locally-disabled,redefined-outer-name
import asyncio
import pytest
from mindmeld.components import Conversation,... |
f4f23528a6a479ce55a86d4c4a8523b27d917f80 | d110546d747d7e3865ce5742d5fca09f404623c0 | /salt/modules/aptly.py | a3409abfc3b86e8d2bef3cdb1dc1979fce291b8b | [
"Apache-2.0",
"MIT",
"BSD-2-Clause"
] | permissive | saltstack/salt | 354fc86a7be1f69514b3dd3b2edb9e6f66844c1d | 1ef90cbdc7203f97775edb7666db86a41eb9fc15 | refs/heads/master | 2023-07-19T20:56:20.210556 | 2023-06-29T23:12:28 | 2023-07-19T11:47:47 | 1,390,248 | 11,026 | 6,296 | Apache-2.0 | 2023-09-14T20:45:37 | 2011-02-20T20:16:56 | Python | UTF-8 | Python | false | false | 15,646 | py | aptly.py | """
Aptly Debian repository manager.
.. versionadded:: 2018.3.0
"""
import logging
import os
import re
import salt.utils.json
import salt.utils.path
import salt.utils.stringutils
from salt.exceptions import SaltInvocationError
_DEFAULT_CONFIG_PATH = "/etc/aptly.conf"
log = logging.getLogger(__name__)
# Define the ... |
9da300e25592a8aa33dc19a4dfb7ae4e0da5d5e6 | e3bb1df7fa4c51900dec7e9ddf5295e1a80938bd | /hummingbot/connector/exchange/bitmart/bitmart_constants.py | 5df3f5930da9e5d640f3762aa8b2e8bd9814ce4e | [
"Apache-2.0"
] | permissive | CoinAlpha/hummingbot | 0d1e2bd94de1280748647108c7d7800a09546eb8 | c3f101759ab7e7a2165cd23a3a3e94c90c642a9b | refs/heads/development | 2023-09-01T11:24:43.322137 | 2023-08-31T03:08:06 | 2023-08-31T03:08:06 | 439,330,952 | 135 | 98 | Apache-2.0 | 2023-08-30T13:55:08 | 2021-12-17T12:50:42 | Python | UTF-8 | Python | false | false | 2,473 | py | bitmart_constants.py | # A single source of truth for constant variables related to the exchange
from hummingbot.core.api_throttler.data_types import RateLimit
from hummingbot.core.data_type.in_flight_order import OrderState
EXCHANGE_NAME = "bitmart"
REST_URL = "https://api-cloud.bitmart.com"
WSS_PUBLIC_URL = "wss://ws-manager-compress.bit... |
45e4087d846cbb664e515fa63ab293a3f0fcd58b | 3ca67d69abd4e74b7145b340cdda65532f90053b | /programmers/난이도별/level01.자연수_뒤집어_배열로_만들기/dkdlelk99.py | 5a2c1019a820a1e582cd1672fb8b74f3b0ba71b1 | [] | no_license | DKU-STUDY/Algorithm | 19549516984b52a1c5cd73e1ed1e58f774d6d30e | 6f78efdbefd8eedab24e43d74c7dae7f95c2893b | refs/heads/master | 2023-02-18T06:48:39.309641 | 2023-02-09T07:16:14 | 2023-02-09T07:16:14 | 258,455,710 | 175 | 49 | null | 2023-02-09T07:16:16 | 2020-04-24T08:42:27 | Python | UTF-8 | Python | false | false | 173 | py | dkdlelk99.py | def solution(n):
s = str(n)
answer = [int(i) for i in s]
answer.reverse()
return answer
print(solution(19) == [9, 1])
print(solution(12345) == [5,4,3,2,1])
|
6c99facadb0a784e84c5a1b55fd9d4cbcd406e71 | 2342b8737b9ffeb9715158b8ec74a33c7a4947f6 | /koku/masu/test/external/accounts/labels/aws/test_aws_account_alias.py | e08f5aa955e7c88bab5ec5026a541dd6af845075 | [
"Apache-2.0"
] | permissive | project-koku/koku | 444d8df05da5416c9cee606c42481c99be45f13d | 0416e5216eb1ec4b41c8dd4999adde218b1ab2e1 | refs/heads/main | 2023-08-20T11:30:17.510182 | 2023-08-17T18:27:30 | 2023-08-17T18:27:30 | 126,496,611 | 225 | 94 | Apache-2.0 | 2023-09-14T17:38:08 | 2018-03-23T14:29:23 | Python | UTF-8 | Python | false | false | 5,215 | py | test_aws_account_alias.py | #
# Copyright 2021 Red Hat Inc.
# SPDX-License-Identifier: Apache-2.0
#
"""Test the AWSAccountAlias object."""
from unittest.mock import patch
from masu.database.account_alias_accessor import AccountAliasAccessor
from masu.external.accounts.labels.aws.aws_account_alias import AWSAccountAlias
from masu.test import Masu... |
040beb9f93d4f658ead3c0a08f6b5b5616505918 | e58aaa29a356d19f3b43b614db08e47f387dd0af | /sol0.py | 87096dbc0187c9c589afbba07eb1fbec119b9f89 | [] | no_license | posquit0/PythonChallenge | 100ad89779de24cf3039c95bf63d4c00012c2025 | fa709fc8170d02a6511d5f07f5a7d314b180ff82 | refs/heads/master | 2020-05-19T21:30:40.198767 | 2015-01-27T08:12:45 | 2015-01-27T08:12:45 | 27,856,891 | 742 | 0 | null | null | null | null | UTF-8 | Python | false | false | 109 | py | sol0.py | #!/usr/bin/env python
# encoding: utf-8
def main():
print 2 ** 38
if __name__ == '__main__':
main() |
f998ad18b30d6be88b07d6f6cae7614982c9c950 | 3d063af394b4b55ea49ded7915d0793602015859 | /python/news/newser.py | df6b57d2daf9c6fd584a99fd8756471eb796f5fa | [
"Apache-2.0"
] | permissive | ringgaard/sling | 00edad71195bfe71aa11e2e8dda97109c047e6e5 | a612c5823954552ba422b441a7c7d57c1a5b4fcb | refs/heads/master | 2023-08-07T15:24:10.569228 | 2023-08-02T12:25:44 | 2023-08-02T12:25:44 | 106,742,468 | 141 | 10 | Apache-2.0 | 2020-08-03T13:25:36 | 2017-10-12T20:34:28 | C++ | UTF-8 | Python | false | false | 11,745 | py | newser.py | # Copyright 2021 Ringgaard Research ApS
#
# 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... |
4807344f9749ea54b7e3751be4fb1ec57bc2ab36 | b38247a5d84d8b52ce8363f8dd81629cfbe17f65 | /reagent/test/training/cb/test_deep_represent_linucb.py | 03f61e09238fe1e460d283930b0a584dfbe158db | [
"BSD-3-Clause"
] | permissive | facebookresearch/ReAgent | 7f2b82eaaf7a19e58cc50aacc307d7b001231440 | c5f1a8371a677b4f8fb0882b600bf331eba5259d | refs/heads/main | 2023-09-05T15:56:49.175072 | 2023-08-29T21:48:40 | 2023-08-29T21:48:40 | 98,565,575 | 1,480 | 290 | BSD-3-Clause | 2023-09-12T23:09:30 | 2017-07-27T17:53:21 | Python | UTF-8 | Python | false | false | 2,241 | py | test_deep_represent_linucb.py | """
How to use:
buck test reagent:training_tests -- TestDeepRepresentLinUCB
"""
import unittest
import torch
from reagent.core.types import CBInput
from reagent.gym.policies.policy import Policy
from reagent.gym.policies.samplers.discrete_sampler import GreedyActionSampler
from reagent.models.deep_represent_linu... |
d7f2383b380368828eea0319d9fe7dd9785244c1 | 399fb9306ee201a5d92d75d0981bf5529f86e0cb | /modules/filter_bed.py | a3f0c155b31d5bcdc29c912c48eed2b8a46e4abb | [
"MIT"
] | permissive | hillerlab/TOGA | 221b0bd52c8a62bcc59f84c1ef2145cdf7d0b3bd | 2449d3156413fbad090a8bdf51f03e50ccb9c185 | refs/heads/master | 2023-09-02T22:16:22.654802 | 2023-08-16T11:16:44 | 2023-08-16T11:16:44 | 277,817,661 | 101 | 16 | MIT | 2023-09-09T22:58:48 | 2020-07-07T13:00:49 | Python | UTF-8 | Python | false | false | 7,629 | py | filter_bed.py | #!/usr/bin/env python3
"""Filter bed-12 file.
Remove:
- incomplete annotations
- genes without CDS
"""
import argparse
import sys
import re
from collections import Counter
from version import __version__
try:
from modules.common import die
from modules.common import eprint
except ImportError:
from common ... |
85a157d70989303bf8b1e176439845403d92a876 | 60f51a35a7eef79b6a93b2fb048f6dddeb847a2f | /umap/tests/test_licence.py | fd5e606b4c0175b06c4764adcbcbe1529fae1c63 | [
"WTFPL"
] | permissive | umap-project/umap | ece2b331d18fbaac77210485f69c6c27a2514b7c | 08f1e3f61b60e3ceb05826e389335177d7f442f8 | refs/heads/master | 2023-08-22T12:32:33.516511 | 2023-08-21T15:26:48 | 2023-08-21T15:26:48 | 40,087,362 | 923 | 254 | WTFPL | 2023-09-14T08:54:46 | 2015-08-02T17:37:51 | JavaScript | UTF-8 | Python | false | false | 339 | py | test_licence.py | import pytest
from umap.models import DataLayer, Map
pytestmark = pytest.mark.django_db
def test_licence_delete_should_not_remove_linked_maps(map, licence, datalayer):
assert map.licence == licence
licence.delete()
assert Map.objects.filter(pk=map.pk).exists()
assert DataLayer.objects.filter(pk=data... |
6392e90a96649dbea7b82f791c4b573316c1c5d0 | 0c8ac66ae050e1a98dd8afd7525c9ed74ec5d300 | /permission_handlers/basic.py | fe199aa05895cdf1da8256efec80dc4781812a3d | [] | no_license | TareqMonwer/Django-School-Management | 5b1c8145d04082063bc14fc9db1ce38b4db97a9d | 3d425d300a77ad505089a3a4c0a9dc71cacbe89a | refs/heads/master | 2023-08-19T23:36:34.359488 | 2023-08-13T05:53:42 | 2023-08-13T05:53:42 | 221,053,244 | 409 | 163 | null | 2023-08-13T05:53:44 | 2019-11-11T19:22:28 | JavaScript | UTF-8 | Python | false | false | 790 | py | basic.py | """
Handling permissions for users who are assigned
for basic level actions in the project. (view few data, modify some of their data etc).
UserTypes: Student, Teacher
"""
from django.http import HttpResponse
from django.contrib.auth.decorators import login_required
@login_required
def permission_error(request):
... |
669ba5d3ddcb833f1e01465ccec198b7daee4b80 | 444a9480bce2035565332d4d4654244c0b5cd47b | /research/nlp/tprr/src/reader_downstream.py | b081a38729addd1e06a8d879010ab8225a044073 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-proprietary-license"
] | permissive | mindspore-ai/models | 7ede9c6454e77e995e674628204e1c6e76bd7b27 | eab643f51336dbf7d711f02d27e6516e5affee59 | refs/heads/master | 2023-07-20T01:49:34.614616 | 2023-07-17T11:43:18 | 2023-07-17T11:43:18 | 417,393,380 | 301 | 92 | Apache-2.0 | 2023-05-17T11:22:28 | 2021-10-15T06:38:37 | Python | UTF-8 | Python | false | false | 9,011 | py | reader_downstream.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... |
92f5d22fa3a30392da22f67cc2f039ecfbf221bb | 5a52ccea88f90dd4f1acc2819997fce0dd5ffb7d | /alipay/aop/api/domain/CreditPayCompensateDetailVO.py | afd8764194c85463fdd210c232f199942717b671 | [
"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 | 4,591 | py | CreditPayCompensateDetailVO.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.CreditPayChargePricingVO import CreditPayChargePricingVO
from alipay.aop.api.domain.CreditPayClauseVO import CreditPayClauseVO
from alipay.aop.api.domain.CreditPayIntPricingVO impor... |
cfc3409eb17bac4be849c1c684f5ceec542af3ac | 83b8b30ebb633eecd29ca0a7a20cc43a293c9333 | /tests/basics/list_remove.py | 81b2b3d973c397122e90ca3bac9252eb4e00b16d | [
"MIT",
"GPL-1.0-or-later"
] | permissive | adafruit/circuitpython | 430ec895149d1eb814b505db39b4977a35ee88a7 | 506dca71b0cbb7af749bb51f86b01021db5483b3 | refs/heads/main | 2023-08-21T16:30:46.781068 | 2023-08-20T00:39:44 | 2023-08-20T00:39:44 | 66,166,069 | 3,806 | 1,560 | MIT | 2023-09-14T19:23:51 | 2016-08-20T20:10:40 | C | UTF-8 | Python | false | false | 172 | py | list_remove.py | a = [1, 2, 3]
print(a.remove(2))
print(a)
try:
a.remove(2)
except ValueError:
print("Raised ValueError")
else:
raise AssertionError("Did not raise ValueError")
|
2b0cd646abfbfb23aceb98e50f1666bdd1d5551b | 2bd7a9bd2aa6ea6ef41745af4388d607ade5800e | /pySOT/optimization_problems/branin.py | 19c2a77d4086aea912b91be3043e9b018149dc02 | [
"BSD-3-Clause"
] | permissive | dme65/pySOT | c5071eca7bc35d90d590b517bbabca13cb3e27fd | c8f04fd4ed30d49bb61adb008134741319b512a4 | refs/heads/master | 2021-11-06T02:57:12.418452 | 2021-09-07T15:33:47 | 2021-10-27T17:48:18 | 36,836,292 | 208 | 52 | NOASSERTION | 2021-09-07T17:49:25 | 2015-06-03T23:27:06 | Jupyter Notebook | UTF-8 | Python | false | false | 1,442 | py | branin.py | import numpy as np
from .optimization_problem import OptimizationProblem
class Branin(OptimizationProblem):
"""Branin function
Details: http://www.sfu.ca/~ssurjano/branin.html
Global optimum: :math:`f(-\\pi,12.275)=0.397887`
:ivar dim: Number of dimensions
:ivar lb: Lower variable bounds
:... |
b7e01f205a855e5eeb4ea85f4af524fb5ae336d1 | 725ac5a0bf72829be627bf8dc82fdc51ba0f94ae | /LLM/peft_example/sequence_cls/bert/run_customized_by_oneself_lora.py | 1b553a24d871f8822c59d3359ee69b6f74bfdb0f | [] | no_license | shawroad/NLP_pytorch_project | fa14b6e4a156229765e1d552901d0492d8e1def3 | 1272fed2dc8fef78a9ded0f1ae1644d613a3b57b | refs/heads/master | 2023-06-25T02:37:35.503251 | 2023-06-12T10:57:11 | 2023-06-12T10:57:11 | 229,694,655 | 530 | 104 | null | 2020-12-08T09:21:47 | 2019-12-23T06:54:29 | Python | UTF-8 | Python | false | false | 841 | py | run_customized_by_oneself_lora.py | """
@file : run_customized_by_oneself_lora.py
@author : xiaolu
@email : luxiaonlp@163.com
@time : 2023-04-21
"""
from transformers.models.bert import BertForSequenceClassification, BertTokenizer
from peft import LoraConfig, get_peft_model
model = BertForSequenceClassification.from_pretrained('./mengzi_pretrain')
... |
76a0e7bac988ad24354644980178729153b8f620 | afd2087e80478010d9df66e78280f75e1ff17d45 | /test/test_modules.py | 96b5aa4be07d6727bc74d53b9d96e1331becbf0c | [
"BSD-3-Clause",
"BSD-2-Clause",
"LicenseRef-scancode-secret-labs-2011",
"LicenseRef-scancode-generic-cla",
"BSL-1.0",
"Apache-2.0"
] | permissive | pytorch/pytorch | 7521ac50c47d18b916ae47a6592c4646c2cb69b5 | a6f7dd4707ac116c0f5fb5f44f42429f38d23ab4 | refs/heads/main | 2023-08-03T05:05:02.822937 | 2023-08-03T00:40:33 | 2023-08-03T04:14:52 | 65,600,975 | 77,092 | 24,610 | NOASSERTION | 2023-09-14T21:58:39 | 2016-08-13T05:26:41 | Python | UTF-8 | Python | false | false | 40,743 | py | test_modules.py | # Owner(s): ["module: nn"]
from itertools import chain, product
from inspect import signature, isgenerator
from copy import deepcopy
import tempfile
from operator import methodcaller
import torch
from torch._subclasses.meta_utils import assert_metadata_eq
from torch.testing._internal.common_cuda import with_tf32_off... |
5151b6327ca4e1e032e011216a1b30b39042fd56 | 5e66707ccdea0c000e6e269fce6907ee3cfcdbde | /galaxy/importer/loaders/module.py | 8a0b2aa9e97eb2962f3670aa0db72a7fc27daaae | [
"Apache-2.0"
] | permissive | ansible/galaxy | f629046d579d7cd4e484cdf1e27ad68fe7b170a2 | 6a374cacdf0f04de94486913bba5285e24e178d3 | refs/heads/devel | 2023-09-04T09:21:43.542346 | 2023-08-25T16:58:09 | 2023-08-25T16:58:09 | 24,333,272 | 972 | 419 | Apache-2.0 | 2023-08-25T17:38:20 | 2014-09-22T15:04:57 | Python | UTF-8 | Python | false | false | 3,259 | py | module.py | # (c) 2012-2018, Ansible by Red Hat
#
# This file is part of Ansible Galaxy
#
# Ansible Galaxy is free software: you can redistribute it and/or modify
# it under the terms of the Apache License as published by
# the Apache Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
... |
66868f5e2a055031b6304b2edabe9f3ba42ca5db | a41e1498e3c080f47abd8e8e57157548df3ebbf1 | /scripts/tests/test_inconsistent_namespace_check.py | 64f66e6168efeb54d268e2d411f0e73cea9a1fad | [
"BSD-3-Clause"
] | permissive | pandas-dev/pandas | e7e639454a298bebc272622e66faa9829ea393bb | c7325d7e7e77ecb4a4e57b48bc25265277c75712 | refs/heads/main | 2023-09-01T12:42:07.927176 | 2023-09-01T11:14:10 | 2023-09-01T11:14:10 | 858,127 | 36,166 | 18,728 | BSD-3-Clause | 2023-09-14T21:18:41 | 2010-08-24T01:37:33 | Python | UTF-8 | Python | false | false | 1,976 | py | test_inconsistent_namespace_check.py | import pytest
from scripts.check_for_inconsistent_pandas_namespace import (
check_for_inconsistent_pandas_namespace,
)
BAD_FILE_0 = (
"from pandas import Categorical\n"
"cat_0 = Categorical()\n"
"cat_1 = pd.Categorical()"
)
BAD_FILE_1 = (
"from pandas import Categorical\n"
"cat_0 = pd.Categori... |
a304c1061f05c195ec4d900369ed75f54b8539a6 | 479a9c76b19b84d6cde69305828031cd2531aa56 | /testing/MLDB-986-recording.py | 0567398ab243f066c54ddce87acf1428fe8619c8 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | mldbai/mldb | d36801bd99dd3f82d7557cd0f438b0121f63f22c | 19bc4bc92a41ee8ad4eab0979dffd9c985d95758 | refs/heads/master | 2023-09-03T22:59:11.621839 | 2022-12-30T18:42:24 | 2022-12-30T18:42:24 | 47,634,692 | 701 | 107 | Apache-2.0 | 2023-02-10T23:08:05 | 2015-12-08T16:34:16 | C++ | UTF-8 | Python | false | false | 2,173 | py | MLDB-986-recording.py | #
# MLDB-986-recording.py
# mldb.ai inc, 2015
# This file is part of MLDB. Copyright 2015 mldb.ai inc. All rights reserved.
#
from mldb import mldb
dataset_config = {
'type' : 'sparse.mutable',
'id' : 'example'
}
ds = mldb.create_dataset(dataset_config)
out = mldb.post('/v1/datasets/example/rows', {
... |
0c5b79c3123d324011b82fc0becfc92b94b10eb7 | f9f074c44b67a11d4630b5e1cc15e016e8d73cc8 | /factory-ai-vision/EdgeSolution/modules/CVCaptureModule/streams.py | 1f85b740857d8279d243481f2d68e8fb0fca4619 | [
"MIT"
] | permissive | Azure-Samples/azure-intelligent-edge-patterns | 361694680c7e48d3761c5416175788355b684dcd | 1d2f42cbf9f21157c1e1abf044b26160dfed5b16 | refs/heads/master | 2023-05-26T13:15:47.085088 | 2023-02-28T17:25:53 | 2023-02-28T17:25:53 | 186,706,933 | 193 | 164 | MIT | 2023-02-28T17:25:55 | 2019-05-14T22:02:41 | JavaScript | UTF-8 | Python | false | false | 11,444 | py | streams.py | import base64
import json
import logging
import os
import threading
import time
import cv2
import numpy as np
import requests
logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)
IMG_WIDTH = 960
IMG_HEIGHT = 540
class Stream:
def __init__(self, cam_id, cam_source, fps, endpoint, sender):
... |
1d6b95c055cdf0afe350f8e771c862ace9024289 | c34703aecac2d7f0ceb29428cac5e9d1da4229d1 | /build-binutils.py | 9cfe016e0cb9c2ccb79975cbea7a2857e9a52e6f | [
"Apache-2.0"
] | permissive | ClangBuiltLinux/tc-build | ef342da72c8b7abef399069f9dc838394b4ae82d | 5297456f7d24470e24109023cd632ecf3823a24f | refs/heads/main | 2023-08-18T08:39:09.728513 | 2023-08-07T16:07:47 | 2023-08-07T16:07:47 | 178,067,258 | 192 | 242 | Apache-2.0 | 2023-09-05T17:28:29 | 2019-03-27T20:08:55 | Python | UTF-8 | Python | false | false | 5,765 | py | build-binutils.py | #!/usr/bin/env python3
# pylint: disable=invalid-name
from argparse import ArgumentParser
from pathlib import Path
import time
import tc_build.binutils
import tc_build.utils
LATEST_BINUTILS_RELEASE = (2, 41, 0)
parser = ArgumentParser()
parser.add_argument('-B',
'--binutils-folder',
... |
1f231961cdbc32123c67e2e59c6aeccdf3f5618d | 57d9afb528319a1930812a25eb183f1657f68a07 | /rl_reliability_metrics/analysis/stats.py | 0308fca1b79408cdff994d832ec7311496106399 | [
"Apache-2.0"
] | permissive | google-research/rl-reliability-metrics | 83a94a5e097fc196bf5ef0af4f72561d54897376 | 50da84ba3fd7c3a5aa211f3906811e1a80c8ed59 | refs/heads/master | 2023-08-31T07:52:05.093868 | 2023-07-31T15:05:13 | 2023-07-31T15:06:20 | 226,411,041 | 152 | 22 | Apache-2.0 | 2019-12-13T18:05:37 | 2019-12-06T21:07:45 | Python | UTF-8 | Python | false | false | 22,690 | py | stats.py | # coding=utf-8
# Copyright 2019 The Authors of RL Reliability Metrics.
#
# 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 b... |
fd858ecea4982bc7df0a176fbea8641d37aa7ec5 | 568fa58296378fa129ab3349adf010daa44ed45b | /python/akg/ops/math/equal.py | fe6b8052e52d0a0e4299ea87bf51a345cecb1c7e | [
"Apache-2.0",
"BSD-3-Clause",
"NCSA",
"X11-distribute-modifications-variant",
"Zlib",
"MIT",
"LicenseRef-scancode-unknown-license-reference",
"Unlicense",
"LLVM-exception",
"BSD-2-Clause"
] | permissive | mindspore-ai/akg | 37f471badc66de6a831f1f45ad84344f34d23ef2 | 99f33858d6972741748cbfc9ab0bf9600428fef7 | refs/heads/master | 2023-07-25T23:03:17.672665 | 2023-07-11T07:33:57 | 2023-07-11T07:33:57 | 274,077,856 | 319 | 36 | Apache-2.0 | 2021-12-30T13:43:08 | 2020-06-22T08:09:05 | Python | UTF-8 | Python | false | false | 3,643 | py | equal.py | # Copyright 2020-2022 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agre... |
4ac56dee17371da184f1301ce06a844608bcd11c | 84724b34b3f1e84dc53cbca5f3660590dbc34a9f | /nova/tests/unit/objects/test_trusted_certs.py | 9029845ef34188502958e3bdb881bd75ea4a892f | [
"Apache-2.0"
] | permissive | openstack/nova | 2c24b64e3677595611715bae6dda14edd3f90a24 | 065c5906d2da3e2bb6eeb3a7a15d4cd8d98b35e9 | refs/heads/master | 2023-08-28T15:10:05.126314 | 2023-08-25T20:31:27 | 2023-08-25T20:31:27 | 790,031 | 2,287 | 2,320 | Apache-2.0 | 2023-07-08T02:10:29 | 2010-07-22T02:04:27 | Python | UTF-8 | Python | false | false | 1,622 | py | test_trusted_certs.py | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... |
896f56c4275b5eee62024dfd38433b9d05e54d97 | 308f5596f1c7d382520cfce13ceaa5dff6f4f783 | /third-party/thrift/src/thrift/test/python_capi/capi_test.py | 860be0e991f67abeace3013763fbcd9fb1efc510 | [
"MIT",
"Apache-2.0",
"PHP-3.01",
"Zend-2.0"
] | permissive | facebook/hhvm | 7e200a309a1cad5304621b0516f781c689d07a13 | d8203129dc7e7bf8639a2b99db596baad3d56b46 | refs/heads/master | 2023-09-04T04:44:12.892628 | 2023-09-04T00:43:05 | 2023-09-04T00:43:05 | 455,600 | 10,335 | 2,326 | NOASSERTION | 2023-09-14T21:24:04 | 2010-01-02T01:17:06 | C++ | UTF-8 | Python | false | false | 19,564 | py | capi_test.py | #!/usr/bin/env fbpython
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# 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 requ... |
f4e64a14a9491d135540a9937ebc5bb17a94cd1e | 0f2b08b31fab269c77d4b14240b8746a3ba17d5e | /onnxruntime/python/tools/kernel_explorer/kernels/gemm_softmax_gemm_permute_test.py | 6e1e431842a5607719f6b24b9877f3a10eb76815 | [
"MIT"
] | permissive | microsoft/onnxruntime | f75aa499496f4d0a07ab68ffa589d06f83b7db1d | 5e747071be882efd6b54d7a7421042e68dcd6aff | refs/heads/main | 2023-09-04T03:14:50.888927 | 2023-09-02T07:16:28 | 2023-09-02T07:16:28 | 156,939,672 | 9,912 | 2,451 | MIT | 2023-09-14T21:22:46 | 2018-11-10T02:22:53 | C++ | UTF-8 | Python | false | false | 18,575 | py | gemm_softmax_gemm_permute_test.py | # -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
# --------------------------------------------------------------------------
import os
import sys
from dataclasses import dataclass
from itertools i... |
a1f9a9615c9cc9ffc83fdba30394066302ba15b4 | b50df8a902f4e2c1ecd8667b7b97937da3371caf | /Parte002/ex1073_hackerrank_senior_anant_busqueda_capitan.py | 941b041083d1ef20ed1997b4b980f3310a2edf90 | [] | 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 | 629 | py | ex1073_hackerrank_senior_anant_busqueda_capitan.py | # Ejercicio 1073: HackerRank Ayudar al señor Anant a encontrar al capitán en un grupo de turistas.
# Mr. Anant Asankhya is the manager at the INFINITE hotel. The hotel has an infinite amount of rooms.
# One fine day, a finite number of tourists come to stay at the hotel.
# The tourists consist of:
# → A Captain.
# → ... |
1bf36327deb35273f31ffedd51380cd0f8fbe705 | eb9f655206c43c12b497c667ba56a0d358b6bc3a | /python/testData/debug/stepping/test_step_over_yield.py | 01762a689aff014bd16abb05986c68742ead7df7 | [
"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 | 205 | py | test_step_over_yield.py | def generator2():
for i in range(4):
yield i
def generator():
a = 42 # breakpoint
yield from generator2()
return a
sum = 0
for i in generator():
sum += i
print("The end")
|
bfa747f8b68fd7590b6aa501b2a73a3ab2bffc9b | 71acb7214efd91c0d327f6d8958e1798eadb4401 | /locations/storefinders/geo_me.py | c4a9a61cd1e0d22454fcc3debabb67bb231f69c0 | [
"CC0-1.0",
"MIT"
] | permissive | alltheplaces/alltheplaces | 21b9f8b4ace1352e52ae7b8f8825a930d2cb033e | 1bcbb55cfcf06f2c714465570711f6e83f205c22 | refs/heads/master | 2023-08-30T19:45:35.098658 | 2023-08-30T17:51:54 | 2023-08-30T17:51:54 | 61,166,935 | 453 | 176 | NOASSERTION | 2023-09-14T17:16:40 | 2016-06-15T01:09:18 | Python | UTF-8 | Python | false | false | 5,301 | py | geo_me.py | from scrapy import Spider
from scrapy.http import JsonRequest
from scrapy.signals import spider_idle
from locations.dict_parser import DictParser
from locations.hours import DAYS, DAYS_EN, OpeningHours, day_range
from locations.items import Feature
# To use this store finder, specify key = x where x is the unique
# i... |
9143f3e48531e61c8729050613f15d362b4a7a9d | 7453911cee47edd9414ecfc66d189dc578f7e421 | /src/gevent/tests/test__ssl.py | b80bca0fdd7e9190d61cee80d5aa393e0e3feae4 | [
"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 | 5,597 | py | test__ssl.py | from __future__ import print_function, division, absolute_import
from gevent import monkey
monkey.patch_all()
import os
import socket
import gevent.testing as greentest
# Be careful not to have TestTCP as a bare attribute in this module,
# even aliased, to avoid running duplicate tests
from gevent.tests import test__s... |
c450a8d177c798c77e644b28d1569a94a37fba6f | afbae26b958b5ef20548402a65002dcc8e55b66a | /release/stubs.min/Autodesk/Revit/DB/Analysis_parts/AnalysisDisplayColoredSurfaceSettings.py | fc84b4bfd587f7d40ddb2c1e7480ad8049a15d3c | [
"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 | 3,003 | py | AnalysisDisplayColoredSurfaceSettings.py | class AnalysisDisplayColoredSurfaceSettings(object,IDisposable):
"""
Contains colored surface settings for analysis display style element.
AnalysisDisplayColoredSurfaceSettings()
AnalysisDisplayColoredSurfaceSettings(other: AnalysisDisplayColoredSurfaceSettings)
"""
def Dispose(self):
""" Dispos... |
f922e072359007b62b911852c07bb1f82069e686 | 88efd76316e4184d76a5e0585d95fe734233942c | /yellowbrick/__init__.py | 964afb99569b87bba95c1b0502063e12582fe60b | [
"Apache-2.0"
] | permissive | DistrictDataLabs/yellowbrick | 1ecd9f33e58f0d007569904401c204a6cdeb5661 | f7a8e950bd31452ea2f5d402a1c5d519cd163fd5 | refs/heads/develop | 2023-08-03T12:25:26.511916 | 2023-07-05T18:14:28 | 2023-07-05T18:14:28 | 59,121,694 | 4,242 | 660 | Apache-2.0 | 2023-07-15T17:50:31 | 2016-05-18T14:12:17 | Python | UTF-8 | Python | false | false | 1,826 | py | __init__.py | # yellowbrick
# A suite of visual analysis and diagnostic tools for machine learning.
#
# Author: Rebecca Bilbro
# Author: Benjamin Bengfort
# Created: Wed May 18 10:46:33 2016 -0400
#
# Copyright (C) 2016 The scikit-yb developers
# For license information, see LICENSE.txt
#
# ID: __init__.py [0c5ba04] benjamin@be... |
b28407076c8e05c5bd73cad7b271fe3e0ef34cab | 8ed15d43652dbcab332c78923da416b91b139323 | /python/fedml/core/dp/budget_accountant/rdp_analysis.py | 0d11bdb0580970e0e4501c6ac234de388c184700 | [
"Apache-2.0"
] | permissive | FedML-AI/FedML | 74d144038c9de4a0621eb328d00987abac35e2d1 | b436fbd95cbb62f6c58d2233d7affa0f62cb1817 | refs/heads/master | 2023-08-31T22:15:39.786371 | 2023-08-24T03:41:58 | 2023-08-24T03:41:58 | 281,519,510 | 3,197 | 807 | Apache-2.0 | 2023-09-14T02:14:20 | 2020-07-21T22:41:25 | Python | UTF-8 | Python | false | false | 6,747 | py | rdp_analysis.py | import numpy as np
from typing import List, Union
import math
from scipy import special
"""imported from Opacus: https://github.com/pytorch/opacus"""
def compute_rdp(
*, q: float, noise_multiplier: float, steps: int, orders: Union[List[float], float]
) -> Union[List[float], float]:
r"""Computes Renyi Dif... |
f234f844bbf7fa90d3515220a89c7b552558df3b | 6eb0ba72a576b18873e53b0ff4f86fb581c6c806 | /docker/types/containers.py | a28061383d68a0f8e9bdbbeacbfddd64df0bdd62 | [
"Apache-2.0"
] | permissive | docker/docker-py | 566f9dd69c71ef79fbe2b9dd2745c905e1c613df | c38656dc7894363f32317affecc3e4279e1163f8 | refs/heads/main | 2023-08-31T14:13:48.087317 | 2023-08-21T13:31:57 | 2023-08-21T13:31:57 | 10,247,874 | 6,473 | 1,943 | Apache-2.0 | 2023-09-08T18:24:21 | 2013-05-23T16:15:07 | Python | UTF-8 | Python | false | false | 27,380 | py | containers.py | from .. import errors
from ..utils.utils import (
convert_port_bindings, convert_tmpfs_mounts, convert_volume_binds,
format_environment, format_extra_hosts, normalize_links, parse_bytes,
parse_devices, split_command, version_gte, version_lt,
)
from .base import DictType
from .healthcheck import Healthcheck
... |
cb5a2906f1b64aa4acd03103fd6b32b7d37e5098 | ddddaa700e4642f46a2c1e1e0271a7c8ea62ba0f | /examples/features/hp_constraints_mnist_pytorch/layers.py | 4b2b4fee95cc60de466c6ab9e8e3fd4a83ef8a33 | [
"Apache-2.0"
] | permissive | determined-ai/determined | 9d563cb5ffd074c88ee5edc9bf22ab9c3cb78c7e | 8239b1993f4f44390f4e88901ffaf3b12429b83c | refs/heads/main | 2023-08-21T12:13:36.651298 | 2023-08-21T08:34:16 | 2023-08-21T08:34:16 | 253,846,879 | 2,531 | 330 | Apache-2.0 | 2023-09-14T21:54:17 | 2020-04-07T16:12:29 | Go | UTF-8 | Python | false | false | 568 | py | layers.py | from typing import Any
import torch
from torch import nn
from determined.pytorch import TorchData
class Flatten(nn.Module):
def forward(self, *args: TorchData, **kwargs: Any) -> torch.Tensor:
assert len(args) == 1
x = args[0]
assert isinstance(x, torch.Tensor)
return x.contiguous... |
6253a661461e27a4224b3681c758e110c7315b97 | 111b205910a92e5ed3fdde933ec34d5620725105 | /tests/test_runner.py | 8418582647918f4dfff006b429db18f8d72c6d34 | [
"LicenseRef-scancode-us-govt-public-domain",
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | nasa/CompDam_DGD | 9a24fbe11ca897d784394014e7586eecd803a027 | 1c6832051ca8890fb711853bcead25ccaa9114b7 | refs/heads/master | 2023-07-06T00:50:50.744579 | 2023-06-26T12:04:43 | 2023-06-26T12:04:43 | 63,346,335 | 114 | 61 | NOASSERTION | 2020-07-28T18:39:39 | 2016-07-14T15:05:39 | Fortran | UTF-8 | Python | false | false | 32,688 | py | test_runner.py | #
# Unittest code to run tests on single element models with DGD
#
import os
import shutil
import sys
import abaverify as av
import math
import re
import subprocess
import json
def _versiontuple(v):
return tuple(map(int, (v.split("."))))
def copyMatProps():
'''
Helper for dealing with .props files
... |
e346c63077e783c695e792f8524e42abcd13bb7d | 90d02fee4d02962c9e3d03314cd1597c70bf2f8c | /asdf/_tests/test_array_blocks.py | b95be394b4e7f6d1c18f7f9041a300168795db2f | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | asdf-format/asdf | 08e19f5d603c738b0ae94ccd1a339ff6b8cf4209 | a5b2b2d94f2fc71746f896c6d322439a27dd0bdd | refs/heads/main | 2023-08-17T17:06:20.828932 | 2023-08-08T10:53:27 | 2023-08-08T10:53:27 | 18,112,754 | 328 | 25 | BSD-3-Clause | 2023-09-13T15:57:22 | 2014-03-25T19:00:43 | Python | UTF-8 | Python | false | false | 32,626 | py | test_array_blocks.py | import io
import os
import numpy as np
import pytest
import yaml
from numpy.random import random
from numpy.testing import assert_array_equal
import asdf
from asdf import block, constants, generic_io
RNG = np.random.default_rng(6)
def test_external_block(tmp_path):
tmp_path = str(tmp_path)
my_array = RNG.... |
9d5f7d4554836fe881f9206e18e95bd5e8ee05fe | bffbde8cc7a544f1b5d6c1bc4b84ca607226e134 | /tests/test_single_channel_output.py | 99f5a8447dfd01851a94ba22d09c5fa9732cd6d9 | [
"MIT"
] | permissive | VainF/Torch-Pruning | c006d274e69c5c592ca1e302a70f6603504b8e07 | e2478a72022c96af3b9053da359a726939e1adaf | refs/heads/master | 2023-09-05T02:38:36.804176 | 2023-09-04T11:26:29 | 2023-09-04T11:26:29 | 228,203,350 | 1,606 | 231 | MIT | 2023-09-06T16:45:28 | 2019-12-15T15:07:24 | Python | UTF-8 | Python | false | false | 974 | py | test_single_channel_output.py | import torch
from torch import nn
import torch.nn.functional as F
import torch_pruning as tp
class Model(nn.Module):
def __init__(self):
super().__init__()
self.conv1 = nn.Conv2d(3, 16, 3, stride=1, padding=1)
self.bn1 = nn.BatchNorm2d(16)
self.conv2 = nn.Conv2d(16, 64, 2, stride=2)... |
e232af2b2e686016e79e8bf89123c8bb9208e925 | f1f21ba2236da38a49a8185ce33b3ce4a4424c1d | /pahelix/model_zoo/gem_model.py | ff4e213d30493fdd29585201b2486bbb9e31f591 | [
"Apache-2.0"
] | permissive | PaddlePaddle/PaddleHelix | 75a07c2f14475e56e72f4573b2cf82a91d1cbfda | e6ab0261eb719c21806bbadfd94001ecfe27de45 | refs/heads/dev | 2023-08-05T03:34:55.009355 | 2023-08-01T09:30:44 | 2023-08-01T09:30:44 | 314,704,349 | 771 | 197 | Apache-2.0 | 2023-08-01T09:15:07 | 2020-11-21T00:53:39 | Python | UTF-8 | Python | false | false | 12,170 | py | gem_model.py | # Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... |
cd62c0cf60d1a2a866714dc9616443fb3a13e1c1 | 96dcea595e7c16cec07b3f649afd65f3660a0bad | /tests/components/wled/test_coordinator.py | 89817fb8569bacea9aea2c66e54aec8edca71aab | [
"Apache-2.0"
] | permissive | home-assistant/core | 3455eac2e9d925c92d30178643b1aaccf3a6484f | 80caeafcb5b6e2f9da192d0ea6dd1a5b8244b743 | refs/heads/dev | 2023-08-31T15:41:06.299469 | 2023-08-31T14:50:53 | 2023-08-31T14:50:53 | 12,888,993 | 35,501 | 20,617 | Apache-2.0 | 2023-09-14T21:50:15 | 2013-09-17T07:29:48 | Python | UTF-8 | Python | false | false | 6,465 | py | test_coordinator.py | """Tests for the coordinator of the WLED integration."""
import asyncio
from collections.abc import Callable
from copy import deepcopy
from unittest.mock import MagicMock
import pytest
from wled import (
Device as WLEDDevice,
WLEDConnectionClosedError,
WLEDConnectionError,
WLEDError,
)
from homeassist... |
7daf98dc4b9804f8d45cf8215fedb60b538d7e4c | c4039d6c964407d74d8625d340d90586a611c3c7 | /models/dcgan.py | 291e45197dce932866094b90aac6f9add3ec2081 | [
"MIT"
] | permissive | Zeleni9/pytorch-wgan | 2874878a1c5947bfd94e83838f2f6c6f7394804e | d5b9b4db573f2efbfa56e115d46b28d1f0465312 | refs/heads/master | 2023-04-06T03:55:31.771605 | 2022-01-06T14:30:50 | 2022-01-06T14:30:50 | 122,645,948 | 612 | 155 | MIT | 2023-03-25T01:34:09 | 2018-02-23T16:32:34 | Python | UTF-8 | Python | false | false | 13,902 | py | dcgan.py | import torch
import torch.nn as nn
from torch.autograd import Variable
import time as t
import os
from utils.tensorboard_logger import Logger
from utils.inception_score import get_inception_score
from itertools import chain
from torchvision import utils
class Generator(torch.nn.Module):
def __init__(self, channels... |
5e3a66f39a4a76a4e131b403d4b14fcabb4a513f | 2a1b8a671aceda6bc446f8ce26400aa84fa444a6 | /Packs/ShiftManagement/Scripts/AssignAnalystToIncidentOOO/AssignAnalystToIncidentOOO_test.py | e98e9fd82f45006beda5ceca9b4e708ed23a5fce | [
"MIT"
] | permissive | demisto/content | 6d4722d46f0ff0beea2748e9f7de585bf91a78b4 | 890def5a0e0ae8d6eaa538148249ddbc851dbb6b | refs/heads/master | 2023-09-04T00:02:25.618032 | 2023-09-03T21:56:22 | 2023-09-03T21:56:22 | 60,525,392 | 1,023 | 1,921 | MIT | 2023-09-14T20:55:24 | 2016-06-06T12:17:02 | Python | UTF-8 | Python | false | false | 1,582 | py | AssignAnalystToIncidentOOO_test.py | import io
import json
import pytest
def util_load_json(path):
with io.open(path, mode='r', encoding='utf-8') as f:
return json.loads(f.read())
user_data = util_load_json('test_data/user_data.json')
away_user_data = util_load_json('test_data/away_user_data.json')
ooo_user_data = util_load_json('test_dat... |
e8baa531b5c5ef9298113218ddf165b56fcc129c | fa1ad2e2ac7e376fc7cb3b3a6e1bb88eed3e80be | /govern/data-quality/soda-core/soda/core/tests/data_source/test_attributes.py | 4f2d34a7afd78dc6963dea8b8c8aa255f5d37c19 | [
"Apache-2.0",
"LicenseRef-scancode-free-unknown",
"BSD-3-Clause",
"MIT"
] | 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 | 5,942 | py | test_attributes.py | from helpers.common_test_tables import customers_test_table
from helpers.data_source_fixture import DataSourceFixture
mock_schema = [
{"type": "number", "name": "priority"},
{"type": "singleSelect", "allowedValues": ["sales", "marketing"], "name": "department"},
{"type": "multiSelect", "allowedValues": ["g... |
ebe292547f6ce78ca6601c0dc50388d5961ec103 | 01891a781b63c0ca4413e1bd9bbe1e4dee9d081f | /dedupe/serializer.py | 7de0177e906053d001cf2b73fed9dd2d72d1b1e5 | [
"MIT"
] | permissive | dedupeio/dedupe | f933fa07cadb62c19c478cd801c8a3ff22f7563e | f72d4a161bfc66c9e1de9b39e2bd7e01bcad3c49 | refs/heads/main | 2023-08-23T15:18:36.902429 | 2023-02-17T16:34:52 | 2023-02-17T16:34:52 | 4,087,724 | 2,702 | 407 | MIT | 2023-05-29T02:57:35 | 2012-04-20T14:57:36 | Python | UTF-8 | Python | false | false | 2,463 | py | serializer.py | import json
from typing import Any, Iterator, TextIO
from dedupe._typing import TrainingData
def _from_json(json_object: Any) -> Any:
if "__class__" in json_object:
if json_object["__class__"] == "frozenset":
return frozenset(json_object["__value__"])
if json_object["__class__"] == "t... |
dd0049f3f86bf02ced9311a9a59e758cf02631b5 | def11205c653744bce1e48aac6105ad460f15b6c | /reddit.py | 6344de6b7d5d959e5f344387164761ed308353d4 | [
"LicenseRef-scancode-public-domain"
] | permissive | snarfed/bridgy | 1b37aa77c22a62f3d5c0f6fc9d271ed5db30ba69 | 1d1fc440a504acb53333121215f00da0ce9af466 | refs/heads/main | 2023-08-31T04:56:05.500157 | 2023-08-22T22:14:10 | 2023-08-22T22:18:33 | 2,968,000 | 580 | 66 | null | 2023-09-11T22:50:13 | 2011-12-12T22:33:45 | Python | UTF-8 | Python | false | false | 3,311 | py | reddit.py | """Reddit source code and datastore model classes."""
from granary import reddit as gr_reddit
from granary import source as gr_source
from oauth_dropins import reddit as oauth_reddit
from oauth_dropins.webutil.util import json_dumps, json_loads
from prawcore.exceptions import NotFound
from flask_app import app
import ... |
01d64963295741313317af0b8c71662199aa617d | 010279e2ba272d09e9d2c4e903722e5faba2cf7a | /contrib/tools/python3/src/Lib/email/contentmanager.py | b4f5830beada4a2bb7353a4d6672d2397a7fb499 | [
"LicenseRef-scancode-python-cwi",
"LicenseRef-scancode-other-copyleft",
"Python-2.0",
"BSD-3-Clause",
"0BSD",
"GPL-1.0-or-later",
"LicenseRef-scancode-free-unknown",
"Apache-2.0"
] | permissive | catboost/catboost | 854c1a1f439a96f1ae6b48e16644be20aa04dba2 | f5042e35b945aded77b23470ead62d7eacefde92 | refs/heads/master | 2023-09-01T12:14:14.174108 | 2023-09-01T10:01:01 | 2023-09-01T10:22:12 | 97,556,265 | 8,012 | 1,425 | Apache-2.0 | 2023-09-11T03:32:32 | 2017-07-18T05:29:04 | Python | UTF-8 | Python | false | false | 10,588 | py | contentmanager.py | import binascii
import email.charset
import email.message
import email.errors
from email import quoprimime
class ContentManager:
def __init__(self):
self.get_handlers = {}
self.set_handlers = {}
def add_get_handler(self, key, handler):
self.get_handlers[key] = handler
def get_con... |
8793136b1ddd8b7d6f05afe80a9341a707628773 | bf1d4cf83e663e102cbaf77681aeee27f0fd57b1 | /nlpaug/model/spectrogram/frequency_masking.py | 2f703ddb2017945b220bb7460d45add22784fb94 | [
"MIT"
] | permissive | makcedward/nlpaug | 1616ed30de030d7ec8ef6baf0d3dcc91cc30fed7 | 23800cbb9632c7fc8c4a88d46f9c4ecf68a96299 | refs/heads/master | 2023-06-25T01:07:59.107131 | 2022-07-07T05:16:43 | 2022-07-07T05:16:43 | 176,858,880 | 4,128 | 476 | MIT | 2023-03-04T04:13:01 | 2019-03-21T03:00:17 | Jupyter Notebook | UTF-8 | Python | false | false | 769 | py | frequency_masking.py | import numpy as np
from nlpaug.model.spectrogram import Spectrogram
class FrequencyMasking(Spectrogram):
def __init__(self):
super().__init__()
def manipulate(self, data, f, f0, time_start, time_end):
"""
https://arxiv.org/pdf/1904.08779.pdf, https://arxiv.org/pdf/2001.01401.pdf
... |
7eb2d2a89d55635cf4cbc6416bb4598e640b8607 | 704976ea552111c6a5af9cd7cb62b9d9abaf3996 | /pypy/module/test_lib_pypy/cffi_tests/cffi1/test_zdist.py | 1bafecc4ccb1b59ec804af11d7374a7f4e93f773 | [
"BSD-3-Clause"
] | permissive | mesalock-linux/mesapy | 4f02c5819ce7f2f6e249d34840f1aa097577645d | ed546d59a21b36feb93e2309d5c6b75aa0ad95c9 | refs/heads/mesapy2.7 | 2023-08-16T21:33:02.239581 | 2019-08-13T10:29:43 | 2019-08-13T18:06:45 | 136,080,721 | 396 | 33 | NOASSERTION | 2020-04-01T03:05:18 | 2018-06-04T20:45:17 | Python | UTF-8 | Python | false | false | 16,858 | py | test_zdist.py | # Generated by pypy/tool/import_cffi.py
import sys, os, py
import subprocess
import cffi
from pypy.module.test_lib_pypy.cffi_tests.udir import udir
def chdir_to_tmp(f):
f.chdir_to_tmp = True
return f
def from_outside(f):
f.chdir_to_tmp = False
return f
class TestDist(object):
def setup_method(... |
fe44bbe6a98264149567597810641a473aaa5a61 | 279f415dd1e06c594c6c87deda57e201c73c4542 | /espnet2/spk/loss/aamsoftmax.py | 4005fa03e8511b7d83d57111195a2ef1a2921a76 | [
"Apache-2.0"
] | permissive | espnet/espnet | f7ba47271c1a6b1ed606dbbfb04a7f14220bb585 | bcd20948db7846ee523443ef9fd78c7a1248c95e | refs/heads/master | 2023-08-28T23:43:34.238336 | 2023-08-23T02:51:39 | 2023-08-23T02:51:39 | 114,054,873 | 7,242 | 2,244 | Apache-2.0 | 2023-09-14T08:01:11 | 2017-12-13T00:45:11 | Python | UTF-8 | Python | false | false | 2,540 | py | aamsoftmax.py | #! /usr/bin/python
# -*- encoding: utf-8 -*-
# code from https://github.com/clovaai/voxceleb_trainer/blob/master/loss/aamsoftmax.py
# Adapted from https://github.com/wujiyang/Face_Pytorch (Apache License)
import math
import torch
import torch.nn as nn
import torch.nn.functional as F
from espnet2.spk.loss.abs_loss im... |
657051a614740e33e1994069e289d23920aa6c0f | 08ea46c0a9fb71ef222cf6afa2e9094f5663dcfb | /tests/test_output_parser.py | f593981442883cfd40c0dec45051a22089414a84 | [
"BSD-3-Clause-Clear"
] | permissive | griffithlab/pVACtools | e358919eee76100f79dbe8d40d02b3fce8b227ac | 3317d2c18e82edb5ea183ae09820beb68c39d256 | refs/heads/master | 2023-08-09T15:42:06.725426 | 2023-08-09T14:28:44 | 2023-08-09T14:28:44 | 102,625,109 | 124 | 64 | BSD-3-Clause-Clear | 2023-09-08T14:17:22 | 2017-09-06T15:23:04 | Python | UTF-8 | Python | false | false | 23,567 | py | test_output_parser.py | import unittest
import os
import sys
import tempfile
import py_compile
from pvactools.lib.output_parser import DefaultOutputParser, UnmatchedSequencesOutputParser
from tests.utils import *
class OutputParserTests(unittest.TestCase):
@classmethod
def setUp(cls):
executable_dir = os.path.join(pvactoo... |
1ccc2f440ba95e62e33e6e43527359e1ccc0fc51 | be77982d0795d3b8517dcc9f87aea794ebb3b881 | /easyVmaf.py | c406a0bb63408d796f2e006c9b253af0b70c1a77 | [
"MIT"
] | permissive | gdavila/easyVmaf | a8df3f95e4bcdddd29374938a4f5b47a77bda9ba | 6885079484633d54738506aa86383c1d2bdee429 | refs/heads/master | 2023-05-27T10:14:53.841217 | 2023-05-11T18:44:46 | 2023-05-11T18:44:46 | 243,396,674 | 139 | 30 | MIT | 2023-05-11T18:44:48 | 2020-02-27T00:39:32 | Python | UTF-8 | Python | false | false | 9,824 | py | easyVmaf.py | """
MIT License
Copyright (c) 2020 Gabriel Davila - gdavila.revelo@gmail.com
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 the Software without restriction, including without limitation the rights
to use, c... |
4eda7536a0b5c56f3d6b24fdc8538faa7be8d5f1 | 8d44e796eaf0c8e11bbc2a27ef093e97a25b6f4a | /haystack/nodes/prompt/shapers.py | 265f5712722ee847551975ca964b4ad836523a8b | [
"Apache-2.0"
] | permissive | deepset-ai/haystack | caa5287051d1771395ea624b58097000825bad81 | 5f1256ac7e5734c2ea481e72cb7e02c34baf8c43 | refs/heads/main | 2023-09-01T02:41:23.490526 | 2023-08-31T15:33:12 | 2023-08-31T15:33:12 | 221,654,678 | 10,599 | 1,558 | Apache-2.0 | 2023-09-14T17:09:42 | 2019-11-14T09:05:28 | Python | UTF-8 | Python | false | false | 2,992 | py | shapers.py | from typing import Optional, List, Union
from haystack.schema import Answer, Document
from haystack.nodes.other.shaper import ( # pylint: disable=unused-import
Shaper,
current_datetime, # used as shaping function
join_documents_to_string as join, # used as shaping function
format_document,
form... |
a493c1613ccc983a6b55d488b4acdb9120f3c01c | 503bfe863ae9e92bf940a5e8baa57c0de44f4da6 | /src/silx/gui/plot/PlotInteraction.py | fe139b48ce98a91d9014ae55682efaebe609174f | [
"MIT",
"LicenseRef-scancode-public-domain-disclaimer",
"CC0-1.0",
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause",
"LicenseRef-scancode-public-domain"
] | permissive | silx-kit/silx | 58105c0ed9cd02c75543c0c67a027471ca87922b | 5e33cb69afd2a8b1cfe3183282acdd8b34c1a74f | refs/heads/main | 2023-08-24T14:33:49.732794 | 2023-07-25T07:44:02 | 2023-07-25T07:44:02 | 43,291,718 | 120 | 78 | MIT | 2023-09-14T13:07:11 | 2015-09-28T09:23:13 | Python | UTF-8 | Python | false | false | 64,970 | py | PlotInteraction.py | # /*##########################################################################
#
# Copyright (c) 2014-2023 European Synchrotron Radiation Facility
#
# 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 the Sof... |
9adcabdda26e771f2b8c1826a1824f1a5ba076ff | ffdc77394c5b5532b243cf3c33bd584cbdc65cb7 | /tests/ut/python/graph_syntax/operators/test_mod.py | 1da0b385cc9e977fb77258a55395c20199583929 | [
"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 | 2,566 | py | test_mod.py | # Copyright 2020 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... |
6c8957e855e8d401144550732085389a4163bab8 | 479a9c76b19b84d6cde69305828031cd2531aa56 | /testing/MLDB-1012_nested_function_calls.py | 79ae87f0789dd9c21875a7dcbbe4e9142ef44a39 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | mldbai/mldb | d36801bd99dd3f82d7557cd0f438b0121f63f22c | 19bc4bc92a41ee8ad4eab0979dffd9c985d95758 | refs/heads/master | 2023-09-03T22:59:11.621839 | 2022-12-30T18:42:24 | 2022-12-30T18:42:24 | 47,634,692 | 701 | 107 | Apache-2.0 | 2023-02-10T23:08:05 | 2015-12-08T16:34:16 | C++ | UTF-8 | Python | false | false | 2,201 | py | MLDB-1012_nested_function_calls.py | #
# MLDB-1012_nested_function_calls.py
# mldb.ai inc, 2015
# This file is part of MLDB. Copyright 2016 mldb.ai inc. All rights reserved.
#
from mldb import mldb, ResponseException
conf = {
"type": "sql.expression",
"params": {
"expression": "input.x*2 as x2, input.y*2 as y2"
}
}
mldb.put("/v1/func... |
cd072675eb540206ac1a3fa7d50b360c978470ac | 8112d133bcb70b03a35b792caf8d682ba4ab22cd | /doc/book/fstar_pygments.py | d299ac6d1439420d736d9affed19a896d418b97a | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | FStarLang/FStar | 0d006096d33040c407ca747c5262abf91f77df1a | fc4726d1e04868a6a12bfc6927c0b87039e0ff8c | refs/heads/master | 2023-08-18T18:24:53.271431 | 2023-08-18T16:23:24 | 2023-08-18T16:23:24 | 18,411,972 | 2,535 | 320 | Apache-2.0 | 2023-09-03T17:11:50 | 2014-04-03T17:32:49 | F* | UTF-8 | Python | false | false | 2,492 | py | fstar_pygments.py | from pygments.lexer import RegexLexer, words
from pygments.token import *
# very rough lexer; not 100% precise
class CustomLexer(RegexLexer):
name = 'FStar'
aliases = ['fstar']
filenames = ['*.fst', '*.fsti']
keywords = (
'attributes' ,
'noeq' ,
'unopteq' ,
... |
dce6ef15cfe42176d52cf6add19b33175cdfcb62 | 420e7db695f82c7cf9d29735df956fa86bc0f14f | /layers/raw_layer.py | e27910b8998d114933239249dcc0bda05f3fd587 | [
"BSD-3-Clause"
] | permissive | Kkevsterrr/geneva | bf929e3056dc6215bca079f1fd587866907a1cd5 | 6b091060ed0946b98a2ff9196dfbf93d85cbb28a | refs/heads/master | 2023-08-23T22:30:49.750259 | 2023-05-18T21:24:14 | 2023-05-18T21:24:14 | 221,001,148 | 1,771 | 168 | BSD-3-Clause | 2023-05-26T10:04:58 | 2019-11-11T14:37:39 | Python | UTF-8 | Python | false | false | 189 | py | raw_layer.py | from layers.layer import Layer
class RawLayer(Layer):
"""
Defines an interface for the scapy Raw layer.
"""
name = "Raw"
protocol = Raw
_fields = []
fields = [] |
f5d10ae9894d3b9a0028af9992d0170e975c5524 | a06812b0e10830c75abb05d16c1993750d75a403 | /qgis/examples/quick_api_interactive_proper_testing/quick_api/gui/quick_api_dialog.py | 261c49cea7a42f3f37a54f820f119d34a02f3866 | [
"LicenseRef-scancode-zeusbench",
"LicenseRef-scancode-rsa-1990",
"RSA-MD",
"Spencer-94",
"BSD-3-Clause",
"LicenseRef-scancode-rsa-md4",
"HPND-sell-variant",
"metamail",
"Apache-2.0",
"Beerware",
"LicenseRef-scancode-other-permissive"
] | permissive | gis-ops/tutorials | dfa8130d9f733422f85ca0b03beddca5541f2a52 | 92cd7c064040ba2febde36d5c2defb96d10bae21 | refs/heads/master | 2023-05-10T20:01:36.657762 | 2023-04-25T11:40:27 | 2023-04-25T11:40:27 | 159,300,990 | 138 | 67 | Apache-2.0 | 2023-05-01T21:34:35 | 2018-11-27T08:25:51 | Jupyter Notebook | UTF-8 | Python | false | false | 6,388 | py | quick_api_dialog.py | # -*- coding: utf-8 -*-
"""
/***************************************************************************
QuickApiDialog
A QGIS plugin
Query OpenElevation API
Generated by Plugin Builder: http://g-sherman.github.io/Qgis-Plugin-Builder/
-------------------
... |
29102259305b5d3a5981e00ca711cbcb46a04858 | ea902879e3755c84b1a4961f07fe060d98374a57 | /dingding/main.py | f58906d6f62f7c51b509d4ed9f2bad12f6af0f6c | [] | no_license | zhouwei713/data_analysis | 7a197319cd4175df3646e53201d05551edce3f75 | 5e3d865ee74379665633e8e80a98ae4e193d3a9f | refs/heads/master | 2022-02-12T03:03:22.601292 | 2022-01-26T14:32:30 | 2022-01-26T14:32:30 | 168,663,096 | 392 | 247 | null | null | null | null | UTF-8 | Python | false | false | 3,418 | py | main.py | # encoding: utf-8
"""
@version: ??
@author: Andy
@file: main.py
@time: 20/2/19 12:58
"""
from selenium import webdriver
from selenium.webdriver import ChromeOptions
import time
import os
options = ChromeOptions()
# options.add_argument(r"--user-data-dir=C:\Users\wei.zhou\AppData\Local\Google\Chrome\User Data\Defa... |
9a648e975819ea36fab7b9dd6a269736a4e7c588 | 16fcf54e753704a08888a235419ef19fcb49b793 | /Utils/GitThread.py | 0088b11243749de0de57c09a9278ec277e932d50 | [] | no_license | PyQt5/PyQtClient | 08ca93f7af79c201fbb3d232a6063741f900a019 | f86e4e5038f9d9b1626c0a25f3aa59d33c3e4393 | refs/heads/master | 2022-09-03T21:43:42.371070 | 2022-09-01T19:20:44 | 2022-09-01T19:20:44 | 120,252,826 | 285 | 97 | null | 2019-02-02T09:53:59 | 2018-02-05T04:00:37 | Python | UTF-8 | Python | false | false | 16,066 | py | GitThread.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Created on 2019年1月5日
@author: Irony
@site: https://pyqt.site https://github.com/PyQt5
@email: 892768447@qq.com
@file: Utils.GitThread
@description: Git操作线程
"""
import os
import re
import shutil
import stat
from contextlib import closing
from pathlib imp... |
da619caa3edf5658070ebc1e663d5f7f84db166b | 6416b746ee71d897789eab1e450000831674dbd0 | /src/otx/algorithms/common/adapters/mmcv/pipelines/transforms/augments.py | f8b2ed09e67cfa0f6611eadf1bde7318acdcf992 | [
"Apache-2.0"
] | permissive | openvinotoolkit/training_extensions | c921f83ad52311af96ff45ae0b88d0aecddd855b | 80454808b38727e358e8b880043eeac0f18152fb | refs/heads/develop | 2023-08-31T06:29:07.229339 | 2023-08-31T01:57:26 | 2023-08-31T01:57:26 | 154,843,614 | 397 | 230 | Apache-2.0 | 2023-09-14T06:17:01 | 2018-10-26T14:02:29 | Python | UTF-8 | Python | false | false | 8,725 | py | augments.py | """Module for defining Augments and CythonArguments class used for classification task."""
# Copyright (C) 2022 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
import random
from typing import Union
from numpy import ndarray as CvImage
from PIL import Image, ImageEnhance, ImageOps
from PIL.Image import Imag... |
a26d61b85737015cdc14feb3930060e1ae1065be | 34364ec19543d70cf357e0675fd3593e7e95b7e4 | /xarm/x3/xarm.py | 9c1b5be91e4405f1a41c2b1e016eabfaa6058cc0 | [
"BSD-3-Clause"
] | permissive | xArm-Developer/xArm-Python-SDK | d4775a72d57376989ec04dffbbf08ca1a9b30c1b | 8fd5fb8df1476ba210edca4e5563b7cdb1741bcf | refs/heads/master | 2023-07-20T04:05:22.307666 | 2023-07-06T03:14:19 | 2023-07-06T03:14:19 | 158,533,616 | 125 | 76 | BSD-3-Clause | 2022-08-17T02:48:56 | 2018-11-21T10:51:39 | Python | UTF-8 | Python | false | false | 94,067 | py | xarm.py | #!/usr/bin/env python3
# Software License Agreement (BSD License)
#
# Copyright (c) 2020, UFACTORY, Inc.
# All rights reserved.
#
# Author: Vinman <vinman.wen@ufactory.cc> <vinman.cub@gmail.com>
import os
import math
import time
import uuid
import warnings
from collections.abc import Iterable
from ..core.config.x_conf... |
e8b9e44c51ebf0d968dd705aca453b0c9e600791 | f3dfbfb9c128ac5bc7c0098f7eff91a2119d6183 | /src/biotite/application/localapp.py | acfd1bd8bdc39339b216f24ec963280492599a49 | [
"BSD-3-Clause"
] | permissive | biotite-dev/biotite | 2c2afafc6c4dad51af023c50c156c8f19a20154d | 67d801683bfe79087a8e67e82de7333e79c827bb | refs/heads/master | 2023-09-06T00:03:24.761607 | 2023-09-03T14:28:27 | 2023-09-03T14:28:27 | 98,795,444 | 463 | 80 | BSD-3-Clause | 2023-09-09T16:47:12 | 2017-07-30T12:18:33 | Python | UTF-8 | Python | false | false | 9,450 | py | localapp.py | # This source code is part of the Biotite package and is distributed
# under the 3-Clause BSD License. Please see 'LICENSE.rst' for further
# information.
__name__ = "biotite.application"
__author__ = "Patrick Kunzmann"
__all__ = ["LocalApp"]
import abc
import copy
from os import chdir, getcwd, remove
from .applicati... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.