hexsha stringlengths 40 40 | size int64 2 1.05M | ext stringclasses 9
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 193 | max_stars_repo_name stringlengths 6 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 36.6k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 193 | max_issues_repo_name stringlengths 6 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 29.8k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 193 | max_forks_repo_name stringlengths 6 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 11.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.05M | avg_line_length float64 1 404k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ff02b6f9d382e6547ea0e8f3a32ef0433a14e4f0 | 2,994 | py | Python | Network/Tools/Checksum.py | hongsofwing/PyQYT-master | 9a112d9adbf9885a8b7535b7ef7759b60a0f9a29 | [
"CNRI-Python"
] | null | null | null | Network/Tools/Checksum.py | hongsofwing/PyQYT-master | 9a112d9adbf9885a8b7535b7ef7759b60a0f9a29 | [
"CNRI-Python"
] | null | null | null | Network/Tools/Checksum.py | hongsofwing/PyQYT-master | 9a112d9adbf9885a8b7535b7ef7759b60a0f9a29 | [
"CNRI-Python"
] | null | null | null | #!/usr/bin/python3.4
# -*- coding=utf-8 -*-
#本脚由亁颐堂现任明教教主编写,用于乾颐盾Python课程!
#教主QQ:605658506
#亁颐堂官网www.qytang.com
#乾颐盾是由亁颐堂现任明教教主开发的综合性安全课程
#包括传统网络安全(防火墙,IPS...)与Python语言和黑客渗透课程!
import os
import argparse
import socket
import struct
import select
import time
import optparse
ICMP_ECHO_REQUEST = 8
DEFAUL... | 33.266667 | 90 | 0.705077 |
ff02b95e73cf8f1aac3f2b1b9f46abc8c50e1c14 | 4,644 | py | Python | bundle/sagemaker_rl_agent/lib/python3.6/site-packages/markov/boto/s3/files/hyperparameters.py | larsll/deepracer-simapp | 9251c32ff33d49955b63ccca4f38d01a0c721d4f | [
"MIT"
] | 1 | 2022-02-23T20:34:00.000Z | 2022-02-23T20:34:00.000Z | bundle/sagemaker_rl_agent/lib/python3.6/site-packages/markov/boto/s3/files/hyperparameters.py | Bandwidth/deepracer-simapp | 9bf0a5f9c55e37ecef8e72b1b6dc15ecb0370bc1 | [
"MIT"
] | null | null | null | bundle/sagemaker_rl_agent/lib/python3.6/site-packages/markov/boto/s3/files/hyperparameters.py | Bandwidth/deepracer-simapp | 9bf0a5f9c55e37ecef8e72b1b6dc15ecb0370bc1 | [
"MIT"
] | null | null | null | '''This module implements hyperparameters file'''
import os
import io
import json
import logging
import botocore
from markov.boto.s3.s3_client import S3Client
from markov.log_handler.logger import Logger
from markov.log_handler.exception_handler import log_and_exit
from markov.log_handler.constants import (SIMAPP_EVE... | 42.218182 | 98 | 0.602929 |
ff02cc34be2727cd94f83f5a3afb853733e82113 | 556 | py | Python | Data Structures/Graphs/bfs.py | mishrakeshav/Competitive-Programming | b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2 | [
"MIT"
] | 2 | 2020-06-25T21:10:32.000Z | 2020-12-10T06:53:45.000Z | Data Structures/Graphs/bfs.py | mishrakeshav/Competitive-Programming | b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2 | [
"MIT"
] | null | null | null | Data Structures/Graphs/bfs.py | mishrakeshav/Competitive-Programming | b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2 | [
"MIT"
] | 3 | 2020-05-15T14:17:09.000Z | 2021-07-25T13:18:20.000Z | from collections import deque
def bfs(g, srcNode, dstNode):
if srcNode == dstNode:
return
queue = deque()
queue.append(g.getVertex(srcNode))
while queue:
currVertex = queue.popleft()
if currVertex.val == dstNode:
return
for nbr in currVertex.getConnections()... | 27.8 | 47 | 0.564748 |
ff02efdab3fd268e15a475609765af29a9fd3db9 | 3,398 | py | Python | docs/samples/specification/multiapi/generated/azure/multiapi/sample/v1/models/_models.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 35 | 2018-04-03T12:15:53.000Z | 2022-03-11T14:03:34.000Z | docs/samples/specification/multiapi/generated/azure/multiapi/sample/v1/models/_models.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 652 | 2017-08-28T22:44:41.000Z | 2022-03-31T21:20:31.000Z | docs/samples/specification/multiapi/generated/azure/multiapi/sample/v1/models/_models.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 29 | 2017-08-28T20:57:01.000Z | 2022-03-11T14:03:38.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 27.626016 | 100 | 0.570335 |
ff02f9b1830ab6348980f4c8113d271f1a3c71a6 | 3,442 | py | Python | setup.py | kushagrasharma/py-evm | 98465794f35fb9b4cdd81d0ae5c3751fe8dc161d | [
"MIT"
] | null | null | null | setup.py | kushagrasharma/py-evm | 98465794f35fb9b4cdd81d0ae5c3751fe8dc161d | [
"MIT"
] | null | null | null | setup.py | kushagrasharma/py-evm | 98465794f35fb9b4cdd81d0ae5c3751fe8dc161d | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
deps = {
'eth': [
"cryptography>=2.0.3,<3.0.0",
"eth-bloom>=1.0.3,<2.0.0",
"eth-keys>=0.2.1,<1.0.0",
"eth-typing>=2.0.0,<3.0.0",
"eth-utils>=1.3.0,<2.0.0",
"lru-dict>=1.1.6",
... | 30.732143 | 139 | 0.558106 |
ff031d97da7b47befb7eaf116c6844b6aad34c72 | 6,894 | py | Python | channels_graphql_ws/transport.py | Abnormally/DjangoChannelsGraphqlWs | f741c20706901fc37f37fe08f6894c5614d2ab7d | [
"MIT"
] | 259 | 2018-06-27T12:33:54.000Z | 2022-03-26T23:09:04.000Z | channels_graphql_ws/transport.py | Abnormally/DjangoChannelsGraphqlWs | f741c20706901fc37f37fe08f6894c5614d2ab7d | [
"MIT"
] | 83 | 2018-06-27T15:04:25.000Z | 2022-03-12T19:05:40.000Z | channels_graphql_ws/transport.py | Abnormally/DjangoChannelsGraphqlWs | f741c20706901fc37f37fe08f6894c5614d2ab7d | [
"MIT"
] | 59 | 2018-07-02T20:29:07.000Z | 2022-03-12T16:10:53.000Z | # Copyright (C) DATADVANCE, 2010-2021
#
# 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, modify, merge, publish,
# ... | 36.670213 | 86 | 0.630403 |
ff033e3cbb6eb91ca5454e476e1d84d571f79409 | 14,147 | py | Python | st2common/tests/unit/test_logger.py | magiceses/st2 | a048ba92a8a1a5d272f277bf8fab0951df903306 | [
"Apache-2.0"
] | null | null | null | st2common/tests/unit/test_logger.py | magiceses/st2 | a048ba92a8a1a5d272f277bf8fab0951df903306 | [
"Apache-2.0"
] | 2 | 2020-03-04T08:33:36.000Z | 2020-03-04T08:34:14.000Z | st2common/tests/unit/test_logger.py | magiceses/st2 | a048ba92a8a1a5d272f277bf8fab0951df903306 | [
"Apache-2.0"
] | null | null | null | # Licensed to the StackStorm, Inc ('StackStorm') under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use th... | 35.724747 | 99 | 0.649113 |
ff037dd824b52cc7531a3648c02201f2430487e1 | 3,786 | py | Python | apache/tests/test_apache.py | dvanderveer/integrations-core | 41dd9950296455457c9b7342584153678503d5aa | [
"BSD-3-Clause"
] | null | null | null | apache/tests/test_apache.py | dvanderveer/integrations-core | 41dd9950296455457c9b7342584153678503d5aa | [
"BSD-3-Clause"
] | null | null | null | apache/tests/test_apache.py | dvanderveer/integrations-core | 41dd9950296455457c9b7342584153678503d5aa | [
"BSD-3-Clause"
] | null | null | null | # (C) Datadog, Inc. 2010-2018
# All rights reserved
# Licensed under Simplified BSD License (see LICENSE)
import pytest
import os
import subprocess
import requests
import time
import logging
from datadog_checks.apache import Apache
log = logging.getLogger('test_apache')
CHECK_NAME = 'apache'
HERE = os.path.dirname... | 27.23741 | 87 | 0.674062 |
ff03a8ae39e31c201fd0adaeea48ab4a2faa977d | 491 | py | Python | alipay/aop/api/response/AlipayOpenMiniPluginuseconfigUpgradeCancelResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/response/AlipayOpenMiniPluginuseconfigUpgradeCancelResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/response/AlipayOpenMiniPluginuseconfigUpgradeCancelResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
class AlipayOpenMiniPluginuseconfigUpgradeCancelResponse(AlipayResponse):
def __init__(self):
super(AlipayOpenMiniPluginuseconfigUpgradeCancelResponse, self).__init__()
def p... | 30.6875 | 123 | 0.802444 |
ff03ae672f347e0d4f1b9bdf3d807dbce23e4037 | 6,568 | py | Python | pyinstrument/renderers/console.py | sthagen/pyinstrument | 7b52e037bc3b5736037171003ef3318938e081fe | [
"BSD-3-Clause"
] | 1 | 2020-12-13T06:22:51.000Z | 2020-12-13T06:22:51.000Z | pyinstrument/renderers/console.py | sthagen/pyinstrument | 7b52e037bc3b5736037171003ef3318938e081fe | [
"BSD-3-Clause"
] | null | null | null | pyinstrument/renderers/console.py | sthagen/pyinstrument | 7b52e037bc3b5736037171003ef3318938e081fe | [
"BSD-3-Clause"
] | null | null | null | import time
from typing import Any
import pyinstrument
from pyinstrument import processors
from pyinstrument.frame import BaseFrame
from pyinstrument.renderers.base import FrameRenderer, ProcessorList
from pyinstrument.session import Session
from pyinstrument.typing import LiteralStr
from pyinstrument.util import trun... | 32.84 | 118 | 0.543697 |
ff03b6409a11227fc39e6a39e84b1c342f5528d3 | 297 | py | Python | LeetCode/easy - Array/27. Remove Element/solution.py | vincent507cpu/Comprehensive-Algorithm-Solution | 04e01e49622457f09af2e1133954f043c0c92cb9 | [
"MIT"
] | 4 | 2020-06-26T00:45:53.000Z | 2021-04-19T12:23:32.000Z | LeetCode/easy - Array/27. Remove Element/solution.py | vincent507cpu/LeetCode-Comprehensive-Solution | 04e01e49622457f09af2e1133954f043c0c92cb9 | [
"MIT"
] | null | null | null | LeetCode/easy - Array/27. Remove Element/solution.py | vincent507cpu/LeetCode-Comprehensive-Solution | 04e01e49622457f09af2e1133954f043c0c92cb9 | [
"MIT"
] | null | null | null | # my solution, should be the best one
class Solution:
def removeElement(self, nums: List[int], val: int) -> int:
n = 0
for i in range(len(nums)):
if nums[i] != val:
nums[n] = nums[i]
n += 1
return n | 24.75 | 62 | 0.43771 |
ff03d5d1a1df800a4f6b7b94a4b1896e009f0d55 | 256 | py | Python | Lab_3/QemuVirt64/Utility/overlay/usr/bin/led31_blink.py | Milka03/Linux-for-Embedded-Systems | 447a4a833f28cb8b1e2674126f546d6d40973369 | [
"MIT"
] | null | null | null | Lab_3/QemuVirt64/Utility/overlay/usr/bin/led31_blink.py | Milka03/Linux-for-Embedded-Systems | 447a4a833f28cb8b1e2674126f546d6d40973369 | [
"MIT"
] | null | null | null | Lab_3/QemuVirt64/Utility/overlay/usr/bin/led31_blink.py | Milka03/Linux-for-Embedded-Systems | 447a4a833f28cb8b1e2674126f546d6d40973369 | [
"MIT"
] | null | null | null | #!/usr/bin/python
import gpiod
import time
chip = gpiod.Chip('9008000.gpio')
led1 = chip.get_line(31)
led1.request(consumer="its_me", type=gpiod.LINE_REQ_DIR_OUT)
while True:
led1.set_value(1)
time.sleep(0.5)
led1.set_value(0)
time.sleep(0.5)
| 19.692308 | 60 | 0.71875 |
ff0408175ecde19c95528730c460eef5d0b92e10 | 2,446 | py | Python | tests/common_examples/test_common_examples.py | Dynatrace/alyeska | a1e08e105e9c7ae7f10852363f2e5dca5db9be0c | [
"ECL-2.0",
"Apache-2.0"
] | 2 | 2019-09-11T11:24:19.000Z | 2019-10-01T15:25:04.000Z | tests/common_examples/test_common_examples.py | Dynatrace/alyeska | a1e08e105e9c7ae7f10852363f2e5dca5db9be0c | [
"ECL-2.0",
"Apache-2.0"
] | 25 | 2019-09-11T12:12:12.000Z | 2019-10-10T10:38:22.000Z | tests/common_examples/test_common_examples.py | Dynatrace/alyeska | a1e08e105e9c7ae7f10852363f2e5dca5db9be0c | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
## ---------------------------------------------------------------------------
## Copyright 2019 Dynatrace 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
##
#... | 30.962025 | 78 | 0.656991 |
ff040f52cdbeca213ab7604bc39ea307e5de8a0a | 21,741 | py | Python | ml3d/torch/pipelines/semantic_segmentation.py | kylevedder/SparsePointPillars | 00d73c9ae5153d3a108fc05c6dface93c5b5ef47 | [
"MIT"
] | 7 | 2021-08-11T02:21:37.000Z | 2022-01-15T19:32:04.000Z | ml3d/torch/pipelines/semantic_segmentation.py | kylevedder/SparsePointPillars | 00d73c9ae5153d3a108fc05c6dface93c5b5ef47 | [
"MIT"
] | null | null | null | ml3d/torch/pipelines/semantic_segmentation.py | kylevedder/SparsePointPillars | 00d73c9ae5153d3a108fc05c6dface93c5b5ef47 | [
"MIT"
] | null | null | null | import torch, pickle
import torch.nn as nn
import numpy as np
import logging
import sys
from datetime import datetime
from tqdm import tqdm
from torch.utils.tensorboard import SummaryWriter
from torch.utils.data import Dataset, IterableDataset, DataLoader
from pathlib import Path
from sklearn.metrics import confusion_... | 39.032316 | 114 | 0.572421 |
ff041f56b7a4702b9b2af62f14013ca42d7315ba | 527 | py | Python | tests/_site/apps/customer/migrations/0003_update_email_length.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | tests/_site/apps/customer/migrations/0003_update_email_length.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | 5 | 2021-05-28T19:38:28.000Z | 2022-03-12T00:45:39.000Z | tests/_site/apps/customer/migrations/0003_update_email_length.py | Jean1508/ya-madoa | 1ffb1d11e15bf33e4c3a09698675a4357e887eaa | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2016-07-13 08:44
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('customer', '0002_auto_20150807_1725'),
]
operations = [
migrat... | 25.095238 | 102 | 0.612903 |
ff043a15ea27edf6d26f2dced35e4ea326aff954 | 781 | py | Python | trebelge/XMLFileTypeState/AbstractXMLFileTypeState.py | askmetoo/trebelge | bff1b13edf41d1a9afd9ddb039f5b4089cb83dd6 | [
"MIT"
] | null | null | null | trebelge/XMLFileTypeState/AbstractXMLFileTypeState.py | askmetoo/trebelge | bff1b13edf41d1a9afd9ddb039f5b4089cb83dd6 | [
"MIT"
] | null | null | null | trebelge/XMLFileTypeState/AbstractXMLFileTypeState.py | askmetoo/trebelge | bff1b13edf41d1a9afd9ddb039f5b4089cb83dd6 | [
"MIT"
] | 1 | 2022-03-17T21:53:07.000Z | 2022-03-17T21:53:07.000Z | # from __future__ import annotations
from abc import ABC, abstractmethod
from trebelge.XMLFileTypeState import XMLFileTypeStateContext
class AbstractXMLFileTypeState(ABC):
"""
The base State class declares methods that all Concrete State should
implement and also provides a reference to the Context objec... | 26.033333 | 72 | 0.733675 |
ff044f775937886b1ff7033d9fd1d04cd0d8a6c5 | 13,936 | py | Python | log-analysis/log2log.py | danpoe/gpu-tools | 5bf3a14633480ec6ee19f82d4a7f72767ebbc0e4 | [
"MIT"
] | null | null | null | log-analysis/log2log.py | danpoe/gpu-tools | 5bf3a14633480ec6ee19f82d4a7f72767ebbc0e4 | [
"MIT"
] | null | null | null | log-analysis/log2log.py | danpoe/gpu-tools | 5bf3a14633480ec6ee19f82d4a7f72767ebbc0e4 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import argparse
import sys
import copy
from functools import reduce, partial
import machinery as ma
from machinery import ErrMsg, chk, bail
from machinery import LogEntry as L
from generic import lty, tty, lins, tins, either_ty, ljcut, dupchk, listify
############
# Toplevel #
############
def... | 27.379175 | 80 | 0.63806 |
ff047e648ba605fb3259d2440d9189e81a0ba309 | 4,814 | py | Python | alipay/aop/api/domain/AlipayCommerceOperationUnofficialMaterialSubmitModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/domain/AlipayCommerceOperationUnofficialMaterialSubmitModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/domain/AlipayCommerceOperationUnofficialMaterialSubmitModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class AlipayCommerceOperationUnofficialMaterialSubmitModel(object):
def __init__(self):
self._isv_pid = None
self._material_level = None
self._mini_app_id = None
self._o... | 32.972603 | 91 | 0.622351 |
ff048159a7f56894934e715b8b3b0a93c32a6674 | 831 | py | Python | setup.py | alpha2phi/investplus | bf6a9f1d004938c84b05f5c974ff73e6a193236c | [
"MIT"
] | null | null | null | setup.py | alpha2phi/investplus | bf6a9f1d004938c84b05f5c974ff73e6a193236c | [
"MIT"
] | null | null | null | setup.py | alpha2phi/investplus | bf6a9f1d004938c84b05f5c974ff73e6a193236c | [
"MIT"
] | null | null | null | import os
from setuptools import setup, find_packages
def read(fname):
"""
Read the file content.
:param fname str: File name.
"""
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name="investplus",
version="0.0.1",
author="alpha2phi",
author_email="alph... | 24.441176 | 70 | 0.646209 |
ff0498d06af77da298caef93ee9f408d2713c892 | 13,416 | py | Python | tests/test_config.py | mbs-technologie/home-assistant | 71fc446425cbb1c0d4670c261ce8ea3bfd83a73d | [
"MIT"
] | 13 | 2017-02-01T13:25:34.000Z | 2022-01-26T01:30:39.000Z | tests/test_config.py | 1Forward1Back/home-assistant | ce24ef0c20dea0fd671d6f2c2a8b1456b4b66ba6 | [
"MIT"
] | 9 | 2017-07-26T18:05:32.000Z | 2021-12-05T14:16:34.000Z | tests/test_config.py | 1Forward1Back/home-assistant | ce24ef0c20dea0fd671d6f2c2a8b1456b4b66ba6 | [
"MIT"
] | 21 | 2017-07-26T17:09:40.000Z | 2022-03-27T22:37:22.000Z | """Test config utils."""
# pylint: disable=protected-access
import os
import unittest
import unittest.mock as mock
import pytest
from voluptuous import MultipleInvalid
from homeassistant.core import DOMAIN, HomeAssistantError, Config
import homeassistant.config as config_util
from homeassistant.const import (
CON... | 37.266667 | 78 | 0.634317 |
ff04a297a612a1cc87a9d13f9618c1cebe98b29b | 2,033 | py | Python | napari/utils/perf/__init__.py | mkitti/napari | 4e954d30b5a1b70c5e495db1b8f48a3bdda1ff86 | [
"BSD-3-Clause"
] | null | null | null | napari/utils/perf/__init__.py | mkitti/napari | 4e954d30b5a1b70c5e495db1b8f48a3bdda1ff86 | [
"BSD-3-Clause"
] | null | null | null | napari/utils/perf/__init__.py | mkitti/napari | 4e954d30b5a1b70c5e495db1b8f48a3bdda1ff86 | [
"BSD-3-Clause"
] | null | null | null | """Performance Monitoring.
The perfmon module lets you instrument your code and visualize its run-time
behavior and timings in Chrome's Tracing GUI.
To enable perfmon define the env var NAPARI_PERFMON as follows:
NAPARI_PERFMON=1
Activates perfmon, trace using Debug -> Performance Trace menu.
NAPARI_PERFMON=/p... | 34.457627 | 77 | 0.765371 |
ff05199e6c14b4a33422f43ed9c7a852988af991 | 8,216 | py | Python | testtools/matchers/_dict.py | elopio/testtools-textresult | 04384df526e1111834a6801d70d4c13052a4d261 | [
"MIT"
] | null | null | null | testtools/matchers/_dict.py | elopio/testtools-textresult | 04384df526e1111834a6801d70d4c13052a4d261 | [
"MIT"
] | null | null | null | testtools/matchers/_dict.py | elopio/testtools-textresult | 04384df526e1111834a6801d70d4c13052a4d261 | [
"MIT"
] | null | null | null | # Copyright (c) 2009-2012 testtools developers. See LICENSE for details.
__all__ = [
'KeysEqual',
]
from ..helpers import (
dict_subtract,
filter_values,
map_values,
)
from ._higherorder import (
AnnotatedMismatch,
PrefixedMismatch,
MismatchesAll,
)
from ._impl import Matcher, ... | 31.6 | 78 | 0.660297 |
ff0537408fd6c14ec413c5f6dd8b953f388ebc34 | 3,339 | py | Python | src/python/pants/bin/local_pants_runner.py | dturner-tw/pants | 3a04f2e46bf2b8fb0a7999c09e4ffdf9057ed33f | [
"Apache-2.0"
] | null | null | null | src/python/pants/bin/local_pants_runner.py | dturner-tw/pants | 3a04f2e46bf2b8fb0a7999c09e4ffdf9057ed33f | [
"Apache-2.0"
] | null | null | null | src/python/pants/bin/local_pants_runner.py | dturner-tw/pants | 3a04f2e46bf2b8fb0a7999c09e4ffdf9057ed33f | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
from colors import g... | 37.516854 | 98 | 0.649895 |
ff054eeaff5be26809e1b1951f9e7ad8cdea0155 | 772 | py | Python | binary_search/minimim_in_rotated_array.py | shawlu95/Algorithm-Toolbox | b6c7b2228d8e70e0842e0bad607533a2c8322cf0 | [
"MIT"
] | null | null | null | binary_search/minimim_in_rotated_array.py | shawlu95/Algorithm-Toolbox | b6c7b2228d8e70e0842e0bad607533a2c8322cf0 | [
"MIT"
] | null | null | null | binary_search/minimim_in_rotated_array.py | shawlu95/Algorithm-Toolbox | b6c7b2228d8e70e0842e0bad607533a2c8322cf0 | [
"MIT"
] | 2 | 2020-02-07T20:49:02.000Z | 2020-02-11T06:01:55.000Z | def search(self, nums, target):
"""
In a rotated ascending array, find the minimum.
Find the first number that is smaller than the last number nums[-1].
XXXXXXX....XOOO...O
Cannot compare to the first number, because the array may not be rotated.
< nums[0] never finds a match: `XXXXXXXX... | 24.903226 | 77 | 0.529793 |
ff05597e3531cd9911b9f4e5cf95a9400a29336c | 2,666 | py | Python | tests/test_inheritence_with_equations.py | fossilfree/Numerous | 121cd00456f263cab9def10cb99a21655f5832c9 | [
"BSD-3-Clause"
] | null | null | null | tests/test_inheritence_with_equations.py | fossilfree/Numerous | 121cd00456f263cab9def10cb99a21655f5832c9 | [
"BSD-3-Clause"
] | null | null | null | tests/test_inheritence_with_equations.py | fossilfree/Numerous | 121cd00456f263cab9def10cb99a21655f5832c9 | [
"BSD-3-Clause"
] | null | null | null | import pytest
from pytest import approx
from numerous.engine.model import Model
from numerous.engine.simulation import Simulation
from numerous.engine.system import Subsystem, Item
from numerous.engine.simulation.solvers.base_solver import solver_types
from numerous.multiphysics import EquationBase, Equation
class B... | 28.666667 | 90 | 0.665416 |
ff0571c6ae92c0433900c6409d29a1026b72c739 | 1,596 | py | Python | mininet/examples/test/test_multiping.py | 5GExchange/escape | eb35d460597a0386b18dd5b6a5f62a3f30eed5fa | [
"Apache-2.0"
] | 10 | 2016-11-16T16:26:16.000Z | 2021-04-26T17:20:28.000Z | mininet/examples/test/test_multiping.py | 5GExchange/escape | eb35d460597a0386b18dd5b6a5f62a3f30eed5fa | [
"Apache-2.0"
] | 3 | 2017-04-20T11:29:17.000Z | 2017-11-06T17:12:12.000Z | mininet/examples/test/test_multiping.py | 5GExchange/escape | eb35d460597a0386b18dd5b6a5f62a3f30eed5fa | [
"Apache-2.0"
] | 10 | 2017-03-27T13:58:52.000Z | 2020-06-24T22:42:51.000Z | #!/usr/bin/env python
"""
Test for multiping.py
"""
import unittest
import pexpect
from collections import defaultdict
class testMultiPing( unittest.TestCase ):
def testMultiPing( self ):
"""Verify that each target is pinged at least once, and
that pings to 'real' targets are successful and ... | 32.571429 | 86 | 0.477444 |
ff0581ae59aff763005ef7adb9815e1684fe1905 | 2,882 | py | Python | nearpy/hashes/permutation/permute.py | akabos/NearPy | 485ee37952fe68fd7fed85f4bf8f47e2076e9e36 | [
"MIT"
] | null | null | null | nearpy/hashes/permutation/permute.py | akabos/NearPy | 485ee37952fe68fd7fed85f4bf8f47e2076e9e36 | [
"MIT"
] | null | null | null | nearpy/hashes/permutation/permute.py | akabos/NearPy | 485ee37952fe68fd7fed85f4bf8f47e2076e9e36 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2013 Ole Krause-Sparmann
# 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,... | 32.022222 | 83 | 0.619362 |
ff05a3f517a82252d9db024256cfd9fb85bc3c4e | 5,102 | py | Python | lib/tap-github/tests/base.py | epappas/cryptodata | 8635fb11e714956bcc2184338ddeac5a2533ec91 | [
"Apache-2.0"
] | 1 | 2021-12-07T19:05:31.000Z | 2021-12-07T19:05:31.000Z | lib/tap-github/tests/base.py | epappas/cryptodata | 8635fb11e714956bcc2184338ddeac5a2533ec91 | [
"Apache-2.0"
] | 46 | 2021-04-16T23:24:17.000Z | 2022-03-31T02:19:45.000Z | lib/tap-github/tests/base.py | epappas/cryptodata | 8635fb11e714956bcc2184338ddeac5a2533ec91 | [
"Apache-2.0"
] | null | null | null | import os
import unittest
from datetime import datetime as dt
from datetime import timedelta
import tap_tester.menagerie as menagerie
import tap_tester.connections as connections
class TestGithubBase(unittest.TestCase):
REPLICATION_KEYS = "valid-replication-keys"
PRIMARY_KEYS = "table-key-properties"
F... | 34.241611 | 115 | 0.605645 |
ff05a47262890cde72e0e00327593e960031f83d | 2,233 | py | Python | tests/manual_runner.py | CalebBell/ht | 3b95f9cfff30c8c0272443d523a484977eedbf0d | [
"MIT"
] | 118 | 2016-01-04T07:46:23.000Z | 2022-03-29T14:12:59.000Z | tests/manual_runner.py | CalebBell/ht | 3b95f9cfff30c8c0272443d523a484977eedbf0d | [
"MIT"
] | 4 | 2017-06-27T08:01:02.000Z | 2020-10-06T14:18:46.000Z | tests/manual_runner.py | CalebBell/ht | 3b95f9cfff30c8c0272443d523a484977eedbf0d | [
"MIT"
] | 22 | 2016-04-20T06:17:35.000Z | 2022-03-07T01:40:25.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
try:
import test_air_cooler
except Exception as e:
print('run this from the tests directory')
print(e)
exit()
import test_boiling_flow
import test_boiling_nucleic
import test_boiling_plate
import test_condensation
import test_conduction
import te... | 35.444444 | 374 | 0.657859 |
ff05a653752a4aa4bc38715b9501c2dcd8a618a6 | 2,148 | py | Python | zubhub_backend/zubhub/creators/managers.py | NdibeRaymond/zubhub | 23907202af4f4f4f85a108ed15e811abb3d22407 | [
"MIT"
] | 1 | 2022-01-21T14:15:24.000Z | 2022-01-21T14:15:24.000Z | zubhub_backend/zubhub/creators/managers.py | NdibeRaymond/zubhub | 23907202af4f4f4f85a108ed15e811abb3d22407 | [
"MIT"
] | null | null | null | zubhub_backend/zubhub/creators/managers.py | NdibeRaymond/zubhub | 23907202af4f4f4f85a108ed15e811abb3d22407 | [
"MIT"
] | null | null | null | from django.db import models
class PhoneNumberManager(models.Manager):
# def can_add_phone(self, user):
# ret = True
# if app_settings.MAX_EMAIL_ADDRESSES:
# count = self.filter(user=user).count()
# ret = count < app_settings.MAX_EMAIL_ADDRESSES
# return ret
de... | 37.034483 | 97 | 0.628492 |
ff05bc8cc6cd04f4c92e36690df5201a5e4a1cec | 15,276 | py | Python | dnnlib/submission/submit.py | tullie/gansformer-tpu | c29fbc622e69d05ac736f99232f5aa19084ce0a4 | [
"MIT"
] | 29 | 2020-06-06T05:54:42.000Z | 2022-03-03T17:43:14.000Z | dnnlib/submission/submit.py | tullie/gansformer-tpu | c29fbc622e69d05ac736f99232f5aa19084ce0a4 | [
"MIT"
] | 7 | 2020-09-25T22:38:23.000Z | 2022-03-12T00:29:16.000Z | dnnlib/submission/submit.py | tullie/gansformer-tpu | c29fbc622e69d05ac736f99232f5aa19084ce0a4 | [
"MIT"
] | 12 | 2020-07-30T19:09:32.000Z | 2021-11-12T18:18:38.000Z | # Copyright (c) 2019, NVIDIA Corporation. All rights reserved.
#
# This work is made available under the Nvidia Source Code License-NC.
# To view a copy of this license, visit
# https://nvlabs.github.io/stylegan2/license.html
"""Submit a function to be run either locally or in a computing cluster."""
import copy
impo... | 39.78125 | 238 | 0.671314 |
ff060a5ba2b791d9e4f9d258444182fd095a71c7 | 263 | py | Python | pni_customization/pni_customization/doctype/pni_carton_in/pni_carton_in.py | DaizyModi/pni_customization | 577946e91c8fe956ca64c089327ce18174002ec4 | [
"MIT"
] | null | null | null | pni_customization/pni_customization/doctype/pni_carton_in/pni_carton_in.py | DaizyModi/pni_customization | 577946e91c8fe956ca64c089327ce18174002ec4 | [
"MIT"
] | null | null | null | pni_customization/pni_customization/doctype/pni_carton_in/pni_carton_in.py | DaizyModi/pni_customization | 577946e91c8fe956ca64c089327ce18174002ec4 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2020, Jigar Tarpara and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
# import frappe
from frappe.model.document import Document
class PNICartonIN(Document):
pass
| 23.909091 | 52 | 0.775665 |
ff0612df3190de08330c7f4567165865bddcf09d | 347 | py | Python | test.py | karim174/brain-computer-interface-and-vision-based-autonomous-agent-for-shared-control-over-robotic-arm | d099cad43bfb98261c2571991f4e163d444b62b4 | [
"MIT"
] | 2 | 2019-02-28T01:47:23.000Z | 2021-04-10T14:37:46.000Z | test.py | karim174/brain-computer-interface-and-vision-based-autonomous-agent-for-shared-control-over-robotic-arm | d099cad43bfb98261c2571991f4e163d444b62b4 | [
"MIT"
] | null | null | null | test.py | karim174/brain-computer-interface-and-vision-based-autonomous-agent-for-shared-control-over-robotic-arm | d099cad43bfb98261c2571991f4e163d444b62b4 | [
"MIT"
] | null | null | null | import numpy as np
import gym
env = gym.make("FetchPickAndPlace-v1")
observation = env.reset()
print(np.unique(observation['image']))
for _ in range(1000):
action = env.action_space.sample() # your agent here (this takes random actions)
observation, reward, done, info = env.step(action)
if done:
observation... | 24.785714 | 82 | 0.717579 |
ff0649ad8f1edbda2f83f0dd2e41a116517c7666 | 15,250 | py | Python | tests/func/test_dashboard.py | tilkow/temboard-agent | b8bf296454db68a85996f49fb6c684d57efa028a | [
"PostgreSQL"
] | null | null | null | tests/func/test_dashboard.py | tilkow/temboard-agent | b8bf296454db68a85996f49fb6c684d57efa028a | [
"PostgreSQL"
] | null | null | null | tests/func/test_dashboard.py | tilkow/temboard-agent | b8bf296454db68a85996f49fb6c684d57efa028a | [
"PostgreSQL"
] | null | null | null | import json
import time
from .test.temboard import temboard_request
from .conftest import ENV, pgconnect
XSESSION = ''
class TestDashboard:
def _temboard_login(self):
(status, res) = temboard_request(
ENV['agent']['ssl_cert_file'],
method='POST',
url='https://%s:%s/l... | 36.396181 | 112 | 0.496197 |
ff0656ba8869793e965bab59b4b990ea1ca4bc6a | 1,681 | py | Python | py/0290.word-pattern.py | ck2w/leetcode | 2d411530b690a2e51b0ae518bf3efaad2edc1083 | [
"MIT"
] | null | null | null | py/0290.word-pattern.py | ck2w/leetcode | 2d411530b690a2e51b0ae518bf3efaad2edc1083 | [
"MIT"
] | null | null | null | py/0290.word-pattern.py | ck2w/leetcode | 2d411530b690a2e51b0ae518bf3efaad2edc1083 | [
"MIT"
] | null | null | null | #
# @lc app=leetcode id=290 lang=python3
#
# [290] Word Pattern
#
# https://leetcode.com/problems/word-pattern/description/
#
# algorithms
# Easy (38.65%)
# Likes: 3040
# Dislikes: 345
# Total Accepted: 324.8K
# Total Submissions: 815.2K
# Testcase Example: '"abba"\n"dog cat cat dog"'
#
# Given a pattern and a s... | 20.011905 | 74 | 0.543724 |
ff068a3a4c163d7312c09a95d4724924473ab2c5 | 522 | py | Python | tests/user_test.py | CikuKariuki/Wise-Minute | 40432f420674d6554a39ab3ed98aef84e26bb5e8 | [
"Unlicense"
] | null | null | null | tests/user_test.py | CikuKariuki/Wise-Minute | 40432f420674d6554a39ab3ed98aef84e26bb5e8 | [
"Unlicense"
] | null | null | null | tests/user_test.py | CikuKariuki/Wise-Minute | 40432f420674d6554a39ab3ed98aef84e26bb5e8 | [
"Unlicense"
] | null | null | null | import unittest
from app.models import User,Pitches
from app import db
class UserModelTest(unittest.TestCase):
def setUp(self):
self.new_user = User(password = 'banana')
def test_password_setter(self):
self.assertTrue(self.new_user.pass_secure is not None)
def test_no_access_pass... | 27.473684 | 64 | 0.712644 |
ff06a7b7458387359b86909bfabaf5d3f5b3db14 | 31,862 | py | Python | pysoa/server/server.py | manuelcorrales/pysoa | 60aba7ba7d8805d0b347e9218a5a6d1700f8fe64 | [
"Apache-2.0"
] | null | null | null | pysoa/server/server.py | manuelcorrales/pysoa | 60aba7ba7d8805d0b347e9218a5a6d1700f8fe64 | [
"Apache-2.0"
] | null | null | null | pysoa/server/server.py | manuelcorrales/pysoa | 60aba7ba7d8805d0b347e9218a5a6d1700f8fe64 | [
"Apache-2.0"
] | null | null | null | from __future__ import (
absolute_import,
unicode_literals,
)
import argparse
import codecs
import importlib
import logging
import logging.config
import os
import signal
import sys
import time
import traceback
import attr
import six
from pysoa.client import Client
from pysoa.common.constants import (
ERR... | 41.758847 | 120 | 0.615906 |
ff07142d377f67e1d704f3119bb73e2ff2e5a3df | 2,824 | py | Python | CHAPTER 14 (graph algorithm)/heap_priority_queue.py | ahammadshawki8/Data-Structures-Algorithms-in-Python- | fc18b54128cd5bc7639a14999d8f990190b524eb | [
"MIT"
] | null | null | null | CHAPTER 14 (graph algorithm)/heap_priority_queue.py | ahammadshawki8/Data-Structures-Algorithms-in-Python- | fc18b54128cd5bc7639a14999d8f990190b524eb | [
"MIT"
] | null | null | null | CHAPTER 14 (graph algorithm)/heap_priority_queue.py | ahammadshawki8/Data-Structures-Algorithms-in-Python- | fc18b54128cd5bc7639a14999d8f990190b524eb | [
"MIT"
] | null | null | null | from priority_queue_base_class import *
from empty_exception import *
class HeapPriorityQueue(PriorityQueueBase): # base class defines _Item
"""A min-oriented priority queue implemented with a binary heap."""
#---------------------------non-public behaviours-----------------------------
def _parent(self,j)... | 35.3 | 86 | 0.553824 |
ff071a4ccf572baf6e0e9fdec9369077564bd1f3 | 7,746 | py | Python | hooks/check_metadata.py | mondeja/pre-commit-po-hooks | 6c96941357699b283c46528d34821631e1aff324 | [
"BSD-3-Clause"
] | null | null | null | hooks/check_metadata.py | mondeja/pre-commit-po-hooks | 6c96941357699b283c46528d34821631e1aff324 | [
"BSD-3-Clause"
] | 2 | 2021-08-25T04:56:36.000Z | 2022-02-25T16:47:39.000Z | hooks/check_metadata.py | mondeja/pre-commit-po-hooks | 6c96941357699b283c46528d34821631e1aff324 | [
"BSD-3-Clause"
] | null | null | null | """Script that checks metadata sanity of PO files.
For each metadata header, you can specify that the value should match with
a regex.
"""
import argparse
import re
import sys
def check_metadata(
filenames, headers_spec, no_metadata=False, remove_metadata=False, quiet=False
):
"""Check that metadata headers... | 33.387931 | 84 | 0.508779 |
ff0751e24045c98c1c103c6619d404cb53b91cc3 | 308 | py | Python | Aula50/controllers/pessoa_controller.py | diegocolombo1989/Trabalho-Python | 4603117bebfb6e801c3289e108b4e8f29442ab6f | [
"MIT"
] | null | null | null | Aula50/controllers/pessoa_controller.py | diegocolombo1989/Trabalho-Python | 4603117bebfb6e801c3289e108b4e8f29442ab6f | [
"MIT"
] | null | null | null | Aula50/controllers/pessoa_controller.py | diegocolombo1989/Trabalho-Python | 4603117bebfb6e801c3289e108b4e8f29442ab6f | [
"MIT"
] | null | null | null | from flask_restful import Resource
class PessoaController(Resource):
def get(self):
return 'Acessando metodo GET'
def post(self):
return 'Acessando metodo POST'
def put(self):
return 'Acessando metodo PUT'
def delete(self):
return 'Acessando metodo DELETE' | 22 | 40 | 0.662338 |
ff0756a55a2ce583c9dada41ade471e3096ab135 | 1,981 | py | Python | scripts/compile-all.py | cannin/covid-sicr-test | f842946357428730265b7d0a6640172dc757ecae | [
"MIT"
] | 4 | 2020-04-28T18:00:27.000Z | 2022-02-22T16:57:12.000Z | scripts/compile-all.py | cannin/covid-sicr-test | f842946357428730265b7d0a6640172dc757ecae | [
"MIT"
] | 6 | 2020-05-07T13:07:06.000Z | 2021-03-04T19:55:12.000Z | scripts/compile-all.py | cannin/covid-sicr-test | f842946357428730265b7d0a6640172dc757ecae | [
"MIT"
] | 6 | 2020-05-01T17:06:37.000Z | 2021-03-30T11:07:08.000Z | """Fit many models for many regions. If you have HPC access it is recommended
to instead use `run.py` in parallel."""
import argparse
from pathlib import Path
from tqdm.auto import tqdm
import niddk_covid_sicr as ncs
# Parse all the command-line arguments
parser = argparse.ArgumentParser(description='Force compile ... | 42.148936 | 90 | 0.693589 |
ff0771ccd8e78cb637d066eaebb453376cc90500 | 50,555 | py | Python | src/sage/combinat/designs/bibd.py | saraedum/sage-renamed | d2da67b14da2ad766a5906425d60d43a3b3e1270 | [
"BSL-1.0"
] | 1 | 2016-11-04T16:31:48.000Z | 2016-11-04T16:31:48.000Z | src/sage/combinat/designs/bibd.py | rwst/sage | a9d274b9338e6ee24bf35ea8d25875507e51e455 | [
"BSL-1.0"
] | null | null | null | src/sage/combinat/designs/bibd.py | rwst/sage | a9d274b9338e6ee24bf35ea8d25875507e51e455 | [
"BSL-1.0"
] | null | null | null | r"""
Balanced Incomplete Block Designs (BIBD)
This module gathers everything related to Balanced Incomplete Block Designs. One can build a
BIBD (or check that it can be built) with :func:`balanced_incomplete_block_design`::
sage: BIBD = designs.balanced_incomplete_block_design(7,3)
In particular, Sage can build ... | 34.532104 | 134 | 0.560775 |
ff07b4cc9f587bf2410c8f9418829f217eaddeca | 6,684 | py | Python | experiments/ashvin/corl2019/offpolicy/rig_dcvae2.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/corl2019/offpolicy/rig_dcvae2.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/corl2019/offpolicy/rig_dcvae2.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | import rlkit.misc.hyperparameter as hyp
from experiments.murtaza.multiworld.skew_fit.reacher.generate_uniform_dataset import generate_uniform_dataset_reacher
from multiworld.envs.mujoco.cameras import sawyer_init_camera_zoomed_in, sawyer_pusher_camera_upright_v2
from rlkit.launchers.launcher_util import run_experiment
... | 36.928177 | 121 | 0.589318 |
ff07e260858ba0ee30d60ab39b40ed10304407df | 1,382 | py | Python | zs/tests/util.py | njsmith/zs | 42ca7679c2b986243abcff048bc42d49c204048c | [
"BSD-2-Clause"
] | 35 | 2015-06-19T02:36:14.000Z | 2021-09-22T21:19:59.000Z | zs/tests/util.py | njsmith/zs | 42ca7679c2b986243abcff048bc42d49c204048c | [
"BSD-2-Clause"
] | 2 | 2016-03-07T00:52:41.000Z | 2021-11-14T16:48:33.000Z | zs/tests/util.py | njsmith/zs | 42ca7679c2b986243abcff048bc42d49c204048c | [
"BSD-2-Clause"
] | 4 | 2015-01-30T09:23:18.000Z | 2019-02-05T18:03:08.000Z | # This file is part of ZS
# Copyright (C) 2013-2014 Nathaniel Smith <njs@pobox.com>
# See file LICENSE.txt for license information.
import os
import os.path
from contextlib import contextmanager
from tempfile import mkstemp
def test_data_path(path=""):
test_data_dir = os.path.join(os.path.dirname(__file__), "data... | 28.791667 | 69 | 0.654124 |
ff07e75f6172ac158700fcb6be388b7e3d842ec5 | 25 | py | Python | msl/examples/__init__.py | rebeccahawke/msl-qt | 753ea28aa385a39a33827de2c229e9944a3b1cf3 | [
"MIT"
] | 51 | 2017-02-20T18:13:18.000Z | 2022-03-02T21:46:36.000Z | msl/examples/__init__.py | rebeccahawke/msl-qt | 753ea28aa385a39a33827de2c229e9944a3b1cf3 | [
"MIT"
] | 31 | 2017-02-20T18:09:43.000Z | 2022-03-02T15:21:37.000Z | msl/examples/__init__.py | rebeccahawke/msl-qt | 753ea28aa385a39a33827de2c229e9944a3b1cf3 | [
"MIT"
] | 15 | 2017-02-20T18:13:25.000Z | 2020-04-06T12:27:43.000Z | # DO NOT EDIT THIS FILE.
| 12.5 | 24 | 0.68 |
ff07f49e9d7658e83f8475680ad6fd15de248354 | 4,332 | py | Python | example_tank_mhe/test.py | kyriacosparperis/apm_python | 1f7701131db1414d4274be71dd6bfa6b0c71de6b | [
"BSD-2-Clause-FreeBSD"
] | 99 | 2015-07-05T06:12:16.000Z | 2021-12-16T17:52:48.000Z | example_tank_mhe/test.py | kyriacosparperis/apm_python | 1f7701131db1414d4274be71dd6bfa6b0c71de6b | [
"BSD-2-Clause-FreeBSD"
] | 4 | 2018-03-27T01:30:40.000Z | 2019-06-24T20:00:18.000Z | example_tank_mhe/test.py | kyriacosparperis/apm_python | 1f7701131db1414d4274be71dd6bfa6b0c71de6b | [
"BSD-2-Clause-FreeBSD"
] | 35 | 2015-07-05T06:12:19.000Z | 2021-08-09T08:33:52.000Z | # Import
import sys
sys.path.append("../")
# Import
from apm import *
# Select server
server = 'http://xps.apmonitor.com'
# Application name
app = 'mhe'
# Clear previous application
apm(server,app,'clear all')
# Load model file
apm_load(server,app,'tank.apm')
# Load time points for future predictions
csv_load(se... | 27.948387 | 75 | 0.717682 |
ff07ff429072beb318e7446eb9930cc4bf3c153e | 1,154 | py | Python | NBA Project/venv/Lib/site-packages/_plotly_utils/colors/_swatches.py | EnriqueGambra/Most-Efficient-NBA-Players | ea67c28b5294dbc9713200a937deb9f4211ba754 | [
"MIT"
] | 2 | 2019-11-08T07:01:11.000Z | 2019-11-17T10:10:49.000Z | NBA Project/venv/Lib/site-packages/_plotly_utils/colors/_swatches.py | EnriqueGambra/Most-Efficient-NBA-Players | ea67c28b5294dbc9713200a937deb9f4211ba754 | [
"MIT"
] | 12 | 2020-06-06T01:22:26.000Z | 2022-03-12T00:13:42.000Z | NBA Project/venv/Lib/site-packages/_plotly_utils/colors/_swatches.py | EnriqueGambra/Most-Efficient-NBA-Players | ea67c28b5294dbc9713200a937deb9f4211ba754 | [
"MIT"
] | null | null | null | def _swatches(module_names, module_contents):
"""
Returns:
A `Figure` object. This figure demonstrates the color scales and
sequences in this module, as stacked bar charts.
"""
import plotly.graph_objs as go
sequences = [
(k, v)
for k, v in module_contents.items()
... | 30.368421 | 85 | 0.506066 |
ff0819db21c07f3c99c188139dcb3cfe0d4407a4 | 108,918 | py | Python | salt/modules/git.py | johngrasty/salt | f66b18d8ee52eb988c3dbd8ba3ff6a6173c8aea5 | [
"Apache-2.0"
] | null | null | null | salt/modules/git.py | johngrasty/salt | f66b18d8ee52eb988c3dbd8ba3ff6a6173c8aea5 | [
"Apache-2.0"
] | 1 | 2015-09-02T12:49:48.000Z | 2015-09-02T19:22:58.000Z | salt/modules/git.py | johngrasty/salt | f66b18d8ee52eb988c3dbd8ba3ff6a6173c8aea5 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Support for the Git SCM
'''
from __future__ import absolute_import
# Import python libs
import copy
import errno
import logging
import os
import re
import shlex
import sys
from distutils.version import LooseVersion as _LooseVersion
# Import salt libs
import salt.utils
import salt.utils.fil... | 32.072438 | 137 | 0.589214 |
ff0868cdb65e42340dbff2a1ed4c6f7fbb18c374 | 6,733 | py | Python | Projects/HerdImmunity/logger.py | ProdigyX6217/CS-1.1-Intro-to-Programming | 9f2e08f9a5d171032145ff77a08f7da1b2fcaf73 | [
"MIT"
] | null | null | null | Projects/HerdImmunity/logger.py | ProdigyX6217/CS-1.1-Intro-to-Programming | 9f2e08f9a5d171032145ff77a08f7da1b2fcaf73 | [
"MIT"
] | null | null | null | Projects/HerdImmunity/logger.py | ProdigyX6217/CS-1.1-Intro-to-Programming | 9f2e08f9a5d171032145ff77a08f7da1b2fcaf73 | [
"MIT"
] | null | null | null | # Helped by Zurich Olrich/ Naomi Alderrmann
class Logger(object):
''' Utility class responsible for logging all interactions during the simulation. '''
# TODO: Write a test suite for this class to make sure each method is working
# as expected.
# PROTIP: Write your tests before you solve each function,... | 55.188525 | 263 | 0.67132 |
ff0879f1e4a233ae9cfe631ca8830548ddccc7c7 | 431 | py | Python | tbats/bats/__init__.py | series-temporais/tbats | 1f2e0b5e769250c8ec0604fd75ef08ebbe251d37 | [
"MIT"
] | 1 | 2019-07-21T15:38:12.000Z | 2019-07-21T15:38:12.000Z | tbats/bats/__init__.py | arita37/tbats | 4e726919f08e39e74dd70a592b5258dfc7b25953 | [
"MIT"
] | null | null | null | tbats/bats/__init__.py | arita37/tbats | 4e726919f08e39e74dd70a592b5258dfc7b25953 | [
"MIT"
] | null | null | null | from .ModelParams import ModelParams
from .Components import Components
from .MatrixBuilder import MatrixBuilder
from .Model import Model
from .SeedFinder import SeedFinder
from .ParamsOptimizer import ParamsOptimizer
from .Case import Case
from .Context import Context
from .BATS import BATS
__all__ = ['BATS', 'Params... | 33.153846 | 111 | 0.774942 |
ff088b151d7aca1af7d574654cbce21f536a8fab | 9,711 | py | Python | doc/conf.py | runfalk/Flask-Storm | ab615f9e9c769109e517b092c54cbe090decdb76 | [
"MIT"
] | 2 | 2018-10-30T03:07:23.000Z | 2019-06-22T21:46:12.000Z | doc/conf.py | runfalk/Flask-Storm | ab615f9e9c769109e517b092c54cbe090decdb76 | [
"MIT"
] | 2 | 2019-12-05T17:51:40.000Z | 2021-05-24T06:50:58.000Z | doc/conf.py | runfalk/Flask-Storm | ab615f9e9c769109e517b092c54cbe090decdb76 | [
"MIT"
] | 1 | 2019-12-03T21:57:34.000Z | 2019-12-03T21:57:34.000Z | # -*- coding: utf-8 -*-
#
# Flask-Storm documentation build configuration file, created by
# sphinx-quickstart on Wed Jun 15 00:27:23 2016.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#... | 28.901786 | 80 | 0.704459 |
ff08ce8bc1e78b5aa24550379903b2bd228c684c | 49,657 | py | Python | salt/modules/debian_ip.py | skrobul/salt | ef7fb71082cce7a9783e00b9c65062fefae09263 | [
"Apache-2.0"
] | 1 | 2018-02-03T17:30:56.000Z | 2018-02-03T17:30:56.000Z | salt/modules/debian_ip.py | skrobul/salt | ef7fb71082cce7a9783e00b9c65062fefae09263 | [
"Apache-2.0"
] | null | null | null | salt/modules/debian_ip.py | skrobul/salt | ef7fb71082cce7a9783e00b9c65062fefae09263 | [
"Apache-2.0"
] | null | null | null | ## -*- coding: utf-8 -*-
'''
The networking module for Debian based distros
'''
# Import python libs
import logging
import os.path
import os
import re
import StringIO
# Import third party libs
import jinja2
import jinja2.exceptions
# Import salt libs
import salt.utils
import salt.utils.templates
import salt.utils.va... | 32.265757 | 104 | 0.582919 |
ff08fa9298e5ccebe64efc4984e0fa56ec98d0af | 5,937 | py | Python | test/dlc_tests/ec2/pytorch/training/test_pytorch_training.py | laurenyu/deep-learning-containers | 0714377fcb075a3bce06b444787beb34cc13c9fc | [
"Apache-2.0"
] | null | null | null | test/dlc_tests/ec2/pytorch/training/test_pytorch_training.py | laurenyu/deep-learning-containers | 0714377fcb075a3bce06b444787beb34cc13c9fc | [
"Apache-2.0"
] | null | null | null | test/dlc_tests/ec2/pytorch/training/test_pytorch_training.py | laurenyu/deep-learning-containers | 0714377fcb075a3bce06b444787beb34cc13c9fc | [
"Apache-2.0"
] | null | null | null | import os
import pytest
from test.test_utils import CONTAINER_TESTS_PREFIX
from test.test_utils.ec2 import execute_ec2_training_test, get_ec2_instance_type
PT_STANDALONE_CMD = os.path.join(CONTAINER_TESTS_PREFIX, "pytorch_tests", "testPyTorchStandalone")
PT_MNIST_CMD = os.path.join(CONTAINER_TESTS_PREFIX, "pytorch_... | 44.30597 | 102 | 0.818932 |
ff08fe4e7d2c524d747102edcaef30abf88875a5 | 2,758 | py | Python | autograd/scipy/stats/norm.py | kewlcoder/autograd | ce3d9a4ad067a14cbf6ae27ccbd75936ff253752 | [
"MIT"
] | 6,119 | 2015-03-10T03:55:58.000Z | 2022-03-31T11:54:19.000Z | autograd/scipy/stats/norm.py | kewlcoder/autograd | ce3d9a4ad067a14cbf6ae27ccbd75936ff253752 | [
"MIT"
] | 523 | 2015-03-10T11:59:23.000Z | 2022-03-05T15:31:59.000Z | autograd/scipy/stats/norm.py | kewlcoder/autograd | ce3d9a4ad067a14cbf6ae27ccbd75936ff253752 | [
"MIT"
] | 949 | 2015-03-11T20:04:20.000Z | 2022-03-31T12:13:11.000Z | """Gradients of the normal distribution."""
from __future__ import absolute_import
import scipy.stats
import autograd.numpy as anp
from autograd.extend import primitive, defvjp
from autograd.numpy.numpy_vjps import unbroadcast_f
pdf = primitive(scipy.stats.norm.pdf)
cdf = primitive(scipy.stats.norm.cdf)
sf = primitive... | 44.483871 | 117 | 0.606962 |
ff092a7818f33c9159af022cb69265dcead99e5d | 134 | py | Python | source/_static/lecture_specific/cake_eating_numerical/analytical.py | bktaha/lecture-python | b13db12120b977d1c661c9a68c5b8ddfc1b6dc89 | [
"BSD-3-Clause"
] | 56 | 2020-05-10T23:04:41.000Z | 2022-03-31T01:57:47.000Z | source/_static/lecture_specific/cake_eating_numerical/analytical.py | bktaha/lecture-python | b13db12120b977d1c661c9a68c5b8ddfc1b6dc89 | [
"BSD-3-Clause"
] | 193 | 2020-05-09T06:14:31.000Z | 2022-01-22T17:34:41.000Z | source/_static/lecture_specific/cake_eating_numerical/analytical.py | bktaha/lecture-python | b13db12120b977d1c661c9a68c5b8ddfc1b6dc89 | [
"BSD-3-Clause"
] | 17 | 2020-05-17T22:21:14.000Z | 2022-03-30T22:46:24.000Z | def c_star(x, β, γ):
return (1 - β ** (1/γ)) * x
def v_star(x, β, γ):
return (1 - β**(1 / γ))**(-γ) * (x**(1-γ) / (1-γ))
| 13.4 | 54 | 0.380597 |
ff094fcc3bfffb49faac08b0936857ef5e95c080 | 3,963 | py | Python | examples/plotting/AdaptiveW_process_SA.py | JiazhengChai/synergy_DRL | c08e78e5fe39d9d46213e1bf07b8dafc2195b05a | [
"MIT"
] | 2 | 2020-01-07T04:12:42.000Z | 2021-12-21T22:25:31.000Z | examples/plotting/AdaptiveW_process_SA.py | JiazhengChai/synergy_DRL | c08e78e5fe39d9d46213e1bf07b8dafc2195b05a | [
"MIT"
] | 11 | 2019-11-29T02:59:34.000Z | 2022-03-12T00:07:28.000Z | examples/plotting/AdaptiveW_process_SA.py | JiazhengChai/synergy_DRL | c08e78e5fe39d9d46213e1bf07b8dafc2195b05a | [
"MIT"
] | 1 | 2020-04-28T12:06:40.000Z | 2020-04-28T12:06:40.000Z | from sklearn.preprocessing import StandardScaler
import numpy as np
from sklearn.metrics import r2_score
from matplotlib import pyplot as plt
import os
from matplotlib.lines import Line2D
from exp_variant_class import exp_variant#,PCA
from sklearn.decomposition import PCA
import argparse
from scipy import integrate
imp... | 23.873494 | 127 | 0.661368 |
ff095e3b4fc515842d7fe4d89340437fe0084e61 | 1,297 | py | Python | applications/messenger/management/commands/testBackend.py | dev-easyshares/mighty | a6cf473fb8cfbf5b92db68c7b068fc8ae2911b8b | [
"MIT"
] | null | null | null | applications/messenger/management/commands/testBackend.py | dev-easyshares/mighty | a6cf473fb8cfbf5b92db68c7b068fc8ae2911b8b | [
"MIT"
] | 1 | 2022-03-12T00:57:37.000Z | 2022-03-12T00:57:37.000Z | applications/messenger/management/commands/testBackend.py | dev-easyshares/mighty | a6cf473fb8cfbf5b92db68c7b068fc8ae2911b8b | [
"MIT"
] | null | null | null | from mighty.management import BaseCommand
from mighty.models import Missive
from mighty.applications.messenger.apps import MessengerConfig
from mighty.functions import get_backends
import sys, re
class Command(BaseCommand):
cache_missive = None
backend_path = None
target = None
def add_arguments(self,... | 31.634146 | 131 | 0.659985 |
ff096425a4e06504325a598f5f6e3c27bab83460 | 42,129 | py | Python | scripts/UnitCommands.py | dhanin/friendly-bassoon | fafcfd3921805baddc1889dc0ee2fa367ad882f8 | [
"BSD-3-Clause"
] | 2 | 2021-11-17T10:59:38.000Z | 2021-11-17T10:59:45.000Z | scripts/UnitCommands.py | dhanin/nws | 87a3f24a7887d84b9884635064b48d456b4184e2 | [
"BSD-3-Clause"
] | null | null | null | scripts/UnitCommands.py | dhanin/nws | 87a3f24a7887d84b9884635064b48d456b4184e2 | [
"BSD-3-Clause"
] | null | null | null | import os, sys
from os.path import dirname, abspath, join, normpath
sys.path.append(abspath(join(dirname(__file__), 'Amram_Script_Data')))
from MissionTemplates import *
from Amram_Utilities import *
import math
deg_to_rad = 0.01745329252
def SetFormationLeader(UI, id):
UI.SetFormationLeader(id)
UI.UpdateMi... | 34.334963 | 169 | 0.623893 |
ff096dbaf9034f155ec37ca3097a615bf841f8a6 | 2,634 | py | Python | tests/unit/utils/event_test.py | lowsodium/bonneville | 02a016380b56345594f20ee007c62e7e92821a8b | [
"Apache-2.0"
] | null | null | null | tests/unit/utils/event_test.py | lowsodium/bonneville | 02a016380b56345594f20ee007c62e7e92821a8b | [
"Apache-2.0"
] | null | null | null | tests/unit/utils/event_test.py | lowsodium/bonneville | 02a016380b56345594f20ee007c62e7e92821a8b | [
"Apache-2.0"
] | 3 | 2020-05-10T02:08:44.000Z | 2020-11-06T11:01:57.000Z | # -*- coding: utf-8 -*-
'''
:codeauthor: :email:`Pedro Algarvio (pedro@algarvio.me)`
:copyright: © 2012-2013 by the SaltStack Team, see AUTHORS for more details
:license: Apache 2.0, see LICENSE for more details.
tests.unit.utils.event_test
~~~~~~~~~~~~~~~~~~~~~~~~~~~
'''
# Import python libs
imp... | 27.726316 | 79 | 0.542141 |
ff0983c4b80c9ded9922da9562d5e259c952a6c0 | 1,653 | py | Python | goods2/dl/imagedetection.py | huachao2017/goodsdl | 3616d53b90696a97a5d56a064e2a14d484b821d7 | [
"Apache-2.0"
] | 3 | 2018-10-16T09:36:12.000Z | 2019-04-15T03:12:49.000Z | goods2/dl/imagedetection.py | huachao2017/goodsdl | 3616d53b90696a97a5d56a064e2a14d484b821d7 | [
"Apache-2.0"
] | null | null | null | goods2/dl/imagedetection.py | huachao2017/goodsdl | 3616d53b90696a97a5d56a064e2a14d484b821d7 | [
"Apache-2.0"
] | null | null | null | import tensorflow as tf
import os
import numpy as np
import logging
import time
from goods2.dl.cnn import CNN
logger = logging.getLogger("detect2")
class ImageDetectorFactory:
_detector = {}
@staticmethod
def get_static_detector(train_model):
if train_model.pk not in ImageDetectorFactory._detec... | 27.098361 | 117 | 0.627344 |
ff098d94f5f1d7ea01b7eb99246ae7e020655561 | 345 | py | Python | utils.py | fcbond/ind-pos | b1499e553df6b1339f778a02acdf81b08879edc4 | [
"MIT"
] | 3 | 2019-01-09T19:38:51.000Z | 2020-06-29T21:13:05.000Z | utils.py | fcbond/ind-pos | b1499e553df6b1339f778a02acdf81b08879edc4 | [
"MIT"
] | null | null | null | utils.py | fcbond/ind-pos | b1499e553df6b1339f778a02acdf81b08879edc4 | [
"MIT"
] | 1 | 2020-11-13T23:54:06.000Z | 2020-11-13T23:54:06.000Z | def read_tagged (tagged):
fh = open(tagged)
sents = []
sentence = []
for l in fh:
#print(l)
if len(l) > 1:
(word, tag) = l.strip().split('\t')
sentence.append((word, tag))
else:
sents.append(sentence)
sentence=[]
sents.append(se... | 23 | 47 | 0.484058 |
ff09950d3b047ccfbf40324695a2b4b8c33edf40 | 1,720 | py | Python | families/exchange/hashblock_exchange/processor/handler.py | hashblock/sawtooth-uom | 0b8f131ee4f2a3a70a19f21bc88fe064d39fe5cd | [
"MIT"
] | 5 | 2018-04-05T07:02:04.000Z | 2018-07-10T09:39:03.000Z | families/exchange/hashblock_exchange/processor/handler.py | hashblock/sawtooth-uom | 0b8f131ee4f2a3a70a19f21bc88fe064d39fe5cd | [
"MIT"
] | 89 | 2018-03-11T14:46:07.000Z | 2018-09-07T14:50:42.000Z | families/exchange/hashblock_exchange/processor/handler.py | hashblock/sawtooth-uom | 0b8f131ee4f2a3a70a19f21bc88fe064d39fe5cd | [
"MIT"
] | null | null | null | # ------------------------------------------------------------------------------
# Copyright 2018 Frank V. Castellucci and Arthur Greef
#
# 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
#
# ... | 29.655172 | 80 | 0.663372 |
ff09a6023fa405f02a16e3f99250d33b1358cbcb | 1,085 | py | Python | libsoft/track_book/serializers.py | akhil4rajan/library_management | 3c8031ba6c8237c26358097005f60cd57b8a0c3f | [
"MIT"
] | null | null | null | libsoft/track_book/serializers.py | akhil4rajan/library_management | 3c8031ba6c8237c26358097005f60cd57b8a0c3f | [
"MIT"
] | null | null | null | libsoft/track_book/serializers.py | akhil4rajan/library_management | 3c8031ba6c8237c26358097005f60cd57b8a0c3f | [
"MIT"
] | null | null | null | from rest_framework import serializers
from .models import TrackBook
from account.serializers import UserSerializer
from book.serializers import BookSerializer
class TrackBookSerializer(serializers.ModelSerializer):
"""
Django Serializer to handle the Recommendation Engines CRUD operations
... | 32.878788 | 79 | 0.687558 |
ff09bb7100fab0828a7ca5f7d3b6cc89205e85d9 | 162 | py | Python | core/nlp/response_generator/factory/base_response_generator_factory.py | AvirityInformation/chatbot_Jullie | 2ae962d2b8b39e04ef39c8da767989f4811680cf | [
"CC0-1.0"
] | 1 | 2020-04-24T03:46:42.000Z | 2020-04-24T03:46:42.000Z | core/nlp/response_generator/factory/base_response_generator_factory.py | AvirityInformation/chatbot_Jullie | 2ae962d2b8b39e04ef39c8da767989f4811680cf | [
"CC0-1.0"
] | 5 | 2021-02-08T20:23:55.000Z | 2021-09-07T23:55:51.000Z | core/nlp/response_generator/factory/base_response_generator_factory.py | hirokig/CBT | ac92490d2379f9c331973ca4301c7b10d7774b32 | [
"CC0-1.0"
] | 1 | 2018-08-06T09:35:37.000Z | 2018-08-06T09:35:37.000Z | from abc import ABC, abstractmethod
class BaseResponseGeneratorFactory(ABC):
@classmethod
@abstractmethod
def create(cls, *arguments):
pass
| 18 | 40 | 0.716049 |
ff09f75a2ef53beff7e7f790d50661b61fc24f68 | 13,567 | py | Python | fluidlab/exp/session.py | fluiddyn/fluidlab | 77e7ae3129788089814e38eba93802026a07fcf6 | [
"CECILL-B"
] | 4 | 2020-01-19T04:12:12.000Z | 2021-11-09T08:30:25.000Z | fluidlab/exp/session.py | fluiddyn/fluidlab | 77e7ae3129788089814e38eba93802026a07fcf6 | [
"CECILL-B"
] | null | null | null | fluidlab/exp/session.py | fluiddyn/fluidlab | 77e7ae3129788089814e38eba93802026a07fcf6 | [
"CECILL-B"
] | null | null | null | """Experiment session (:mod:`fluidlab.exp.session`)
===================================================
.. todo::
Improve :class:`fluidlab.exp.session.Session` to produce a nice
file `session.h5`.
Provides:
.. autoclass:: Session
:members:
:private-members:
.. autoclass:: SessionWithDefaultParams
:m... | 27.463563 | 82 | 0.547431 |
ff0a07c7a3ed7c78036abcc76b0b41d8f83bc242 | 12,453 | py | Python | ops/triangle_hash.py | jbauman214/OpticalPooledScreens_JB | ea1699d13f4975c47e25427e36e0bd910baf52c2 | [
"MIT"
] | null | null | null | ops/triangle_hash.py | jbauman214/OpticalPooledScreens_JB | ea1699d13f4975c47e25427e36e0bd910baf52c2 | [
"MIT"
] | null | null | null | ops/triangle_hash.py | jbauman214/OpticalPooledScreens_JB | ea1699d13f4975c47e25427e36e0bd910baf52c2 | [
"MIT"
] | 1 | 2020-11-10T20:35:17.000Z | 2020-11-10T20:35:17.000Z | import numpy as np
import pandas as pd
from scipy.spatial import Delaunay
from scipy.spatial.distance import cdist
from sklearn.linear_model import RANSACRegressor, LinearRegression
import warnings
import ops.utils
def find_triangles(df):
v, c = get_vectors(df[['i', 'j']].values)
return (pd.concat([
... | 31.849105 | 131 | 0.590942 |
ff0a0886ed3e86a3b52ad065409b96a040860448 | 2,188 | py | Python | python/phonenumbers/data/region_HK.py | Eyepea/python-phonenumbers | 0336e191fda80a21ed5c19d5e029ad8c70f620ee | [
"Apache-2.0"
] | 2 | 2019-03-30T02:12:54.000Z | 2021-03-08T18:59:40.000Z | python/phonenumbers/data/region_HK.py | Eyepea/python-phonenumbers | 0336e191fda80a21ed5c19d5e029ad8c70f620ee | [
"Apache-2.0"
] | null | null | null | python/phonenumbers/data/region_HK.py | Eyepea/python-phonenumbers | 0336e191fda80a21ed5c19d5e029ad8c70f620ee | [
"Apache-2.0"
] | 1 | 2018-11-10T03:47:34.000Z | 2018-11-10T03:47:34.000Z | """Auto-generated file, do not edit by hand. HK metadata"""
from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata
PHONE_METADATA_HK = PhoneMetadata(id='HK', country_code=852, international_prefix='00',
general_desc=PhoneNumberDesc(national_number_pattern='[235-7]\\d{7}|8\\d{7,8}|9\\d{4,10}', pos... | 99.454545 | 165 | 0.714808 |
ff0a1247366ddfa1122d72e8b69e4b48c9a461f2 | 24,586 | py | Python | lib/tests/streamlit/config_test.py | dwiel/streamlit | 74ae7f30cc3d95948aff311371449963f8eaf29e | [
"Apache-2.0"
] | 1 | 2020-01-04T06:45:37.000Z | 2020-01-04T06:45:37.000Z | lib/tests/streamlit/config_test.py | yutiansut/streamlit | 929942f755ca40f859a03d905ffcbf743f45dffa | [
"Apache-2.0"
] | 4 | 2021-05-09T11:42:18.000Z | 2022-02-27T10:59:36.000Z | lib/tests/streamlit/config_test.py | yutiansut/streamlit | 929942f755ca40f859a03d905ffcbf743f45dffa | [
"Apache-2.0"
] | 1 | 2020-06-26T14:41:01.000Z | 2020-06-26T14:41:01.000Z | # -*- coding: utf-8 -*-
# Copyright 2018-2019 Streamlit 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 applicabl... | 38.475743 | 110 | 0.635972 |
ff0a17c81e5e1d4c23747bfb053722b6ed87f320 | 4,433 | py | Python | configs/top_down/mspn/coco/3xmspn50_coco_256x192.py | irvingzhang0512/mmpose | 17557522ce3e41f830973079c5b4321935c41439 | [
"Apache-2.0"
] | null | null | null | configs/top_down/mspn/coco/3xmspn50_coco_256x192.py | irvingzhang0512/mmpose | 17557522ce3e41f830973079c5b4321935c41439 | [
"Apache-2.0"
] | null | null | null | configs/top_down/mspn/coco/3xmspn50_coco_256x192.py | irvingzhang0512/mmpose | 17557522ce3e41f830973079c5b4321935c41439 | [
"Apache-2.0"
] | null | null | null | log_level = 'INFO'
load_from = None
resume_from = None
dist_params = dict(backend='nccl')
workflow = [('train', 1)]
checkpoint_config = dict(interval=10)
evaluation = dict(interval=10, metric='mAP', key_indicator='AP')
optimizer = dict(
type='Adam',
lr=5e-3,
)
optimizer_config = dict(grad_clip=None)
# learnin... | 28.056962 | 79 | 0.596436 |
ff0a395d8e6c336fd7f54e8b0a621b4adca740ec | 3,532 | py | Python | eth2/beacon/tools/builder/proposer.py | nrryuya/trinity | 7436d9c3fdef5fbeef5d7a1123c8ed2ecd16e033 | [
"MIT"
] | null | null | null | eth2/beacon/tools/builder/proposer.py | nrryuya/trinity | 7436d9c3fdef5fbeef5d7a1123c8ed2ecd16e033 | [
"MIT"
] | null | null | null | eth2/beacon/tools/builder/proposer.py | nrryuya/trinity | 7436d9c3fdef5fbeef5d7a1123c8ed2ecd16e033 | [
"MIT"
] | null | null | null | from typing import (
Dict,
Sequence,
Type,
)
from eth.constants import (
ZERO_HASH32,
)
from eth2._utils import bls
from eth2.beacon.enums import (
SignatureDomain,
)
from eth2.beacon.exceptions import (
ProposerIndexError,
)
from eth2.beacon.helpers import (
get_beacon_proposer_index,
... | 24.873239 | 81 | 0.646659 |
ff0a4c51eeb8fba50e82613b5a4927532a0b180f | 34 | py | Python | tests/__init__.py | lagelalegal/pylint-sqlalchemy-1 | edb7b1903279a07dbe54093de774cf0791e348e6 | [
"MIT"
] | 4 | 2018-10-31T23:10:48.000Z | 2021-05-21T14:51:20.000Z | tests/__init__.py | lagelalegal/pylint-sqlalchemy-1 | edb7b1903279a07dbe54093de774cf0791e348e6 | [
"MIT"
] | 4 | 2019-06-09T22:06:18.000Z | 2022-02-24T13:30:13.000Z | tests/__init__.py | lagelalegal/pylint-sqlalchemy-1 | edb7b1903279a07dbe54093de774cf0791e348e6 | [
"MIT"
] | 1 | 2019-06-11T14:13:43.000Z | 2019-06-11T14:13:43.000Z | """Tests for pylint_sqlalchemy"""
| 17 | 33 | 0.735294 |
ff0a6bc3e611aebc4b910f18f2a0ff5b3a556453 | 27,377 | py | Python | seqio/vocabularies.py | ayushkumar63123/seqio | 23bcb59df59798074d7d5896a131980137c69ec8 | [
"Apache-2.0"
] | 144 | 2021-04-16T00:43:10.000Z | 2022-03-21T08:51:27.000Z | seqio/vocabularies.py | ayushkumar63123/seqio | 23bcb59df59798074d7d5896a131980137c69ec8 | [
"Apache-2.0"
] | 49 | 2021-04-26T06:28:51.000Z | 2022-03-28T23:55:16.000Z | seqio/vocabularies.py | ayushkumar63123/seqio | 23bcb59df59798074d7d5896a131980137c69ec8 | [
"Apache-2.0"
] | 13 | 2021-04-27T10:28:27.000Z | 2022-03-10T18:43:37.000Z | # Copyright 2021 The SeqIO 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 or agreed to in wr... | 32.475682 | 80 | 0.694671 |
ff0a7a80e4d01b06f5a64002b62e32118fe69e90 | 455 | py | Python | i2cylib/utils/files/hash_file.py | i2cy/i2cylib | f7f5c8ec320669bc17d065f0ec2aa74917954bac | [
"MIT"
] | 1 | 2021-04-17T06:45:31.000Z | 2021-04-17T06:45:31.000Z | i2cylib/utils/files/hash_file.py | i2cy/i2cylib | f7f5c8ec320669bc17d065f0ec2aa74917954bac | [
"MIT"
] | null | null | null | i2cylib/utils/files/hash_file.py | i2cy/i2cylib | f7f5c8ec320669bc17d065f0ec2aa74917954bac | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Author: Icy(enderman1024@foxmail.com)
# OS: ALL
# Name: File Hash Reader
# Description: This function can the file's sha3-512 value
# Used Librarie(s): hashlib
##VERSION: 1.1
import hashlib
def hash_file(file_path):
filex = open(file_path,"rb")
hashs = hashlib.sha512()
while True... | 22.75 | 58 | 0.630769 |
ff0a9fa6996dede19539a0cb70b82b75eaeaa928 | 715 | py | Python | configs/selfsup/simsiam/simsiam_resnet50_4xb64-coslr-200e_in30p.py | dungdinhanh/mmselfsup | 67fc764f4f5512701f93e8e1fa39e09ee008a54a | [
"Apache-2.0"
] | null | null | null | configs/selfsup/simsiam/simsiam_resnet50_4xb64-coslr-200e_in30p.py | dungdinhanh/mmselfsup | 67fc764f4f5512701f93e8e1fa39e09ee008a54a | [
"Apache-2.0"
] | null | null | null | configs/selfsup/simsiam/simsiam_resnet50_4xb64-coslr-200e_in30p.py | dungdinhanh/mmselfsup | 67fc764f4f5512701f93e8e1fa39e09ee008a54a | [
"Apache-2.0"
] | 1 | 2022-03-15T11:31:48.000Z | 2022-03-15T11:31:48.000Z | _base_ = [
'../_base_/models/simsiam.py',
'../_base_/datasets/imagenet30p_mocov2_b64_cluster.py',
'../_base_/schedules/sgd_coslr-200e_in1k.py',
'../_base_/default_runtime.py',
]
# set base learning rate
lr = 0.05
# additional hooks
custom_hooks = [
dict(type='SimSiamHook', priority='HIGH', fix_pre... | 29.791667 | 75 | 0.728671 |
ff0aa93cd704783f90b650ad04e9dde95aa35add | 32,174 | py | Python | src/borg/crypto/key.py | CyberFlameGO/borg | cf4a1abb87014acd38ada22a807382393513a5d9 | [
"BSD-3-Clause"
] | null | null | null | src/borg/crypto/key.py | CyberFlameGO/borg | cf4a1abb87014acd38ada22a807382393513a5d9 | [
"BSD-3-Clause"
] | null | null | null | src/borg/crypto/key.py | CyberFlameGO/borg | cf4a1abb87014acd38ada22a807382393513a5d9 | [
"BSD-3-Clause"
] | 1 | 2022-03-15T12:16:13.000Z | 2022-03-15T12:16:13.000Z | import configparser
import getpass
import os
import shlex
import sys
import textwrap
import subprocess
from binascii import a2b_base64, b2a_base64, hexlify
from hashlib import sha256, sha512, pbkdf2_hmac
from hmac import HMAC, compare_digest
from ..logger import create_logger
logger = create_logger()
from ..constant... | 35.948603 | 158 | 0.644464 |
ff0aa98f168a8ac9d7cd43f2c678aea5511f3e0f | 6,267 | py | Python | company/views.py | WillieIlus/jobscorner | ed3734468ea0e88a306a1d29bc876562e940f4fb | [
"bzip2-1.0.6"
] | 2 | 2020-04-12T13:18:35.000Z | 2021-04-02T04:18:17.000Z | company/views.py | WillieIlus/jobscorner | ed3734468ea0e88a306a1d29bc876562e940f4fb | [
"bzip2-1.0.6"
] | 3 | 2020-02-11T23:58:53.000Z | 2020-09-06T18:46:17.000Z | company/views.py | WillieIlus/jobscorner | ed3734468ea0e88a306a1d29bc876562e940f4fb | [
"bzip2-1.0.6"
] | 1 | 2020-08-17T08:29:41.000Z | 2020-08-17T08:29:41.000Z | from builtins import super
from django.contrib import messages
from django.contrib.auth.decorators import login_required
from django.contrib.auth.mixins import LoginRequiredMixin
# from django.core.checks import messages
from django.shortcuts import render, get_object_or_404
from django.urls import reverse_lazy
from d... | 34.816667 | 90 | 0.694431 |
ff0ab9a18da40ab6cbb7b790a52c06c140be8e07 | 14,252 | py | Python | pysoa/server/action/status.py | arareko/pysoa | a90e428558500cf692f7f6e33fd358dd2779c328 | [
"Apache-2.0"
] | 91 | 2017-05-08T22:41:33.000Z | 2022-02-09T11:37:07.000Z | pysoa/server/action/status.py | arareko/pysoa | a90e428558500cf692f7f6e33fd358dd2779c328 | [
"Apache-2.0"
] | 63 | 2017-06-14T20:08:49.000Z | 2021-06-16T23:08:25.000Z | pysoa/server/action/status.py | arareko/pysoa | a90e428558500cf692f7f6e33fd358dd2779c328 | [
"Apache-2.0"
] | 26 | 2017-10-13T23:23:13.000Z | 2022-01-11T16:58:17.000Z | from __future__ import (
absolute_import,
unicode_literals,
)
import abc
import platform
import sys
from typing import (
Any,
Callable,
Dict,
Generator,
Iterable,
List,
NamedTuple,
Optional,
Tuple,
Type,
)
import conformity
from conformity import fields
import six
impo... | 43.187879 | 120 | 0.611002 |
ff0abb51dd27c013fbecee5bf44871dd3511e524 | 7,488 | py | Python | examples/waveform_animation_highGain.py | frnbrun/nectarchain | 697b466f269c336c064d836dc619a1d286be039a | [
"BSD-3-Clause"
] | 5 | 2019-07-15T08:53:33.000Z | 2022-02-14T12:29:27.000Z | examples/waveform_animation_highGain.py | jlenain/nectarchain | 7f01e3bae35d86634c94fa63428ef3e888d36ac3 | [
"BSD-3-Clause"
] | 12 | 2019-07-16T07:58:56.000Z | 2022-03-11T13:18:23.000Z | examples/waveform_animation_highGain.py | jlenain/nectarchain | 7f01e3bae35d86634c94fa63428ef3e888d36ac3 | [
"BSD-3-Clause"
] | 7 | 2019-07-18T12:42:48.000Z | 2022-01-18T17:50:22.000Z | """
Script showing how to generate movies with the waveform evolution.
To be used with https://github.com/cta-observatory/ctapipe,
as well as https://github.com/cta-observatory/ctapipe_io_nectarcam, which includes ctapipe.io.nectarcameventsource,
to read NectarCAM data, pending https://github.com/cta-observatory/ctap... | 34.666667 | 126 | 0.640759 |
ff0ae419c889e3f95a3b62569429eb5ad1f552ee | 10,865 | py | Python | skew/resources/aws/__init__.py | rezamt/skew | 80a45b9348ee23110fbf90edaac7076af480f937 | [
"Apache-2.0"
] | 190 | 2015-01-02T19:14:55.000Z | 2022-03-11T03:49:45.000Z | skew/resources/aws/__init__.py | rezamt/skew | 80a45b9348ee23110fbf90edaac7076af480f937 | [
"Apache-2.0"
] | 78 | 2015-01-15T00:16:03.000Z | 2021-12-29T14:40:53.000Z | skew/resources/aws/__init__.py | rezamt/skew | 80a45b9348ee23110fbf90edaac7076af480f937 | [
"Apache-2.0"
] | 74 | 2015-01-16T15:58:59.000Z | 2022-02-07T13:12:49.000Z | # Copyright (c) 2014 Scopely, Inc.
# Copyright (c) 2015 Mitch Garnaat
#
# Licensed under the Apache License, Version 2.0 (the "License"). You
# may not use this file except in compliance with the License. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompanyin... | 40.692884 | 87 | 0.602301 |
ff0b1e918ba2600fbd39aa03ee15ae26923cd2df | 832 | py | Python | src/backend/app/factory.py | aimanow/sft | dce87ffe395ae4bd08b47f28e07594e1889da819 | [
"Apache-2.0"
] | null | null | null | src/backend/app/factory.py | aimanow/sft | dce87ffe395ae4bd08b47f28e07594e1889da819 | [
"Apache-2.0"
] | null | null | null | src/backend/app/factory.py | aimanow/sft | dce87ffe395ae4bd08b47f28e07594e1889da819 | [
"Apache-2.0"
] | null | null | null | import os
from flask import Flask
from flask_migrate import Migrate
from config import ConfigType
from elasticsearch import Elasticsearch
from app.api import api_blueprint
from commands.superuser import superuser_cli
from app.extensions import db, register_extensions
def register_blueprints(app):
app.register_... | 23.771429 | 74 | 0.77524 |
ff0b71d001a03d6600ece097fa257f15511a0dfc | 147,573 | py | Python | swift/obj/diskfile.py | xiaoguaishou/swift | 166b85e468cfeed15171568329013e031acf586b | [
"Apache-2.0"
] | null | null | null | swift/obj/diskfile.py | xiaoguaishou/swift | 166b85e468cfeed15171568329013e031acf586b | [
"Apache-2.0"
] | null | null | null | swift/obj/diskfile.py | xiaoguaishou/swift | 166b85e468cfeed15171568329013e031acf586b | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2010-2013 OpenStack Foundation
#
# 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 agree... | 41.758065 | 79 | 0.600388 |
ff0bc298cb1150b372849632859c5900a2a51eab | 421 | py | Python | assignment_dashboard/app.py | osteele/assignment-dashboard | 4442587630cd1f55ae3302e96ddef7fd83caba16 | [
"MIT"
] | null | null | null | assignment_dashboard/app.py | osteele/assignment-dashboard | 4442587630cd1f55ae3302e96ddef7fd83caba16 | [
"MIT"
] | 12 | 2017-02-05T23:38:08.000Z | 2017-02-07T14:42:16.000Z | assignment_dashboard/app.py | olin-computing/assignment-dashboard | 4442587630cd1f55ae3302e96ddef7fd83caba16 | [
"MIT"
] | null | null | null | import os
from flask import Flask
from werkzeug.contrib.cache import RedisCache, SimpleCache
from .config import BaseConfig
app = Flask(__name__)
app.config.from_object(BaseConfig)
if os.environ.get('FLASK_DEBUG'):
from flask_debugtoolbar import DebugToolbarExtension
toolbar = DebugToolbarExtension(app)
ap... | 26.3125 | 102 | 0.795724 |
ff0be036533df6c202fbed2ffae595c682777f7d | 1,048 | py | Python | sdks/python/test/test_DataSubjectRightStatusResponse.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | null | null | null | sdks/python/test/test_DataSubjectRightStatusResponse.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 6 | 2019-10-23T06:38:53.000Z | 2022-01-22T07:57:58.000Z | sdks/python/test/test_DataSubjectRightStatusResponse.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 2 | 2019-10-23T06:31:05.000Z | 2021-08-21T17:32:47.000Z | # coding: utf-8
"""
App Center Client
Microsoft Visual Studio App Center API # noqa: E501
OpenAPI spec version: preview
Contact: benedetto.abbenanti@gmail.com
Project Repository: https://github.com/b3nab/appcenter-sdks
"""
from __future__ import absolute_import
import unittest
import appcente... | 26.2 | 121 | 0.751908 |
ff0befca2ba11d29c1e3afc8c2a5cb351c20c88b | 2,021 | py | Python | app/auth/views.py | imokyou/admin_backend | d2415fb57277cde1dab34a317fc77f6d7405088f | [
"MIT"
] | null | null | null | app/auth/views.py | imokyou/admin_backend | d2415fb57277cde1dab34a317fc77f6d7405088f | [
"MIT"
] | null | null | null | app/auth/views.py | imokyou/admin_backend | d2415fb57277cde1dab34a317fc77f6d7405088f | [
"MIT"
] | null | null | null | # coding=utf8
import json
import traceback
from Cookie import SimpleCookie
from django.contrib.auth import authenticate, login as auth_login
from django.contrib.auth.models import User
from django.contrib.auth.views import logout as auth_logout
from django.http.response import HttpResponseRedirect, HttpResponse
from dj... | 30.164179 | 74 | 0.692232 |
ff0c09907b4066451f8c4028b6baee49e4e004f6 | 1,901 | py | Python | ufora/BackendGateway/SubscribableWebObjects/Exceptions.py | ufora/ufora | 04db96ab049b8499d6d6526445f4f9857f1b6c7e | [
"Apache-2.0",
"CC0-1.0",
"MIT",
"BSL-1.0",
"BSD-3-Clause"
] | 571 | 2015-11-05T20:07:07.000Z | 2022-01-24T22:31:09.000Z | ufora/BackendGateway/SubscribableWebObjects/Exceptions.py | timgates42/ufora | 04db96ab049b8499d6d6526445f4f9857f1b6c7e | [
"Apache-2.0",
"CC0-1.0",
"MIT",
"BSL-1.0",
"BSD-3-Clause"
] | 218 | 2015-11-05T20:37:55.000Z | 2021-05-30T03:53:50.000Z | ufora/BackendGateway/SubscribableWebObjects/Exceptions.py | timgates42/ufora | 04db96ab049b8499d6d6526445f4f9857f1b6c7e | [
"Apache-2.0",
"CC0-1.0",
"MIT",
"BSL-1.0",
"BSD-3-Clause"
] | 40 | 2015-11-07T21:42:19.000Z | 2021-05-23T03:48:19.000Z | # Copyright 2015 Ufora 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 i... | 33.350877 | 93 | 0.744871 |
ff0c40296a550bbf34bfdb8569a6ca286f23180b | 1,783 | py | Python | Source/Thttil/ThttilStreamBuffer.py | Renondedju/Thttil | 66bbc4133421b86804f195b5a74c53f4281e98ba | [
"MIT"
] | 2 | 2019-03-13T12:39:28.000Z | 2019-04-01T09:11:48.000Z | Source/Thttil/ThttilStreamBuffer.py | BasileCombet/Thttil | 66bbc4133421b86804f195b5a74c53f4281e98ba | [
"MIT"
] | null | null | null | Source/Thttil/ThttilStreamBuffer.py | BasileCombet/Thttil | 66bbc4133421b86804f195b5a74c53f4281e98ba | [
"MIT"
] | 1 | 2019-11-06T09:18:08.000Z | 2019-11-06T09:18:08.000Z | from typing import Dict, List
class ThttilStreamBuffer:
""" Stores streams
"""
def __init__(self):
self.__streams : Dict[str, str] = {"default": ""}
self.__current_stream: str = "default"
def select(self, stream_name: str = "default") -> bool:
""" Selects the ... | 30.741379 | 76 | 0.5788 |
ff0c411c7ed7a4c2f71d1cc728dbb8d07a8b11ce | 2,121 | py | Python | oscar/lib/python2.7/site-packages/django_extensions/mongodb/fields/encrypted.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/django_extensions/mongodb/fields/encrypted.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/django_extensions/mongodb/fields/encrypted.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Encrypted fields from Django Extensions, modified for use with mongoDB
"""
from django import forms
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from mongoengine.base import BaseField
try:
from keyczar import keyczar
except ImportEr... | 33.666667 | 133 | 0.672324 |
ff0c4c90dd399f20df4b117240709180dc3b3a41 | 13,505 | py | Python | forest/synthesizer/multiple_synthesizer.py | Marghrid/Forest | 2f1730fd7cb1e3579fcce222c67b91c5bb1aa5f4 | [
"Apache-2.0"
] | 7 | 2020-06-24T12:14:40.000Z | 2022-01-19T17:01:02.000Z | forest/synthesizer/multiple_synthesizer.py | Marghrid/Forest | 2f1730fd7cb1e3579fcce222c67b91c5bb1aa5f4 | [
"Apache-2.0"
] | null | null | null | forest/synthesizer/multiple_synthesizer.py | Marghrid/Forest | 2f1730fd7cb1e3579fcce222c67b91c5bb1aa5f4 | [
"Apache-2.0"
] | null | null | null | import datetime
import re
import socket
import time
from abc import ABC, abstractmethod
from typing import List
from termcolor import colored
from forest.capturer import Capturer
from forest.configuration import Configuration
from forest.decider import RegexDecider
from forest.distinguisher import RegexDistinguisher
... | 42.873016 | 114 | 0.617475 |
ff0c5348e736f0d1f94a84079cb3ea557867b34f | 4,789 | py | Python | analysis/log.py | ibab/lhcb-b2dmumu | c1334c381032af9459602640e17541377fd16606 | [
"MIT"
] | 3 | 2019-06-24T10:56:34.000Z | 2019-06-24T10:57:11.000Z | analysis/log.py | ibab/lhcb-b2dmumu | c1334c381032af9459602640e17541377fd16606 | [
"MIT"
] | null | null | null | analysis/log.py | ibab/lhcb-b2dmumu | c1334c381032af9459602640e17541377fd16606 | [
"MIT"
] | null | null | null |
import ctypes
import logging
import os
def setup_roofit():
from silence import silence
from ROOT import gSystem
#logging.info('Did you know that RooFit was written by Wouter Verkerke and David Kirkby?')
with silence():
gSystem.Load('libRooFit')
def setup_logging():
logger = logging.getLog... | 32.578231 | 94 | 0.488411 |
ff0c6bd3676eec7deee186bd4bcbba463680fca2 | 5,899 | py | Python | slt/slt/signjoey/compression.py | sml-cut/deepsignnet_v2 | 326e91be0ea9e93c67b7afc1852d93198882cd78 | [
"Apache-2.0"
] | null | null | null | slt/slt/signjoey/compression.py | sml-cut/deepsignnet_v2 | 326e91be0ea9e93c67b7afc1852d93198882cd78 | [
"Apache-2.0"
] | null | null | null | slt/slt/signjoey/compression.py | sml-cut/deepsignnet_v2 | 326e91be0ea9e93c67b7afc1852d93198882cd78 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Compression Tools
Karen Ullrich, Oct 2017
References:
[1] Michael T. Heath. 1996. Scientific Computing: An Introductory Survey (2nd ed.). Eric M. Munson (Ed.). McGraw-Hill Higher Education. Chapter 1
"""
import numpy as np
import torch.nn as nn
import torch.nn... | 31.545455 | 155 | 0.642143 |
ff0c7a5a0d0612680f4e8fcc5336a0e08775a51c | 18 | py | Python | btd6_memory_info/generated/Assets/Scripts/Unity/UI_New/InGame/Races/BossUI/boss_ui.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/Assets/Scripts/Unity/UI_New/InGame/Races/BossUI/boss_ui.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/Assets/Scripts/Unity/UI_New/InGame/Races/BossUI/boss_ui.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | class BossUI: pass | 18 | 18 | 0.833333 |
ff0c9e56a346bd22d0abb0f19cd52192d2c1ecd2 | 3,321 | py | Python | experiments/murtaza/off_policy_ssl/gym/awr_sac.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/murtaza/off_policy_ssl/gym/awr_sac.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/murtaza/off_policy_ssl/gym/awr_sac.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | import rlkit.misc.hyperparameter as hyp
from rlkit.torch.sac.policies import GaussianPolicy
from rlkit.launchers.experiments.awac.awac_rl import experiment
from rlkit.launchers.launcher_util import run_experiment
if __name__ == "__main__":
variant = dict(
num_epochs=3000,
num_eval_steps_per_epoch=... | 27.221311 | 72 | 0.527251 |
ff0cbf3a3fd5a0fb852104a088e7d8bd026cef1e | 11,143 | py | Python | examples/gui/bottle/frontend.py | swamper123/pymodbus | 7dfac6f19c60d3aa50a168ff82db88204dfb3a30 | [
"BSD-3-Clause"
] | null | null | null | examples/gui/bottle/frontend.py | swamper123/pymodbus | 7dfac6f19c60d3aa50a168ff82db88204dfb3a30 | [
"BSD-3-Clause"
] | 1 | 2020-10-29T12:01:38.000Z | 2022-03-21T02:39:59.000Z | examples/gui/bottle/frontend.py | swamper123/pymodbus | 7dfac6f19c60d3aa50a168ff82db88204dfb3a30 | [
"BSD-3-Clause"
] | null | null | null | """
Pymodbus Web Frontend
=======================================
This is a simple web frontend using bottle as the web framework.
This can be hosted using any wsgi adapter.
"""
from __future__ import print_function
from pymodbus.version import version
import json, inspect
from bottle import route, request, Bottle
fro... | 36.534426 | 99 | 0.539083 |
ff0ccabc0a6f273bf8b083d0158694a2c015f827 | 5,205 | py | Python | analysis/model_get_perc_active.py | danielmk/pyDentateeLife2020 | b4a9f2beaa0c74dbc9583e2cf228856612596f8a | [
"MIT"
] | null | null | null | analysis/model_get_perc_active.py | danielmk/pyDentateeLife2020 | b4a9f2beaa0c74dbc9583e2cf228856612596f8a | [
"MIT"
] | null | null | null | analysis/model_get_perc_active.py | danielmk/pyDentateeLife2020 | b4a9f2beaa0c74dbc9583e2cf228856612596f8a | [
"MIT"
] | 4 | 2020-02-18T09:25:20.000Z | 2021-11-20T23:52:29.000Z | # -*- coding: utf-8 -*-
"""
Created on Sun Mar 11 10:25:41 2018
@author: daniel
"""
import shelve
import numpy as np
import matplotlib.pyplot as plt
import os
#Home PC
#directory = "C:\\Users\\daniel\\repos\\pyDentate\paradigm_pattern-separation_saves_2018-03-11\\"
#Office PC
#directory = "Y:\\DanielM\\023_Dentate Gy... | 50.533981 | 141 | 0.717771 |
ff0cd0fda065a2f0c8a919a56352d83899419d91 | 10,979 | py | Python | thor/utils/tests/test_multiprocessing.py | KatKiker/thor | ffc8ab3fbaa8af046f531e8111907a891998d14b | [
"BSD-3-Clause"
] | 11 | 2019-08-22T18:37:09.000Z | 2022-02-28T22:49:25.000Z | thor/utils/tests/test_multiprocessing.py | KatKiker/thor | ffc8ab3fbaa8af046f531e8111907a891998d14b | [
"BSD-3-Clause"
] | 57 | 2019-08-20T19:57:14.000Z | 2021-09-16T20:54:59.000Z | thor/utils/tests/test_multiprocessing.py | KatKiker/thor | ffc8ab3fbaa8af046f531e8111907a891998d14b | [
"BSD-3-Clause"
] | 7 | 2021-02-09T21:28:43.000Z | 2022-02-01T08:55:29.000Z | import pytest
import numpy as np
import pandas as pd
from ..multiprocessing import yieldChunks
from ..multiprocessing import calcChunkSize
def test_yieldChunks_list():
# Create list of data
indexable = [i for i in range(15)]
# Set chunk_size to 10
chunk_size = 10
generator = yieldChunks(indexable... | 30.582173 | 93 | 0.690955 |
ff0cea2408021b4ba4b5552701b5d3510ba92f26 | 418 | py | Python | luminos/__init__.py | linuxaddict89/luminos | cd525173bd6766eb109c4409581f6c6273d1c1bd | [
"MIT"
] | null | null | null | luminos/__init__.py | linuxaddict89/luminos | cd525173bd6766eb109c4409581f6c6273d1c1bd | [
"MIT"
] | 2 | 2021-10-03T08:44:45.000Z | 2021-10-03T08:49:49.000Z | luminos/__init__.py | linuxaddict89/luminos | cd525173bd6766eb109c4409581f6c6273d1c1bd | [
"MIT"
] | null | null | null | """A browser based application framework."""
import os.path
__author__ = "M Sayuti"
__copyright__ = "Copyright 2019 M Sayuti"
__license__ = "GPL"
__maintainer__ = __author__
__email__ = "muhammad.sayuti94@gmail.com"
__version_info__ = (0, 3, 2)
__version__ = ".".join(str(e) for e in __version_info__)
__description__ ... | 27.866667 | 58 | 0.755981 |
ff0ceb8eb55792b894507ac07f9456e4dfa7618b | 4,197 | py | Python | braintree/util/http.py | eldarion/braintree_python | 8be3f69fb9a4171c5e9be049c8440fcc4f79fb40 | [
"MIT"
] | 3 | 2015-11-05T08:57:12.000Z | 2016-07-17T18:10:55.000Z | braintree/util/http.py | eldarion/braintree_python | 8be3f69fb9a4171c5e9be049c8440fcc4f79fb40 | [
"MIT"
] | null | null | null | braintree/util/http.py | eldarion/braintree_python | 8be3f69fb9a4171c5e9be049c8440fcc4f79fb40 | [
"MIT"
] | null | null | null | import httplib
import base64
from braintree.configuration import Configuration
from braintree.util.xml_util import XmlUtil
from braintree.exceptions.authentication_error import AuthenticationError
from braintree.exceptions.authorization_error import AuthorizationError
from braintree.exceptions.down_for_maintenance_erro... | 35.871795 | 109 | 0.658566 |
ff0d0193e9362a8af7cbd2a2a1bd5cf49f92d7c0 | 12,201 | py | Python | atari/atari_utils.py | steffenvan/bachelor-thesis | 1472ce1ba32c107e25d4c5cc2ac64edfc04ba1ff | [
"Apache-2.0"
] | 2 | 2019-11-20T09:14:01.000Z | 2021-12-22T10:58:34.000Z | atari/atari_utils.py | steffenvan/attentive-MT | 1472ce1ba32c107e25d4c5cc2ac64edfc04ba1ff | [
"Apache-2.0"
] | null | null | null | atari/atari_utils.py | steffenvan/attentive-MT | 1472ce1ba32c107e25d4c5cc2ac64edfc04ba1ff | [
"Apache-2.0"
] | 3 | 2019-11-18T01:11:14.000Z | 2020-03-21T00:18:31.000Z | # 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 38.128125 | 82 | 0.715925 |
ff0d241661a777938edd8f025d527d13d2827e21 | 4,412 | py | Python | setup.py | roberthutto/aws-cfn-bootstrap | 801a16802a931fa4dae0eba4898fe1ccdb304924 | [
"Apache-2.0"
] | null | null | null | setup.py | roberthutto/aws-cfn-bootstrap | 801a16802a931fa4dae0eba4898fe1ccdb304924 | [
"Apache-2.0"
] | null | null | null | setup.py | roberthutto/aws-cfn-bootstrap | 801a16802a931fa4dae0eba4898fe1ccdb304924 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#==============================================================================
# Copyright 2011 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.
# You ma... | 45.958333 | 192 | 0.621034 |
ff0d2a6db021f39d2973f196a2d22707c3cae939 | 1,418 | py | Python | Element_Analytics/apps/chart/views.py | drproduck/Element-Analytics | aa1a77578e6401b4e82ce9fe9072c796496d878d | [
"MIT"
] | 1 | 2019-12-09T09:43:30.000Z | 2019-12-09T09:43:30.000Z | Element_Analytics/apps/chart/views.py | drproduck/Element-Analytics | aa1a77578e6401b4e82ce9fe9072c796496d878d | [
"MIT"
] | 37 | 2018-02-04T04:41:46.000Z | 2018-04-29T20:39:09.000Z | Element_Analytics/apps/chart/views.py | drproduck/Element-Analytics | aa1a77578e6401b4e82ce9fe9072c796496d878d | [
"MIT"
] | null | null | null | from django.shortcuts import render
from django.http import HttpResponse
# Include the `fusioncharts.py` file which has required functions to embed the charts in html page
from .fusioncharts import FusionCharts
import json
from .json2chart import json2chart
# it is a default view.
# please go to the samples folder f... | 42.969697 | 99 | 0.707334 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.