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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
49963aa42eca0c8863f99f8888c7d9229730ffd2 | 7bc1d8634529eac952490399fb71f10bcedf05cc | /tests/scripts/thread-cert/test_dataset_updater.py | ba3bc9f13861baee0e942a912d33e08fc3157ea2 | [
"LicenseRef-scancode-warranty-disclaimer",
"BSD-3-Clause"
] | permissive | openthread/openthread | 6a9e25d1cd224bde9796d9616f04f423dba27d77 | 102a631cb3f8938389d0d10199a14c59184039cd | refs/heads/main | 2023-08-18T10:46:03.820124 | 2023-08-17T22:20:55 | 2023-08-17T22:20:55 | 55,808,787 | 3,485 | 1,296 | BSD-3-Clause | 2023-09-14T15:50:53 | 2016-04-08T20:47:41 | C++ | UTF-8 | Python | false | false | 4,104 | py | test_dataset_updater.py | #!/usr/bin/env python3
#
# Copyright (c) 2021, The OpenThread Authors.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright
# ... |
894b6dbb3db197cfedf462f6e8b299e95589eb00 | daa60221ed36dc8e20dd0a2a96521ffa2bdc94c5 | /simics/monitorCore/watchMarks.py | 50b2906a087a2a66a6735ee385ccc93addecea0f | [
"BSD-2-Clause"
] | permissive | mfthomps/RESim | 7dbddc1d46653c0443dec9c7930517753bbe5e78 | cc83ed799cd37934e1659e1d20abf6c36449e0bf | refs/heads/master | 2023-08-10T04:27:36.365806 | 2023-06-29T15:22:55 | 2023-06-29T15:22:55 | 183,653,459 | 160 | 30 | null | null | null | null | UTF-8 | Python | false | false | 53,929 | py | watchMarks.py | from simics import Sim_Trans_Load
import pickle
import json
import os
import sys
class CallMark():
def __init__(self, msg, max_len, recv_addr, length, fd, is_lib=False):
if recv_addr is not None:
if max_len is not None:
self.msg = '%s addr: 0x%x length: %d max_len: %d' % (msg, r... |
e6da989f8714a843e3acd3d6592f26f0f857ec86 | 38bed8ec0229b2d42ebdb33e09930ba8ee6ba5b7 | /scripts/download_model_urls.py | f5f53d71e98f1c0c82d74bdb5b6cca122c4090c2 | [
"BSD-3-Clause",
"CC-BY-NC-4.0"
] | permissive | pytorch/vision | 10443ac1eddf7a32ecb288fe8f58e28cab2a60a1 | 1f94320d8db8d102214a7dc02c22fa65ee9ac58a | refs/heads/main | 2023-09-06T03:48:02.303020 | 2023-09-04T18:25:36 | 2023-09-04T18:25:36 | 73,328,905 | 15,620 | 8,564 | BSD-3-Clause | 2023-09-14T17:52:49 | 2016-11-09T23:11:43 | Python | UTF-8 | Python | false | false | 1,382 | py | download_model_urls.py | import asyncio
import sys
from pathlib import Path
from time import perf_counter
from urllib.parse import urlsplit
import aiofiles
import aiohttp
from torchvision import models
from tqdm.asyncio import tqdm
async def main(download_root):
download_root.mkdir(parents=True, exist_ok=True)
urls = {weight.url for... |
b812f805d7535500bd75ad8a12c6564f8bd0a31a | 5a3f4e19b8c64410a9a974ddcd34090fb2430515 | /blogs/migrations/0080_auto_20230301_1332.py | 0b494d31a143e0f92263c89f82ab8825091307a5 | [
"MIT"
] | permissive | HermanMartinus/bearblog | daf41622097cc23378986695ae9c9a3e7ecd3696 | d5f326037e29658fed3c7b82439504ea7e8f1ab0 | refs/heads/master | 2023-09-01T02:52:22.226777 | 2023-08-29T09:02:14 | 2023-08-29T09:02:14 | 266,561,292 | 1,768 | 80 | MIT | 2023-05-02T10:32:57 | 2020-05-24T14:44:59 | CSS | UTF-8 | Python | false | false | 404 | py | 0080_auto_20230301_1332.py | # Generated by Django 3.1.14 on 2023-03-01 13:32
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('blogs', '0079_blog_order_id'),
]
operations = [
migrations.AlterField(
model_name='blog',
name='order_id',
... |
534f6b8fc606f9f8a6ef2076641440d6134f07d0 | fbbe424559f64e9a94116a07eaaa555a01b0a7bb | /Keras_tensorflow_nightly/source2.7/tensorflow/contrib/opt/python/training/sign_decay.py | e8870c072110da145c0bb78e20c3584083438ea0 | [
"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 | 5,800 | py | sign_decay.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... |
479117d0016c752444f0078a182e448896dc9090 | b04cc98a746d1df457183bc14908094a8be00ba1 | /demo/distillation/distill.py | 2adeae58dd2b4a5c8acc9720b035b3c4cb586f13 | [
"Apache-2.0"
] | permissive | PaddlePaddle/PaddleSlim | a3bcaef0c92016b7f6946d58787f87c7db8ff3f8 | bb02b103a89a09635941bc0bbbd38506d7412468 | refs/heads/develop | 2023-08-31T01:47:27.824722 | 2023-08-25T08:06:08 | 2023-08-25T08:06:08 | 228,290,594 | 1,534 | 402 | Apache-2.0 | 2023-08-29T09:37:55 | 2019-12-16T02:56:50 | Python | UTF-8 | Python | false | false | 9,850 | py | distill.py | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import sys
import math
import logging
import paddle
import argparse
import functools
import numpy as np
sys.path[0] = os.path.join(os.path.dirname("__file__"), os.path.pardir)
import models
from utili... |
978a709276b4af960bbed737b4ec7fe346df9992 | eb6be0dc3dd0c79483d55fcde59cff95f4f86acd | /graphgym/contrib/layer/sageinitconv.py | 1f08149c49f0974dae73e7f4f05e55f574407fbc | [
"MIT"
] | permissive | snap-stanford/GraphGym | 67e96085f53f50a9d9e4e231a8a4ab12f42e287c | daded21169ec92fde8b1252b439a8fac35b07d79 | refs/heads/master | 2023-08-17T01:10:15.725520 | 2023-03-14T23:02:49 | 2023-03-14T23:02:49 | 303,907,761 | 1,451 | 188 | NOASSERTION | 2023-07-26T02:43:43 | 2020-10-14T05:01:35 | Python | UTF-8 | Python | false | false | 4,353 | py | sageinitconv.py | import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.nn import Parameter
from torch_geometric.nn.conv import MessagePassing
from torch_geometric.nn.inits import glorot, zeros
from torch_geometric.utils import add_remaining_self_loops
from graphgym.register import register_layer
class SAGECon... |
eae3fcf35ec95c84b3b4101b4362d48c751450eb | 5a52ccea88f90dd4f1acc2819997fce0dd5ffb7d | /alipay/aop/api/domain/AbnTaskInfo.py | 95a0956a7c79d61c05ff4428d204dac2838ac658 | [
"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 | 7,182 | py | AbnTaskInfo.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.TaskOperationLog import TaskOperationLog
class AbnTaskInfo(object):
def __init__(self):
self._extens_info = None
self._gmt_create = None
self._gmt_mod... |
34c98707014e4a44b770efdbc560aaceaf7c458d | 3e63608e1cad90bc845c4580723e57ae7ca3f61d | /tests/data/okta/utils.py | 80068a08a10f245e8e84f7259146d96bd98990d5 | [
"Apache-2.0",
"LicenseRef-scancode-generic-cla"
] | permissive | lyft/cartography | 06dcbf13907cbb9a31b75cd8b21f5721f7cc1b01 | 830b8944879a01f52b21ee12b6fddf245f9733cb | refs/heads/master | 2023-08-31T12:27:59.752452 | 2023-08-28T20:42:12 | 2023-08-28T20:42:12 | 172,811,550 | 2,778 | 334 | Apache-2.0 | 2023-09-13T04:59:46 | 2019-02-27T00:16:29 | Python | UTF-8 | Python | false | false | 809 | py | utils.py | import time
from requests import Response
def create_response():
response = Response()
response.headers['x-rate-limit-limit'] = '300'
response.headers['x-rate-limit-remaining'] = '299'
response.headers['x-rate-limit-reset'] = str(int(time.time()) + 59)
return response
def create_throttled_respo... |
8080c41f86407c7f36dbb5937186f5a8508d897b | eda03521b87da8bdbef6339b5b252472a5be8d23 | /Meta/lint-ports.py | 4fb39e2eff7fac856219d473f82221328e62112e | [
"BSD-2-Clause"
] | permissive | SerenityOS/serenity | 6ba3ffb242ed76c9f335bd2c3b9a928329cd7d98 | ef9b6c25fafcf4ef0b44a562ee07f6412aeb8561 | refs/heads/master | 2023-09-01T13:04:30.262106 | 2023-09-01T08:06:28 | 2023-09-01T10:45:38 | 160,083,795 | 27,256 | 3,929 | BSD-2-Clause | 2023-09-14T21:00:04 | 2018-12-02T19:28:41 | C++ | UTF-8 | Python | false | false | 14,113 | py | lint-ports.py | #!/usr/bin/env python3
import os
import re
import stat
import sys
import subprocess
from pathlib import Path
from tempfile import NamedTemporaryFile
# Matches e.g. "| [`bash`](bash/) | GNU Bash | 5.0 | https://www.gnu.org/software/bash/ |"
# and captures "bash" in group 1, "bash/" in group 2, "<spaces>" in group 3, "... |
4db9a766c0d562201f6d132c93fa2561c0e2d3f4 | 6a7005ca7e418a18cbfeec296129873aef6446a4 | /DecryptLogin/__init__.py | 3966146cc6771ddc975e6982ab78c198aac28943 | [
"Apache-2.0"
] | permissive | CharlesPikachu/DecryptLogin | f0646d37e8604fb9c41dc74c17c0ea48cb5066ec | bb4228c0535ffd7060b7816cbd1da51ba8d95ab8 | refs/heads/master | 2023-05-22T15:21:59.038844 | 2022-08-29T08:59:05 | 2022-08-29T08:59:05 | 172,416,496 | 2,871 | 809 | Apache-2.0 | 2022-10-06T14:58:49 | 2019-02-25T01:57:20 | Python | UTF-8 | Python | false | false | 449 | py | __init__.py | '''版本号'''
__version__ = '0.3.9'
'''作者'''
__author__ = 'Charles'
'''标题'''
__title__ = 'DecryptLogin'
'''描述'''
__description__ = 'DecryptLogin: APIs for loginning some websites by using requests.'
'''链接'''
__url__ = 'https://github.com/CharlesPikachu/DecryptLogin'
'''邮件'''
__email__ = 'charlesblwx@gmail.com'
'''license''... |
198cceeb8347a4e278a82fb88fda9fb798d27292 | 3ab0ce5a37683744fca77c0ee7172eea7b839feb | /galpy/util/ars.py | 58c9892ffe6bfdd72c5f45468dc5d4830cc21302 | [
"BSD-3-Clause"
] | permissive | jobovy/galpy | 8ee6c00a2796e6bdb920625ce7c5cb32b47b5bc9 | a46619fd4f5979acfccad23f4d57503033f440c5 | refs/heads/main | 2023-08-25T04:18:39.588870 | 2023-08-14T02:34:26 | 2023-08-14T02:34:26 | 2,375,854 | 182 | 119 | BSD-3-Clause | 2023-09-11T03:28:59 | 2011-09-13T03:20:30 | Python | UTF-8 | Python | false | false | 15,787 | py | ars.py | #############################################################################
# Copyright (c) 2011, Jo Bovy
# 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 mus... |
68a443df7d426bb63c7fdc04bde250bba9b445ed | 20f125a17856c1251727314c571091a59bc770f0 | /Chapter 04/4.02/piece.py | 77f9bbb6f593ec22563b46e2b0509c024b65ca8d | [
"MIT"
] | permissive | PacktPublishing/Tkinter-GUI-Application-Development-Blueprints-Second-Edition | 310983285d54c59bdd02e69b9a913aa9372c869a | 1e160c0575028e446295c121a84142164ee5ced2 | refs/heads/master | 2023-07-10T05:34:39.159752 | 2023-01-30T09:20:16 | 2023-01-30T09:20:16 | 123,231,531 | 142 | 94 | MIT | 2023-07-03T23:09:32 | 2018-02-28T04:59:53 | Python | UTF-8 | Python | false | false | 1,121 | py | piece.py | """
Code illustration: 4.02
@ Tkinter GUI Application Development Blueprints
"""
from configurations import *
import exceptions
def create_piece (piece, color='white'):
if isinstance(piece, str):
if piece.upper() in SHORT_NAME.keys():
color = "white" if piece.isupper() else "black"
... |
b55392cb9b7fdd97444e6142995ac63269f81428 | bbd69601912a3361d788efd03a47f9d4e3bac09e | /docs/sphinx/rest_substitutions/snippets/python/converted/wx.propgrid.PGProperty.3.py | b7f0f65a052e8169d7d478cf55c358f8807141a1 | [] | no_license | wxWidgets/Phoenix | 56929484460a0399a8f1d9582bc77c20aa14748d | a1184286703cf24c4b88e5bc14cf2979c1b1ea00 | refs/heads/master | 2023-09-01T07:10:17.437093 | 2023-08-31T05:38:01 | 2023-08-31T05:38:01 | 5,078,061 | 2,268 | 677 | null | 2023-09-09T17:06:59 | 2012-07-17T06:22:25 | Python | UTF-8 | Python | false | false | 49 | py | wx.propgrid.PGProperty.3.py |
self.SetFlag(wx.propgrid.PG_PROP_NO_ESCAPE)
|
961f61f00e4e454e93c452be088594aaf02b3062 | d35f84342277856dff06e20bb4a433382f9f7f54 | /machine-learning-ui/jupyter_notebook_config.py | 4945cae84d8808ee948ebb9b6e437760cd33aa89 | [] | no_license | clearlinux/dockerfiles | 3d7f03f0948e8f9146b55794c2aaa290221d5b23 | 7c37f38dd540da9107854c1dea2609340978ba2d | refs/heads/master | 2022-12-28T15:31:30.529825 | 2022-09-30T23:20:10 | 2022-09-30T23:20:10 | 66,385,562 | 158 | 262 | null | 2021-12-17T16:30:23 | 2016-08-23T16:48:27 | Shell | UTF-8 | Python | false | false | 178 | py | jupyter_notebook_config.py | c = get_config()
c.ContentsManager.root_dir = "/root/"
c.NotebookApp.allow_root = True
c.NotebookApp.ip = '0.0.0.0'
c.NotebookApp.open_browser = False
c.NotebookApp.port = 8888
|
9a57adaf556646a0caa64f27e8cc8e1300a2b5bf | 5f1881006aaf4f3c2515f375ad29c15fd6612de2 | /interactive_text_to_sql/src/loss.py | 321ed87275f1bb64708930b5e706b0fd4f67acf6 | [
"MIT",
"LicenseRef-scancode-generic-cla",
"LicenseRef-scancode-proprietary-license",
"LicenseRef-scancode-free-unknown",
"LicenseRef-scancode-unknown-license-reference",
"LGPL-2.1-or-later",
"Apache-2.0",
"LicenseRef-scancode-public-domain",
"BSD-2-Clause"
] | permissive | microsoft/ContextualSP | 4edb598d40f683f9a1143b92a9d24e1066d51ec4 | 4198ebce942f4afe7ddca6a96ab6f4464ade4518 | refs/heads/master | 2023-08-02T22:08:40.503853 | 2023-07-14T07:22:50 | 2023-07-14T07:22:50 | 255,534,819 | 332 | 70 | MIT | 2023-07-25T19:23:48 | 2020-04-14T07:01:54 | Python | UTF-8 | Python | false | false | 5,515 | py | loss.py | # coding: utf-8
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
from src.utils.algo_utils import BipartiteGraphSolver
class HingeLoss(nn.Module):
def __init__(self, margin=0.6, aggregation='max', l1_norm_weight=0, entropy_norm_weight=0):
super(HingeLoss, self).__ini... |
86d20c146bf3ae8e4766a09dfa93311a0ab2b6a6 | 5a52ccea88f90dd4f1acc2819997fce0dd5ffb7d | /alipay/aop/api/domain/KoubeiRetailWmsWarehouseQueryModel.py | 0563209f7007070edfd9ebf9446b4b27ddd92894 | [
"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,122 | py | KoubeiRetailWmsWarehouseQueryModel.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.OperateContext import OperateContext
class KoubeiRetailWmsWarehouseQueryModel(object):
def __init__(self):
self._city_code = None
self._operate_context = None... |
924df92b9dc49ff124a0e07110337fb4de72d08c | 1fbee8652452fb9d12ff499433b23e4b57782c59 | /demo_trt.py | 7f096639d21823922f5e889a1fac5f9c2d9e6a24 | [
"Apache-2.0"
] | permissive | Tianxiaomo/pytorch-YOLOv4 | 9301a83b85c610dfdfb99f2cb0ea2ea35fe6f660 | a65d219f9066bae4e12003bd7cdc04531860c672 | refs/heads/master | 2023-09-02T04:40:58.172157 | 2021-12-12T12:11:07 | 2021-12-12T12:11:07 | 258,745,062 | 4,831 | 1,672 | Apache-2.0 | 2023-07-23T13:20:24 | 2020-04-25T10:11:33 | Python | UTF-8 | Python | false | false | 7,191 | py | demo_trt.py | import sys
import os
import time
import argparse
import numpy as np
import cv2
# from PIL import Image
import tensorrt as trt
import pycuda.driver as cuda
import pycuda.autoinit
from tool.utils import *
try:
# Sometimes python2 does not understand FileNotFoundError
FileNotFoundError
except NameError:
File... |
650039535f4d77b2f8dc7557b5f62f74e3667005 | 2ad93a1cf25a580fe980482d2d17a657de3b2523 | /django-stubs/db/utils.pyi | a04919a5e92e615590e28cf7dee6551d53feb24c | [
"MIT"
] | permissive | typeddjango/django-stubs | f35dfcb001e54694a0a1e8c0afcc6e6a3d130c32 | 0117348c3c7713f25f96b46e53ebdeed7bdba544 | refs/heads/master | 2023-08-25T19:42:52.707151 | 2023-08-23T15:13:25 | 2023-08-23T15:13:25 | 142,779,680 | 1,133 | 376 | MIT | 2023-09-13T19:05:06 | 2018-07-29T17:08:50 | Python | UTF-8 | Python | false | false | 2,061 | pyi | utils.pyi | from collections.abc import Iterable
from types import TracebackType
from typing import Any
from django.apps import AppConfig
from django.db.backends.base.base import BaseDatabaseWrapper
from django.db.models import Model
from django.utils.connection import BaseConnectionHandler
DEFAULT_DB_ALIAS: str
DJANGO_VERSION_P... |
255cad0c2701319ae4c1f9d71a6b64bde50f05a2 | ead6ec54c304046e8017289ecae2acb69f2e463d | /flotilla/datapackage.py | e24daa23ebd2e3e0bb9ccdca81e9fb2a750f3381 | [] | permissive | YeoLab/flotilla | 93e3576002f1b51917bc8576897d399176e1fa3a | 31da64567e59003c2b9c03fc8f4eb27ee62e299c | refs/heads/master | 2023-04-28T04:23:30.408159 | 2017-04-19T07:03:03 | 2017-04-19T07:03:03 | 19,319,564 | 104 | 27 | BSD-3-Clause | 2023-04-15T19:16:52 | 2014-04-30T16:14:31 | Jupyter Notebook | UTF-8 | Python | false | false | 8,322 | py | datapackage.py | """
Functions to deal with creation and loading of datapackages
"""
from __future__ import (absolute_import, division,
print_function, unicode_literals)
from six import iteritems
# Python 2 and 3 code for urllib module
# http://python-future.org/compatible_idioms.html
try:
from urllib.reque... |
b5dc868863f35b82be780114672828b24b1d6c19 | 70fec09ceb625608d561937955c285c0c39f6d95 | /tomodachi/invoker/__init__.py | da4dea0c2ac0c99114178f57ba099536c261e26a | [
"MIT"
] | permissive | kalaspuff/tomodachi | b285e2c73696d14e3c84a479745e00824fba7190 | deca849ec2b4cdc3d27f06e9ce0056fac0146a1a | refs/heads/master | 2023-08-31T00:32:12.042486 | 2023-08-21T13:02:24 | 2023-08-21T13:02:24 | 62,165,703 | 191 | 28 | MIT | 2023-09-11T23:32:51 | 2016-06-28T18:43:51 | Python | UTF-8 | Python | false | false | 270 | py | __init__.py | from .base import FUNCTION_ATTRIBUTE, INVOKER_TASK_START_KEYWORD, START_ATTRIBUTE, Invoker # noqa
from .decorator import decorator # noqa
__all__ = [
"FUNCTION_ATTRIBUTE",
"INVOKER_TASK_START_KEYWORD",
"START_ATTRIBUTE",
"Invoker",
"decorator",
]
|
1dbe4817643e74deeef7adb41c3f09f9ff870d46 | 529e713a78e82de2ae5d44cfb8ef209e0894d72a | /subprocess/basics_win.py | e7a2f9939d0e360b6fe518853ca08bb330f7621f | [
"MIT"
] | permissive | realpython/materials | cd2f548276be2c82f134ca03eadb1cd279e0f26e | d2d62756d3854f54a12a767f2bf9470486c0ceef | refs/heads/master | 2023-09-05T22:12:29.806738 | 2023-08-31T20:56:28 | 2023-08-31T20:56:28 | 132,374,697 | 4,678 | 6,482 | MIT | 2023-09-12T22:22:06 | 2018-05-06T20:46:18 | HTML | UTF-8 | Python | false | false | 498 | py | basics_win.py | """
**Only works on Windows**
Demonstrates basic usage of `subprocess.run()`.
"""
import subprocess
# https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/cmd
subprocess.run("dir", shell=True) # COMSPEC env variable
subprocess.run(["cmd.exe", "/c", "dir"])
# https://docs.microsoft.com/en... |
7136158ed013de9464ca51f7d2d06dbbc17a3fbb | d1f15554df2d5c0f74ddbcba6e870359841f682b | /wagtail/admin/views/pages/usage.py | d42a594e6f9a8f383134b79d2ac08647acd63cc1 | [
"BSD-3-Clause",
"LicenseRef-scancode-proprietary-license"
] | permissive | wagtail/wagtail | bd405f89b86e0c625fef0685fd6bfba41cf5cbfc | 06a7bc6124bf62675c09fbe0a4ed9bbac183e025 | refs/heads/main | 2023-09-04T06:22:51.601208 | 2023-09-01T15:22:00 | 2023-09-01T15:22:00 | 16,479,108 | 12,974 | 3,580 | BSD-3-Clause | 2023-09-14T10:45:04 | 2014-02-03T12:41:59 | Python | UTF-8 | Python | false | false | 2,858 | py | usage.py | from typing import Any, Dict
from django.contrib.contenttypes.models import ContentType
from django.core.exceptions import PermissionDenied
from django.http import Http404
from django.urls import reverse
from django.utils.translation import gettext_lazy as _
from wagtail.admin.ui.tables import Column, DateColumn
from... |
e4b0e2c36984dc8a4679add110cbbc68afdf8b2b | 4ad53199feb82d911bd2edbe0b5713da8c1909c1 | /test/writer/test_null_writer.py | 5dcee68fff85e0f5a2a2e601676be069189cfed4 | [
"MIT"
] | permissive | thombashi/pytablewriter | 9bf8b73da0eb18dba835e951021fd581958a4d12 | 49f9da777625a5b920c2c87c5e086d33d19a80d4 | refs/heads/master | 2023-08-19T05:13:15.333317 | 2023-07-01T08:03:47 | 2023-07-01T08:03:47 | 59,484,958 | 609 | 43 | MIT | 2021-09-20T15:26:45 | 2016-05-23T13:25:53 | Python | UTF-8 | Python | false | false | 1,397 | py | test_null_writer.py | """
.. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
"""
import pytablewriter
table_writer_class = pytablewriter.NullTableWriter
class Test_NullTableWriter_set_indent_level:
def test_smoke(self):
writer = table_writer_class()
writer.set_indent_level(0)
class Test_NullTableWrite... |
09d79324594e64cac05714709dc10d81ef3c233e | 94724578994ab1438dcefb51b7ef4d8570da5d4c | /z42/zapp/_WEB/model/ob.py | ce124b570396cf5c96b989ddc7b8b8b905fc33bb | [] | no_license | PegasusWang/collection_python | 6648d83203634abf44fd42c0b37b0bf7cc406d8f | 9ef019a737a0817860d3184924c67a0833bd1252 | refs/heads/master | 2023-09-01T23:15:39.813635 | 2023-08-24T06:46:12 | 2023-08-24T06:46:12 | 43,693,872 | 130 | 90 | null | 2021-04-26T15:12:55 | 2015-10-05T15:28:15 | JavaScript | UTF-8 | Python | false | false | 1,347 | py | ob.py | #!/usr/bin/env python
#coding:utf-8
import _env
from zapp._WEB.model._db import redis, Doc
from gid import gid
from z42.config import HOST, QINIU
from attrcache import attrcache
class Ob(Doc):
structure = dict(
id=int,
name=str,
ico=str,
)
indexes = [
{'fields':['id']}
... |
6917949523231067594d25eaa925c6c9ac4aba49 | 52a677b94056d3397b4a499bc9185adb68a63f05 | /util/test/test_dockerfileparse.py | 199162a0ffd1642dac33e08fcf43eabdcf925230 | [
"Apache-2.0"
] | permissive | quay/quay | 9b6fcff54efc0dbf7c6d91fa80676950555b6f1a | e400a0c22c5f89dd35d571654b13d262b1f6e3b3 | refs/heads/master | 2023-08-28T15:08:38.001842 | 2023-08-28T13:52:31 | 2023-08-28T13:52:31 | 220,517,730 | 2,363 | 322 | Apache-2.0 | 2023-09-14T17:43:48 | 2019-11-08T17:37:05 | Python | UTF-8 | Python | false | false | 1,693 | py | test_dockerfileparse.py | # -*- coding: utf-8 -*-
from util.dockerfileparse import parse_dockerfile
def test_basic_parse():
parsed = parse_dockerfile(
"""
FROM someimage:latest
RUN dosomething
"""
)
assert parsed.get_image_and_tag() == ("someimage", "latest")
assert parsed.get_base_image() == "someimage"
... |
2fb5d34c1a28ed7dd8048090b94ff1d9d3a8dd63 | bb33e6be8316f35decbb2b81badf2b6dcf7df515 | /source/res/scripts/client/gui/impl/lobby/tooltips/tankman_tooltip_view.py | 19437c1a730df0ebc2507ee4db742ffb37ad58f7 | [] | no_license | StranikS-Scan/WorldOfTanks-Decompiled | 999c9567de38c32c760ab72c21c00ea7bc20990c | d2fe9c195825ececc728e87a02983908b7ea9199 | refs/heads/1.18 | 2023-08-25T17:39:27.718097 | 2022-09-22T06:49:44 | 2022-09-22T06:49:44 | 148,696,315 | 103 | 39 | null | 2022-09-14T17:50:03 | 2018-09-13T20:49:11 | Python | UTF-8 | Python | false | false | 1,710 | py | tankman_tooltip_view.py | # Python bytecode 2.7 (decompiled from Python 2.7)
# Embedded file name: scripts/client/gui/impl/lobby/tooltips/tankman_tooltip_view.py
from frameworks.wulf import ViewSettings
from gui.impl.gen import R
from gui.impl.gen.view_models.views.lobby.tooltips.tankman_tooltip_view_model import TankmanTooltipViewModel
from gu... |
1388116c542a032d22110fa0d548845e12066270 | 483424524c70852cc043e0d77bf1b757a61d797a | /deepspeed/monitor/wandb.py | 30209191171afc4c0ad3ff7088639f7d678cd505 | [
"Apache-2.0",
"LicenseRef-scancode-generic-cla"
] | permissive | microsoft/DeepSpeed | 810f1af320020718d0794f5a97cde6f1d17af122 | 55d9964c59c0c6e23158b5789a5c36c28939a7b0 | refs/heads/master | 2023-09-06T07:40:52.145692 | 2023-09-05T23:51:23 | 2023-09-05T23:51:23 | 235,860,204 | 27,557 | 3,347 | Apache-2.0 | 2023-09-14T21:38:46 | 2020-01-23T18:35:18 | Python | UTF-8 | Python | false | false | 1,150 | py | wandb.py | # Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0
# DeepSpeed Team
from .utils import check_wandb_availability
from .monitor import Monitor
import deepspeed.comm as dist
class WandbMonitor(Monitor):
def __init__(self, wandb_config):
super().__init__(wandb_config)
che... |
5976dc24e3ff6475b744d25a64bf2501f87a9898 | eb9f655206c43c12b497c667ba56a0d358b6bc3a | /python/testData/completion/superMethodAnnotationsCopiedFromThirdPartyLibrary/src/a.after.py | 50c2283b5c5c2f37b366425e8e1edece1d2623bd | [
"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 | 85 | py | a.after.py | from mod import Super
class Sub(Super):
def method(self, x: int) -> str:<caret> |
89bd0cfef5c06dcfad81154d9bdc3cb86ef16c25 | 1abd8852158451ffe4dbe0d885e2be0ed1dd50d8 | /drafts/distance_to_line.py | 93512845d979a33c19336094f08c15b69c78d556 | [
"Unlicense"
] | permissive | akalenuk/wordsandbuttons | f7c1479ce08fc9f01d1043ed54b2dbd330003e79 | ef0c89ec06452a0b1913d849039b399708eae957 | refs/heads/master | 2023-08-30T04:07:14.672481 | 2023-08-24T07:18:04 | 2023-08-24T07:18:04 | 110,279,805 | 440 | 25 | Unlicense | 2020-05-22T15:58:51 | 2017-11-10T18:30:49 | HTML | UTF-8 | Python | false | false | 270 | py | distance_to_line.py | from sympy import *
from sympy.vector import *
x, y, x1, y1, x2, y2, a = symbols('x y x1 y1 x2 y2 a')
N = CoordSys3D('N')
p = x*N.i + y*N.j
l1 = x1*N.i + y1*N.j
l2 = x2*N.i + y2*N.j
the_a = solve([
dot(l1 + (l2 - l1) * a - p, l2 - l1)
], (a))
print (jscode(the_a))
|
09ada2d9b43799d1b172358d3ca4a73f03b831af | 05599a7cebc38c40baa4ec0e48308a83f0bacd3b | /tests/test_tda.py | e3578999547fbfd12487903fe06cc58561793957 | [
"MIT"
] | permissive | jmfernandes/robin_stocks | 4c0fc06fe1ee7c333b9768b9619729807826a5e2 | 6dc9dacae3e8882ffed3e3cf0eced02b147ef575 | refs/heads/master | 2023-08-26T05:22:55.301054 | 2023-08-07T02:52:43 | 2023-08-07T02:52:43 | 122,554,275 | 1,618 | 510 | MIT | 2023-08-25T17:22:23 | 2018-02-23T00:49:37 | Python | UTF-8 | Python | false | false | 571 | py | test_tda.py | import os
import robin_stocks.tda as t
from dotenv import load_dotenv
load_dotenv()
class TestAuthentication:
def test_login(self):
t.login(os.environ['tda_encryption_passcode'])
assert t.get_login_state()
class TestStocks:
ticker = "TSLA"
@classmethod
def setup_class(cls):
... |
443bc527d7aea038a9d39854311732b622af639c | 3a05bb0d4a598d18e9c90c0a35bd44556fcd94d3 | /ask-sdk-model/ask_sdk_model/services/api_client.py | 20507f064b0755d35d56d14a1aa0b3ca750358e5 | [
"Apache-2.0"
] | permissive | alexa/alexa-apis-for-python | 2e21330c7e35b76e4f360aa72a9e789906f3bca1 | 751e6dbbb829ceb34dd7405eb77235c06b19c612 | refs/heads/master | 2023-08-28T12:50:05.522913 | 2023-08-21T16:04:58 | 2023-08-21T16:04:58 | 145,045,841 | 119 | 34 | Apache-2.0 | 2022-07-19T16:40:29 | 2018-08-16T22:40:28 | Python | UTF-8 | Python | false | false | 1,499 | py | api_client.py | # -*- coding: utf-8 -*-
#
# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file
# except in compliance with the License. A copy of the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in th... |
d58fefeb1eb72821a10ab74108358e7b119890ea | f1067387acc6e436fe356e5d387cc806dfa20e41 | /net.py | b687d505b2e076f68c3f831a8bc6db0e0a500d06 | [
"MIT"
] | permissive | nilboy/pixel-recursive-super-resolution | e9dcd636307ee62d53188973fa9d8e76c26e0e24 | 925d04afb44c035c10f604a7eca02e8f3bc5eb96 | refs/heads/master | 2021-01-20T13:23:35.222047 | 2017-07-02T12:18:03 | 2017-07-02T12:18:03 | 82,688,011 | 457 | 168 | MIT | 2019-05-07T14:28:16 | 2017-02-21T14:18:31 | Python | UTF-8 | Python | false | false | 3,420 | py | net.py | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import tensorflow as tf
import numpy as np
from ops import *
class Net(object):
def __init__(self, hr_images, lr_images, scope):
"""
Args:[0, 255]
hr_images: [batch_size, hr_height,... |
80ab3fdab83116fc35389c8f8c9672df599a5ed9 | 39bcafc5f6b1672f31f0f6ea9c8d6047ee432950 | /tools/pythonpkg/tests/fast/arrow/test_arrow_fetch.py | 093989f1e06d93814d967817cbe6a5ca4c2fd0af | [
"MIT"
] | permissive | duckdb/duckdb | 315270af6b198d26eb41a20fc7a0eda04aeef294 | f89ccfe0ec01eb613af9c8ac7c264a5ef86d7c3a | refs/heads/main | 2023-09-05T08:14:21.278345 | 2023-09-05T07:28:59 | 2023-09-05T07:28:59 | 138,754,790 | 8,964 | 986 | MIT | 2023-09-14T18:42:49 | 2018-06-26T15:04:45 | C++ | UTF-8 | Python | false | false | 3,036 | py | test_arrow_fetch.py | import duckdb
import pytest
try:
import pyarrow as pa
can_run = True
except:
can_run = False
def check_equal(duckdb_conn):
true_result = duckdb_conn.execute("SELECT * from test").fetchall()
duck_tbl = duckdb_conn.table("test")
duck_from_arrow = duckdb_conn.from_arrow(duck_tbl.arrow())
du... |
5f70ea3c9deb7b801436279ec0a19529e36874e8 | ffdc77394c5b5532b243cf3c33bd584cbdc65cb7 | /tests/st/ops/gpu/test_ger_op.py | 0669521c10f2aa11b36986c074416452ec4cfca8 | [
"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 | 4,402 | py | test_ger_op.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
#
# Unless required by applicable law or agreed to... |
9198bff131b44d60c8ba1bdf23e3e132215ef2f5 | 653b92ea0aeedd6a4f7517933ad1dba1dbaf4375 | /pythonscripts/daemon.py | ac7526d09a45090f3e202e114380d37588a10e93 | [] | no_license | lahwaacz/Scripts | 1231d0b8914834c75a5c3346faed85036223e64d | a964bdb8512b11f3a921b3bc680f557ef2ec83d9 | refs/heads/master | 2023-09-03T11:52:44.360320 | 2023-08-29T16:29:19 | 2023-08-29T16:29:19 | 41,174,443 | 201 | 65 | null | 2020-04-10T19:41:41 | 2015-08-21T19:44:44 | Python | UTF-8 | Python | false | false | 1,797 | py | daemon.py | #! /usr/bin/env python
import os
def spawnDaemon(*args, detach_fds=True):
"""Spawn a completely detached subprocess (i.e., a daemon).
E.g. for mark:
spawnDaemon("../bin/producenotify.py", "producenotify.py", "xx")
"""
if len(args) == 0:
raise ValueError("no arguments supplied")
# for... |
88f83fbfaba918aefa136da6f8f61f076f24fe50 | 06d86ca0465405a7d1a64fc6dbf4980f76565e54 | /torchnlp/encoders/text/spacy_encoder.py | 4e2b2a6b3f3f7e10bd8af017dc911210137e4b35 | [
"BSD-3-Clause"
] | permissive | PetrochukM/PyTorch-NLP | 22b7f2628d6545270bc36964ce4551609f84ca9f | 53d7edcb8e0c099efce7c2ddf8cd7c44157fcac3 | refs/heads/master | 2023-08-05T20:15:06.954467 | 2023-07-04T21:11:26 | 2023-07-04T21:11:26 | 122,806,629 | 2,304 | 290 | BSD-3-Clause | 2022-07-16T23:44:23 | 2018-02-25T05:00:36 | Python | UTF-8 | Python | false | false | 2,789 | py | spacy_encoder.py | from functools import partial
from torchnlp.encoders.text.static_tokenizer_encoder import StaticTokenizerEncoder
def _tokenize(s, tokenizer):
return [w.text for w in tokenizer(s)]
class SpacyEncoder(StaticTokenizerEncoder):
""" Encodes the text using spaCy's tokenizer.
**Tokenizer Reference:**
htt... |
f0e8ddac79cb28c58255040d4ec340cbecad4e19 | 70d1905e59ef92a5a082dc43e8861d86e47079f6 | /tests/handlers/test_permissions.py | 2e831b7f833821364885fff4fdc637a8d2b81237 | [
"BSD-2-Clause"
] | permissive | getredash/redash | 3c34d843a82e461be3a2efa416d66f7d4c248097 | 7b722a1067397a3ecb408b2c5df07d75250fb66a | refs/heads/master | 2023-09-01T18:14:21.257904 | 2023-09-01T12:11:47 | 2023-09-01T12:11:47 | 13,926,404 | 23,871 | 4,772 | BSD-2-Clause | 2023-09-14T11:54:15 | 2013-10-28T13:19:39 | Python | UTF-8 | Python | false | false | 7,522 | py | test_permissions.py | from redash.models import AccessPermission
from redash.permissions import ACCESS_TYPE_MODIFY
from tests import BaseTestCase
class TestObjectPermissionsListGet(BaseTestCase):
def test_returns_empty_list_when_no_permissions(self):
query = self.factory.create_query()
user = self.factory.user
... |
6cf5a6caffd25301a8e5c37283a722ce50087fc1 | fb3956e55a31e1c0bcef9827f1d6e80e751e827c | /heart_cloud_word.py | c49e75aacd8ca3e6f9c5fbd5933487079fface55 | [] | no_license | HeLiangHIT/coders_love | 406073000b0c06b896769459f29a2dabc93906cf | aa927558b57fed3d48ed093094fe7636d6bdd9f1 | refs/heads/master | 2023-07-19T21:42:42.920961 | 2021-05-30T14:52:46 | 2021-05-30T14:52:46 | 134,127,148 | 121 | 37 | null | 2023-07-06T21:16:01 | 2018-05-20T06:56:35 | Python | UTF-8 | Python | false | false | 4,668 | py | heart_cloud_word.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Date : 2018-05-20 18:26:50
# @Author : He Liang (heianghit@foxmail.com)
# @Link : https://github.com/HeLiangHIT
# ref : https://github.com/amueller/word_cloud
# usage: python heart_cloud_word.py --help
import jieba
import numpy
import pandas
import matplotl... |
5572bc4c4c3412cdc7cac1bd05ec55c00b2e3c45 | 8880226d2ca1c9448c44b3e9f21226a58e61ac93 | /awacs/tax.py | bf7f70c6864dd531a7e8682201f50b3c836f5ac0 | [
"BSD-2-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | cloudtools/awacs | 2f82958ccc7ba2177492c29c706a5737f19dd2d1 | c449a9637f01c26e73b827a9f8d5cc7715bbbea2 | refs/heads/main | 2023-08-31T00:58:28.636568 | 2023-08-28T05:13:01 | 2023-08-28T05:13:01 | 9,062,692 | 385 | 107 | BSD-2-Clause | 2023-08-13T23:21:39 | 2013-03-27T20:16:27 | Python | UTF-8 | Python | false | false | 1,222 | py | tax.py | # Copyright (c) 2012-2021, Mark Peek <mark@peek.org>
# All rights reserved.
#
# See LICENSE file for full license.
from typing import Optional
from .aws import Action as BaseAction
from .aws import BaseARN
service_name = "AWS Tax Settings"
prefix = "tax"
class Action(BaseAction):
def __init__(self, action: Opt... |
123b6059e61f69a3b762a9955073e6db78086e2f | 2337351b228818e41be3002bd38f68f77c2aa074 | /sa/profiles/Zyxel/ZyNOS_EE/profile.py | 7346e9f2ccfa274a6846c1d9947b988bda2bb512 | [
"BSD-3-Clause"
] | permissive | nocproject/noc | 57d40c680a1499374463e472434f9595ed6d1374 | 6e6d71574e9b9d822bec572cc629a0ea73604a59 | refs/heads/master | 2023-08-31T01:11:33.544573 | 2023-08-30T17:31:11 | 2023-08-30T17:31:11 | 107,815,776 | 105 | 33 | BSD-3-Clause | 2023-07-31T07:57:45 | 2017-10-21T21:04:33 | Python | UTF-8 | Python | false | false | 707 | py | profile.py | # ---------------------------------------------------------------------
# Vendor: Zyxel
# OS: ZyNOS_EE
# ---------------------------------------------------------------------
# Copyright (C) 2007-2011 The NOC Project
# See LICENSE for details
# ---------------------------------------------------------------------
... |
d8fadbec3995da0614c52b1113b47c3c90e873e2 | 23bcefab5154e9de3bba424464112a5b633e492f | /linalg/nufft_hsa.py | 11b556d39e55105cd104d8093dd53aa167ee7bad | [
"MIT"
] | permissive | jyhmiinlin/pynufft | 8276d4de02907ba2ea168b248bf974c7a00d82e4 | 03e892ef2bc700745a9c4efd499c69df506afed5 | refs/heads/master | 2023-06-24T23:44:35.856229 | 2023-06-07T07:23:18 | 2023-06-07T07:23:18 | 49,985,083 | 180 | 22 | NOASSERTION | 2022-04-15T04:13:30 | 2016-01-19T21:41:26 | Python | UTF-8 | Python | false | false | 33,094 | py | nufft_hsa.py | """
NUFFT HSA classes (deprecated)
=======================================
"""
from __future__ import absolute_import
import numpy
import warnings
import scipy.sparse
import numpy.fft
#import scipy.signal
import scipy.linalg
import scipy.special
from functools import wraps as _wraps
from ..src._helper import helper, ... |
a63e55f45fc6c1e315655e8ca1e265990b836bfa | 3083a4918f9a9a0670ce83566341eba04b290bc4 | /tests/kafka_consumer_manager/test_watermark_get.py | a1c098aaa0bae4283625dce98711b5513b72525d | [
"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 | 2,168 | py | test_watermark_get.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... |
d7b5e734eae128fb0949d8d50728676b09f43e86 | 2d05050d0ada29f7680b4df20c10bb85b0530e45 | /python/tvm/target/generic_func.py | 7b6f916bd9755bb4f0ccd44fd0f8638dc199ccc4 | [
"Apache-2.0",
"BSD-3-Clause",
"MIT",
"LicenseRef-scancode-unknown-license-reference",
"Unlicense",
"Zlib",
"LLVM-exception",
"BSD-2-Clause"
] | permissive | apache/tvm | 87cb617f9a131fa44e1693303aaddf70e7a4c403 | d75083cd97ede706338ab413dbc964009456d01b | refs/heads/main | 2023-09-04T11:24:26.263032 | 2023-09-04T07:26:00 | 2023-09-04T07:26:00 | 70,746,484 | 4,575 | 1,903 | Apache-2.0 | 2023-09-14T19:06:33 | 2016-10-12T22:20:28 | Python | UTF-8 | Python | false | false | 8,938 | py | generic_func.py | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... |
9dc35bbd5147a10536069e970ea4f85d7760ebde | d5e1591a6b96ec0e35ea223269da38b15fffe600 | /tests/web/test_vpath_args.py | 44e8e8b88fdfb85fe5b9368d561bed5c4e7c2b43 | [
"MIT"
] | permissive | circuits/circuits | 630cfa0fa13b19f84bfb96705912f3f6a26c69e1 | 87fb5a3380069d907d2ac500d13418b1abdeb2f2 | refs/heads/master | 2023-07-31T07:17:06.706151 | 2023-02-07T19:39:20 | 2023-02-07T19:39:20 | 12,450,349 | 310 | 80 | NOASSERTION | 2023-01-06T00:08:37 | 2013-08-29T03:05:42 | Python | UTF-8 | Python | false | false | 685 | py | test_vpath_args.py | #!/usr/bin/env python
from circuits.web import Controller, expose
from .helpers import urlopen
class Root(Controller):
@expose("test.txt")
def index(self):
return "Hello world!"
class Leaf(Controller):
channel = "/test"
@expose("test.txt")
def index(self, vpath=None):
if vpat... |
aa4b7fd5a516164cc7aeee8f62fa155d419caf1a | f6aac61a48a87743be9c40fecdc24344bae4d263 | /htdocs/plotting/auto/scripts/p40.py | 362d829d23dfa2bfa3ed4bfc34304f7261bae54e | [
"MIT"
] | permissive | akrherz/iem | 8714d99b371c8818f7cdde73dd24639e9fc7d42b | 178015584b7fb5b585f65be6013eaf16fb6db0c7 | refs/heads/main | 2023-08-19T02:58:24.507782 | 2023-08-18T12:08:31 | 2023-08-18T12:08:31 | 4,253,774 | 118 | 74 | MIT | 2023-09-14T18:28:41 | 2012-05-07T20:32:59 | Python | UTF-8 | Python | false | false | 7,044 | py | p40.py | """
This chart is an attempted illustration of the
amount of cloudiness that existed at a METAR site for a given month.
The chart combines reports of cloud amount and level to provide a visual
representation of the cloudiness. Once the METAR site hits a cloud level
of overcast, it can no longer sense clouds above that... |
411984ae30eb4d3fcd9c0830069768cce1648e1e | be540a0f683235a6be13ca9f6150509ade957887 | /motrackers/utils/filechooser_utils.py | eef639de12939d5d368c08598d458a5e527e0311 | [
"MIT"
] | permissive | adipandas/multi-object-tracker | 9890873c111fb70c86de0efd7476124f9f722184 | 5d5474f4d95cb5aa4be21a4d14f4333a392579d5 | refs/heads/master | 2023-08-31T13:33:33.278920 | 2023-06-01T15:25:07 | 2023-06-01T15:25:07 | 148,338,463 | 672 | 97 | MIT | 2023-08-10T08:33:12 | 2018-09-11T15:25:03 | Python | UTF-8 | Python | false | false | 3,619 | py | filechooser_utils.py | from ipyfilechooser import FileChooser
def create_filechooser(default_path="~/", html_title="Select File", use_dir_icons=True):
fc = FileChooser(default_path)
fc.title = html_title
fc.use_dir_icons = use_dir_icons
return fc
def select_caffemodel_prototxt(default_path="~/", use_dir_icons=True):
h... |
1b37d277619863e9b7354d33a9f00f5b6cfb9fcb | 753cd066a9bd26b6c37c8d53a86c7a9c659ec18c | /vision/vit/pytorch/validation.py | 716c9cba2dfedd9ba6ae17c07fac616067232883 | [
"MIT",
"CC-BY-NC-4.0",
"BSD-3-Clause",
"Apache-2.0",
"HPND"
] | permissive | graphcore/examples | ac872015808ed2a913d4d7bf0d63202ce15ebbae | e2f834dd60e7939672c1795b4ac62e89ad0bca49 | refs/heads/master | 2023-08-05T02:08:12.341836 | 2023-07-27T11:13:10 | 2023-07-27T11:13:10 | 143,977,106 | 311 | 80 | MIT | 2023-09-11T16:42:56 | 2018-08-08T07:29:17 | Python | UTF-8 | Python | false | false | 3,960 | py | validation.py | # Copyright (c) 2021 Graphcore Ltd. 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 ... |
a05440db0ce3c1820bc54d69ff3025defff54ce8 | e459a9608225b81bdb0a5b85cd19b7bd0f6df38e | /test_frame/other_tests/test_zeromq/test_zeromq_client.py | 20f53c285e286113fbf698172298cf0976563973 | [
"Apache-2.0"
] | permissive | ydf0509/distributed_framework | 722be4957df97bfece9ca5b43d81b4e3bb09ed8e | 1b1f32ed928fa44e0fb13fc738de90cb4339f408 | refs/heads/master | 2022-05-20T10:19:05.727086 | 2022-03-31T11:16:22 | 2022-03-31T11:16:22 | 201,225,545 | 359 | 90 | Apache-2.0 | 2021-05-08T16:50:53 | 2019-08-08T09:30:13 | Python | UTF-8 | Python | false | false | 378 | py | test_zeromq_client.py | import zmq,time
# Prepare our context and sockets
context = zmq.Context()
socket = context.socket(zmq.REQ)
socket.connect("tcp://localhost:5559")
# Do 10 requests, waiting each time for a response
for request in range(1,11):
time.sleep(2)
socket.send(f"Hello {request}".encode())
message = socket.recv()
... |
b3da72a1f84544b2e29f1f9c3412156c074c17a5 | 578db86c51d44ebddd0dc7b1738985b3dc69eb74 | /corehq/apps/hqcase/tests/test_case_sharing.py | ef4793be30e7e472fec5b6b2bbaa408316eb7a32 | [
"BSD-3-Clause"
] | permissive | dimagi/commcare-hq | a43c7dd32b5f89c89fd5aa1b1359ab7301f4ff6b | e7391ddae1af1dbf118211ecb52c83fc508aa656 | refs/heads/master | 2023-08-16T22:38:27.853437 | 2023-08-16T19:07:19 | 2023-08-16T19:07:19 | 247,278 | 499 | 203 | BSD-3-Clause | 2023-09-14T19:03:24 | 2009-07-09T17:00:07 | Python | UTF-8 | Python | false | false | 4,811 | py | test_case_sharing.py | from django.test import TestCase
from casexml.apps.case.mock import CaseBlock
from casexml.apps.case.tests.util import deprecated_check_user_has_case
from corehq.apps.domain.shortcuts import create_domain
from corehq.apps.groups.models import Group
from corehq.apps.hqcase.utils import submit_case_blocks
from corehq.a... |
0deda2313a015dc3a0b887940d65b9b4cf6738c7 | 9241974e50a37303163303660f66f6b77cc5632a | /tests/commands/validate_manifest_test.py | a4bc8ac05215e472389c0f3a074e4f993bcf3589 | [
"MIT"
] | permissive | pre-commit/pre-commit | c138e1bd540c7515c10f0d61f3d7a4ef66d5bf0a | a1f1d1915646865be2fe84d04633ba964feb0ba0 | refs/heads/main | 2023-08-19T08:07:21.342724 | 2023-08-15T14:19:29 | 2023-08-15T14:19:29 | 17,689,377 | 10,804 | 912 | MIT | 2023-09-12T00:06:21 | 2014-03-13T00:39:38 | Python | UTF-8 | Python | false | false | 519 | py | validate_manifest_test.py | from __future__ import annotations
from pre_commit.commands.validate_manifest import validate_manifest
def test_validate_manifest_ok():
assert not validate_manifest(('.pre-commit-hooks.yaml',))
def test_not_ok(tmpdir):
not_yaml = tmpdir.join('f.notyaml')
not_yaml.write('{')
not_schema = tmpdir.join... |
58c3fb2300c91f42bc8970674832e20b53471813 | c46754b9600a12df4f9d7a6320dfc19aa96b1e1d | /src/transformers/models/timm_backbone/modeling_timm_backbone.py | dc117f743642d8e518a8cb4a7139b22b6cfb2115 | [
"Apache-2.0"
] | permissive | huggingface/transformers | ccd52a0d7c59e5f13205f32fd96f55743ebc8814 | 4fa0aff21ee083d0197a898cdf17ff476fae2ac3 | refs/heads/main | 2023-09-05T19:47:38.981127 | 2023-09-05T19:21:33 | 2023-09-05T19:21:33 | 155,220,641 | 102,193 | 22,284 | Apache-2.0 | 2023-09-14T20:44:49 | 2018-10-29T13:56:00 | Python | UTF-8 | Python | false | false | 6,129 | py | modeling_timm_backbone.py | # coding=utf-8
# Copyright 2023 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... |
eb9b04f5170762132bcdfcb7d03113f23cbdd806 | d51f530078404a24f1844b53b037bbfed238a784 | /python/test_tools/config_stubber.py | 80e9b4c0a2617dad7d42f576a573dc3a9a0d4e34 | [
"Apache-2.0",
"MIT"
] | permissive | awsdocs/aws-doc-sdk-examples | fff85d1b4119fe3331174396a5723c7f054203eb | dec41fb589043ac9d8667aac36fb88a53c3abe50 | refs/heads/main | 2023-09-03T19:50:57.809260 | 2023-09-01T16:23:01 | 2023-09-01T16:23:01 | 66,023,605 | 8,240 | 6,037 | Apache-2.0 | 2023-09-14T16:52:02 | 2016-08-18T19:06:57 | Java | UTF-8 | Python | false | false | 2,994 | py | config_stubber.py | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
"""
Stub functions that are used by the AWS Config unit tests.
"""
from test_tools.example_stubber import ExampleStubber
class ConfigStubber(ExampleStubber):
"""
A class that implements stub functions ... |
ef9a349d85c309788fa5f516989f6337b1acab23 | fa1ad2e2ac7e376fc7cb3b3a6e1bb88eed3e80be | /dts/airbyte/airbyte-integrations/connectors/source-zuora/source_zuora/zuora_auth.py | c5adcd9666c2b3b4a0c145014d3af9e78d83dbd0 | [
"Apache-2.0",
"BSD-3-Clause",
"MIT",
"Elastic-2.0"
] | permissive | alldatacenter/alldata | 7bc7713c9f1d56ad6b8e59ea03206d1073b7e047 | 8d5f9a2d49ab8f9e85ccf058cb02c2fda287afc6 | refs/heads/master | 2023-08-05T07:32:25.442740 | 2023-08-03T13:17:24 | 2023-08-03T13:17:24 | 213,321,771 | 774 | 250 | Apache-2.0 | 2023-09-06T17:35:32 | 2019-10-07T07:36:18 | null | UTF-8 | Python | false | false | 1,131 | py | zuora_auth.py | #
# Copyright (c) 2023 Airbyte, Inc., all rights reserved.
#
from typing import Any, Dict, Mapping
from airbyte_cdk.sources.streams.http.requests_native_auth.oauth import Oauth2Authenticator
from .zuora_endpoint import get_url_base
class OAuth(Oauth2Authenticator):
def __init__(self, **kwargs):
super(... |
d869925851c1fb7d9f973e43eeca3fda04d913c3 | 1382132f3687305173f3bb61391cf2002e6d7ce6 | /rl_algorithms/gail/networks.py | c8f66bf70c7ea49fb663526c4816fd8dda7dc056 | [
"MIT"
] | permissive | medipixel/rl_algorithms | 37caff91f78c51e70f06d0c2ad590fabe2a7ebd6 | fdfac4e7056ee5a9d5b48b7b9653ce844a03ca22 | refs/heads/master | 2023-08-06T09:11:48.128961 | 2022-09-15T06:21:54 | 2022-09-15T06:21:54 | 161,100,560 | 525 | 94 | MIT | 2023-04-08T09:15:39 | 2018-12-10T01:40:01 | Python | UTF-8 | Python | false | false | 2,611 | py | networks.py | # -*- coding: utf-8 -*-
from typing import Tuple, Union
import torch
import torch.nn as nn
from rl_algorithms.common.helper_functions import identity
from rl_algorithms.registry import build_backbone, build_head
from rl_algorithms.utils.config import ConfigDict
# TODO: Remove it when upgrade torch>=1.7
# pylint: d... |
75516c87834b409fbc43f7bdfef1475700bcad6d | 0ca218c0f54dac33a2ade4accfdf8f5be3207588 | /lib/sqlalchemy/engine/cursor.py | 246cf6fe78009537ed35048aa0ae346525abdb93 | [
"MIT"
] | permissive | sqlalchemy/sqlalchemy | 9d949c67c9b5396b1f33e7ff0f3230c81babf5be | b382bff6e3464f039db0fd1f2ce1b79038675e48 | refs/heads/main | 2023-08-31T17:40:59.565421 | 2023-08-30T15:01:41 | 2023-08-30T15:01:41 | 159,271,175 | 8,083 | 1,489 | MIT | 2023-09-12T18:53:55 | 2018-11-27T03:35:03 | Python | UTF-8 | Python | false | false | 74,396 | py | cursor.py | # engine/cursor.py
# Copyright (C) 2005-2023 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: https://www.opensource.org/licenses/mit-license.php
# mypy: allow-untyped-defs, allow-untyped-calls
"""Define cursor-specific result s... |
1ed7e08b147b3b22517666e874d8d6dcf8ac4852 | 645aa520f2eff7e6001574e57c986aba129e4dd3 | /setup.py | 732936ba8dfb841c84e38ff19e4706ec92f065e5 | [
"Apache-2.0"
] | permissive | google/transitfeed | 08c4ecfb6872b6c0dc409d9a35b32ef515e30253 | 104b5a5b339c62a94c1579d7209a41c7c0833e35 | refs/heads/master | 2023-09-05T03:08:17.640950 | 2022-05-23T16:23:53 | 2022-05-23T16:23:53 | 24,061,376 | 680 | 299 | Apache-2.0 | 2022-09-28T09:02:50 | 2014-09-15T15:16:32 | Python | UTF-8 | Python | false | false | 5,963 | py | setup.py | #!/usr/bin/python2.5
# Copyright (C) 2007 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 la... |
d9dac97d9ade3a89fc18d2b23124ebc8ecadf62f | 68384147be31aadd870c0153ac75466b1f5de122 | /keras_cv_attention_models/imagenet/tensorrt_engine.py | 88a570cc7d5d09ed5cc031f1cc0b7805f1864629 | [
"CC-BY-NC-4.0",
"CC-BY-4.0",
"MIT",
"LicenseRef-scancode-proprietary-license",
"Apache-2.0"
] | permissive | leondgarse/keras_cv_attention_models | cbee0b641e4ed727d9646669cf1614ddf3435a8a | ac1d1146ef10823ce83bffdc527f227e9732ab55 | refs/heads/main | 2023-08-31T07:09:57.302178 | 2023-08-25T12:51:31 | 2023-08-25T12:51:31 | 391,777,965 | 460 | 69 | MIT | 2022-10-13T14:31:01 | 2021-08-02T00:59:55 | Python | UTF-8 | Python | false | false | 11,367 | py | tensorrt_engine.py | import os
import numpy as np
import tensorrt as trt
import pycuda.driver as cuda
try:
# Use autoprimaryctx if available (pycuda >= 2021.1) to prevent issues with other modules that rely on the primary device context.
import pycuda.autoprimaryctx
except ModuleNotFoundError:
import pycuda.autoinit
TRT_LOGGER... |
ed6f6ee9a03080ce61e797008032803656293972 | 269ffc022565c7982017a866ec0e515c90b48940 | /miditok/pytorch_data/datasets.py | 08a4131c5a2a39aede10c11c66bf67ddafea4e88 | [
"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 | 9,926 | py | datasets.py | """
PyTorch `Dataset` objects, to be used with PyTorch `DataLoaders` to load and send data during training.
"""
from pathlib import Path
from typing import List, Union, Sequence, Any, Mapping
from abc import ABC
from copy import deepcopy
import json
from torch import LongTensor, randint
from torch.utils.data import Da... |
4100d5c2ad0f2307a58faa7d5fdf368d47595078 | 29dfa1deefc72493d1b1eecf1a8df62e24599a77 | /tests/compression/xz_decompressor.py | 92a0b901597c4e3ccb07773a4da2cbd45d093740 | [
"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,425 | py | xz_decompressor.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Tests for the xz decompressor object."""
import unittest
try:
from dfvfs.compression import xz_decompressor
except ImportError:
xz_decompressor = None
from dfvfs.lib import errors
from tests.compression import test_lib
@unittest.skipIf(xz_decompressor is None, ... |
f5a07fe1929cd9e6e654afa908bed8537bb90699 | afd2087e80478010d9df66e78280f75e1ff17d45 | /torch/quantization/qconfig.py | 6bb7e14110cb9cdc4e9c2c418c6776ea6445f0d3 | [
"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 | 910 | py | qconfig.py | # flake8: noqa: F401
r"""
This file is in the process of migration to `torch/ao/quantization`, and
is kept here for compatibility while the migration process is ongoing.
If you are adding a new entry/functionality, please, add it to the
`torch/ao/quantization/qconfig.py`, while adding an import statement
here.
"""
from... |
5d60e5123a6e23163ee49d674cf2506d5cbc0e65 | ebb3188aa1b3846d13eafbad4714326a1f6ece64 | /pca/__init__.py | 7d93884c227411f751fdea58ea88b8290db1e8c4 | [
"MIT"
] | permissive | erdogant/pca | 14793e78c02069e6983d718ecadee76eeef4253e | 9c42b0967d81c5dc985837be2f5d1dcb729b4702 | refs/heads/master | 2023-08-17T18:54:40.445251 | 2023-08-05T18:43:02 | 2023-08-05T18:43:02 | 233,232,884 | 247 | 45 | MIT | 2022-02-22T19:33:08 | 2020-01-11T13:04:39 | Python | UTF-8 | Python | false | false | 1,191 | py | __init__.py | from pca.pca import pca
from pca.pca import (
import_example,
hotellingsT2,
spe_dmodx,
)
__author__ = 'Erdogan Tasksen'
__email__ = 'erdogant@gmail.com'
__version__ = '2.0.4'
# module level doc-string
__doc__ = """
pca
=====================================================================
pca: A Pyt... |
55980fa13232ffbfb616b2d647fe1a093b064862 | 0db19410e9751790af8ce4a0a9332293e379c02f | /tools/torchserve/mmpose_handler.py | d7da881cdc9dd26ab23242052668958b8172ce57 | [
"Apache-2.0"
] | permissive | open-mmlab/mmpose | 2c9986521d35eee35d822fb255e8e68486026d94 | 537bd8e543ab463fb55120d5caaa1ae22d6aaf06 | refs/heads/main | 2023-08-30T19:44:21.349410 | 2023-07-04T13:18:22 | 2023-07-04T13:18:22 | 278,003,645 | 4,037 | 1,171 | Apache-2.0 | 2023-09-14T09:44:55 | 2020-07-08T06:02:55 | Python | UTF-8 | Python | false | false | 2,709 | py | mmpose_handler.py | # Copyright (c) OpenMMLab. All rights reserved.
import base64
import os
import mmcv
import torch
from mmpose.apis import (inference_bottom_up_pose_model,
inference_top_down_pose_model, init_pose_model)
from mmpose.models.detectors import AssociativeEmbedding, TopDown
try:
from ts.torch_h... |
eb554b4e467db180878da36610dc28539e1ec8dd | 7eb606a7957e5500f163c93dc4b19418cf9cf335 | /tests/ludwig/marshmallow/test_fields_preprocessing.py | a340e3ad561d1fdec7fecf05fbf6df2eab03c1af | [
"Apache-2.0",
"MIT"
] | permissive | ludwig-ai/ludwig | 024f74da86567a57ec8e30efcb4600f0c52333a1 | e1d023e41606c9b76b35e1d231c2f13368a30eca | refs/heads/master | 2023-09-03T08:07:32.978301 | 2023-09-01T19:39:32 | 2023-09-01T19:39:32 | 163,346,054 | 2,567 | 285 | Apache-2.0 | 2023-09-14T20:34:52 | 2018-12-27T23:58:12 | Python | UTF-8 | Python | false | false | 1,127 | py | test_fields_preprocessing.py | #! /usr/bin/env python
from ludwig.schema.features.preprocessing.binary import BinaryPreprocessingConfig
from ludwig.schema.features.preprocessing.category import CategoryPreprocessingConfig
from ludwig.schema.features.preprocessing.utils import PreprocessingDataclassField
def get_marshmallow_from_dataclass_field(d... |
b31c6e7b5791c64ff847aa5aa6dd85c3ef5a6bd4 | fa1ad2e2ac7e376fc7cb3b3a6e1bb88eed3e80be | /olap/ByConity/tests/ci/pr_info.py | 86b3081f98c075e4701b4e158b2458323782761e | [
"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 | 12,503 | py | pr_info.py | #!/usr/bin/env python3
import json
import logging
import os
from typing import Set
from unidiff import PatchSet # type: ignore
from build_download_helper import get_with_retries
from env_helper import (
GITHUB_REPOSITORY,
GITHUB_SERVER_URL,
GITHUB_RUN_URL,
GITHUB_EVENT_PATH,
)
FORCE_TESTS_LABEL = "f... |
2db1c353b764feeba9c3cd045192fcc9bed8875b | d854a0e93db79fad31dcc6fe61bfd26f3a5b9990 | /algs4/depth_first_order.py | 06cc5609d676ad6673322765b7245a61c2c541d1 | [
"MIT"
] | permissive | shellfly/algs4-py | 334a8b7bd040db03859076e18a8aba98bfabc501 | 09bbd0c9e8cc82210df905e7d3c315265914e143 | refs/heads/master | 2022-10-05T05:38:10.386032 | 2022-09-26T05:10:10 | 2022-09-26T05:10:10 | 114,614,712 | 290 | 77 | MIT | 2022-09-26T06:23:15 | 2017-12-18T08:23:13 | Python | UTF-8 | Python | false | false | 1,878 | py | depth_first_order.py | """
* Execution: python depth_first_order.py digraph.txt
* Data files: https://algs4.cs.princeton.edu/42digraph/tinyDAG.txt
* https://algs4.cs.princeton.edu/42digraph/tinyDG.txt
*
* Compute preorder and postorder for a digraph or edge-weighted digraph.
* Runs in O(E + V) time.
*
* % pyt... |
b3a436556bac2b664734968c44e271bbe4667189 | 2883819589b815a96e992cf184a28a9cbafc19d5 | /Episode 52 - Anonymous atau lambda function/main_app.py | 4c5bcef6c792092d178ad193195839e034e8eff9 | [] | no_license | kelasterbuka/Python3.x_Dasar_Programming | f944cbfdd990b50ffdb5c0abf68033d5256b5cad | 0fd9299817ab5804d16d7981707d589b36a962e1 | refs/heads/master | 2023-01-08T21:13:39.395752 | 2022-11-02T07:46:40 | 2022-11-02T07:46:40 | 123,400,518 | 453 | 361 | null | 2023-02-02T11:48:48 | 2018-03-01T07:44:56 | Python | UTF-8 | Python | false | false | 1,701 | py | main_app.py | # Lambda function
def f_kuadrat(angka):
return angka**2
print(f"hasil fungsi kuadrat = {f_kuadrat(3)}")
# kita coba dengan lambda
# output = lambda argument: expression
kuadrat = lambda angka : angka**2
print(f"hasil lambda kuadrat = {kuadrat(5)}")
pangkat = lambda num,pow : num**pow
print(f"hasil lambda pangka... |
84e4a17eb33ae97eb4a95edeeed553ec162c5357 | 0010b3d8b8f806d6065e1bb1aa3c18f9714001a7 | /galsim/roman/roman_psfs.py | aea1b67c62b2a6f452dbb0d8181e2a97d18abfdc | [
"BSD-3-Clause",
"BSD-2-Clause"
] | permissive | GalSim-developers/GalSim | bfd2d5e57f20874ad81bc735195c5c62efad63eb | f1c0319600cc713373f1cea7459171fbf388848e | refs/heads/main | 2023-08-17T07:30:44.583679 | 2023-08-15T02:52:00 | 2023-08-15T02:52:00 | 3,510,804 | 194 | 104 | NOASSERTION | 2023-09-12T04:03:38 | 2012-02-22T02:51:45 | Python | UTF-8 | Python | false | false | 22,669 | py | roman_psfs.py | # Copyright (c) 2012-2022 by the GalSim developers team on GitHub
# https://github.com/GalSim-developers
#
# This file is part of GalSim: The modular galaxy image simulation toolkit.
# https://github.com/GalSim-developers/GalSim
#
# GalSim is free software: redistribution and use in source and binary forms,
# with or w... |
650ed335c405298b82c01ae6ab60fc9f8f118a39 | f132958875a962ee925e19fbb3f1266ba6a6e6cb | /demucs/distrib.py | dc1576cb49693df491d58c8813d5ebac6c8ff749 | [
"MIT"
] | permissive | facebookresearch/demucs | 9fc8422f02b79c4d50500a9a02676e707809adb0 | 0cb4a90dbeb36b9495b505ad1ec90ac91feb7bc4 | refs/heads/main | 2023-08-21T19:07:44.858104 | 2023-08-02T21:21:52 | 2023-08-02T21:21:52 | 217,436,984 | 6,636 | 902 | MIT | 2023-08-25T08:44:09 | 2019-10-25T02:43:20 | Python | UTF-8 | Python | false | false | 3,237 | py | distrib.py | # Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
"""Distributed training utilities.
"""
import logging
import pickle
import numpy as np
import torch
from torch.utils.data... |
c7953fefd02e9f7016bba4c7d22b69d931794a5a | 5b6ba0f288b1e2ac236af846a9bf546a63228476 | /xfel/command_line/make_mask.py | 278a4ac866383bc5ac5952e28c0182536e7a8a8b | [
"BSD-3-Clause-LBNL"
] | permissive | cctbx/cctbx_project | 5b547b416cadbdf95cca21dace9f54272a08d98a | 7f4dfb6c873fd560920f697cbfd8a5ff6eed82fa | refs/heads/master | 2023-08-17T17:44:05.077010 | 2023-08-16T22:40:22 | 2023-08-16T22:40:22 | 39,508,026 | 206 | 131 | NOASSERTION | 2023-09-14T17:12:55 | 2015-07-22T13:36:27 | Python | UTF-8 | Python | false | false | 10,561 | py | make_mask.py | from __future__ import absolute_import, division, print_function
from six.moves import range
# -*- mode: python; coding: utf-8; indent-tabs-mode: nil; python-indent: 2 -*-
#
# LIBTBX_SET_DISPATCHER_NAME cxi.make_mask
#
# $Id: make_mask.py 411 2013-10-16 22:17:45Z aaron $
#
# This code reads three cctbx.xfel pickle form... |
606adf8960ab60905df8ddde46640e79eefc88a4 | 6a017c87a1c3e016de5e1704d23d1d2034fab41c | /src/coffea/nanoevents/schemas/physlite.py | 1b9b892056948a89512baf771db6f8dc11a54782 | [
"BSD-3-Clause"
] | permissive | CoffeaTeam/coffea | 53997aefbccf583cc901718b5c639a4b4535dbcd | a33fc173f3bf2be307bac6517e624fc6ce0c4c3e | refs/heads/master | 2023-08-10T12:36:49.238010 | 2023-08-02T02:57:18 | 2023-08-02T02:57:18 | 159,673,139 | 116 | 100 | BSD-3-Clause | 2023-09-12T20:32:08 | 2018-11-29T13:47:57 | Jupyter Notebook | UTF-8 | Python | false | false | 5,670 | py | physlite.py | import copy
import warnings
from collections import defaultdict
from coffea.nanoevents.schemas.base import BaseSchema, zip_forms
from coffea.nanoevents.util import quote
class PHYSLITESchema(BaseSchema):
"""PHYSLITE schema builder - work in progress.
This is a schema for the `ATLAS DAOD_PHYSLITE derivation
... |
2e80d0c442d654a9cb7ad25b2d7474147618c851 | 1eca7ab68f713f9134549be8cff40d953d784326 | /empire/server/common/stagers.py | 5985787dc67af7892a43a99c6c83c42cc30237ec | [
"BSD-3-Clause"
] | permissive | BC-SECURITY/Empire | 65576ac931635cded054912a02ed5d02a1b41f8d | 5b2ad2c2e9b9f996e40c484215dfea36fefc808d | refs/heads/main | 2023-09-04T05:00:52.366894 | 2023-08-27T22:08:54 | 2023-08-27T22:08:54 | 199,975,883 | 3,651 | 601 | BSD-3-Clause | 2023-09-08T05:50:26 | 2019-08-01T04:22:31 | PowerShell | UTF-8 | Python | false | false | 29,359 | py | stagers.py | """
Functionality that loads Empire stagers, sets generic stager options,
and abstracts the invocation of launcher generation.
The Stagers() class in instantiated in ./server.py by the main menu and includes:
generate_launcher() - abstracted functionality that invokes the generate_launcher() method for a given l... |
dc1dc7927f75216bf18f303f4970e466f1b1f794 | fa1ad2e2ac7e376fc7cb3b3a6e1bb88eed3e80be | /dts/airbyte/airbyte-integrations/connectors/source-google-sheets/unit_tests/test_helpers.py | d886b9d59cc0a2d558cbca5e91e212bb5ce7dfe4 | [
"MIT",
"Apache-2.0",
"BSD-3-Clause",
"Elastic-2.0"
] | permissive | alldatacenter/alldata | 7bc7713c9f1d56ad6b8e59ea03206d1073b7e047 | 8d5f9a2d49ab8f9e85ccf058cb02c2fda287afc6 | refs/heads/master | 2023-08-05T07:32:25.442740 | 2023-08-03T13:17:24 | 2023-08-03T13:17:24 | 213,321,771 | 774 | 250 | Apache-2.0 | 2023-09-06T17:35:32 | 2019-10-07T07:36:18 | null | UTF-8 | Python | false | false | 11,655 | py | test_helpers.py | #
# Copyright (c) 2023 Airbyte, Inc., all rights reserved.
#
import unittest
from unittest.mock import Mock, patch
from airbyte_cdk.logger import AirbyteLogger
from airbyte_cdk.models.airbyte_protocol import (
AirbyteRecordMessage,
AirbyteStream,
ConfiguredAirbyteCatalog,
ConfiguredAirbyteStream,
... |
3cee165ba393dfca595c3019ecb399f361ad8f2c | 6dfc23ef65e5943712340ef2b4b648cc25ea1fad | /2020/06/24/How to Create a Celery Task Progress Bar in Django/djangoprogressbar/progress/example/views.py | 72f9924a437b3be8657c0ffd484dfc82e452e1f1 | [
"Unlicense"
] | permissive | PrettyPrinted/youtube_video_code | 6d265c910de18d780cdb99f7ea11b8b963929dc2 | 5654e5feba854d3b41b8dd75218e0221408e7831 | refs/heads/master | 2023-09-04T21:28:57.386174 | 2023-08-11T07:07:45 | 2023-08-11T07:07:45 | 186,743,986 | 698 | 2,347 | Unlicense | 2022-10-06T04:06:56 | 2019-05-15T03:40:45 | HTML | UTF-8 | Python | false | false | 203 | py | views.py | from django.shortcuts import render
from .tasks import go_to_sleep
def index(request):
task = go_to_sleep.delay(1)
return render(request, 'example/index.html', {'task_id' : task.task_id})
|
7cfb0d7cfa2dc445091caf8e6065ac785e339f56 | 265e9c51da355620be1cd0c9d08b04fccf2d694b | /src/obfuscapk/obfuscator_category.py | 8f3d467870344c9faa010106732b588a5adff17d | [
"MIT"
] | permissive | ClaudiuGeorgiu/Obfuscapk | bc45f735c868db039b37e1a9f5c1e236ce6aced3 | adb6e6462546f37407236b887549fa835ef1c115 | refs/heads/master | 2023-08-17T21:27:36.579324 | 2023-01-25T10:06:02 | 2023-01-25T10:06:02 | 202,535,048 | 998 | 267 | MIT | 2023-08-28T09:46:39 | 2019-08-15T12:13:29 | Python | UTF-8 | Python | false | false | 1,364 | py | obfuscator_category.py | #!/usr/bin/env python3
from abc import ABC, abstractmethod
from yapsy.IPlugin import IPlugin
from obfuscapk.obfuscation import Obfuscation
class IBaseObfuscator(ABC, IPlugin):
def __init__(self):
super().__init__()
self.is_adding_fields = False
self.is_adding_methods = False
@abst... |
f6fdd848ff60cb2afebbc99ec6d82ff558e1544e | 22b57568dad3db4949056f783bf5f5d78aaa9ca4 | /src/rust/iced-x86-py/tests/formatter_test.py | c7fae0c3059fa1b943ef8e38a7f2278954b827f5 | [
"MIT"
] | permissive | icedland/iced | d2178ea519c1472fb9c70c39c3a2f6428dc0d855 | 71f6d8372703e2487a973e0ad871a78348f63f8d | refs/heads/master | 2023-08-31T12:01:21.264077 | 2023-08-30T18:03:52 | 2023-08-30T18:03:52 | 147,866,440 | 1,446 | 128 | MIT | 2023-09-05T17:24:21 | 2018-09-07T19:30:25 | Rust | UTF-8 | Python | false | false | 9,963 | py | formatter_test.py | # SPDX-License-Identifier: MIT
# Copyright (C) 2018-present iced project and contributors
import pytest
from iced_x86 import *
FMT_SYNTAXES = [
FormatterSyntax.GAS,
FormatterSyntax.INTEL,
FormatterSyntax.MASM,
FormatterSyntax.NASM,
]
def test_invalid_syntax() -> None:
with pytest.raises(ValueError):
Formatter... |
cecf106d481c1c766464a4586d9a1cda8fa4d65e | f8faa223d8ba64caab5a732bc6d1d9a944b62aa7 | /pystiche/__init__.py | b0c13bfc0204048df5a2273301f5e66e76102ee4 | [
"BSD-3-Clause"
] | permissive | pystiche/pystiche | 2f53e26f38b7fe96ec29259a084ba8ab2c2a9d36 | 71217c24557dfba05da5795547bf6f3034e7c66f | refs/heads/main | 2023-04-13T04:01:40.275142 | 2022-03-18T21:59:12 | 2022-03-18T21:59:12 | 208,798,287 | 138 | 36 | BSD-3-Clause | 2023-04-11T12:31:29 | 2019-09-16T12:49:12 | Python | UTF-8 | Python | false | false | 254 | py | __init__.py | try:
from ._version import version as __version__ # type: ignore[import]
except ImportError:
__version__ = "UNKNOWN"
from .core import *
from . import loss, enc, demo, data, image, pyramid, optim
import os
os.makedirs(home(), exist_ok=True)
|
de1ae3512f336e53e9861a48f0442d9e9ec38083 | f9d79da5a27d5469f3e904da4b0baecddaa4d02d | /test/integration/test_app/frontend/app.py | b2240017f836deecafc92b709c167c3c4f1b358b | [
"Apache-2.0"
] | permissive | aws/aws-app-mesh-controller-for-k8s | 45c6be0401769af83bf50ba32fbd0682ea2bd9e4 | a73352cfac548dad655ef31fb1765b10a54f384c | refs/heads/master | 2023-09-03T15:04:16.369636 | 2023-08-14T23:41:04 | 2023-08-14T23:41:04 | 174,389,100 | 188 | 149 | Apache-2.0 | 2023-09-12T04:07:46 | 2019-03-07T17:19:11 | Go | UTF-8 | Python | false | false | 1,156 | py | app.py | import os
import requests
import config
from flask import Flask, request
from aws_xray_sdk.core import xray_recorder, patch_all
from aws_xray_sdk.ext.flask.middleware import XRayMiddleware
app = Flask(__name__)
xray_recorder.configure(
context_missing='LOG_ERROR',
service=config.XRAY_APP_NAME,
)
patch_all()
X... |
382983ad760e46f8cfc7ccde1307f271844c977c | 1e92cc7daabe240b374d73da462878e80814171b | /manila/tests/share/drivers/hpe/test_hpe_3par_driver.py | 018c5e491c5f212257c31d1de4783d8e74575127 | [
"Apache-2.0"
] | permissive | openstack/manila | e211281dd16128ac5685cd7b1a13a09d9e6456e1 | a93a844398a11a8a85f204782fb9456f7caccdbe | refs/heads/master | 2023-08-19T04:23:24.084637 | 2023-08-17T14:55:58 | 2023-08-17T14:55:58 | 24,245,238 | 178 | 141 | Apache-2.0 | 2023-08-03T10:43:19 | 2014-09-19T20:57:05 | Python | UTF-8 | Python | false | false | 42,790 | py | test_hpe_3par_driver.py | # Copyright 2015 Hewlett Packard Enterprise Development LP
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... |
b48105ef50eb7ce0e8e1f0832e2609542bb84ac2 | 90b5859f1d59690291aafb2720e3c9b379175c12 | /xarray/tests/test_tutorial.py | 9d59219c20437077b2a3f5eb1ef0e90163e6ff70 | [
"BSD-3-Clause",
"CC-BY-4.0",
"Apache-2.0",
"Python-2.0"
] | permissive | pydata/xarray | ddbcc883519366aac24a3abc7c7d211213c61b11 | dd09bddc62d701721565bbed3731e9586ea306d0 | refs/heads/main | 2023-09-01T11:41:04.476821 | 2023-09-01T09:37:14 | 2023-09-01T09:37:14 | 13,221,727 | 2,916 | 1,164 | Apache-2.0 | 2023-09-14T20:54:53 | 2013-09-30T17:21:10 | Python | UTF-8 | Python | false | false | 982 | py | test_tutorial.py | from __future__ import annotations
import pytest
from xarray import DataArray, tutorial
from xarray.tests import assert_identical, network
@network
class TestLoadDataset:
@pytest.fixture(autouse=True)
def setUp(self):
self.testfile = "tiny"
def test_download_from_github(self, tmp_path) -> None:... |
6e13e78412bf1b468883c06645b05bbc7412f411 | b3950a2a6912c9b494d22b9353322c3357df0110 | /tock/employees/migrations/0029_remove_userdata_is_18f_employee.py | 1ca12a697a742c7b1fa8236a65ba981d6f1a07c4 | [
"CC0-1.0",
"LicenseRef-scancode-public-domain",
"MIT"
] | permissive | 18F/tock | df1fa5e817e690ce0bff315a15799e2f78915882 | 99005d8f6c4605a69fbb620c41f38447ecbee459 | refs/heads/main | 2023-08-31T01:34:55.299577 | 2023-08-23T18:49:10 | 2023-08-23T18:49:10 | 30,162,008 | 135 | 50 | NOASSERTION | 2023-09-07T18:40:30 | 2015-02-01T22:19:32 | Python | UTF-8 | Python | false | false | 351 | py | 0029_remove_userdata_is_18f_employee.py | # Generated by Django 2.2.12 on 2020-05-05 01:48
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('employees', '0028_remove_userdata_is_billable'),
]
operations = [
migrations.RemoveField(
model_name='userdata',
name='is_1... |
af9e5fc4248357501557b3b453d1c2aad9950565 | 353e6363f1f57930240b296be6515855d7541a50 | /yasa/tests/test_io.py | 952a2d30122648860bc4f9c84a8039177d5f0130 | [
"BSD-3-Clause",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | raphaelvallat/yasa | 1e0d79f955dde9f2d06e39c18d0279d1711fa2ae | 9d9fb741887c96c3259e2fd0b66f525b76dbd623 | refs/heads/master | 2023-08-22T07:18:43.003934 | 2022-12-31T17:36:12 | 2022-12-31T17:36:12 | 161,560,926 | 313 | 106 | BSD-3-Clause | 2023-01-01T00:19:51 | 2018-12-13T00:14:38 | Python | UTF-8 | Python | false | false | 990 | py | test_io.py | """Test I/O."""
import pytest
import logging
import unittest
from yasa.io import (
is_sleepecg_installed,
set_log_level,
is_tensorpac_installed,
is_pyriemann_installed,
)
logger = logging.getLogger("yasa")
levels = ["debug", "info", "warning", "error", "critical"]
class TestIO(unittest.TestCase):
... |
a28f68709e34d612711961bbc0c054d5748b58eb | de84a9c84e9fd00fb1cf52c69381b20c96463f2b | /worker.py | bfc87b1f451c0b7c488f5a437231d9915d9e8db7 | [
"BSD-3-Clause"
] | permissive | amperser/proselint | 23b7b1a0963bf036dde9326b3bb0bbbfcdf26c61 | b5b7536bec5fd461e45cacad87c2aab9ea33ac35 | refs/heads/main | 2023-08-11T08:45:59.641463 | 2023-07-27T13:28:58 | 2023-07-27T13:28:58 | 29,220,809 | 4,513 | 267 | BSD-3-Clause | 2023-09-10T20:53:11 | 2015-01-14T01:24:07 | Python | UTF-8 | Python | false | false | 380 | py | worker.py | """Heroku web worker."""
from builtins import map
import os
import redis
from rq import Worker, Queue, Connection
listen = ['high', 'default', 'low']
redis_url = os.getenv('REDISTOGO_URL', 'redis://localhost:6379')
conn = redis.from_url(redis_url)
if __name__ == '__main__':
with Connection(conn):
work... |
1c06460adfbb222b25b7dcab53cd34628a01a4be | fefcb3f05b04f9fa218a2b37790476504ad0997f | /torchxrayvision/baseline_models/xinario/__init__.py | ac97e2177c0b84242776d1a7349122072a63f524 | [
"Apache-2.0"
] | permissive | mlmed/torchxrayvision | d3d097765967431e8c4330473d7093d5b7abd760 | 26db733796be0caa862933bdd840717a0ded2a68 | refs/heads/master | 2023-09-04T13:13:50.634241 | 2023-09-01T19:56:14 | 2023-09-01T19:56:14 | 244,798,181 | 737 | 205 | Apache-2.0 | 2023-09-01T19:53:49 | 2020-03-04T03:26:11 | Jupyter Notebook | UTF-8 | Python | false | false | 2,717 | py | __init__.py | import os
from typing import List
import torch
import torch.nn as nn
import torchvision
import pathlib
import torchxrayvision as xrv
class ViewModel(nn.Module):
"""
The native resolution of the model is 320x320. Images are scaled
automatically.
`Demo notebook <https://github.com/mlmed/torchxra... |
373fd0d84580f4441262627259dad0114af6955e | e3bb1df7fa4c51900dec7e9ddf5295e1a80938bd | /hummingbot/connector/exchange/bittrex/bittrex_auth.py | 8a8ffcbafdc2d447fa1f86d0f87c3caacc58616f | [
"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,536 | py | bittrex_auth.py | import time
import hmac
import hashlib
import urllib
from typing import Dict, Any, Tuple
import ujson
class BittrexAuth:
def __init__(self, api_key: str, secret_key: str):
self.api_key = api_key
self.secret_key = secret_key
def generate_auth_dict(
self,
http_method: str,
... |
16301d41efdf88f3e287842695d92fa66a8c81c3 | 2a1b8a671aceda6bc446f8ce26400aa84fa444a6 | /Packs/MailSenderNew/Integrations/MailSenderNew/MailSenderNew.py | c57a6eb672ffe091a3d122d7fe26f2a98d15c986 | [
"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 | 15,604 | py | MailSenderNew.py | import demistomock as demisto # noqa: F401
from CommonServerPython import * # noqa: F401
import contextlib
from typing import NoReturn
from email.mime.audio import MIMEAudio
from email.mime.base import MIMEBase
from email.mime.image import MIMEImage
from email.mime.multipart import MIMEMultipart
from email.mime.text... |
1fee12437db5af033aa0e18ccddf8722a67a3087 | a0736beb3269a71b2f5b13cafe8fb5e7f6f540f4 | /src/pipelines/epidemiology/ru_covid19_russia.py | 6173f9dec2e8c66008e2540401181be9a60429e9 | [
"Apache-2.0",
"CC-BY-4.0"
] | permissive | GoogleCloudPlatform/covid-19-open-data | d9e467fadbfc71686e30e28f3ce1d438e8fd92ba | 1123ce02a0b4059d6acd4c4446f3f9b8335018f1 | refs/heads/main | 2023-08-02T23:57:12.785363 | 2022-10-23T22:26:29 | 2022-10-23T22:26:29 | 282,079,576 | 489 | 146 | Apache-2.0 | 2022-09-05T12:00:37 | 2020-07-23T23:43:51 | Python | UTF-8 | Python | false | false | 1,679 | py | ru_covid19_russia.py | # Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... |
3131936a4caeae6956936c2111de639d7484303d | 93b28d4948b7de5913a8b8748259435443b0ac05 | /tests_app/tests/unit/utils/tests.py | b709c13667c63ce2d201f04740aea9e23a0883d3 | [
"MIT"
] | permissive | chibisov/drf-extensions | 79ea734e652729c4ea42fdf1bb65f1907efa75b6 | f7de5c0278371d35efc3f8ff929fcccdfb641c21 | refs/heads/master | 2023-08-04T03:08:24.966415 | 2023-05-29T11:31:56 | 2023-05-29T11:31:56 | 11,654,191 | 1,291 | 240 | MIT | 2023-05-29T11:31:58 | 2013-07-25T07:06:04 | Python | UTF-8 | Python | false | false | 1,451 | py | tests.py | import contextlib
try:
from unittest import mock
except ImportError:
import mock
from django.test import TestCase
from rest_framework_extensions.utils import prepare_header_name, get_rest_framework_version
@contextlib.contextmanager
def parsed_version(version):
with mock.patch('rest_framework.VERSION', ... |
456359985cc8af31bbf9112ab30dde80b2c9a375 | 7baea78a8148d86d135b82c30cb04e339ae5e3d3 | /experiment_utils/run_sweep.py | 1d7cff9e269c3ecd31636bc226bc852b32b3508e | [
"MIT"
] | permissive | jonasrothfuss/ProMP | 6fd4fedc9868f2869b9799258edef457442f13af | 93ae339e23dfc6e1133f9538f2c7cc0ccee89d19 | refs/heads/master | 2022-11-08T17:41:00.244966 | 2019-09-06T08:53:26 | 2019-09-06T08:53:26 | 143,927,841 | 241 | 56 | MIT | 2022-09-30T18:34:06 | 2018-08-07T21:18:07 | Python | UTF-8 | Python | false | false | 2,309 | py | run_sweep.py | import sys
import os
import argparse
import itertools
from experiment_utils import config
from experiment_utils.utils import query_yes_no
import doodad as dd
import doodad.mount as mount
import doodad.easy_sweep.launcher as launcher
from doodad.easy_sweep.hyper_sweep import run_sweep_doodad
def run_sweep(run_experim... |
9970e015406e79cc76f2e3e42b01d5121cb426ba | c72be999abf8848a7d09264ba9ee7bae30f4524a | /autopnp_tool_change/scripts/change_tool_client.py~ | cc8c3e94e566710063a639f623edddb842f12ea5 | [] | no_license | ipa-rmb/autopnp | 8399be67c1a3de61e01619dc8677c52728ffd836 | f25517a093c772a1481bcff3e9da055d4c627954 | refs/heads/indigo_dev | 2022-05-05T01:57:05.858437 | 2022-04-29T07:31:42 | 2022-04-29T07:31:42 | 3,398,225 | 144 | 101 | null | 2019-07-08T06:11:13 | 2012-02-09T15:30:28 | C | UTF-8 | Python | false | false | 2,160 | change_tool_client.py~ | #!/usr/bin/python
import roslib; roslib.load_manifest('autopnp_tool_change')
import rospy
import actionlib
import autopnp_tool_change.msg
def go_to_start_position_client(goal):
go_to_start_position_client = actionlib.SimpleActionClient('go_to_start_position_action', autopnp_tool_change.msg.GoToStartPositionAction)... | |
98ed6f824f8fbeba65e20a6f594b5eca814d1a18 | 5105403f2b75990654519438d8ceabcf80962ebf | /docs/bokeh/source/docs/first_steps/examples/first_steps_4_datetime_axis.py | 6221cf0aa1e9ea3dd1395cbe871482d72a82cf8b | [
"BSD-3-Clause"
] | permissive | bokeh/bokeh | ed1d81eb07d27d27c6710c9fec9114886047f528 | 310cb2cbeabc4c4b8180cbda566df16039737cdc | refs/heads/branch-3.3 | 2023-08-31T23:53:06.537061 | 2023-08-30T03:43:05 | 2023-08-30T03:43:05 | 3,834,332 | 17,174 | 5,251 | BSD-3-Clause | 2023-09-14T11:37:23 | 2012-03-26T15:40:01 | Python | UTF-8 | Python | false | false | 792 | py | first_steps_4_datetime_axis.py | import random
from datetime import datetime, timedelta
from bokeh.models import DatetimeTickFormatter, NumeralTickFormatter
from bokeh.plotting import figure, show
# generate list of dates (today's date in subsequent weeks)
dates = [(datetime.now() + timedelta(day * 7)) for day in range(0, 26)]
# generate 25 random ... |
1c1745802ccd5379ffefa137afdacc3962cfdbe8 | e5e0d729f082999a9bec142611365b00f7bfc684 | /tensorflow/python/keras/layers/core_test.py | c9437052081942fff4c4d6e5cf2138ae6b1480fd | [
"Apache-2.0"
] | permissive | NVIDIA/tensorflow | ed6294098c7354dfc9f09631fc5ae22dbc278138 | 7cbba04a2ee16d21309eefad5be6585183a2d5a9 | refs/heads/r1.15.5+nv23.03 | 2023-08-16T22:25:18.037979 | 2023-08-03T22:09:23 | 2023-08-03T22:09:23 | 263,748,045 | 763 | 117 | Apache-2.0 | 2023-07-03T15:45:19 | 2020-05-13T21:34:32 | C++ | UTF-8 | Python | false | false | 16,420 | py | core_test.py | # Copyright 2016 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... |
1a7be8600f3883cbfb5984eea6702bbfc87c740f | 38fff7bdefd8d62a740d51329b50d0e1e49258bb | /projects/pyparsing/fuzz_parse.py | 885056300a4d64992726aa9fcee9cb618b71b2b2 | [
"Apache-2.0"
] | permissive | google/oss-fuzz | 026384c2ada61ef68b147548e830f60730c5e738 | f0275421f84b8f80ee767fb9230134ac97cb687b | refs/heads/master | 2023-08-31T23:30:28.157702 | 2023-08-31T21:49:30 | 2023-08-31T21:49:30 | 63,809,205 | 9,438 | 2,315 | Apache-2.0 | 2023-09-14T20:32:19 | 2016-07-20T19:39:50 | Shell | UTF-8 | Python | false | false | 2,669 | py | fuzz_parse.py | #!/usr/bin/python3
# Copyright 2022 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 agr... |
6b212efd8b84093890683337f55b97806204c5c1 | 6bf300763e699d53e1588925e56dac1ef872b67c | /core/generator/java/java.stoneg.py | bd575d25505b3cd82883f6a99296f0bcbe619547 | [
"MIT"
] | permissive | dropbox/dropbox-sdk-java | c7a51c43ea2813579a18a41e47e09b7097f9827e | d96bbd5c28b1d2398957931e0ca1e3568b2df41d | refs/heads/main | 2023-08-25T08:58:08.939105 | 2023-08-10T21:31:40 | 2023-08-10T21:31:40 | 10,983,050 | 621 | 581 | MIT | 2023-08-10T21:31:41 | 2013-06-27T00:32:18 | Java | UTF-8 | Python | false | false | 180,888 | py | java.stoneg.py | import abc
import argparse
import json
import os
import re
import sys
import types
from collections import defaultdict, OrderedDict
if sys.version_info >= (3, 10):
from collections.abc import Sequence
else:
from collections import Sequence
from contextlib import contextmanager
from functools import (
tot... |
09a7c689129cc95b73bb5421a131c5110374d9df | c530897cb72b6943c7226b25824444cad5f3503b | /usaspending_api/broker/tests/integration/test_broker_integration.py | 79490760e4f77ec4c4049262881c1b9492d586e3 | [
"CC0-1.0"
] | permissive | fedspendingtransparency/usaspending-api | fc63a22d32ea0207b7273d3e1ef26ba9dbabc42a | 38f920438697930ae3ac57bbcaae9034877d8fb7 | refs/heads/master | 2023-09-01T22:00:36.633612 | 2023-08-29T18:39:18 | 2023-08-29T18:39:18 | 65,394,827 | 276 | 118 | CC0-1.0 | 2023-09-14T20:33:15 | 2016-08-10T15:39:45 | Python | UTF-8 | Python | false | false | 4,595 | py | test_broker_integration.py | import pytest
from django.conf import settings
from django.db import connections, DEFAULT_DB_ALIAS
from django.test import TestCase
class BrokerIntegrationTestCase(TestCase):
databases = {"default", "data_broker"}
dummy_table_name = "dummy_broker_table_to_be_rolled_back"
@classmethod
def setUpClass(... |
803ba38f89a1ed0ee99381cd809d49bfaaf8135b | bf8d344b17e2ff9b7e38ad9597d5ce0e3d4da062 | /ppdet/engine/callbacks.py | 1f2d546d86e9473c5dd6b7fd15068c940006dab5 | [
"Apache-2.0"
] | permissive | PaddlePaddle/PaddleDetection | e7e0f40bef75a4e0b6dcbacfafa7eb1969e44961 | bd83b98342b0a6bc8d8dcd5936233aeda1e32167 | refs/heads/release/2.6 | 2023-08-31T07:04:15.357051 | 2023-08-18T02:24:45 | 2023-08-18T02:24:45 | 217,475,193 | 12,523 | 3,096 | Apache-2.0 | 2023-09-10T10:05:56 | 2019-10-25T07:21:14 | Python | UTF-8 | Python | false | false | 21,592 | py | callbacks.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
#
# Un... |
7334faf0a81b5569092e939433542d680d2f415b | a526b24dcce8d802db6ad0cd387a64bd73e5f46a | /trello/card.py | c69a77d86b0faa31f1f938af03b99e1136f6036b | [] | permissive | sarumont/py-trello | f430b4e8379d800739563dbc87ddd73def542a2f | a628d545e936ccdab299cb139f56b8f98836618e | refs/heads/master | 2023-08-02T11:41:50.011554 | 2023-01-26T16:47:46 | 2023-01-26T16:47:46 | 3,123,657 | 809 | 344 | BSD-3-Clause | 2023-03-13T19:45:00 | 2012-01-07T08:31:17 | Python | UTF-8 | Python | false | false | 30,264 | py | card.py | # -*- coding: utf-8 -*-
from __future__ import with_statement, print_function, absolute_import
import datetime
from operator import itemgetter
import pytz
from dateutil import parser as dateparser
from trello import TrelloBase
from trello.attachments import Attachments
from trello.checklist import Checklist
from tre... |
9049e49b48b8779003e24e996bfa1ddae0a9ee9f | 1e148aada79cb648872bb8ecc740a6a798b2e236 | /tests/test_room_simulator.py | f29d23bc212c104b0e1cc36e3b91cf6595486f63 | [
"MIT"
] | permissive | iver56/audiomentations | a40ae457ca03ab8c927ad804f489cef783dae8d4 | 498a7d4f149d8917813aa35ff18e748cff49cd09 | refs/heads/main | 2023-09-05T05:53:05.369792 | 2023-08-30T13:12:51 | 2023-08-30T13:12:51 | 170,352,817 | 1,520 | 182 | MIT | 2023-09-07T14:35:26 | 2019-02-12T16:36:24 | Python | UTF-8 | Python | false | false | 5,015 | py | test_room_simulator.py | import random
import numpy as np
import pytest
from audiomentations import RoomSimulator
DEBUG = False
def get_sinc_impulse(sample_rate, duration):
"""Create a `duration` seconds chirp from 0Hz to `nyquist frequency`"""
n = np.arange(-duration / 2, duration / 2, 1 / sample_rate)
# Full band sinc impul... |
1bc1e6f085affc491c552612789650d727ed23f1 | fb1e852da0a026fb59c8cb24aeb40e62005501f1 | /beit2/modeling_vqkd.py | 8cd8be7725ba11c34a8a241e83b3de650dbb983a | [
"LicenseRef-scancode-unknown-license-reference",
"LGPL-2.1-or-later",
"LicenseRef-scancode-free-unknown",
"Apache-2.0",
"MIT"
] | permissive | microsoft/unilm | 134aa44867c5ed36222220d3f4fd9616d02db573 | b60c741f746877293bb85eed6806736fc8fa0ffd | refs/heads/master | 2023-08-31T04:09:05.779071 | 2023-08-29T14:07:57 | 2023-08-29T14:07:57 | 198,350,484 | 15,313 | 2,192 | MIT | 2023-08-19T11:33:20 | 2019-07-23T04:15:28 | Python | UTF-8 | Python | false | false | 15,070 | py | modeling_vqkd.py | # --------------------------------------------------------
# BEiT v2: Masked Image Modeling with Vector-Quantized Visual Tokenizers (https://arxiv.org/abs/2208.06366)
# Github source: https://github.com/microsoft/unilm/tree/master/beitv2
# Copyright (c) 2022 Microsoft
# Licensed under The MIT License [see LICENSE for d... |
785231a77f42cc3738813474dcd19fe864689030 | e03bce53de6f88c0e09f56e4fe11c36af0f1161f | /runway/_cli/logs.py | 994fa7408539b5c1f212569f08ac2b36488d2b19 | [
"Apache-2.0"
] | permissive | onicagroup/runway | 20c31df9cbc1a1ffc5c9aa468ce5cf7d6ac7899f | 0763b06aee07d2cf3f037a49ca0cb81a048c5deb | refs/heads/master | 2023-08-30T22:35:54.113981 | 2023-08-29T14:13:35 | 2023-08-29T14:13:35 | 122,529,924 | 156 | 79 | Apache-2.0 | 2023-09-13T13:43:50 | 2018-02-22T20:12:55 | Python | UTF-8 | Python | false | false | 4,395 | py | logs.py | """Runway CLI logging setup."""
import logging
import os
from typing import Any, Dict
import coloredlogs
from runway import LogLevels
from ..compat import cached_property
# COLOR_FORMAT = "%(levelname)s:%(name)s:\033[%(color)sm%(message)s\033[39m"
LOGGER = logging.getLogger("runway")
LOG_FORMAT = "[runway] %(messa... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.