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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7434d4c10461b758b84fb1eb085b3c2cf72e812f | 4,652 | py | Python | oscar/lib/python2.7/site-packages/PIL/SgiImagePlugin.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/PIL/SgiImagePlugin.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/PIL/SgiImagePlugin.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | #
# The Python Imaging Library.
# $Id$
#
# SGI image file handling
#
# See "The SGI Image File Format (Draft version 0.97)", Paul Haeberli.
# <ftp://ftp.sgi.com/graphics/SGIIMAGESPEC>
#
#
# History:
# 2016-16-10 mb Add save method without compression
# 1995-09-10 fl Created
#
# Copyright (c) 2016 by M... | 29.443038 | 78 | 0.585555 |
7434d8d54816a5beefae21b4368387ed7f08bf7d | 21,728 | py | Python | IMLearn/learners/gaussian_estimators.py | Eyal708/IML.HUJI | aa51187d3b45a579c4829acd4c998853968de5b2 | [
"MIT"
] | null | null | null | IMLearn/learners/gaussian_estimators.py | Eyal708/IML.HUJI | aa51187d3b45a579c4829acd4c998853968de5b2 | [
"MIT"
] | null | null | null | IMLearn/learners/gaussian_estimators.py | Eyal708/IML.HUJI | aa51187d3b45a579c4829acd4c998853968de5b2 | [
"MIT"
] | null | null | null | from __future__ import annotations
import math
import numpy as np
from numpy.linalg import inv, det, slogdet
class UnivariateGaussian:
"""
Class for univariate Gaussian Distribution Estimator
"""
def __init__(self, biased_var: bool = False) -> UnivariateGaussian:
"""
Estimator for u... | 34.325434 | 122 | 0.55058 |
7434ddd697168c19d0e54eefd45ed316f3711c2e | 20,133 | py | Python | nova/tests/api/openstack/compute/contrib/test_keypairs.py | rossella/nova | 9b1180d5a09227604a470cb9d0790b57daf1b6d7 | [
"Apache-2.0"
] | null | null | null | nova/tests/api/openstack/compute/contrib/test_keypairs.py | rossella/nova | 9b1180d5a09227604a470cb9d0790b57daf1b6d7 | [
"Apache-2.0"
] | null | null | null | nova/tests/api/openstack/compute/contrib/test_keypairs.py | rossella/nova | 9b1180d5a09227604a470cb9d0790b57daf1b6d7 | [
"Apache-2.0"
] | 1 | 2020-07-24T06:47:54.000Z | 2020-07-24T06:47:54.000Z | # Copyright 2011 Eldar Nugaev
# 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 ... | 39.322266 | 79 | 0.607013 |
7434efbfa7f555767d88e56b9851c03e512f7127 | 6,489 | py | Python | neuro-sdk/tests/test_core.py | neuro-inc/platform-client-python | 012e355249ea900b76f9ce4209fb9d029652f9b2 | [
"Apache-2.0"
] | 11 | 2020-10-11T15:38:11.000Z | 2021-11-09T11:29:50.000Z | neuro-sdk/tests/test_core.py | neuro-inc/platform-client-python | 012e355249ea900b76f9ce4209fb9d029652f9b2 | [
"Apache-2.0"
] | 611 | 2020-09-30T21:27:52.000Z | 2022-01-10T10:44:44.000Z | neuro-sdk/tests/test_core.py | neuro-inc/platform-client-python | 012e355249ea900b76f9ce4209fb9d029652f9b2 | [
"Apache-2.0"
] | 1 | 2020-10-05T15:10:24.000Z | 2020-10-05T15:10:24.000Z | import sqlite3
import ssl
import sys
from typing import AsyncIterator, Callable
import aiohttp
import certifi
import pytest
from aiohttp import web
from typing_extensions import AsyncContextManager
from yarl import URL
from neuro_sdk import IllegalArgumentError, ServerNotAvailable
from neuro_sdk.core import (
_Co... | 27.849785 | 88 | 0.614733 |
7434ff28c38d642c64dc1f83559ad0991d5b84c1 | 2,250 | py | Python | st2common/tests/unit/test_db_marker.py | UbuntuEvangelist/st2 | 36af04f2caa03b396fb8ab00fd6d700e827fda8d | [
"Apache-2.0"
] | 1 | 2020-11-21T10:11:25.000Z | 2020-11-21T10:11:25.000Z | st2common/tests/unit/test_db_marker.py | FairwindsOps/st2 | 2b76ca740c4af0d6b2c1d1ba5534ce4133fd16fa | [
"Apache-2.0"
] | 1 | 2015-06-08T15:27:11.000Z | 2015-06-08T15:27:11.000Z | st2common/tests/unit/test_db_marker.py | FairwindsOps/st2 | 2b76ca740c4af0d6b2c1d1ba5534ce4133fd16fa | [
"Apache-2.0"
] | 13 | 2017-01-12T11:07:20.000Z | 2019-04-19T09:55:49.000Z | # Licensed to the StackStorm, Inc ('StackStorm') under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use th... | 41.666667 | 84 | 0.724444 |
743502191eba8adf45f4bb2fbc4902388bd3e56d | 736 | py | Python | alipay/aop/api/response/ZolozAuthenticationSmilefaceSendmeSendResponse.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/response/ZolozAuthenticationSmilefaceSendmeSendResponse.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/response/ZolozAuthenticationSmilefaceSendmeSendResponse.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.response.AlipayResponse import AlipayResponse
class ZolozAuthenticationSmilefaceSendmeSendResponse(AlipayResponse):
def __init__(self):
super(ZolozAuthenticationSmilefaceSendmeSendResponse, self).__init__()
self._succe... | 28.307692 | 119 | 0.722826 |
74351d487be31586de99715a46a84498932f2341 | 54,978 | py | Python | src/spring-cloud/azext_spring_cloud/custom.py | DaeunYim/azure-cli-extensions | b99c141e124760ab71c379dcb27229675a8406d4 | [
"MIT"
] | null | null | null | src/spring-cloud/azext_spring_cloud/custom.py | DaeunYim/azure-cli-extensions | b99c141e124760ab71c379dcb27229675a8406d4 | [
"MIT"
] | null | null | null | src/spring-cloud/azext_spring_cloud/custom.py | DaeunYim/azure-cli-extensions | b99c141e124760ab71c379dcb27229675a8406d4 | [
"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.
# --------------------------------------------------------------------... | 40.815145 | 170 | 0.678453 |
74352dbd8d065c90572982ce3b8022b68d0f49e7 | 199 | py | Python | 0x08-python-more_classes/9-main.py | gogomillan/holbertonschool-higher_level_programming | 1549ffc4fdc284271684321ff6edd882a314193a | [
"MIT"
] | null | null | null | 0x08-python-more_classes/9-main.py | gogomillan/holbertonschool-higher_level_programming | 1549ffc4fdc284271684321ff6edd882a314193a | [
"MIT"
] | null | null | null | 0x08-python-more_classes/9-main.py | gogomillan/holbertonschool-higher_level_programming | 1549ffc4fdc284271684321ff6edd882a314193a | [
"MIT"
] | null | null | null | #!/usr/bin/python3
Rectangle = __import__('9-rectangle').Rectangle
my_square = Rectangle.square(5)
print("Area: {} - Perimeter: {}".format(my_square.area(),
my_square.perimeter()))
print(my_square)
| 24.875 | 57 | 0.728643 |
74352e47e49c865bb8f966a5e7a8a24037b471f4 | 3,070 | py | Python | events_page/apis/mls.py | los-verdes/lv-event-pagenerator | 88416b626ff2dca6e2d71fa60bff4823954b3131 | [
"MIT"
] | null | null | null | events_page/apis/mls.py | los-verdes/lv-event-pagenerator | 88416b626ff2dca6e2d71fa60bff4823954b3131 | [
"MIT"
] | 7 | 2022-01-16T15:36:40.000Z | 2022-01-25T22:02:12.000Z | events_page/apis/mls.py | los-verdes/lv-event-pagenerator | 88416b626ff2dca6e2d71fa60bff4823954b3131 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from datetime import date
import requests
from logzero import logger
from apis import Singleton
DEFAULT_CLUB_OPTA_ID = "15296"
class TeamColors(metaclass=Singleton):
_team_colors = {
"atl": {"color": "#9d2235", "name": "Atlanta United"},
"cin": {"color": "#003087", "name":... | 36.117647 | 79 | 0.572964 |
7435467c78ad24c6751cf937dffea7ffcfd15964 | 11,192 | py | Python | kaldi/lat/functions.py | fgvbrt/pykaldi | c4e867de96b5ff5ef66a79f611d19251a857d2ab | [
"Apache-2.0"
] | 2 | 2020-02-27T13:42:10.000Z | 2020-08-27T10:28:02.000Z | kaldi/lat/functions.py | yongxuUSTC/pykaldi | b7a54d91fa07cf86838172afffaf158c7a058498 | [
"Apache-2.0"
] | null | null | null | kaldi/lat/functions.py | yongxuUSTC/pykaldi | b7a54d91fa07cf86838172afffaf158c7a058498 | [
"Apache-2.0"
] | 1 | 2018-08-31T17:51:19.000Z | 2018-08-31T17:51:19.000Z | import logging
from . import _confidence
from . import _determinize_lattice_pruned as _dlp
from . import _lattice_functions as _lat_fun
from ._confidence import *
from ._determinize_lattice_pruned import *
from ._lattice_functions import *
from ._minimize_lattice import *
from ._push_lattice import *
from .. import ... | 40.114695 | 80 | 0.705057 |
74355f98ba3805cc37824fb8ef907058d43200bc | 7,249 | py | Python | mainapp/forms.py | AHTOH2001/OOP_4_term | c9b0f64f3507486e0670cc95d7252862b673d845 | [
"MIT"
] | null | null | null | mainapp/forms.py | AHTOH2001/OOP_4_term | c9b0f64f3507486e0670cc95d7252862b673d845 | [
"MIT"
] | null | null | null | mainapp/forms.py | AHTOH2001/OOP_4_term | c9b0f64f3507486e0670cc95d7252862b673d845 | [
"MIT"
] | null | null | null | from django.contrib.auth import get_user_model, password_validation
# from django.contrib.auth.hashers import make_password
from django.contrib.auth.models import User
from django.contrib.auth.forms import UserCreationForm, AuthenticationForm, UsernameField
from django import forms
from django.utils.text import capfirs... | 42.641176 | 125 | 0.604911 |
74357b10b55ada7fba82df6512d88ca034121aba | 7,337 | py | Python | tb-marketplace/tb-dep-manager/common/common.py | eeaton/tb-gcp | a6a4640e8e9cf1c593e319af9deaea3661c39810 | [
"Apache-2.0"
] | 21 | 2018-07-09T19:34:45.000Z | 2022-03-09T00:06:01.000Z | tb-marketplace/tb-dep-manager/common/common.py | eeaton/tb-gcp | a6a4640e8e9cf1c593e319af9deaea3661c39810 | [
"Apache-2.0"
] | 29 | 2018-08-06T19:40:23.000Z | 2022-03-14T17:09:13.000Z | tb-marketplace/tb-dep-manager/common/common.py | eeaton/tb-gcp | a6a4640e8e9cf1c593e319af9deaea3661c39810 | [
"Apache-2.0"
] | 18 | 2018-08-28T11:55:01.000Z | 2022-01-28T02:29:03.000Z | # Copyright 2015 Google 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 law or a... | 31.354701 | 80 | 0.697151 |
743593507c3816b2b71712855176cd24481d4d46 | 571,369 | py | Python | tencentcloud/cwp/v20180228/models.py | lleiyyang/tencentcloud-sdk-python | e6e6a4ce89286673b2322ae92d3c2fbf8665aa0b | [
"Apache-2.0"
] | null | null | null | tencentcloud/cwp/v20180228/models.py | lleiyyang/tencentcloud-sdk-python | e6e6a4ce89286673b2322ae92d3c2fbf8665aa0b | [
"Apache-2.0"
] | null | null | null | tencentcloud/cwp/v20180228/models.py | lleiyyang/tencentcloud-sdk-python | e6e6a4ce89286673b2322ae92d3c2fbf8665aa0b | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf8 -*-
# Copyright (c) 2017-2021 THL A29 Limited, a Tencent company. 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... | 29.071385 | 226 | 0.586008 |
743597aebad518dc972072dcd0b910ed61c96cf0 | 720 | py | Python | library_app/tests/views/test_user_views.py | V-Kopio/django-library-manager | 04431a61d8e794434bb66db313755efc80cdc795 | [
"MIT"
] | null | null | null | library_app/tests/views/test_user_views.py | V-Kopio/django-library-manager | 04431a61d8e794434bb66db313755efc80cdc795 | [
"MIT"
] | 15 | 2018-05-19T20:41:04.000Z | 2018-07-19T20:12:00.000Z | library_app/tests/views/test_user_views.py | V-Kopio/django-library-manager | 04431a61d8e794434bb66db313755efc80cdc795 | [
"MIT"
] | 1 | 2021-05-24T06:18:51.000Z | 2021-05-24T06:18:51.000Z | from django.urls import reverse
from library_app.tests.extended_test_case import ExtendedTestCase
class UserViewTests(ExtendedTestCase):
def test_detail_with_logged_in_user(self):
self.login()
self.__get_detail_response()
self.assertEqual(list(self.response.context['borrowings']), [])
... | 36 | 73 | 0.726389 |
7435aee8c22d86354004021b4b4c69c45916b45a | 61,580 | py | Python | Plugins/ActionEngine/Action.py | davidhstocker/Tioga | f7b66b4b94ca2b7e5eb845ce11162b1053715da8 | [
"Apache-2.0"
] | 1 | 2020-09-07T13:33:32.000Z | 2020-09-07T13:33:32.000Z | Plugins/ActionEngine/Action.py | davidhstocker/Tioga | f7b66b4b94ca2b7e5eb845ce11162b1053715da8 | [
"Apache-2.0"
] | null | null | null | Plugins/ActionEngine/Action.py | davidhstocker/Tioga | f7b66b4b94ca2b7e5eb845ce11162b1053715da8 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python2
"""Angela RML Interpreter - Action Queue (aQ) management engine service plugin
Created by the project angela team
http://sourceforge.net/projects/projectangela/
http://www.projectangela.org"""
__license__ = "GPL"
__version__ = "$Revision: 0.1 $"
__author__ = 'David Stocke... | 54.495575 | 181 | 0.599968 |
7435b0ee2fde9d83bcc184077200ac83cb2e7e4e | 2,703 | py | Python | qnarre/prep/tokens/longformer.py | quantapix/qnarre.com | f51d5945c20ef8182c4aa11f1b407d064c190c70 | [
"MIT"
] | null | null | null | qnarre/prep/tokens/longformer.py | quantapix/qnarre.com | f51d5945c20ef8182c4aa11f1b407d064c190c70 | [
"MIT"
] | null | null | null | qnarre/prep/tokens/longformer.py | quantapix/qnarre.com | f51d5945c20ef8182c4aa11f1b407d064c190c70 | [
"MIT"
] | null | null | null | # Copyright 2022 Quantapix Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | 53 | 160 | 0.719201 |
7435bbc595ccdd8d49ef7fd9cbc8dbbf58f4356c | 3,040 | py | Python | examples/sudoku_6x6.py | ohjay/cspy | c6efe36bcfff4668650293bd96854b9e7cfbd351 | [
"MIT"
] | 2 | 2021-04-24T09:40:38.000Z | 2022-03-27T21:03:56.000Z | examples/sudoku_6x6.py | ohjay/cspy | c6efe36bcfff4668650293bd96854b9e7cfbd351 | [
"MIT"
] | null | null | null | examples/sudoku_6x6.py | ohjay/cspy | c6efe36bcfff4668650293bd96854b9e7cfbd351 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
sudoku.py
Basic Sudoku example (solves a 6x6 grid).
Solves https://upload.wikimedia.org/wikipedia/commons/0/08/Sudoku6x6-sol2.png.
"""
import numpy as np
from cspy import Variable, Constraint, CSP
N = 6
DOMAIN = tuple(range(1, N + 1))
FIXED_VALUES = {
(0, 0): 2, (0, 5): 3,
(1, 1): ... | 36.190476 | 105 | 0.545724 |
7435c729f3bea693465171b903461facb7961c22 | 6,402 | py | Python | fedot/api/api_utils/data_definition.py | rozlana-g/FEDOT | a909d6c0ef481cc1cf7a5f10f7b1292d8d2def5c | [
"BSD-3-Clause"
] | 358 | 2020-06-11T09:34:53.000Z | 2022-03-31T12:56:22.000Z | fedot/api/api_utils/data_definition.py | rozlana-g/FEDOT | a909d6c0ef481cc1cf7a5f10f7b1292d8d2def5c | [
"BSD-3-Clause"
] | 467 | 2020-06-11T13:49:45.000Z | 2022-03-31T14:19:48.000Z | fedot/api/api_utils/data_definition.py | rozlana-g/FEDOT | a909d6c0ef481cc1cf7a5f10f7b1292d8d2def5c | [
"BSD-3-Clause"
] | 48 | 2020-07-13T14:50:45.000Z | 2022-03-26T09:37:13.000Z | from abc import ABC, abstractmethod
from functools import partial
from typing import Union
import pandas as pd
import numpy as np
from fedot.core.data.data import InputData
from fedot.core.data.multi_modal import MultiModalData
from fedot.core.repository.dataset_types import DataTypesEnum
from fedot.core.repository.ta... | 35.566667 | 115 | 0.56498 |
7435c74af3ec1083f502e20171a4719ce4ce1847 | 5,161 | py | Python | sphere-cyl-slab.py | ccpcode/low-order-particle | 7ba2b6fd2500219b0c0cb0b2c244020f4e3c7c85 | [
"MIT"
] | 2 | 2018-03-21T02:27:04.000Z | 2021-03-09T00:37:15.000Z | sphere-cyl-slab.py | ccpcode/low-order-particle | 7ba2b6fd2500219b0c0cb0b2c244020f4e3c7c85 | [
"MIT"
] | null | null | null | sphere-cyl-slab.py | ccpcode/low-order-particle | 7ba2b6fd2500219b0c0cb0b2c244020f4e3c7c85 | [
"MIT"
] | 1 | 2019-09-08T17:14:54.000Z | 2019-09-08T17:14:54.000Z | """
Compare temperature profiles of 1-D solid sphere, cylinder, and cube shapes that
are volume equivalent. Note that due to surface area, sphere heats slowest, for
example sphere < cylinder < cube.
"""
import numpy as np
import matplotlib.pyplot as py
from funcHeatCond import hc3
from funcOther import volume, surf, l... | 37.129496 | 92 | 0.576439 |
7435cad28bbb9086f1640719cfc3cdd6fdc50d72 | 7,309 | py | Python | sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/_my_sql_management_client.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/_my_sql_management_client.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/_my_sql_management_client.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 ... | 56.223077 | 311 | 0.753044 |
7435d76e2343b983011a25ff53b3f37dd8ea804c | 705 | py | Python | oscar/lib/python2.7/site-packages/phonenumbers/shortdata/region_AE.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/phonenumbers/shortdata/region_AE.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/phonenumbers/shortdata/region_AE.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | """Auto-generated file, do not edit by hand. AE metadata"""
from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata
PHONE_METADATA_AE = PhoneMetadata(id='AE', country_code=None, international_prefix=None,
general_desc=PhoneNumberDesc(national_number_pattern='[149]\\d{2,3}', possible_length=(3,... | 70.5 | 125 | 0.763121 |
7435e142c74d7fba2ba429f0ef3801a977eb2670 | 910 | py | Python | resourcesync/change_type.py | eark-project/access_dipcreator | b1f9034d309dfdb676cbba92c9c4722bf576aba2 | [
"MIT"
] | 4 | 2019-12-19T17:17:42.000Z | 2021-12-11T23:12:45.000Z | resourcesync/change_type.py | eark-project/access_dipcreator | b1f9034d309dfdb676cbba92c9c4722bf576aba2 | [
"MIT"
] | 32 | 2020-03-19T15:56:05.000Z | 2021-12-23T12:46:06.000Z | resourcesync/change_type.py | eark-project/access_dipcreator | b1f9034d309dfdb676cbba92c9c4722bf576aba2 | [
"MIT"
] | null | null | null | class ChangeType:
"""Change type indicated what type of change occurred to a resource"""
CREATED, UPDATED, DELETED = range(3)
def __init__(self):
pass
@staticmethod
def get(change_type):
"""Constructor"""
change_type = change_type.lower()
if change_type == "created"... | 30.333333 | 74 | 0.601099 |
7435f825e2cd24e65fe93624f518fbfb07852cb3 | 1,701 | py | Python | context.py | Deadlyelder/BlockPerf | cbdf593e3840ee6754d3fc5d9e8bec0ef5bbd0c6 | [
"BSD-3-Clause"
] | 2 | 2021-08-09T08:54:51.000Z | 2022-03-05T07:52:59.000Z | context.py | Deadlyelder/BlockPerf | cbdf593e3840ee6754d3fc5d9e8bec0ef5bbd0c6 | [
"BSD-3-Clause"
] | null | null | null | context.py | Deadlyelder/BlockPerf | cbdf593e3840ee6754d3fc5d9e8bec0ef5bbd0c6 | [
"BSD-3-Clause"
] | null | null | null | import config
from node import PublicBitcoinNode
import utils
from simulationfiles import network_config
from simulationfiles.zone import Zone
from collections import OrderedDict
import time
class Context:
def __init__(self):
self._run_name = 'run-' + str(time.time())
self._run_dir = config.data_d... | 25.014706 | 84 | 0.6408 |
7436301a78b4c630c8bef50de57b261c6a106449 | 986 | py | Python | tools/layer_performance_profiler.py | flyingTan/QuantMmdetection | 6126cd7725dcd0c4d3ad68f016908c500a0adbb9 | [
"Apache-2.0"
] | 2 | 2021-08-28T06:43:03.000Z | 2022-01-17T00:04:23.000Z | tools/layer_performance_profiler.py | flyingTan/QuantMmdetection | 6126cd7725dcd0c4d3ad68f016908c500a0adbb9 | [
"Apache-2.0"
] | null | null | null | tools/layer_performance_profiler.py | flyingTan/QuantMmdetection | 6126cd7725dcd0c4d3ad68f016908c500a0adbb9 | [
"Apache-2.0"
] | null | null | null | import torch
from thirdparty.mtransformer import build_mtransformer
from thirdparty.mtransformer.APOT import APOTQuantConv2d
try:
from pytorch_memlab import LineProfiler, MemReporter
except ImportError:
raise ImportError("Please Install pytorch_memlab: pip install pytorch_memlab")
device = 'cuda' if torch.cud... | 34 | 82 | 0.686613 |
7436426d219f14a6b09ff59006338d2a2fb0fe2e | 1,296 | py | Python | third_party/a2c_ppo_acktr/baselines/bench/__init__.py | googleinterns/gail-dyn | 31c93b12d068dede0dbe69547f0b2e500374f260 | [
"Apache-2.0"
] | 30 | 2021-06-16T23:28:58.000Z | 2022-03-23T17:20:58.000Z | third_party/a2c_ppo_acktr/baselines/bench/__init__.py | googleinterns/gail-dyn | 31c93b12d068dede0dbe69547f0b2e500374f260 | [
"Apache-2.0"
] | 1 | 2021-06-25T09:21:29.000Z | 2021-08-11T23:14:14.000Z | third_party/a2c_ppo_acktr/baselines/bench/__init__.py | googleinterns/gail-dyn | 31c93b12d068dede0dbe69547f0b2e500374f260 | [
"Apache-2.0"
] | 8 | 2021-06-19T12:51:50.000Z | 2021-12-23T08:31:10.000Z | # The MIT License
#
# Copyright (c) 2017 OpenAI (http://openai.com)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to u... | 48 | 80 | 0.770833 |
74365b706d4ea89f940359fe28b155450e8d817f | 815 | py | Python | src/recombinant_denaturation/0_raw_data.py | dezeraecox-manuscripts/COX_Proteome-stability | a5397baae7f0bc73980b88f8ccf7b83e3d05f590 | [
"MIT"
] | null | null | null | src/recombinant_denaturation/0_raw_data.py | dezeraecox-manuscripts/COX_Proteome-stability | a5397baae7f0bc73980b88f8ccf7b83e3d05f590 | [
"MIT"
] | null | null | null | src/recombinant_denaturation/0_raw_data.py | dezeraecox-manuscripts/COX_Proteome-stability | a5397baae7f0bc73980b88f8ccf7b83e3d05f590 | [
"MIT"
] | null | null | null | import os, re
import zipfile
from shutil import copyfile
from loguru import logger
from utilities import database_collection
from utilities.database_map_and_filter import gz_unzipper, tar_file_to_folder
logger.info('Import OK')
if __name__ == "__main__":
url = 'https://zenodo.org/record/4280621/files/recombina... | 33.958333 | 122 | 0.768098 |
743671f40f1e2b502643d7bc77ddf7cd5e4abbc8 | 3,134 | py | Python | scrapy_news/scrapy_news/settings.py | sillyemperor/mypynotebook | 27a3847764a422fee05590e6d2ef145256f558de | [
"MIT"
] | null | null | null | scrapy_news/scrapy_news/settings.py | sillyemperor/mypynotebook | 27a3847764a422fee05590e6d2ef145256f558de | [
"MIT"
] | null | null | null | scrapy_news/scrapy_news/settings.py | sillyemperor/mypynotebook | 27a3847764a422fee05590e6d2ef145256f558de | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Scrapy settings for scrapy_news project
#
# For simplicity, this file contains only settings considered important or
# commonly used. You can find more settings consulting the documentation:
#
# https://docs.scrapy.org/en/latest/topics/settings.html
# https://docs.scrapy.org/en/latest... | 34.43956 | 103 | 0.776962 |
7436c5e40210e80bbc6df84364c14e53ad39aeaa | 7,469 | py | Python | tests/forte/processors/allennlp_processors_test.py | swapnull7/forte | 737a72afd440d40c3826c3a7c5e4e44235c0f701 | [
"Apache-2.0"
] | 2 | 2021-01-01T12:07:27.000Z | 2021-09-10T03:57:18.000Z | tests/forte/processors/allennlp_processors_test.py | swapnull7/forte | 737a72afd440d40c3826c3a7c5e4e44235c0f701 | [
"Apache-2.0"
] | null | null | null | tests/forte/processors/allennlp_processors_test.py | swapnull7/forte | 737a72afd440d40c3826c3a7c5e4e44235c0f701 | [
"Apache-2.0"
] | null | null | null | """This module tests LowerCaser processor."""
import unittest
from typing import List
from ddt import ddt, data, unpack
from allennlp.predictors import Predictor
from forte.data.data_pack import DataPack
from forte.pipeline import Pipeline
from forte.data.readers import StringReader
from forte.processors.allennlp_pr... | 37.532663 | 79 | 0.597001 |
7436dec372419def09aa7b40336064285aaccc75 | 95 | py | Python | UkDatabaseAPI/UkDatabaseAPI/database/database.py | kplachkov/UkDatabase | 51db3183a86d3b07e0f97cc685f6f47ad4a8fc2e | [
"Apache-2.0"
] | null | null | null | UkDatabaseAPI/UkDatabaseAPI/database/database.py | kplachkov/UkDatabase | 51db3183a86d3b07e0f97cc685f6f47ad4a8fc2e | [
"Apache-2.0"
] | 3 | 2018-04-02T20:32:51.000Z | 2019-02-09T16:19:39.000Z | UkDatabaseAPI/UkDatabaseAPI/database/database.py | kplachkov/UkDatabase | 51db3183a86d3b07e0f97cc685f6f47ad4a8fc2e | [
"Apache-2.0"
] | null | null | null | class Database:
def find_posts(self, text, post_pub_date, number_of_results):
pass
| 23.75 | 65 | 0.715789 |
7436e1e75d06e641a12cf864d2eb57a22f7de5a6 | 378 | py | Python | backend/metagrid/projects/migrations/0002_import_projects_data.py | tomvothecoder/metagrid | a38f3f78fbaf78f909c74a263c03a3f6d376b75c | [
"MIT"
] | null | null | null | backend/metagrid/projects/migrations/0002_import_projects_data.py | tomvothecoder/metagrid | a38f3f78fbaf78f909c74a263c03a3f6d376b75c | [
"MIT"
] | 7 | 2020-03-19T21:03:26.000Z | 2020-04-01T16:07:11.000Z | backend/metagrid/projects/migrations/0002_import_projects_data.py | tomvothecoder/metagrid | a38f3f78fbaf78f909c74a263c03a3f6d376b75c | [
"MIT"
] | null | null | null | # Generated by Django 3.2.13 on 2022-05-05 16:59
from django.db import migrations
from metagrid.projects.migrations.scripts.import_functions import (
insert_data,
reverse_insert_data,
)
class Migration(migrations.Migration):
dependencies = [("projects", "0001_initial")]
operations = [
migr... | 21 | 67 | 0.730159 |
7436ef09dca2c1c591b25e2ff9982237e6780596 | 4,108 | py | Python | saf/ffm/nonlinear/asciiwriter.py | dmitry-kabanov/fickettmodel | 255b1e9cae1cfb7a6b914ad61a17288d52215cc4 | [
"MIT"
] | 1 | 2019-06-08T20:06:33.000Z | 2019-06-08T20:06:33.000Z | saf/ffm/nonlinear/asciiwriter.py | dmitry-kabanov/fickettmodel | 255b1e9cae1cfb7a6b914ad61a17288d52215cc4 | [
"MIT"
] | null | null | null | saf/ffm/nonlinear/asciiwriter.py | dmitry-kabanov/fickettmodel | 255b1e9cae1cfb7a6b914ad61a17288d52215cc4 | [
"MIT"
] | 1 | 2019-06-24T13:00:02.000Z | 2019-06-24T13:00:02.000Z | import logging
import os
import numpy as np
from .solution import Solution
class ASCIIWriter(object):
"""Writer of the simulation output for linear Fickett--Faria model.
Parameters
----------
config : Config
Configuration object.
grid : array_like
Grid.
znd : ZNDSolver
... | 32.603175 | 78 | 0.582522 |
7436ff67f1ba4d1b6f9b16bdef5f8111205b4496 | 5,631 | py | Python | utilities/ACEmodels.py | carsault/ace_pytorch | fbed64990001afdafe44ef7b0d5567f94c81a3c3 | [
"MIT"
] | null | null | null | utilities/ACEmodels.py | carsault/ace_pytorch | fbed64990001afdafe44ef7b0d5567f94c81a3c3 | [
"MIT"
] | null | null | null | utilities/ACEmodels.py | carsault/ace_pytorch | fbed64990001afdafe44ef7b0d5567f94c81a3c3 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Jul 2 15:16:04 2019
@author: carsault
"""
#%%
import torch
import torch.nn as nn
import torch.nn.functional as F
class GaussianNoise(nn.Module):
"""Gaussian noise regularizer.
Args:
sigma (float, optional): relative standard deviatio... | 45.780488 | 272 | 0.501865 |
74370cde5848c3cc22d7de83648e758b2a366737 | 609 | py | Python | src/health_broadcast.py | mnuyens/forseti2 | 3c6d76ffac2b64d51f03d3922e3b388a4e35f1a8 | [
"Apache-2.0"
] | 1 | 2015-03-07T04:48:53.000Z | 2015-03-07T04:48:53.000Z | src/health_broadcast.py | mnuyens/forseti2 | 3c6d76ffac2b64d51f03d3922e3b388a4e35f1a8 | [
"Apache-2.0"
] | null | null | null | src/health_broadcast.py | mnuyens/forseti2 | 3c6d76ffac2b64d51f03d3922e3b388a4e35f1a8 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python2.7
import lcm
import time
import forseti2
import settings
lc = lcm.LCM(settings.LCM_URI)
msg = forseti2.health()
msg.header = forseti2.header()
msg.header.seq = 0
msg.header.time = time.time()
msg.uptime = 0
start = time.time()
while True:
msg.uptime = time.time() - start
msg.header.se... | 20.3 | 47 | 0.62069 |
74372273de18f9021d9998f8a2bb4a177f278a6e | 320,401 | py | Python | nova/tests/db/test_db_api.py | osrg/nova | 14b6bc655145c832bd9c822e48f877818e0e53ff | [
"Apache-2.0"
] | null | null | null | nova/tests/db/test_db_api.py | osrg/nova | 14b6bc655145c832bd9c822e48f877818e0e53ff | [
"Apache-2.0"
] | null | null | null | nova/tests/db/test_db_api.py | osrg/nova | 14b6bc655145c832bd9c822e48f877818e0e53ff | [
"Apache-2.0"
] | null | null | null | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# encoding=UTF8
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file ... | 44.955942 | 79 | 0.603853 |
74373ec6e57d44b74ca204848d730f7936e429d8 | 1,127 | py | Python | hytra/pluginsystem/feature_serializer_plugin.py | m-novikov/hytra | 0dc28deaa2571fa8bea63ca178f0e53cc1cd7508 | [
"MIT"
] | 1 | 2021-08-25T03:57:55.000Z | 2021-08-25T03:57:55.000Z | hytra/pluginsystem/feature_serializer_plugin.py | m-novikov/hytra | 0dc28deaa2571fa8bea63ca178f0e53cc1cd7508 | [
"MIT"
] | 1 | 2019-04-01T13:39:09.000Z | 2019-04-01T13:39:09.000Z | hytra/pluginsystem/feature_serializer_plugin.py | m-novikov/hytra | 0dc28deaa2571fa8bea63ca178f0e53cc1cd7508 | [
"MIT"
] | 1 | 2018-11-15T13:17:26.000Z | 2018-11-15T13:17:26.000Z | from yapsy.IPlugin import IPlugin
class FeatureSerializerPlugin(IPlugin):
"""
This is the base class for all plugins that load/store the features to/from different locations
"""
server_address = None
""" Address of the dvid server (only used by the dvid serializer plugin) """
uuid = None
... | 26.209302 | 100 | 0.621118 |
74374a709ae4682184d2af0f7e19762274e7443e | 6,458 | py | Python | asposewordscloud/models/footnotes_response.py | aspose-words-cloud/aspose-words-cloud-python | 65c7b55fa4aac69b60d41e7f54aed231df285479 | [
"MIT"
] | 14 | 2018-07-15T17:01:52.000Z | 2018-11-29T06:15:33.000Z | asposewordscloud/models/footnotes_response.py | aspose-words-cloud/aspose-words-cloud-python | 65c7b55fa4aac69b60d41e7f54aed231df285479 | [
"MIT"
] | 1 | 2018-09-28T12:59:34.000Z | 2019-10-08T08:42:59.000Z | asposewordscloud/models/footnotes_response.py | aspose-words-cloud/aspose-words-cloud-python | 65c7b55fa4aac69b60d41e7f54aed231df285479 | [
"MIT"
] | 2 | 2020-12-21T07:59:17.000Z | 2022-02-16T21:41:25.000Z | # coding: utf-8
# -----------------------------------------------------------------------------------
# <copyright company="Aspose" file="footnotes_response.py">
# Copyright (c) 2021 Aspose.Words for Cloud
# </copyright>
# <summary>
# Permission is hereby granted, free of charge, to any person obtaining a copy
# o... | 35.289617 | 85 | 0.586869 |
74377c7c3d120e34bb6978e27296042ebcc6c87d | 3,704 | py | Python | tests/test_mvc/test_list.py | agoose77/spectate | a70d8e3fb8e9e3f053cb2a1c5a4c760df0d61cb3 | [
"MIT"
] | 30 | 2017-08-10T17:13:36.000Z | 2022-03-03T18:48:49.000Z | tests/test_mvc/test_list.py | agoose77/spectate | a70d8e3fb8e9e3f053cb2a1c5a4c760df0d61cb3 | [
"MIT"
] | 26 | 2016-08-18T20:21:36.000Z | 2021-07-13T02:52:13.000Z | tests/test_mvc/test_list.py | agoose77/spectate | a70d8e3fb8e9e3f053cb2a1c5a4c760df0d61cb3 | [
"MIT"
] | 4 | 2017-08-10T17:13:39.000Z | 2021-03-02T19:57:43.000Z | import pytest
from spectate import mvc
from spectate.mvc import Undefined as undef
from .mock import model_events, events_to_comparable_list
_method_call_and_expected_event = [
{
"value": [1, 2, 3],
"method": "__setitem__",
"args": [1, 5],
"kwargs": {},
"events": [{"old":... | 27.036496 | 87 | 0.391469 |
7437a443612ef9f8f48acf1ff072d21f86294f9b | 7,551 | py | Python | deepsim_btree/deepsim_btree/decorators/status_flippers.py | aws-deepracer/deepsim | cad2639f525c2f94ec5c03d8b855cc65b0b8ee55 | [
"Apache-2.0"
] | 1 | 2022-03-25T07:20:49.000Z | 2022-03-25T07:20:49.000Z | deepsim_btree/deepsim_btree/decorators/status_flippers.py | aws-deepracer/deepsim | cad2639f525c2f94ec5c03d8b855cc65b0b8ee55 | [
"Apache-2.0"
] | null | null | null | deepsim_btree/deepsim_btree/decorators/status_flippers.py | aws-deepracer/deepsim | cad2639f525c2f94ec5c03d8b855cc65b0b8ee55 | [
"Apache-2.0"
] | null | null | null | #################################################################################
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. #
# #
# Licensed under the Apache License, Version 2.0 (the "License"). ... | 41.262295 | 98 | 0.604026 |
7437b586c6c3ff207a9eafb92e82d964b418fb2f | 1,630 | py | Python | conversion_for_paper.py | andreagia/peaks-identification | ddcc3523f9a1154f6c2f69035dde1bfb9eac0f2a | [
"MIT"
] | null | null | null | conversion_for_paper.py | andreagia/peaks-identification | ddcc3523f9a1154f6c2f69035dde1bfb9eac0f2a | [
"MIT"
] | null | null | null | conversion_for_paper.py | andreagia/peaks-identification | ddcc3523f9a1154f6c2f69035dde1bfb9eac0f2a | [
"MIT"
] | null | null | null |
import numpy as np
import pandas as pd
import os
import argparse
import sys
parser = argparse.ArgumentParser(description="Automatic peaks assignement tool")
parser.add_argument(
"--path",
default='.')
def clean(s):
if str(s).isnumeric() or str(s)=='--':
#print(s, " --> NUMERIC or '--' ")
... | 24.328358 | 110 | 0.498773 |
7437bbe3a04702f2c99ec1068f039054077b2872 | 578 | py | Python | vessel_tracking/sample.py | gmaher/vessel_tracking | 3fd31f0b999bcd570199efd0dc7478924a90704e | [
"MIT"
] | 1 | 2019-12-16T23:07:51.000Z | 2019-12-16T23:07:51.000Z | vessel_tracking/sample.py | gmaher/vessel_tracking | 3fd31f0b999bcd570199efd0dc7478924a90704e | [
"MIT"
] | null | null | null | vessel_tracking/sample.py | gmaher/vessel_tracking | 3fd31f0b999bcd570199efd0dc7478924a90704e | [
"MIT"
] | null | null | null | import numpy as np
def sphere_sample(N=1, n=3):
x = np.random.randn(N,n)
lengths = np.sqrt(np.sum(x**2,axis=1))[:,np.newaxis]
x = x/lengths
return x
def sphere_sample_vec(d, N=1):
FACTOR = 3
n = d.shape[0]
z = sphere_sample(int(FACTOR*N), n)
length = np.sqrt(np.sum(d**2))
v =... | 17.515152 | 62 | 0.577855 |
7438091e623469db1e0f66cea34b5dd0efc158fa | 9,607 | py | Python | Exercise_File_C-SASPy_Data_Round_Trip.py | ilankham/wuss-2019-half-day-class | 7b872e5ee294e62c62a20c5cd7b4e441df63f70a | [
"MIT"
] | 2 | 2019-09-04T03:29:12.000Z | 2021-03-02T07:22:08.000Z | Exercise_File_C-SASPy_Data_Round_Trip.py | ilankham/wuss-2019-half-day-class | 7b872e5ee294e62c62a20c5cd7b4e441df63f70a | [
"MIT"
] | null | null | null | Exercise_File_C-SASPy_Data_Round_Trip.py | ilankham/wuss-2019-half-day-class | 7b872e5ee294e62c62a20c5cd7b4e441df63f70a | [
"MIT"
] | 3 | 2019-09-04T05:57:02.000Z | 2019-09-15T21:21:47.000Z | # Everything is better with friends: Executing SAS® code in Python scripts with
# SASPy, and turbocharging your SAS programming with open-source tooling
#
# Half-day class, Western Users of SAS Software (WUSS) 2019
###############################################################################
# Exercises 6-9: SASPy ... | 44.892523 | 81 | 0.574581 |
7438210c20307a19d2131e92cef096f066cd161a | 1,181 | py | Python | array/300_longest_increasing_subsequence.py | shawlu95/Algorithm-Toolbox | b6c7b2228d8e70e0842e0bad607533a2c8322cf0 | [
"MIT"
] | null | null | null | array/300_longest_increasing_subsequence.py | shawlu95/Algorithm-Toolbox | b6c7b2228d8e70e0842e0bad607533a2c8322cf0 | [
"MIT"
] | null | null | null | array/300_longest_increasing_subsequence.py | shawlu95/Algorithm-Toolbox | b6c7b2228d8e70e0842e0bad607533a2c8322cf0 | [
"MIT"
] | 2 | 2020-02-07T20:49:02.000Z | 2020-02-11T06:01:55.000Z | class Solution(object):
def lengthOfLIS(self, nums):
"""
:type nums: List[int]
:rtype: int
"""
def binarySearch(target, nums):
"""
return type: int (ceiling of the insert position)
if target is greater than all nums, return len(nums)
... | 26.244444 | 78 | 0.434378 |
743821793e7a72915ec0719b28ff63762d559ebe | 13,672 | py | Python | data/level/level6.py | levelupai/match3-level-similarity | cc9b28b8741b41bea1273c8bc9b4d265d79a1dca | [
"Apache-2.0"
] | null | null | null | data/level/level6.py | levelupai/match3-level-similarity | cc9b28b8741b41bea1273c8bc9b4d265d79a1dca | [
"Apache-2.0"
] | 6 | 2020-07-04T02:53:08.000Z | 2022-03-11T23:53:14.000Z | data/level/level6.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': 6,
'move_count': 21,
'board_info': {
(2, 5): {
'base': (4, 1),
'bg_number': 41,
'prev': (0, -1),
'next': (0, 1),
'fall_point': (0, -1)
},
(2, 6): {
'base': (2, 1),
'prev': (0, ... | 23.572414 | 33 | 0.214526 |
743822d7d92a005bc4a3d64f48cc206b820217d1 | 2,630 | py | Python | diayn/diayn_relabelers/diayn_ant_relabeler.py | YashBit/generalized-hindsight | 2ba2e1ba0caa20b71d01c8ad70fbc7f47d61bd6c | [
"MIT"
] | null | null | null | diayn/diayn_relabelers/diayn_ant_relabeler.py | YashBit/generalized-hindsight | 2ba2e1ba0caa20b71d01c8ad70fbc7f47d61bd6c | [
"MIT"
] | null | null | null | diayn/diayn_relabelers/diayn_ant_relabeler.py | YashBit/generalized-hindsight | 2ba2e1ba0caa20b71d01c8ad70fbc7f47d61bd6c | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib
matplotlib.use("Agg")
from rlkit.torch.multitask.ant_direction_relabeler import AntDirectionRelabelerNew
#Relabeler : AntDirectionNewRelabelerSparse:
class DIAYNAntDirectionRelabelerNewSparse(AntDirectionRelabelerNew):
"""
Where are these methods used.
Then ... | 39.848485 | 114 | 0.679087 |
743855470cc0473c2b03c11f0bced69f69652075 | 4,931 | py | Python | colossalai/nn/lr_scheduler/onecycle.py | rahulgupta9202/ColossalAI | 993088d45eaa032e39cf5959df2a506f0663bc2e | [
"Apache-2.0"
] | 1 | 2021-11-02T14:00:27.000Z | 2021-11-02T14:00:27.000Z | colossalai/nn/lr_scheduler/onecycle.py | rahulgupta9202/ColossalAI | 993088d45eaa032e39cf5959df2a506f0663bc2e | [
"Apache-2.0"
] | null | null | null | colossalai/nn/lr_scheduler/onecycle.py | rahulgupta9202/ColossalAI | 993088d45eaa032e39cf5959df2a506f0663bc2e | [
"Apache-2.0"
] | null | null | null | from torch.optim.lr_scheduler import OneCycleLR as _OneCycleLR
from colossalai.registry import LR_SCHEDULERS
@LR_SCHEDULERS.register_module
class OneCycleLR(_OneCycleLR):
r"""Sets the learning rate of each parameter group according to the
1cycle learning rate policy. The 1cycle policy anneals the learning
... | 50.316327 | 122 | 0.693166 |
74387846fb6894628f582148e2d5c16f19ea8778 | 1,716 | py | Python | app/core/tests/test_models.py | anilbpoyraz/recipe-app-api | 947ff8c54b0abeb9a2a70825bd5bfe74944ccde3 | [
"MIT"
] | null | null | null | app/core/tests/test_models.py | anilbpoyraz/recipe-app-api | 947ff8c54b0abeb9a2a70825bd5bfe74944ccde3 | [
"MIT"
] | null | null | null | app/core/tests/test_models.py | anilbpoyraz/recipe-app-api | 947ff8c54b0abeb9a2a70825bd5bfe74944ccde3 | [
"MIT"
] | null | null | null | from django.test import TestCase
from django.contrib.auth import get_user_model
from core import models
def sample_user(email="test@testmail.com", password="testpassword"):
"""Create a sample user"""
return get_user_model().objects.create_user(email, password)
class ModelsTest(TestCase):
def test_create... | 30.105263 | 69 | 0.649767 |
74389bb558b55ce221791f768f1ebb8745285ec8 | 162 | py | Python | tests/inputs/if-branching/57-joining-lists.py | helq/pytropos | 497ed5902e6e4912249ca0a46b477f9bfa6ae80a | [
"MIT"
] | 4 | 2019-10-06T18:01:24.000Z | 2020-07-03T05:27:35.000Z | tests/inputs/if-branching/57-joining-lists.py | helq/pytropos | 497ed5902e6e4912249ca0a46b477f9bfa6ae80a | [
"MIT"
] | 5 | 2021-06-07T15:50:04.000Z | 2021-06-07T15:50:06.000Z | tests/inputs/if-branching/57-joining-lists.py | helq/pytropos | 497ed5902e6e4912249ca0a46b477f9bfa6ae80a | [
"MIT"
] | null | null | null | from importantlib import either
either: int = either
a = [1]
a[0] = a
if either > 20:
a.append(2)
else:
a.append(3)
a[1] -= 1
# show_store(either > 20)
| 10.8 | 31 | 0.611111 |
7438b240cbc271ce36a31b0280899242c7ace028 | 852 | py | Python | DecTree.py | cedorman/footballmodel | 7300e631d3d460b04b69e2769f4f5ac784f6ceb1 | [
"Apache-2.0"
] | null | null | null | DecTree.py | cedorman/footballmodel | 7300e631d3d460b04b69e2769f4f5ac784f6ceb1 | [
"Apache-2.0"
] | null | null | null | DecTree.py | cedorman/footballmodel | 7300e631d3d460b04b69e2769f4f5ac784f6ceb1 | [
"Apache-2.0"
] | null | null | null | #
# Helper class for Decision Tree classifier
#
from sklearn import tree
from sklearn.metrics import roc_auc_score
import logger
class DecTree:
def __init__(self, X_train, X_test, y_train, y_test):
self.log = logger.getLogger()
self.X_train = X_train
self.X_test = X_test
self.y_tr... | 25.818182 | 75 | 0.637324 |
7438c4d8b1fbaf5125d8c956e711bf788c73aca9 | 6,073 | py | Python | global_variables.py | TensorLights/TensorLights | 624596c95f0673b0d960123af866f9f1586cf4bd | [
"Apache-2.0"
] | 1 | 2019-04-28T09:15:48.000Z | 2019-04-28T09:15:48.000Z | global_variables.py | TensorLights/TensorLights | 624596c95f0673b0d960123af866f9f1586cf4bd | [
"Apache-2.0"
] | null | null | null | global_variables.py | TensorLights/TensorLights | 624596c95f0673b0d960123af866f9f1586cf4bd | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# ATTENTION: Please configure the following paths to fit your machine setups.
# TF_HOME is the home directory for all files
# For each machine in the cluster, we assume the following directory strucutre
# TF_HOME/
# - data_directory
# - model_bins
# - tf_venv (the virtual... | 33.738889 | 80 | 0.626214 |
7438ca7e20224c19715b4a6868b9ba913bc48217 | 227,068 | py | Python | sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/models/_models_py3.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-02-01T18:50:12.000Z | 2022-02-01T18:50:12.000Z | sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/models/_models_py3.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/models/_models_py3.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 ... | 50.946376 | 830 | 0.695884 |
7438d0cf411d6ecea8a20bfbb737b01ed5398f7b | 11,286 | py | Python | microbenthos/utils/loader.py | achennu/microbenthos | c83fb60d05b5614546466601e973721640e685d4 | [
"MIT"
] | 3 | 2018-04-23T13:51:36.000Z | 2021-08-05T01:53:51.000Z | microbenthos/utils/loader.py | achennu/microbenthos | c83fb60d05b5614546466601e973721640e685d4 | [
"MIT"
] | 5 | 2018-04-09T20:08:40.000Z | 2018-05-04T23:08:50.000Z | microbenthos/utils/loader.py | achennu/microbenthos | c83fb60d05b5614546466601e973721640e685d4 | [
"MIT"
] | 2 | 2018-04-09T20:11:50.000Z | 2021-08-06T03:34:06.000Z | import logging
from collections.abc import Mapping
import cerberus
import pkg_resources
from fipy import PhysicalField
from sympy import Symbol, SympifyError, sympify
from .yaml_setup import yaml
# TODO: Allow equation with no diffusion term
physical_unit_type = cerberus.TypeDefinition('physical_unit', (PhysicalFiel... | 32.618497 | 98 | 0.584707 |
7438d525d9bebb2a006e180a0be96dbeb5e61041 | 3,915 | py | Python | generation/localizedstringkit/__init__.py | nickromano/LocalizedStringKit | c89f448dd6c0ad05adb3e34ce927293e2c087922 | [
"MIT"
] | 1 | 2021-08-15T10:20:39.000Z | 2021-08-15T10:20:39.000Z | generation/localizedstringkit/__init__.py | AfrazCodes/LocalizedStringKit | bc0777033050f6234834551be75b40d6b99089e5 | [
"MIT"
] | null | null | null | generation/localizedstringkit/__init__.py | AfrazCodes/LocalizedStringKit | bc0777033050f6234834551be75b40d6b99089e5 | [
"MIT"
] | null | null | null | """LocalizedStringKit handling tools."""
import filecmp
import os
import re
import shutil
import tempfile
from typing import Any, List, Optional, Tuple
from dotstrings.genstrings import generate_strings
from dotstrings import LocalizedString
from localizedstringkit import detection
from localizedstringkit import log... | 34.043478 | 98 | 0.723116 |
74398b9595b53773b5ad442efe5dbd762048e554 | 885 | py | Python | setup.py | ceridwen/keyword_only_args | 3528790642c4237b5db9feb4a12838112d010a01 | [
"MIT"
] | null | null | null | setup.py | ceridwen/keyword_only_args | 3528790642c4237b5db9feb4a12838112d010a01 | [
"MIT"
] | null | null | null | setup.py | ceridwen/keyword_only_args | 3528790642c4237b5db9feb4a12838112d010a01 | [
"MIT"
] | null | null | null | from setuptools import setup
setup(
name = 'keyword_only_args',
packages = ['keyword_only_args'],
version = '1.0',
description = 'A decorator to use keyword-only arguments in Python 2 and 3.',
author = 'Ceridwen',
author_email = 'ceridwenv@gmail.com',
license = 'MIT',
url = 'https://git... | 35.4 | 81 | 0.635028 |
7439f0843af92d776ec79d0eba7e661802c2723c | 232 | py | Python | src/gifts/tests/basic_test.py | tlatzko/gaia | 550bb3f8066a8cd9e3bcf7ac83ba018f548d6981 | [
"MIT"
] | 1 | 2016-08-29T17:34:01.000Z | 2016-08-29T17:34:01.000Z | src/gifts/tests/basic_test.py | tlatzko/gaia | 550bb3f8066a8cd9e3bcf7ac83ba018f548d6981 | [
"MIT"
] | null | null | null | src/gifts/tests/basic_test.py | tlatzko/gaia | 550bb3f8066a8cd9e3bcf7ac83ba018f548d6981 | [
"MIT"
] | null | null | null | '''
gaia: Test module.
Meant for use with py.test.
Write each test as a function named test_<something>.
Read more here: http://pytest.org/
Copyright 2016, Thomas Latzko
Licensed under MIT
'''
def test_example():
assert True
| 16.571429 | 53 | 0.728448 |
743a1230bf4776edd085cad6046825b36d911ea1 | 1,453 | py | Python | setup.py | antonkulaga/pyutils | d1ca9545a1cd053291f0063ffcc3f43ae9790dd3 | [
"Apache-2.0"
] | null | null | null | setup.py | antonkulaga/pyutils | d1ca9545a1cd053291f0063ffcc3f43ae9790dd3 | [
"Apache-2.0"
] | null | null | null | setup.py | antonkulaga/pyutils | d1ca9545a1cd053291f0063ffcc3f43ae9790dd3 | [
"Apache-2.0"
] | null | null | null | from setuptools import setup, find_packages
import codecs
import os
here = os.path.abspath(os.path.dirname(__file__))
with codecs.open(os.path.join(here, "README.md"), encoding="utf-8") as fh:
long_description = "\n" + fh.read()
VERSION = '0.0.9'
DESCRIPTION = 'Pycomfort - Python helper methods to make life easi... | 33.022727 | 94 | 0.659326 |
743a2383007432121509ed54fb7c05a52131e5c6 | 23,780 | py | Python | salt/modules/archive.py | Rafflecopter/salt | 08bbfcd4d9b93351d7d5d25b097e892026b6f1cd | [
"Apache-2.0"
] | 1 | 2020-10-19T11:49:49.000Z | 2020-10-19T11:49:49.000Z | salt/modules/archive.py | Rafflecopter/salt | 08bbfcd4d9b93351d7d5d25b097e892026b6f1cd | [
"Apache-2.0"
] | null | null | null | salt/modules/archive.py | Rafflecopter/salt | 08bbfcd4d9b93351d7d5d25b097e892026b6f1cd | [
"Apache-2.0"
] | 1 | 2020-10-19T11:49:50.000Z | 2020-10-19T11:49:50.000Z | # -*- coding: utf-8 -*-
'''
A module to wrap (non-Windows) archive calls
.. versionadded:: 2014.1.0
'''
from __future__ import absolute_import
import os
import contextlib # For < 2.7 compat
# Import salt libs
from salt.exceptions import SaltInvocationError, CommandExecutionError
from salt.ext.six import string_types... | 33.826458 | 113 | 0.589403 |
743a591ea3542c76b313728f078873ca5048fa0c | 5,249 | py | Python | bcbio/variation/multi.py | matanhofree/bcbio-nextgen | e6938cedb20ff3b7632165105941d71189e46aac | [
"MIT"
] | 1 | 2015-04-08T17:43:39.000Z | 2015-04-08T17:43:39.000Z | bcbio/variation/multi.py | matanhofree/bcbio-nextgen | e6938cedb20ff3b7632165105941d71189e46aac | [
"MIT"
] | null | null | null | bcbio/variation/multi.py | matanhofree/bcbio-nextgen | e6938cedb20ff3b7632165105941d71189e46aac | [
"MIT"
] | null | null | null | """Organize samples for coordinated multi-sample processing.
Handles grouping of related families or batches to go through variant
calling simultaneously.
"""
import collections
import copy
import os
from bcbio import utils
from bcbio.variation import vcfutils
def group_by_batch(items):
"""Group a set of sample ... | 34.761589 | 108 | 0.61345 |
743a7aa7293db1dfe855658e76201716b87fb5ec | 13,593 | py | Python | packaging/cinderlib/cinderlib-client.py | mu8086/ovirt-engine | 68237f721dff9b2c9e322ad8049dd68ab6a9ccad | [
"Apache-2.0"
] | null | null | null | packaging/cinderlib/cinderlib-client.py | mu8086/ovirt-engine | 68237f721dff9b2c9e322ad8049dd68ab6a9ccad | [
"Apache-2.0"
] | null | null | null | packaging/cinderlib/cinderlib-client.py | mu8086/ovirt-engine | 68237f721dff9b2c9e322ad8049dd68ab6a9ccad | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#
# Copyright 2018 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This progra... | 33.729529 | 79 | 0.656956 |
743a898cca979018aa3718bc8370a5d1651e2552 | 15,949 | py | Python | intersight/apis/compute_physical_summary_api.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/apis/compute_physical_summary_api.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/apis/compute_physical_summary_api.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Intersight REST API
This is Intersight REST API
OpenAPI spec version: 1.0.9-255
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import sys
import os
import re
# python 2 and python 3 compatibility library
from s... | 56.35689 | 818 | 0.649194 |
743aac92632f7e978dc3b6fe148e9b68ef35844e | 103,188 | py | Python | gpMgmt/bin/gpload.py | rodel-talampas/gpdb | 9c955e350334abbd922102f289f782697eb52069 | [
"PostgreSQL",
"Apache-2.0"
] | null | null | null | gpMgmt/bin/gpload.py | rodel-talampas/gpdb | 9c955e350334abbd922102f289f782697eb52069 | [
"PostgreSQL",
"Apache-2.0"
] | null | null | null | gpMgmt/bin/gpload.py | rodel-talampas/gpdb | 9c955e350334abbd922102f289f782697eb52069 | [
"PostgreSQL",
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# gpload - load file(s) into Greenplum Database
# Copyright Greenplum 2008
'''gpload [options] -f configuration file
Options:
-h hostname: host to connect to
-p port: port to connect to
-U username: user to connect as
-d database: database to connect to
... | 36.552604 | 188 | 0.549308 |
743ab38166a38440d19d2ebea9a3945c8d2fe173 | 7,786 | py | Python | docs/conf.py | fathat/glsvg | b58f947d0195ed866d8342e79b787d3e1ed6fe37 | [
"WTFPL"
] | 16 | 2015-10-05T18:59:40.000Z | 2021-03-04T17:03:38.000Z | docs/conf.py | fathat/glsvg | b58f947d0195ed866d8342e79b787d3e1ed6fe37 | [
"WTFPL"
] | 6 | 2015-07-13T10:49:53.000Z | 2015-10-05T20:29:11.000Z | docs/conf.py | fathat/glsvg | b58f947d0195ed866d8342e79b787d3e1ed6fe37 | [
"WTFPL"
] | 5 | 2015-07-16T15:47:25.000Z | 2018-12-28T13:02:07.000Z | # -*- coding: utf-8 -*-
#
# glsvg documentation build configuration file, created by
# sphinx-quickstart on Sun Feb 17 20:30:01 2013.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All c... | 31.779592 | 80 | 0.712946 |
743ac47d2aab700124694b1ba2a027ee5580d53d | 21,365 | py | Python | src/dewloosh/geom/topo/topo.py | dewloosh/dewloosh-geom | 5c97fbab4b68f4748bf4309184b9e0e877f94cd6 | [
"MIT"
] | 2 | 2021-12-11T17:25:51.000Z | 2022-01-06T15:36:27.000Z | src/dewloosh/geom/topo/topo.py | dewloosh/dewloosh-geom | 5c97fbab4b68f4748bf4309184b9e0e877f94cd6 | [
"MIT"
] | null | null | null | src/dewloosh/geom/topo/topo.py | dewloosh/dewloosh-geom | 5c97fbab4b68f4748bf4309184b9e0e877f94cd6 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import numpy as np
from numpy import ndarray
from numba import njit, prange
from typing import Union, Dict, List, Tuple
from awkward import Array as akarray
from scipy.sparse import csr_matrix as csr_scipy
from dewloosh.math.linalg.sparse import csr_matrix
from dewloosh.math.linalg.sparse.jagge... | 32.81874 | 93 | 0.618909 |
743ac85a109226a4e46183b9c199580860e683e6 | 14,406 | py | Python | salt/modules/ps.py | skrobul/salt | ef7fb71082cce7a9783e00b9c65062fefae09263 | [
"Apache-2.0"
] | 1 | 2018-02-03T17:30:56.000Z | 2018-02-03T17:30:56.000Z | salt/modules/ps.py | skrobul/salt | ef7fb71082cce7a9783e00b9c65062fefae09263 | [
"Apache-2.0"
] | null | null | null | salt/modules/ps.py | skrobul/salt | ef7fb71082cce7a9783e00b9c65062fefae09263 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
A salt interface to psutil, a system and process library.
See http://code.google.com/p/psutil.
:depends: - psutil Python module, version 0.3.0 or later
- python-utmp package (optional)
'''
# Import python libs
import time
# Import salt libs
import salt.utils
# Import third ... | 24.625641 | 79 | 0.597182 |
743ac8b9c137d9215457b10fcf89b8a630aa4727 | 4,787 | py | Python | src/api/bkuser_core/departments/models.py | Canway-shiisa/bk-user | a049e80d12082960828015742cea4b041f4af796 | [
"MIT"
] | null | null | null | src/api/bkuser_core/departments/models.py | Canway-shiisa/bk-user | a049e80d12082960828015742cea4b041f4af796 | [
"MIT"
] | null | null | null | src/api/bkuser_core/departments/models.py | Canway-shiisa/bk-user | a049e80d12082960828015742cea4b041f4af796 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-用户管理(Bk-User) available.
Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in compliance with the Lic... | 35.992481 | 119 | 0.686025 |
743ad25b283e4d9449f3f871ebc47d9e21ff28a1 | 841 | py | Python | net/data/verify_certificate_chain_unittest/generate-target-signed-with-md5.py | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 1 | 2020-07-15T09:50:14.000Z | 2020-07-15T09:50:14.000Z | net/data/verify_certificate_chain_unittest/generate-target-signed-with-md5.py | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | net/data/verify_certificate_chain_unittest/generate-target-signed-with-md5.py | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 6 | 2020-09-23T08:56:12.000Z | 2021-11-18T03:40:49.000Z | #!/usr/bin/python
# Copyright (c) 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Certificate chain with an intermediary that uses MD5 to sign the target
certificate. This is expected to fail because MD5 is too wea... | 31.148148 | 75 | 0.785969 |
743aeee7f1cc4e47f5d27bb1b6b5b20f92d2183c | 2,450 | py | Python | package/tests/mocks/file_system_service_mock.py | IngaAl/Ansible-Shell | 73113c6317c96b1d5e4109e44b3029dccc828919 | [
"Apache-2.0"
] | 1 | 2016-12-29T14:14:39.000Z | 2016-12-29T14:14:39.000Z | package/tests/mocks/file_system_service_mock.py | IngaAl/Ansible-Shell | 73113c6317c96b1d5e4109e44b3029dccc828919 | [
"Apache-2.0"
] | 85 | 2016-12-21T12:58:14.000Z | 2022-03-29T21:53:30.000Z | package/tests/mocks/file_system_service_mock.py | IngaAl/Ansible-Shell | 73113c6317c96b1d5e4109e44b3029dccc828919 | [
"Apache-2.0"
] | 4 | 2016-12-09T22:41:13.000Z | 2022-02-02T12:09:16.000Z | import random
import string
import os
import tempfile
from cloudshell.cm.ansible.domain.file_system_service import FileSystemService
class FileSystemServiceMock(FileSystemService):
def __init__(self):
self.folders = []
self.files = []
self.deleted_files = []
self.working_dir = os... | 29.166667 | 132 | 0.626531 |
743aef62573720ec452a2391cb1043ec02321fc1 | 18,477 | py | Python | oscar/lib/python2.7/site-packages/django_redis/client/default.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/django_redis/client/default.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/django_redis/client/default.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
import random
import socket
import warnings
from collections import OrderedDict
from django.conf import settings
from django.core.cache.backends.base import DEFAULT_TIMEOUT, get_key_func
from django.core.exceptions import Imp... | 35.194286 | 114 | 0.568761 |
743b1cea351b43832d065b88e5d9e2831563f8ae | 83,809 | py | Python | tests/trainer/test_trainer.py | lemairecarl/pytorch-lightning | 85304d4672a9ed24a16f7f5b2abaa34148ab86f4 | [
"Apache-2.0"
] | 8 | 2020-01-15T06:58:15.000Z | 2021-11-05T11:36:36.000Z | tests/trainer/test_trainer.py | lemairecarl/pytorch-lightning | 85304d4672a9ed24a16f7f5b2abaa34148ab86f4 | [
"Apache-2.0"
] | 3 | 2020-02-16T07:58:26.000Z | 2020-03-30T09:32:55.000Z | tests/trainer/test_trainer.py | lemairecarl/pytorch-lightning | 85304d4672a9ed24a16f7f5b2abaa34148ab86f4 | [
"Apache-2.0"
] | 3 | 2020-02-15T21:35:52.000Z | 2021-02-06T09:13:49.000Z | # Copyright The PyTorch Lightning team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | 37.314782 | 120 | 0.685284 |
743b24cdc434e6eb2ef7c42735ba2a155f1dfb9b | 96 | py | Python | pybie2d/kernels/high_level/__init__.py | dbstein/pybie2d | 1c2d6c05f6dbb4f1ab4476d3824f4dde20f90d58 | [
"Apache-2.0"
] | 11 | 2018-10-26T17:34:29.000Z | 2020-04-27T21:21:33.000Z | pybie2d/kernels/high_level/__init__.py | dbstein/pybie2d | 1c2d6c05f6dbb4f1ab4476d3824f4dde20f90d58 | [
"Apache-2.0"
] | null | null | null | pybie2d/kernels/high_level/__init__.py | dbstein/pybie2d | 1c2d6c05f6dbb4f1ab4476d3824f4dde20f90d58 | [
"Apache-2.0"
] | null | null | null | from . import laplace
from . import stokes
from . import cauchy
from . import modified_helmholtz | 24 | 32 | 0.802083 |
743b4a2fd50c28a723678f79dcd42b3be3d1d878 | 26,464 | py | Python | core/domain/question_services_test.py | cclauss/oppia | 7ad9d06e434c589f0aaa015252ca65872557b7eb | [
"Apache-2.0"
] | null | null | null | core/domain/question_services_test.py | cclauss/oppia | 7ad9d06e434c589f0aaa015252ca65872557b7eb | [
"Apache-2.0"
] | null | null | null | core/domain/question_services_test.py | cclauss/oppia | 7ad9d06e434c589f0aaa015252ca65872557b7eb | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 The Oppia Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | 44.778342 | 80 | 0.674463 |
743bd36843ee1ff16c400eee4a8ba654c3293d3c | 570 | py | Python | MedManagementWeb/MedWeb/MedWeb/patient_database/entities.py | Samuel789/MediPi | 6e738d1acc426e4196cae7fb174174c3e1480936 | [
"Apache-2.0"
] | null | null | null | MedManagementWeb/MedWeb/MedWeb/patient_database/entities.py | Samuel789/MediPi | 6e738d1acc426e4196cae7fb174174c3e1480936 | [
"Apache-2.0"
] | null | null | null | MedManagementWeb/MedWeb/MedWeb/patient_database/entities.py | Samuel789/MediPi | 6e738d1acc426e4196cae7fb174174c3e1480936 | [
"Apache-2.0"
] | 1 | 2020-10-22T03:54:55.000Z | 2020-10-22T03:54:55.000Z | from enum import Enum
class Status(Enum):
normal = 0
not_registered_with_concentrator = 1
never_synched = 2
not_synched_recently = 3
class Patient:
_json_name = "patient"
def __init__(self, uuid, first_name, last_name, dob, nhs_no):
self.uuid = uuid
self.adherence = None
... | 23.75 | 65 | 0.617544 |
743bec4fd5927f2a27273099880dd283f5f02e24 | 14,299 | py | Python | tests/evd/test_evd.py | mgovorcin/fringe | 0db5ec4d5ebe7c9b29e1f6f773f1237fb85f35ff | [
"Apache-2.0"
] | null | null | null | tests/evd/test_evd.py | mgovorcin/fringe | 0db5ec4d5ebe7c9b29e1f6f773f1237fb85f35ff | [
"Apache-2.0"
] | null | null | null | tests/evd/test_evd.py | mgovorcin/fringe | 0db5ec4d5ebe7c9b29e1f6f773f1237fb85f35ff | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
from array import array
import datetime
import glob
import os
import re
import numpy as np
from osgeo import gdal
def simulate_noise(corr_matrix: np.array) -> np.array:
N = corr_matrix.shape[0]
w, v = np.linalg.eigh(corr_matrix)
w[w < 1e-3] = 0.0
C = np.dot(v, np.dot(np.diag(n... | 32.720824 | 130 | 0.646689 |
743c14f63e86116570ab23f7dda0ce4fd6efe0ea | 6,726 | py | Python | lib/galaxy/webapps/reports/buildapp.py | tdans1/Use-Galaxy | e9f05cb1b11db20a729ac73520f886ee619c6b90 | [
"CC-BY-3.0"
] | 4 | 2018-10-29T18:34:38.000Z | 2021-09-29T23:30:42.000Z | lib/galaxy/webapps/reports/buildapp.py | tdans1/Use-Galaxy | e9f05cb1b11db20a729ac73520f886ee619c6b90 | [
"CC-BY-3.0"
] | 1 | 2019-02-04T16:21:27.000Z | 2019-02-04T16:45:17.000Z | lib/galaxy/webapps/reports/buildapp.py | chambm/galaxy | fd1926767996a161cd2fc8bd184e6835fd688765 | [
"CC-BY-3.0"
] | 3 | 2020-02-12T15:22:24.000Z | 2021-08-19T10:27:39.000Z | """
Provides factory methods to assemble the Galaxy web application
"""
import logging
import atexit
import os
from inspect import isclass
from paste import httpexceptions
from galaxy.util import asbool
from galaxy.webapps.util import (
MiddlewareWrapUnsupported,
build_template_error_formatters,
wrap_if... | 42.840764 | 114 | 0.689266 |
743c20ca3ceaa393248f90a3c408236e438a0d31 | 571 | py | Python | src/compas_cem/ghpython/components/CEM_ConstraintReactionForce/code.py | dylau/compas_cem | 643c7d60cb9d6a9999cb96d39c44175cc8662a25 | [
"MIT"
] | 15 | 2020-12-11T14:35:19.000Z | 2022-03-31T03:12:30.000Z | src/compas_cem/ghpython/components/CEM_ConstraintReactionForce/code.py | dylau/compas_cem | 643c7d60cb9d6a9999cb96d39c44175cc8662a25 | [
"MIT"
] | 8 | 2020-10-09T00:08:05.000Z | 2021-11-18T00:24:20.000Z | src/compas_cem/ghpython/components/CEM_ConstraintReactionForce/code.py | dylau/compas_cem | 643c7d60cb9d6a9999cb96d39c44175cc8662a25 | [
"MIT"
] | 2 | 2021-12-28T02:29:47.000Z | 2022-03-15T14:04:23.000Z | """
Make the reaction force on a trail edge to meet a target force vector.
"""
from ghpythonlib.componentbase import executingcomponent as component
from compas_rhino.geometry import RhinoVector
from compas_cem.optimization import ReactionForceConstraint
class ReactionForceConstraintComponent(component):
def Run... | 35.6875 | 70 | 0.761821 |
743c28f6d78bd7531e4e9505aed41bc05c62849e | 273 | py | Python | tests/conftest.py | 6un9-h0-Dan/python-idb | 649a12d6d2b7778f3def921a9acd045fb3286138 | [
"Apache-2.0"
] | 3 | 2018-01-16T11:11:37.000Z | 2019-10-13T14:52:40.000Z | tests/conftest.py | 6un9-h0-Dan/python-idb | 649a12d6d2b7778f3def921a9acd045fb3286138 | [
"Apache-2.0"
] | null | null | null | tests/conftest.py | 6un9-h0-Dan/python-idb | 649a12d6d2b7778f3def921a9acd045fb3286138 | [
"Apache-2.0"
] | 1 | 2019-02-21T04:28:41.000Z | 2019-02-21T04:28:41.000Z | def pytest_addoption(parser):
parser.addoption("--runslow",
action="store_true",
help="run slow tests")
parser.addoption("--rundebug",
action="store_true",
help="run debug tests")
| 30.333333 | 44 | 0.494505 |
743c457758211fcef890c8d9e9b0e39df83be890 | 378 | py | Python | source/utils/context.py | GoBoopADog/maelstrom | fce79fa964578dfee5d7beb4ec440deec5f8f25d | [
"MIT"
] | 2 | 2021-03-02T15:37:01.000Z | 2021-04-21T10:45:32.000Z | source/utils/context.py | GoBoopADog/maelstrom | fce79fa964578dfee5d7beb4ec440deec5f8f25d | [
"MIT"
] | 1 | 2021-02-28T20:26:04.000Z | 2021-03-01T17:55:55.000Z | source/utils/context.py | GoBoopADog/maelstrom | fce79fa964578dfee5d7beb4ec440deec5f8f25d | [
"MIT"
] | 4 | 2021-02-28T04:08:03.000Z | 2021-09-05T17:16:44.000Z | from discord.ext.commands import Context as _BaseContext
import json
class Context(_BaseContext):
"""A Custom Context for extra functionality."""
async def guild_config(self):
"""Gets the config for the guild."""
guild = await self.bot.db.fetch_guild(self.guild.id)
if guild:
... | 23.625 | 60 | 0.650794 |
743c4d1b0e444e515ceeffb7b8a6b9575bc9b0c0 | 452 | py | Python | main/migrations/0009_post_is_featured.py | OKThess/website | 3d5a2a125bfb48179937b058aa7180b751eb2b43 | [
"MIT"
] | 5 | 2017-08-25T16:37:18.000Z | 2019-02-25T18:26:37.000Z | main/migrations/0009_post_is_featured.py | OKThess/website | 3d5a2a125bfb48179937b058aa7180b751eb2b43 | [
"MIT"
] | 43 | 2017-01-22T23:58:43.000Z | 2018-05-17T21:35:16.000Z | main/migrations/0009_post_is_featured.py | OKThess/website | 3d5a2a125bfb48179937b058aa7180b751eb2b43 | [
"MIT"
] | 2 | 2017-11-05T08:36:02.000Z | 2017-12-22T17:37:19.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2017-08-19 13:30
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('main', '0008_auto_20170819_1319'),
]
operations = [
migrations.AddField(
... | 21.52381 | 53 | 0.617257 |
743c61844415965fcdbe1de7c630e04f63618c88 | 1,137 | py | Python | src/11-cython/perf/compute_cython.py | johnnymetz/async-techniques-python-course | ac3a56c0e480d21bda3f60bac9351102b6d36744 | [
"MIT"
] | null | null | null | src/11-cython/perf/compute_cython.py | johnnymetz/async-techniques-python-course | ac3a56c0e480d21bda3f60bac9351102b6d36744 | [
"MIT"
] | null | null | null | src/11-cython/perf/compute_cython.py | johnnymetz/async-techniques-python-course | ac3a56c0e480d21bda3f60bac9351102b6d36744 | [
"MIT"
] | null | null | null | import datetime
import math_core
from threading import Thread
import multiprocessing
def main():
math_core.do_math(1)
print("Doing math on {:,} processors.".format(multiprocessing.cpu_count()))
processor_count = multiprocessing.cpu_count()
threads = []
for n in range(1, processor_count + 1):
... | 22.74 | 79 | 0.532982 |
743c675c2867efd0a324a4ba7317879afa07a296 | 1,291 | py | Python | tests/test_op_metadata.py | NervanaSystems/ngraph-python | ac032c83c7152b615a9ad129d54d350f9d6a2986 | [
"Apache-2.0"
] | 18 | 2018-03-19T04:16:49.000Z | 2021-02-08T14:44:58.000Z | tests/test_op_metadata.py | rsumner31/ngraph | 5e5c9bb9f24d95aee190b914dd2d44122fc3be53 | [
"Apache-2.0"
] | 2 | 2019-04-16T06:41:49.000Z | 2019-05-06T14:08:13.000Z | tests/test_op_metadata.py | rsumner31/ngraph | 5e5c9bb9f24d95aee190b914dd2d44122fc3be53 | [
"Apache-2.0"
] | 11 | 2018-06-16T15:59:08.000Z | 2021-03-06T00:45:30.000Z | # ******************************************************************************
# Copyright 2017-2018 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.apa... | 32.275 | 80 | 0.627421 |
743c7740cecb4a7f085314adf697b99202ed0a70 | 4,126 | py | Python | env/lib/python2.7/site-packages/guess_language/data/models/en.py | Eric-Muthemba/qontroverse | 1f12d0e3bbdee628a88bac77dc53426ded220755 | [
"MIT"
] | null | null | null | env/lib/python2.7/site-packages/guess_language/data/models/en.py | Eric-Muthemba/qontroverse | 1f12d0e3bbdee628a88bac77dc53426ded220755 | [
"MIT"
] | 1 | 2021-06-02T01:45:42.000Z | 2021-06-02T01:45:42.000Z | env/lib/python2.7/site-packages/guess_language/data/models/en.py | Eric-Muthemba/qontroverse | 1f12d0e3bbdee628a88bac77dc53426ded220755 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
model = {
u' th': 0,
u'the': 1,
u'he ': 2,
u'ed ': 3,
u' to': 4,
u' in': 5,
u'er ': 6,
u'ing': 7,
u'ng ': 8,
u' an': 9,
u'nd ': 10,
u' of': 11,
u'and': 12,
u'to ': 13,
u'of ': 14,
u' co': 15,
u'at ': 16,
u'on ': 17,
u'in ': 18,
u' a ': 19,
u'd t': 20,
u' he': 21,
u'e t': 2... | 13.572368 | 23 | 0.441348 |
743c7ebc0f6352778a677a35ac4d7d705db896cf | 19,873 | py | Python | gaussian_wrangler/gauss_fragment.py | team-mayes/nrel_tools | 551f92f2c5448e7888bb2fb11bd04243b26da4a9 | [
"MIT"
] | 1 | 2021-05-26T15:29:45.000Z | 2021-05-26T15:29:45.000Z | gaussian_wrangler/gauss_fragment.py | team-mayes/nrel_tools | 551f92f2c5448e7888bb2fb11bd04243b26da4a9 | [
"MIT"
] | 2 | 2020-08-12T17:05:01.000Z | 2021-05-30T00:32:29.000Z | gaussian_wrangler/gauss_fragment.py | team-mayes/nrel_tools | 551f92f2c5448e7888bb2fb11bd04243b26da4a9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
homolytic fragmenter
"""
from __future__ import print_function
import os
import sys
import argparse
from configparser import ConfigParser, MissingSectionHeaderError
from common_wrangler.common import (InvalidDataError, warning, process_cfg, create_out_fname, list_to_file,
... | 46.981087 | 120 | 0.633271 |
743c9263dfe6daec857516723a1f053b24b79886 | 13,004 | py | Python | leetcode_python/Breadth-First-Search/clone-graph.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | null | null | null | leetcode_python/Breadth-First-Search/clone-graph.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | null | null | null | leetcode_python/Breadth-First-Search/clone-graph.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | null | null | null | """
133. Clone Graph
Medium
Given a reference of a node in a connected undirected graph.
Return a deep copy (clone) of the graph.
Each node in the graph contains a value (int) and a list (List[Node]) of its neighbors.
class Node {
public int val;
public List<Node> neighbors;
}
Test case format:
For sim... | 28.897778 | 230 | 0.555598 |
743c96544aad8b5a9dd6b6bdc75cf4537a643a24 | 12,401 | py | Python | language-modeling/fast_transformers/transformers.py | minhtannguyen/transformer-mgk | 304ebf3781b1eb4aeef93f2757319775d2fcdbc4 | [
"CC0-1.0"
] | 5 | 2021-11-06T16:10:31.000Z | 2021-12-25T19:47:42.000Z | language-modeling/fast_transformers/transformers.py | minhtannguyen/transformer-mgk | 304ebf3781b1eb4aeef93f2757319775d2fcdbc4 | [
"CC0-1.0"
] | null | null | null | language-modeling/fast_transformers/transformers.py | minhtannguyen/transformer-mgk | 304ebf3781b1eb4aeef93f2757319775d2fcdbc4 | [
"CC0-1.0"
] | 2 | 2021-11-30T03:36:54.000Z | 2021-12-25T19:49:58.000Z | """Implement transformer encoders and decoders that are going to be used with
different attention mechanisms.
In all cases the batch dimension is first and the sequence dimension is second.
"""
import torch
from torch.nn import Dropout, LayerNorm, Linear, Module, ModuleList
import torch.nn.functional as F
from .even... | 42.910035 | 80 | 0.624063 |
743ca63cce2dc3199024d47e22d198196d3d0ff0 | 1,715 | py | Python | src/bitpay-brick.py | javgh/bitpay-brick | 688cb3403111494bba5f453ea681515e03bf43b4 | [
"MIT"
] | 15 | 2016-11-20T15:38:49.000Z | 2021-08-23T02:59:49.000Z | src/bitpay-brick.py | javgh/bitpay-brick | 688cb3403111494bba5f453ea681515e03bf43b4 | [
"MIT"
] | null | null | null | src/bitpay-brick.py | javgh/bitpay-brick | 688cb3403111494bba5f453ea681515e03bf43b4 | [
"MIT"
] | 3 | 2016-11-21T11:57:13.000Z | 2019-03-24T21:12:41.000Z | #!/usr/bin/env python
import readline
from Queue import Queue
from bitpayeventsource import STATUS_PAID
from bitpayprovider import BitPayProvider
from bluetoothservice import BluetoothPaymentRequestService, \
BluetoothTxSubmissionService
from config import read_api_key
from frontend import Frontend
from nfcb... | 26.796875 | 77 | 0.81516 |
743cc3b9b4776c9520bfbf3850fa44416f38f568 | 3,042 | py | Python | master/teachkids-master/teachkids-master/ch10/SmileyPop2.py | AlexRogalskiy/DevArtifacts | 931aabb8cbf27656151c54856eb2ea7d1153203a | [
"MIT"
] | 4 | 2018-09-07T15:35:24.000Z | 2019-03-27T09:48:12.000Z | master/teachkids-master/teachkids-master/ch10/SmileyPop2.py | AlexRogalskiy/DevArtifacts | 931aabb8cbf27656151c54856eb2ea7d1153203a | [
"MIT"
] | 371 | 2020-03-04T21:51:56.000Z | 2022-03-31T20:59:11.000Z | master/teachkids-master/teachkids-master/ch10/SmileyPop2.py | AlexRogalskiy/DevArtifacts | 931aabb8cbf27656151c54856eb2ea7d1153203a | [
"MIT"
] | 3 | 2019-06-18T19:57:17.000Z | 2020-11-06T03:55:08.000Z | # SmileyPop2.py
import pygame
import random
BLACK = (0,0,0)
WHITE = (255,255,255)
pygame.init()
screen = pygame.display.set_mode([800,600])
pygame.display.set_caption("Pop a Smiley")
mousedown = False
keep_going = True
clock = pygame.time.Clock()
pic = pygame.image.load("CrazySmile.bmp")
colorkey = pic.get_at((0,0))
pi... | 35.788235 | 78 | 0.598291 |
743cc98829f3eabaadaccfeb150dd8697a6e5233 | 140 | py | Python | examples/version.0.0.2/Server/Events.py | dsal3389/easyTCP2 | f595442c9e56e36cbc067df95675f4fa1f7b889f | [
"MIT"
] | 1 | 2019-03-28T02:10:52.000Z | 2019-03-28T02:10:52.000Z | examples/version.0.0.2/Server/Events.py | dsal3389/easyTCP2 | f595442c9e56e36cbc067df95675f4fa1f7b889f | [
"MIT"
] | null | null | null | examples/version.0.0.2/Server/Events.py | dsal3389/easyTCP2 | f595442c9e56e36cbc067df95675f4fa1f7b889f | [
"MIT"
] | null | null | null | from easyTCP2.Server import Server, Group
@Server.Event(60) # event 60s
async def hello_world():
print('Hello world im an event!')
| 14 | 41 | 0.707143 |
743cdabe525e02239d2b194cb33e5fc4f5a0e7da | 1,179 | py | Python | Keras/sentimentClassificationBasedOnLSTM/sentimentClassificationBasedOnLSTM.py | jercas/ML_DL_aiPlayground | a8fdbbd401a0844c3e01e31732037a799675eb9c | [
"Apache-2.0"
] | null | null | null | Keras/sentimentClassificationBasedOnLSTM/sentimentClassificationBasedOnLSTM.py | jercas/ML_DL_aiPlayground | a8fdbbd401a0844c3e01e31732037a799675eb9c | [
"Apache-2.0"
] | null | null | null | Keras/sentimentClassificationBasedOnLSTM/sentimentClassificationBasedOnLSTM.py | jercas/ML_DL_aiPlayground | a8fdbbd401a0844c3e01e31732037a799675eb9c | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Wed Nov 29 20:05:00 2017
@author: jercas
"""
from keras.layers.core import Activation, Dense
from keras.layers.embeddings import Embedding
from keras.layers.recurrent import LSTM
from keras.models import Sequential
from keras.preprocessing import sequence
from sklearn.model_selec... | 26.795455 | 62 | 0.691264 |
743cee705de981d456dfcbb769c3ab6e763a1c7a | 4,166 | py | Python | scan/link_finders/find_links_for_containers.py | korenlev/calipso-cvim | 39278a5cf09c40b26a8a143ccc0c8d437961abc2 | [
"Apache-2.0"
] | null | null | null | scan/link_finders/find_links_for_containers.py | korenlev/calipso-cvim | 39278a5cf09c40b26a8a143ccc0c8d437961abc2 | [
"Apache-2.0"
] | null | null | null | scan/link_finders/find_links_for_containers.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 #
# #
... | 44.795699 | 80 | 0.537446 |
743d2c98f7e58591955b0fb8fc8ba3766580e6b4 | 7,491 | py | Python | haste/desktop_agent/benchmarking/results_analysis_single_run_splines.py | HASTE-project/desktop-agent | 71a3d0d69b5a6660d63158897a53d1a65aba49ba | [
"BSD-3-Clause"
] | 2 | 2020-08-06T22:27:39.000Z | 2021-12-04T12:59:45.000Z | haste/desktop_agent/benchmarking/results_analysis_single_run_splines.py | HASTE-project/desktop-agent | 71a3d0d69b5a6660d63158897a53d1a65aba49ba | [
"BSD-3-Clause"
] | null | null | null | haste/desktop_agent/benchmarking/results_analysis_single_run_splines.py | HASTE-project/desktop-agent | 71a3d0d69b5a6660d63158897a53d1a65aba49ba | [
"BSD-3-Clause"
] | 1 | 2021-04-30T23:57:44.000Z | 2021-04-30T23:57:44.000Z | import os
from haste.desktop_agent import golden
from haste.desktop_agent.benchmarking.__main__ import CONFIGS
import matplotlib.pyplot as plt
# See haste storage client
STATE_NONE = 0
STATE_IN_QUEUE_NOT_PRE_PROCESSED = 1
STATE_PRE_PROCESSING = 2
STATE_IN_QUEUE_PRE_PROCESSED = 3
STATE_POPPING = 4
STATE_POPPED = 5
# ... | 35.169014 | 198 | 0.680283 |
743d3337f0a13377382c23190acb66e4eadb24f7 | 63,265 | py | Python | PyPoE/poe/file/translations.py | Openarl/PyPoE | ab5377e3b16f1920d4d9ada443e1e9059715f0fb | [
"MIT"
] | 15 | 2017-09-19T05:40:42.000Z | 2021-04-23T00:59:24.000Z | PyPoE/poe/file/translations.py | Openarl/PyPoE | ab5377e3b16f1920d4d9ada443e1e9059715f0fb | [
"MIT"
] | null | null | null | PyPoE/poe/file/translations.py | Openarl/PyPoE | ab5377e3b16f1920d4d9ada443e1e9059715f0fb | [
"MIT"
] | 3 | 2018-02-14T00:02:09.000Z | 2020-07-26T15:18:55.000Z | """
Utilities for accessing Path of Exile's translation file format.
Overview
===============================================================================
+----------+------------------------------------------------------------------+
| Path | PyPoE/poe/file/translations.py |
... | 31.823441 | 121 | 0.565178 |
743d3e3210ca13495f7e67be53daebb2c59dd40a | 10,719 | py | Python | alipay/aop/api/domain/ChannelInfo.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/ChannelInfo.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/ChannelInfo.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.AssetsDetailParams import AssetsDetailParams
from alipay.aop.api.domain.SubChannelList import SubChannelList
class ChannelInfo(object):
def __init__(self):
self._asse... | 34.355769 | 99 | 0.605094 |
743d4b616d33e2db7cd4d7bc6ba87682812af47a | 4,524 | py | Python | 0x08-python-more_classes/8-rectangle.py | FatChicken277/holbertonschool-higher_level_programming | 520d6310a5e2a874f8c5f5185d0fb769b6412e7c | [
"CNRI-Python"
] | null | null | null | 0x08-python-more_classes/8-rectangle.py | FatChicken277/holbertonschool-higher_level_programming | 520d6310a5e2a874f8c5f5185d0fb769b6412e7c | [
"CNRI-Python"
] | null | null | null | 0x08-python-more_classes/8-rectangle.py | FatChicken277/holbertonschool-higher_level_programming | 520d6310a5e2a874f8c5f5185d0fb769b6412e7c | [
"CNRI-Python"
] | null | null | null | #!/usr/bin/python3
"""This module contains a class Rectangle
that defines a rectangle by: (based on 7-rectangle.py)
"""
class Rectangle:
"""This class defines a rectangle.
"""
number_of_instances = 0
print_symbol = "#"
def __init__(self, width=0, height=0):
"""Init the rectangle and ... | 28.632911 | 77 | 0.552829 |
743d5dbd581629df4e285d199f06769996566d83 | 3,299 | py | Python | pgp/provenance/cgi-mapper.py | googlegenomics/bigquery-examples | df7429b718cd3c2cbc305daa70a1e49166028179 | [
"Apache-2.0"
] | 72 | 2015-01-27T07:36:46.000Z | 2022-01-15T20:03:51.000Z | pgp/provenance/cgi-mapper.py | deflaux/bigquery-examples | 1780090e0dc0ae1fbb6c9e231569d2887d956468 | [
"Apache-2.0"
] | 17 | 2015-01-10T01:39:10.000Z | 2017-03-02T18:19:23.000Z | pgp/provenance/cgi-mapper.py | deflaux/bigquery-examples | 1780090e0dc0ae1fbb6c9e231569d2887d956468 | [
"Apache-2.0"
] | 23 | 2015-02-14T00:24:27.000Z | 2020-12-11T12:15:22.000Z | #!/usr/bin/env python
# Copyright 2014 Google 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... | 30.546296 | 148 | 0.712943 |
743d910ce736ed364a91b1e37622f601b2bee220 | 11,106 | py | Python | Notebooks/Oliver_world_demo.py | christymarc/raycasting-simulation | ed9b92143d3eb1c5a25900419ead517f93f8c315 | [
"MIT"
] | 3 | 2020-10-16T18:59:18.000Z | 2021-03-23T00:46:09.000Z | Notebooks/Oliver_world_demo.py | christymarc/raycasting-simulation | ed9b92143d3eb1c5a25900419ead517f93f8c315 | [
"MIT"
] | 3 | 2020-12-09T21:34:34.000Z | 2021-06-04T05:17:51.000Z | Notebooks/Oliver_world_demo.py | christymarc/raycasting-simulation | ed9b92143d3eb1c5a25900419ead517f93f8c315 | [
"MIT"
] | 5 | 2020-12-09T00:49:23.000Z | 2021-06-01T07:40:41.000Z | # ---
# jupyter:
# jupytext:
# formats: ipynb,py:light
# text_representation:
# extension: .py
# format_name: light
# format_version: '1.5'
# jupytext_version: 1.11.4
# kernelspec:
# display_name: Python 3 (ipykernel)
# language: python
# name: python3
# ---
# # Import P... | 24.68 | 196 | 0.6745 |
743db15a4dc77c043a6037780034e20de9a82afd | 3,618 | py | Python | evaluate.py | munakoiso/alpha-zero | 49d0dee93955fa4fb3c91e1291b889bea24cb30f | [
"MIT"
] | 76 | 2018-05-03T21:10:09.000Z | 2022-02-15T23:43:30.000Z | evaluate.py | munakoiso/alpha-zero | 49d0dee93955fa4fb3c91e1291b889bea24cb30f | [
"MIT"
] | 2 | 2018-09-22T03:01:12.000Z | 2019-01-13T12:08:32.000Z | evaluate.py | munakoiso/alpha-zero | 49d0dee93955fa4fb3c91e1291b889bea24cb30f | [
"MIT"
] | 26 | 2018-09-03T12:45:02.000Z | 2021-12-06T07:25:01.000Z | # MIT License
#
# Copyright (c) 2018 Blanyal D'Souza
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, mer... | 37.6875 | 80 | 0.594527 |
743db2da4883bbe674731f581b848f67cad0f7bf | 3,255 | py | Python | publication_backbone/templatetags/publication_backbone_utils_tags.py | Excentrics/publication-backbone | 65c9820308b09a6ae1086c265f8d49e36f3724b9 | [
"BSD-3-Clause"
] | 6 | 2016-05-19T14:59:51.000Z | 2020-03-19T10:08:29.000Z | publication_backbone/templatetags/publication_backbone_utils_tags.py | Excentrics/publication-backbone | 65c9820308b09a6ae1086c265f8d49e36f3724b9 | [
"BSD-3-Clause"
] | null | null | null | publication_backbone/templatetags/publication_backbone_utils_tags.py | Excentrics/publication-backbone | 65c9820308b09a6ae1086c265f8d49e36f3724b9 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from django import template
from django.core.urlresolvers import reverse
from classytags.core import Options, Tag
from classytags.arguments import Argument, MultiKeywordArgument
register = template.Library()
#==============================================================================
# Li... | 24.291045 | 126 | 0.506605 |
743dcef8eeafb224f2607b73c755e950686837cc | 4,000 | py | Python | project_updater.py | benzkji/project-updater | ab726638818d67fddb7c7999b7fad9152fbd5d99 | [
"MIT"
] | 2 | 2017-10-21T14:23:17.000Z | 2017-10-26T13:41:01.000Z | project_updater.py | benzkji/project-updater | ab726638818d67fddb7c7999b7fad9152fbd5d99 | [
"MIT"
] | null | null | null | project_updater.py | benzkji/project-updater | ab726638818d67fddb7c7999b7fad9152fbd5d99 | [
"MIT"
] | null | null | null | import os
import glob
import time
import click
import subprocess
@click.command()
@click.option('--name', help='Name of your update and folder where we\'ll look for shell scripts. Example: update-4.7.', required=True)
@click.option('--tag-prefix', default='', help='Prefix for your update tags. If empty, name is used... | 40.816327 | 135 | 0.51725 |
743df76995e1ff5bd65357e3656c1ae6dce455bf | 26,740 | py | Python | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/operations/_proximity_placement_groups_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2021-09-07T18:39:05.000Z | 2021-09-07T18:39:05.000Z | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/operations/_proximity_placement_groups_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/operations/_proximity_placement_groups_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 ... | 42.444444 | 208 | 0.687547 |
743dfa04526f405a65b7717ebfdc2356d3969e3c | 4,901 | py | Python | tensorbay/label/label_classification.py | YiweiLi4/tensorbay-python-sdk | 20fc8b37bad01c2d201a87b1436f1d4ff77d76df | [
"MIT"
] | null | null | null | tensorbay/label/label_classification.py | YiweiLi4/tensorbay-python-sdk | 20fc8b37bad01c2d201a87b1436f1d4ff77d76df | [
"MIT"
] | null | null | null | tensorbay/label/label_classification.py | YiweiLi4/tensorbay-python-sdk | 20fc8b37bad01c2d201a87b1436f1d4ff77d76df | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
#
# Copyright 2021 Graviti. Licensed under MIT License.
#
"""Classification.
:class:`ClassificationSubcatalog` defines the subcatalog for classification type of labels.
:class:`Classification` defines the concept of classification label,
which can apply to different types of data, such as imag... | 35.007143 | 98 | 0.635993 |
743e05fd425c0a25c8df07ed9948fcd6877a6a8b | 27,941 | py | Python | pydent/interfaces.py | aquariumbio/trident | d1712cae544103fb145e3171894e4b35141f6813 | [
"MIT"
] | 5 | 2019-01-21T11:12:05.000Z | 2020-03-05T20:52:14.000Z | pydent/interfaces.py | aquariumbio/pydent | d1712cae544103fb145e3171894e4b35141f6813 | [
"MIT"
] | 28 | 2020-11-18T02:07:09.000Z | 2021-06-08T15:49:41.000Z | pydent/interfaces.py | aquariumbio/trident | d1712cae544103fb145e3171894e4b35141f6813 | [
"MIT"
] | 2 | 2021-02-27T19:23:45.000Z | 2021-09-14T10:29:07.000Z | """Session interfaces for interacting with Aquarium.
Session interfaces are created by an AqSession instance and use an AqHTTP
instance to make http requests to Aquarium.
Generally, Trident users should be unable to directly access AqHTTP methods to
prevent potentially damaging requests or revealing sensitive informa... | 32.190092 | 88 | 0.584732 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.