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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
90f1ae6deea54b3090a45b70722f36daafde01fd | 96e98f67a75959fe3e899960f604f0d8de5cb13b | /vcap/vcap/loading/import_hacks.py | 31ab131b766baf87e72ba2ae79d1abb00803ecd5 | [
"BSD-3-Clause"
] | permissive | opencv/open_vision_capsules | 6c47aece3584021a805068c2acdd8e03bc0b99eb | 7412902fed8f91c9c82bd42b0180e07673c38bf1 | refs/heads/master | 2023-06-10T13:00:49.350387 | 2023-04-12T05:01:05 | 2023-04-12T05:01:05 | 234,445,543 | 124 | 50 | NOASSERTION | 2022-08-26T17:40:09 | 2020-01-17T01:29:06 | Python | UTF-8 | Python | false | false | 5,599 | py | import_hacks.py | """Code which changes the way Python processes imports. Allows for capsules to
import Python modules and packages within the capsule itself.
"""
from importlib.abc import Loader, MetaPathFinder
from importlib.machinery import ModuleSpec
import os
from pathlib import Path
from zipfile import ZipFile
class ZipFinder(Me... |
e0ad9625f56d556fa0f5d4f0915c11d7ec36a398 | b26c41926fa3a7c2c061132d80e91a2750f2f468 | /tensorflow_probability/python/experimental/distribute/diagonal_mass_matrix_adaptation_test.py | a91e2f98b0e3968f463e80a001d1a2fc2313db3a | [
"Apache-2.0"
] | permissive | tensorflow/probability | 22e679a4a883e408f8ef237cda56e3e3dfa42b17 | 42a64ba0d9e0973b1707fcd9b8bd8d14b2d4e3e5 | refs/heads/main | 2023-09-04T02:06:08.174935 | 2023-08-31T20:30:00 | 2023-08-31T20:31:33 | 108,053,674 | 4,055 | 1,269 | Apache-2.0 | 2023-09-13T21:49:49 | 2017-10-23T23:50:54 | Jupyter Notebook | UTF-8 | Python | false | false | 6,910 | py | diagonal_mass_matrix_adaptation_test.py | # Copyright 2021 The TensorFlow Probability 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 applicable law o... |
d279d3799494c406876c5d1602d48d799c536dae | 80a3d98eae1d755d6914b5cbde63fd10f5cc2046 | /autox/autox_competition/feature_selection/grn_feature_selection.py | ba9d0eeeb5483653f51e843e6015f8e44d7511b8 | [
"Apache-2.0"
] | permissive | 4paradigm/AutoX | efda57b51b586209e1d58e1dab7d0797083aadc5 | 7eab9f4744329a225ff01bb5ec360c4662e1e52e | refs/heads/master | 2023-05-24T00:53:37.109036 | 2023-02-14T14:21:50 | 2023-02-14T14:21:50 | 388,068,949 | 752 | 162 | Apache-2.0 | 2022-07-12T08:28:09 | 2021-07-21T09:45:41 | Jupyter Notebook | UTF-8 | Python | false | false | 19,378 | py | grn_feature_selection.py | import warnings
warnings.simplefilter('default')
import numpy as np
import pandas as pd
from sklearn.preprocessing import MinMaxScaler
from sklearn.model_selection import KFold
import torch
import torch.nn as nn
import torch.optim as optim
import torch.nn.functional as F
from torch.utils.data import Dataset, DataLoader... |
3387608f4849ff225141adeb801b9605a781f3be | bba02b96608e53bed25eae8fcc30334f238b6a6b | /gdown/exceptions.py | 12104ee37b689123656239965cf38137bbb82ed5 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | wkentaro/gdown | de1a3ce1058b3457ed4a3087b70cf620d85e9c5a | 5c7507f02718048899b85d4010a6ed93316cbf27 | refs/heads/main | 2023-07-25T11:25:03.088818 | 2023-04-19T19:39:39 | 2023-04-22T06:02:17 | 44,421,756 | 3,266 | 319 | MIT | 2023-09-12T20:53:04 | 2015-10-17T03:01:23 | Python | UTF-8 | Python | false | false | 110 | py | exceptions.py | class FileURLRetrievalError(Exception):
pass
class FolderContentsMaximumLimitError(Exception):
pass
|
cf2b247b5bf9eb63ec2f4d995bb18bcb9a6b37f8 | b8441dc1987be9e64fa3081d456b2a3060ec44d1 | /mars/tensor/statistics/quantile.py | 6a1f0d6bcf4cd40944daf52c234879b85d7fa213 | [
"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 | 17,579 | py | quantile.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... |
a7780c1a3d58814f6ae10744c67788f9065fea77 | 40195e6f86bf8620850f0c56e98eae5693e88277 | /coremltools/test/blob/test_weights.py | 72bb061d1e2c460f259746dc16273bf6ca52cbc0 | [
"MIT",
"BSD-3-Clause"
] | permissive | apple/coremltools | 009dfa7154d34cab8edcafa618e689e407521f50 | feed174188f7773631a3d574e1ff9889a135c986 | refs/heads/main | 2023-09-01T23:26:13.491955 | 2023-08-31T18:44:31 | 2023-08-31T18:44:31 | 95,862,535 | 3,742 | 705 | BSD-3-Clause | 2023-09-14T17:33:58 | 2017-06-30T07:39:02 | Python | UTF-8 | Python | false | false | 3,333 | py | test_weights.py | # Copyright (c) 2021, Apple Inc. All rights reserved.
#
# Use of this source code is governed by a BSD-3-clause license that can be
# found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause
import os
import shutil
import tempfile
import unittest
import numpy as np
from coremltools.libmilstor... |
d4a60caa27aac25ce29f565863f7a205aa594428 | fbbe424559f64e9a94116a07eaaa555a01b0a7bb | /Sklearn_x86/source/setuptools/command/__init__.py | b966dcea57a2072f98b96dbba75ceb26bd26d2dd | [
"MIT"
] | permissive | ryfeus/lambda-packs | 6544adb4dec19b8e71d75c24d8ed789b785b0369 | cabf6e4f1970dc14302f87414f170de19944bac2 | refs/heads/master | 2022-12-07T16:18:52.475504 | 2022-11-29T13:35:35 | 2022-11-29T13:35:35 | 71,386,735 | 1,283 | 263 | MIT | 2022-11-26T05:02:14 | 2016-10-19T18:22:39 | Python | UTF-8 | Python | false | false | 217 | py | __init__.py | from distutils.command.bdist import bdist
import sys
if 'egg' not in bdist.format_commands:
bdist.format_command['egg'] = ('bdist_egg', "Python .egg file")
bdist.format_commands.append('egg')
del bdist, sys
|
ee9ff4bc3f717017e7254986f6b08c3dca8fd34a | e18f61d2655035bd0da8f839bf9378d8d1869eb4 | /pyshacl/extras/js/js_executable.py | 84960f12bd102d7246822df93682fc9991dac90e | [
"Apache-2.0"
] | permissive | RDFLib/pySHACL | 0cdbc89fa44c348bfcc6a787355e8e9fcb5a60b8 | a0f5647a0f84f9bd6a57b627071d6dab2a1144e2 | refs/heads/master | 2023-08-28T02:31:15.979762 | 2023-08-14T23:16:40 | 2023-08-14T23:16:40 | 147,505,799 | 225 | 65 | Apache-2.0 | 2023-09-05T23:45:01 | 2018-09-05T11:13:51 | Python | UTF-8 | Python | false | false | 5,125 | py | js_executable.py | #
#
import typing
from typing import Dict
from rdflib import Literal
from pyshacl.consts import SH, SH_jsFunctionName, SH_jsLibrary
from pyshacl.errors import ConstraintLoadError
from .context import SHACLJSContext
if typing.TYPE_CHECKING:
from pyshacl.shapes_graph import ShapesGraph
SH_jsLibraryURL = SH.jsLib... |
599019f70555d2956418a7442116ec69c239e5e5 | 85373d45a83e4096affafa4f4e5b400787413e57 | /src/programy/storage/entities/store.py | 16c348cc4fb4325297d2d0f2c2d68415c4d90b8f | [
"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 | 6,803 | py | store.py | """
Copyright (c) 2016-2020 Keith Sterling http://www.keithsterling.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, copy, m... |
cc920b7da65040bb148974b11f90e311ca7fd34b | f305f84ea6f721c2391300f0a60e21d2ce14f2a5 | /前端笔记/牛客/牛客网前端笔试题/算法题/美团2016研发工程师编程题/字符编码-哈夫曼树建树.py | 0fa1c7043d4f4ac25cf651d2c35fc009a4e80a2b | [] | 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 | 2,029 | py | 字符编码-哈夫曼树建树.py | # 请设计一个算法,给一个字符串进行二进制编码,使得编码后字符串的长度最短。
# 一行输出最短的编码后长度。
# n<=1000
# 解法一:直接模拟建立哈夫曼树
from collections import Counter
from heapq import heapify, heappop, heappush
class Node:
def __init__(self, weight: int, value: str = None, left: 'Node' = None, right: 'Node' = None):
self.weight = weight
... |
ad0885c2a29f8ea7327f3de8902216bbba9549ca | 32809f6f425bf5665fc19de2bc929bacc3eeb469 | /src/1007-Minimum-Domino-Rotations-For-Equal-Row/1007.py | ca9fbcf078105450033ba968d7e75e03585e988d | [] | no_license | luliyucoordinate/Leetcode | 9f6bf01f79aa680e2dff11e73e4d10993467f113 | bcc04d49969654cb44f79218a7ef2fd5c1e5449a | refs/heads/master | 2023-05-25T04:58:45.046772 | 2023-05-24T11:57:20 | 2023-05-24T11:57:20 | 132,753,892 | 1,575 | 569 | null | 2023-05-24T11:57:22 | 2018-05-09T12:30:59 | C++ | UTF-8 | Python | false | false | 267 | py | 1007.py | class Solution:
def minDominoRotations(self, A: List[int], B: List[int]) -> int:
for i in range(1,7):
if all(i == a or i == b for a,b in zip(A,B)):
return min(len(A)-A.count(i),len(B)-B.count(i))
return -1 |
c43b8754119ab9e2f5eceaac5c6312174d96f260 | 30674cc03db1e93c0d5a6ff213b528d8ea70bb6a | /tests/test_dummy_device.py | 428e3c354fef219d42a1e5d3d6f8b2f713fcf90b | [
"MIT"
] | permissive | rm-hull/luma.core | 6df4db6f6886a562dca9eec82e3cc42fe4dd5f98 | d871d66644288b788641af0b3a20d3a97583dd70 | refs/heads/master | 2023-03-04T01:37:36.636573 | 2023-02-21T07:52:03 | 2023-02-21T07:52:03 | 78,548,891 | 134 | 61 | MIT | 2023-09-01T20:59:12 | 2017-01-10T15:55:14 | Python | UTF-8 | Python | false | false | 1,520 | py | test_dummy_device.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2017-18 Richard Hull and contributors
# See LICENSE.rst for details.
"""
Tests for the :py:class:`luma.core.device.dummy` class.
"""
from PIL import Image
from luma.core.render import canvas
from luma.core.device import dummy
import baseline_data
from he... |
30c891718d616d75608c360da43d927cf3eefc4e | 1b364500b756c5096d94358d3ad745e248c20dc4 | /wradlib/io/gdal.py | 02b81ff49dc99939c10e834167d88c5b0b843b0a | [
"MIT"
] | permissive | wradlib/wradlib | fdf3b3670aa8b2ea6ddf4bb6083321992eb361a9 | 17f876c2c6257171888d6e04f5cbb86f0ac46f90 | refs/heads/main | 2023-08-26T09:07:45.866267 | 2023-05-31T06:12:50 | 2023-05-31T06:12:50 | 52,089,638 | 228 | 89 | MIT | 2023-09-11T23:29:48 | 2016-02-19T13:32:22 | Python | UTF-8 | Python | false | false | 22,966 | py | gdal.py | #!/usr/bin/env python
# Copyright (c) 2011-2020, wradlib developers.
# Distributed under the MIT License. See LICENSE.txt for more info.
"""
GDAL Raster/Vector Data I/O
^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. autosummary::
:nosignatures:
:toctree: generated/
{}
"""
__all__ = [
"open_vector",
"open_raster",
... |
d7d8ef1780391466dad844faa09a0d2866f21cc7 | 25a08bdeb17a0dc032ddf6c11b71693ca4c1a6cd | /python/gtirb/auxdata.py | 94032fd4068e467871dcb8509f1f8618876aa388 | [
"MIT"
] | permissive | GrammaTech/gtirb | 20b05dc6170d93af8cc29fd65f7094bd59a9fb4d | f4301401a0d98a783e3b6f40e390fe9b1b1d386d | refs/heads/master | 2023-08-18T12:17:45.797733 | 2023-08-14T23:28:22 | 2023-08-15T12:02:48 | 136,977,182 | 277 | 40 | MIT | 2019-01-08T01:43:01 | 2018-06-11T20:25:41 | C++ | UTF-8 | Python | false | false | 8,213 | py | auxdata.py | from io import BytesIO
from typing import TYPE_CHECKING, Any, Callable, ClassVar, Dict, Optional
from uuid import UUID
from google.protobuf.internal.containers import MessageMap
from .node import Node
from .proto import AuxData_pb2
from .serialization import Serialization
from .util import DictLike
if TYPE_CHECKING:... |
e188da7ccc5ef84a7705bfc65ad967dbdae9d2dd | 269ffc022565c7982017a866ec0e515c90b48940 | /miditok/tokenizations/mumidi.py | 54a8d1ccdcbb75fb31fbd96f589a254459422d3d | [
"MIT"
] | permissive | Natooz/MidiTok | 36efda7fef567f4f2fc81053609568e0c6cbc678 | a1543cd0e0a9a3ee1de6fb77abcdfcffc274b9f1 | refs/heads/main | 2023-09-01T14:11:00.854742 | 2023-08-31T13:44:40 | 2023-08-31T13:44:40 | 394,933,651 | 410 | 54 | MIT | 2023-09-07T08:18:00 | 2021-08-11T09:24:38 | Python | UTF-8 | Python | false | false | 21,372 | py | mumidi.py | from math import ceil
from pathlib import Path
from typing import List, Dict, Optional, Union, Any
import numpy as np
from miditoolkit import MidiFile, Instrument, Note, TempoChange
from ..midi_tokenizer import MIDITokenizer, _in_as_seq, _out_as_complete_seq
from ..classes import TokSequence, Event
from ..utils impor... |
eb335ff467a59ef95f1a901386f25372672c61e2 | a2b20597759990445081057d35d113434cfcf970 | /client/configuration/shared_memory.py | f78d2916da07268082a8bab6d85ec9cca49a1097 | [
"MIT"
] | permissive | facebook/pyre-check | 34059599c02b65605c574f13555229f3b931fd4e | fe8ccedc572cc1faa1fd01e9138f65e982875002 | refs/heads/main | 2023-09-03T19:10:11.587028 | 2023-09-02T07:40:35 | 2023-09-02T07:40:35 | 110,274,488 | 6,703 | 575 | MIT | 2023-09-13T17:02:32 | 2017-11-10T17:31:36 | OCaml | UTF-8 | Python | false | false | 1,339 | py | shared_memory.py | # Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
"""
This module specifies how one can tune the backend's shared memory settings
in a .pyre_configuration file. This is needed because for la... |
f1ff381c029e9aea0a42871cee581bdf3a931f83 | c7f92e01853d106dfef77248c00e585ba1e6e8da | /plugins/tts/pico-tts/pico.py | fdb031ca37ec9030ec4f2b75d3ab3d33fab1ce38 | [
"MIT"
] | permissive | NaomiProject/Naomi | ff6eb740e9ec0bb29aee136b9a654fccceb18eeb | e65086865ffac0e905e09adff51be520938eaa38 | refs/heads/naomi-dev | 2023-07-07T07:36:01.524236 | 2023-07-03T00:45:26 | 2023-07-03T00:45:26 | 65,221,460 | 226 | 73 | MIT | 2023-07-03T00:45:27 | 2016-08-08T16:41:13 | Python | UTF-8 | Python | false | false | 2,330 | py | pico.py | import logging
import os
import pipes
import re
import subprocess
import tempfile
import unittest
from naomi import diagnose
from naomi import plugin
from naomi import profile
EXECUTABLE = 'pico2wave'
if not diagnose.check_executable(EXECUTABLE):
raise unittest.SkipTest("Skipping Pico, executable '%s' not found!"... |
1a2e1139f9e83668e385a802845d24311dd6f080 | 96dcea595e7c16cec07b3f649afd65f3660a0bad | /homeassistant/components/msteams/notify.py | 7a729897e76a5c906c9892edb2205bf7de4880cc | [
"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 | 2,229 | py | notify.py | """Microsoft Teams platform for notify component."""
from __future__ import annotations
import logging
import pymsteams
import voluptuous as vol
from homeassistant.components.notify import (
ATTR_DATA,
ATTR_TITLE,
ATTR_TITLE_DEFAULT,
PLATFORM_SCHEMA,
BaseNotificationService,
)
from homeassistant.... |
5731c7a393aab6b0697433a6b3d7d1ebe5850841 | 5a361fd402b330189792b592465c1fc48c6a5fb4 | /application/flicket/views/create.py | faf3cdc687624fddc7e2c627d1b3551f25bb7742 | [
"MIT"
] | permissive | evereux/flicket | a807e4a3cabce45b42cf02acceee1deb023b0487 | ef1330dca9bcc75cedd9fb68a0ecb4de67f2e6cc | refs/heads/master | 2023-05-10T17:14:05.116769 | 2023-05-01T11:20:23 | 2023-05-01T11:20:23 | 74,390,774 | 120 | 64 | MIT | 2023-05-02T00:13:00 | 2016-11-21T17:58:26 | Python | UTF-8 | Python | false | false | 1,939 | py | create.py | #! usr/bin/python3
# -*- coding: utf-8 -*-
#
# Flicket - copyright Paul Bourne: evereux@gmail.com
from flask import (flash,
redirect,
url_for,
request,
session,
render_template,
g)
from flask_babel import ... |
66af7d882941de36d1e18475eba1e84a24c54d0b | 65078b8087c2040cf0188e2550ea298d20518f62 | /tests/unit/_internal/utils/test_analytics.py | 01fc271845769c8fc53e48c2c73b7976250848c4 | [
"Apache-2.0"
] | permissive | bentoml/BentoML | 20ab6f8351b1c5cd116d6d60a28098246a1581b3 | 4a14f073d8a3e700aff29483b17ea053058c0c63 | refs/heads/main | 2023-09-05T16:03:08.909692 | 2023-09-04T18:54:33 | 2023-09-04T18:54:33 | 178,976,529 | 5,712 | 732 | Apache-2.0 | 2023-09-14T20:07:54 | 2019-04-02T01:39:27 | Python | UTF-8 | Python | false | false | 12,132 | py | test_analytics.py | # pylint: disable=unused-argument
from __future__ import annotations
import logging
import typing as t
from typing import TYPE_CHECKING
from unittest.mock import Mock
from unittest.mock import patch
import pytest
from prometheus_client.parser import text_string_to_metric_families
# type: ignore (no prometheus types)... |
afb1cdf1739535fe65c0a49658a9c0fae7c671a1 | 749af8e81d5ccd2d8714a34434a9c77772df551b | /statsmodels/nonparametric/tests/test_asymmetric.py | 25a545da2ed19c193d8fd3c1e2f7c735788776ea | [
"BSD-3-Clause"
] | permissive | statsmodels/statsmodels | 98ca67192c08bcc611ed3a75edaded2c7181ab98 | 01b19d7d111b29c183f620ff0a949ef6391ff8ee | refs/heads/main | 2023-09-05T13:05:49.497076 | 2023-09-01T10:54:50 | 2023-09-01T10:54:50 | 1,885,237 | 8,666 | 3,023 | BSD-3-Clause | 2023-09-13T17:51:48 | 2011-06-12T17:04:50 | Python | UTF-8 | Python | false | false | 4,682 | py | test_asymmetric.py | # -*- coding: utf-8 -*-
"""
Created on Mon Mar 8 16:18:21 2021
Author: Josef Perktold
License: BSD-3
"""
import numpy as np
from numpy.testing import assert_allclose, assert_array_less
from scipy import stats
import pytest
import statsmodels.nonparametric.kernels_asymmetric as kern
kernels_rplus = [("gamma", 0.... |
b09e50d2ea7ee20b1538d8935090463f0e3e7b5c | ebd9c249d446d809abc9a0f3e4593f34922a1b93 | /topic/hash/python/__init__.py | 3a01267e7b9b28a616293bde2ab9b5e27b4f8cef | [] | no_license | jaychsu/algorithm | ac7a9dc7366f58c635a68bc46bf1640d2f5ff16d | 91892fd64281d96b8a9d5c0d57b938c314ae71be | refs/heads/master | 2023-05-11T00:40:39.237813 | 2022-09-14T07:43:12 | 2022-09-14T07:43:12 | 106,277,156 | 143 | 39 | null | 2022-09-14T07:43:13 | 2017-10-09T11:51:48 | Python | UTF-8 | Python | false | false | 84 | py | __init__.py | from hash.python.hashtable import HashTable
from hash.python.geohash import GeoHash
|
87592727841e5c40333a327cf10d93745b21a4dd | ae1c7877f0d624ab0c9bae65ce8b0de0f9750683 | /25-DouYin/douyin.py | 4b7af005fec90c16f06fb91bec5ce96598930bf7 | [] | no_license | Northxw/Python3_WebSpider | a38b723be440707cab40e50e7a3d7486254433b4 | 87cbae60f7a5b033851b0056dff741a3d5980d06 | refs/heads/master | 2022-05-01T04:02:13.123747 | 2022-04-08T03:43:00 | 2022-04-08T03:43:00 | 152,024,239 | 545 | 302 | null | null | null | null | UTF-8 | Python | false | false | 5,572 | py | douyin.py | # -*- coding:utf-8 -*-
import requests
import re
from lxml import etree
from font import get_mapping_table
import os
def get_share_info(shareid):
"""个人主页信息"""
headers = {
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36... |
9a56e9883ea98e32acb83710d8d0a0e2e4e6ff42 | d6aae799e18e907fb413b715200c7832252a87e5 | /speech-synthesis/TTS/fastspeech2/utils/text/text.py | 0337452313d8d150366ada90d6948614788b549b | [
"BSD-3-Clause",
"MIT",
"LicenseRef-scancode-proprietary-license",
"Apache-2.0",
"CC-BY-NC-4.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | sony/nnabla-examples | 0d0bbd5df3028996e790bcf07248fdb0932697d1 | 41f71faa6efff7774a76bbd5af3198322a90a6ab | refs/heads/master | 2023-09-04T03:45:54.023899 | 2023-08-22T03:31:21 | 2023-08-22T03:31:21 | 109,625,584 | 308 | 108 | Apache-2.0 | 2023-08-22T03:31:23 | 2017-11-05T23:30:40 | Python | UTF-8 | Python | false | false | 2,344 | py | text.py | # Copyright 2021 Sony Group Corporation.
#
# 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 ... |
c4f71678cfe914ff1c713b0084b6e8b63158d6ad | d6aa13cb1021773d88e2ef780bc4450b38455644 | /apex/amp/opt.py | baf311684de179e3026f15bae99d7aae9e266ce6 | [
"BSD-3-Clause"
] | permissive | NVIDIA/apex | f54a9ced5d8b1c14f777e6bb53f11b3dc3ff2d6b | 7995de18677295c5edeeab082179edbfdb6ee16a | refs/heads/master | 2023-08-21T13:25:44.408616 | 2023-08-19T04:36:48 | 2023-08-19T04:36:48 | 130,725,814 | 7,932 | 1,381 | BSD-3-Clause | 2023-09-13T16:09:42 | 2018-04-23T16:28:52 | Python | UTF-8 | Python | false | false | 3,446 | py | opt.py | import contextlib
import warnings
from .scaler import LossScaler, master_params
from ._amp_state import maybe_print
import numpy as np
class OptimWrapper(object):
def __init__(self, optimizer, amp_handle, num_loss):
self._optimizer = optimizer
self._amp_handle = amp_handle
self._num_loss ... |
517c21e2c5a69256d6b0bb897ac9649ef8924b7d | 71fb04f723b46a1bf45295be239bcec25e07f98c | /keras_cv/layers/object_detection_3d/centernet_label_encoder.py | 5e27a7477ca58e5cedf5731173920e7a4d9c6690 | [
"Apache-2.0"
] | permissive | keras-team/keras-cv | 9bca4479474e853ec3a1c541b8be20fea2447a1a | e83f229f1b7b847cd712d5cd4810097d3e06d14e | refs/heads/master | 2023-08-31T10:22:08.406394 | 2023-08-30T20:24:57 | 2023-08-30T20:24:57 | 265,079,853 | 818 | 287 | NOASSERTION | 2023-09-12T16:49:01 | 2020-05-18T22:39:21 | Python | UTF-8 | Python | false | false | 16,743 | py | centernet_label_encoder.py | # Copyright 2022 The KerasCV 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 law or agreed to in ... |
3e9e02f64c9c3b7fd9d35a6a494d99f44f142d2c | c641636e184c0ec1dcc7b851bad678c898cdd05d | /legacy/examples/stgcn/data_loader/data_utils.py | c7e20864c77d275b21270ab0ed7c27af23a47471 | [
"Apache-2.0"
] | permissive | PaddlePaddle/PGL | d8f0a82854a141bee1afdddd9a77bdd723c83ed8 | 7a55649d46d7ad93de31eb9b3ebf71b82d1fcffb | refs/heads/main | 2023-08-17T10:33:02.425526 | 2023-08-04T02:52:06 | 2023-08-04T02:52:06 | 191,286,408 | 1,719 | 341 | Apache-2.0 | 2023-08-04T02:52:07 | 2019-06-11T03:23:28 | Python | UTF-8 | Python | false | false | 8,052 | py | data_utils.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 appli... |
afffc0a2cd2216232811bca024b8d0b691d72662 | 37ba914737fba69b3a656ab0a9fcdbc45d113f70 | /library/panos_check.py | 61ecbff468a54f43ac7b3c3f11988ffd91140337 | [
"Apache-2.0"
] | permissive | PaloAltoNetworks/ansible-pan | 1a30def492393cb540d346b04dc5e7e0f217791c | dce32f6d1837dafb59f431e32d954c108c291a9a | refs/heads/develop | 2023-06-23T13:30:26.444014 | 2023-06-14T13:13:14 | 2023-06-14T13:13:14 | 29,692,434 | 236 | 202 | NOASSERTION | 2023-06-14T13:13:10 | 2015-01-22T18:07:22 | Python | UTF-8 | Python | false | false | 3,995 | py | panos_check.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2016 Palo Alto Networks, Inc
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0... |
216ad373f281e257118824ff0339f75332b1c1a5 | 4091caecbc727e6d6ae0d827afce11c5979a84fd | /demos/multi_camera_multi_target_tracking_demo/python/multi_camera_multi_target_tracking_demo.py | 4e72fdddb1a59ee204f642e735450e3a1e11d4be | [
"Apache-2.0"
] | permissive | openvinotoolkit/open_model_zoo | fdb03dd40bfccb854e4ed4f7b9beaa90596963cd | 7929adbe91e9cfe8dc5dc1daad5ae7392f9719a0 | refs/heads/master | 2023-08-18T18:03:47.254427 | 2023-08-18T10:54:31 | 2023-08-18T10:54:31 | 153,097,694 | 1,712 | 730 | Apache-2.0 | 2023-09-11T11:31:20 | 2018-10-15T10:55:02 | Python | UTF-8 | Python | false | false | 11,354 | py | multi_camera_multi_target_tracking_demo.py | #!/usr/bin/env python3
"""
Copyright (c) 2019-2023 Intel Corporation
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 applicab... |
18eaabe18a867167bd4d08eb3894bf0f32efcbf7 | 3083a4918f9a9a0670ce83566341eba04b290bc4 | /kafka_utils/util/validation.py | 0d3f13f4e183a43a2442440581e73a09f1a858a3 | [
"Apache-2.0"
] | permissive | Yelp/kafka-utils | b122c0aad0dfc225e948623ceaf466e7e63d9f91 | def433ec4d07c60290d5dc937d3b4e5189eca9dc | refs/heads/master | 2023-08-31T06:20:33.740273 | 2023-08-24T10:15:43 | 2023-08-24T10:15:43 | 55,727,134 | 322 | 142 | Apache-2.0 | 2023-08-24T10:15:44 | 2016-04-07T20:50:50 | Python | UTF-8 | Python | false | false | 11,068 | py | validation.py | # Copyright 2016 Yelp Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, so... |
bf8cdd81e3fdb2060c17dbbf154315831471f1e2 | 87d70540706887b89ae10aacb2803797dc6b77db | /tests/ipython/factories/test_basic_heap_object_factory.py | 1198fcdacce06ce58c2fb9c374a81e387dcf417a | [
"BSD-3-Clause",
"BSD-2-Clause"
] | permissive | lgpage/nbtutor | d8fc3451d95e7c556ccec05521c16fc5d1063380 | 7bbca6286a6ec85f189b17094ce1bf785156fe8e | refs/heads/main | 2023-09-04T11:12:33.240937 | 2023-04-14T07:14:04 | 2023-04-14T07:14:04 | 73,084,481 | 476 | 45 | NOASSERTION | 2023-07-09T10:30:31 | 2016-11-07T14:08:25 | TypeScript | UTF-8 | Python | false | false | 2,211 | py | test_basic_heap_object_factory.py | import json
from nbtutor.ipython.factories.basic_heap_object_factory import BasicHeapObjectFactory
class TestBasicHeapObjectFactory(object):
def test_create_bool_returns_expected_result(self):
py_obj = True
factory = BasicHeapObjectFactory(py_obj)
heap_obj = factory.create()
asse... |
e341e18ce84d04a1a350088da893c79b2ebb008e | 3cf8454257ce93926a39bd379a2f0f7a61a860e8 | /mtools/mloginfo/sections/rs_info_section.py | 131f1de206ff837335a4084efb85a84cd3728db9 | [
"Apache-2.0"
] | permissive | rueckstiess/mtools | 12e6e73a06934bd49dc53623162fd70f6f676905 | 370e598527949077859dbe4a9fcfe0b9c9f2d1d2 | refs/heads/develop | 2023-08-25T02:16:05.206326 | 2023-05-02T04:49:18 | 2023-05-02T05:57:19 | 5,806,020 | 1,654 | 396 | Apache-2.0 | 2023-09-04T03:59:53 | 2012-09-14T07:28:16 | Python | UTF-8 | Python | false | false | 1,916 | py | rs_info_section.py | from .base_section import BaseSection
from mtools.util.logformat import LogFormat
class RsInfoSection(BaseSection):
"""
RsInfoSection class.
This section determines if there is any Replica Set infomation like the
replset name in the log file and prints the available information.
"""
name = "r... |
2b3321551db10d730b12db74564e130215d4467d | 3bca0d7aa49bfddba274c85ad2b12245196a0a8d | /examples/hello.py | abb068c4c6b44753c75ff8416bb51721a6d3ccfd | [
"BSD-3-Clause"
] | permissive | thadeusb/flask-cache | d1887028c1c52fffd516f9b74adeca7d5ee5eba4 | 1c60076b6d4c2df0ac1de54c59e63b4f780cecbc | refs/heads/master | 2023-07-09T05:39:25.670107 | 2014-09-21T20:22:36 | 2014-09-21T20:22:36 | 871,644 | 560 | 194 | NOASSERTION | 2021-12-08T15:10:16 | 2010-08-30T07:39:51 | Python | UTF-8 | Python | false | false | 1,099 | py | hello.py | import random
from datetime import datetime
from flask import Flask, jsonify
from flask.ext.cache import Cache
app = Flask(__name__)
app.config.from_pyfile('hello.cfg')
cache = Cache(app)
#: This is an example of a cached view
@app.route('/api/now')
@cache.cached(50)
def current_time():
return str(datetime.now... |
82ed3a79e6cd20487c31499c67cab504e83848dc | c001930958cb94f8b91b1f734108671f1db9e9f1 | /components/dash-table/tests/selenium/test_sort.py | a17bc80cd5bda927f3da4a58f3c186a01659d03e | [
"MIT"
] | permissive | plotly/dash | 73c752135937e27975071fbd144e3fb21618e7b4 | 6eaf2e17c25f7ca1847c41aafeb18e87c586cb9f | refs/heads/dev | 2023-08-30T21:21:06.056499 | 2023-08-29T16:49:04 | 2023-08-29T16:49:04 | 33,702,544 | 20,553 | 2,355 | MIT | 2023-08-31T20:51:14 | 2015-04-10T01:53:08 | Python | UTF-8 | Python | false | false | 928 | py | test_sort.py | import dash
from utils import basic_modes, get_props
from dash.dash_table import DataTable
import pytest
def get_app(props=dict()):
app = dash.Dash(__name__)
baseProps = get_props()
baseProps.update(dict(sort_action="native"))
baseProps.update(props)
app.layout = DataTable(**baseProps)
... |
bc646ab6e40b47ab0eb7a9a25b564fe8bcaf6eed | 4467a183750d42e6633e6447b5c93f6cdf95a70a | /pylot/debug/visualizer_operator.py | ce069bf3a01a4df8114712da4a505a4e9ac39746 | [
"Apache-2.0"
] | permissive | erdos-project/pylot | e741a4377e3e102c83d6bbe94ab6745648de3b90 | a71ae927328388dc44acc784662bf32a99f273f0 | refs/heads/master | 2023-04-08T00:13:49.240926 | 2023-01-27T03:24:16 | 2023-01-27T03:24:16 | 190,252,594 | 389 | 117 | Apache-2.0 | 2023-03-24T22:58:22 | 2019-06-04T17:54:40 | Python | UTF-8 | Python | false | false | 19,943 | py | visualizer_operator.py | """This module implements an operator for visualizing the state of
the different pipeline components (e.g., detections, tracked obstacles,
planning waypoints)."""
from collections import deque
from functools import partial
import erdos
import numpy as np
import pygame
from pygame.locals import K_n
import pylot.uti... |
47486078f5aed81e971840fb5ada154a69ab60be | 29dfa1deefc72493d1b1eecf1a8df62e24599a77 | /tests/file_io/data_range_io.py | 5a8d449f12c81a6a970636d475171dfc4bb67f65 | [
"Apache-2.0"
] | permissive | log2timeline/dfvfs | fd301eaf721a9945641a44ff722aec963158a6b3 | 28756d910e951a22c5f0b2bcf5184f055a19d544 | refs/heads/main | 2023-08-07T22:45:45.432668 | 2023-07-30T12:17:56 | 2023-07-30T12:17:56 | 23,820,144 | 197 | 65 | Apache-2.0 | 2023-07-30T12:17:58 | 2014-09-09T05:06:44 | Python | UTF-8 | Python | false | false | 2,793 | py | data_range_io.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Tests for the data range file-like object."""
import unittest
from dfvfs.file_io import data_range_io
from dfvfs.lib import definitions
from dfvfs.path import factory as path_spec_factory
from dfvfs.resolver import context
from tests.file_io import test_lib
class Da... |
16e04b143263eb6f01f3556d9cd093bf76ec823d | 96dcea595e7c16cec07b3f649afd65f3660a0bad | /homeassistant/components/fritzbox_callmonitor/base.py | df19bca7b13c3773b00b5e48512143751ad0fefb | [
"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 | 2,606 | py | base.py | """Base class for fritzbox_callmonitor entities."""
from __future__ import annotations
from contextlib import suppress
from datetime import timedelta
import logging
import re
from fritzconnection.lib.fritzphonebook import FritzPhonebook
from homeassistant.util import Throttle
from .const import REGEX_NUMBER, UNKNOW... |
59b1aa49ed8cf258572bbc217f696bf5dfaa153e | 50dd46b8ece33f3cdd174284b15d1d51f89669d4 | /2018/finals/re-drm/challenge/encode_str.py | 2483b482e9f0b8fc471d97c2c7a1931118ef9b4c | [
"LicenseRef-scancode-generic-cla",
"Apache-2.0"
] | permissive | google/google-ctf | f99da1ee07729bbccb869fff1cbaed6a80e43bcc | df02323eaf945d15e124801c74abaadca2749dc7 | refs/heads/master | 2023-08-31T14:30:27.548081 | 2023-08-29T13:04:20 | 2023-08-29T13:04:20 | 131,317,137 | 4,136 | 607 | Apache-2.0 | 2023-08-30T22:17:02 | 2018-04-27T15:56:03 | Go | UTF-8 | Python | false | false | 1,014 | py | encode_str.py | #!/usr/bin/python
#
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... |
5291debea14f0ee5b48822a2b00d36e6330f5d22 | e9f0510faac898afc09eb5bb664ac6048f72c33a | /samples/ReadRange.py | cc5371136b4c83a94f3ce8aaf7fe8eb9c746b9ef | [
"MIT"
] | permissive | JoelBender/bacpypes | c9ddf9a4f56dd0d012046a9e4ffad19bd580cb45 | a5be2ad5ac69821c12299716b167dd52041b5342 | refs/heads/master | 2023-05-28T05:03:17.980236 | 2023-05-10T05:33:01 | 2023-05-10T05:33:01 | 39,159,799 | 284 | 161 | MIT | 2023-05-15T15:11:27 | 2015-07-15T20:33:51 | Python | UTF-8 | Python | false | false | 6,457 | py | ReadRange.py | #!/usr/bin/env python
"""
This application presents a 'console' prompt to the user asking for readrange
commands which create ReadRangeRequest PDUs, then lines up the coorresponding
ReadRangeACK and prints the value.
"""
import sys
from bacpypes.debugging import bacpypes_debugging, ModuleLogger
from bacpypes.console... |
2c2804125a60dbda3cd25ee56036c9b43d5e08bf | 353730afc44b31cf4efded67a4e2835d19c75922 | /tensorly/metrics/tests/test_regression.py | 76edebe1c9306b32926f86be9914a59794de1ed6 | [
"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 | 1,361 | py | test_regression.py | import numpy as np
import tensorly as tl
from ..regression import MSE, RMSE, R2_score, correlation
from ...testing import assert_array_almost_equal
def test_MSE():
"""Test for MSE"""
y_true = tl.tensor([1, 0, 2, -2])
y_pred = tl.tensor([1, -1, 1, -1])
true_mse = 0.75
assert_array_almost_equal(MSE... |
0b6af8ac3f0d4dd73abe24e4ca612c6dc6e0fe3f | b60686a2e351a756f249e0d9faab8fe154a08f11 | /tests/test_cli.py | 451436b0defe46e405bbe2b18f7301d63ba6929b | [
"MIT",
"LicenseRef-scancode-generic-export-compliance"
] | permissive | intel/dffml | 86483b47229b9b62c9f8dfef51491aa02563347e | 7d381bf67a72fe1ecb1012393d5726085564cb0e | refs/heads/main | 2023-08-28T00:35:04.219193 | 2023-06-06T18:29:16 | 2023-06-06T18:29:16 | 149,512,216 | 237 | 204 | MIT | 2023-05-05T15:39:35 | 2018-09-19T21:06:34 | Python | UTF-8 | Python | false | false | 16,653 | py | test_cli.py | # SPDX-License-Identifier: MIT
# Copyright (c) 2019 Intel Corporation
import os
import io
import json
import shutil
import random
import tempfile
import contextlib
from pathlib import Path
from unittest.mock import patch
from typing import AsyncIterator, List
from dffml.record import Record
from dffml.feature import F... |
b2ada36828af1498edffe1424e901801ea8769f2 | 8e90a7759ec7143427823547e0fbff58e0343aaa | /training_api/domain/services/contract/abstract_configuration_service.py | 1ca350562a2d960b5fa2cc8a4ead8bcec204bdba | [
"LicenseRef-scancode-free-unknown",
"Apache-2.0"
] | permissive | BMW-InnovationLab/BMW-TensorFlow-Training-GUI | 646a6f86f26887e94351b4c572b7fe7f0842f75c | 06531dae14365986c86baf735fd149317f4bb67a | refs/heads/master | 2023-07-20T01:48:27.299962 | 2023-07-12T15:22:22 | 2023-07-12T15:22:22 | 227,429,492 | 1,030 | 198 | Apache-2.0 | 2023-05-22T17:40:23 | 2019-12-11T18:06:11 | Python | UTF-8 | Python | false | false | 302 | py | abstract_configuration_service.py | from abc import ABC, abstractmethod, ABCMeta
from domain.models.network_information import NetworkInformation
class AbstractConfigurationService(ABC):
__metaclass__ = ABCMeta
@abstractmethod
def get_configurations(self, network_inf: NetworkInformation) -> str: raise NotImplementedError
|
34c4f562135c2cde68d69fc278f337727244e1ce | def993d87717cd42a9090a17d9c1df5648e924ce | /test/IECore/IndexedIO.py | 06e0c58194133c28df8e3092ace353f1bf386a9c | [
"BSD-2-Clause",
"BSD-3-Clause"
] | permissive | ImageEngine/cortex | 688388296aad2b36dd0bfb7da7b25dcbdc7bd856 | 6eec66f5dccfd50dda247b04453bce65abc595eb | refs/heads/main | 2023-09-05T07:01:13.679207 | 2023-08-17T23:14:41 | 2023-08-17T23:14:41 | 10,654,465 | 439 | 104 | NOASSERTION | 2023-09-14T11:30:41 | 2013-06-12T23:12:28 | C++ | UTF-8 | Python | false | false | 24,380 | py | IndexedIO.py | ##########################################################################
#
# Copyright (c) 2007-2013, Image Engine Design Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redis... |
648612a48f9c316f97b395cc19779f89d014b7c6 | 7607429663127ad7429d0815006dbb6aba2f3fd0 | /veros/veros.py | c8858265e7234f230ad98b9dbf5927b425ccf900 | [
"MIT"
] | permissive | team-ocean/veros | df0d0e467579a09a973f45bc1b267aca9609e93a | 416dbdac43b8ce80ce09171a3bd3fdb4814abae0 | refs/heads/main | 2023-08-05T03:39:31.640695 | 2023-08-03T08:00:37 | 2023-08-03T08:00:37 | 87,419,383 | 168 | 31 | MIT | 2023-09-14T04:50:21 | 2017-04-06T10:59:21 | Python | UTF-8 | Python | false | false | 15,946 | py | veros.py | import abc
# do not import veros.core here!
from veros import settings, time, signals, distributed, progress, runtime_settings as rs, logger
from veros.state import get_default_state
from veros.plugins import load_plugin
from veros.routines import veros_routine, is_veros_routine
from veros.timer import timer_context
... |
bcd6ef50ec9f4d64eb41e6231d397396a78ee372 | abe6c00f9790df7e6ef20dc02d0b1b225b5020cb | /src/prefect/server/database/migrations/versions/postgresql/2022_10_19_165110_8ea825da948d_track_retries_restarts.py | 2d3db8e0f662b99e588a94946537725e46211c33 | [
"Apache-2.0"
] | permissive | PrefectHQ/prefect | 000e6c5f7df80f76a181f0a30f8661c96417c8bd | 2c50d2b64c811c364cbc5faa2b5c80a742572090 | refs/heads/main | 2023-09-05T20:25:42.965208 | 2023-09-05T18:58:06 | 2023-09-05T18:58:06 | 139,199,684 | 12,917 | 1,539 | Apache-2.0 | 2023-09-14T20:25:45 | 2018-06-29T21:59:26 | Python | UTF-8 | Python | false | false | 762 | py | 2022_10_19_165110_8ea825da948d_track_retries_restarts.py | """Add retry and restart metadata
Revision ID: 8ea825da948d
Revises: ad4b1b4d1e9d
Create Date: 2022-10-19 16:51:10.239643
"""
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision = "8ea825da948d"
down_revision = "3ced59d8806b"
branch_labels = None
depends_on = None
def u... |
6621f8febb637eddcfa74bfa8b3fccbcec9553bc | 4674b8088ffdf55905d44995f08a0792a3e4cd5c | /tests/hwsim/netlink.py | eef79090ce10fa30afb3b1b276744afd80cd03a3 | [
"BSD-3-Clause",
"BSD-2-Clause"
] | permissive | vanhoefm/krackattacks-scripts | 41daca791638a92aa4cfa68a582e46119037560e | 4b78669686f74efe664c6543b1b5b1616b22f902 | refs/heads/research | 2022-10-29T20:21:11.512335 | 2022-10-16T18:44:41 | 2022-10-16T18:44:41 | 107,408,514 | 2,184 | 577 | NOASSERTION | 2021-07-06T12:43:49 | 2017-10-18T12:58:08 | C | UTF-8 | Python | false | false | 6,982 | py | netlink.py | #
# (Generic) Netlink message generation/parsing
# Copyright (c) 2007 Johannes Berg <johannes@sipsolutions.net>
# Copyright (c) 2014 Intel Corporation
#
# This software may be distributed under the terms of the BSD license.
# See README for more details.
import struct, socket
# flags
NLM_F_REQUEST = 1
NLM_F_MULTI = 2... |
f0c538e00b286b47a9134f53d7681c2d3a143d37 | fbbe424559f64e9a94116a07eaaa555a01b0a7bb | /Keras_tensorflow_nightly/source2.7/tensorflow/contrib/gan/python/estimator/python/head_impl.py | a21358c50bbdb4a1a929b0c5bc322cec4c9923b5 | [
"MIT"
] | permissive | ryfeus/lambda-packs | 6544adb4dec19b8e71d75c24d8ed789b785b0369 | cabf6e4f1970dc14302f87414f170de19944bac2 | refs/heads/master | 2022-12-07T16:18:52.475504 | 2022-11-29T13:35:35 | 2022-11-29T13:35:35 | 71,386,735 | 1,283 | 263 | MIT | 2022-11-26T05:02:14 | 2016-10-19T18:22:39 | Python | UTF-8 | Python | false | false | 8,120 | py | head_impl.py | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... |
91395b53765c624a9ee80814facccd5a6dc736a9 | 517c4d617819aa2090094e92f1817e593354409d | /spectral/tests/run.py | 38f144829f44d12da71be464bcbd2f8e0f282af5 | [
"MIT"
] | permissive | spectralpython/spectral | 2080a7f5d304017827dded890c7617f57335f61b | 0659ee71614455d99a80ffd4f5f5edd8d032608c | refs/heads/master | 2023-09-04T07:34:08.699690 | 2022-11-13T16:54:18 | 2022-11-13T16:54:18 | 16,567,502 | 527 | 144 | MIT | 2023-09-07T11:33:02 | 2014-02-06T03:36:54 | Python | UTF-8 | Python | false | false | 1,370 | py | run.py | '''
Runs a set of unit tests for the spectral package.
To run all unit tests, type the following from the system command line:
# python -m spectral.tests.run
'''
from __future__ import absolute_import, division, print_function, unicode_literals
import logging
from optparse import OptionParser
import spectral.te... |
63fd8552af9bcf7394e42bc729018c0c103b6d03 | 3bba998ece193dd4594059025d0ebdc86a982e18 | /lib/rucio/core/oidc.py | df75ce0794868362324a7a0e6cfd81364209bce8 | [
"Apache-2.0"
] | permissive | rucio/rucio | d3320db046866be616f534baecdfdb2b28c8d0f1 | 7f0d229ac0b3bc7dec12c6e158bea2b82d414a3b | refs/heads/master | 2023-09-02T15:17:54.376456 | 2023-08-14T12:54:06 | 2023-08-21T12:42:21 | 109,819,364 | 232 | 378 | Apache-2.0 | 2023-09-14T12:52:36 | 2017-11-07T10:15:12 | Python | UTF-8 | Python | false | false | 65,207 | py | oidc.py | # -*- coding: utf-8 -*-
# Copyright European Organization for Nuclear Research (CERN) since 2012
#
# 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-... |
3b0d9a0c4b9411b001a1849c58fdd3e4840fc5a0 | afc3558e47ea4c82cb70190743472274eae7aeb1 | /tests/test_datasets/test_dataset_wrapper.py | b9c4c2682ebd988258badcef364b6317309a827c | [
"Apache-2.0"
] | permissive | open-mmlab/mmocr | 86a77fb77ca80cede9c41a9a22080eeeaf364002 | 9551af6e5a2482e72a2af1e3b8597fd54b999d69 | refs/heads/main | 2023-08-03T14:06:11.075037 | 2023-07-26T02:32:14 | 2023-07-26T02:32:14 | 355,559,187 | 3,734 | 801 | Apache-2.0 | 2023-09-12T03:17:12 | 2021-04-07T13:40:21 | Python | UTF-8 | Python | false | false | 4,324 | py | test_dataset_wrapper.py | # Copyright (c) OpenMMLab. All rights reserved.
import os.path as osp
from copy import deepcopy
from unittest import TestCase
from unittest.mock import MagicMock
from mmengine.registry import init_default_scope
from mmocr.datasets import ConcatDataset, OCRDataset
from mmocr.registry import TRANSFORMS
class TestConc... |
fe395a36a22014e8fafdcd9faf792295cd16b7ec | f576f0ea3725d54bd2551883901b25b863fe6688 | /sdk/monitor/azure-monitor-opentelemetry-exporter/samples/metrics/sample_views.py | b7caa688c63d2672e55f85a1858802a330b76620 | [
"LicenseRef-scancode-generic-cla",
"MIT",
"LGPL-2.1-or-later"
] | permissive | Azure/azure-sdk-for-python | 02e3838e53a33d8ba27e9bcc22bd84e790e4ca7c | c2ca191e736bb06bfbbbc9493e8325763ba990bb | refs/heads/main | 2023-09-06T09:30:13.135012 | 2023-09-06T01:08:06 | 2023-09-06T01:08:06 | 4,127,088 | 4,046 | 2,755 | MIT | 2023-09-14T21:48:49 | 2012-04-24T16:46:12 | Python | UTF-8 | Python | false | false | 1,408 | py | sample_views.py | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
"""
This example shows how to customize the metrics that are output by the SDK using Views. Metrics created
and recorded using the sdk are tracked and telemetry is exported to application insights with the
AzureMonitorMetricEx... |
bcffa46053829e3ac4dd01b3222e05b0d4ffa5db | e3ed3f09396bbce16a5ec571ea0ec26a4193ad2e | /artemis/ml/predictors/i_predictor.py | 5ca3fd92f19eacb07403462571e772f029bbdfff | [
"BSD-2-Clause-Views"
] | permissive | QUVA-Lab/artemis | ea8a3e05f6bf1249b5a027e3a06fe1dbbde271d4 | 84d3b1daf0de363cc823d99f978e2861ed400b5b | refs/heads/master | 2023-01-29T01:57:00.504531 | 2018-10-02T16:32:10 | 2018-10-02T16:32:10 | 57,375,178 | 241 | 33 | NOASSERTION | 2019-04-17T04:25:08 | 2016-04-29T09:58:50 | Python | UTF-8 | Python | false | false | 1,623 | py | i_predictor.py | from abc import abstractmethod
import numpy as np
from artemis.ml.tools.processors import OneHotEncoding
__author__ = 'peter'
class IPredictor(object):
@abstractmethod
def train(self, input_data, target_data):
"""
:param input_data:
:param target_data:
:return:
"""... |
5372b368ad0a4e44203e542233b81a757cd10d3b | 52245910f830dbfb2b1432ad2a967df7321ee6de | /panel/links.py | b0d423e073cfafa5da1ebd354d88dddb978ed205 | [
"BSD-3-Clause"
] | permissive | holoviz/panel | 92c19f979353d456512abbce5a027dff6ddb3a5c | 2c6e165e2bba96c0cb97947aa072d4429133cf7a | refs/heads/main | 2023-08-17T11:28:06.581979 | 2023-08-17T11:23:09 | 2023-08-17T11:23:09 | 145,848,899 | 2,544 | 373 | BSD-3-Clause | 2023-09-14T17:13:31 | 2018-08-23T12:14:24 | Python | UTF-8 | Python | false | false | 29,213 | py | links.py | """
Defines Links which allow declaring links between bokeh properties.
"""
from __future__ import annotations
import difflib
import sys
import weakref
from typing import (
TYPE_CHECKING, Any, Dict, Iterable, List, Optional, Sequence, Tuple, Type,
Union,
)
import param
from bokeh.models import CustomJS, Lay... |
3e14f45a0891fdbc44f6e944a5ae406964db3e48 | 6923f79f1eaaba0ab28b25337ba6cb56be97d32d | /An_Introduction_to_Computational_Fluid_Dynamics_FVM_Versteeg/CFD_books_codes-master/Versteeg/Chapter7/Example_7_5.py | cd1224f6ac94351db1ce4a6db956f9b0b72dbde0 | [] | no_license | burakbayramli/books | 9fe7ba0cabf06e113eb125d62fe16d4946f4a4f0 | 5e9a0e03aa7ddf5e5ddf89943ccc68d94b539e95 | refs/heads/master | 2023-08-17T05:31:08.885134 | 2023-08-14T10:05:37 | 2023-08-14T10:05:37 | 72,460,321 | 223 | 174 | null | 2022-10-24T12:15:06 | 2016-10-31T17:24:00 | Jupyter Notebook | UTF-8 | Python | false | false | 3,316 | py | Example_7_5.py | # Consider solving a one-dimensional conduction equation for an
# insulated metal rod which has internal heat generation. The
# dimensions and other data are as follows- length of the rod is 1 m,
# cross-sectional area of the rod is 0.01 m2, Thermal conductivity k =
# 5 W/mK, generation g = 20 kW/m3, the ends are ... |
37c00f07e714fedfb93ede4ccade2e7dd2a9034a | 1dc70cc7479b0efe56954c08b0b7366a823f22c0 | /HelperTools/AttributeRulesTools.pyt | 1ef8f4de991aaeb3e65552516776b8290605226e | [
"Apache-2.0"
] | permissive | Esri/arcade-expressions | b77de3054606296bce68a74cb2ef0e5d4f2d6e9e | b791359311f6e484fbc5de37b89afaefce5dd2a4 | refs/heads/master | 2023-07-08T23:42:38.213084 | 2023-04-04T19:34:46 | 2023-04-04T19:34:46 | 118,975,834 | 201 | 90 | Apache-2.0 | 2023-08-22T00:08:21 | 2018-01-25T22:36:17 | JavaScript | UTF-8 | Python | false | false | 15,654 | pyt | AttributeRulesTools.pyt | # -*- coding: utf-8 -*-
import os
from pathlib import Path
import pandas as pd
import re
from collections import defaultdict
import arcpy
class Toolbox(object):
def __init__(self):
"""Define the toolbox (the name of the toolbox is the name of the
.pyt file)."""
self.label = "Attribute Ru... |
163415e9f360ef705aa7a986b7ff58d3a22fcec9 | 744c3b66611b08782fcdd9d66261c4d55b00d426 | /examples/pybullet/gym/pybullet_envs/minitaur/envs_v2/multiagent_mobility_gym_env.py | c716d367b42b73bb32750393a8a4eeb9e78edcb0 | [
"Zlib"
] | permissive | erwincoumans/bullet3 | 4ff9e0aa64b641c65b57b26f415dd69dbfb12256 | 6d181d78a5c7be8714c74055cddcf63d5ccef70a | refs/heads/master | 2023-03-10T14:58:18.072562 | 2023-02-24T18:32:53 | 2023-02-24T18:32:53 | 31,621,748 | 103 | 29 | NOASSERTION | 2019-02-25T17:31:00 | 2015-03-03T21:15:54 | C++ | UTF-8 | Python | false | false | 18,188 | py | multiagent_mobility_gym_env.py | """This file implements the locomotion gym env."""
# pylint: disable=dangerous-default-value
import atexit
import collections
import time
import gin
from gym import spaces
import numpy as np
from pybullet_utils import bullet_client
from pybullet_envs.minitaur.envs import minitaur_logging
from pybullet_envs.minitaur.... |
2ff5b3a43dca8bd59b1e5a023e2531a9d0a37f81 | c5ee0fa77a98683fff730d359ba205ca89514638 | /examples/create_bids_folder.py | ba3c53220e46e23e821cda67e93d5cbf65d94daa | [
"BSD-3-Clause"
] | permissive | mne-tools/mne-bids | 70f70d6068ebdf1826d7340cd7573e41b813873a | d27cb465709f6a883276cde09a548245f20b0436 | refs/heads/main | 2023-08-31T14:41:59.882835 | 2023-08-26T07:18:23 | 2023-08-26T07:18:23 | 89,170,358 | 111 | 91 | BSD-3-Clause | 2023-09-11T06:03:27 | 2017-04-23T20:28:12 | Python | UTF-8 | Python | false | false | 1,632 | py | create_bids_folder.py | """
=======================================================
11. Creating BIDS-compatible folder names and filenames
=======================================================
The Brain Imaging Data Structure (BIDS) has standard conventions for file
names and folder hierarchy. MNE-BIDS comes with convenience functions if ... |
917d814a3ca88cf4f59ad65c99286f70e261eba6 | d6aae799e18e907fb413b715200c7832252a87e5 | /frame-interpolation/zooming-slow-mo/args.py | 99f33704f8c2b7724cbc7f72b3cfe0dc56508cd2 | [
"BSD-3-Clause",
"MIT",
"LicenseRef-scancode-proprietary-license",
"Apache-2.0",
"CC-BY-NC-4.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | sony/nnabla-examples | 0d0bbd5df3028996e790bcf07248fdb0932697d1 | 41f71faa6efff7774a76bbd5af3198322a90a6ab | refs/heads/master | 2023-09-04T03:45:54.023899 | 2023-08-22T03:31:21 | 2023-08-22T03:31:21 | 109,625,584 | 308 | 108 | Apache-2.0 | 2023-08-22T03:31:23 | 2017-11-05T23:30:40 | Python | UTF-8 | Python | false | false | 2,315 | py | args.py | # Copyright 2021 Sony Corporation.
# Copyright 2021 Sony Group Corporation.
#
# 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 requi... |
2b3bda4c8b499391329a679bf3b114c519f977a2 | a3d6556180e74af7b555f8d47d3fea55b94bcbda | /tools/usb_gadget/usb_descriptors_test.py | 3e8067f53509b868ad9ecc773799134ab9973c42 | [
"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 | 6,799 | py | usb_descriptors_test.py | #!/usr/bin/env python
# Copyright 2014 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import unittest
import hid_constants
import usb_descriptors
class DescriptorWithField(usb_descriptors.Descriptor):
pass
DescriptorWithField.AddField('b... |
2107be3dcb502f9de2a275f0a86aee40891c5519 | 99d79ada2d3b7746573f071823ec61f5f853d7a3 | /tests/update_golds.py | 749dc9159b829abb30d26a06f143fffa8c779d95 | [
"MIT"
] | permissive | phanrahan/magma | d8062c6163e2c2c2cedef82317dc8cc40038220a | b05fe5303ed17e668c6ec2ec3558cd5a52eff787 | refs/heads/master | 2023-08-23T18:08:22.494869 | 2023-08-08T18:53:05 | 2023-08-17T16:16:44 | 84,332,281 | 227 | 21 | NOASSERTION | 2023-09-14T21:32:19 | 2017-03-08T14:57:09 | Python | UTF-8 | Python | false | false | 663 | py | update_golds.py | """
Expected to be run from repo root
"""
import shutil
import os
def copy_golds(dir_path):
for f in os.listdir(os.path.join(dir_path, "gold")):
try:
shutil.copy(
os.path.join(dir_path, "build", f),
os.path.join(dir_path, "gold", f)
)
except ... |
3871226a0a9e134eedd1640ff2697db3091b2812 | fa1ad2e2ac7e376fc7cb3b3a6e1bb88eed3e80be | /dts/airbyte/airbyte-integrations/connectors/source-tempo/source_tempo/__init__.py | 46ea9332ff05f280bf2cc16dafac48e37b54469a | [
"MIT",
"Elastic-2.0",
"Apache-2.0",
"BSD-3-Clause"
] | permissive | alldatacenter/alldata | 7bc7713c9f1d56ad6b8e59ea03206d1073b7e047 | 8d5f9a2d49ab8f9e85ccf058cb02c2fda287afc6 | refs/heads/master | 2023-08-05T07:32:25.442740 | 2023-08-03T13:17:24 | 2023-08-03T13:17:24 | 213,321,771 | 774 | 250 | Apache-2.0 | 2023-09-06T17:35:32 | 2019-10-07T07:36:18 | null | UTF-8 | Python | false | false | 59 | py | __init__.py | from .source import SourceTempo
__all__ = ["SourceTempo"]
|
fda0958faa0b20df943ed591064023f27b2eda53 | 6c066611b11a8de5e2c22c30cfcc578a4c49edce | /Utility/WaveForm/WaveForm.py | 6e4d0a93ad3013c7b7d03255aa96bbc13ad7f1db | [] | no_license | NatronGitHub/natron-plugins | ad2d9227637b4b86b45f92856fa54d327872a0a6 | b0c499fb6391024f54be9f26ed41b5cf7475d574 | refs/heads/master | 2022-12-12T10:02:20.252222 | 2022-11-30T02:29:04 | 2022-11-30T02:29:04 | 130,576,224 | 332 | 67 | null | 2022-11-30T02:29:05 | 2018-04-22T14:39:29 | Python | UTF-8 | Python | false | false | 12,839 | py | WaveForm.py | # -*- coding: utf-8 -*-
# DO NOT EDIT THIS FILE
# This file was automatically generated by Natron PyPlug exporter version 10.
# Hand-written code should be added in a separate file named WaveFormExt.py
# See http://natron.readthedocs.org/en/master/groups.html#adding-hand-written-code-callbacks-etc
# Note that Viewers ... |
c63cb5ee6c88757f99046e35bea84a5373ecc517 | 3a6a211ea0d32405497fbd6486c490bb147e25f9 | /third_party/google-endpoints/apitools/base/protorpclite/descriptor_test.py | fc27ec4171552d57525ad5685c269938be9fa74f | [
"Apache-2.0",
"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 | 17,140 | py | descriptor_test.py | #!/usr/bin/env python
#
# Copyright 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... |
be95059d16202913753f619b854da87b17da9b30 | afd2087e80478010d9df66e78280f75e1ff17d45 | /test/onnx/internal/test_beartype.py | a2bef90510d7400957e2c977b0e2ab175452397d | [
"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 | 2,783 | py | test_beartype.py | # Owner(s): ["module: onnx"]
"""Unit tests for the internal beartype wrapper module."""
import unittest
from torch.onnx._internal import _beartype
from torch.testing._internal import common_utils
def beartype_installed():
try:
import beartype # noqa: F401
except ImportError:
return False
... |
281332ad10199cd735348c869372239ecedc40fc | d571d407cfda435fcab8b7ccadb1be812c7047c7 | /guild/flag_util.py | ec50b6a2bf8f48fa03c949684eac515f507ad629 | [
"Apache-2.0",
"LicenseRef-scancode-free-unknown"
] | permissive | guildai/guildai | 2d8661a2a6bf0d1ced6334095c8bf5a8e391d8af | 149055da49f57eaf4aec418f2e339c8905c1f02f | refs/heads/main | 2023-08-25T10:09:58.560059 | 2023-08-12T20:19:05 | 2023-08-12T20:19:05 | 105,057,392 | 833 | 86 | Apache-2.0 | 2023-08-07T19:34:27 | 2017-09-27T18:57:50 | Python | UTF-8 | Python | false | false | 13,026 | py | flag_util.py | # Copyright 2017-2023 Posit Software, PBC
#
# 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 ... |
d813a6e62d6cb32edddfa963aa0525ebe0a24b58 | ac235a23f22be0d6f1818bb53902177f9969813a | /tests/contrib/sqlalchemy/test_sqlite.py | be4a6711b89777cf994307f5d4783899aa01e757 | [
"Apache-2.0",
"BSD-3-Clause"
] | permissive | DataDog/dd-trace-py | f09d6d48c4c69aea68f999fc8a458ade5c6150cf | 1e3bd6d4edef5cda5a0831a6a7ec8e4046659d17 | refs/heads/1.x | 2023-09-01T20:25:26.746324 | 2023-09-01T18:54:37 | 2023-09-01T18:54:37 | 61,572,326 | 461 | 426 | NOASSERTION | 2023-09-14T20:38:57 | 2016-06-20T18:52:23 | Python | UTF-8 | Python | false | false | 1,922 | py | test_sqlite.py | import pytest
from sqlalchemy.exc import OperationalError
from ddtrace.constants import ERROR_MSG
from tests.utils import TracerTestCase
from tests.utils import assert_is_measured
from .mixins import SQLAlchemyTestMixin
class SQLiteTestCase(SQLAlchemyTestMixin, TracerTestCase):
"""TestCase for the SQLite engine... |
9470cd583d73a980e7599337ee8552f6f4a6c1ad | 1095cfe2e29ddf4e4c5e12d713bd12f45c9b6f7d | /src/cpu/testers/directedtest/RubyDirectedTester.py | b9297b058b7266b7353f296e359080fba9ca10c6 | [
"BSD-3-Clause",
"LicenseRef-scancode-proprietary-license",
"LGPL-2.0-or-later",
"MIT"
] | permissive | gem5/gem5 | 9ec715ae036c2e08807b5919f114e1d38d189bce | 48a40cf2f5182a82de360b7efa497d82e06b1631 | refs/heads/stable | 2023-09-03T15:56:25.819189 | 2023-08-31T05:53:03 | 2023-08-31T05:53:03 | 27,425,638 | 1,185 | 1,177 | BSD-3-Clause | 2023-09-14T08:29:31 | 2014-12-02T09:46:00 | C++ | UTF-8 | Python | false | false | 3,029 | py | RubyDirectedTester.py | # Copyright (c) 2010 Advanced Micro Devices, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met: redistributions of source code must retain the above copyright
# notice, this list of conditions... |
d0757147625278d8ad6ad6a39b3b125d09c443c3 | 187414dcb264fb49d82507a099fd5fdca6e55e38 | /python/pyspark/pandas/config.py | 79cb859faa2fca7ac559a3da710356cd5c1f9fcf | [
"BSD-3-Clause",
"CC0-1.0",
"CDDL-1.1",
"Apache-2.0",
"LicenseRef-scancode-public-domain",
"BSD-2-Clause",
"LicenseRef-scancode-unknown-license-reference",
"EPL-2.0",
"CDDL-1.0",
"MIT",
"LGPL-2.0-or-later",
"Python-2.0",
"LicenseRef-scancode-generic-cla",
"LicenseRef-scancode-free-unknown",... | permissive | apache/spark | 8aeba2d80465a262acc95781ede105a5b5886f6d | 60d8fc49bec5dae1b8cf39a0670cb640b430f520 | refs/heads/master | 2023-09-04T04:33:36.058199 | 2023-09-04T03:48:52 | 2023-09-04T03:48:52 | 17,165,658 | 39,983 | 32,449 | Apache-2.0 | 2023-09-14T19:46:24 | 2014-02-25T08:00:08 | Scala | UTF-8 | Python | false | false | 18,493 | py | config.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 us... |
19fd9b8b5d114084a0ec408bb3526b63cc61bb1b | 9302b341ccdc78745a97ee3d2cd3c0e8ba3f80c9 | /tests/fields/test_migrations_encrypted_default/0002_integerencryptedmodel_field_2.py | 2bec6bf229b6a09a82bf42868cacb39780453a72 | [] | permissive | georgemarshall/django-cryptography | 04188b94c9ed8d8a61c82c8382427510d85ff5b9 | e2a42e1132fa28526002983063febaabbecdd660 | refs/heads/master | 2023-04-29T14:48:52.475078 | 2023-04-19T03:52:52 | 2023-04-19T03:52:52 | 52,944,543 | 359 | 70 | BSD-3-Clause | 2023-09-11T05:09:52 | 2016-03-02T07:55:01 | Python | UTF-8 | Python | false | false | 497 | py | 0002_integerencryptedmodel_field_2.py | from django.db import migrations, models
import django_cryptography.fields
class Migration(migrations.Migration):
dependencies = [
("fields", "0001_initial"),
]
operations = [
migrations.AddField(
model_name="integerencrypteddefaultmodel",
name="field_2",
... |
3ab9babcaa4a669aab947bf1b0369645bd4e3b30 | eb9f655206c43c12b497c667ba56a0d358b6bc3a | /python/testData/inspections/ChainedComparison5.py | 7bd80dd74807791c627737357c09d3538f0b64e0 | [
"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 | 164 | py | ChainedComparison5.py | mapsize = 35
def test(x, y):
if <weak_warning descr="Simplify chained comparison">0 <= x < <caret>mapsize and y >= 0 and y < mapsize</weak_warning>:
return 1 |
c977a1ed27694d5ad8d668a6a1a791f1cd18d673 | 267ec08897c53cab1c3781ba0b6d061cb4410e84 | /hypertools/tools/format_data.py | bdd7b4f626d2d1e18508570b431fba32f989f1d9 | [
"MIT"
] | permissive | ContextLab/hypertools | dd0fa798296b7b9b9d5f17a37086465ade6ca6a0 | 564c1d43da447da68ce3d76f51306725291630e0 | refs/heads/master | 2023-08-25T07:28:00.791443 | 2022-02-12T02:32:06 | 2022-02-12T02:32:06 | 69,400,415 | 1,768 | 189 | MIT | 2023-08-06T22:25:57 | 2016-09-27T21:31:25 | Python | UTF-8 | Python | false | false | 7,299 | py | format_data.py | import warnings
import numpy as np
from .._externals.ppca import PPCA
from .._shared.helpers import get_type
def format_data(x, vectorizer='CountVectorizer',
semantic='LatentDirichletAllocation', corpus='wiki', ppca=True, text_align='hyper'):
"""
Formats data into a list of numpy arrays
... |
80123be9221de26d1b01c1591c021276f20240cd | 6a468c1650b3c083f102f19ace0b0d6e4d0686f7 | /sympy/physics/quantum/matrixutils.py | 081db881e56789c6a802c3a599a5d3f5f1bd465f | [
"BSD-3-Clause",
"MIT"
] | permissive | sympy/sympy | a5f8accaa7686c59d9b5c94212fef60d746dac4b | 69f98fb2b0d845e76874067a381dba37b577e8c5 | refs/heads/master | 2023-09-01T15:51:37.886107 | 2023-08-31T20:54:33 | 2023-08-31T20:54:33 | 640,534 | 10,928 | 5,362 | NOASSERTION | 2023-09-14T17:29:13 | 2010-04-30T20:37:14 | Python | UTF-8 | Python | false | false | 8,213 | py | matrixutils.py | """Utilities to deal with sympy.Matrix, numpy and scipy.sparse."""
from sympy.core.expr import Expr
from sympy.core.numbers import I
from sympy.core.singleton import S
from sympy.matrices.matrices import MatrixBase
from sympy.matrices import eye, zeros
from sympy.external import import_module
__all__ = [
'numpy_n... |
b25d847d29acf65738fef2d9dabdf7491fbfcf48 | fce81b804cae23f525a5ad4370b684bf0dc531a5 | /numpy/lib/tests/test_utils.py | bceff04d518516c0c3852f285fe11c12b2077a20 | [
"Zlib",
"BSD-3-Clause",
"MIT",
"Apache-2.0"
] | permissive | numpy/numpy | ba2abcc1d2d46affbb6aabe5aed6407b4b57507e | dc2ff125493777a1084044e6cd6857a42ee323d4 | refs/heads/main | 2023-09-05T10:10:52.767363 | 2023-09-04T18:03:29 | 2023-09-04T18:03:29 | 908,607 | 25,725 | 11,968 | BSD-3-Clause | 2023-09-14T21:26:09 | 2010-09-13T23:02:39 | Python | UTF-8 | Python | false | false | 3,383 | py | test_utils.py | import pytest
import numpy as np
from numpy.testing import assert_equal, assert_raises_regex
import numpy.lib._utils_impl as _utils_impl
from io import StringIO
class TestByteBounds:
def test_byte_bounds(self):
# pointer difference matches size * itemsize
# due to contiguity
a = np.aran... |
9230911ea271d4eb8b5de679928a924b7d44f20e | dbb120cceaed09027f250bedbb6f5a8c5d4c71f5 | /netket/vqs/mc/mc_mixed_state/expect_chunked.py | 1631035b8933f01571f99480fa311163f6cdfde1 | [
"Apache-2.0"
] | permissive | netket/netket | b0ec4dc6e0ed5493299a38b8dbfd06e9f946e3b3 | f4f2844739302fd7e044b722eae8a93d0bfc59ec | refs/heads/master | 2023-08-29T12:03:29.446789 | 2023-08-20T10:21:41 | 2023-08-20T10:21:41 | 130,741,783 | 467 | 181 | Apache-2.0 | 2023-09-14T20:40:47 | 2018-04-23T18:48:08 | Python | UTF-8 | Python | false | false | 1,228 | py | expect_chunked.py | # Copyright 2021 The NetKet 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 ... |
4e96246e4047cd51ea1d795778c07e7ea18864e4 | 8d1c7fba7cd15f8a1e33fd27d11eefd1c67d579f | /examples/py_native/fail.py | 98e35f4ee7fc093b1230ebaef82c1b11ffa8b1a2 | [
"Apache-2.0"
] | permissive | bazelbuild/bazel | 5896162455f032efc899b8de60aa39b9d2cad4a6 | 171aae3f9c57b41089e25ec61fc84c35baa3079d | refs/heads/master | 2023-08-22T22:52:48.714735 | 2023-08-22T18:01:53 | 2023-08-22T18:01:53 | 20,773,773 | 20,294 | 4,383 | Apache-2.0 | 2023-09-14T18:38:44 | 2014-06-12T16:00:38 | Java | UTF-8 | Python | false | false | 278 | py | fail.py | """A tiny example binary for the native Python rules of Bazel."""
import unittest
from examples.py_native.lib import GetNumber
class TestGetNumber(unittest.TestCase):
def test_fail(self):
self.assertEquals(GetNumber(), 0)
if __name__ == '__main__':
unittest.main()
|
a56e1d1f8a492a53bbe2140715bfcf9390546af4 | 568a2667a1b6ec33a0dec9ac01844ef74e11ab2b | /landlab/graph/voronoi/dual_voronoi.py | a412ae608dc69efde575f1754fe451b6505e58b9 | [
"MIT"
] | permissive | landlab/landlab | 0bcc9b7b1d8c4d7f79bad687e1526b80ebc83728 | 1cd72e5832ece1aa922cd1b239e2e94ed0f11f8b | refs/heads/master | 2023-08-31T07:24:21.545523 | 2023-08-29T18:51:06 | 2023-08-29T18:51:06 | 19,599,383 | 326 | 313 | MIT | 2023-09-14T19:12:23 | 2014-05-09T04:52:50 | Python | UTF-8 | Python | false | false | 2,475 | py | dual_voronoi.py | import numpy as np
from ..dual import DualGraph
from ..graph import Graph
from .voronoi import DelaunayGraph
from .voronoi_to_graph import VoronoiDelaunayToGraph
class DualVoronoiGraph(DualGraph, DelaunayGraph):
def __init__(
self, node_y_and_x, max_node_spacing=None, sort=False, perimeter_links=None
... |
6740e921a0b962ca4b2c9c0799628085a7833cc0 | a3d6556180e74af7b555f8d47d3fea55b94bcbda | /third_party/protobuf/python/google/protobuf/internal/message_factory_test.py | 97ef3aab52ab1b0752b7ee0f513bf083528fe9a5 | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-protobuf",
"GPL-1.0-or-later",
"MIT",
"LGPL-2.0-or-later",
"Apache-2.0"
] | permissive | chromium/chromium | aaa9eda10115b50b0616d2f1aed5ef35d1d779d6 | a401d6cf4f7bf0e2d2e964c512ebb923c3d8832c | refs/heads/main | 2023-08-24T00:35:12.585945 | 2023-08-23T22:01:11 | 2023-08-23T22:01:11 | 120,360,765 | 17,408 | 7,102 | BSD-3-Clause | 2023-09-10T23:44:27 | 2018-02-05T20:55:32 | null | UTF-8 | Python | false | false | 10,237 | py | message_factory_test.py | # Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# https://developers.google.com/protocol-buffers/
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redi... |
dac9722e63f41fa2372719d1f855c842eaacbfc9 | 444a9480bce2035565332d4d4654244c0b5cd47b | /research/cv/ICNet/infer/sdk/main_icnet_mindspore.py | e1cc276a167d235096018f884a009aca992cc674 | [
"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 | 6,622 | py | main_icnet_mindspore.py | # Copyright 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
#
# less required by applicable law or agreed to i... |
ebbb367d5543a3f58878d36d974d0457e0310e77 | e8378466a24fb0fe0a1e9bf1af7f41b77d2c20b4 | /hoomd/data/local_access.py | 0e9180bb8aff20e011adc73d8f1322b9808d0822 | [
"BSD-3-Clause"
] | permissive | glotzerlab/hoomd-blue | eeabed0fee10a76b50d99b94ae0e93d3dc1d8037 | abdd76bc854358426e4cf055badd27f80df6ec85 | refs/heads/trunk-patch | 2023-09-02T21:32:24.986845 | 2023-08-22T19:02:21 | 2023-08-22T19:02:21 | 147,663,007 | 287 | 131 | BSD-3-Clause | 2023-09-08T11:59:16 | 2018-09-06T11:23:27 | C++ | UTF-8 | Python | false | false | 15,393 | py | local_access.py | # Copyright (c) 2009-2023 The Regents of the University of Michigan.
# Part of HOOMD-blue, released under the BSD 3-Clause License.
"""Access simulation state data directly."""
from abc import ABC, abstractmethod
from hoomd import Box
from hoomd import _hoomd
class _LocalAccess(ABC):
__slots__ = ('_entered', '_... |
c3481926069b027d454222f81b9c80698610d3bd | 499f5402baed77d000c65f243b457c69dc3d2fe4 | /pycatia/mec_mod_interfaces/vertex.py | 02bc66b1ab761eaecd45eee1a87899fe88bc875d | [
"MIT"
] | permissive | evereux/pycatia | 416189b34f3c60effea8a76258e36ffc5ae86e22 | 5f5726d5dc66265b3eba8a01910c4aeae424365d | refs/heads/master | 2023-08-21T10:03:41.660445 | 2023-08-09T16:21:10 | 2023-08-09T16:21:10 | 159,069,580 | 141 | 42 | MIT | 2023-08-09T11:15:27 | 2018-11-25T20:04:31 | Python | UTF-8 | Python | false | false | 3,584 | py | vertex.py | #! usr/bin/python3.9
"""
Module initially auto generated using V5Automation files from CATIA V5 R28 on 2020-06-11 12:40:47.360445
.. warning::
The notes denoted "CAA V5 Visual Basic Help" are to be used as reference only.
They are there as a guide as to how the visual basic / catscript function... |
600c3b7174a5f9b1ff01af07d0f5cb9d95eb36e2 | a902290fb3b911676358ae4d93f83061a6c2bd0f | /InvenTree/stock/api.py | 961ac7149ab0b2d5eddf566056953299f36eee2f | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | inventree/InvenTree | a15e54182c9bfafdf5348cc9a66da1004e23e760 | e88a8e99a5f0b201c67a95cba097c729f090d5e2 | refs/heads/master | 2023-09-03T19:32:35.438375 | 2023-08-30T00:25:40 | 2023-08-30T00:25:40 | 85,894,461 | 3,077 | 549 | MIT | 2023-09-14T14:21:01 | 2017-03-23T01:44:10 | Python | UTF-8 | Python | false | false | 50,871 | py | api.py | """JSON API for the Stock app."""
from collections import OrderedDict
from datetime import datetime, timedelta
from django.core.exceptions import ValidationError as DjangoValidationError
from django.db import transaction
from django.db.models import F, Q
from django.http import JsonResponse
from django.urls import in... |
2fd97b4db52b2429656f48f75313b216ba8aeec8 | d125dc644ecb37c014c771c02549c1ebf35eca4d | /experiment/scheduler.py | 0d9da0b22302ed86be7b12749917d370676a3a39 | [
"Apache-2.0"
] | permissive | google/fuzzbench | 316d28b2eff2015fe2f479668151b3259bfa2579 | ff8ef0c6da62268521061a432c5b9e228c2f53dc | refs/heads/master | 2023-09-04T11:04:20.324945 | 2023-08-29T17:37:10 | 2023-08-29T17:37:10 | 238,105,619 | 1,005 | 402 | Apache-2.0 | 2023-09-13T15:07:49 | 2020-02-04T02:22:18 | Python | UTF-8 | Python | false | false | 35,428 | py | scheduler.py | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... |
039267fe91689df239e27d159d0e4734ac90df04 | 57c77e6ca4867fe03f733c4b0778491c7042154b | /rlcard/agents/dmc_agent/__init__.py | ee835ad15988cec4e2692c978d7e222d0c116138 | [
"MIT"
] | permissive | datamllab/rlcard | 60754423478a8854c0d3af6e3766c1c6f6ffb855 | 7fc56edebe9a2e39c94f872edd8dbe325c61b806 | refs/heads/master | 2023-08-17T06:01:08.615989 | 2023-07-11T22:19:45 | 2023-07-11T22:19:45 | 206,562,316 | 2,447 | 639 | MIT | 2023-07-11T22:19:46 | 2019-09-05T12:48:01 | Python | UTF-8 | Python | false | false | 32 | py | __init__.py | from .trainer import DMCTrainer
|
509aa14ddc61d419cb4ac2f230b5da435098a7d9 | 814023cb1f3f8d12f9093179ae23ac8e4a495a6d | /ch10/code/Ch10-04_drapeOrtho.py | f3201714a588e89914b3b1607e73554814e86a51 | [
"MIT"
] | permissive | mdiener21/python-geospatial-analysis-cookbook | 45904a8b17f40f44a2de826fa27f71f2b942438e | 0c10a32df428dab719d1a0333854fccdbab3309b | refs/heads/master | 2023-03-30T05:14:30.194194 | 2023-03-17T15:10:39 | 2023-03-17T15:10:39 | 23,821,605 | 124 | 51 | MIT | 2023-03-17T15:10:40 | 2014-09-09T06:12:11 | JavaScript | UTF-8 | Python | false | false | 1,137 | py | Ch10-04_drapeOrtho.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import subprocess
from PIL import Image
from jinja2 import Environment, FileSystemLoader
# convert from Canada UTM http://epsg.io/3157/map to 3857
subprocess.call("gdalwarp -s_srs EPSG:3157 -t_srs EPSG:3857 -overwrite "
"-te -13664479.091 6446253.250 -... |
6eb0ea083ea864949b10caaf79d168ccc0449ce8 | 66bc394ad0aeb94298c9b0a0d16812d5408332e9 | /torchgeo/trainers/segmentation.py | e0497de1b9c2a0bdab7bdb95c3fbd64628cb9dd8 | [
"MIT"
] | permissive | microsoft/torchgeo | e058a74ef51ba29aefd6ba8f0eb5e6070db310a7 | 29985861614b3b93f9ef5389469ebb98570de7dd | refs/heads/main | 2023-08-20T01:11:41.549866 | 2023-08-18T22:58:31 | 2023-08-18T22:58:31 | 369,428,935 | 1,724 | 225 | MIT | 2023-09-14T20:33:24 | 2021-05-21T05:58:56 | Python | UTF-8 | Python | false | false | 12,820 | py | segmentation.py | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
"""Segmentation tasks."""
import os
import warnings
from typing import Any, cast
import matplotlib.pyplot as plt
import segmentation_models_pytorch as smp
import torch
import torch.nn as nn
from lightning.pytorch import Lig... |
ba0171e978fb5a0d528328e8ba964f4e88794603 | c159bf835977682178e399b855eba40306b30c5c | /models/model.py | 07647af8528b3cc71127f5dde5af59189a003412 | [
"MIT"
] | permissive | nicolasbonnici/cryptobot | 0a4b2351f274d629397638eb1f8bfce740dc1cda | 78bdf1e31916eb7f2b4899e398712a53b009c744 | refs/heads/develop | 2023-07-07T08:46:30.003275 | 2021-08-10T18:00:42 | 2021-08-10T18:00:42 | 336,254,511 | 210 | 96 | MIT | 2021-08-10T18:00:43 | 2021-02-05T11:38:45 | Python | UTF-8 | Python | false | false | 192 | py | model.py | from api.rest import Rest
class AbstractModel(Rest):
resource_name = ''
def __init__(self, **kwargs):
for key, value in kwargs.items():
setattr(self, key, value) |
2deb68ce5bea0b30a3d64a32c8f903d81502341b | 6923f79f1eaaba0ab28b25337ba6cb56be97d32d | /Python_Scripting_for_Computational_Science_Third_Edition/py/regex/realre.py | dd564b3ba7d3ae0ae1bc3477153fd78d9c4601b7 | [] | no_license | burakbayramli/books | 9fe7ba0cabf06e113eb125d62fe16d4946f4a4f0 | 5e9a0e03aa7ddf5e5ddf89943ccc68d94b539e95 | refs/heads/master | 2023-08-17T05:31:08.885134 | 2023-08-14T10:05:37 | 2023-08-14T10:05:37 | 72,460,321 | 223 | 174 | null | 2022-10-24T12:15:06 | 2016-10-31T17:24:00 | Jupyter Notebook | UTF-8 | Python | false | false | 1,521 | py | realre.py | #!/usr/bin/env python
"""
This file exemplifies regular expressions for real numbers
"""
import re
# real number in integer notation:
real_in = r'-?\d+'
# real number in scientific notation:
real_sn = r'-?[0-9](\.[0-9]+|)[Ee][+\-][0-9][0-9]?'
# or
real_sn = r'-?\d(\.\d+|)[Ee][+\-]\d\d?'
# or with embedded comments:
... |
01680083a1dfe73faed550d6295e8f1ab56dc864 | 0ba2e5061577f6286ff9265ef1df9aca96769445 | /math/prime_sieve/python/prime_sieve.py | ff8d0b31881e11e7d4ae87f48679eb26dec1f076 | [
"CC0-1.0"
] | permissive | ZoranPandovski/al-go-rithms | 68d5d02f80a61de9baf8e50a81a52e7d0b3983a0 | 4ae6ba54e90af14af236e03e435eb0402dcac787 | refs/heads/master | 2023-09-04T16:04:04.321676 | 2023-06-06T15:22:16 | 2023-06-06T15:22:16 | 93,438,176 | 1,421 | 2,445 | CC0-1.0 | 2023-06-15T14:24:28 | 2017-06-05T19:20:20 | Jupyter Notebook | UTF-8 | Python | false | false | 194 | py | prime_sieve.py | from __future__ import print_function
limit = int(input("enter limit: "))
for prime in range(2, limit + 1):
if all(prime % i != 0 for i in range(2, prime)):
print(prime)
|
8a1640b7feba30b3ef221677a8d01abcc0319a47 | cc8416a20b3aa9832dabf29112e52b5dfb367157 | /stable_nalu/abstract/__init__.py | f8655f4f69fd08e98fc547b82a36043bafc46e5b | [
"MIT"
] | permissive | AndreasMadsen/stable-nalu | ff877592ec965dca49a48bf94b38e343ba407411 | b3296ace137ffa4854edeef3759f1578b7650210 | refs/heads/master | 2023-05-22T04:53:17.495712 | 2021-08-19T18:15:14 | 2021-08-19T18:23:45 | 177,330,156 | 149 | 19 | MIT | 2020-01-15T08:06:12 | 2019-03-23T19:13:34 | HTML | UTF-8 | Python | false | false | 56 | py | __init__.py |
from ._extended_torch_module import ExtendedTorchModule |
9349884f3c926d101cb48ed9ce06501a43b62438 | 7366f1c45b27eb5bb314fe65f53a474f22dcfb94 | /haystack/panels.py | 778954f18f62827cef9cc6174f347fcba38f2c3f | [
"BSD-3-Clause",
"MIT"
] | permissive | django-haystack/django-haystack | 6cbb4e35ad13894bbf19c16dbf024bd818eda4f7 | 7fabd6215f9267e9911f0867a2d50537b6a1dbc5 | refs/heads/master | 2023-08-25T01:07:28.096704 | 2023-08-22T09:02:14 | 2023-08-22T09:02:14 | 117,549 | 2,249 | 934 | NOASSERTION | 2023-09-12T11:35:43 | 2009-01-29T20:23:57 | Python | UTF-8 | Python | false | false | 2,823 | py | panels.py | from debug_toolbar.panels import DebugPanel
from django.template.loader import render_to_string
from django.utils.translation import gettext_lazy as _
from haystack import connections
class HaystackDebugPanel(DebugPanel):
"""
Panel that displays information about the Haystack queries run while
processing... |
12e41d5f3ab2d4d7339f8c1a84877f747934a5d2 | 69b82fb05d1507426f6101fda29e3c0137ed313b | /tests/countries/test_romania.py | 1712e6e9c0edd2f1788460b6c3fdcb7c583085cf | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | dr-prodigy/python-holidays | e2313f71a08717decd70a71c1ac55beeb5605100 | f8c90952bf409703d0af5d89a202e21a90e2317f | refs/heads/master | 2023-08-24T21:25:55.852737 | 2023-08-21T18:48:00 | 2023-08-21T18:48:00 | 23,284,211 | 919 | 426 | null | null | null | null | UTF-8 | Python | false | false | 6,368 | py | test_romania.py | # python-holidays
# ---------------
# A fast, efficient Python library for generating country, province and state
# specific sets of holidays on the fly. It aims to make determining whether a
# specific date is a holiday as fast and flexible as possible.
#
# Authors: dr-prodigy <dr.prodigy.github@gmail.com> (c) 2... |
518582469cca5ce525b14b3e5ad7ae655355e20f | dfd9b83c93395e75d92be8d9ff5175174dafdd82 | /Server/integrations/deduce/PasswordlessAuthenticationWithDeduceImpossTravel.py | 3ed30499264e027f1d4647c4ffeb6ac19124d388 | [
"MIT"
] | permissive | GluuFederation/oxAuth | 1ebc5775da8762db1e59a7cbb0769b6fc3cf21fc | 0933f5ef56fc78d65cbec6e4a4310ffa3d175cec | refs/heads/master | 2023-08-23T16:09:14.123800 | 2023-08-01T07:39:01 | 2023-08-01T07:39:01 | 18,150,497 | 425 | 187 | MIT | 2023-09-07T11:04:16 | 2014-03-26T19:14:35 | Java | UTF-8 | Python | false | false | 24,980 | py | PasswordlessAuthenticationWithDeduceImpossTravel.py | # Author: Jose Gonzalez
# Author: Madhumita Subramaniam
from java.lang import System
from java.net import URLDecoder, URLEncoder
from java.util import Arrays, ArrayList, Collections, HashMap
from org.gluu.oxauth.service import ClientService
from org.gluu.service.net import NetworkService
from org.gluu.oxauth.service.... |
8070fb642d8a66f7a8492ca4f48cbbcf0c2d99a9 | e2f9f79e4fcbb398be6dab049197ad1fb71cb9cf | /python-threatexchange/threatexchange/cli/label_cmd.py | 7efb1301e3b75aee0b1ef1af1653308602a322eb | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | facebook/ThreatExchange | 4fbaca7fb4713ca84a64c11379ce44f6bde90f63 | 45dff06ba21f1afdb43a434c9ba0fc49e07b48d8 | refs/heads/main | 2023-09-05T23:08:36.580229 | 2023-09-01T10:21:37 | 2023-09-01T10:21:37 | 30,729,678 | 1,146 | 341 | NOASSERTION | 2023-09-14T18:08:08 | 2015-02-12T22:53:08 | C++ | UTF-8 | Python | false | false | 5,094 | py | label_cmd.py | # Copyright (c) Meta Platforms, Inc. and affiliates.
from argparse import ArgumentParser, ArgumentTypeError
import argparse
import pathlib
import typing as t
from threatexchange.cli.helpers import FlexFilesInputAction
from threatexchange.exchanges.fetch_state import SignalOpinion, SignalOpinionCategory
from threatex... |
f9dfc4a97b3f7549450b6077ad4c82829eea466c | abe6c00f9790df7e6ef20dc02d0b1b225b5020cb | /tests/server/models/test_block_schemas.py | db6cb32d5bf76b03b33c7c9d2962d5b0215a88ca | [
"Apache-2.0"
] | permissive | PrefectHQ/prefect | 000e6c5f7df80f76a181f0a30f8661c96417c8bd | 2c50d2b64c811c364cbc5faa2b5c80a742572090 | refs/heads/main | 2023-09-05T20:25:42.965208 | 2023-09-05T18:58:06 | 2023-09-05T18:58:06 | 139,199,684 | 12,917 | 1,539 | Apache-2.0 | 2023-09-14T20:25:45 | 2018-06-29T21:59:26 | Python | UTF-8 | Python | false | false | 35,476 | py | test_block_schemas.py | import warnings
from typing import List, Union
import pytest
import sqlalchemy as sa
from pydantic import BaseModel
from prefect.blocks.core import Block
from prefect.server import models, schemas
from prefect.server.models.block_schemas import read_block_schema_by_checksum
from prefect.server.schemas.filters import ... |
e35ed9d2dfc11f959757e020b614be4e19627b6f | e3bb1df7fa4c51900dec7e9ddf5295e1a80938bd | /test/hummingbot/strategy/__init__.py | 8daf8fe12da5f6df0cbfaed5ca3984479ffaa49a | [
"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 | 223 | py | __init__.py | from typing import Dict
from hummingbot.client.config.config_var import ConfigVar
def assign_config_default(config_map: Dict[str, ConfigVar]):
for key, value in config_map.items():
value.value = value.default
|
293a38ba2689ebfd8fc399bb33eecd0a8884d9a0 | 069c2295076c482afadfe6351da5ae02be8e18e6 | /tests/admin_widgets/widgetadmin.py | deb07adeccd6410c25cb5d596d0a896ac6fe0c47 | [
"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 | 1,589 | py | widgetadmin.py | from django.contrib import admin
from .models import (
Advisor,
Album,
Band,
Bee,
Car,
CarTire,
Event,
Inventory,
Member,
Profile,
ReleaseEvent,
School,
Student,
User,
VideoStream,
)
class WidgetAdmin(admin.AdminSite):
pass
class CarAdmin(admin.ModelA... |
0fbb8b331d90e9fa5a749458fbb54d4ff1c85fb6 | 5a52ccea88f90dd4f1acc2819997fce0dd5ffb7d | /alipay/aop/api/response/AlipayBossProdAntlegalchainNdalistQueryResponse.py | ee29d51f974944a3d750de1345da3b32695ed98a | [
"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 | 2,291 | py | AlipayBossProdAntlegalchainNdalistQueryResponse.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
from alipay.aop.api.domain.AntlcNdaProtocolSignRecordExtDO import AntlcNdaProtocolSignRecordExtDO
class AlipayBossProdAntlegalchainNdalistQueryResponse(AlipayResponse):
def __init__(self):... |
d24dba4c73600d07d14c55e7281d720c34f8123c | a5a99f646e371b45974a6fb6ccc06b0a674818f2 | /Geometry/EcalAlgo/python/EcalEndcapGeometryDBWriter_cfi.py | 13efc7afb3bc307f4537d5ff98d26c7197cc1b79 | [
"Apache-2.0"
] | permissive | cms-sw/cmssw | 4ecd2c1105d59c66d385551230542c6615b9ab58 | 19c178740257eb48367778593da55dcad08b7a4f | refs/heads/master | 2023-08-23T21:57:42.491143 | 2023-08-22T20:22:40 | 2023-08-22T20:22:40 | 10,969,551 | 1,006 | 3,696 | Apache-2.0 | 2023-09-14T19:14:28 | 2013-06-26T14:09:07 | C++ | UTF-8 | Python | false | false | 871 | py | EcalEndcapGeometryDBWriter_cfi.py | import FWCore.ParameterSet.Config as cms
EcalEndcapGeometryEP = cms.ESProducer("EcalEndcapGeometryEP",
applyAlignment = cms.bool(False),
appendToDataLabel = cms.string("_master")
)
_EcalEndcapGeometryEP_dd4hep = cms.ESProducer("EcalEndcapGeom... |
0f9e0b068044f61eff9afa6ca4242920e95f2d9a | 7895cbaced82455230c2bc4d42be5b3e4c67cab8 | /examples/plots/plot_axis_angle_from_two_vectors.py | 7c7e4a01cdc69cd36b3fcd8d2359cbf66069ac6f | [
"BSD-3-Clause"
] | permissive | dfki-ric/pytransform3d | 0ee7e37c92e7bd328f31813610a9797d296e3cd3 | cc923cd91417a41ab08b32278eeabc2e31ab6a93 | refs/heads/main | 2023-08-18T07:22:09.271385 | 2023-08-10T08:41:15 | 2023-08-10T08:45:10 | 91,809,394 | 168 | 25 | NOASSERTION | 2023-08-22T20:09:27 | 2017-05-19T13:35:08 | Python | UTF-8 | Python | false | false | 1,158 | py | plot_axis_angle_from_two_vectors.py | """
====================================================
Axis-Angle Representation from Two Direction Vectors
====================================================
This example shows how we can compute the axis-angle representation of a
rotation that transforms a direction given by a vector 'a' to a direction
given by ... |
865d3229794069e9ea85aaa300bcae4d4879006b | fa1ad2e2ac7e376fc7cb3b3a6e1bb88eed3e80be | /ai/modelscope/modelscope/preprocessors/nlp/space_T_en/fields/process_dataset.py | 88059351526f1e306fb17c60483de1ce84dd4542 | [
"Apache-2.0",
"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 | 2,111 | py | process_dataset.py | # Copyright (c) rhythmcao modified from https://github.com/rhythmcao/text2sql-lgesql.
import os
import pickle
import sys
from text2sql_lgesql.asdl.asdl import ASDLGrammar
from text2sql_lgesql.asdl.transition_system import TransitionSystem
sys.path.append(os.path.dirname(os.path.dirname(__file__)))
def process_exam... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.