hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | 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 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | 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 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
89928632b2aee5d553cc4a4c8e3c39d3adbe978b | 1,075 | py | Python | sympkf/symbolic/test/test_coordinate.py | opannekoucke/sympkf | 914dbc8127f16d28b1fe2f5afe2bc0864d53d644 | [
"CECILL-B"
] | null | null | null | sympkf/symbolic/test/test_coordinate.py | opannekoucke/sympkf | 914dbc8127f16d28b1fe2f5afe2bc0864d53d644 | [
"CECILL-B"
] | null | null | null | sympkf/symbolic/test/test_coordinate.py | opannekoucke/sympkf | 914dbc8127f16d28b1fe2f5afe2bc0864d53d644 | [
"CECILL-B"
] | null | null | null | import unittest
from sympkf.symbolic import CoordinateSystem
from sympy import symbols, Function, Matrix, Derivative
class TestCoordinateSystem(unittest.TestCase):
coords = CoordinateSystem(symbols('x y'))
def test_compatibility(self):
# Case not compatible
f = Function('f')(*symbols('t x'))
... | 31.617647 | 89 | 0.653023 |
073b63d8c41de77411a8fab8e8aebe7c88f248d2 | 6,947 | py | Python | kubernetes/client/models/v1_secret_list.py | philipp-sontag-by/python | 51c481692ab0d9c71b9dd96342bfa93b721b029d | [
"Apache-2.0"
] | 1 | 2022-02-22T23:10:55.000Z | 2022-02-22T23:10:55.000Z | kubernetes/client/models/v1_secret_list.py | philipp-sontag-by/python | 51c481692ab0d9c71b9dd96342bfa93b721b029d | [
"Apache-2.0"
] | 6 | 2021-09-13T19:03:02.000Z | 2022-03-16T18:56:42.000Z | kubernetes/client/models/v1_secret_list.py | philipp-sontag-by/python | 51c481692ab0d9c71b9dd96342bfa93b721b029d | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: release-1.23
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import si... | 33.723301 | 312 | 0.622859 |
88b1b7b4ecf8d06dc108fb62bb4d20a80ff91d94 | 4,040 | py | Python | edda/pos_utils.py | clemsciences/old_norse_notebook | 4e3608e9c0fa58b164009965f95052f309b15266 | [
"MIT"
] | 3 | 2018-11-30T13:42:18.000Z | 2021-04-15T22:39:31.000Z | edda/pos_utils.py | clemsciences/old_norse_notebook | 4e3608e9c0fa58b164009965f95052f309b15266 | [
"MIT"
] | null | null | null | edda/pos_utils.py | clemsciences/old_norse_notebook | 4e3608e9c0fa58b164009965f95052f309b15266 | [
"MIT"
] | null | null | null | """
"""
import abc
__author__ = ["Clément Besnier <clemsciences@aol.com>", ]
class POSFeatures:
def __init__(self):
self.masculine = False
self.feminine = False
self.neuter = False
self.singular = False
self.plural = False
self.dual = False
self.nominativ... | 23.625731 | 60 | 0.52698 |
37f61b88032ad641c1db3f33e4a9d1320a04dab3 | 34 | py | Python | tests/__init__.py | phzwart/qlty | 701688e7cf00abfb5624042aa296099ee2e95773 | [
"BSD-3-Clause"
] | null | null | null | tests/__init__.py | phzwart/qlty | 701688e7cf00abfb5624042aa296099ee2e95773 | [
"BSD-3-Clause"
] | null | null | null | tests/__init__.py | phzwart/qlty | 701688e7cf00abfb5624042aa296099ee2e95773 | [
"BSD-3-Clause"
] | null | null | null | """Unit test package for qlty."""
| 17 | 33 | 0.647059 |
680bb718aec1426bf0c9c4c9c90f92a41b881be4 | 2,124 | py | Python | GA_tsp_optimisation/crossover.py | JessikaSmith/OptimizationAlgorithms | bf0f871f4d6150e1e7533360cfc6f70eb616c870 | [
"MIT"
] | 15 | 2018-11-16T04:42:44.000Z | 2020-03-20T16:00:47.000Z | GA_tsp_optimisation/crossover.py | JessikaSmith/OptimizationAlgorithms | bf0f871f4d6150e1e7533360cfc6f70eb616c870 | [
"MIT"
] | null | null | null | GA_tsp_optimisation/crossover.py | JessikaSmith/OptimizationAlgorithms | bf0f871f4d6150e1e7533360cfc6f70eb616c870 | [
"MIT"
] | 3 | 2019-01-17T13:18:56.000Z | 2019-12-17T22:22:48.000Z | import numpy as np
class Crossover:
def __init__(self, crossover_type, **kwargs):
self.crossover_type = crossover_type
def crossover(self, parent_1, parent_2, **kwargs):
if self.crossover_type == 'pmx':
return self.crossover_pmx(parent_1=parent_1, parent_2=parent_2)
if sel... | 37.263158 | 79 | 0.59322 |
4089776c4b5d23d28aa5ec3b1bddafba61a6bc9f | 26,087 | py | Python | sdk/python/pulumi_gcp/iap/web_iam_member.py | sisisin/pulumi-gcp | af6681d70ea457843409110c1324817fe55f68ad | [
"ECL-2.0",
"Apache-2.0"
] | 121 | 2018-06-18T19:16:42.000Z | 2022-03-31T06:06:48.000Z | sdk/python/pulumi_gcp/iap/web_iam_member.py | sisisin/pulumi-gcp | af6681d70ea457843409110c1324817fe55f68ad | [
"ECL-2.0",
"Apache-2.0"
] | 492 | 2018-06-22T19:41:03.000Z | 2022-03-31T15:33:53.000Z | sdk/python/pulumi_gcp/iap/web_iam_member.py | sisisin/pulumi-gcp | af6681d70ea457843409110c1324817fe55f68ad | [
"ECL-2.0",
"Apache-2.0"
] | 43 | 2018-06-19T01:43:13.000Z | 2022-03-23T22:43:37.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import... | 44.823024 | 454 | 0.642427 |
758164568d21bee6437ac5f3320f2028db46c6f5 | 972 | py | Python | pycessing/download.py | kitao/pycessing | ab59dfbef7f52712e894f5b4d869c27f68bf3685 | [
"MIT"
] | null | null | null | pycessing/download.py | kitao/pycessing | ab59dfbef7f52712e894f5b4d869c27f68bf3685 | [
"MIT"
] | null | null | null | pycessing/download.py | kitao/pycessing | ab59dfbef7f52712e894f5b4d869c27f68bf3685 | [
"MIT"
] | null | null | null | import os
import sys
import urllib2
def download(url, dest_dir):
basename = os.path.basename(url)
sys.stdout.write('download {0} ... '.format(basename))
sys.stdout.flush()
filename = os.path.join(dest_dir, basename)
if not os.path.exists(dest_dir):
os.makedirs(dest_dir)
with open(filename, 'wb') as... | 19.836735 | 56 | 0.675926 |
e22fbc391dee37f699b73cbbf6301accce114438 | 32,051 | py | Python | mslib/msui/editor.py | kawalpreettkaur/MSS | ee97789ddd320a4c47f4ceebaf72e792dc2b8d63 | [
"Apache-2.0"
] | 1 | 2021-10-05T16:23:43.000Z | 2021-10-05T16:23:43.000Z | mslib/msui/editor.py | kawalpreettkaur/MSS | ee97789ddd320a4c47f4ceebaf72e792dc2b8d63 | [
"Apache-2.0"
] | null | null | null | mslib/msui/editor.py | kawalpreettkaur/MSS | ee97789ddd320a4c47f4ceebaf72e792dc2b8d63 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
mslib.msui.editor
~~~~~~~~~~~~~~~~~~~~~~
config editor for mss_settings.json.
This file is part of mss.
:copyright: Copyright 2020 Vaibhav Mehra <veb7vmehra@gmail.com>
:copyright: Copyright 2020-2021 by the mss team, see AUTHORS.
:license: APACHE-2.0, see LICE... | 45.205924 | 119 | 0.608062 |
69a6f87cbb67029a5ad349cf5638bd93652e9ff8 | 12,234 | py | Python | qa/rpc-tests/segwit.py | supertref/navcoin-core | cc6fd1c9661fcbd3b82c8f2506c0f863da43b392 | [
"MIT"
] | 1 | 2020-08-28T02:32:47.000Z | 2020-08-28T02:32:47.000Z | qa/rpc-tests/segwit.py | supertref/navcoin-core | cc6fd1c9661fcbd3b82c8f2506c0f863da43b392 | [
"MIT"
] | 3 | 2019-07-18T02:10:02.000Z | 2019-08-28T22:09:31.000Z | qa/rpc-tests/segwit.py | supertref/navcoin-core | cc6fd1c9661fcbd3b82c8f2506c0f863da43b392 | [
"MIT"
] | 2 | 2020-09-06T20:02:00.000Z | 2020-11-19T18:47:42.000Z | #!/usr/bin/env python3
# Copyright (c) 2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Test the SegWit changeover logic
#
from test_framework.test_framework import NavCoinTestFramework
from te... | 49.330645 | 198 | 0.654569 |
f7bf2016a22d95a1318cbe4626967e602079f919 | 2,275 | py | Python | contrib/scrooge/tests/python/pants_test/contrib/scrooge/tasks/test_thrift_linter.py | AllClearID/pants | c4fdf00a3bdf9f26f876e85c46909d0729f7132c | [
"Apache-2.0"
] | null | null | null | contrib/scrooge/tests/python/pants_test/contrib/scrooge/tasks/test_thrift_linter.py | AllClearID/pants | c4fdf00a3bdf9f26f876e85c46909d0729f7132c | [
"Apache-2.0"
] | null | null | null | contrib/scrooge/tests/python/pants_test/contrib/scrooge/tasks/test_thrift_linter.py | AllClearID/pants | c4fdf00a3bdf9f26f876e85c46909d0729f7132c | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2014 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 mock import Moc... | 40.625 | 96 | 0.755604 |
76cd2c1192f153710c0ad909540da9b7976e8770 | 49,711 | py | Python | great_expectations/marshmallow__shade/schema.py | victorcouste/great_expectations | 9ee46d83feb87e13c769e2ae35b899b3f18d73a4 | [
"Apache-2.0"
] | 6,451 | 2017-09-11T16:32:53.000Z | 2022-03-31T23:27:49.000Z | great_expectations/marshmallow__shade/schema.py | victorcouste/great_expectations | 9ee46d83feb87e13c769e2ae35b899b3f18d73a4 | [
"Apache-2.0"
] | 3,892 | 2017-09-08T18:57:50.000Z | 2022-03-31T23:15:20.000Z | great_expectations/marshmallow__shade/schema.py | victorcouste/great_expectations | 9ee46d83feb87e13c769e2ae35b899b3f18d73a4 | [
"Apache-2.0"
] | 1,023 | 2017-09-08T15:22:05.000Z | 2022-03-31T21:17:08.000Z | """The :class:`Schema` class, including its metaclass and options (class Meta)."""
import copy
import datetime as dt
import decimal
import inspect
import json
import typing
import uuid
import warnings
from collections import OrderedDict, defaultdict
from collections.abc import Mapping
from functools import lru_cache
f... | 40.154281 | 97 | 0.585725 |
f3a29468b38ab3fdbc7d0cf5ffd1c45612225fd5 | 7,070 | py | Python | server.py | simsax/hanabi-bot | 0d63e72066d1e4acee9801df91a6664d9ecb834b | [
"MIT"
] | null | null | null | server.py | simsax/hanabi-bot | 0d63e72066d1e4acee9801df91a6664d9ecb834b | [
"MIT"
] | null | null | null | server.py | simsax/hanabi-bot | 0d63e72066d1e4acee9801df91a6664d9ecb834b | [
"MIT"
] | null | null | null | import os
import GameData
import socket
from game import Game
from game import Player
import threading
from constants import *
import logging
import sys
mutex = threading.Lock()
# SERVER
playerConnections = {}
game = Game()
playersOk = []
statuses = [
"Lobby",
"Game"
]
status = statuses[0]
commandQueue = {}... | 43.374233 | 139 | 0.487553 |
4cebf86fdf6e0a2ea053d2105947d957b7def4df | 3,518 | py | Python | classy_vision/hooks/classy_hook.py | jerryzh168/ClassyVision-1 | 6acfb00a77487a9015803fbaad805330081293a9 | [
"MIT"
] | 1 | 2020-04-13T03:50:26.000Z | 2020-04-13T03:50:26.000Z | classy_vision/hooks/classy_hook.py | pkassotis/ClassyVision | e8704ecaa59a15dbb2f4b0724e85d6e5cb2f704e | [
"MIT"
] | null | null | null | classy_vision/hooks/classy_hook.py | pkassotis/ClassyVision | e8704ecaa59a15dbb2f4b0724e85d6e5cb2f704e | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from abc import ABC, abstractmethod
from typing import Any, Dict
from classy_vision.generic.util import log_class_usag... | 28.836066 | 83 | 0.627629 |
bb3478a59ce99552162a39f1e455a7112108d3ca | 549 | py | Python | maro/simulator/scenarios/cim/events.py | yangboz/maro | 0973783e55ca07bf8e177910c9d47854117a4ea8 | [
"MIT"
] | 598 | 2020-09-23T00:50:22.000Z | 2022-03-31T08:12:54.000Z | maro/simulator/scenarios/cim/events.py | gx9702/maro | 38c796f0a7ed1e0f64c299d96c6e0df032401fa9 | [
"MIT"
] | 235 | 2020-09-22T10:20:48.000Z | 2022-03-31T02:10:03.000Z | maro/simulator/scenarios/cim/events.py | gx9702/maro | 38c796f0a7ed1e0f64c299d96c6e0df032401fa9 | [
"MIT"
] | 116 | 2020-09-22T09:19:04.000Z | 2022-02-12T05:04:07.000Z | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
from enum import Enum
class Events(Enum):
"""Event type for CIM problem."""
# RELEASE_EMPTY = 10
RETURN_FULL = "return_full"
LOAD_FULL = "load_full"
DISCHARGE_FULL = "discharge_full"
# RELEASE_FULL = 14
RETURN_EMPTY ... | 26.142857 | 41 | 0.699454 |
0cbf86d8ba6b99c6d8be0d41324e87c3d576e2ab | 4,267 | py | Python | autoscaler/ui/util.py | RajsimmanRavi/Elascale_secure | 3aaa919ae5818930594375961c456cc8f5375f06 | [
"MIT"
] | 1 | 2018-06-26T16:33:52.000Z | 2018-06-26T16:33:52.000Z | autoscaler/ui/util.py | RajsimmanRavi/Elascale_secure | 3aaa919ae5818930594375961c456cc8f5375f06 | [
"MIT"
] | null | null | null | autoscaler/ui/util.py | RajsimmanRavi/Elascale_secure | 3aaa919ae5818930594375961c456cc8f5375f06 | [
"MIT"
] | 2 | 2018-02-21T18:52:49.000Z | 2022-02-21T13:50:50.000Z | import configparser
import os
import json
import requests
import sys
import autoscaler.conf.engine_config as eng
"""
Function to read a config file and return that variable.
"""
def read_file(f_name):
config = configparser.ConfigParser()
config.read(f_name)
return config
"""
Function to insert mo... | 37.104348 | 276 | 0.700023 |
c4bb689e5daa7939ebb1ec813fb0fff4fe31a42b | 8,910 | py | Python | mltc/train/trainer.py | hscspring/Multi-Label-Text-Classification | f0ae98bfffea2bc13fd948a4053ac1a6e91597ad | [
"MIT"
] | 52 | 2019-12-02T12:10:14.000Z | 2022-03-27T06:45:46.000Z | mltc/train/trainer.py | hscspring/Multi-Label-Text-Classification | f0ae98bfffea2bc13fd948a4053ac1a6e91597ad | [
"MIT"
] | 4 | 2019-12-09T02:42:34.000Z | 2022-01-21T05:54:09.000Z | mltc/train/trainer.py | hscspring/Multi-Label-Text-Classification | f0ae98bfffea2bc13fd948a4053ac1a6e91597ad | [
"MIT"
] | 21 | 2019-12-03T02:32:17.000Z | 2022-03-10T09:22:00.000Z |
import torch
from callback.progressbar import ProgressBar
from utils.utils import (restore_checkpoint, model_device,
summary, seed_everything, AverageMeter)
from torch.nn.utils import clip_grad_norm_
class Trainer(object):
def __init__(self, n_gpu,
model,
... | 42.227488 | 80 | 0.533109 |
3cbac418fb631ae29ab6bb01c2c82b47b0016d22 | 426 | py | Python | espnet2/asr/specaug/abs_specaug.py | texpomru13/espnet | 7ef005e832e2fb033f356c16f54e0f08762fb4b0 | [
"Apache-2.0"
] | 5,053 | 2017-12-13T06:21:41.000Z | 2022-03-31T13:38:29.000Z | espnet2/asr/specaug/abs_specaug.py | texpomru13/espnet | 7ef005e832e2fb033f356c16f54e0f08762fb4b0 | [
"Apache-2.0"
] | 3,666 | 2017-12-14T05:58:50.000Z | 2022-03-31T22:11:49.000Z | espnet2/asr/specaug/abs_specaug.py | texpomru13/espnet | 7ef005e832e2fb033f356c16f54e0f08762fb4b0 | [
"Apache-2.0"
] | 1,709 | 2017-12-13T01:02:42.000Z | 2022-03-31T11:57:45.000Z | from typing import Optional
from typing import Tuple
import torch
class AbsSpecAug(torch.nn.Module):
"""Abstract class for the augmentation of spectrogram
The process-flow:
Frontend -> SpecAug -> Normalization -> Encoder -> Decoder
"""
def forward(
self, x: torch.Tensor, x_lengths: to... | 22.421053 | 63 | 0.687793 |
d94a6e8dec73e26c18f7902bd83b61bf0417745e | 1,532 | py | Python | setup.py | CIRAIG/bw2waterbalancer | aaeace9f71fe55cb17488d020467f471b32be3d8 | [
"MIT"
] | 1 | 2021-01-27T22:16:56.000Z | 2021-01-27T22:16:56.000Z | setup.py | CIRAIG/bw2waterbalancer | aaeace9f71fe55cb17488d020467f471b32be3d8 | [
"MIT"
] | null | null | null | setup.py | CIRAIG/bw2waterbalancer | aaeace9f71fe55cb17488d020467f471b32be3d8 | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
import os
packages = []
root_dir = os.path.dirname(__file__)
if root_dir:
os.chdir(root_dir)
f = open('README.md')
readme = f.read()
f.close()
setup(
name='bw2waterbalancer',
version="0.1.1",
packages=find_packages(),
package_data={'bw2waterbalancer': [... | 31.916667 | 122 | 0.635117 |
1131e3f830067838563bd78f08acb9e4c1989ad3 | 1,462 | py | Python | app/core/admin.py | gaylonalfano/recipe-app-api | 3227a7c9dec901f5378b57c89c1d26c4a7b505b2 | [
"MIT"
] | null | null | null | app/core/admin.py | gaylonalfano/recipe-app-api | 3227a7c9dec901f5378b57c89c1d26c4a7b505b2 | [
"MIT"
] | null | null | null | app/core/admin.py | gaylonalfano/recipe-app-api | 3227a7c9dec901f5378b57c89c1d26c4a7b505b2 | [
"MIT"
] | null | null | null | # core/admin.py
from django.contrib import admin
# Import default user admin
from django.contrib.auth.admin import UserAdmin as BaseUserAdmin
# Import gettext for supporting multiple languages using translation engine
from django.utils.translation import gettext as _
# Import our models
from core import models
# Now ... | 33.227273 | 75 | 0.664843 |
14678fba7c84281c75024e17ee0ffd7e3ddced56 | 1,484 | py | Python | tests/python_client/deploy/scripts/action_after_upgrade.py | suibianmzl/milvus | 0afd63378b92674d0d93f570968536b343e83186 | [
"Apache-2.0"
] | 1 | 2022-01-31T13:51:31.000Z | 2022-01-31T13:51:31.000Z | tests/python_client/deploy/scripts/action_after_upgrade.py | suibianmzl/milvus | 0afd63378b92674d0d93f570968536b343e83186 | [
"Apache-2.0"
] | 38 | 2021-11-22T11:15:27.000Z | 2022-03-30T08:14:12.000Z | tests/python_client/deploy/scripts/action_after_upgrade.py | suibianmzl/milvus | 0afd63378b92674d0d93f570968536b343e83186 | [
"Apache-2.0"
] | 3 | 2021-11-17T09:21:42.000Z | 2021-11-22T11:54:09.000Z | from pymilvus import connections
from utils import *
def task_1(data_size, host):
"""
task_1:
before upgrade: create collection and insert data, load and search
after upgrade: get collection, load, search, create index, load, and search
"""
prefix = "task_1_"
connections.connect(ho... | 32.977778 | 96 | 0.704178 |
587a9ac5b170a32a3dbab8d7fedc0ba02c2f27ab | 4,957 | py | Python | test/functional/test_framework/wallet_util.py | Stackout/pexa-backport | db503f06746a8b199e56c6c918e76eca4d150f7f | [
"MIT"
] | null | null | null | test/functional/test_framework/wallet_util.py | Stackout/pexa-backport | db503f06746a8b199e56c6c918e76eca4d150f7f | [
"MIT"
] | null | null | null | test/functional/test_framework/wallet_util.py | Stackout/pexa-backport | db503f06746a8b199e56c6c918e76eca4d150f7f | [
"MIT"
] | 1 | 2020-05-30T02:27:15.000Z | 2020-05-30T02:27:15.000Z | #!/usr/bin/env python3
# Copyright (c) 2018-2020 The Pexa Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Useful util functions for testing the wallet"""
from collections import namedtuple
from test_framework.ad... | 40.300813 | 118 | 0.598749 |
db31b90359641493ef788c292665f0f9203dee36 | 4,877 | py | Python | tweet_motion_jpg.py | syncom/twitimg | cbc8163b97f86c1828fc1007e73e3eff583d5b65 | [
"Apache-2.0"
] | 1 | 2020-07-12T17:26:16.000Z | 2020-07-12T17:26:16.000Z | tweet_motion_jpg.py | syncom/twitimg-rpi | cbc8163b97f86c1828fc1007e73e3eff583d5b65 | [
"Apache-2.0"
] | null | null | null | tweet_motion_jpg.py | syncom/twitimg-rpi | cbc8163b97f86c1828fc1007e73e3eff583d5b65 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""Tweet motion-detected JPEG image.
This module captures and tweets a motion-detected JPEG image from a Raspberry
Pi with a camera module. The image capture part is credited to the excellent
post https://www.raspberrypi.org/forums/viewtopic.php?t=45235, by brainflakes.
Read brainflakes' origina... | 33.176871 | 126 | 0.62764 |
c088a33edc880ce4aa89e86bc61efab784996be5 | 3,479 | py | Python | models/yolov3/conversion/reconstruct_conv_layer.py | martinGalajdaSchool/object-detection | 2c72b643464a89b91daac520a862ebaad2b3f9f0 | [
"Apache-2.0"
] | 2 | 2019-12-11T05:50:39.000Z | 2021-12-06T12:28:40.000Z | models/yolov3/conversion/reconstruct_conv_layer.py | martinGalajdaSchool/object-detection | 2c72b643464a89b91daac520a862ebaad2b3f9f0 | [
"Apache-2.0"
] | 19 | 2019-12-16T21:23:00.000Z | 2022-03-02T14:59:12.000Z | models/yolov3/conversion/reconstruct_conv_layer.py | martin-galajda/object-detection | 2c72b643464a89b91daac520a862ebaad2b3f9f0 | [
"Apache-2.0"
] | null | null | null | from typing import Dict, Any
from keras import backend as K
import keras
import numpy as np
from keras.layers import (
Conv2D,
ZeroPadding2D,
)
from keras.layers.advanced_activations import LeakyReLU
from keras.layers.normalization import BatchNormalization
from keras.regularizers import l2
from models.yolov3.c... | 31.917431 | 109 | 0.668295 |
db0a415f964ef500015b723dc104a1b9c790c06d | 10,256 | py | Python | tests/crosschecks1711.09706.py | Lukas-Hoelker/SIDM-GWs | 6c80b9a0bcf7ec93ef3ab74dda5a91c492a63b69 | [
"MIT"
] | 1 | 2021-11-09T14:05:48.000Z | 2021-11-09T14:05:48.000Z | tests/crosschecks1711.09706.py | Lukas-Hoelker/SIDM-GWs | 6c80b9a0bcf7ec93ef3ab74dda5a91c492a63b69 | [
"MIT"
] | null | null | null | tests/crosschecks1711.09706.py | Lukas-Hoelker/SIDM-GWs | 6c80b9a0bcf7ec93ef3ab74dda5a91c492a63b69 | [
"MIT"
] | 1 | 2022-02-03T01:52:41.000Z | 2022-02-03T01:52:41.000Z | import numpy as np
import matplotlib.pyplot as plt
from scipy.interpolate import UnivariateSpline, interp1d
from scipy.integrate import quad
import collections
from imripy import halo
from imripy import merger_system as ms
from imripy import inspiral
from imripy import waveform
inspiral.Classic.ln_Lambda=3.
def Meff... | 45.380531 | 183 | 0.586291 |
81630bea6fd9bbf59bfd233fed775e2d7f455fc9 | 10,794 | py | Python | odin/bay/vi/autoencoder/factor_discriminator.py | trungnt13/odin-ai | 9c6986a854e62da39637ea463667841378b7dd84 | [
"MIT"
] | 7 | 2020-12-29T19:35:58.000Z | 2022-01-31T21:01:30.000Z | odin/bay/vi/autoencoder/factor_discriminator.py | imito/odin-ai | 9c6986a854e62da39637ea463667841378b7dd84 | [
"MIT"
] | 3 | 2020-02-06T16:44:17.000Z | 2020-09-26T05:26:14.000Z | odin/bay/vi/autoencoder/factor_discriminator.py | trungnt13/odin-ai | 9c6986a854e62da39637ea463667841378b7dd84 | [
"MIT"
] | 6 | 2019-02-14T01:36:28.000Z | 2020-10-30T13:16:32.000Z | import warnings
from typing import Any, Callable, List, Optional, Union, Sequence
import numpy as np
import tensorflow as tf
from odin.bay.layers import DistributionDense
from odin.bay.random_variable import RVconf
from odin.bay.vi.utils import permute_dims
from odin.networks import SequentialNetwork, dense_network
fr... | 37.741259 | 83 | 0.626089 |
2c5ba8347f7943822934181859ccece4355cd9dd | 11,903 | py | Python | mne/io/bti/tests/test_bti.py | mvdoc/mne-python | bac50dd08361b10d0a65c614ea2de06308750411 | [
"BSD-3-Clause"
] | null | null | null | mne/io/bti/tests/test_bti.py | mvdoc/mne-python | bac50dd08361b10d0a65c614ea2de06308750411 | [
"BSD-3-Clause"
] | null | null | null | mne/io/bti/tests/test_bti.py | mvdoc/mne-python | bac50dd08361b10d0a65c614ea2de06308750411 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import print_function
# Authors: Denis Engemann <denis.engemann@gmail.com>
#
# License: BSD (3-clause)
import os
import os.path as op
from functools import reduce, partial
import warnings
import numpy as np
from numpy.testing import (assert_array_almost_equal, assert_array_equal,
... | 40.763699 | 79 | 0.598925 |
ee2c5a4ca0335fd4df6a6c96f0bf2e837077db6b | 4,974 | py | Python | examples/tensorflow/inference/text-classification-ch/code/txt_cnn_rnn_inference.py | FinchZHU/uai-sdk | 78e06bebba2d18233ce6dcb5be619e940f7a7ef3 | [
"Apache-2.0"
] | 38 | 2017-04-26T04:00:09.000Z | 2022-02-10T02:51:05.000Z | examples/tensorflow/inference/text-classification-ch/code/txt_cnn_rnn_inference.py | FinchZHU/uai-sdk | 78e06bebba2d18233ce6dcb5be619e940f7a7ef3 | [
"Apache-2.0"
] | 17 | 2017-11-20T20:47:09.000Z | 2022-02-09T23:48:46.000Z | examples/tensorflow/inference/text-classification-ch/code/txt_cnn_rnn_inference.py | FinchZHU/uai-sdk | 78e06bebba2d18233ce6dcb5be619e940f7a7ef3 | [
"Apache-2.0"
] | 28 | 2017-07-08T05:23:13.000Z | 2020-08-18T03:12:27.000Z | # Copyright 2017 The UAI-SDK 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 applicabl... | 24.994975 | 87 | 0.674507 |
215e104c08bebb62fff7b125bf9ae814fc4734c7 | 2,477 | py | Python | msgraph-cli-extensions/v1_0/usersfunctions_v1_0/azext_usersfunctions_v1_0/__init__.py | thewahome/msgraph-cli | 33127d9efa23a0e5f5303c93242fbdbb73348671 | [
"MIT"
] | null | null | null | msgraph-cli-extensions/v1_0/usersfunctions_v1_0/azext_usersfunctions_v1_0/__init__.py | thewahome/msgraph-cli | 33127d9efa23a0e5f5303c93242fbdbb73348671 | [
"MIT"
] | null | null | null | msgraph-cli-extensions/v1_0/usersfunctions_v1_0/azext_usersfunctions_v1_0/__init__.py | thewahome/msgraph-cli | 33127d9efa23a0e5f5303c93242fbdbb73348671 | [
"MIT"
] | null | null | null | # --------------------------------------------------------------------------
# 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 cause... | 41.283333 | 114 | 0.656036 |
613ad19cafaf9e4be28fc4a62e1dafa5ad488c82 | 1,187 | py | Python | docs/partial-settings.py | alexisbellido/znbstatic | ad20160c43ab33504dfb67007d6e93ced522a77f | [
"BSD-3-Clause"
] | null | null | null | docs/partial-settings.py | alexisbellido/znbstatic | ad20160c43ab33504dfb67007d6e93ced522a77f | [
"BSD-3-Clause"
] | 8 | 2019-12-04T22:18:20.000Z | 2021-09-22T17:48:33.000Z | docs/partial-settings.py | alexisbellido/znbstatic | ad20160c43ab33504dfb67007d6e93ced522a77f | [
"BSD-3-Clause"
] | null | null | null | # Add the following settings to your Django project's settings.py.
# AWS S3 settings common to static and media files
AWS_ACCESS_KEY_ID = CONFIG['aws']['s3_static']['AWS_ACCESS_KEY_ID']
AWS_SECRET_ACCESS_KEY = CONFIG['aws']['s3_static']['AWS_SECRET_ACCESS_KEY']
AWS_S3_HOST = 's3.amazonaws.com'
AWS_IS_GZIPPED = True
S3... | 39.566667 | 97 | 0.764954 |
71d5db7fa53fedf2f33c35634362fb4d0dc54bd3 | 283 | py | Python | package/awesome_panel/designer/components/component_with_error.py | Jhsmit/awesome-panel | 53f7754f7c505a2666f6724df26c851ae942ec40 | [
"Apache-2.0"
] | 179 | 2019-12-04T14:54:53.000Z | 2022-03-30T09:08:38.000Z | package/awesome_panel/designer/components/component_with_error.py | Jhsmit/awesome-panel | 53f7754f7c505a2666f6724df26c851ae942ec40 | [
"Apache-2.0"
] | 62 | 2019-12-14T16:51:28.000Z | 2022-03-19T18:47:12.000Z | package/awesome_panel/designer/components/component_with_error.py | Jhsmit/awesome-panel | 53f7754f7c505a2666f6724df26c851ae942ec40 | [
"Apache-2.0"
] | 35 | 2019-12-08T13:19:53.000Z | 2022-03-25T10:33:02.000Z | # pylint: disable=redefined-outer-name,protected-access
# pylint: disable=missing-function-docstring,missing-module-docstring,missing-class-docstring
# pylint: disable=too-few-public-methods
class ComponentWithError:
def __init__(self):
raise NotImplementedError()
| 40.428571 | 94 | 0.777385 |
a29d7e71a93da2c4dc7a235c6820744c7884a9e2 | 1,907 | py | Python | Crack/processor_Crack.py | neil7/Crack-Detection-Capsule-Network | 2666280f48ddd42a32b301ded29a02906f7823cd | [
"Unlicense"
] | 4 | 2018-12-20T20:41:38.000Z | 2020-03-07T17:27:53.000Z | Crack/processor_Crack.py | neil7/Crack-Detection-Capsule-Network | 2666280f48ddd42a32b301ded29a02906f7823cd | [
"Unlicense"
] | null | null | null | Crack/processor_Crack.py | neil7/Crack-Detection-Capsule-Network | 2666280f48ddd42a32b301ded29a02906f7823cd | [
"Unlicense"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Wed Aug 29 12:02:20 2018
@author: Neil sharma
"""
from keras.preprocessing.image import img_to_array,load_img
#from sklearn.preprocessing import StandardScaler
import numpy as np
import os
from scipy.misc import imresize
#import argparse
image_store = []
... | 28.893939 | 122 | 0.592554 |
3aec69bb37ebfd77583d9e158a2db81039f89d45 | 5,348 | py | Python | uge/objects/qconf_dict_list.py | gridengine/config-api | 694f9667bb6569170356336283a18351456e8b82 | [
"Apache-2.0"
] | 6 | 2017-01-18T00:11:19.000Z | 2022-02-10T08:18:00.000Z | uge/objects/qconf_dict_list.py | gridengine/config-api | 694f9667bb6569170356336283a18351456e8b82 | [
"Apache-2.0"
] | 3 | 2017-05-11T13:54:42.000Z | 2020-08-12T06:15:43.000Z | uge/objects/qconf_dict_list.py | gridengine/config-api | 694f9667bb6569170356336283a18351456e8b82 | [
"Apache-2.0"
] | 4 | 2017-05-11T13:27:33.000Z | 2019-10-29T02:02:24.000Z | #!/usr/bin/env python
#
# ___INFO__MARK_BEGIN__
#######################################################################################
# Copyright 2016-2021 Univa Corporation (acquired and owned by Altair Engineering Inc.)
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file e... | 38.47482 | 158 | 0.608826 |
0ce3cbf0db2e0a1fcb33a029f7ae581085246fc6 | 3,188 | py | Python | pykeval/pykeval/broker/remote_server.py | SilverTuxedo/keval | 73e2ccd5cbdf0cc7fc167711cde60be783e8dfe7 | [
"MIT"
] | 34 | 2021-09-17T16:17:58.000Z | 2022-03-11T06:23:21.000Z | pykeval/pykeval/broker/remote_server.py | fengjixuchui/keval | 73e2ccd5cbdf0cc7fc167711cde60be783e8dfe7 | [
"MIT"
] | null | null | null | pykeval/pykeval/broker/remote_server.py | fengjixuchui/keval | 73e2ccd5cbdf0cc7fc167711cde60be783e8dfe7 | [
"MIT"
] | 4 | 2021-09-17T19:39:29.000Z | 2022-03-10T07:06:43.000Z | import logging
import pickle
from socketserver import BaseRequestHandler, TCPServer
from pykeval.broker.local import LocalBroker
from pykeval.broker.requests import BrokerResponse, BrokerResponseType, BrokerRequest, BrokerRequestType
from pykeval.broker.messaging import receive, send
logger = logging.getLogger(__name... | 35.820225 | 120 | 0.67064 |
b523160db88a32431886e9c2c04ede8ccb5f3f73 | 4,697 | py | Python | var/spack/repos/builtin/packages/cctools/package.py | hseara/spack | 4c9c5393f1fad00b7e8c77661a02b236db2d0e40 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | var/spack/repos/builtin/packages/cctools/package.py | hseara/spack | 4c9c5393f1fad00b7e8c77661a02b236db2d0e40 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 11 | 2021-05-12T06:06:20.000Z | 2022-03-30T23:10:14.000Z | var/spack/repos/builtin/packages/cctools/package.py | btovar/spack | f901c61e684a251c4396221517ff492a741dd946 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Cctools(AutotoolsPackage):
"""The Cooperative Computing Tools (cctools) enable large scale... | 44.733333 | 113 | 0.609751 |
e5f974693e019a0bc8df44b85de3a978ca622281 | 745 | py | Python | Week 5 - playList/Week 5 Task.py | Jasleenk47/BeginnerRoom-2020 | 32903f6917a236fe685106c148b8531c62210f1f | [
"Unlicense"
] | 5 | 2021-01-19T00:31:22.000Z | 2021-03-05T02:31:10.000Z | Week 5 - playList/Week 5 Task.py | Jasleenk47/BeginnerRoom-2020 | 32903f6917a236fe685106c148b8531c62210f1f | [
"Unlicense"
] | 34 | 2021-01-14T21:00:18.000Z | 2021-03-11T17:57:26.000Z | Week 5 - playList/Week 5 Task.py | Jasleenk47/BeginnerRoom-2020 | 32903f6917a236fe685106c148b8531c62210f1f | [
"Unlicense"
] | 43 | 2021-01-14T20:40:47.000Z | 2021-03-11T02:29:30.000Z | sad_playlist = ["SO DONE"]
print(sad_playlist)
sad_playlist.append("Reminds Me of You")
print(sad_playlist)
sad_playlist.sort(reverse=True)
print(sad_playlist)
sad_playlist.append("WITHOUT YOU")
print(sad_playlist)
sad_playlist.sort(reverse=False)
print(sad_playlist)
print("")
print("THIS IS JUST EXTRA (I WAS JUST... | 18.170732 | 108 | 0.718121 |
ec6f3f05c10daed0201cea0a439f5926c4d9509b | 5,350 | py | Python | calico_test/tests/st/utils/workload.py | tomdee/calico-containers | 09abe8353456acc2cec8fe55b7cfe07a4d8cad2f | [
"Apache-2.0"
] | null | null | null | calico_test/tests/st/utils/workload.py | tomdee/calico-containers | 09abe8353456acc2cec8fe55b7cfe07a4d8cad2f | [
"Apache-2.0"
] | 3 | 2015-07-30T19:18:58.000Z | 2015-07-30T23:32:19.000Z | calico_test/tests/st/utils/workload.py | tomdee/calico-docker | 09abe8353456acc2cec8fe55b7cfe07a4d8cad2f | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 Metaswitch Networks
#
# 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 w... | 34.294872 | 79 | 0.595327 |
a604dbfc0c74a10c08797b6ddc3d87cd48baae7f | 1,378 | py | Python | pyupgrade/_plugins/c_element_tree.py | adamchainz/pyupgrade | ccf3a9192fca6d2883b1e67d785e0010243e30c3 | [
"MIT"
] | 1,615 | 2017-03-17T02:45:59.000Z | 2022-03-31T18:53:20.000Z | pyupgrade/_plugins/c_element_tree.py | jiayanali/pyupgrade | b6e103248fd97b04d2bea898b95d1d8776fece57 | [
"MIT"
] | 357 | 2017-03-13T00:32:34.000Z | 2022-03-25T14:51:19.000Z | pyupgrade/_plugins/c_element_tree.py | jiayanali/pyupgrade | b6e103248fd97b04d2bea898b95d1d8776fece57 | [
"MIT"
] | 130 | 2017-06-23T04:28:50.000Z | 2022-03-31T11:33:19.000Z | import ast
from typing import Iterable
from typing import List
from typing import Tuple
from tokenize_rt import Offset
from tokenize_rt import Token
from pyupgrade._ast_helpers import ast_to_offset
from pyupgrade._data import register
from pyupgrade._data import State
from pyupgrade._data import TokenFunc
from pyupgr... | 27.019608 | 73 | 0.682874 |
320a9f30027fd584051191ff0d788fe7fcb7b5ee | 24,751 | py | Python | pirates/quest/QuestPath.py | itsyaboyrocket/pirates | 6ca1e7d571c670b0d976f65e608235707b5737e3 | [
"BSD-3-Clause"
] | 3 | 2021-02-25T06:38:13.000Z | 2022-03-22T07:00:15.000Z | pirates/quest/QuestPath.py | itsyaboyrocket/pirates | 6ca1e7d571c670b0d976f65e608235707b5737e3 | [
"BSD-3-Clause"
] | null | null | null | pirates/quest/QuestPath.py | itsyaboyrocket/pirates | 6ca1e7d571c670b0d976f65e608235707b5737e3 | [
"BSD-3-Clause"
] | 1 | 2021-02-25T06:38:17.000Z | 2021-02-25T06:38:17.000Z | # uncompyle6 version 3.2.0
# Python bytecode 2.4 (62061)
# Decompiled from: Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:19:30) [MSC v.1500 32 bit (Intel)]
# Embedded file name: pirates.quest.QuestPath
from pandac.PandaModules import TransformState
from direct.directnotify import DirectNotifyGlobal
from direct.sh... | 42.165247 | 455 | 0.562725 |
6add655847bdde2f01f155a6d99298fe21993e1a | 561 | py | Python | inventories/migrations/0016_auto_20200531_0048.py | amado-developer/ReadHub-RestfulAPI | 8d8b445c4a84810d52bbf78a2593e0b48351590c | [
"MIT"
] | null | null | null | inventories/migrations/0016_auto_20200531_0048.py | amado-developer/ReadHub-RestfulAPI | 8d8b445c4a84810d52bbf78a2593e0b48351590c | [
"MIT"
] | 7 | 2021-03-19T03:09:53.000Z | 2022-01-13T02:48:44.000Z | inventories/migrations/0016_auto_20200531_0048.py | amado-developer/ReadHub-RestfulAPI | 8d8b445c4a84810d52bbf78a2593e0b48351590c | [
"MIT"
] | null | null | null | # Generated by Django 3.0.6 on 2020-05-31 00:48
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('digital_books', '0007_auto_20200527_2137'),
('inventories', '0015_auto_20200530_0500'),
]
operations = [
... | 26.714286 | 125 | 0.659537 |
f25ea43b5f1322a214f8addefbb58d7f324a6433 | 19,396 | py | Python | tiempo_deshima/interface.py | Stefanie-B/DESHIMAmodel | bcb695ea64078f2a61cf9495e18909e29e1f2a98 | [
"MIT"
] | 2 | 2020-09-05T15:22:32.000Z | 2020-10-01T04:52:39.000Z | tiempo_deshima/interface.py | deshima-dev/tiempo_deshima | bcb695ea64078f2a61cf9495e18909e29e1f2a98 | [
"MIT"
] | 6 | 2020-10-30T17:13:07.000Z | 2021-07-28T12:13:15.000Z | tiempo_deshima/interface.py | Stefanie-B/DESHIMAmodel | bcb695ea64078f2a61cf9495e18909e29e1f2a98 | [
"MIT"
] | null | null | null | """
This module allows users to execute funtioncs in signal_transmitter, while providing default values so not all values need to be set manually.
"""
import numpy as np
#import signal_transmitter as st
#import DESHIMA.MKID.filterbank as ft
from pathlib import Path
from . import signal_transmitter as st
from .DESHIM... | 52.421622 | 537 | 0.657352 |
222d9fdee9ee65ebc280e66218d1f4f7df620dc6 | 11,854 | py | Python | Server_and_client/ML_Server.py | tomercahal/Statispic | a15cd664fdecff82ff0ab425a9f51134525be0fa | [
"MIT"
] | 1 | 2020-04-02T09:19:36.000Z | 2020-04-02T09:19:36.000Z | Server_and_client/ML_Server.py | tomercahal/Statispic | a15cd664fdecff82ff0ab425a9f51134525be0fa | [
"MIT"
] | null | null | null | Server_and_client/ML_Server.py | tomercahal/Statispic | a15cd664fdecff82ff0ab425a9f51134525be0fa | [
"MIT"
] | null | null | null | #For the ML
#from keras.models import load_model
from tensorflow.keras.models import load_model
import numpy as np
# For the rest of the server
import socket
import threading
import sys
import zipfile
import os
import cv2 as cv
from cryptography.fernet import Fernet # Used to create a key, encrypt and dec... | 56.990385 | 131 | 0.655812 |
09cbf5fdbf02b965508fb3950fafce1223ab2c4c | 1,035 | py | Python | payloads/keylogger.py | redcode-labs/poXSSon | 7046fac15e54e05a73d7d46a00916161d9f36cca | [
"ISC"
] | 18 | 2022-02-20T13:27:36.000Z | 2022-03-23T21:35:13.000Z | payloads/keylogger.py | redcode-labs/poXSSon | 7046fac15e54e05a73d7d46a00916161d9f36cca | [
"ISC"
] | 1 | 2022-02-20T13:37:20.000Z | 2022-02-21T14:38:26.000Z | payloads/keylogger.py | redcode-labs/poXSSon | 7046fac15e54e05a73d7d46a00916161d9f36cca | [
"ISC"
] | 2 | 2022-02-20T13:35:56.000Z | 2022-02-21T11:59:15.000Z | #!/usr/bin/python3.7
import socket
import http.server
def local_ip():
try:
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.connect(("8.8.8.8", 80))
return s.getsockname()[0]
except:
return "N/A"
name="keylogger"
description="Captures keystrokes and sends them to an externa... | 24.642857 | 91 | 0.629952 |
ce3db34940e8819e06eab7d5bfd8e330bee3b0bb | 951 | py | Python | sdk/eventhub/azure-eventhubs/tests/test_iothub_receive.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | sdk/eventhub/azure-eventhubs/tests/test_iothub_receive.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | sdk/eventhub/azure-eventhubs/tests/test_iothub_receive.py | xiafu-msft/azure-sdk-for-python | 4d9560cfd519ee60667f3cc2f5295a58c18625db | [
"MIT"
] | null | null | null | #-------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#--------------------------------------------------------------------------
import os
i... | 36.576923 | 89 | 0.60673 |
1cc59c67e70b29404f44c635eaea09da7ec4e893 | 783 | py | Python | test/test_go_isolation_rootfs.py | afxcn/unit | a336928e1027af92d0c9bb2ccb369a3f9b53abae | [
"Apache-2.0"
] | 10 | 2018-11-14T10:58:41.000Z | 2021-12-11T01:43:51.000Z | test/test_go_isolation_rootfs.py | afxcn/unit | a336928e1027af92d0c9bb2ccb369a3f9b53abae | [
"Apache-2.0"
] | 1 | 2021-02-07T06:35:24.000Z | 2021-02-07T06:35:24.000Z | test/test_go_isolation_rootfs.py | afxcn/unit | a336928e1027af92d0c9bb2ccb369a3f9b53abae | [
"Apache-2.0"
] | 3 | 2018-10-31T12:10:05.000Z | 2019-02-14T14:09:48.000Z | import os
import pytest
from unit.applications.lang.go import TestApplicationGo
class TestGoIsolationRootfs(TestApplicationGo):
prerequisites = {'modules': {'go': 'all'}}
def test_go_isolation_rootfs_chroot(self, is_su, temp_dir):
if not is_su:
pytest.skip('requires root')
if o... | 26.1 | 67 | 0.618135 |
123ac6e522accb44d3043d8dea5ff72b38429410 | 5,700 | py | Python | sw_excel_parser/engines.py | telminov/sw-excel-parser | 5a9aa8eb8b6c3af2083612114e42e38598ce7e7b | [
"MIT"
] | null | null | null | sw_excel_parser/engines.py | telminov/sw-excel-parser | 5a9aa8eb8b6c3af2083612114e42e38598ce7e7b | [
"MIT"
] | 4 | 2017-12-07T05:43:03.000Z | 2017-12-14T02:41:03.000Z | sw_excel_parser/engines.py | telminov/sw-excel-parser | 5a9aa8eb8b6c3af2083612114e42e38598ce7e7b | [
"MIT"
] | null | null | null | from collections import OrderedDict
from itertools import chain
from typing import List, Dict, Optional, Set
import xlrd
from xlrd.sheet import Sheet
class BaseEngine:
item = None
def __init__(self, workbook: xlrd.Book = None, file_contents: bytes = None, *args, **kwargs):
self.workbook = None
... | 31.491713 | 110 | 0.583509 |
68b5f96342b7d0fa1f982c3962326401240505ee | 7,477 | py | Python | idaes/core/util/tests/test_model_diagnostics.py | CATER-UCF/idaes-pse | afccbd43e56dc39d63542b4d400ac027b0ccbe84 | [
"RSA-MD"
] | null | null | null | idaes/core/util/tests/test_model_diagnostics.py | CATER-UCF/idaes-pse | afccbd43e56dc39d63542b4d400ac027b0ccbe84 | [
"RSA-MD"
] | null | null | null | idaes/core/util/tests/test_model_diagnostics.py | CATER-UCF/idaes-pse | afccbd43e56dc39d63542b4d400ac027b0ccbe84 | [
"RSA-MD"
] | 1 | 2022-03-17T11:08:43.000Z | 2022-03-17T11:08:43.000Z | #################################################################################
# The Institute for the Design of Advanced Energy Systems Integrated Platform
# Framework (IDAES IP) was produced under the DOE Institute for the
# Design of Advanced Energy Systems (IDAES), and is copyright (c) 2018-2021
# by the softwar... | 29.788845 | 93 | 0.679684 |
08eab65ea5450a3d895d4fbb35b0897fce239850 | 1,323 | py | Python | apps/dashboard/utilities.py | SteinOveHelset/minutos | 73cdcb44409f97b05680c6a048f80eb4bd3f1f46 | [
"MIT"
] | 23 | 2020-11-19T19:33:34.000Z | 2022-03-02T15:43:08.000Z | apps/dashboard/utilities.py | SteinOveHelset/minutos | 73cdcb44409f97b05680c6a048f80eb4bd3f1f46 | [
"MIT"
] | 1 | 2021-04-03T18:02:50.000Z | 2021-04-03T18:02:50.000Z | apps/dashboard/utilities.py | SteinOveHelset/minutos | 73cdcb44409f97b05680c6a048f80eb4bd3f1f46 | [
"MIT"
] | 2 | 2021-01-23T02:06:59.000Z | 2021-09-09T04:58:09.000Z | # Import Python
from datetime import datetime
# Models
from apps.project.models import Entry
# Utility functions
def get_time_for_user_and_date(team, user, date):
entries = Entry.objects.filter(team=team, created_by=user, created_at__date=date, is_tracked=True)
return sum(entry.minutes for entry in entri... | 38.911765 | 156 | 0.792139 |
28ac3ec6248e281db810942a1c6e3e508f25da22 | 6,040 | py | Python | sqlalchemy_filters/models.py | ConnectHolland/sqlalchemy-filters | fbc3269094dae9fc48fa3f080b4881477709e8da | [
"Apache-2.0"
] | null | null | null | sqlalchemy_filters/models.py | ConnectHolland/sqlalchemy-filters | fbc3269094dae9fc48fa3f080b4881477709e8da | [
"Apache-2.0"
] | null | null | null | sqlalchemy_filters/models.py | ConnectHolland/sqlalchemy-filters | fbc3269094dae9fc48fa3f080b4881477709e8da | [
"Apache-2.0"
] | null | null | null | from sqlalchemy.exc import InvalidRequestError
from sqlalchemy.inspection import inspect
from sqlalchemy.orm.mapper import Mapper
from sqlalchemy.util import symbol
import types
from .exceptions import BadQuery, FieldNotFound, BadSpec
class Field(object):
def __init__(self, model, field_name):
self.mode... | 31.134021 | 126 | 0.654801 |
e4f53bc6043aab5ef105ada19f5047b056755ade | 1,805 | py | Python | python/helpers/pydev/pydev_tests_python/test_pydevd_io.py | alexey-anufriev/intellij-community | ffcd46f14e630acdefcc76e2bfc7c43d2449013a | [
"Apache-2.0"
] | 2 | 2019-04-28T07:48:50.000Z | 2020-12-11T14:18:08.000Z | python/helpers/pydev/pydev_tests_python/test_pydevd_io.py | alexey-anufriev/intellij-community | ffcd46f14e630acdefcc76e2bfc7c43d2449013a | [
"Apache-2.0"
] | 1 | 2020-07-30T19:04:47.000Z | 2020-07-30T19:04:47.000Z | python/helpers/pydev/pydev_tests_python/test_pydevd_io.py | bradleesand/intellij-community | 750ff9c10333c9c1278c00dbe8d88c877b1b9749 | [
"Apache-2.0"
] | 1 | 2020-10-15T05:56:42.000Z | 2020-10-15T05:56:42.000Z | from _pydevd_bundle.pydevd_io import IORedirector
from _pydevd_bundle.pydevd_comm import NetCommandFactory
import pytest
def test_io_redirector():
class MyRedirection1(object):
encoding = 'foo'
class MyRedirection2(object):
pass
my_redirector = IORedirector(MyRedirection1(), MyRedirecti... | 25.422535 | 90 | 0.692521 |
3f0815ae203c73e2c6ae98751aeac2234ba74563 | 80 | py | Python | src/pyim/cis/callers/__init__.py | jrderuiter/pyim | e767c3bd14e0d0c9b3d0ff3482c19a8e1a9c61d4 | [
"MIT"
] | null | null | null | src/pyim/cis/callers/__init__.py | jrderuiter/pyim | e767c3bd14e0d0c9b3d0ff3482c19a8e1a9c61d4 | [
"MIT"
] | 1 | 2018-05-11T02:46:09.000Z | 2018-05-11T02:46:09.000Z | src/pyim/cis/callers/__init__.py | jrderuiter/pyim | e767c3bd14e0d0c9b3d0ff3482c19a8e1a9c61d4 | [
"MIT"
] | 1 | 2018-04-17T16:08:34.000Z | 2018-04-17T16:08:34.000Z | from .base import CisCaller, CisCallerCommand
from .cimpl import CimplCisCaller
| 26.666667 | 45 | 0.85 |
2a229e300b0e4e0c451789a6f0b05c492efab0e6 | 4,954 | py | Python | openprocurement/auctions/swiftsure/tests/lot.py | bdmbdsm/openprocurement.auctions.swiftsure | f5b93555eb12212c69c8168f861376eae85f4648 | [
"Apache-2.0"
] | null | null | null | openprocurement/auctions/swiftsure/tests/lot.py | bdmbdsm/openprocurement.auctions.swiftsure | f5b93555eb12212c69c8168f861376eae85f4648 | [
"Apache-2.0"
] | null | null | null | openprocurement/auctions/swiftsure/tests/lot.py | bdmbdsm/openprocurement.auctions.swiftsure | f5b93555eb12212c69c8168f861376eae85f4648 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import unittest
from openprocurement.auctions.core.tests.base import snitch
from openprocurement.auctions.core.tests.lot import AuctionLotResourceTestMixin, AuctionLotProcessTestMixin
from openprocurement.auctions.core.tests.blanks.lot_blanks import (
# AuctionLotFeatureResourceTest
auc... | 33.931507 | 107 | 0.571256 |
e6c584e0befef0b7d8541b91b80019ed095d79bb | 157 | py | Python | articlevue/routers.py | wesleymutwiri/articlevue | 04dbe278bea8e96dbc95bb1c986dbce025c0957a | [
"MIT"
] | null | null | null | articlevue/routers.py | wesleymutwiri/articlevue | 04dbe278bea8e96dbc95bb1c986dbce025c0957a | [
"MIT"
] | null | null | null | articlevue/routers.py | wesleymutwiri/articlevue | 04dbe278bea8e96dbc95bb1c986dbce025c0957a | [
"MIT"
] | null | null | null | from rest_framework import routers
from articles.viewsets import ArticleViewSet
router = routers.DefaultRouter()
router.register(r'articles',ArticleViewSet) | 31.4 | 44 | 0.853503 |
adf06274045e7a2d1567389e357a0a5d22561038 | 2,117 | py | Python | tests/settings.py | yunojuno/django-expiring-links | 1f8b98544327ce1e5ca4a9a2a3e0ca6e8dd33f48 | [
"MIT"
] | null | null | null | tests/settings.py | yunojuno/django-expiring-links | 1f8b98544327ce1e5ca4a9a2a3e0ca6e8dd33f48 | [
"MIT"
] | null | null | null | tests/settings.py | yunojuno/django-expiring-links | 1f8b98544327ce1e5ca4a9a2a3e0ca6e8dd33f48 | [
"MIT"
] | null | null | null | DEBUG = True
DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": "test.db",
}
}
INSTALLED_APPS = (
"django.contrib.admin",
"django.contrib.auth",
"django.contrib.sessions",
"django.contrib.contenttypes",
"django.contrib.messages",
"django.contrib.... | 24.905882 | 95 | 0.600378 |
cc309b1675eb85de43c0e67d3340f6af89529131 | 4,720 | py | Python | pedurma/preview_note_layer.py | Esukhia/pedurma | 334b5957db30f514d396bd9defc9e9381f5b290b | [
"MIT"
] | null | null | null | pedurma/preview_note_layer.py | Esukhia/pedurma | 334b5957db30f514d396bd9defc9e9381f5b290b | [
"MIT"
] | null | null | null | pedurma/preview_note_layer.py | Esukhia/pedurma | 334b5957db30f514d396bd9defc9e9381f5b290b | [
"MIT"
] | 1 | 2021-11-04T07:04:05.000Z | 2021-11-04T07:04:05.000Z | import re
from pathlib import Path
from uuid import uuid4
from pedurma.utils import to_yaml
def get_note_layer(note_annotation):
note_layer = {
"id": uuid4().hex,
"annotation_type": "PedurmaNote",
"revision": "00001",
"annotations": note_annotation,
}
return note_layer
d... | 32.777778 | 105 | 0.56822 |
1660be13574adc9918303a3b841f86b8ffecc4d8 | 26,786 | py | Python | tensorflow/python/framework/function_test.py | RMORIOKA/tensorflow | 6886eb9c73940fd3b4dfadc3d6964ae9aa71eef6 | [
"Apache-2.0"
] | null | null | null | tensorflow/python/framework/function_test.py | RMORIOKA/tensorflow | 6886eb9c73940fd3b4dfadc3d6964ae9aa71eef6 | [
"Apache-2.0"
] | null | null | null | tensorflow/python/framework/function_test.py | RMORIOKA/tensorflow | 6886eb9c73940fd3b4dfadc3d6964ae9aa71eef6 | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 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... | 29.928492 | 80 | 0.608004 |
178ed631f162a62ed2fc2c01c6e309f4d014545b | 3,019 | py | Python | backend/src/dealer/model/table.py | codepals-org/poker | 8b58df2ff4d3d9799c42652a9d6942d8ec6b3707 | [
"MIT"
] | 2 | 2020-11-07T16:37:14.000Z | 2020-11-07T17:11:24.000Z | backend/src/dealer/model/table.py | codepals-org/poker | 8b58df2ff4d3d9799c42652a9d6942d8ec6b3707 | [
"MIT"
] | 7 | 2020-11-07T14:04:06.000Z | 2020-11-11T11:49:13.000Z | backend/src/dealer/model/table.py | codepals-org/poker | 8b58df2ff4d3d9799c42652a9d6942d8ec6b3707 | [
"MIT"
] | 1 | 2020-11-08T13:00:27.000Z | 2020-11-08T13:00:27.000Z | from .player import Player, PlayerList
from typing import List
from enum import Enum, auto
import random
from typing import List
import logging
CARDS = [
# Card Abbreviations:
# https://commons.wikimedia.org/wiki/Category:SVG_playing_cards
"2H","3H","4H","5H","6H","7H","8H","9H","10H","JH","QH","KH",... | 35.104651 | 77 | 0.596555 |
336689372db2a2331924ca3fa154281a420cffb5 | 3,995 | py | Python | jumpscale/packages/owncloud/bottle/api.py | threefoldtech/owncloud_deployer | d652d54a35d7a964f5f1b50ffbec0855ffd6f02f | [
"Apache-2.0"
] | null | null | null | jumpscale/packages/owncloud/bottle/api.py | threefoldtech/owncloud_deployer | d652d54a35d7a964f5f1b50ffbec0855ffd6f02f | [
"Apache-2.0"
] | null | null | null | jumpscale/packages/owncloud/bottle/api.py | threefoldtech/owncloud_deployer | d652d54a35d7a964f5f1b50ffbec0855ffd6f02f | [
"Apache-2.0"
] | null | null | null | import csv
from jumpscale.loader import j
from jumpscale.packages.auth.bottle.auth import admin_only, get_user_info, login_required
from jumpscale.packages.owncloud.models.users import UserStatus
from jumpscale.packages.owncloud.models import deployment_model
from bottle import Bottle, request, HTTPResponse, static_f... | 30.730769 | 115 | 0.665081 |
67f36500657d7757009a2cbcee518899f03906bf | 2,440 | py | Python | clutch/schema/request/torrent/accessor.py | ExeArco/clutch | 223244b1294b496ba16c8a2433eb453cce593a62 | [
"MIT"
] | 34 | 2018-04-14T12:53:07.000Z | 2021-08-21T12:52:23.000Z | clutch/schema/request/torrent/accessor.py | ExeArco/clutch | 223244b1294b496ba16c8a2433eb453cce593a62 | [
"MIT"
] | 18 | 2018-04-30T20:32:44.000Z | 2021-10-03T15:24:33.000Z | clutch/schema/request/torrent/accessor.py | ExeArco/clutch | 223244b1294b496ba16c8a2433eb453cce593a62 | [
"MIT"
] | 10 | 2019-01-31T20:21:13.000Z | 2021-10-03T10:01:26.000Z | from typing import Optional, Set
from pydantic import BaseModel, Field, validator
from clutch.compat import Literal
from clutch.network.rpc.convert import to_hyphen, to_camel
from clutch.schema.user.method.shared import IdsArg
AccessorFieldRequest = Literal[
"activityDate",
"addedDate",
"bandwidthPriorit... | 22.592593 | 58 | 0.597541 |
3e867f80d5a19232b064a8d79017691007f5df65 | 469 | py | Python | kubernetes_typed/client/models/apiextensions_v1beta1_webhook_client_config.py | sobolevn/kubernetes-typed | 5f0a770631c73a9831fbeaeebac188e8f4a52c54 | [
"Apache-2.0"
] | 22 | 2020-12-10T13:06:02.000Z | 2022-02-13T21:58:15.000Z | kubernetes_typed/client/models/apiextensions_v1beta1_webhook_client_config.py | sobolevn/kubernetes-typed | 5f0a770631c73a9831fbeaeebac188e8f4a52c54 | [
"Apache-2.0"
] | 4 | 2021-03-08T07:06:12.000Z | 2022-03-29T23:41:45.000Z | kubernetes_typed/client/models/apiextensions_v1beta1_webhook_client_config.py | sobolevn/kubernetes-typed | 5f0a770631c73a9831fbeaeebac188e8f4a52c54 | [
"Apache-2.0"
] | 2 | 2021-09-05T19:18:28.000Z | 2022-03-14T02:56:17.000Z | # Code generated by `typeddictgen`. DO NOT EDIT.
"""ApiextensionsV1beta1WebhookClientConfigDict generated type."""
from typing import TypedDict
from kubernetes_typed.client import ApiextensionsV1beta1ServiceReferenceDict
ApiextensionsV1beta1WebhookClientConfigDict = TypedDict(
"ApiextensionsV1beta1WebhookClientCo... | 29.3125 | 76 | 0.763326 |
18aba273aabf87a58d4f4ee22cc8231a59082c8e | 9,199 | py | Python | tensorflow_graphics/geometry/representation/mesh/normals.py | drebain/graphics | c84b7599d1f8a55ccbdd589c1a845494c17c2784 | [
"Apache-2.0"
] | 1 | 2021-03-10T15:15:43.000Z | 2021-03-10T15:15:43.000Z | tensorflow_graphics/geometry/representation/mesh/normals.py | drebain/graphics | c84b7599d1f8a55ccbdd589c1a845494c17c2784 | [
"Apache-2.0"
] | null | null | null | tensorflow_graphics/geometry/representation/mesh/normals.py | drebain/graphics | c84b7599d1f8a55ccbdd589c1a845494c17c2784 | [
"Apache-2.0"
] | 1 | 2019-10-10T06:16:30.000Z | 2019-10-10T06:16:30.000Z | #Copyright 2019 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, so... | 39.144681 | 80 | 0.678769 |
13fd212eb7923e35a380b483a671761992aaef1b | 4,090 | py | Python | helix/engines.py | phantomii/helix | 88a7270f20554943fa2cb22e1432d0f653ba9ae7 | [
"Apache-2.0"
] | null | null | null | helix/engines.py | phantomii/helix | 88a7270f20554943fa2cb22e1432d0f653ba9ae7 | [
"Apache-2.0"
] | null | null | null | helix/engines.py | phantomii/helix | 88a7270f20554943fa2cb22e1432d0f653ba9ae7 | [
"Apache-2.0"
] | null | null | null | # vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright 2016-2017 Eugene Frolov <eugene@frolov.net.ru>
#
# 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
#
# ... | 28.013699 | 78 | 0.685575 |
02725751cb6694a774cd224c53a0bea6b8dc680b | 12,739 | py | Python | python/paddle/__init__.py | Joejiong/Paddle | 6d6ea569dc1e9ff15fdc774c79276b0f79444f5e | [
"Apache-2.0"
] | 1 | 2021-02-08T02:09:19.000Z | 2021-02-08T02:09:19.000Z | python/paddle/__init__.py | Joejiong/Paddle | 6d6ea569dc1e9ff15fdc774c79276b0f79444f5e | [
"Apache-2.0"
] | 1 | 2020-09-22T08:54:49.000Z | 2020-09-22T11:44:09.000Z | python/paddle/__init__.py | Joejiong/Paddle | 6d6ea569dc1e9ff15fdc774c79276b0f79444f5e | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... | 44.079585 | 90 | 0.81278 |
7cdbe5c5563fc4649f21b2c662a3f27ea1cdec9c | 12,317 | py | Python | src/zero_sum/plots.py | sbhambr1/MarkovGameSolvers | cd5366faf2082e467dc0ef04c52c5b5b000e9176 | [
"MIT"
] | null | null | null | src/zero_sum/plots.py | sbhambr1/MarkovGameSolvers | cd5366faf2082e467dc0ef04c52c5b5b000e9176 | [
"MIT"
] | null | null | null | src/zero_sum/plots.py | sbhambr1/MarkovGameSolvers | cd5366faf2082e467dc0ef04c52c5b5b000e9176 | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
import numpy as np
strategies = np.array([
[
#gamma = 0.5
[-9.563336572173805, -8.193748914742143, -10.270220524396596, -3.0000000000000004, -7.553846153846153, -7.904142011834319, -3.0, -3.0, -3.0, -3.0],
[-7.378487640724603, -3.3197512739857147, -7.49614268... | 41.47138 | 218 | 0.697735 |
0b1ccb2de9b985f25357a45fe5fd16e2eab72b61 | 400 | py | Python | webviz_config/_user_data_dir.py | ivarbje/webviz-config | d1096789e1b0354dbef44555ab79c8a88dbc837c | [
"MIT"
] | null | null | null | webviz_config/_user_data_dir.py | ivarbje/webviz-config | d1096789e1b0354dbef44555ab79c8a88dbc837c | [
"MIT"
] | null | null | null | webviz_config/_user_data_dir.py | ivarbje/webviz-config | d1096789e1b0354dbef44555ab79c8a88dbc837c | [
"MIT"
] | null | null | null | import sys
from pathlib import Path
def user_data_dir() -> Path:
"""Returns platform specific path to store user application data
"""
if sys.platform == "win32":
return Path.home() / "Application Data" / "webviz"
if sys.platform == "darwin":
return Path.home() / "Library" / "Applicat... | 25 | 73 | 0.625 |
6185316b5d2f45e7cbe31bea0d25e1e49b81ab73 | 1,000 | py | Python | ch01-05/04_01-magicians.py | remotephone/pythoncrashcourse | 837d05c5ef4976621bd2206328254749a71d60ff | [
"Apache-2.0"
] | null | null | null | ch01-05/04_01-magicians.py | remotephone/pythoncrashcourse | 837d05c5ef4976621bd2206328254749a71d60ff | [
"Apache-2.0"
] | null | null | null | ch01-05/04_01-magicians.py | remotephone/pythoncrashcourse | 837d05c5ef4976621bd2206328254749a71d60ff | [
"Apache-2.0"
] | null | null | null | magicians = ['alice', 'david', 'carolina']
for magician in magicians:
print(magician)
print("\n====================")
magicians = ['alice', 'david', 'carolina']
for magician in magicians:
print(magician.title() + ", that was a great trick!")
print("I can't wait to see your next trick, " + magician.title() ... | 26.315789 | 77 | 0.624 |
c4def8a81d6b41d37f98fbb832fa1925efbaee35 | 1,108 | py | Python | base_scripts/base_train.py | tugot17/Pytorch-Lightning-Templates- | 36ec7ac8f1699e4e266f0d4f08df67a2873ba0f8 | [
"MIT"
] | 2 | 2020-11-04T19:14:51.000Z | 2021-03-04T13:14:17.000Z | base_scripts/base_train.py | tugot17/Pytorch-Lightning-Templates- | 36ec7ac8f1699e4e266f0d4f08df67a2873ba0f8 | [
"MIT"
] | null | null | null | base_scripts/base_train.py | tugot17/Pytorch-Lightning-Templates- | 36ec7ac8f1699e4e266f0d4f08df67a2873ba0f8 | [
"MIT"
] | null | null | null | import os
import pytorch_lightning as pl
from pytorch_lightning import Trainer
from pytorch_lightning.callbacks import ModelCheckpoint
from pytorch_lightning.callbacks.early_stopping import EarlyStopping
from pytorch_lightning.loggers import WandbLogger
if __name__ == "__main__":
dm = ...
model = ...
#... | 23.574468 | 74 | 0.665162 |
2b203a81f5958cf91c95e1e090a7eda9bbff514f | 29,527 | py | Python | python/client/azure/mgmt/redhatopenshift/v2021_01_31_preview/models/_models_py3.py | Thanonchai/ARO-RP | 823d357376c6c1ce38ce026acadca6103a0fe2c9 | [
"Apache-2.0"
] | null | null | null | python/client/azure/mgmt/redhatopenshift/v2021_01_31_preview/models/_models_py3.py | Thanonchai/ARO-RP | 823d357376c6c1ce38ce026acadca6103a0fe2c9 | [
"Apache-2.0"
] | 1 | 2021-01-22T16:19:04.000Z | 2021-01-22T16:19:04.000Z | python/client/azure/mgmt/redhatopenshift/v2021_01_31_preview/models/_models_py3.py | troy0820/ARO-RP | 32dff228210270a02dcd2a66d8c642da53c4e120 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft and contributors. 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 ... | 39.633557 | 283 | 0.66827 |
c1b7bd4faff6f6fef82a82bf91cebd837356d2dc | 989 | py | Python | backend/api/__init__.py | EylonKoenig/LS_Technology_interview_assessment | 6911391fb86a6e2fca97af86580b2a0d58550baf | [
"MIT"
] | null | null | null | backend/api/__init__.py | EylonKoenig/LS_Technology_interview_assessment | 6911391fb86a6e2fca97af86580b2a0d58550baf | [
"MIT"
] | null | null | null | backend/api/__init__.py | EylonKoenig/LS_Technology_interview_assessment | 6911391fb86a6e2fca97af86580b2a0d58550baf | [
"MIT"
] | null | null | null | import os
from flask import Flask
from flask_cors import CORS
from flask_mongoengine import MongoEngine
from flask_jwt_extended import JWTManager
from datetime import timedelta
# from flask import Response, request
db = MongoEngine()
def create_app():
app = Flask(__name__)
CORS(app, resources={r"/*": {"o... | 21.977778 | 64 | 0.690597 |
c5031c8dd8c7d4ac4badfcceeb7a31cf6b95383d | 506 | py | Python | tests/TestCaseTest.py | tetrohed/pyst | a7906c356802169051ce15db66d204e78f24d66b | [
"MIT"
] | null | null | null | tests/TestCaseTest.py | tetrohed/pyst | a7906c356802169051ce15db66d204e78f24d66b | [
"MIT"
] | null | null | null | tests/TestCaseTest.py | tetrohed/pyst | a7906c356802169051ce15db66d204e78f24d66b | [
"MIT"
] | null | null | null | if __name__ == '__main__':
import sys
from os import path
sys.path.append(path.join(path.dirname(__file__), '..'))
from Pyst import TestCase, WasRun
class TestCaseTest(TestCase):
def setUp(self):
self.test = WasRun('testMethod')
def testRunning(self):
self.test.run()
... | 21.083333 | 60 | 0.632411 |
31db29ccb37473f8381c9a78f8ab253aad35d85b | 1,130 | py | Python | tests/storage/cases/test_KT1JEL7ASRFP98Ma9dnLswaCnTbtZr6aPez8.py | juztin/pytezos-1 | 7e608ff599d934bdcf129e47db43dbdb8fef9027 | [
"MIT"
] | 1 | 2021-05-20T16:52:08.000Z | 2021-05-20T16:52:08.000Z | tests/storage/cases/test_KT1JEL7ASRFP98Ma9dnLswaCnTbtZr6aPez8.py | juztin/pytezos-1 | 7e608ff599d934bdcf129e47db43dbdb8fef9027 | [
"MIT"
] | 1 | 2020-12-30T16:44:56.000Z | 2020-12-30T16:44:56.000Z | tests/storage/cases/test_KT1JEL7ASRFP98Ma9dnLswaCnTbtZr6aPez8.py | tqtezos/pytezos | a4ac0b022d35d4c9f3062609d8ce09d584b5faa8 | [
"MIT"
] | 1 | 2022-03-20T19:01:00.000Z | 2022-03-20T19:01:00.000Z | from unittest import TestCase
from tests import get_data
from pytezos.michelson.converter import build_schema, decode_micheline, encode_micheline, micheline_to_michelson
class StorageTestKT1JEL7ASRFP98Ma9dnLswaCnTbtZr6aPez8(TestCase):
@classmethod
def setUpClass(cls):
cls.maxDiff = None
cls.... | 40.357143 | 112 | 0.748673 |
35c8fe7d00c96a573757764ebafe9669144bd599 | 975 | py | Python | fixture/application.py | LenaRad/python_training | 0d3909f6c30553852523c5e9222b31ad63d90fec | [
"Apache-2.0"
] | null | null | null | fixture/application.py | LenaRad/python_training | 0d3909f6c30553852523c5e9222b31ad63d90fec | [
"Apache-2.0"
] | null | null | null | fixture/application.py | LenaRad/python_training | 0d3909f6c30553852523c5e9222b31ad63d90fec | [
"Apache-2.0"
] | null | null | null | from selenium import webdriver
from fixture.session import SessionHelper
from fixture.group import GroupHelper
from fixture.contact import ContactHelper
class Application:
def __init__(self, browser, base_url):
if browser == "firefox":
self.wd = webdriver.Firefox(capabilities={"marionette": Fa... | 26.351351 | 75 | 0.606154 |
409fcf1321996e20e20cc7ac5965eeb813c73c55 | 5,649 | py | Python | packages/models-library/src/models_library/rest_pagination.py | sanderegg/osparc-simcore | 13560a554c52b07e2aba67f77baaf4d5ba9edb90 | [
"MIT"
] | null | null | null | packages/models-library/src/models_library/rest_pagination.py | sanderegg/osparc-simcore | 13560a554c52b07e2aba67f77baaf4d5ba9edb90 | [
"MIT"
] | 55 | 2018-05-15T09:47:00.000Z | 2022-03-31T06:56:50.000Z | packages/models-library/src/models_library/rest_pagination.py | odeimaiz/osparc-simcore | 71c2fc58dcfe067487dcd75cb70298a4d6237e97 | [
"MIT"
] | 1 | 2020-04-22T15:06:58.000Z | 2020-04-22T15:06:58.000Z | from typing import Generic, List, Optional, TypeVar
from pydantic import (
AnyHttpUrl,
BaseModel,
Extra,
Field,
NonNegativeInt,
PositiveInt,
validator,
)
from pydantic.generics import GenericModel
DEFAULT_NUMBER_OF_ITEMS_PER_PAGE = 20
def monkey_patch_pydantic_url_regex() -> None:
# ... | 32.096591 | 117 | 0.506992 |
fb8bfc144ef36a0d4f926e6b570a842f1a7a66ca | 2,957 | py | Python | backend/corpora/common/utils/db_utils.py | isabella232/corpora-data-portal | 09ed3cad3165f8b0db854b76404e0d5d0ea0b7d9 | [
"MIT"
] | null | null | null | backend/corpora/common/utils/db_utils.py | isabella232/corpora-data-portal | 09ed3cad3165f8b0db854b76404e0d5d0ea0b7d9 | [
"MIT"
] | 1 | 2021-02-23T22:56:13.000Z | 2021-02-23T22:56:13.000Z | backend/corpora/common/utils/db_utils.py | isabella232/corpora-data-portal | 09ed3cad3165f8b0db854b76404e0d5d0ea0b7d9 | [
"MIT"
] | null | null | null | import functools
import logging
import typing
from contextlib import contextmanager
from sqlalchemy.exc import SQLAlchemyError
from .exceptions import CorporaException
from ..corpora_orm import Base, DBSessionMaker
logger = logging.getLogger(__name__)
class DbUtils:
"""DbUtils as a singleton to avoid creating ... | 27.37963 | 115 | 0.595536 |
1cc6c0247a3d41cae0569d2ce12d2d8ff1fec709 | 595 | py | Python | code/pandas/pd_duplicated.py | yuguiyang/python_demo | 1be2406bfc920e22a0f92bf10d9a3665984067ba | [
"Apache-2.0"
] | null | null | null | code/pandas/pd_duplicated.py | yuguiyang/python_demo | 1be2406bfc920e22a0f92bf10d9a3665984067ba | [
"Apache-2.0"
] | null | null | null | code/pandas/pd_duplicated.py | yuguiyang/python_demo | 1be2406bfc920e22a0f92bf10d9a3665984067ba | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Tue Aug 15 16:03:44 2017
@author: hexo
"""
import pandas as pd
import numpy as np
data = pd.DataFrame({'k1': ['one'] * 3 + ['two'] * 4,
'k2': [1, 1, 2, 3, 3, 4, 4]})
data
data.duplicated()
data.drop_duplicates()
data['v1'] = range(7)
data.drop_duplicates([... | 14.875 | 53 | 0.573109 |
0f106d2e9b61e5a496d7cecc5027dd1ac994a78c | 10,496 | py | Python | electrum_grlc/gui/qt/utxo_list.py | garlico-in/electrum-grlc | 06ba1b330ef354ca575d0688cbd2d64a90fd276e | [
"MIT"
] | null | null | null | electrum_grlc/gui/qt/utxo_list.py | garlico-in/electrum-grlc | 06ba1b330ef354ca575d0688cbd2d64a90fd276e | [
"MIT"
] | null | null | null | electrum_grlc/gui/qt/utxo_list.py | garlico-in/electrum-grlc | 06ba1b330ef354ca575d0688cbd2d64a90fd276e | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Copyright (C) 2015 Thomas Voegtlin
#
# 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... | 46.648889 | 120 | 0.657298 |
e9fad523e9374bfeb845f19f6412e635aed4df7e | 3,812 | py | Python | haco/DIDrive_core/simulators/srunner/scenariomanager/actorcontrols/npc_vehicle_control.py | decisionforce/HACO | ebd1dc49598e6ae2704e58c053cc35f2d9e28429 | [
"Apache-2.0"
] | 21 | 2022-02-15T10:11:54.000Z | 2022-03-24T17:44:29.000Z | haco/DIDrive_core/simulators/srunner/scenariomanager/actorcontrols/npc_vehicle_control.py | decisionforce/HACO | ebd1dc49598e6ae2704e58c053cc35f2d9e28429 | [
"Apache-2.0"
] | null | null | null | haco/DIDrive_core/simulators/srunner/scenariomanager/actorcontrols/npc_vehicle_control.py | decisionforce/HACO | ebd1dc49598e6ae2704e58c053cc35f2d9e28429 | [
"Apache-2.0"
] | 3 | 2022-02-22T11:11:43.000Z | 2022-03-17T17:58:44.000Z | #!/usr/bin/env python
# Copyright (c) 2020 Intel Corporation
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
This module provides an example control for vehicles
"""
import math
import carla
from haco.DIDrive_core.utils.simulator_utils.carla_... | 36.304762 | 108 | 0.663169 |
60ba267a6bebd580aeedf342a3ed46329af52c54 | 7,360 | py | Python | models/market1501/generate_resnet50.py | zhunzhong07/caffe-reid | 7468850ab80858006bd65bcc6203e0581c83aea9 | [
"BSD-2-Clause"
] | 3 | 2017-03-16T07:42:31.000Z | 2021-07-15T22:09:46.000Z | models/market1501/generate_resnet50.py | zhunzhong07/caffe-reid | 7468850ab80858006bd65bcc6203e0581c83aea9 | [
"BSD-2-Clause"
] | null | null | null | models/market1501/generate_resnet50.py | zhunzhong07/caffe-reid | 7468850ab80858006bd65bcc6203e0581c83aea9 | [
"BSD-2-Clause"
] | 2 | 2019-03-09T02:47:50.000Z | 2020-08-24T15:43:38.000Z | import _init_paths
import os
import os.path as osp
import caffe
from caffe import layers as L, params as P
from caffe import tools
from caffe.model_libs import *
def res_unit(net, bottom, in_c, out_c, stride, base_name, post, is_train=False):
assert (out_c % 4 == 0)
pase_name = base_name
base_name = base_name +... | 44.071856 | 153 | 0.670516 |
5afe4acc19c3deff0621391e914c850fd9d6e5e9 | 4,126 | py | Python | leetcode/python/sudokuSolver.py | yaoxuanw007/forfun | db50bd40852d49bd68bae03ceb43cb4a901c6d37 | [
"MIT"
] | null | null | null | leetcode/python/sudokuSolver.py | yaoxuanw007/forfun | db50bd40852d49bd68bae03ceb43cb4a901c6d37 | [
"MIT"
] | null | null | null | leetcode/python/sudokuSolver.py | yaoxuanw007/forfun | db50bd40852d49bd68bae03ceb43cb4a901c6d37 | [
"MIT"
] | null | null | null | # https://oj.leetcode.com/problems/sudoku-solver/
class Solution:
# @param board, a 9x9 2D array
# Solve the Sudoku by modifying the input board in-place.
# Do not return any value.
def solveSudoku(self, board):
if len(board) == 0 or len(board[0]) == 0:
return
m, n = len(board), len(board[0])
... | 29.683453 | 117 | 0.509937 |
b70863d7f362b687c4a64a93c1d8949441eff751 | 3,039 | py | Python | rltorch/utils/file_utils.py | Jjschwartz/rltorch | eeb2ad955f018d768db98c4a2be5da96a75579f6 | [
"MIT"
] | null | null | null | rltorch/utils/file_utils.py | Jjschwartz/rltorch | eeb2ad955f018d768db98c4a2be5da96a75579f6 | [
"MIT"
] | null | null | null | rltorch/utils/file_utils.py | Jjschwartz/rltorch | eeb2ad955f018d768db98c4a2be5da96a75579f6 | [
"MIT"
] | null | null | null | """This module contains general file handling functions, common to
multiple packages.
"""
import os
import yaml
import shutil
import pathlib
import tempfile
import os.path as osp
def load_yaml(file_path):
"""Load yaml file located at file path, throws error if theres an issue
loading file.
"""
with op... | 28.138889 | 77 | 0.679171 |
7f34b6324813a0e3e136adf01ab4f615d4141d37 | 5,045 | py | Python | env/lib/python3.8/site-packages/plotly/graph_objs/scattergl/selected/_textfont.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 11,750 | 2015-10-12T07:03:39.000Z | 2022-03-31T20:43:15.000Z | env/lib/python3.8/site-packages/plotly/graph_objs/scattergl/selected/_textfont.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 2,951 | 2015-10-12T00:41:25.000Z | 2022-03-31T22:19:26.000Z | env/lib/python3.8/site-packages/plotly/graph_objs/scattergl/selected/_textfont.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 2,623 | 2015-10-15T14:40:27.000Z | 2022-03-28T16:05:50.000Z | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Textfont(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "scattergl.selected"
_path_str = "scattergl.selected.textfont"
_valid_props = {"color"}
... | 36.294964 | 82 | 0.557185 |
71de53558c42e2ff9effe10bcb500ec533beb54c | 10,487 | py | Python | usaspending_api/broker/tests/integration/test_load_fsrs_mgmt_cmd.py | mikepsinn/usaspending-api | ef61e13c286eb51949e16b760fa7516255b2bfd3 | [
"CC0-1.0"
] | null | null | null | usaspending_api/broker/tests/integration/test_load_fsrs_mgmt_cmd.py | mikepsinn/usaspending-api | ef61e13c286eb51949e16b760fa7516255b2bfd3 | [
"CC0-1.0"
] | 1 | 2021-11-15T17:54:12.000Z | 2021-11-15T17:54:12.000Z | usaspending_api/broker/tests/integration/test_load_fsrs_mgmt_cmd.py | mikepsinn/usaspending-api | ef61e13c286eb51949e16b760fa7516255b2bfd3 | [
"CC0-1.0"
] | null | null | null | # Stdlib imports
# Core Django imports
from django.core.management import call_command
# Third-party app imports
import pytest
from unittest.mock import MagicMock
from model_mommy import mommy
# Imports from your apps
from usaspending_api.awards.models import Award, Subaward, TransactionNormalized
from usaspending_a... | 31.778788 | 116 | 0.610089 |
ba66a14c1c6f88c6164494a5ee094ce9e5a478f6 | 3,115 | py | Python | applications/ps-sidecar/main.py | awesome-archive/nauta | 6ba6103421a10dfcd051aef3f7c5a714f6ac9429 | [
"Apache-2.0"
] | null | null | null | applications/ps-sidecar/main.py | awesome-archive/nauta | 6ba6103421a10dfcd051aef3f7c5a714f6ac9429 | [
"Apache-2.0"
] | 14 | 2020-09-26T01:27:23.000Z | 2022-02-10T02:14:54.000Z | applications/ps-sidecar/main.py | awesome-archive/nauta | 6ba6103421a10dfcd051aef3f7c5a714f6ac9429 | [
"Apache-2.0"
] | null | null | null | #
# Copyright (c) 2019 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 33.138298 | 106 | 0.686998 |
a690c38c0d2fac4fa6dff75ea8eb73b1adb90108 | 155 | py | Python | python/testData/skeletons/BinaryStandardModule.py | jnthn/intellij-community | 8fa7c8a3ace62400c838e0d5926a7be106aa8557 | [
"Apache-2.0"
] | 2 | 2018-12-29T09:53:39.000Z | 2018-12-29T09:53:42.000Z | python/testData/skeletons/BinaryStandardModule.py | jnthn/intellij-community | 8fa7c8a3ace62400c838e0d5926a7be106aa8557 | [
"Apache-2.0"
] | 173 | 2018-07-05T13:59:39.000Z | 2018-08-09T01:12:03.000Z | python/testData/skeletons/BinaryStandardModule.py | jnthn/intellij-community | 8fa7c8a3ace62400c838e0d5926a7be106aa8557 | [
"Apache-2.0"
] | 2 | 2020-03-15T08:57:37.000Z | 2020-04-07T04:48:14.000Z | import binascii
import datetime
import <error descr="No module named nonexistent">nonexistent</error>
print(binascii)
print(datetime)
print(nonexistent)
| 17.222222 | 69 | 0.812903 |
842258234e0190fd4f026476b288e6d41f383ed1 | 239 | py | Python | ptrlib/util/__init__.py | alissonbezerra/ptrlib | 67a557acfa5069a66dd26670f53d94e63b023642 | [
"MIT"
] | 57 | 2019-12-08T00:02:14.000Z | 2022-03-24T20:40:40.000Z | ptrlib/util/__init__.py | alissonbezerra/ptrlib | 67a557acfa5069a66dd26670f53d94e63b023642 | [
"MIT"
] | 3 | 2020-01-26T03:38:31.000Z | 2020-06-21T13:42:46.000Z | ptrlib/util/__init__.py | alissonbezerra/ptrlib | 67a557acfa5069a66dd26670f53d94e63b023642 | [
"MIT"
] | 8 | 2020-04-20T08:17:57.000Z | 2021-10-04T06:04:51.000Z | from ptrlib.util.encoding import *
from ptrlib.util.packing import *
from ptrlib.util.logic import *
from ptrlib.util.construct import *
from ptrlib.util.opebinary import *
from ptrlib.util.misc import *
from ptrlib.util.brutepwn import *
| 29.875 | 35 | 0.794979 |
77a84e501386cfba40c2c4443f895194e2e3f5ea | 6,725 | py | Python | mars/tensor/random/tests/test_random.py | tomzhang/mars-1 | 6f1d85e37eb1b383251314cb0ba13e06288af03d | [
"Apache-2.0"
] | 2 | 2019-03-29T04:11:10.000Z | 2020-07-08T10:19:54.000Z | mars/tensor/random/tests/test_random.py | tomzhang/mars-1 | 6f1d85e37eb1b383251314cb0ba13e06288af03d | [
"Apache-2.0"
] | null | null | null | mars/tensor/random/tests/test_random.py | tomzhang/mars-1 | 6f1d85e37eb1b383251314cb0ba13e06288af03d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 1999-2020 Alibaba Group Holding Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-... | 34.487179 | 89 | 0.603866 |
68fd0f32abe61ac99f1b2bfc403791712c028f2b | 1,300 | py | Python | files/admin.py | springborland/bk-sops | a9057672c10efb5f2414a805a30ead4092429c76 | [
"Apache-2.0"
] | 1 | 2021-05-19T04:31:34.000Z | 2021-05-19T04:31:34.000Z | files/admin.py | ZhuoZhuoCrayon/bk-sops | d1475d53c19729915727ce7adc24e3226f15e332 | [
"Apache-2.0"
] | null | null | null | files/admin.py | ZhuoZhuoCrayon/bk-sops | d1475d53c19729915727ce7adc24e3226f15e332 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community
Edition) available.
Copyright (C) 2017-2020 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in co... | 43.333333 | 115 | 0.758462 |
a0879e316536ea873328ca91a906c869dc356bda | 11,521 | py | Python | dkc_api/v1/objects/content/content.py | Blackgard/dkc-api | 9c221f4fdb862aacc404010d7708637b1a84b800 | [
"MIT"
] | 1 | 2022-03-09T06:09:59.000Z | 2022-03-09T06:09:59.000Z | dkc_api/v1/objects/content/content.py | Blackgard/dkc-api | 9c221f4fdb862aacc404010d7708637b1a84b800 | [
"MIT"
] | null | null | null | dkc_api/v1/objects/content/content.py | Blackgard/dkc-api | 9c221f4fdb862aacc404010d7708637b1a84b800 | [
"MIT"
] | null | null | null | from __future__ import annotations
from typing import Union
from dkc_api.v1.const import URL_DOMAIN
from dkc_api.v1.models.error import ResponceError, ResponceErrorAlternative
from dkc_api.v1.exceptions.exceptions import NotValidVariables
from .models import GetRevisionLastSize, GetRevisionLast, GetRevisionDrawings, ... | 49.659483 | 133 | 0.66522 |
aa264d637da4be6cdb018c2a4cc915b2e947af69 | 150,554 | py | Python | tests/streaming_test.py | r4m0n/tda-api | ceb2f15c0be0fd51e9c586cfe3604d97ba832e55 | [
"MIT"
] | null | null | null | tests/streaming_test.py | r4m0n/tda-api | ceb2f15c0be0fd51e9c586cfe3604d97ba832e55 | [
"MIT"
] | null | null | null | tests/streaming_test.py | r4m0n/tda-api | ceb2f15c0be0fd51e9c586cfe3604d97ba832e55 | [
"MIT"
] | null | null | null | import tda
import urllib.parse
import json
import copy
from .utils import (account_principals, has_diff, MockResponse,
no_duplicates, AsyncMagicMock)
import asynctest
from unittest.mock import ANY, call, MagicMock, Mock
from tda import streaming
import asyncio
StreamClient = streaming.StreamClient
... | 39.013734 | 101 | 0.477171 |
933dc085dfb83128fdc163dcc30d8bd4a8446476 | 13,508 | py | Python | strategy/scripts/mir_bridge/mir_bridge.py | andy-Chien/timda_dual_arm | 94170d8889218ea0dc4e6031dcbbf59b7e37e70c | [
"MIT"
] | 3 | 2020-02-17T12:56:22.000Z | 2020-09-30T11:17:03.000Z | strategy/scripts/mir_bridge/mir_bridge.py | andy-Chien/timda_dual_arm | 94170d8889218ea0dc4e6031dcbbf59b7e37e70c | [
"MIT"
] | 2 | 2020-02-17T15:17:43.000Z | 2021-05-11T21:01:26.000Z | strategy/scripts/mir_bridge/mir_bridge.py | andy-Chien/timda_dual_arm | 94170d8889218ea0dc4e6031dcbbf59b7e37e70c | [
"MIT"
] | 9 | 2021-02-01T08:20:53.000Z | 2021-09-17T05:52:35.000Z | #!/usr/bin/python
import re
import json
import requests
import warnings
import math
import time
import base64
import os
from uuid import UUID
MAP_NAME = "HOME_AREA"
## TODO: Try to use function to reconstruct path for decorator's argument 'path'
class Request(object):
def __init__(self, method, path):
se... | 34.284264 | 141 | 0.543826 |
00442a83cd9868d14beb379932132749df0977b3 | 980 | py | Python | pypipe/lib/controls/file.py | AGrigis/pypipe | a77fc2c81cb469535b650c79718f811c5c056238 | [
"CECILL-B"
] | null | null | null | pypipe/lib/controls/file.py | AGrigis/pypipe | a77fc2c81cb469535b650c79718f811c5c056238 | [
"CECILL-B"
] | null | null | null | pypipe/lib/controls/file.py | AGrigis/pypipe | a77fc2c81cb469535b650c79718f811c5c056238 | [
"CECILL-B"
] | null | null | null | ##########################################################################
# PyPipe - Copyright (C) AGrigis, 2017
# Distributed under the terms of the CeCILL-B license, as published by
# the CEA-CNRS-INRIA. Refer to the LICENSE file or to
# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
# for details.
####... | 26.486486 | 74 | 0.496939 |
5caa73d1f26cf37ca475c4d850c4bbad9194da5c | 1,062 | py | Python | opteryx/storage/adapters/local/disk_store.py | mabel-dev/waddles | 959653ac7a66f1035e90085fc036fe7b0a1e57db | [
"Apache-2.0"
] | null | null | null | opteryx/storage/adapters/local/disk_store.py | mabel-dev/waddles | 959653ac7a66f1035e90085fc036fe7b0a1e57db | [
"Apache-2.0"
] | null | null | null | opteryx/storage/adapters/local/disk_store.py | mabel-dev/waddles | 959653ac7a66f1035e90085fc036fe7b0a1e57db | [
"Apache-2.0"
] | null | null | null | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under th... | 32.181818 | 74 | 0.699623 |
356718cf26860a04d368a8e52a4dd33966b7d392 | 965 | py | Python | Products/CMFDefault/browser/membership/tests/test_authentication.py | zopefoundation/Products.CMFDefault | a176d9aac5a7e04725dbd0f7b76c6ac357062139 | [
"ZPL-2.1"
] | null | null | null | Products/CMFDefault/browser/membership/tests/test_authentication.py | zopefoundation/Products.CMFDefault | a176d9aac5a7e04725dbd0f7b76c6ac357062139 | [
"ZPL-2.1"
] | 5 | 2017-07-13T00:51:25.000Z | 2021-02-04T15:08:39.000Z | Products/CMFDefault/browser/membership/tests/test_authentication.py | zopefoundation/Products.CMFDefault | a176d9aac5a7e04725dbd0f7b76c6ac357062139 | [
"ZPL-2.1"
] | 3 | 2017-07-08T03:22:35.000Z | 2018-05-20T06:42:03.000Z | ##############################################################################
#
# Copyright (c) 2010 Zope Foundation and Contributors.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS I... | 33.275862 | 78 | 0.648705 |
5d258d5bf9ec4eaf286e61afb3b5ca967b6d188c | 1,388 | py | Python | py/solns/sudokuSolver/sudokuSolver.py | zcemycl/algoTest | 9518fb2b60fd83c85aeb2ab809ff647aaf643f0a | [
"MIT"
] | 1 | 2022-01-26T16:33:45.000Z | 2022-01-26T16:33:45.000Z | py/solns/sudokuSolver/sudokuSolver.py | zcemycl/algoTest | 9518fb2b60fd83c85aeb2ab809ff647aaf643f0a | [
"MIT"
] | null | null | null | py/solns/sudokuSolver/sudokuSolver.py | zcemycl/algoTest | 9518fb2b60fd83c85aeb2ab809ff647aaf643f0a | [
"MIT"
] | 1 | 2022-01-26T16:35:44.000Z | 2022-01-26T16:35:44.000Z | from collections import defaultdict
class Solution:
@staticmethod
def naive(board):
n = len(board)
rows = defaultdict(set)
cols = defaultdict(set)
sqs = defaultdict(set)
for r in range(n):
for c in range(n):
if board[r][c]!=".":
... | 29.531915 | 62 | 0.386167 |
7ac7d89b06a3a3e1084aeb5b443022d63ebff43e | 4,093 | py | Python | foxylib/tools/googleapi/youtube/data/tests/test_dataapi_tool.py | foxytrixy-com/foxylib | 94b8c5b9f8b12423393c68f7d9f910258840ed18 | [
"BSD-3-Clause"
] | null | null | null | foxylib/tools/googleapi/youtube/data/tests/test_dataapi_tool.py | foxytrixy-com/foxylib | 94b8c5b9f8b12423393c68f7d9f910258840ed18 | [
"BSD-3-Clause"
] | null | null | null | foxylib/tools/googleapi/youtube/data/tests/test_dataapi_tool.py | foxytrixy-com/foxylib | 94b8c5b9f8b12423393c68f7d9f910258840ed18 | [
"BSD-3-Clause"
] | null | null | null | import logging
import os
from functools import reduce
from pprint import pprint
from unittest import TestCase
from google_auth_oauthlib.flow import InstalledAppFlow
from googleapiclient.discovery import build
import pytest
from googleapiclient.http import MediaFileUpload
from foxylib.tools.collections.iter_tool impor... | 40.524752 | 111 | 0.699243 |
4e85671c20826847b14ed12f241c3f4fc8fd2c61 | 32,312 | py | Python | mlrun/__main__.py | adiso75/mlrun | 0da2e72a1e2aa189074bd2ec059f2bc452f349cf | [
"Apache-2.0"
] | null | null | null | mlrun/__main__.py | adiso75/mlrun | 0da2e72a1e2aa189074bd2ec059f2bc452f349cf | [
"Apache-2.0"
] | null | null | null | mlrun/__main__.py | adiso75/mlrun | 0da2e72a1e2aa189074bd2ec059f2bc452f349cf | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright 2018 Iguazio
#
# 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... | 32.247505 | 118 | 0.609464 |
31939d900a952ba60adb1c729242ffa07a270d25 | 678 | py | Python | 6 - introduction to databases in python/ordering by a Single Column.py | Baidaly/datacamp-samples | 09b3e253ec2c503df936298fedc3902413c987b0 | [
"MIT"
] | null | null | null | 6 - introduction to databases in python/ordering by a Single Column.py | Baidaly/datacamp-samples | 09b3e253ec2c503df936298fedc3902413c987b0 | [
"MIT"
] | null | null | null | 6 - introduction to databases in python/ordering by a Single Column.py | Baidaly/datacamp-samples | 09b3e253ec2c503df936298fedc3902413c987b0 | [
"MIT"
] | null | null | null | '''
To sort the result output by a field, we use the .order_by() method. By default, the .order_by() method sorts from lowest to highest on the supplied column. You just have to pass in the name of the column you want sorted to .order_by(). In the video, for example, Jason used stmt.order_by(census.columns.state) to so... | 45.2 | 357 | 0.755162 |
561c8a42e1dda3730f77dafbdca28887bd966ba4 | 473 | py | Python | guests/migrations/0007_auto_20160207_2119.py | dannymuchoki/django-wedding-website | 4cb322719b04500b587500ea65311f3db302732d | [
"Apache-2.0"
] | null | null | null | guests/migrations/0007_auto_20160207_2119.py | dannymuchoki/django-wedding-website | 4cb322719b04500b587500ea65311f3db302732d | [
"Apache-2.0"
] | null | null | null | guests/migrations/0007_auto_20160207_2119.py | dannymuchoki/django-wedding-website | 4cb322719b04500b587500ea65311f3db302732d | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2016-02-07 21:19
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('guests', '0006_auto_20160207_2116'),
]
operations = [
migrations... | 22.52381 | 59 | 0.587738 |
71ba7241d5f75f45dc72521483f256eada1dc0be | 2,412 | py | Python | codewars/productFib.py | tarcisioallyson/python_exercise | be5257c5cce7c0c2b573ece2308e3b5b03c22fac | [
"Unlicense"
] | null | null | null | codewars/productFib.py | tarcisioallyson/python_exercise | be5257c5cce7c0c2b573ece2308e3b5b03c22fac | [
"Unlicense"
] | null | null | null | codewars/productFib.py | tarcisioallyson/python_exercise | be5257c5cce7c0c2b573ece2308e3b5b03c22fac | [
"Unlicense"
] | null | null | null | """ The Fibonacci numbers are the numbers in the following integer sequence (Fn):
0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, ...
such as
F(n) = F(n-1) + F(n-2) with F(0) = 0 and F(1) = 1.
Given a number, say prod (for product), we search two Fibonacci numbers F(n) and F(n+1) verifying
F(n) * F(n+... | 31.324675 | 98 | 0.53068 |
15fa47396cd95eda37541b6461bda9e4e264e546 | 2,024 | py | Python | accounts/migrations/0001_initial.py | hpanwar08/greatkart | 834ff9fabdbb9493f54bcfd5d23505831b4a66d2 | [
"MIT"
] | null | null | null | accounts/migrations/0001_initial.py | hpanwar08/greatkart | 834ff9fabdbb9493f54bcfd5d23505831b4a66d2 | [
"MIT"
] | null | null | null | accounts/migrations/0001_initial.py | hpanwar08/greatkart | 834ff9fabdbb9493f54bcfd5d23505831b4a66d2 | [
"MIT"
] | null | null | null | # Generated by Django 3.2 on 2021-12-22 06:26
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
initial = True
dependencies = [
('auth', '0012_alter_user_first_name_max_length'),
]
operations = [
migrations.CreateModel(
... | 50.6 | 266 | 0.629447 |
98775b2b7bba19b7fb3191f4407f514b4ea33aa6 | 5,003 | py | Python | lidardet/datasets/processor/data_processor.py | Jiaolong/trajectory-prediction | 3fd4e6253b44dfdc86e7c08e93c002baf66f2e46 | [
"Apache-2.0"
] | 6 | 2021-05-10T09:42:01.000Z | 2022-01-04T08:03:42.000Z | lidardet/datasets/processor/data_processor.py | Jiaolong/trajectory-prediction | 3fd4e6253b44dfdc86e7c08e93c002baf66f2e46 | [
"Apache-2.0"
] | 3 | 2021-08-16T02:19:10.000Z | 2022-01-10T02:05:48.000Z | lidardet/datasets/processor/data_processor.py | Jiaolong/trajectory-prediction | 3fd4e6253b44dfdc86e7c08e93c002baf66f2e46 | [
"Apache-2.0"
] | 1 | 2021-07-15T00:51:58.000Z | 2021-07-15T00:51:58.000Z | from functools import partial
import numpy as np
#from ...utils import box_utils, geometry
#from ...utils.common import scan_downsample, scan_upsample, scan_to_range
class DataProcessor(object):
def __init__(self, processor_configs):
self.grid_size = self.voxel_size = None
self.data_processor_queue... | 40.674797 | 106 | 0.630022 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.