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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1ce0d3176cbd39c56123e1ec9a35897e723ac63e | 2,285 | py | Python | setup.py | evansde77/vassal_deployer | 4aaadd35b81c454a6264540f5fb795bfc1daa991 | [
"Apache-2.0"
] | 1 | 2018-06-07T21:28:22.000Z | 2018-06-07T21:28:22.000Z | setup.py | evansde77/vassal_deployer | 4aaadd35b81c454a6264540f5fb795bfc1daa991 | [
"Apache-2.0"
] | 6 | 2018-02-21T20:49:34.000Z | 2019-08-15T19:42:49.000Z | src/cirrus/templates/setup.py.mustache | cloudant/cirrus | 2ac29853e877a8672fbbc582c914301a0c9c9ed9 | [
"Apache-2.0"
] | null | null | null | """
_setup.py_
Cirrus template setup.py that reads most of its business
from the cirrus.conf file. This lightweight setup.py should be used by
projects managed with cirrus.
"""
import setuptools
try:
import ConfigParser as configparser
except ImportError:
import configparser
def get_default(parser, section,... | 33.602941 | 81 | 0.72035 |
1ce0d9bae04b14aa40d57d1a54112fb374aaa739 | 4,078 | py | Python | lemur/tests/test_sources.py | x-lhan/lemur | 1d8aaa4a242af610363e961167bc31691b358773 | [
"Apache-2.0"
] | null | null | null | lemur/tests/test_sources.py | x-lhan/lemur | 1d8aaa4a242af610363e961167bc31691b358773 | [
"Apache-2.0"
] | null | null | null | lemur/tests/test_sources.py | x-lhan/lemur | 1d8aaa4a242af610363e961167bc31691b358773 | [
"Apache-2.0"
] | null | null | null | import pytest
from lemur.sources.views import * # noqa
from .vectors import VALID_ADMIN_API_TOKEN, VALID_ADMIN_HEADER_TOKEN, VALID_USER_HEADER_TOKEN, WILDCARD_CERT_STR, \
WILDCARD_CERT_KEY
def validate_source_schema(client):
from lemur.sources.schemas import SourceInputSchema
input_data = {
'l... | 29.766423 | 115 | 0.706474 |
1ce11e6bceae7b31fc77b9f411850ee1a295e36e | 1,635 | py | Python | CadVlan/System/forms.py | marcusgc/GloboNetworkAPI-WebUI | 1172f14028f9c116d71df7489eda770446b131d2 | [
"Apache-2.0"
] | 17 | 2015-05-19T20:03:45.000Z | 2022-03-24T06:19:47.000Z | CadVlan/System/forms.py | marcusgc/GloboNetworkAPI-WebUI | 1172f14028f9c116d71df7489eda770446b131d2 | [
"Apache-2.0"
] | 41 | 2015-01-27T18:36:07.000Z | 2021-06-10T20:34:03.000Z | CadVlan/System/forms.py | marcusgc/GloboNetworkAPI-WebUI | 1172f14028f9c116d71df7489eda770446b131d2 | [
"Apache-2.0"
] | 19 | 2016-09-12T07:35:42.000Z | 2022-01-28T23:46:11.000Z | # -*- coding:utf-8 -*-
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "Lic... | 46.714286 | 119 | 0.720489 |
1ce1273cd1e91372af57750c9f9cd8075020c998 | 1,258 | py | Python | airflow/version.py | kevin0120/airflow | fa263cbf0ac002bdb26239ce36d5dc2a1b6251fd | [
"Apache-2.0"
] | null | null | null | airflow/version.py | kevin0120/airflow | fa263cbf0ac002bdb26239ce36d5dc2a1b6251fd | [
"Apache-2.0"
] | null | null | null | airflow/version.py | kevin0120/airflow | fa263cbf0ac002bdb26239ce36d5dc2a1b6251fd | [
"Apache-2.0"
] | null | null | null | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | 32.25641 | 102 | 0.743243 |
1ce1286f233486520bbb2f1cb12a624f2cdd04d4 | 571 | py | Python | tests/run_all.py | gwiederhecker/MPh | d5eb7b6e9e00fe3fcd00acf53278a89243ae512a | [
"MIT"
] | 1 | 2021-12-23T09:15:56.000Z | 2021-12-23T09:15:56.000Z | tests/run_all.py | gwiederhecker/MPh | d5eb7b6e9e00fe3fcd00acf53278a89243ae512a | [
"MIT"
] | null | null | null | tests/run_all.py | gwiederhecker/MPh | d5eb7b6e9e00fe3fcd00acf53278a89243ae512a | [
"MIT"
] | null | null | null | """Runs all tests in the intended order."""
__license__ = 'MIT'
from subprocess import run
from pathlib import Path
from platform import system
from sys import argv
tests = ['discovery', 'server', 'session', 'model', 'processes']
here = Path(__file__).parent
python = 'python' if system() == ... | 28.55 | 68 | 0.61296 |
1ce12e0b9ada122430f26fa5d266d68375f824c0 | 14,633 | py | Python | tests/helpers/test_entity_component.py | Natrinicle/home-assistant | 7bb53449428b0787cca1d0c986c93a458401e6fb | [
"Apache-2.0"
] | null | null | null | tests/helpers/test_entity_component.py | Natrinicle/home-assistant | 7bb53449428b0787cca1d0c986c93a458401e6fb | [
"Apache-2.0"
] | null | null | null | tests/helpers/test_entity_component.py | Natrinicle/home-assistant | 7bb53449428b0787cca1d0c986c93a458401e6fb | [
"Apache-2.0"
] | null | null | null | """The tests for the Entity component helper."""
# pylint: disable=protected-access
import asyncio
from collections import OrderedDict
import logging
import unittest
from unittest.mock import patch, Mock
from datetime import timedelta
import pytest
import homeassistant.core as ha
import homeassistant.loader as loader... | 35.007177 | 78 | 0.673409 |
1ce138a510695d56186084759980433409a6d2e1 | 72,364 | py | Python | src/nitsm/tsmcontext.py | jonathanmendez/nitsm-python | c7bbe2e53d56cf987d2369336d32b8baf6ae806a | [
"MIT"
] | null | null | null | src/nitsm/tsmcontext.py | jonathanmendez/nitsm-python | c7bbe2e53d56cf987d2369336d32b8baf6ae806a | [
"MIT"
] | null | null | null | src/nitsm/tsmcontext.py | jonathanmendez/nitsm-python | c7bbe2e53d56cf987d2369336d32b8baf6ae806a | [
"MIT"
] | null | null | null | """
NI TestStand Semiconductor Module Context Python Wrapper
"""
import time
import typing
from typing import Any as _Any
from typing import Tuple as _Tuple
from typing import Union as _Union
from typing import Sequence as _Sequence
import warnings
import pythoncom
import nitsm.pinmapinterfaces
import nitsm.pinqueryco... | 49.361528 | 100 | 0.675281 |
1ce1402847c7183c4621092ae90e56c010da76fa | 3,522 | py | Python | tempest/api/volume/admin/test_volume_types_extra_specs.py | midokura/tempest | b0ec1d280f057d5d9c2eda081bcbda7e381ecb3b | [
"Apache-2.0"
] | null | null | null | tempest/api/volume/admin/test_volume_types_extra_specs.py | midokura/tempest | b0ec1d280f057d5d9c2eda081bcbda7e381ecb3b | [
"Apache-2.0"
] | null | null | null | tempest/api/volume/admin/test_volume_types_extra_specs.py | midokura/tempest | b0ec1d280f057d5d9c2eda081bcbda7e381ecb3b | [
"Apache-2.0"
] | null | null | null | # Copyright 2012 OpenStack Foundation
# 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 requ... | 39.573034 | 78 | 0.672345 |
1ce152b88419ca53e5522b7338638ed5e2545559 | 15,076 | py | Python | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2021_04_01/aio/operations/_blob_inventory_policies_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2021_04_01/aio/operations/_blob_inventory_policies_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2021_04_01/aio/operations/_blob_inventory_policies_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.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 ... | 48.012739 | 227 | 0.690833 |
1ce190c81ce43165122c112dfb1493a9198b0002 | 6,569 | py | Python | HAAR/HAAR_feature.py | prasad-madhale/machine-learning | bb611f809c16e1425136052e215ca83bd1148652 | [
"MIT"
] | null | null | null | HAAR/HAAR_feature.py | prasad-madhale/machine-learning | bb611f809c16e1425136052e215ca83bd1148652 | [
"MIT"
] | null | null | null | HAAR/HAAR_feature.py | prasad-madhale/machine-learning | bb611f809c16e1425136052e215ca83bd1148652 | [
"MIT"
] | null | null | null | import tensorflow as tf
import numpy as np
from Ecoc import ECOC
from sklearn.preprocessing import StandardScaler
def generate_rectangles(min_area=130, max_area=170, num_points=100):
points = []
for first in range(28):
# make half rectangles horizontally aligned
for second_hor in range(28):... | 25.964427 | 91 | 0.588979 |
1ce1938a6855116bc2d9875c839384987f4e27d0 | 4,339 | py | Python | src/main/python/cobra/services.py | tm0nk/cobra-j | daeb85250e63cb21e9c02ecc2acfdf8ba1e44d6b | [
"Apache-2.0"
] | null | null | null | src/main/python/cobra/services.py | tm0nk/cobra-j | daeb85250e63cb21e9c02ecc2acfdf8ba1e44d6b | [
"Apache-2.0"
] | null | null | null | src/main/python/cobra/services.py | tm0nk/cobra-j | daeb85250e63cb21e9c02ecc2acfdf8ba1e44d6b | [
"Apache-2.0"
] | null | null | null | # *************************************************************************
# Copyright (c) 2013 Cisco Systems, Inc. All rights reserved.
# *************************************************************************
"""
This module provides an interface to uploading L4-7 device packages to the
controller. Refer to the... | 33.635659 | 80 | 0.602673 |
1ce1a3a74439d920c0fdb8a5ea0c9dcd215e5170 | 3,114 | py | Python | lib/expand_pym_lexicon.py | AhmadHakroosh/MSGP | aa4aff4c4040eb87b14bb2ed5e70c92a0387cd6a | [
"Apache-2.0"
] | 1 | 2018-12-28T17:35:47.000Z | 2018-12-28T17:35:47.000Z | lib/expand_pym_lexicon.py | AhmadHakroosh/MSGP | aa4aff4c4040eb87b14bb2ed5e70c92a0387cd6a | [
"Apache-2.0"
] | null | null | null | lib/expand_pym_lexicon.py | AhmadHakroosh/MSGP | aa4aff4c4040eb87b14bb2ed5e70c92a0387cd6a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python3
from nltk.corpus import wordnet as wn
from nltk.tokenize import word_tokenize
import re
'''
Expand the PYM Lexicon
'''
word_scores = {}
with open("pym_data.csv", "r") as pym_data_f:
for line in pym_data_f:
line = line.strip()
(word, score) = line.split(",")
word_scor... | 28.833333 | 150 | 0.571933 |
1ce1b11f5e49ed6b6058332e28aafafbad3ec313 | 3,589 | py | Python | code/model_kit/conv_layer.py | jiwoongim/IMsML | 2f5647794b433c1cb63f14ba1bcbf4919ca48b87 | [
"MIT"
] | null | null | null | code/model_kit/conv_layer.py | jiwoongim/IMsML | 2f5647794b433c1cb63f14ba1bcbf4919ca48b87 | [
"MIT"
] | null | null | null | code/model_kit/conv_layer.py | jiwoongim/IMsML | 2f5647794b433c1cb63f14ba1bcbf4919ca48b87 | [
"MIT"
] | null | null | null | import math
import tensorflow as tf
from utils.utils import base_name
from utils.nn_utils import init_weights, activation_fn, _get_variable
class Conv_Layer(object):
def __init__(self, Xdim, kern_sz, filter_sz, atype, scope_name, \
stride=[2,2], padding='SAME', dformat='NHWC'):
'''
... | 32.333333 | 94 | 0.521037 |
1ce1c2bbcf133040c80c454fc90786423197c77d | 6,403 | py | Python | venv/Lib/site-packages/tests/test_162_FetchBothNestedSelects_02.py | shehzadulislam/Assignment4 | a9cced70be6ae5d2685027d68032d5849f638301 | [
"Apache-2.0"
] | null | null | null | venv/Lib/site-packages/tests/test_162_FetchBothNestedSelects_02.py | shehzadulislam/Assignment4 | a9cced70be6ae5d2685027d68032d5849f638301 | [
"Apache-2.0"
] | null | null | null | venv/Lib/site-packages/tests/test_162_FetchBothNestedSelects_02.py | shehzadulislam/Assignment4 | a9cced70be6ae5d2685027d68032d5849f638301 | [
"Apache-2.0"
] | null | null | null | #
# Licensed Materials - Property of IBM
#
# (c) Copyright IBM Corp. 2007-2008
#
import unittest, sys
import ibm_db
import config
from testfunctions import IbmDbTestFunctions
class IbmDbTestCase(unittest.TestCase):
def test_162_FetchBothNestedSelects_02(self):
obj = IbmDbTestFunctions()
obj.assert_expec... | 50.81746 | 150 | 0.684211 |
1ce1d96f9215ade33089901345a3339bb618c915 | 2,853 | py | Python | src/actuators/brake.py | Dorniak/NEVA_Control | d946ff27f4c1196ac2808d8fe4a1227406a8b3c2 | [
"MIT"
] | null | null | null | src/actuators/brake.py | Dorniak/NEVA_Control | d946ff27f4c1196ac2808d8fe4a1227406a8b3c2 | [
"MIT"
] | null | null | null | src/actuators/brake.py | Dorniak/NEVA_Control | d946ff27f4c1196ac2808d8fe4a1227406a8b3c2 | [
"MIT"
] | null | null | null | import threading
from time import sleep
from numpy import interp
from rclpy.node import Node
from rclpy.logging import get_logger
from src.devices.base import VehicleState
from src.can_utils.common import make_can_frame
from src.devices.communications import Communications
class Brake:
def __init__(self, cobid... | 36.576923 | 120 | 0.651945 |
1ce1e9a864ee3effc058accc6e01c997bf070219 | 5,504 | py | Python | data/level/level10242.py | levelupai/match3-level-similarity | cc9b28b8741b41bea1273c8bc9b4d265d79a1dca | [
"Apache-2.0"
] | null | null | null | data/level/level10242.py | levelupai/match3-level-similarity | cc9b28b8741b41bea1273c8bc9b4d265d79a1dca | [
"Apache-2.0"
] | 6 | 2020-07-04T02:53:08.000Z | 2022-03-11T23:53:14.000Z | data/level/level10242.py | levelupai/match3-level-similarity | cc9b28b8741b41bea1273c8bc9b4d265d79a1dca | [
"Apache-2.0"
] | 3 | 2019-12-31T11:42:59.000Z | 2021-03-28T20:06:13.000Z | data = {'level_index': 10242, 'move_count': '30',
'board_info': {(0, 15): {'bg_number': 41}, (0, 14): {'bg_number': 41}, (0, 13): {'bg_number': 41},
(0, 12): {'bg_number': 41}, (0, 11): {'bg_number': 41, 'fall_point': (0, -1)}, (0, 7): {},
(0, 6): {}, (0, 5): {}, (0... | 96.561404 | 120 | 0.292878 |
1ce2131cead82d8744dfea118351a92d0cddf964 | 4,610 | py | Python | oscar/lib/python2.7/site-packages/django/contrib/gis/db/backends/base/features.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/django/contrib/gis/db/backends/base/features.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/django/contrib/gis/db/backends/base/features.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | import re
from functools import partial
from django.contrib.gis.db.models import aggregates
class BaseSpatialFeatures(object):
gis_enabled = True
# Does the database contain a SpatialRefSys model to store SRID information?
has_spatialrefsys_table = True
# Does the backend support the dj... | 39.067797 | 95 | 0.703037 |
1ce21b7a824d9a7901c0ef9734fa00623e1503da | 2,327 | py | Python | docs/source/conf.py | ieaves/tenzing | 92d39c1c3a5633d8074e0ffe8c2687c465aebbc8 | [
"MIT"
] | null | null | null | docs/source/conf.py | ieaves/tenzing | 92d39c1c3a5633d8074e0ffe8c2687c465aebbc8 | [
"MIT"
] | null | null | null | docs/source/conf.py | ieaves/tenzing | 92d39c1c3a5633d8074e0ffe8c2687c465aebbc8 | [
"MIT"
] | null | null | null | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# -- Path setup --------------------------------------------------------------
# If extensions (or module... | 32.319444 | 79 | 0.678556 |
1ce245c8d2275b19c54112128d7d9a161f942976 | 2,098 | py | Python | examples/how_to/create_nested_views.py | ifwe/jenkinsapi | 31a7fbb07efcd48e226f7dcf643fd2a2625416c0 | [
"MIT"
] | 1 | 2015-01-12T14:15:59.000Z | 2015-01-12T14:15:59.000Z | examples/how_to/create_nested_views.py | moustuk/jenkinsapi-1 | d18c1e669965c209093763f3295f79c9d3ccdeea | [
"MIT"
] | null | null | null | examples/how_to/create_nested_views.py | moustuk/jenkinsapi-1 | d18c1e669965c209093763f3295f79c9d3ccdeea | [
"MIT"
] | null | null | null | # This example requires NestedViews plugin to be installed in Jenkins
# You need to have at least one job in your Jenkins to see views
import logging
from pkg_resources import resource_string
from jenkinsapi.view import View
from jenkinsapi.views import Views
from jenkinsapi.jenkins import Jenkins
log_level = getattr... | 29.971429 | 69 | 0.750715 |
1ce24f2a2bf3a0ebc4d9b373f39c0658e14d787f | 17,915 | py | Python | sdk/cosmos/azure-cosmos/azure/cosmos/aio/cosmos_client.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-01-24T08:54:57.000Z | 2022-01-24T08:54:57.000Z | sdk/cosmos/azure-cosmos/azure/cosmos/aio/cosmos_client.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/cosmos/azure-cosmos/azure/cosmos/aio/cosmos_client.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | # The MIT License (MIT)
# Copyright (c) 2021 Microsoft Corporation
# 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... | 46.17268 | 118 | 0.686017 |
1ce25e0833e8a3c1c228c5d4232a5ac8ab80081e | 3,254 | py | Python | src/python/crash_analysis/crash_comparer.py | fengjixuchui/clusterfuzz | ef89be3934936d1086b4a21bffca5506c8cb93be | [
"Apache-2.0"
] | 25 | 2020-09-16T02:59:04.000Z | 2022-02-14T09:51:58.000Z | src/python/crash_analysis/crash_comparer.py | fengjixuchui/clusterfuzz | ef89be3934936d1086b4a21bffca5506c8cb93be | [
"Apache-2.0"
] | 34 | 2020-08-18T18:47:00.000Z | 2021-07-14T07:47:35.000Z | src/python/crash_analysis/crash_comparer.py | fengjixuchui/clusterfuzz | ef89be3934936d1086b4a21bffca5506c8cb93be | [
"Apache-2.0"
] | 3 | 2020-09-16T09:31:41.000Z | 2021-12-15T08:15:32.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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 33.204082 | 79 | 0.704364 |
1ce2792de2865eb6d4440bd497970ebb5bb0f96e | 1,223 | py | Python | embiggen/layers/tensorflow/ElementWiseL2.py | monarch-initiative/N2V | 8ae02ca125f1d24ca158c2849f2d9bb1711920b9 | [
"BSD-3-Clause"
] | 2 | 2020-01-30T11:57:37.000Z | 2020-05-02T00:05:49.000Z | embiggen/layers/tensorflow/ElementWiseL2.py | monarch-initiative/N2V | 8ae02ca125f1d24ca158c2849f2d9bb1711920b9 | [
"BSD-3-Clause"
] | 93 | 2020-01-26T00:43:51.000Z | 2020-05-10T03:29:54.000Z | embiggen/layers/tensorflow/ElementWiseL2.py | monarch-initiative/N2V | 8ae02ca125f1d24ca158c2849f2d9bb1711920b9 | [
"BSD-3-Clause"
] | 5 | 2020-02-13T07:18:11.000Z | 2020-03-19T08:03:34.000Z | """Submodule providing element-wise L2 distance layer."""
from typing import Tuple, Dict
import tensorflow as tf
from tensorflow.keras import backend as K
from tensorflow.keras.layers import Subtract, Lambda, Layer # pylint: disable=import-error,no-name-in-module
class ElementWiseL2(Layer):
"""Layer implementing... | 28.44186 | 109 | 0.587899 |
1ce2ec6f30e0ed2c408065f83bacf52dd911ee37 | 4,315 | py | Python | jina/types/ndarray/generic.py | Rohitpandit021/jina | f3db4d5e480375d8dc3bceda814ac1963dee76d7 | [
"Apache-2.0"
] | 15,179 | 2020-04-28T10:23:56.000Z | 2022-03-31T14:35:25.000Z | jina/types/ndarray/generic.py | Rohitpandit021/jina | f3db4d5e480375d8dc3bceda814ac1963dee76d7 | [
"Apache-2.0"
] | 3,912 | 2020-04-28T13:01:29.000Z | 2022-03-31T14:36:46.000Z | jina/types/ndarray/generic.py | Rohitpandit021/jina | f3db4d5e480375d8dc3bceda814ac1963dee76d7 | [
"Apache-2.0"
] | 1,955 | 2020-04-28T10:50:49.000Z | 2022-03-31T12:28:34.000Z | from typing import Type
from . import BaseNdArray
from .dense import BaseDenseNdArray
from .dense.numpy import DenseNdArray
from .sparse import BaseSparseNdArray
from .sparse.scipy import SparseNdArray
from ...proto import jina_pb2
__all__ = ['NdArray']
class NdArray(BaseNdArray):
"""
:class:`NdArray` is on... | 32.443609 | 105 | 0.659791 |
1ce2fa74fed58fdd56c25a6ecdba92943bd4d4b1 | 1,169 | py | Python | rnnparser/RecursiveNN/npRNN/node.py | uphere-co/nlp-prototype | c4623927e5c5c5f9c3e702eb36497ea1d9fd1ff3 | [
"BSD-3-Clause"
] | null | null | null | rnnparser/RecursiveNN/npRNN/node.py | uphere-co/nlp-prototype | c4623927e5c5c5f9c3e702eb36497ea1d9fd1ff3 | [
"BSD-3-Clause"
] | null | null | null | rnnparser/RecursiveNN/npRNN/node.py | uphere-co/nlp-prototype | c4623927e5c5c5f9c3e702eb36497ea1d9fd1ff3 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
class RNNnode(object):
@classmethod
def propagateParent(cls, node, parent):
if node is not None:
node._add_parent(parent)
cls.propagateParent(node.left, parent)
cls.propagateParent(node.right, parent)
@classmethod
def merge(cls,nodeL, n... | 29.225 | 53 | 0.587682 |
1ce30aecd992bbe311d717e04b6d8665fb528e16 | 3,120 | py | Python | estimationpy/modelica/FmuExamples/Resources/Python-Scripts/addNoiseToData_StuckValveBias.py | alexlib/EstimationPy | de0db040661ae6a8ae68c9571a71bbb16127fe60 | [
"BSD-3-Clause-LBNL"
] | 27 | 2016-01-25T17:11:15.000Z | 2021-05-14T21:05:18.000Z | estimationpy/modelica/FmuExamples/Resources/Python-Scripts/addNoiseToData_StuckValveBias.py | alexlib/EstimationPy | de0db040661ae6a8ae68c9571a71bbb16127fe60 | [
"BSD-3-Clause-LBNL"
] | 10 | 2018-08-28T05:40:05.000Z | 2020-06-01T19:04:05.000Z | estimationpy/modelica/FmuExamples/Resources/Python-Scripts/addNoiseToData_StuckValveBias.py | alexlib/EstimationPy | de0db040661ae6a8ae68c9571a71bbb16127fe60 | [
"BSD-3-Clause-LBNL"
] | 12 | 2016-05-25T09:50:57.000Z | 2021-11-09T16:38:00.000Z | import numpy as np
import matplotlib.pyplot as plt
import getCSVdata
# Small bias
#inputFileName = '../data/SimulationData_ValveBias.csv'
#outputFileName = '../data/NoisyData_ValveBias.csv'
# No bias bias
#inputFileName = '../data/SimulationData_ValveBias2.csv'
#outputFileName = '../data/NoisyData_ValveBias2.csv'
# ... | 31.2 | 89 | 0.7125 |
1ce33088c51e4f2c88c6d50e1115318921f952ca | 1,579 | py | Python | LC/501.py | szhu3210/LeetCode_Solutions | 64747eb172c2ecb3c889830246f3282669516e10 | [
"MIT"
] | 2 | 2018-02-24T17:20:02.000Z | 2018-02-24T17:25:43.000Z | LC/501.py | szhu3210/LeetCode_Solutions | 64747eb172c2ecb3c889830246f3282669516e10 | [
"MIT"
] | null | null | null | LC/501.py | szhu3210/LeetCode_Solutions | 64747eb172c2ecb3c889830246f3282669516e10 | [
"MIT"
] | null | null | null | # Definition for a binary tree node.
# class TreeNode(object):
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution(object):
def findMode(self, root):
"""
:type root: TreeNode
:rtype: List[int]
"""
def trav... | 29.240741 | 76 | 0.425586 |
1ce34f5b349596d0edc0a0d7f4dabc1c0a80ec7f | 27,642 | py | Python | biosteam/units/heat_exchange.py | yoelcortes/biosteam | 8d90788f87efb3b23428387d79097817962cad97 | [
"MIT"
] | 29 | 2019-03-01T04:47:43.000Z | 2020-02-23T01:34:40.000Z | biosteam/units/heat_exchange.py | yoelcortes/biosteam | 8d90788f87efb3b23428387d79097817962cad97 | [
"MIT"
] | 15 | 2019-11-01T13:57:50.000Z | 2020-02-28T06:40:46.000Z | biosteam/units/heat_exchange.py | yoelcortes/biosteam | 8d90788f87efb3b23428387d79097817962cad97 | [
"MIT"
] | 4 | 2019-06-05T15:39:04.000Z | 2020-01-08T20:42:04.000Z | # -*- coding: utf-8 -*-
# BioSTEAM: The Biorefinery Simulation and Techno-Economic Analysis Modules
# Copyright (C) 2020-2021, Yoel Cortes-Pena <yoelcortes@gmail.com>
#
# This module is under the UIUC open-source license. See
# github.com/BioSTEAMDevelopmentGroup/biosteam/blob/master/LICENSE.txt
# for license details... | 37.710778 | 110 | 0.511866 |
1ce35c0a73fdd65a3ea7102cab10adc40d51ef78 | 5,093 | py | Python | notebooks/run_all_datasets.py | marathomas/meerkat_umap | 1c1c23eba6e6219d777464f5afdb6c778198e09e | [
"MIT"
] | null | null | null | notebooks/run_all_datasets.py | marathomas/meerkat_umap | 1c1c23eba6e6219d777464f5afdb6c778198e09e | [
"MIT"
] | null | null | null | notebooks/run_all_datasets.py | marathomas/meerkat_umap | 1c1c23eba6e6219d777464f5afdb6c778198e09e | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# Evaluate an embedding
import os
import pandas as pd
import sys
import numpy as np
from pandas.core.common import flatten
import pickle
from pathlib import Path
import datetime
import scipy
import matplotlib.pyplot as plt
import seaborn as sns
import matplotlib
import librosa.di... | 35.368056 | 123 | 0.639898 |
1ce362368532f813a59696e607320c8901dbc9f1 | 3,190 | py | Python | batchglm/train/tf/stats.py | SabrinaRichter/batchglm | 2da429f895f7eb577a835da334f4ae146a9422ce | [
"BSD-3-Clause"
] | null | null | null | batchglm/train/tf/stats.py | SabrinaRichter/batchglm | 2da429f895f7eb577a835da334f4ae146a9422ce | [
"BSD-3-Clause"
] | null | null | null | batchglm/train/tf/stats.py | SabrinaRichter/batchglm | 2da429f895f7eb577a835da334f4ae146a9422ce | [
"BSD-3-Clause"
] | null | null | null | import tensorflow as tf
def normalize(measure: tf.Tensor, data: tf.Tensor, name="normalize") -> tf.Tensor:
"""
Normalize measure (e.g. `RMSD` or `MAE`) with the range of `data`
:param measure: the measure which should be normalized
:param data: Tensor representing the data by which the measure should... | 35.054945 | 96 | 0.678056 |
1ce394ff0d5e40b35f129fae7b360ca565d8bb3c | 9,599 | py | Python | tests/test_utils.py | OpenGeophysics/matrixutils | 20ed7ebc06b28499e98bc0ce725abe714a8df957 | [
"MIT"
] | 1 | 2021-10-21T04:27:32.000Z | 2021-10-21T04:27:32.000Z | tests/test_utils.py | OpenGeophysics/matrixutils | 20ed7ebc06b28499e98bc0ce725abe714a8df957 | [
"MIT"
] | 3 | 2018-04-03T03:50:30.000Z | 2018-04-12T20:31:49.000Z | tests/test_utils.py | opengeophysics/matrixutils | 20ed7ebc06b28499e98bc0ce725abe714a8df957 | [
"MIT"
] | null | null | null | from __future__ import print_function
import unittest
import numpy as np
import scipy.sparse as sp
from matrixutils import (
sdiag, sub2ind, ndgrid, mkvc,
inv2X2BlockDiagonal, inv3X3BlockDiagonal,
indexCube, ind2sub, asArray_N_x_Dim, Zero, Identity,
meshTensor
)
TOL = 1e-8
class TestSequenceFunctions... | 28.653731 | 76 | 0.445671 |
1ce39628309974a4a11b6da338fda385e85ac129 | 3,714 | py | Python | alipay/aop/api/domain/AlipayOpenAppBoyiBoyiCreateModel.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/AlipayOpenAppBoyiBoyiCreateModel.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/AlipayOpenAppBoyiBoyiCreateModel.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 *
from alipay.aop.api.domain.GavintestNewLeveaOne import GavintestNewLeveaOne
from alipay.aop.api.domain.GavinTestnew import GavinTestnew
class AlipayOpenAppBoyiBoyiCreateModel(object):
def __init__(self... | 26.719424 | 75 | 0.53581 |
1ce3ad3c45f916e9aa9bb34a8de2c333e2ed79b0 | 86 | py | Python | classifier_3D/feature_extraction/__init__.py | theovincent/3DPointCloudClassification | cd3ed8d824e9cf671c0a46b352eae26074624019 | [
"MIT"
] | null | null | null | classifier_3D/feature_extraction/__init__.py | theovincent/3DPointCloudClassification | cd3ed8d824e9cf671c0a46b352eae26074624019 | [
"MIT"
] | null | null | null | classifier_3D/feature_extraction/__init__.py | theovincent/3DPointCloudClassification | cd3ed8d824e9cf671c0a46b352eae26074624019 | [
"MIT"
] | null | null | null | ALL_FEATURES = ["verticality", "linearity", "planarity", "sphericity", "x", "y", "z"]
| 43 | 85 | 0.627907 |
1ce3b11abbe43e314e3b57a3c17a08a43e59cfbf | 13,726 | py | Python | mediapipe/util/tracking/tone_models_pb2.py | mengfu188/simple-mediapipe | 85dc8a87c9586312c2d057ad587bfccf3b5e2eb6 | [
"Apache-2.0"
] | 5 | 2021-01-01T11:02:41.000Z | 2022-03-11T19:44:29.000Z | mediapipe/util/tracking/tone_models_pb2.py | mengfu188/simple-mediapipe | 85dc8a87c9586312c2d057ad587bfccf3b5e2eb6 | [
"Apache-2.0"
] | null | null | null | mediapipe/util/tracking/tone_models_pb2.py | mengfu188/simple-mediapipe | 85dc8a87c9586312c2d057ad587bfccf3b5e2eb6 | [
"Apache-2.0"
] | 1 | 2021-04-12T05:59:46.000Z | 2021-04-12T05:59:46.000Z | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: mediapipe/util/tracking/tone_models.proto
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import ... | 45.003279 | 1,173 | 0.755719 |
1ce3d4e312bed62afb814e19cfecc522cd1d3339 | 266 | py | Python | terrascript/berglas/r.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 507 | 2017-07-26T02:58:38.000Z | 2022-01-21T12:35:13.000Z | terrascript/berglas/r.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 135 | 2017-07-20T12:01:59.000Z | 2021-10-04T22:25:40.000Z | terrascript/berglas/r.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 81 | 2018-02-20T17:55:28.000Z | 2022-01-31T07:08:40.000Z | # terrascript/berglas/r.py
# Automatically generated by tools/makecode.py ()
import warnings
warnings.warn(
"using the 'legacy layout' is deprecated", DeprecationWarning, stacklevel=2
)
import terrascript
class berglas_secret(terrascript.Resource):
pass
| 19 | 79 | 0.774436 |
1ce3e04f9766884bf4b94eb96089b14734c343ef | 24,339 | py | Python | python/graph2tensor/client/distributed/dist_numpy_relation_store_pb2.py | deepest-stack/graph2tensor | 4258bd7fff68348c98a77cff88afef039c1d44ba | [
"Apache-2.0"
] | null | null | null | python/graph2tensor/client/distributed/dist_numpy_relation_store_pb2.py | deepest-stack/graph2tensor | 4258bd7fff68348c98a77cff88afef039c1d44ba | [
"Apache-2.0"
] | null | null | null | python/graph2tensor/client/distributed/dist_numpy_relation_store_pb2.py | deepest-stack/graph2tensor | 4258bd7fff68348c98a77cff88afef039c1d44ba | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: dist_numpy_relation_store.proto
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
f... | 44.658716 | 2,590 | 0.773039 |
1ce3e26d5b4919372bf0288532a91ad27c8677d9 | 7,608 | py | Python | lib/rucio/daemons/mock/os_injector.py | elichad/rucio | 0705e4124e18c853c4661f85e00238cb0c6bd750 | [
"Apache-2.0"
] | null | null | null | lib/rucio/daemons/mock/os_injector.py | elichad/rucio | 0705e4124e18c853c4661f85e00238cb0c6bd750 | [
"Apache-2.0"
] | null | null | null | lib/rucio/daemons/mock/os_injector.py | elichad/rucio | 0705e4124e18c853c4661f85e00238cb0c6bd750 | [
"Apache-2.0"
] | null | null | null | # Copyright European Organization for Nuclear Research (CERN)
#
# 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
#
# Authors:
# - Wen Guan, <wen.guan@c... | 40.903226 | 155 | 0.630915 |
1ce4146af774b05930f5f0585e438cb26fd20765 | 24,852 | py | Python | gender-age/mtcnn_detector.py | dwhite54/insightface | ea172e4921c3960c0684404afff6d0d862447eae | [
"MIT"
] | 18 | 2018-04-13T02:55:03.000Z | 2020-10-12T01:37:52.000Z | gender-age/mtcnn_detector.py | dwhite54/insightface | ea172e4921c3960c0684404afff6d0d862447eae | [
"MIT"
] | 3 | 2020-07-31T02:01:33.000Z | 2021-05-26T02:55:52.000Z | gender-age/mtcnn_detector.py | dwhite54/insightface | ea172e4921c3960c0684404afff6d0d862447eae | [
"MIT"
] | 7 | 2018-08-29T06:41:19.000Z | 2019-09-11T06:10:39.000Z | # coding: utf-8
import os
import mxnet as mx
import numpy as np
import math
import cv2
from multiprocessing import Pool
from itertools import repeat
from itertools import izip
from helper import nms, adjust_input, generate_bbox, detect_first_stage_warpper
class MtcnnDetector(object):
"""
Joint Face Detect... | 35.655667 | 124 | 0.473563 |
1ce41a3e641d899a8f2dfc41e8c5168988ce09c0 | 2,834 | py | Python | Internet-Worm/venv_macos/lib/python3.8/site-packages/pyecharts/charts/basic_charts/scatter.py | Qiaozhi94/Python-Projects | aefc6cf49c1f4f2cc9beba8dbe80cfa826ba75c4 | [
"MIT"
] | null | null | null | Internet-Worm/venv_macos/lib/python3.8/site-packages/pyecharts/charts/basic_charts/scatter.py | Qiaozhi94/Python-Projects | aefc6cf49c1f4f2cc9beba8dbe80cfa826ba75c4 | [
"MIT"
] | null | null | null | Internet-Worm/venv_macos/lib/python3.8/site-packages/pyecharts/charts/basic_charts/scatter.py | Qiaozhi94/Python-Projects | aefc6cf49c1f4f2cc9beba8dbe80cfa826ba75c4 | [
"MIT"
] | null | null | null | import itertools
from ... import options as opts
from ... import types
from ...charts.chart import RectChart
from ...globals import ChartType
class Scatter(RectChart):
"""
<<< Scatter >>>
The scatter diagram on the rectangular coordinate system can be used to
show the relationship between x and y of... | 34.987654 | 75 | 0.582569 |
1ce4377b8945931e480f2c3b4cce6978f992cf47 | 1,197 | py | Python | practicity/progressTracker/migrations/0003_auto_20200926_2031.py | pkhurt/practicity | e638a67f091696de15d2852d26f310e3556bdf79 | [
"MIT"
] | null | null | null | practicity/progressTracker/migrations/0003_auto_20200926_2031.py | pkhurt/practicity | e638a67f091696de15d2852d26f310e3556bdf79 | [
"MIT"
] | null | null | null | practicity/progressTracker/migrations/0003_auto_20200926_2031.py | pkhurt/practicity | e638a67f091696de15d2852d26f310e3556bdf79 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.1 on 2020-09-26 18:31
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('progressTracker', '0002_auto_20200926_1358'),
]
operations = [
migrations.CreateModel(
name='In... | 36.272727 | 125 | 0.6132 |
1ce4687604031c9bcc20aa902a2b156317df2c0b | 845 | py | Python | atom/proton/python/test/test_periods.py | AbhiGupta03/SDK | f3a61aae7a847f07f0c22a154ca88dc378e9d25e | [
"Apache-2.0"
] | 11 | 2019-04-16T02:11:17.000Z | 2021-12-16T22:51:40.000Z | atom/proton/python/test/test_periods.py | AbhiGupta03/SDK | f3a61aae7a847f07f0c22a154ca88dc378e9d25e | [
"Apache-2.0"
] | 81 | 2019-11-19T23:24:28.000Z | 2022-03-28T11:35:47.000Z | atom/proton/python/test/test_periods.py | AbhiGupta03/SDK | f3a61aae7a847f07f0c22a154ca88dc378e9d25e | [
"Apache-2.0"
] | 11 | 2020-07-08T02:29:56.000Z | 2022-03-28T10:05:33.000Z | # coding: utf-8
"""
Hydrogen Proton API
Financial engineering module of Hydrogen Atom # noqa: E501
OpenAPI spec version: 1.9.2
Contact: info@hydrogenplatform.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import... | 20.609756 | 79 | 0.686391 |
1ce477e50110b288bd159308817e974c3c2a5459 | 3,406 | py | Python | plan2explore/scripts/sync.py | sarthak268/plan2explore | 264f513d46c6e971d5523782344a694b17139a20 | [
"Apache-2.0"
] | 189 | 2020-05-13T01:12:03.000Z | 2022-03-23T01:38:56.000Z | plan2explore/scripts/sync.py | sarthak268/plan2explore | 264f513d46c6e971d5523782344a694b17139a20 | [
"Apache-2.0"
] | 13 | 2020-05-12T22:51:07.000Z | 2022-03-12T00:28:47.000Z | plan2explore/scripts/sync.py | sarthak268/plan2explore | 264f513d46c6e971d5523782344a694b17139a20 | [
"Apache-2.0"
] | 24 | 2020-05-14T03:47:50.000Z | 2021-09-26T04:20:36.000Z | #!/usr/bin/python3
# Copyright 2019 The Dreamer Authors. Copyright 2020 Plan2Explore 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.... | 33.067961 | 95 | 0.691427 |
1ce487030336b4228419dea1cd8c889cf537720c | 224 | py | Python | common/__init__.py | l3robot/toy_datasets | 585e886018940627a75724f0b55869700b3a8410 | [
"MIT"
] | null | null | null | common/__init__.py | l3robot/toy_datasets | 585e886018940627a75724f0b55869700b3a8410 | [
"MIT"
] | 3 | 2018-11-02T04:56:25.000Z | 2018-11-07T01:29:40.000Z | common/__init__.py | l3robot/toy_datasets | 585e886018940627a75724f0b55869700b3a8410 | [
"MIT"
] | null | null | null | """
This module contains all the common functions
---------------------------------------------
author: Louis-Émile Robitaille (l3robot)
date-of-creation: 2018-10-30
"""
from .printing import printl, ERROR, WARNING, INFO
| 20.363636 | 50 | 0.598214 |
1ce4c89147d2dc696b8426724dffd6b69b40d48a | 395 | py | Python | App0/migrations/0008_auto_20210114_1237.py | LTSana/lost-empire | 495397345f1226b025434e37c5e1703273f475a8 | [
"CC0-1.0"
] | null | null | null | App0/migrations/0008_auto_20210114_1237.py | LTSana/lost-empire | 495397345f1226b025434e37c5e1703273f475a8 | [
"CC0-1.0"
] | null | null | null | App0/migrations/0008_auto_20210114_1237.py | LTSana/lost-empire | 495397345f1226b025434e37c5e1703273f475a8 | [
"CC0-1.0"
] | null | null | null | # Generated by Django 3.1.5 on 2021-01-14 10:37
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('App0', '0007_auto_20210113_2032'),
]
operations = [
migrations.AlterField(
model_name='products',
name='category',
... | 20.789474 | 58 | 0.6 |
1ce4d2dc54e7364a6af6e9b752f785b5d749c89e | 3,882 | py | Python | jumpscale/packages/vdc_dashboard/chats/kubeapps.py | threefoldtech/js-sdk | 811f783ac34a60225175bab2d806802a87b9d5c7 | [
"Apache-2.0"
] | 13 | 2020-09-02T09:05:08.000Z | 2022-03-12T02:43:24.000Z | jumpscale/packages/vdc_dashboard/chats/kubeapps.py | threefoldtech/js-sdk | 811f783ac34a60225175bab2d806802a87b9d5c7 | [
"Apache-2.0"
] | 1,998 | 2020-06-15T11:46:10.000Z | 2022-03-24T22:12:41.000Z | jumpscale/packages/vdc_dashboard/chats/kubeapps.py | threefoldtech/js-sdk | 811f783ac34a60225175bab2d806802a87b9d5c7 | [
"Apache-2.0"
] | 8 | 2020-09-29T06:50:35.000Z | 2021-06-14T03:30:52.000Z | from textwrap import dedent
from jumpscale.sals.chatflows.chatflows import chatflow_step, StopChatFlow
from jumpscale.packages.vdc_dashboard.sals.solutions_chatflow import SolutionsChatflowDeploy
from jumpscale.packages.vdc_dashboard.sals.vdc_dashboard_sals import get_deployments
import json
class KubeappsDeploy(Solu... | 41.297872 | 250 | 0.659969 |
1ce4d518b04fcba358a3c95f043b01f401d3a54b | 1,733 | py | Python | ibmsecurity/appliance/isamappliance_adminproxy.py | ibm-enio/ibmsecurity | 81f989678642c3b6a49b2a3fbb5d9ca98804ef17 | [
"Apache-2.0"
] | null | null | null | ibmsecurity/appliance/isamappliance_adminproxy.py | ibm-enio/ibmsecurity | 81f989678642c3b6a49b2a3fbb5d9ca98804ef17 | [
"Apache-2.0"
] | null | null | null | ibmsecurity/appliance/isamappliance_adminproxy.py | ibm-enio/ibmsecurity | 81f989678642c3b6a49b2a3fbb5d9ca98804ef17 | [
"Apache-2.0"
] | 1 | 2019-05-20T03:14:57.000Z | 2019-05-20T03:14:57.000Z | import json
import requests
from requests.packages.urllib3.exceptions import InsecureRequestWarning
import logging
from .ibmappliance import IBMAppliance
from .isamappliance import ISAMAppliance
from .ibmappliance import IBMError
class ISAMApplianceAdminProxy(ISAMAppliance):
def __init__(self, adminProxyHostname, ... | 41.261905 | 143 | 0.69071 |
1ce4ff1811624c9268aaec31ccd90750174fa19b | 9,117 | py | Python | AlphagoZero/mcts.py | sangyi92/alphago_zero | 6acd092e9b904eb725da031f8c5f8b4e1bdae111 | [
"MIT"
] | 10 | 2017-11-14T14:30:44.000Z | 2019-11-11T06:59:36.000Z | AlphagoZero/mcts.py | sangyi92/alphago_zero | 6acd092e9b904eb725da031f8c5f8b4e1bdae111 | [
"MIT"
] | 1 | 2018-02-02T10:12:37.000Z | 2018-02-02T10:20:53.000Z | AlphagoZero/mcts.py | sangyi92/alphago_zero | 6acd092e9b904eb725da031f8c5f8b4e1bdae111 | [
"MIT"
] | 8 | 2017-11-22T01:22:50.000Z | 2019-03-27T09:04:13.000Z | """Monte Carlo Tree Search, as described in Silver et al 2017.
This is a "pure" implementation of the AlphaGo MCTS algorithm in that it is not specific to the
game of Go; everything in this file is implemented generically with respect to some state, actions,
policy function, and value function.
"""
import numpy as np
... | 40.52 | 114 | 0.621038 |
1ce5286af902340ceb7c6b1c268b3572b5725755 | 84 | py | Python | feature_selection/version.py | FragileTech/feature_selection | dc7c4a8e76e4ca2e60fd3f729b911571796e8439 | [
"MIT"
] | null | null | null | feature_selection/version.py | FragileTech/feature_selection | dc7c4a8e76e4ca2e60fd3f729b911571796e8439 | [
"MIT"
] | 3 | 2022-01-11T11:51:59.000Z | 2022-01-28T14:07:36.000Z | mloq/version.py | Guillemdb/ml-ops-quickstart | eed74cf65a73272d4fbcf0c93b2417f29374cd6e | [
"MIT"
] | null | null | null | """Current version of the project. Do not modify manually."""
__version__ = "0.0.1"
| 28 | 61 | 0.702381 |
1ce54bbf21504d5b0877216eb93811f71d7bfbd5 | 3,788 | py | Python | gender-age/face_model.py | dwhite54/insightface | ea172e4921c3960c0684404afff6d0d862447eae | [
"MIT"
] | 18 | 2018-04-13T02:55:03.000Z | 2020-10-12T01:37:52.000Z | gender-age/face_model.py | dwhite54/insightface | ea172e4921c3960c0684404afff6d0d862447eae | [
"MIT"
] | 3 | 2020-07-31T02:01:33.000Z | 2021-05-26T02:55:52.000Z | gender-age/face_model.py | dwhite54/insightface | ea172e4921c3960c0684404afff6d0d862447eae | [
"MIT"
] | 7 | 2018-08-29T06:41:19.000Z | 2019-09-11T06:10:39.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from scipy import misc
import sys
import os
import argparse
#import tensorflow as tf
import numpy as np
import mxnet as mx
import random
import cv2
import sklearn
from sklearn.decomposition import PCA
from time... | 34.436364 | 145 | 0.560454 |
1ce581fa7a1e70d3194f94dc0904b270f5794399 | 2,226 | py | Python | train_demo.py | stevezhangz/BERT-pytorch | 86e1d9f20c48306eeb8b6790977a575fc97bed77 | [
"Apache-2.0"
] | null | null | null | train_demo.py | stevezhangz/BERT-pytorch | 86e1d9f20c48306eeb8b6790977a575fc97bed77 | [
"Apache-2.0"
] | null | null | null | train_demo.py | stevezhangz/BERT-pytorch | 86e1d9f20c48306eeb8b6790977a575fc97bed77 | [
"Apache-2.0"
] | null | null | null | # encode utf-8
# code by steve zhang z
# Time: 4/22/2021
# electric address: stevezhangz@163.com
from bert import *
import torch
import torch.nn as nn
import torch.optim as optim
from Config_load import *
from data_process import *
import random
np.random.seed(random_seed)
# transform json to list
#json2list=genera... | 33.223881 | 106 | 0.611411 |
1ce5826c8790d55e7d12b47d629cd4cfb77365fc | 91 | py | Python | src/petclaw/solution.py | arashb/pyclaw | dbe0bc28ed801b16c501bdff58012c30f7a90b9f | [
"BSD-3-Clause"
] | 1 | 2018-03-26T11:51:17.000Z | 2018-03-26T11:51:17.000Z | src/petclaw/solution.py | arashb/pyclaw | dbe0bc28ed801b16c501bdff58012c30f7a90b9f | [
"BSD-3-Clause"
] | null | null | null | src/petclaw/solution.py | arashb/pyclaw | dbe0bc28ed801b16c501bdff58012c30f7a90b9f | [
"BSD-3-Clause"
] | null | null | null | from clawpack.pyclaw.solution import Solution
class Solution(Solution):
"Dummy class"
| 18.2 | 45 | 0.78022 |
1ce5865c987663dc5129e152c0832a944b17f5d3 | 19,357 | py | Python | traffic/core/flightplan.py | MichelKhalaf/traffic | 84e315d84a4ab9d8711414e7c275733e27a089ed | [
"MIT"
] | null | null | null | traffic/core/flightplan.py | MichelKhalaf/traffic | 84e315d84a4ab9d8711414e7c275733e27a089ed | [
"MIT"
] | null | null | null | traffic/core/flightplan.py | MichelKhalaf/traffic | 84e315d84a4ab9d8711414e7c275733e27a089ed | [
"MIT"
] | null | null | null | import re
import textwrap
import warnings
from functools import lru_cache
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union, cast
from shapely.geometry import LineString
from shapely.ops import linemerge
from .mixins import PointMixin, ShapelyMixin
from .structure import Airport, Navaid, Route
if TY... | 30.676704 | 87 | 0.501989 |
1ce5a47f7ff1a6abe29e300ce9baa0af0d3dc1e5 | 238 | py | Python | libraries/website/docs/snippets/cas/tokenizer_tokenize.py | justindujardin/mathy | 776ac528d4586d6ea558a7212adb3559ea487a3c | [
"MIT"
] | 95 | 2020-01-02T23:02:34.000Z | 2022-03-08T18:57:24.000Z | libraries/website/docs/snippets/cas/tokenizer_tokenize.py | justindujardin/mathy | 776ac528d4586d6ea558a7212adb3559ea487a3c | [
"MIT"
] | 44 | 2020-01-05T03:07:45.000Z | 2021-08-11T20:45:53.000Z | libraries/website/docs/snippets/cas/tokenizer_tokenize.py | justindujardin/mathy | 776ac528d4586d6ea558a7212adb3559ea487a3c | [
"MIT"
] | 5 | 2020-04-04T16:46:36.000Z | 2022-03-30T08:10:02.000Z | from typing import List
from mathy_core import Token, Tokenizer
text = "4x + 2x^3 * 7x"
tokenizer = Tokenizer()
tokens: List[Token] = tokenizer.tokenize(text)
for token in tokens:
print(f"type: {token.type}, value: {token.value}")
| 21.636364 | 54 | 0.710084 |
1ce5b3bcbf9e51bb4cf9a404fde25d05b8f449de | 508 | py | Python | example/public/test/__init__.py | tml/pyxer | 4e3677b3f2c7f23ebf039a9ba9733f68a8460189 | [
"MIT"
] | 2 | 2016-01-25T06:01:14.000Z | 2016-02-07T20:30:25.000Z | example/public/test/__init__.py | tml/pyxer | 4e3677b3f2c7f23ebf039a9ba9733f68a8460189 | [
"MIT"
] | 2 | 2018-03-21T06:27:50.000Z | 2018-03-22T12:57:58.000Z | example/public/test/__init__.py | tml/pyxer | 4e3677b3f2c7f23ebf039a9ba9733f68a8460189 | [
"MIT"
] | null | null | null | # -*- coding: UTF-8 -*-
#############################################
## (C)opyright by Dirk Holtwick, 2008 ##
## All rights reserved ##
#############################################
from pyxer.base import *
import sys
import os
import logging
import pyxer
log = logging.getLogger(__name__)
h... | 21.166667 | 46 | 0.521654 |
1ce5b495db84c7f9b41127db91f7bcd1c5087154 | 1,590 | py | Python | instructors/lessons/exceptions/examples/exception2.py | mgadagin/PythonClass | 70b370362d75720b3fb0e1d6cc8158f9445e9708 | [
"MIT"
] | 46 | 2017-09-27T20:19:36.000Z | 2020-12-08T10:07:19.000Z | instructors/lessons/exceptions/examples/exception2.py | mgadagin/PythonClass | 70b370362d75720b3fb0e1d6cc8158f9445e9708 | [
"MIT"
] | 6 | 2018-01-09T08:07:37.000Z | 2020-09-07T12:25:13.000Z | instructors/lessons/exceptions/examples/exception2.py | mgadagin/PythonClass | 70b370362d75720b3fb0e1d6cc8158f9445e9708 | [
"MIT"
] | 18 | 2017-10-10T02:06:51.000Z | 2019-12-01T10:18:13.000Z | """
Course: Exceptions
Topic: try... except... finally
Summary: Introduce finally. Finally allows us to 'cleanly finish' what we are doing in the try
block, after an except block. In this example, the code is opened for write, but mistakenly read from.
Takeaways: Finally can be used to finish up what you are doing w... | 37.857143 | 121 | 0.686792 |
1ce5bf85631d956df77235bb64dc19ab98394bfe | 110,801 | py | Python | python/ray/tests/test_basic.py | mslapek/ray | 425edb5cd99417f00aed5bca5bca6a6d9e8292a2 | [
"Apache-2.0"
] | 1 | 2020-02-05T07:12:29.000Z | 2020-02-05T07:12:29.000Z | python/ray/tests/test_basic.py | mslapek/ray | 425edb5cd99417f00aed5bca5bca6a6d9e8292a2 | [
"Apache-2.0"
] | null | null | null | python/ray/tests/test_basic.py | mslapek/ray | 425edb5cd99417f00aed5bca5bca6a6d9e8292a2 | [
"Apache-2.0"
] | 1 | 2020-01-04T06:01:33.000Z | 2020-01-04T06:01:33.000Z | # coding: utf-8
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import collections
from concurrent.futures import ThreadPoolExecutor
import glob
import io
import json
import logging
import os
import random
import re
import setproctitle
import shutil
import s... | 29.499734 | 79 | 0.608884 |
1ce5fef04ea3a8a44cdc39e4ed49b8f0bee6244a | 7,970 | py | Python | blatann/gap/advertising.py | dkkeller/blatann | 2b72df4812f68fb718ab96d16c82343ee35969a5 | [
"BSD-3-Clause"
] | null | null | null | blatann/gap/advertising.py | dkkeller/blatann | 2b72df4812f68fb718ab96d16c82343ee35969a5 | [
"BSD-3-Clause"
] | null | null | null | blatann/gap/advertising.py | dkkeller/blatann | 2b72df4812f68fb718ab96d16c82343ee35969a5 | [
"BSD-3-Clause"
] | null | null | null | import logging
from blatann.nrf import nrf_events, nrf_types
from blatann import exceptions
from blatann.waitables.connection_waitable import ClientConnectionWaitable
from blatann.event_type import Event, EventSource
from blatann.gap.advertise_data import AdvertisingData, AdvertisingFlags
logger = logging.get... | 42.393617 | 139 | 0.666625 |
1ce60ff22622dc140444c905f2ce450f76765ed3 | 1,676 | py | Python | example.py | offish/steam_community_market | c31b76fe32c9061bb7650d5a7f6cb94014db9714 | [
"MIT"
] | 25 | 2019-10-15T23:23:09.000Z | 2022-01-05T20:40:59.000Z | example.py | offish/steam_community_market | c31b76fe32c9061bb7650d5a7f6cb94014db9714 | [
"MIT"
] | 5 | 2020-01-07T12:17:32.000Z | 2021-11-15T04:08:10.000Z | example.py | offish/steam_community_market | c31b76fe32c9061bb7650d5a7f6cb94014db9714 | [
"MIT"
] | 6 | 2020-01-05T12:01:21.000Z | 2022-02-01T16:15:07.000Z | from steam_community_market import Market, ESteamCurrency, AppID
market = Market(ESteamCurrency.NOK) # Could either be: 'NOK', 'nok' or 9.
# For USD; leave it empty or use ESteamCurrency.USD, 'USD', 'usd' or 1.
# get_overview
# Example using get_overview
print(market.get_overview("Mann Co. Supply Crate Key... | 31.622642 | 130 | 0.673031 |
1ce681503735a60adcc0a6aee765b154ed2b4e95 | 1,242 | py | Python | api/authentication.py | gfoo/fastapi-demo | 44ceb9e94fa833841756136c3b446f192a311dde | [
"Unlicense"
] | null | null | null | api/authentication.py | gfoo/fastapi-demo | 44ceb9e94fa833841756136c3b446f192a311dde | [
"Unlicense"
] | null | null | null | api/authentication.py | gfoo/fastapi-demo | 44ceb9e94fa833841756136c3b446f192a311dde | [
"Unlicense"
] | null | null | null | from core.security import create_access_token, verify_password
from db import users as DBUsers
from fastapi import APIRouter, HTTPException, status
from fastapi.param_functions import Depends
from fastapi.security.oauth2 import OAuth2PasswordRequestForm
from sqlalchemy.orm.session import Session
from .deps import get_... | 32.684211 | 80 | 0.724638 |
1ce693000f2fb6b7d29cdc06fc0c2059eed4d58f | 666 | py | Python | repost/database.py | pckv/fastapi-backend | 0f561528086ac3fdcabbf9efeac888421eeb66de | [
"MIT"
] | 9 | 2020-02-03T11:17:06.000Z | 2021-06-15T13:20:34.000Z | repost/database.py | pckv/fastapi-backend | 0f561528086ac3fdcabbf9efeac888421eeb66de | [
"MIT"
] | 40 | 2020-02-03T11:23:59.000Z | 2020-05-19T08:05:41.000Z | repost/database.py | pckv/fastapi-backend | 0f561528086ac3fdcabbf9efeac888421eeb66de | [
"MIT"
] | 1 | 2020-03-11T02:47:40.000Z | 2020-03-11T02:47:40.000Z | from sqlalchemy import create_engine
from sqlalchemy.engine.url import make_url
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
from repost import config
url = make_url(config.database_url)
connect_args = {}
# SQLite driver only allows one thread by default to prevent ... | 30.272727 | 75 | 0.810811 |
1ce69438349bbadf09adbcd21180b75caf05cd07 | 11,262 | py | Python | extras/classic_number.py | shamilison/django-classic | a3f7e9e12787329a5b191b3b2f80cdd03bf3b77c | [
"Apache-2.0"
] | null | null | null | extras/classic_number.py | shamilison/django-classic | a3f7e9e12787329a5b191b3b2f80cdd03bf3b77c | [
"Apache-2.0"
] | null | null | null | extras/classic_number.py | shamilison/django-classic | a3f7e9e12787329a5b191b3b2f80cdd03bf3b77c | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
import re
def parse_number(text):
"""
Return the first number in the given text for any locale.
TODO we actually don't take into account spaces for only
3-digited numbers (like "1 000") so, for now, "1 0" is 10.
TODO parse cases like "125,000.1,0.2" (125000.1).
... | 31.196676 | 135 | 0.525129 |
1ce6a265a93dcb69eef408c7953a68dbc10663ef | 3,297 | py | Python | sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/_configuration.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2021-09-07T18:39:05.000Z | 2021-09-07T18:39:05.000Z | sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/_configuration.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/_configuration.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.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 ... | 47.782609 | 132 | 0.694571 |
1ce6e614002f9c424fd6316ca77c9f2d14dd0cfb | 5,919 | py | Python | dserver/dserver.py | dandk105/Asyncpyserver | 228671a7299214b503f440b8dea2773c3769e618 | [
"MIT"
] | null | null | null | dserver/dserver.py | dandk105/Asyncpyserver | 228671a7299214b503f440b8dea2773c3769e618 | [
"MIT"
] | null | null | null | dserver/dserver.py | dandk105/Asyncpyserver | 228671a7299214b503f440b8dea2773c3769e618 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# tab level: 4
#!/usr/bin/env python3.8
"""If an argument exists, it will be used to set up to the host server.\n
this module is providing basic socket server processing.
this server provide traditional socket chat between which and clients.
"""
import logging
import socket
import threading
imp... | 28.052133 | 75 | 0.55702 |
1ce700ad2717cc91fc24687c8c07a00a3f894431 | 460 | py | Python | abc/abc029/c/main.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | 2 | 2022-01-22T07:56:58.000Z | 2022-01-24T00:29:37.000Z | abc/abc029/c/main.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | abc/abc029/c/main.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | import sys
import math
from collections import defaultdict, deque
sys.setrecursionlimit(10 ** 6)
stdin = sys.stdin
INF = float('inf')
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().strip()
def dfs(cnt, s):
if cnt == N:
ans.append(s)
else:
... | 18.4 | 53 | 0.571739 |
1ce729a06eaf4d544d293bbaddc25f5edb6d60d8 | 2,321 | py | Python | yaksh/bash_stdio_evaluator.py | patilnayan92/online | 0f9a8d8da5aa84a408a9a8e5825a045f6c86f481 | [
"Python-2.0"
] | 2 | 2019-03-06T02:17:25.000Z | 2019-10-03T17:43:26.000Z | yaksh/bash_stdio_evaluator.py | patilnayan92/online | 0f9a8d8da5aa84a408a9a8e5825a045f6c86f481 | [
"Python-2.0"
] | null | null | null | yaksh/bash_stdio_evaluator.py | patilnayan92/online | 0f9a8d8da5aa84a408a9a8e5825a045f6c86f481 | [
"Python-2.0"
] | 4 | 2019-02-01T16:10:40.000Z | 2020-08-30T02:44:39.000Z | #!/usr/bin/env python
from __future__ import unicode_literals
import subprocess
import os
from os.path import isfile
#local imports
from .stdio_evaluator import StdIOEvaluator
from .file_utils import copy_files, delete_files
class BashStdIOEvaluator(StdIOEvaluator):
"""Evaluates Bash StdIO based code"""
def ... | 38.04918 | 79 | 0.593279 |
1ce74309ad131377433092b8a3181576e708db65 | 578 | py | Python | servers/rest/api.py | ericharmeling/photoblocks | b5c61e4d5b459336145647c877daa5d27a8440e6 | [
"MIT"
] | 2 | 2018-06-21T13:57:09.000Z | 2018-07-11T01:38:07.000Z | servers/rest/api.py | ericharmeling/photoblocks | b5c61e4d5b459336145647c877daa5d27a8440e6 | [
"MIT"
] | null | null | null | servers/rest/api.py | ericharmeling/photoblocks | b5c61e4d5b459336145647c877daa5d27a8440e6 | [
"MIT"
] | 1 | 2018-11-21T21:13:03.000Z | 2018-11-21T21:13:03.000Z | #!/usr/bin/env python3
import logging
import json
from servers.rest.resources import PackResource, PeerResource, ChainResource, MineResource
import falcon
#import bjoern
def api(pack, db):
app = falcon.API()
app.add_route('/pack', PackResource(pack=pack, db=db))
app.add_route('/nodes', PeerResource(pack=pa... | 34 | 90 | 0.716263 |
1ce75de4c4734594b16b440d0952a5eff7ed75e9 | 5,519 | py | Python | oscar/lib/python2.7/site-packages/pip/_vendor/colorama/win32.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | 5 | 2016-01-02T05:23:37.000Z | 2017-07-01T13:53:36.000Z | oscar/lib/python2.7/site-packages/pip/_vendor/colorama/win32.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | 1 | 2016-06-28T08:43:59.000Z | 2016-07-07T20:28:43.000Z | oscar/lib/python2.7/site-packages/pip/_vendor/colorama/win32.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | # Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file.
# from winbase.h
STDOUT = -11
STDERR = -12
try:
import ctypes
from ctypes import LibraryLoader
windll = LibraryLoader(ctypes.WinDLL)
from ctypes import wintypes
except (AttributeError, ImportError):
windll = Non... | 35.606452 | 112 | 0.640515 |
1ce76d9dc5fbb9babbe14f14f164cc7d79aa276b | 5,495 | py | Python | homeassistant/components/plum_lightpad/light.py | marioedani/homeassistant-core | 2bc5db857ec6aa605ea7ff363654db2109f7cec4 | [
"Apache-2.0"
] | 7 | 2019-02-07T14:14:12.000Z | 2019-07-28T06:56:10.000Z | homeassistant/components/plum_lightpad/light.py | tomachristian/core | 71c8fcee20c55536b33c3ee774c76c1795f37cd2 | [
"Apache-2.0"
] | 6 | 2021-02-08T20:54:31.000Z | 2022-03-12T00:50:43.000Z | homeassistant/components/plum_lightpad/light.py | tomachristian/core | 71c8fcee20c55536b33c3ee774c76c1795f37cd2 | [
"Apache-2.0"
] | 2 | 2020-04-19T13:35:24.000Z | 2020-04-19T13:35:51.000Z | """Support for Plum Lightpad lights."""
from homeassistant.components.light import (
ATTR_BRIGHTNESS,
ATTR_HS_COLOR,
SUPPORT_BRIGHTNESS,
SUPPORT_COLOR,
Light,
)
import homeassistant.util.color as color_util
from . import PLUM_DATA
async def async_setup_platform(hass, config, async_add_entities, d... | 30.192308 | 86 | 0.635851 |
1ce7992fbdd887d5e3904efa753c8d36e1bae9f3 | 10,769 | py | Python | thermoapp/reports/views.py | p1gm1/MaintenaceAid | 272bb385c08ec0553f3e6e81bc29c7ab8d315dd3 | [
"MIT"
] | null | null | null | thermoapp/reports/views.py | p1gm1/MaintenaceAid | 272bb385c08ec0553f3e6e81bc29c7ab8d315dd3 | [
"MIT"
] | null | null | null | thermoapp/reports/views.py | p1gm1/MaintenaceAid | 272bb385c08ec0553f3e6e81bc29c7ab8d315dd3 | [
"MIT"
] | null | null | null | # Django
from django.http import JsonResponse
from django.urls import reverse
from django.core.paginator import Paginator
from django.contrib.auth.mixins import LoginRequiredMixin
from django.views.generic.edit import CreateView, FormView, UpdateView
from django.views.generic.list import ListView
from django.views.gen... | 34.296178 | 119 | 0.587891 |
1ce7ceb8675f1fa1a189dbb17b7ff1778a973c70 | 226 | py | Python | shared_nearest_neighbors/__init__.py | felipeangelimvieira/SharedNearestNeighbors- | 471d6f93f157c2681a3bb4c5143285d66230adf5 | [
"MIT"
] | null | null | null | shared_nearest_neighbors/__init__.py | felipeangelimvieira/SharedNearestNeighbors- | 471d6f93f157c2681a3bb4c5143285d66230adf5 | [
"MIT"
] | null | null | null | shared_nearest_neighbors/__init__.py | felipeangelimvieira/SharedNearestNeighbors- | 471d6f93f157c2681a3bb4c5143285d66230adf5 | [
"MIT"
] | null | null | null | """Top-level package for Shared Nearest Neighbors."""
__author__ = """Felipe L Angelim Vieira"""
__email__ = 'felipeangelim@gmail.com'
__version__ = '0.1.1'
from .shared_nearest_neighbors import SNN, snn_dissimilarity_func
| 25.111111 | 65 | 0.765487 |
1ce7fce16c1c3c9f72f2dcdd616e41d0fa4b7c6a | 4,943 | py | Python | src/sardana/tango/macroserver/test/base.py | marc2332/sardana | 48dc9191baaa63f6c714d8c025e8f3f96548ad26 | [
"CC-BY-3.0"
] | 43 | 2016-11-25T15:21:23.000Z | 2021-08-20T06:09:40.000Z | src/sardana/tango/macroserver/test/base.py | marc2332/sardana | 48dc9191baaa63f6c714d8c025e8f3f96548ad26 | [
"CC-BY-3.0"
] | 1,263 | 2016-11-25T15:58:37.000Z | 2021-11-02T22:23:47.000Z | src/sardana/tango/macroserver/test/base.py | marc2332/sardana | 48dc9191baaa63f6c714d8c025e8f3f96548ad26 | [
"CC-BY-3.0"
] | 58 | 2016-11-21T11:33:55.000Z | 2021-09-01T06:21:21.000Z | #!/usr/bin/env python
##############################################################################
##
# This file is part of Sardana
##
# http://www.tango-controls.org/static/sardana/latest/doc/html/index.html
##
# Copyright 2011 CELLS / ALBA Synchrotron, Bellaterra, Spain
##
# Sardana is free software: you can redi... | 37.732824 | 78 | 0.607526 |
1ce80f7ff839f603b4e9e2fc8f663a199d3ab03e | 2,173 | py | Python | src/python/pants/backend/python/tasks/python_run.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | src/python/pants/backend/python/tasks/python_run.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | src/python/pants/backend/python/tasks/python_run.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2016 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import absolute_import, division, print_function, unicode_literals
import os
import signal
from pants.backend.python.targets.python_binary import PythonBin... | 36.830508 | 91 | 0.671422 |
1ce85119eb3706e7d2be9991c341060d4ac5d572 | 4,695 | py | Python | tests/test_optimizers.py | abdelq/pybaselines | 043aa7875efe1ca01c3e8e9ae7c57a67274aff06 | [
"BSD-3-Clause-Clear",
"BSD-3-Clause"
] | null | null | null | tests/test_optimizers.py | abdelq/pybaselines | 043aa7875efe1ca01c3e8e9ae7c57a67274aff06 | [
"BSD-3-Clause-Clear",
"BSD-3-Clause"
] | null | null | null | tests/test_optimizers.py | abdelq/pybaselines | 043aa7875efe1ca01c3e8e9ae7c57a67274aff06 | [
"BSD-3-Clause-Clear",
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""Tests for pybaselines.optimizers.
@author: Donald Erb
Created on March 20, 2021
"""
import numpy as np
from numpy.testing import assert_array_almost_equal
import pytest
from pybaselines import optimizers
from .conftest import get_data, AlgorithmTester
@pytest.mark.parametrize('method',... | 31.938776 | 92 | 0.665602 |
1ce8529eee6ef677a9a6a1e3d7eae10f570f4486 | 1,307 | py | Python | nemo_text_processing/text_normalization/en/__init__.py | JMichaelStringer/NeMo | b5b29a69ccb0ec3d8c9ace2f33872ee99858a559 | [
"Apache-2.0"
] | 2 | 2021-06-23T19:16:59.000Z | 2022-02-23T18:49:07.000Z | nemo_text_processing/text_normalization/en/__init__.py | JMichaelStringer/NeMo | b5b29a69ccb0ec3d8c9ace2f33872ee99858a559 | [
"Apache-2.0"
] | null | null | null | nemo_text_processing/text_normalization/en/__init__.py | JMichaelStringer/NeMo | b5b29a69ccb0ec3d8c9ace2f33872ee99858a559 | [
"Apache-2.0"
] | 1 | 2022-01-07T03:39:11.000Z | 2022-01-07T03:39:11.000Z | # Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 38.441176 | 100 | 0.780413 |
1ce865d93d56adc19144bd92e8629a1d0a2fc761 | 10,990 | py | Python | botoflow/data_converter/json_data_converter.py | boto/botoflow | 49d8ed3bc9c57294504be82e933a051e1901b76e | [
"Apache-2.0"
] | 13 | 2016-06-15T06:10:57.000Z | 2021-10-30T03:52:28.000Z | botoflow/data_converter/json_data_converter.py | DalavanCloud/botoflow | 49d8ed3bc9c57294504be82e933a051e1901b76e | [
"Apache-2.0"
] | 11 | 2016-09-15T01:48:08.000Z | 2019-01-09T06:11:44.000Z | botoflow/data_converter/json_data_converter.py | DalavanCloud/botoflow | 49d8ed3bc9c57294504be82e933a051e1901b76e | [
"Apache-2.0"
] | 16 | 2016-06-05T03:42:04.000Z | 2022-03-01T17:43:14.000Z | # Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License").
# You may not use this file except in compliance with the License.
# A copy of the License is located at
#
# http://aws.amazon.com/apache2.0
#
# or in the "license" file accompa... | 35.451613 | 96 | 0.598544 |
1ce8c6e657c74b2c4898151f29da31c7f960454e | 17,585 | py | Python | scan/scan_manager.py | korenlev/calipso-cvim | 39278a5cf09c40b26a8a143ccc0c8d437961abc2 | [
"Apache-2.0"
] | null | null | null | scan/scan_manager.py | korenlev/calipso-cvim | 39278a5cf09c40b26a8a143ccc0c8d437961abc2 | [
"Apache-2.0"
] | null | null | null | scan/scan_manager.py | korenlev/calipso-cvim | 39278a5cf09c40b26a8a143ccc0c8d437961abc2 | [
"Apache-2.0"
] | null | null | null | ###############################################################################
# Copyright (c) 2017-2020 Koren Lev (Cisco Systems), #
# Yaron Yogev (Cisco Systems), Ilia Abashin (Cisco Systems) and others #
# #
... | 45.794271 | 118 | 0.5648 |
1ce8dc69f7679d4ac68ca743bd0fcd8490bee781 | 4,063 | py | Python | loss_funs.py | wileyw/VideoGAN | d5c40ce4180b63d9dc6017a8caf19cfd63166a96 | [
"MIT"
] | 5 | 2019-01-27T21:00:19.000Z | 2021-09-08T11:00:37.000Z | loss_funs.py | mswang12/VideoGAN | d5c40ce4180b63d9dc6017a8caf19cfd63166a96 | [
"MIT"
] | 2 | 2018-08-22T04:06:11.000Z | 2019-08-01T18:56:20.000Z | loss_funs.py | mswang12/VideoGAN | d5c40ce4180b63d9dc6017a8caf19cfd63166a96 | [
"MIT"
] | 3 | 2019-02-17T00:41:19.000Z | 2019-09-03T17:30:12.000Z | import config
import torch
import torch.nn as nn
import numpy as np
dtype = config.dtype
def combined_loss(
gen_frames, gt_frames, d_preds, lam_adv=1, lam_lp=1, lam_gdl=1, l_num=2, alpha=2
):
"""
Calculates the sum of the combined adversarial, lp and GDL losses in the given
proportion. Used for trai... | 35.025862 | 88 | 0.633522 |
1ce8ed4172eb82ddf09cd763b6a236513b3aef5d | 2,996 | py | Python | sdks/python/appcenter_sdk/models/BugTrackerTokenId.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | null | null | null | sdks/python/appcenter_sdk/models/BugTrackerTokenId.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 6 | 2019-10-23T06:38:53.000Z | 2022-01-22T07:57:58.000Z | sdks/python/appcenter_sdk/models/BugTrackerTokenId.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
"""
import pprint
import re # noqa: F401
import six
class BugTrackerToke... | 27.486239 | 80 | 0.565421 |
1ce90bcf9cca48747d92069cf774a17675ec8f4c | 6,095 | py | Python | suspect/io/rda.py | bennyrowland/suspect | c09ab0a5013c5a199218214cdd791659243d7e41 | [
"MIT"
] | 5 | 2017-09-26T16:05:30.000Z | 2020-11-28T01:31:27.000Z | suspect/io/rda.py | bennyrowland/suspect | c09ab0a5013c5a199218214cdd791659243d7e41 | [
"MIT"
] | 6 | 2016-08-31T22:09:33.000Z | 2018-11-30T18:37:09.000Z | suspect/io/rda.py | bennyrowland/suspect | c09ab0a5013c5a199218214cdd791659243d7e41 | [
"MIT"
] | 2 | 2016-06-09T18:10:18.000Z | 2020-12-12T02:50:32.000Z | from suspect import MRSData, transformation_matrix
import numpy
import struct
import re
# The RDA format consists of a large number of key value pairs followed by raw
# data. The values need to be cast into different datatypes depending on the
# key, this dictionary stores a mapping of key to datatype.
rda_types = {... | 48.373016 | 123 | 0.603117 |
1ce92c186f543dfb91edb931fcdab98a16071b6e | 7,222 | py | Python | table_manager_worker_productivity.py | pdturney/management-theory | 1701a334d00bb6c1a3d6c3995e4fad1383e4c398 | [
"MIT"
] | null | null | null | table_manager_worker_productivity.py | pdturney/management-theory | 1701a334d00bb6c1a3d6c3995e4fad1383e4c398 | [
"MIT"
] | null | null | null | table_manager_worker_productivity.py | pdturney/management-theory | 1701a334d00bb6c1a3d6c3995e4fad1383e4c398 | [
"MIT"
] | null | null | null | #
# Table Manager Worker Productivity
#
# Peter Turney, February 28, 2021
#
# Run all 844 fusion seeds and store the results internally in
# a numpy tensor:
#
# tensor = 844 fusions x 1001 time steps x 5 colours
#
# - 844 fusion events from 18 fusion_storage.bin files
# - 1001 times steps in the Management g... | 32.977169 | 76 | 0.63722 |
1ce9324145af86d77d2de8efc6a1fa8aa0026c9c | 1,698 | py | Python | alipay/aop/api/domain/AlipayCommerceEducateSceneTokenApplyModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/AlipayCommerceEducateSceneTokenApplyModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/AlipayCommerceEducateSceneTokenApplyModel.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.constant.ParamConstants import *
from alipay.aop.api.domain.UserDetailDto import UserDetailDto
class AlipayCommerceEducateSceneTokenApplyModel(object):
def __init__(self):
self._biz_code = None
self._user_detail_info =... | 28.3 | 83 | 0.630742 |
1ce94da88e3958f5c1da3dc8cc02c8902692d717 | 101 | py | Python | dbbackup/management/commands/backup_media.py | leukeleu/django-dbbackup | 1c299e41f74fbb59fb50fb35f40ad86df1b9c6d1 | [
"BSD-3-Clause"
] | null | null | null | dbbackup/management/commands/backup_media.py | leukeleu/django-dbbackup | 1c299e41f74fbb59fb50fb35f40ad86df1b9c6d1 | [
"BSD-3-Clause"
] | null | null | null | dbbackup/management/commands/backup_media.py | leukeleu/django-dbbackup | 1c299e41f74fbb59fb50fb35f40ad86df1b9c6d1 | [
"BSD-3-Clause"
] | null | null | null | from .mediabackup import Command as MediaBackupCommand
class Command(MediaBackupCommand):
pass
| 16.833333 | 54 | 0.811881 |
1ce9545324ff36219e5bb013a05dbbdeed087993 | 30,697 | py | Python | sfepy/homogenization/engine.py | clazaro/sfepy | 78757a6989d6aaf85a3fb27957b9179c5e2aa2c7 | [
"BSD-3-Clause"
] | null | null | null | sfepy/homogenization/engine.py | clazaro/sfepy | 78757a6989d6aaf85a3fb27957b9179c5e2aa2c7 | [
"BSD-3-Clause"
] | null | null | null | sfepy/homogenization/engine.py | clazaro/sfepy | 78757a6989d6aaf85a3fb27957b9179c5e2aa2c7 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import, division
from copy import copy
from sfepy.base.base import output, get_default, Struct
from sfepy.applications import PDESolverApp, Application
from .coefs_base import MiniAppBase, CoefEval
from sfepy.discrete.evaluate import eval_equations
import sfepy.base.multiproc as multi
i... | 38.132919 | 79 | 0.523211 |
1ce95e2bff620c456edcae7a75c676b5edb2eb3e | 4,352 | py | Python | txweb2/dav/method/prop_common.py | eventable/CalendarServer | 384444edb1966b530bc391789afbe3fb9cd6fd3e | [
"Apache-2.0"
] | 1 | 2017-02-18T19:22:19.000Z | 2017-02-18T19:22:19.000Z | txweb2/dav/method/prop_common.py | eventable/CalendarServer | 384444edb1966b530bc391789afbe3fb9cd6fd3e | [
"Apache-2.0"
] | null | null | null | txweb2/dav/method/prop_common.py | eventable/CalendarServer | 384444edb1966b530bc391789afbe3fb9cd6fd3e | [
"Apache-2.0"
] | null | null | null | ##
# Copyright (c) 2006-2015 Apple Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | 35.966942 | 101 | 0.67693 |
1ce95f91a656bebe6d3f3ac5d8c32b7e9fbaaaee | 2,878 | py | Python | algorithms/say_number/__init__.py | JASTYN/pythonmaster | 46638ab09d28b65ce5431cd0759fe6df272fb85d | [
"Apache-2.0",
"MIT"
] | 3 | 2017-05-02T10:28:13.000Z | 2019-02-06T09:10:11.000Z | algorithms/say_number/__init__.py | JASTYN/pythonmaster | 46638ab09d28b65ce5431cd0759fe6df272fb85d | [
"Apache-2.0",
"MIT"
] | 2 | 2017-06-21T20:39:14.000Z | 2020-02-25T10:28:57.000Z | algorithms/say_number/__init__.py | JASTYN/pythonmaster | 46638ab09d28b65ce5431cd0759fe6df272fb85d | [
"Apache-2.0",
"MIT"
] | 2 | 2016-07-29T04:35:22.000Z | 2017-01-18T17:05:36.000Z | def say(number, recurse=False):
"""
Pseudo: create the variables that contain the string literals for the numbers
ones_teens: key,value pair with the integer and its word, from 0-20
tens: key value pairs for tens, 20, 30, 40...
thousands, millions, billions, trillions: contains, well, as the names s... | 42.323529 | 104 | 0.620222 |
1ce9b19b09e173f47babcf3eabc2c973e6cd3b2b | 1,032 | py | Python | user.py | martin-moringa/flask1 | 120886aecba563e786d2905c07395fa23f20849d | [
"MIT"
] | null | null | null | user.py | martin-moringa/flask1 | 120886aecba563e786d2905c07395fa23f20849d | [
"MIT"
] | null | null | null | user.py | martin-moringa/flask1 | 120886aecba563e786d2905c07395fa23f20849d | [
"MIT"
] | null | null | null | # import pyperclip
class User:
user_list = [] # list of users to be stored here
def __init__(self, user_name, email, password):
'''
saving user credentials into user_list for login
'''
self.user_name = user_name
self.email = email
self.password = password
... | 21.957447 | 73 | 0.547481 |
1ce9c44fab61683a12f04a8ce4b87951930d51f7 | 8,161 | py | Python | tests/test-cases/typeinfer_real_cases/pytest_io_terminalwriter.py | StarWatch27/Scalpel | 8853e6e84f318f3cfeda0e03d274748b2fbe30fa | [
"Apache-2.0"
] | 1 | 2022-01-12T06:00:32.000Z | 2022-01-12T06:00:32.000Z | tests/test-cases/typeinfer_real_cases/pytest_io_terminalwriter.py | StarWatch27/Scalpel | 8853e6e84f318f3cfeda0e03d274748b2fbe30fa | [
"Apache-2.0"
] | null | null | null | tests/test-cases/typeinfer_real_cases/pytest_io_terminalwriter.py | StarWatch27/Scalpel | 8853e6e84f318f3cfeda0e03d274748b2fbe30fa | [
"Apache-2.0"
] | null | null | null | """Helper functions for writing to terminals and files."""
import os
import shutil
import sys
from typing import Optional
from typing import Sequence
from typing import TextIO
from .pytest_io_wcwidth import wcswidth
from _pytest.compat import final
# This code was initially copied from py 1.8.1, file _io/terminalwri... | 35.025751 | 92 | 0.547114 |
1ce9ce8357743282ba6a5b79bf5695a5af277469 | 66,983 | py | Python | nevow/athena.py | mithrandi/nevow | aff713a6884a0ebf2214af5cfa3c1ea2d7d70669 | [
"MIT"
] | 49 | 2015-03-18T15:29:16.000Z | 2021-11-17T12:30:51.000Z | nevow/athena.py | mithrandi/nevow | aff713a6884a0ebf2214af5cfa3c1ea2d7d70669 | [
"MIT"
] | 62 | 2015-01-21T08:48:08.000Z | 2021-04-02T17:31:29.000Z | nevow/athena.py | mithrandi/nevow | aff713a6884a0ebf2214af5cfa3c1ea2d7d70669 | [
"MIT"
] | 30 | 2015-02-26T09:35:39.000Z | 2021-07-24T12:45:04.000Z | # -*- test-case-name: nevow.test.test_athena -*-
import itertools, os, re, warnings, StringIO
from zope.interface import implements
from twisted.internet import defer, error, reactor
from twisted.python import log, failure, context
from twisted.python.util import sibpath
from twisted import plugin
from nevow import... | 32.802644 | 119 | 0.631608 |
1ce9d2b87bbedc69fe927e98a6526331a39a04f7 | 24,218 | py | Python | homeassistant/helpers/script.py | mengwangk/home-assistant | 8f7e2ac41ffc969a825329e866c1e27d0e823bb0 | [
"Apache-2.0"
] | 2 | 2020-03-02T19:17:52.000Z | 2020-03-02T19:17:53.000Z | homeassistant/helpers/script.py | mengwangk/home-assistant | 8f7e2ac41ffc969a825329e866c1e27d0e823bb0 | [
"Apache-2.0"
] | 6 | 2021-02-08T21:05:36.000Z | 2022-03-12T00:54:00.000Z | homeassistant/helpers/script.py | mengwangk/home-assistant | 8f7e2ac41ffc969a825329e866c1e27d0e823bb0 | [
"Apache-2.0"
] | null | null | null | """Helpers to execute scripts."""
from abc import ABC, abstractmethod
import asyncio
from contextlib import suppress
from datetime import datetime
from itertools import islice
import logging
from typing import Any, Callable, Dict, List, Optional, Sequence, Set, Tuple, cast
import voluptuous as vol
from homeassistant ... | 32.551075 | 87 | 0.617846 |
1ce9dc5ff61e4c13e35c9550871defce71a29c5d | 421 | py | Python | test/unit/test_parse_account.py | 666Chao666/snowflake-connector-python | 81a10e522fcf19d45580c79bc066b7a4eab25485 | [
"Apache-2.0"
] | null | null | null | test/unit/test_parse_account.py | 666Chao666/snowflake-connector-python | 81a10e522fcf19d45580c79bc066b7a4eab25485 | [
"Apache-2.0"
] | 14 | 2021-01-26T06:53:10.000Z | 2022-03-14T11:16:54.000Z | test/unit/test_parse_account.py | 666Chao666/snowflake-connector-python | 81a10e522fcf19d45580c79bc066b7a4eab25485 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2012-2021 Snowflake Computing Inc. All right reserved.
#
from snowflake.connector.util_text import parse_account
def test_parse_account_basic():
assert parse_account('account1') == 'account1'
assert parse_account('account1.eu-central-1') == 'ac... | 26.3125 | 91 | 0.738717 |
1ce9e9d300fb79de432c5ad6e05df887cd825c62 | 1,771 | py | Python | cdk_pipelines_multi_branch/cicd/constructs/standard_bucket.py | aws-samples/multi-branch-cdk-pipelines | 1aaa08bedfa8a509af8109f22f217651c0270389 | [
"MIT-0"
] | 20 | 2021-10-08T09:53:40.000Z | 2022-03-30T10:22:10.000Z | cdk_pipelines_multi_branch/cicd/constructs/standard_bucket.py | aws-samples/multi-branch-cdk-pipelines | 1aaa08bedfa8a509af8109f22f217651c0270389 | [
"MIT-0"
] | null | null | null | cdk_pipelines_multi_branch/cicd/constructs/standard_bucket.py | aws-samples/multi-branch-cdk-pipelines | 1aaa08bedfa8a509af8109f22f217651c0270389 | [
"MIT-0"
] | 8 | 2021-10-24T00:51:57.000Z | 2022-03-29T08:35:41.000Z | from aws_cdk import App, RemovalPolicy
from aws_cdk.aws_iam import PolicyStatement, Effect, ServicePrincipal, AnyPrincipal
from aws_cdk.aws_kms import Key
from aws_cdk.aws_s3 import Bucket, BucketEncryption, BlockPublicAccess
from constructs import Construct
class S3Construct(Construct):
def __init__(self, app: A... | 38.5 | 83 | 0.5048 |
1cea88c1648db23639f82885fc29e436b37f54cf | 345 | py | Python | python/setup.py | Impavidity/pinfrastructure | b5577fe1e140e0b360aec2834349ba87647eb000 | [
"MIT"
] | 10 | 2017-12-04T03:50:50.000Z | 2020-09-25T07:24:32.000Z | python/setup.py | Impavidity/pinfrastructure | b5577fe1e140e0b360aec2834349ba87647eb000 | [
"MIT"
] | 8 | 2018-07-14T09:45:38.000Z | 2018-09-17T20:56:52.000Z | python/setup.py | Impavidity/pinfrastructure | b5577fe1e140e0b360aec2834349ba87647eb000 | [
"MIT"
] | 1 | 2017-11-24T18:31:53.000Z | 2017-11-24T18:31:53.000Z | from setuptools import find_packages, setup
setup(
name='pbase',
version='0.0.1',
author='Peng Shi',
author_email='peng_shi@outlook.com',
description='framework for deep learning applications',
url='https://github.com/Impavidity/pbase',
license='MIT',
install_requires=[
],
pac... | 20.294118 | 59 | 0.669565 |
1ceae33e347bba5dc46ce9f2878d83b664149e18 | 3,042 | py | Python | projects/api/ProjectsApi.py | chamathshashika/projects-python-wrappers | 33e9f6bccba16a581b115c582033a93d43bb159c | [
"MIT"
] | null | null | null | projects/api/ProjectsApi.py | chamathshashika/projects-python-wrappers | 33e9f6bccba16a581b115c582033a93d43bb159c | [
"MIT"
] | null | null | null | projects/api/ProjectsApi.py | chamathshashika/projects-python-wrappers | 33e9f6bccba16a581b115c582033a93d43bb159c | [
"MIT"
] | null | null | null | #$Id$
from projects.util.ZohoHttpClient import ZohoHttpClient
from projects.api.Api import Api
from projects.parser.ProjectsParser import ProjectsParser
base_url = Api().base_url
zoho_http_client = ZohoHttpClient()
parser = ProjectsParser()
class ProjectsApi:
"""Projects Api class is used to
1.Get all proje... | 28.166667 | 95 | 0.595989 |
1ceae4e56ce67710b84592354900692dd8422bf8 | 23,653 | py | Python | api/languages.py | NYPL-Simplified/dictionary-api | 282c1a7d0501786e97c6cf921dbdffa4da3ff598 | [
"Apache-2.0"
] | 1 | 2020-10-05T12:23:10.000Z | 2020-10-05T12:23:10.000Z | api/languages.py | NYPL-Simplified/dictionary-api | 282c1a7d0501786e97c6cf921dbdffa4da3ff598 | [
"Apache-2.0"
] | 4 | 2020-01-22T20:36:30.000Z | 2020-03-12T17:07:58.000Z | api/languages.py | NYPL-Simplified/dictionary-api | 282c1a7d0501786e97c6cf921dbdffa4da3ff598 | [
"Apache-2.0"
] | null | null | null | # encoding: utf-8
"""Data and functions for dealing with language names and codes."""
from nose.tools import set_trace
from collections import defaultdict
import re
class LookupTable(dict):
"""Return None on x[key] when 'key' isn't in the dictionary,
rather than raising a ValueError.
"""
def __getitem... | 32.851389 | 151 | 0.715765 |
1ceaf5d0d436eeab0b95ad7f3df44561f941fca3 | 71,554 | py | Python | roles/lib_openshift/library/oc_adm_policy_user.py | Ravichandramanupati/openshift | 1720af442f0b02359ce4cc70d32adca15d9d26ab | [
"Apache-2.0"
] | 1 | 2017-11-01T05:46:27.000Z | 2017-11-01T05:46:27.000Z | roles/lib_openshift/library/oc_adm_policy_user.py | gloria-sentinella/openshift-ansible | e03493f33073965ddf8c49256df80143059a2a51 | [
"Apache-2.0"
] | 3 | 2016-12-01T23:01:36.000Z | 2016-12-02T00:16:48.000Z | roles/lib_openshift/library/oc_adm_policy_user.py | gloria-sentinella/openshift-ansible | e03493f33073965ddf8c49256df80143059a2a51 | [
"Apache-2.0"
] | 1 | 2018-01-30T05:44:59.000Z | 2018-01-30T05:44:59.000Z | #!/usr/bin/env python
# pylint: disable=missing-docstring
# flake8: noqa: T001
# ___ ___ _ _ ___ ___ _ _____ ___ ___
# / __| __| \| | __| _ \ /_\_ _| __| \
# | (_ | _|| .` | _|| / / _ \| | | _|| |) |
# \___|___|_|\_|___|_|_\/_/_\_\_|_|___|___/_ _____
# | \ / _ \ | \| |/ _ \_ _| | __| \_ ... | 32.943831 | 118 | 0.556726 |
1ceb0cc0adca7d317265fefb9e0c27f687317492 | 2,549 | py | Python | tests_recording/test_local_project.py | majamassarini/packit | b319c4ac2321f012c17ab0b2d0ebfb6c8226eff0 | [
"MIT"
] | 81 | 2019-02-07T15:38:34.000Z | 2020-07-16T06:33:02.000Z | tests_recording/test_local_project.py | majamassarini/packit | b319c4ac2321f012c17ab0b2d0ebfb6c8226eff0 | [
"MIT"
] | 825 | 2019-02-07T15:08:16.000Z | 2020-08-02T08:11:23.000Z | tests_recording/test_local_project.py | majamassarini/packit | b319c4ac2321f012c17ab0b2d0ebfb6c8226eff0 | [
"MIT"
] | 51 | 2019-02-08T09:56:29.000Z | 2020-06-17T15:34:00.000Z | # Copyright Contributors to the Packit project.
# SPDX-License-Identifier: MIT
import distro
import pytest
from requre.cassette import DataTypes
from requre.modules_decorate_all_methods import (
record_tempfile_module,
# record_git_module,
record_requests_module,
)
from packit.local_project import LocalPr... | 35.402778 | 95 | 0.65869 |
1ceb17b6c20105af1b7f1b6ef3519a3ac539aa73 | 30,058 | py | Python | sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/_cdn_management_client_enums.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-01-24T08:54:57.000Z | 2022-01-24T08:54:57.000Z | sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/_cdn_management_client_enums.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/_cdn_management_client_enums.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | # 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 ... | 30.987629 | 111 | 0.718478 |
1ceb2a39bfd81450d4055ec47056f413a6530cb4 | 6,642 | py | Python | noisy_mnist/unit_test.py | self-supervisor/Escaping-Stochastic-Traps-With-Aleatoric-Mapping-Agents | b55d8d938fe4c313936c9a15e32b738b5d033809 | [
"MIT"
] | null | null | null | noisy_mnist/unit_test.py | self-supervisor/Escaping-Stochastic-Traps-With-Aleatoric-Mapping-Agents | b55d8d938fe4c313936c9a15e32b738b5d033809 | [
"MIT"
] | null | null | null | noisy_mnist/unit_test.py | self-supervisor/Escaping-Stochastic-Traps-With-Aleatoric-Mapping-Agents | b55d8d938fe4c313936c9a15e32b738b5d033809 | [
"MIT"
] | null | null | null | import numpy as np
import pytest
import torch
from noisy_mnist_aleatoric_uncertainty_for_poster import *
@pytest.fixture(scope="module", params=["train", "test"])
def noisy_mnist_env(request):
mnist_env = NoisyMnistEnv(request.param, 0, 2)
return mnist_env
@pytest.fixture(scope="module", params=["mse", "a... | 33.21 | 88 | 0.689551 |
1ceb2ba25a3d84ddb8dc1ccf238377636853dbec | 1,179 | py | Python | tests/unit/test_utils.py | cliffxuan/minikin | cff431cc1833f3212e1f87e039f86792f9f82510 | [
"MIT"
] | 2 | 2019-01-17T06:12:47.000Z | 2020-02-29T10:17:13.000Z | tests/unit/test_utils.py | cliffxuan/minikin | cff431cc1833f3212e1f87e039f86792f9f82510 | [
"MIT"
] | 5 | 2021-06-01T22:57:36.000Z | 2021-11-21T09:32:07.000Z | tests/unit/test_utils.py | cliffxuan/minikin | cff431cc1833f3212e1f87e039f86792f9f82510 | [
"MIT"
] | 1 | 2020-05-10T20:27:18.000Z | 2020-05-10T20:27:18.000Z | # -*- coding: utf-8 -*-
import pytest
from minikin.utils import base62_encode, generate_slug, validate_url
@pytest.mark.parametrize('num,expected', [
(0, '0'),
(9, '9'),
(10, 'a'),
(35, 'z'),
(36, 'A'),
(61, 'Z'),
(62, '10'),
(3843, 'ZZ'),
])
def test_base62_encode(num, expected):
... | 22.673077 | 68 | 0.600509 |
1ceb374012da251d1fa1b28d9dcdaa429719258a | 4,790 | py | Python | mythril/laser/ethereum/svm.py | tintinweb/mythril | 88873206d1311c02ca95c685209060b0584f4d79 | [
"MIT"
] | null | null | null | mythril/laser/ethereum/svm.py | tintinweb/mythril | 88873206d1311c02ca95c685209060b0584f4d79 | [
"MIT"
] | null | null | null | mythril/laser/ethereum/svm.py | tintinweb/mythril | 88873206d1311c02ca95c685209060b0584f4d79 | [
"MIT"
] | null | null | null | from z3 import BitVec
import logging
from mythril.laser.ethereum.state import GlobalState, Environment, CalldataType, Account
from mythril.laser.ethereum.instructions import Instruction
from mythril.laser.ethereum.cfg import NodeFlags, Node, Edge, JumpType
from mythril.laser.ethereum.strategy.basic import DepthFirstSea... | 36.015038 | 122 | 0.650313 |
1ceb38edb94b3bef2ee90b909110701f4039885b | 2,514 | py | Python | losing_connect_four/dqn_components/abc.py | nicolas-chan-42/COMP-3359-Project-Deep-Q-RL | 6e9098e6d55b8a813b27efc871f179ffeb2cfa9c | [
"MIT"
] | null | null | null | losing_connect_four/dqn_components/abc.py | nicolas-chan-42/COMP-3359-Project-Deep-Q-RL | 6e9098e6d55b8a813b27efc871f179ffeb2cfa9c | [
"MIT"
] | 1 | 2020-05-02T15:24:23.000Z | 2020-05-02T15:24:23.000Z | losing_connect_four/dqn_components/abc.py | nicolas-chan-42/COMP-3359-Project-Deep-Q-RL | 6e9098e6d55b8a813b27efc871f179ffeb2cfa9c | [
"MIT"
] | null | null | null | """
Abstract Basic Classes for Deep-Q Network, network structure component,
optimizer component, and loss function component.
"""
from abc import ABC, abstractmethod
# Abstract Basic Classes.
class DeepQNetwork(ABC):
"""
Network Abstract Base Class / Mixin Class.
* create_network(...) returns the compil... | 27.032258 | 76 | 0.667064 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.