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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9d06f6a514278141ce94fb89fb62f604c4692d13 | 450 | py | Python | plotly/validators/histogram2d/_autobinx.py | faezs/plotly.py | 6009b5b9c746e5d2a2849ad255a4eb234b551ed7 | [
"MIT"
] | 2 | 2020-03-24T11:41:14.000Z | 2021-01-14T07:59:43.000Z | plotly/validators/histogram2d/_autobinx.py | faezs/plotly.py | 6009b5b9c746e5d2a2849ad255a4eb234b551ed7 | [
"MIT"
] | null | null | null | plotly/validators/histogram2d/_autobinx.py | faezs/plotly.py | 6009b5b9c746e5d2a2849ad255a4eb234b551ed7 | [
"MIT"
] | 4 | 2019-06-03T14:49:12.000Z | 2022-01-06T01:05:12.000Z | import _plotly_utils.basevalidators
class AutobinxValidator(_plotly_utils.basevalidators.BooleanValidator):
def __init__(
self, plotly_name='autobinx', parent_name='histogram2d', **kwargs
):
super(AutobinxValidator, self).__init__(
plotly_name=plotly_name,
parent_name=... | 26.470588 | 73 | 0.62 |
3b11cf18952c989e5701434212b4174c1a6fa8c9 | 7,586 | py | Python | sdk/lusid_configuration/models/resource_list_of_configuration_item.py | finbourne/lusid-configuration-sdk-python-preview | f9ed2bc71042ce1b6f85baf62c9f6603150000dc | [
"MIT"
] | null | null | null | sdk/lusid_configuration/models/resource_list_of_configuration_item.py | finbourne/lusid-configuration-sdk-python-preview | f9ed2bc71042ce1b6f85baf62c9f6603150000dc | [
"MIT"
] | null | null | null | sdk/lusid_configuration/models/resource_list_of_configuration_item.py | finbourne/lusid-configuration-sdk-python-preview | f9ed2bc71042ce1b6f85baf62c9f6603150000dc | [
"MIT"
] | 1 | 2021-12-09T18:53:23.000Z | 2021-12-09T18:53:23.000Z | # coding: utf-8
"""
FINBOURNE ConfigurationService API
FINBOURNE Technology # noqa: E501
The version of the OpenAPI document: 0.1.281
Contact: info@finbourne.com
Generated by: https://openapi-generator.tech
"""
try:
from inspect import getfullargspec
except ImportError:
from inspect im... | 29.51751 | 140 | 0.607698 |
27322709c45c20ea7fa006a9b5214ad88a2827b1 | 4,063 | py | Python | metalibm_functions/unit_tests/new_arg_template.py | metalibm/metalibm | e3133bb95e13f797bb902ef7cd1d2f8f352c4454 | [
"MIT"
] | 12 | 2019-10-29T21:30:58.000Z | 2022-02-05T16:28:01.000Z | metalibm_functions/unit_tests/new_arg_template.py | metalibm/metalibm | e3133bb95e13f797bb902ef7cd1d2f8f352c4454 | [
"MIT"
] | 20 | 2021-03-11T19:46:48.000Z | 2022-02-05T16:03:29.000Z | metalibm_functions/unit_tests/new_arg_template.py | metalibm/metalibm | e3133bb95e13f797bb902ef7cd1d2f8f352c4454 | [
"MIT"
] | 4 | 2021-03-10T15:06:58.000Z | 2021-07-14T17:39:53.000Z | # -*- coding: utf-8 -*-
###############################################################################
# This file is part of metalibm (https://github.com/kalray/metalibm)
###############################################################################
# MIT License
#
# Copyright (c) 2018 Kalray
#
# Permission is here... | 38.330189 | 95 | 0.720404 |
feb4a32a848972a60edcbc3593bda7cdda320604 | 8,348 | py | Python | switools/verifyswi.py | johnrclarke/swi-tools | e938746c694e4eaa4cf4126981382c9c8372db24 | [
"Apache-2.0"
] | 3 | 2019-06-14T04:30:46.000Z | 2021-05-26T16:52:29.000Z | switools/verifyswi.py | johnrclarke/swi-tools | e938746c694e4eaa4cf4126981382c9c8372db24 | [
"Apache-2.0"
] | 1 | 2021-06-09T04:46:29.000Z | 2021-06-09T04:46:29.000Z | switools/verifyswi.py | johnrclarke/swi-tools | e938746c694e4eaa4cf4126981382c9c8372db24 | [
"Apache-2.0"
] | 6 | 2021-01-08T15:36:36.000Z | 2021-11-25T05:48:24.000Z | #!/usr/bin/env python3
# Copyright (c) 2018 Arista Networks, Inc.
# Use of this source code is governed by the Apache License 2.0
# that can be found in the LICENSE file.
from __future__ import print_function, absolute_import
import argparse
import base64
import binascii
import os
from pkg_resources import resource_s... | 37.603604 | 87 | 0.668543 |
3fc442cdc3f1f8871f6faed922cf6faeed14826e | 543 | py | Python | abc/157/C.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | 2 | 2022-01-22T07:56:58.000Z | 2022-01-24T00:29:37.000Z | abc/157/C.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | abc/157/C.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | import sys
from collections import defaultdict
sys.setrecursionlimit(10 ** 6)
stdin = sys.stdin
INF = float('inf')
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().strip()
N, M = na()
SC = []
for _ in range(M):
s, c = na()
SC.append((s, c))
start = ... | 18.724138 | 53 | 0.53407 |
cb14e3a96db250d549b32c019ed828c39ef09988 | 792 | py | Python | week3-webScraping/py06-myhome.py | MarionMcG/dataRepresentation | 3d9911d28f56d5470b1ea1e172fa8451027aa8ff | [
"Apache-2.0"
] | null | null | null | week3-webScraping/py06-myhome.py | MarionMcG/dataRepresentation | 3d9911d28f56d5470b1ea1e172fa8451027aa8ff | [
"Apache-2.0"
] | null | null | null | week3-webScraping/py06-myhome.py | MarionMcG/dataRepresentation | 3d9911d28f56d5470b1ea1e172fa8451027aa8ff | [
"Apache-2.0"
] | null | null | null | #Web Scraping Lecture 2
#https://www.myhome.ie/residential/mayo/property-for-sale?page=2
import requests
import csv
from bs4 import BeautifulSoup
page = requests.get("https://www.myhome.ie/residential/mayo/property-for-sale?page=1")
soup = BeautifulSoup(page.content, "html.parser")
home_file = open("myhome.csv", mo... | 29.333333 | 97 | 0.743687 |
6874f783828ecd72fc39864caea3361d50b1ef00 | 9,677 | py | Python | docs/exts/docs_build/docs_builder.py | emilioego/airflow | 3457c7847cd24413ff5b622e65c27d8370f94502 | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 7 | 2018-11-19T12:05:13.000Z | 2020-01-17T08:30:38.000Z | docs/exts/docs_build/docs_builder.py | emilioego/airflow | 3457c7847cd24413ff5b622e65c27d8370f94502 | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | docs/exts/docs_build/docs_builder.py | emilioego/airflow | 3457c7847cd24413ff5b622e65c27d8370f94502 | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 1 | 2021-01-27T19:24:09.000Z | 2021-01-27T19:24:09.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 41.178723 | 108 | 0.60711 |
43810738caeb09e110cdc4b95e566c875c2ad8f9 | 318 | py | Python | 1298.py | TheLurkingCat/TIOJ | 077e1cd22239d8f6bc1cd7561f27c68143e80263 | [
"MIT"
] | null | null | null | 1298.py | TheLurkingCat/TIOJ | 077e1cd22239d8f6bc1cd7561f27c68143e80263 | [
"MIT"
] | null | null | null | 1298.py | TheLurkingCat/TIOJ | 077e1cd22239d8f6bc1cd7561f27c68143e80263 | [
"MIT"
] | null | null | null | s = []
win = 0
lose = 0
a = int(input())
for _ in range(a):
t = int(input())
if t <= 0:
lose += 1
else:
win += 1
s.append(abs(t))
s.sort()
del s[0]
del s[-1]
print('Average time: {:.3f} sec(s).'.format(sum(s) / len(s)))
print('Winning rate: {:.3f} %.'.format(win * 100 / (win + lose)))
| 18.705882 | 65 | 0.490566 |
c51a1343be69194b4d0e38a3821576b4a61ae578 | 44,513 | py | Python | zerver/tests/test_link_embed.py | prathamjagga/zulip | 1a00e62e5739241f18857b7e781b49083daaeb97 | [
"Apache-2.0"
] | null | null | null | zerver/tests/test_link_embed.py | prathamjagga/zulip | 1a00e62e5739241f18857b7e781b49083daaeb97 | [
"Apache-2.0"
] | null | null | null | zerver/tests/test_link_embed.py | prathamjagga/zulip | 1a00e62e5739241f18857b7e781b49083daaeb97 | [
"Apache-2.0"
] | null | null | null | import re
from collections import OrderedDict
from typing import Any, Optional, Union
from unittest import mock
from urllib.parse import parse_qsl, urlencode, urlsplit, urlunsplit
import responses
from django.test import override_settings
from django.utils.html import escape
from pyoembed.providers import get_provider... | 42.759846 | 451 | 0.602947 |
2293f5c3810352f9007d70f58ae1ada2a1e4f4b1 | 132 | py | Python | meanmediancalc.py | adii-n/python-practice | 4f0bb8fda2be64cd19c5086eb2f7adb1a4bd3be5 | [
"MIT"
] | null | null | null | meanmediancalc.py | adii-n/python-practice | 4f0bb8fda2be64cd19c5086eb2f7adb1a4bd3be5 | [
"MIT"
] | null | null | null | meanmediancalc.py | adii-n/python-practice | 4f0bb8fda2be64cd19c5086eb2f7adb1a4bd3be5 | [
"MIT"
] | null | null | null | import numpy
data_list = [[2014,1 ], [2015, ], [2016, ], [2017, ], [2018, ], [2019, ], [2020, ]]
mean = data_list[0][1]
print(mean) | 26.4 | 83 | 0.55303 |
88a1809695b4259c92d457bcdd7acfe7f849b2c4 | 338 | py | Python | utils/read_profile_output.py | cwwang15/neural_network_cracking | 2bb89da599ca0f30d868ca26ab284d559b56d301 | [
"Apache-2.0"
] | 196 | 2016-06-01T18:59:57.000Z | 2022-02-10T08:19:10.000Z | utils/read_profile_output.py | cwwang15/neural_network_cracking | 2bb89da599ca0f30d868ca26ab284d559b56d301 | [
"Apache-2.0"
] | 20 | 2016-08-15T18:51:50.000Z | 2021-12-09T09:00:49.000Z | utils/read_profile_output.py | cwwang15/neural_network_cracking | 2bb89da599ca0f30d868ca26ab284d559b56d301 | [
"Apache-2.0"
] | 75 | 2016-06-18T11:14:46.000Z | 2022-03-25T04:02:15.000Z | import sys
import argparse
import pstats
def main(args):
stat = pstats.Stats(args.ifile)
stat.sort_stats('tottime')
stat.print_stats()
if __name__=='__main__':
parser = argparse.ArgumentParser(description='Read output of cProfile. ')
parser.add_argument('ifile', help = 'Input file. ')
main(par... | 24.142857 | 77 | 0.707101 |
473f6f4513ec120ff3a88f1b7bc96e9dc401e85f | 13,710 | py | Python | src/ui/ui_cfg_usdhcmmc.py | ben-github/NXP-MCUBootUtility | 3ff9fa203d667844f83a08c855fef85723d2612e | [
"Apache-2.0"
] | 1 | 2019-12-18T09:52:17.000Z | 2019-12-18T09:52:17.000Z | src/ui/ui_cfg_usdhcmmc.py | ben-github/NXP-MCUBootUtility | 3ff9fa203d667844f83a08c855fef85723d2612e | [
"Apache-2.0"
] | null | null | null | src/ui/ui_cfg_usdhcmmc.py | ben-github/NXP-MCUBootUtility | 3ff9fa203d667844f83a08c855fef85723d2612e | [
"Apache-2.0"
] | null | null | null | #! /usr/bin/env python
# -*- coding: utf-8 -*-
import wx
import sys
import os
import RTyyyy_uidef
import uidef
import uivar
import uilang
sys.path.append(os.path.abspath(".."))
from win import bootDeviceWin_UsdhcMmc
from utils import sound
class secBootUiUsdhcMmc(bootDeviceWin_UsdhcMmc.bootDeviceWin_Usdhc... | 41.047904 | 133 | 0.620423 |
2321b9cdcc0c0491b3f131deba045f55a14edb3c | 7,517 | py | Python | salt/modules/deb_apache.py | jubrad/salt | 7960334fb726cfde45e6409da79a65535c626685 | [
"Apache-2.0"
] | 1 | 2021-08-14T13:48:38.000Z | 2021-08-14T13:48:38.000Z | salt/modules/deb_apache.py | jubrad/salt | 7960334fb726cfde45e6409da79a65535c626685 | [
"Apache-2.0"
] | 3 | 2015-03-31T14:44:05.000Z | 2015-06-18T19:02:24.000Z | salt/modules/deb_apache.py | jubrad/salt | 7960334fb726cfde45e6409da79a65535c626685 | [
"Apache-2.0"
] | 1 | 2020-01-02T09:03:24.000Z | 2020-01-02T09:03:24.000Z | # -*- coding: utf-8 -*-
'''
Support for Apache
Please note: The functions in here are Debian-specific. Placing them in this
separate file will allow them to load only on Debian-based systems, while still
loading under the ``apache`` namespace.
'''
from __future__ import absolute_import
# Import python libs
import os
... | 22.848024 | 80 | 0.609818 |
913fc0ff510a0d06b15f76901809a5cd637d877b | 3,337 | py | Python | gcp_pilot/secret_manager.py | guilacerda/gcp-pilot | b31a7d4cd2de94a57c928c024e8f5b074f628224 | [
"Apache-2.0"
] | null | null | null | gcp_pilot/secret_manager.py | guilacerda/gcp-pilot | b31a7d4cd2de94a57c928c024e8f5b074f628224 | [
"Apache-2.0"
] | 16 | 2021-01-11T00:59:42.000Z | 2022-03-29T18:34:55.000Z | gcp_pilot/secret_manager.py | guilacerda/gcp-pilot | b31a7d4cd2de94a57c928c024e8f5b074f628224 | [
"Apache-2.0"
] | 1 | 2021-09-17T05:38:41.000Z | 2021-09-17T05:38:41.000Z | # More Information: <https://googleapis.dev/python/secretmanager/latest/index.html>
from typing import List, Tuple
from google.api_core.exceptions import NotFound
from google.cloud import secretmanager
from gcp_pilot.base import GoogleCloudPilotAPI
class SecretManager(GoogleCloudPilotAPI):
_client_class = secre... | 37.494382 | 116 | 0.616722 |
a1f284b67d57e15bc52959442938cfa9c6cc8cea | 44 | py | Python | stormed/method/__init__.py | bufferx/stormed-amqp | 6b29ae069a3cf62277ed1dffe7dd895a743f28e9 | [
"MIT"
] | 15 | 2015-03-06T12:35:52.000Z | 2020-06-28T01:46:09.000Z | stormed/method/__init__.py | brimcfadden/stormed-amqp | 59e81bfa4632366dc3f20b3dff25df3331480798 | [
"MIT"
] | 14 | 2015-01-08T21:13:27.000Z | 2016-03-09T13:22:01.000Z | stormed/method/__init__.py | brimcfadden/stormed-amqp | 59e81bfa4632366dc3f20b3dff25df3331480798 | [
"MIT"
] | 14 | 2015-01-11T22:25:37.000Z | 2020-06-28T01:46:13.000Z | from stormed.method.codegen import id2class
| 22 | 43 | 0.863636 |
cafe87f432cc1703faa54fa405651a288e059784 | 6,843 | py | Python | nasbench301/surrogate_models/gradient_boosting/lgboost.py | crwhite14/nasbench301 | b5510fa6ae0c647e63a00db450e056a418bd7b4b | [
"Apache-2.0"
] | 1 | 2021-10-01T20:17:05.000Z | 2021-10-01T20:17:05.000Z | nasbench301/surrogate_models/gradient_boosting/lgboost.py | crwhite14/nasbench301 | b5510fa6ae0c647e63a00db450e056a418bd7b4b | [
"Apache-2.0"
] | null | null | null | nasbench301/surrogate_models/gradient_boosting/lgboost.py | crwhite14/nasbench301 | b5510fa6ae0c647e63a00db450e056a418bd7b4b | [
"Apache-2.0"
] | null | null | null | import logging
import os
import pickle
import lightgbm as lgb
import matplotlib.pyplot as plt
import numpy as np
from nasbench301.surrogate_models import utils
from nasbench301.surrogate_models.bananas.bananas_utils import BANANASDataset
from nasbench301.surrogate_models.surrogate_model import SurrogateModel
class ... | 38.016667 | 120 | 0.659798 |
3e8519b293a5c66887ce7b61655a04f2d78ab9a2 | 3,344 | py | Python | sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/_configuration.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 3 | 2020-06-23T02:25:27.000Z | 2021-09-07T18:48:11.000Z | sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/_configuration.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 510 | 2019-07-17T16:11:19.000Z | 2021-08-02T08:38:32.000Z | sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/_configuration.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 5 | 2019-09-04T12:51:37.000Z | 2020-09-16T07:28:40.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 ... | 49.176471 | 176 | 0.704844 |
823db373484e9d37d3a65d28a0d875d75638c019 | 32,634 | py | Python | plotly/figure_factory/_county_choropleth.py | simon04/plotly.py | 7a0ad418bfe8e9bcf5c3d25bb5864869af0954fb | [
"MIT"
] | 5 | 2022-02-20T07:10:02.000Z | 2022-03-18T17:47:53.000Z | SLpackage/private/thirdparty/pythonpkgs/plotly/plotly_2.6.0/lib/python2.7/site-packages/plotly/figure_factory/_county_choropleth.py | fanglab/6mASCOPE | 3f1fdcb7693ff152f17623ce549526ec272698b1 | [
"BSD-3-Clause"
] | null | null | null | SLpackage/private/thirdparty/pythonpkgs/plotly/plotly_2.6.0/lib/python2.7/site-packages/plotly/figure_factory/_county_choropleth.py | fanglab/6mASCOPE | 3f1fdcb7693ff152f17623ce549526ec272698b1 | [
"BSD-3-Clause"
] | null | null | null | from plotly import colors, exceptions, optional_imports
from plotly.figure_factory import utils
import io
import numpy as np
import os
import pandas as pd
import warnings
from math import log, floor
from numbers import Number
pd.options.mode.chained_assignment = None
shapely = optional_imports.get_module('shapely'... | 34.977492 | 87 | 0.572593 |
b14bf727c07641dd997f8581373e20f75ddf4f6e | 2,660 | py | Python | generate_docker_images.py | panther-labs/xgo | 593a78c2b4cb1a1b0e1777c18249a1f3fb05086e | [
"MIT"
] | 242 | 2019-02-28T09:28:21.000Z | 2022-03-29T12:22:28.000Z | generate_docker_images.py | panther-labs/xgo | 593a78c2b4cb1a1b0e1777c18249a1f3fb05086e | [
"MIT"
] | 72 | 2019-03-24T09:10:13.000Z | 2022-03-12T13:42:56.000Z | generate_docker_images.py | panther-labs/xgo | 593a78c2b4cb1a1b0e1777c18249a1f3fb05086e | [
"MIT"
] | 62 | 2019-05-10T15:50:55.000Z | 2022-02-17T06:41:12.000Z | import requests
import os
import hashlib
import re
from jsonpath_ng import jsonpath, parse
def generate_image(image):
version = image["version"].replace("go1","go-1")
wildcard = version
if version.count('.') > 1:
wildcard = re.sub("\.\d+$", ".x", version)
else:
version = version + ".0"
wildcard = w... | 29.230769 | 86 | 0.655639 |
c43c2f8a83ea9b9ea551dc3352e1e36e1e10d109 | 125 | py | Python | tests/cases/test-default-project/conf.py | zml2008/sphinx-github-role | b74765fd3e16037506944893a0fcadfc229cfcb2 | [
"BSD-2-Clause"
] | 3 | 2021-11-21T18:31:58.000Z | 2021-11-24T19:44:16.000Z | tests/cases/test-default-project/conf.py | zml2008/sphinx-github-role | b74765fd3e16037506944893a0fcadfc229cfcb2 | [
"BSD-2-Clause"
] | 10 | 2021-11-20T19:19:52.000Z | 2022-02-18T05:49:19.000Z | tests/cases/test-default-project/conf.py | zml2008/sphinx-github-role | b74765fd3e16037506944893a0fcadfc229cfcb2 | [
"BSD-2-Clause"
] | 3 | 2021-11-24T20:23:55.000Z | 2022-02-14T01:59:35.000Z | extensions = [
"sphinx_github_role",
]
github_default_org_project = ("readthedocs", "readthedocs.org")
nitpicky = True
| 15.625 | 63 | 0.728 |
eeca4d597c5e3c34a3d6f3e6bc0b693996b00031 | 773 | py | Python | scripts/data_processing/bckgrd_subtraction/bckgrd_subtract_redefine_cost_func_modified_chebyshev_3.py | fang-ren/segmentation_CoFeZr | 072b5fdde332ba0211189723494d172c36999e93 | [
"BSD-3-Clause-LBNL"
] | null | null | null | scripts/data_processing/bckgrd_subtraction/bckgrd_subtract_redefine_cost_func_modified_chebyshev_3.py | fang-ren/segmentation_CoFeZr | 072b5fdde332ba0211189723494d172c36999e93 | [
"BSD-3-Clause-LBNL"
] | null | null | null | scripts/data_processing/bckgrd_subtraction/bckgrd_subtract_redefine_cost_func_modified_chebyshev_3.py | fang-ren/segmentation_CoFeZr | 072b5fdde332ba0211189723494d172c36999e93 | [
"BSD-3-Clause-LBNL"
] | null | null | null | """
Created on Feb 8, 2017
@author: fangren
"""
import os.path
import matplotlib.pyplot as plt
import numpy as np
from scipy.optimize import minimize
from numpy.polynomial.polynomial import polyfit, polyval
path = 'C:\\Research_FangRen\\Data\\Metallic_glasses_data\\CoZrFe_ternary\\1D\\raw_1D'
spectrum_file = os.path... | 27.607143 | 86 | 0.752911 |
3f19ce5028b3c2107d688e0e88e8e27a05b3f121 | 128 | py | Python | src/forms/users/__init__.py | nnecklace/webi-shoppi | 140d1e6ea8d019aa10ee2104e1bbd2baf0b9aa0f | [
"MIT"
] | null | null | null | src/forms/users/__init__.py | nnecklace/webi-shoppi | 140d1e6ea8d019aa10ee2104e1bbd2baf0b9aa0f | [
"MIT"
] | 2 | 2020-06-02T13:55:02.000Z | 2020-06-16T17:58:55.000Z | src/forms/users/__init__.py | nnecklace/webi-shoppi | 140d1e6ea8d019aa10ee2104e1bbd2baf0b9aa0f | [
"MIT"
] | null | null | null | from . import users
from .change_password import ChangePasswordForm
from .users import UserForm
from .balance import BalanceForm | 32 | 47 | 0.851563 |
9c6f5b6bb328bdf92825ee59e3f9f0f8822be8c6 | 516 | py | Python | hknweb/shortlinks/views.py | anthonymaltsev/hknweb | 7490fbb166208ba14463445ff0149292ca3c37ba | [
"MIT"
] | 20 | 2018-01-07T02:15:43.000Z | 2021-09-15T04:25:50.000Z | hknweb/shortlinks/views.py | anthonymaltsev/hknweb | 7490fbb166208ba14463445ff0149292ca3c37ba | [
"MIT"
] | 292 | 2018-02-01T18:31:18.000Z | 2022-03-30T22:15:08.000Z | hknweb/shortlinks/views.py | anthonymaltsev/hknweb | 7490fbb166208ba14463445ff0149292ca3c37ba | [
"MIT"
] | 85 | 2017-11-13T06:33:13.000Z | 2022-03-30T20:32:55.000Z | from django.shortcuts import redirect, render
from django.http import HttpResponse
from .models import Link
def index(request, temp):
return HttpResponse("Hello, world. You're at " + temp)
def openLink(request, temp):
count = Link.objects.filter(active=True, name=temp).count()
if count == 0:
re... | 27.157895 | 66 | 0.715116 |
1ba86dcc7620bd56347cf9a5da368170c29a5a91 | 14,593 | py | Python | model_zoo/wide_and_deep/src/wide_and_deep.py | Xylonwang/mindspore | ea37dc76f0a8f0b10edd85c2ad545af44552af1e | [
"Apache-2.0"
] | 1 | 2020-06-17T07:05:45.000Z | 2020-06-17T07:05:45.000Z | model_zoo/wide_and_deep/src/wide_and_deep.py | Xylonwang/mindspore | ea37dc76f0a8f0b10edd85c2ad545af44552af1e | [
"Apache-2.0"
] | null | null | null | model_zoo/wide_and_deep/src/wide_and_deep.py | Xylonwang/mindspore | ea37dc76f0a8f0b10edd85c2ad545af44552af1e | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 43.047198 | 100 | 0.590968 |
f505c406234101e063527c36e27ea877d1fbb473 | 10,318 | py | Python | tests/integration/test_install_uri.py | swilcox21/pipenv | bf7203148e1e0f57ab86b652d76135f17bf66927 | [
"MIT"
] | 6,263 | 2017-01-20T17:41:36.000Z | 2022-02-15T20:48:57.000Z | tests/integration/test_install_uri.py | swilcox21/pipenv | bf7203148e1e0f57ab86b652d76135f17bf66927 | [
"MIT"
] | 1,100 | 2017-01-20T19:41:52.000Z | 2017-12-06T09:15:13.000Z | tests/integration/test_install_uri.py | swilcox21/pipenv | bf7203148e1e0f57ab86b652d76135f17bf66927 | [
"MIT"
] | 366 | 2017-01-21T10:06:52.000Z | 2021-11-25T17:09:19.000Z | # -*- coding=utf-8 -*-
from __future__ import absolute_import, print_function
import os
import pytest
from flaky import flaky
import delegator
from pipenv._compat import Path
@flaky
@pytest.mark.vcs
@pytest.mark.install
@pytest.mark.needs_internet
def test_basic_vcs_install(PipenvInstance):
with PipenvInstance... | 33.5 | 110 | 0.632487 |
fed0c45d8d764cd4e5388ec6f2588005e7c2a07c | 19 | py | Python | tests/__init__.py | optimizely/Docebo-SSO | dbd4410e7d823f0514ce0eea5ff7b2e715a1fc8b | [
"Apache-2.0"
] | 2 | 2015-10-30T16:31:12.000Z | 2016-10-17T17:43:21.000Z | tests/__init__.py | optimizely/Docebo-SSO | dbd4410e7d823f0514ce0eea5ff7b2e715a1fc8b | [
"Apache-2.0"
] | 2 | 2015-10-30T23:30:31.000Z | 2015-11-06T19:43:03.000Z | tests/__init__.py | optimizely/Docebo-SSO | dbd4410e7d823f0514ce0eea5ff7b2e715a1fc8b | [
"Apache-2.0"
] | 3 | 2018-02-15T00:24:45.000Z | 2021-02-13T10:37:30.000Z | import local_tests
| 9.5 | 18 | 0.894737 |
5ab5b010ea7260e245987ca2dc87cd08b0604f85 | 2,800 | py | Python | chj/cmdline/engagements/chj_report_callgraph.py | aemcgraw/CodeHawk-Java | 8e43877d0357579f6509d3fc52c69c2d4568d288 | [
"MIT"
] | null | null | null | chj/cmdline/engagements/chj_report_callgraph.py | aemcgraw/CodeHawk-Java | 8e43877d0357579f6509d3fc52c69c2d4568d288 | [
"MIT"
] | null | null | null | chj/cmdline/engagements/chj_report_callgraph.py | aemcgraw/CodeHawk-Java | 8e43877d0357579f6509d3fc52c69c2d4568d288 | [
"MIT"
] | null | null | null | # ------------------------------------------------------------------------------
# CodeHawk Java Analyzer
# Author: Henny Sipma
# ------------------------------------------------------------------------------
# The MIT License (MIT)
#
# Copyright (c) 2016-2020 Kestrel Technology LLC
#
# Permission is hereby granted, fr... | 36.842105 | 106 | 0.6275 |
8e140de14a7802f6f882e93c382f4c4a8ba2a743 | 809 | py | Python | project/meals/migrations/0001_initial.py | hasansarifdeveloper/ResturentManagment | d018161d209547aac605ff5f140ca5aaadcae211 | [
"bzip2-1.0.6"
] | null | null | null | project/meals/migrations/0001_initial.py | hasansarifdeveloper/ResturentManagment | d018161d209547aac605ff5f140ca5aaadcae211 | [
"bzip2-1.0.6"
] | 10 | 2020-06-05T22:38:43.000Z | 2022-02-10T12:32:15.000Z | project/meals/migrations/0001_initial.py | hasansarifdeveloper/ResturentManagment | d018161d209547aac605ff5f140ca5aaadcae211 | [
"bzip2-1.0.6"
] | null | null | null | # Generated by Django 2.2.3 on 2019-07-30 15:53
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Meals',
fields=[
('id', models.AutoField(au... | 29.962963 | 114 | 0.566131 |
7cc37b50179d0b0d1d9b3442ed00a4b5b0a580ca | 1,683 | py | Python | omftb.py | vladimirgamalian/OMFTB | 91faa6e140fb8e65d49d83c5a2a968a73310298f | [
"MIT"
] | null | null | null | omftb.py | vladimirgamalian/OMFTB | 91faa6e140fb8e65d49d83c5a2a968a73310298f | [
"MIT"
] | null | null | null | omftb.py | vladimirgamalian/OMFTB | 91faa6e140fb8e65d49d83c5a2a968a73310298f | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import requests
import click
import random
BOT_API_URL = 'https://api.telegram.org/bot'
secret_number = {}
def process_message(chat_id, text):
global secret_number
if (text == '/start') or (chat_id not in secret_number):
secret_number[chat_id] = random... | 25.892308 | 86 | 0.632799 |
2780369a999ae2ce8bfc75a3f6f521b7a9ba17ba | 16,043 | py | Python | pytorch_lightning/strategies/ipu.py | adamreeve/pytorch-lightning | 908e05880d4271ad32876311320d4465a008a710 | [
"Apache-2.0"
] | null | null | null | pytorch_lightning/strategies/ipu.py | adamreeve/pytorch-lightning | 908e05880d4271ad32876311320d4465a008a710 | [
"Apache-2.0"
] | null | null | null | pytorch_lightning/strategies/ipu.py | adamreeve/pytorch-lightning | 908e05880d4271ad32876311320d4465a008a710 | [
"Apache-2.0"
] | null | null | null | # 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... | 42.667553 | 118 | 0.697002 |
9bcd06d352f132dd72a54bdebaaeea4ec7bf74e9 | 6,888 | py | Python | python/artm/utility/create_cooc_data.py | nadiinchi/bigartm_dev | 0f8567a2669db0360ce949b91cff6476624fbeed | [
"BSD-3-Clause"
] | 1 | 2017-08-19T18:33:56.000Z | 2017-08-19T18:33:56.000Z | python/artm/utility/create_cooc_data.py | nadiinchi/bigartm_dev | 0f8567a2669db0360ce949b91cff6476624fbeed | [
"BSD-3-Clause"
] | null | null | null | python/artm/utility/create_cooc_data.py | nadiinchi/bigartm_dev | 0f8567a2669db0360ce949b91cff6476624fbeed | [
"BSD-3-Clause"
] | null | null | null | # Utility to generate pairwise coocurancy information of tokens
# of collection in BigARTM batches with default dictionary.
# It will create 'cooc_data.txt' file in the directory with
# this script, that should be passed into artm.Dictionary.gather()
# method as 'cooc_data_path' parameter.
# NOTE: to use script on dat... | 44.727273 | 122 | 0.629791 |
8fbf877d4658abad745b3ab78eaafec768c086f2 | 8,385 | py | Python | gamestonk_terminal/cryptocurrency/due_diligence/coinpaprika_view.py | Aerex/GamestonkTerminal | 680e0cd278f0d8e45031cdc9d51f247e9aa90ce1 | [
"MIT"
] | 3 | 2021-02-28T09:54:47.000Z | 2021-03-11T17:42:35.000Z | gamestonk_terminal/cryptocurrency/due_diligence/coinpaprika_view.py | Aerex/GamestonkTerminal | 680e0cd278f0d8e45031cdc9d51f247e9aa90ce1 | [
"MIT"
] | 3 | 2022-02-28T03:37:52.000Z | 2022-02-28T03:37:53.000Z | gamestonk_terminal/cryptocurrency/due_diligence/coinpaprika_view.py | Aerex/GamestonkTerminal | 680e0cd278f0d8e45031cdc9d51f247e9aa90ce1 | [
"MIT"
] | 1 | 2021-11-20T16:09:48.000Z | 2021-11-20T16:09:48.000Z | """CoinPaprika view"""
__docformat__ = "numpy"
import os
from tabulate import tabulate
from pandas.plotting import register_matplotlib_converters
from gamestonk_terminal.helper_funcs import (
export_data,
)
from gamestonk_terminal.cryptocurrency.due_diligence import coinpaprika_model
from gamestonk_terminal.crypto... | 22.241379 | 115 | 0.548122 |
daf960c41886db39d4905cef00bc6cb4f6b5e8a8 | 9,173 | py | Python | entmoot/learning/proximity_std.py | jezsadler/entmoot | 8214d0436f416796a57fcb7ca13bab41401e83a6 | [
"BSD-3-Clause"
] | null | null | null | entmoot/learning/proximity_std.py | jezsadler/entmoot | 8214d0436f416796a57fcb7ca13bab41401e83a6 | [
"BSD-3-Clause"
] | null | null | null | entmoot/learning/proximity_std.py | jezsadler/entmoot | 8214d0436f416796a57fcb7ca13bab41401e83a6 | [
"BSD-3-Clause"
] | null | null | null | from abc import ABC
import numpy as np
class MisicProximityStd(ABC):
"""
Proximity-based standard estimator. Proximity between two points in a
space is defined as the proportion of trees in an ensemble model where the
two points activate the same leaf.
This class favours explo... | 38.868644 | 114 | 0.547367 |
0932cbdf4a24dd8e223231d6a5a1c9a8454d7746 | 7,033 | py | Python | tests/unit/modules/mine_test.py | bogdanr/salt | 4f198525873a1b7da3fbb9994dbb40d381494922 | [
"Apache-2.0"
] | 1 | 2020-10-19T11:49:49.000Z | 2020-10-19T11:49:49.000Z | tests/unit/modules/mine_test.py | bogdanr/salt | 4f198525873a1b7da3fbb9994dbb40d381494922 | [
"Apache-2.0"
] | null | null | null | tests/unit/modules/mine_test.py | bogdanr/salt | 4f198525873a1b7da3fbb9994dbb40d381494922 | [
"Apache-2.0"
] | 1 | 2020-10-19T11:49:50.000Z | 2020-10-19T11:49:50.000Z | # -*- coding: utf-8 -*-
'''
:codeauthor: :email:`Rupesh Tare <rupesht@saltstack.com>`
'''
# Import Python Libs
from __future__ import absolute_import
import copy
# Import Salt Testing Libs
from salttesting import TestCase, skipIf
from salttesting.mock import (
MagicMock,
patch,
NO_MOCK,
NO_MOCK_RE... | 41.128655 | 78 | 0.446893 |
e5bc6d46f68790a925ec621fd2375aa0248904a8 | 1,944 | py | Python | Regression/Laguerre-FLNN/LFLNN.py | pvlawhatre/MachinePy | a3be09906c4a9b449237e49cc575dd455bce3cba | [
"BSD-3-Clause"
] | 2 | 2020-01-28T07:57:42.000Z | 2020-01-28T09:00:38.000Z | Regression/Laguerre-FLNN/LFLNN.py | pvlawhatre/MachinePy | a3be09906c4a9b449237e49cc575dd455bce3cba | [
"BSD-3-Clause"
] | null | null | null | Regression/Laguerre-FLNN/LFLNN.py | pvlawhatre/MachinePy | a3be09906c4a9b449237e49cc575dd455bce3cba | [
"BSD-3-Clause"
] | 1 | 2020-09-01T09:44:36.000Z | 2020-09-01T09:44:36.000Z | import numpy as np
def LFLNN(X_train,y_train,X_test,l,eta,**kwargs):
def laguerre(l,x):
pts=np.size(x)
Yc=np.ones((l,pts))
Yc[1,:]=1-x
for i in range(2,l):
Yc[i,:]=((2*(i-1)+1-x)*Yc[i-1,:]-(i-1)*Yc[i-2,:])/i
return(Yc)
n_train,dim=np.shape(X_train)
... | 27 | 64 | 0.473765 |
d88541674a013df6e5beddf415ae6d5f6b796e1d | 961 | py | Python | mmdet/models/__init__.py | MSiam/video_class_agnostic_segmentation | c4614fe675e8a5352012f603c15bc24fb43d690c | [
"Apache-2.0"
] | 15 | 2021-03-30T07:01:52.000Z | 2022-02-24T06:35:27.000Z | mmdet/models/__init__.py | MSiam/video_class_agnostic_segmentation | c4614fe675e8a5352012f603c15bc24fb43d690c | [
"Apache-2.0"
] | 1 | 2021-06-29T11:32:14.000Z | 2021-06-29T14:18:32.000Z | mmdet/models/__init__.py | MSiam/video_class_agnostic_segmentation | c4614fe675e8a5352012f603c15bc24fb43d690c | [
"Apache-2.0"
] | 3 | 2021-05-11T13:48:45.000Z | 2021-11-12T01:21:28.000Z | from .anchor_heads import * # noqa: F401,F403
from .backbones import * # noqa: F401,F403
from .bbox_heads import * # noqa: F401,F403
from .builder import (build_backbone, build_detector, build_head, build_loss,
build_neck, build_roi_extractor, build_shared_head)
from .detectors import * # noqa... | 43.681818 | 78 | 0.701353 |
92006ca405fde652c0d304740af4f79b9c354b90 | 4,658 | py | Python | src/compas_rv2/singular/rhino/constraints/constraints.py | selinabitting/compas-RV2 | 0884cc00d09c8f4a75eb2b97614105e4c8bfd818 | [
"MIT"
] | 4 | 2022-01-17T19:17:22.000Z | 2022-01-21T18:06:02.000Z | src/compas_rv2/singular/rhino/constraints/constraints.py | selinabitting/compas-RV2 | 0884cc00d09c8f4a75eb2b97614105e4c8bfd818 | [
"MIT"
] | null | null | null | src/compas_rv2/singular/rhino/constraints/constraints.py | selinabitting/compas-RV2 | 0884cc00d09c8f4a75eb2b97614105e4c8bfd818 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
import compas_rhino
from compas.geometry import distance_point_point
from compas.geometry import closest_point_in_cloud
from compas.geometry import Polyline
from compas_rv2.singular.utilities import list_spli... | 41.221239 | 155 | 0.731215 |
83b8e103c3ba1911ceca2c3cfc2fbedcb78ff796 | 1,836 | py | Python | plotly/validators/scatter3d/__init__.py | mprostock/plotly.py | 3471c3dfbf783927c203c676422260586514b341 | [
"MIT"
] | 4 | 2020-02-05T11:26:47.000Z | 2021-05-26T07:48:46.000Z | plotly/validators/scatter3d/__init__.py | mprostock/plotly.py | 3471c3dfbf783927c203c676422260586514b341 | [
"MIT"
] | 6 | 2021-03-18T22:27:08.000Z | 2022-03-11T23:40:50.000Z | venv/lib/python3.7/site-packages/plotly/validators/scatter3d/__init__.py | kylenahas/180LoginV1 | 8f64be6e6016d47dff8febfcfa3bbd56e9042f89 | [
"MIT"
] | 1 | 2020-02-02T21:17:12.000Z | 2020-02-02T21:17:12.000Z | from ._zsrc import ZsrcValidator
from ._zcalendar import ZcalendarValidator
from ._z import ZValidator
from ._ysrc import YsrcValidator
from ._ycalendar import YcalendarValidator
from ._y import YValidator
from ._xsrc import XsrcValidator
from ._xcalendar import XcalendarValidator
from ._x import XValidator
from ._visi... | 39.913043 | 56 | 0.877451 |
72150d48ebfb29b8656184d8c19ddfede2629731 | 2,818 | py | Python | src/test/tinc/tincrepo/mpp/gpdb/lib/datagen/query_execution_db/mpp18457.py | rodel-talampas/gpdb | 9c955e350334abbd922102f289f782697eb52069 | [
"PostgreSQL",
"Apache-2.0"
] | 9 | 2018-04-20T03:31:01.000Z | 2020-05-13T14:10:53.000Z | src/test/tinc/tincrepo/mpp/gpdb/lib/datagen/query_execution_db/mpp18457.py | rodel-talampas/gpdb | 9c955e350334abbd922102f289f782697eb52069 | [
"PostgreSQL",
"Apache-2.0"
] | 36 | 2017-09-21T09:12:27.000Z | 2020-06-17T16:40:48.000Z | src/test/tinc/tincrepo/mpp/gpdb/lib/datagen/query_execution_db/mpp18457.py | rodel-talampas/gpdb | 9c955e350334abbd922102f289f782697eb52069 | [
"PostgreSQL",
"Apache-2.0"
] | 32 | 2017-08-31T12:50:52.000Z | 2022-03-01T07:34:53.000Z | """
Copyright (c) 2004-Present Pivotal Software, Inc.
This program and the accompanying materials are made available under
the terms of the 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.... | 40.257143 | 144 | 0.668204 |
13366a547c02c3fda96f740704ff2d8ed6bcf475 | 3,845 | py | Python | authentik/core/migrations/0012_auto_20201003_1737_squashed_0016_auto_20201202_2234.py | BeryJu/passbook | 350f0d836580f4411524614f361a76c4f27b8a2d | [
"MIT"
] | 15 | 2020-01-05T09:09:57.000Z | 2020-11-28T05:27:39.000Z | authentik/core/migrations/0012_auto_20201003_1737_squashed_0016_auto_20201202_2234.py | BeryJu/passbook | 350f0d836580f4411524614f361a76c4f27b8a2d | [
"MIT"
] | 302 | 2020-01-21T08:03:59.000Z | 2020-12-04T05:04:57.000Z | authentik/core/migrations/0012_auto_20201003_1737_squashed_0016_auto_20201202_2234.py | BeryJu/passbook | 350f0d836580f4411524614f361a76c4f27b8a2d | [
"MIT"
] | 3 | 2020-03-04T08:21:59.000Z | 2020-08-01T20:37:18.000Z | # Generated by Django 3.2.8 on 2021-10-12 15:36
from django.apps.registry import Apps
from django.db import migrations, models
from django.db.backends.base.schema import BaseDatabaseSchemaEditor
import authentik.core.models
def set_default_token_key(apps: Apps, schema_editor: BaseDatabaseSchemaEditor):
db_alias... | 32.310924 | 94 | 0.574772 |
e2b1dc565bf154bea0f8aab123dd23139a975979 | 1,274 | py | Python | jdcloud_sdk/services/censor/models/FrameDetail.py | Tanc009/jdcloud-sdk-python | 8b045c99bc5b73ca7348e950b6f01e03a27982f5 | [
"Apache-2.0"
] | 14 | 2018-04-19T09:53:56.000Z | 2022-01-27T06:05:48.000Z | jdcloud_sdk/services/censor/models/FrameDetail.py | Tanc009/jdcloud-sdk-python | 8b045c99bc5b73ca7348e950b6f01e03a27982f5 | [
"Apache-2.0"
] | 15 | 2018-09-11T05:39:54.000Z | 2021-07-02T12:38:02.000Z | jdcloud_sdk/services/censor/models/FrameDetail.py | Tanc009/jdcloud-sdk-python | 8b045c99bc5b73ca7348e950b6f01e03a27982f5 | [
"Apache-2.0"
] | 33 | 2018-04-20T05:29:16.000Z | 2022-02-17T09:10:05.000Z | # coding=utf8
# Copyright 2018 JDCLOUD.COM
#
# 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 ... | 37.470588 | 125 | 0.741758 |
fe069a09bc172c63fe975ffe2dab1b93a9db68c1 | 891 | py | Python | books/migrations/0002_review.py | cvetanovv/book-store | 1fd2bce3b59c554add873ff29a97245790d005b1 | [
"MIT"
] | null | null | null | books/migrations/0002_review.py | cvetanovv/book-store | 1fd2bce3b59c554add873ff29a97245790d005b1 | [
"MIT"
] | null | null | null | books/migrations/0002_review.py | cvetanovv/book-store | 1fd2bce3b59c554add873ff29a97245790d005b1 | [
"MIT"
] | null | null | null | # Generated by Django 4.0.3 on 2022-03-26 14:16
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('books', '0001_initial'),... | 34.269231 | 130 | 0.641975 |
e80788a247be3b477a67cabb032aef8d07c303ee | 3,370 | py | Python | tests/test_command.py | michbil/devicehive-python | 16b800eafd7e354c599aae4c29c4659480807edf | [
"MIT"
] | null | null | null | tests/test_command.py | michbil/devicehive-python | 16b800eafd7e354c599aae4c29c4659480807edf | [
"MIT"
] | null | null | null | tests/test_command.py | michbil/devicehive-python | 16b800eafd7e354c599aae4c29c4659480807edf | [
"MIT"
] | 1 | 2020-12-29T01:30:19.000Z | 2020-12-29T01:30:19.000Z | import unittest
import sys
from os import path
from zope.interface import implements
orig_name = __name__
orig_path = list(sys.path)
sys.path.insert(0, path.abspath(path.join(path.dirname(__file__), '..')))
try :
devicehive = __import__('devicehive')
__import__('devicehive.ws')
__import__('dev... | 33.7 | 270 | 0.584866 |
6842f17a0a28092963cebe608aa503336a52fdec | 430 | py | Python | sammy/examples/hello_world.py | jefford-qwigo/sammy | b4e187ffc88bb7a7bbe61b093d9583ae656420ea | [
"Apache-2.0"
] | 25 | 2017-07-15T00:38:09.000Z | 2021-09-01T19:50:01.000Z | sammy/examples/hello_world.py | jefford-qwigo/sammy | b4e187ffc88bb7a7bbe61b093d9583ae656420ea | [
"Apache-2.0"
] | 3 | 2017-07-17T11:02:23.000Z | 2020-08-31T15:33:09.000Z | sammy/examples/hello_world.py | jefford-qwigo/sammy | b4e187ffc88bb7a7bbe61b093d9583ae656420ea | [
"Apache-2.0"
] | 4 | 2017-07-16T22:11:20.000Z | 2022-01-21T13:39:11.000Z | import sammy as sm
sam = sm.SAM(Description='A hello world application.',render_type='yaml')
sam.add_parameter(sm.Parameter(name='Bucket',Type='String'))
sam.add_parameter(sm.Parameter(name='CodeZipKey',Type='String'))
sam.add_resource(
sm.Function(name='HelloWorldFunction',
Handler='sample.handler', R... | 30.714286 | 73 | 0.711628 |
6fd92736ca69b313aafb12c9759dea007723f856 | 183 | py | Python | test.py | i25ffz/openaes | a0dbde40d4ce0e4186ea14c4dc9519fe152c018c | [
"BSD-2-Clause"
] | null | null | null | test.py | i25ffz/openaes | a0dbde40d4ce0e4186ea14c4dc9519fe152c018c | [
"BSD-2-Clause"
] | null | null | null | test.py | i25ffz/openaes | a0dbde40d4ce0e4186ea14c4dc9519fe152c018c | [
"BSD-2-Clause"
] | null | null | null | import openaes
open('README.aes', 'w').write(openaes.encrypt(open('key_256').read(), open('README').read()))
print openaes.decrypt(open('key_256').read(), open('README.aes').read())
| 36.6 | 93 | 0.688525 |
49a4e1948e0299beb0e9954093f00aa7ca89eeb2 | 689 | py | Python | 1101-1200/1135-Connecting Cities With Minimum Cost/1135-Connecting Cities With Minimum Cost.py | jiadaizhao/LeetCode | 4ddea0a532fe7c5d053ffbd6870174ec99fc2d60 | [
"MIT"
] | 49 | 2018-05-05T02:53:10.000Z | 2022-03-30T12:08:09.000Z | 1101-1200/1135-Connecting Cities With Minimum Cost/1135-Connecting Cities With Minimum Cost.py | jolly-fellow/LeetCode | ab20b3ec137ed05fad1edda1c30db04ab355486f | [
"MIT"
] | 11 | 2017-12-15T22:31:44.000Z | 2020-10-02T12:42:49.000Z | 1101-1200/1135-Connecting Cities With Minimum Cost/1135-Connecting Cities With Minimum Cost.py | jolly-fellow/LeetCode | ab20b3ec137ed05fad1edda1c30db04ab355486f | [
"MIT"
] | 28 | 2017-12-05T10:56:51.000Z | 2022-01-26T18:18:27.000Z | class Solution:
def minimumCost(self, N: int, connections: List[List[int]]) -> int:
parent = [i for i in range(1 + N)]
def findParent(x):
while parent[x] != x:
parent[x] = parent[parent[x]]
x = parent[x]
return x
connections.so... | 29.956522 | 71 | 0.429608 |
0b0fb6d18dcc79986c0e66155dfcccc9d5ce69b4 | 482 | py | Python | louis/webdev/myblog/blog/migrations/0003_post_parent.py | GadinganJayHarley06/intern-blog | b442c6f307da63d8687773df7bcbf28ceab3e6a9 | [
"MIT"
] | null | null | null | louis/webdev/myblog/blog/migrations/0003_post_parent.py | GadinganJayHarley06/intern-blog | b442c6f307da63d8687773df7bcbf28ceab3e6a9 | [
"MIT"
] | null | null | null | louis/webdev/myblog/blog/migrations/0003_post_parent.py | GadinganJayHarley06/intern-blog | b442c6f307da63d8687773df7bcbf28ceab3e6a9 | [
"MIT"
] | null | null | null | # Generated by Django 2.0.4 on 2018-04-19 02:44
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('blog', '0002_auto_20180417_0659'),
]
operations = [
migrations.AddField(
model_name='post',
... | 24.1 | 120 | 0.634855 |
c781ba675fb28f8dbabfb594d23a48d6395c7174 | 7,346 | py | Python | neural_clbf/controllers/obs_mpc_controller.py | MIT-REALM/neural_clbf | 5eda47941aabc6cb4147c618c9fc5b58e1591d67 | [
"BSD-3-Clause"
] | 9 | 2022-01-22T11:47:11.000Z | 2022-03-08T14:49:38.000Z | neural_clbf/controllers/obs_mpc_controller.py | MIT-REALM/neural_clbf | 5eda47941aabc6cb4147c618c9fc5b58e1591d67 | [
"BSD-3-Clause"
] | 1 | 2021-11-14T22:30:20.000Z | 2021-11-19T14:40:49.000Z | neural_clbf/controllers/obs_mpc_controller.py | MIT-REALM/neural_clbf | 5eda47941aabc6cb4147c618c9fc5b58e1591d67 | [
"BSD-3-Clause"
] | 5 | 2022-01-23T17:02:52.000Z | 2022-03-29T22:26:59.000Z | from typing import Tuple, Optional
import cvxpy as cp
import torch
import numpy as np
from neural_clbf.systems import ObservableSystem, PlanarLidarSystem # noqa
from neural_clbf.controllers.controller import Controller
from neural_clbf.experiments import ExperimentSuite
class ObsMPCController(Controller):
"""
... | 39.923913 | 88 | 0.599238 |
e6f253ded80a071411b78945c0b82626508ef3e9 | 20,099 | py | Python | flink-python/pyflink/datastream/checkpoint_config.py | leilinen/flink | 16cf155f21a32170e79611bd8803a477d098e4c2 | [
"Apache-2.0"
] | 1 | 2020-08-27T09:11:40.000Z | 2020-08-27T09:11:40.000Z | flink-python/pyflink/datastream/checkpoint_config.py | leilinen/flink | 16cf155f21a32170e79611bd8803a477d098e4c2 | [
"Apache-2.0"
] | null | null | null | flink-python/pyflink/datastream/checkpoint_config.py | leilinen/flink | 16cf155f21a32170e79611bd8803a477d098e4c2 | [
"Apache-2.0"
] | null | null | null | ################################################################################
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this... | 43.504329 | 103 | 0.703169 |
c8dcba38cf27ed51d007f209db9c7f7303cd4825 | 2,358 | py | Python | data/p4VQE/R1/benchmark/startQiskit_QC1.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p4VQE/R1/benchmark/startQiskit_QC1.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p4VQE/R1/benchmark/startQiskit_QC1.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | # qubit number=3
# total number=6
import numpy as np
from qiskit import QuantumCircuit, execute, Aer, QuantumRegister, ClassicalRegister, transpile, BasicAer, IBMQ
import networkx as nx
from qiskit.visualization import plot_histogram
from typing import *
from pprint import pprint
from math import log2
from collection... | 26.494382 | 118 | 0.631467 |
5b0a18eab5d5e8f8608b39d1da4b1189b82a664d | 8,601 | py | Python | run_eval_folder.py | JiatianWu/tf-monodepth2 | 8f8ade9ac1268ec2c80db41386df47d26074eaf8 | [
"MIT"
] | null | null | null | run_eval_folder.py | JiatianWu/tf-monodepth2 | 8f8ade9ac1268ec2c80db41386df47d26074eaf8 | [
"MIT"
] | null | null | null | run_eval_folder.py | JiatianWu/tf-monodepth2 | 8f8ade9ac1268ec2c80db41386df47d26074eaf8 | [
"MIT"
] | null | null | null | #Copyright 2020 Nod Labs
import argparse
import yaml
import sys
import os
import time
import h5py
import pickle
import numpy as np
import copy
from scipy.io import matlab
from PIL import Image
import matplotlib.pyplot as plt
import open3d as o3d
from utils.bilateral_filter import bilateral_filter
from utils.tools impo... | 37.233766 | 114 | 0.555284 |
771a2aadbe090feeb26b55db651d845e0fd857a1 | 4,092 | py | Python | test/functional/feature_minchainwork.py | Soptq/bitgesell | 4e31314180d8cadaee5868c4d797208ddac7d392 | [
"MIT"
] | 12 | 2020-05-14T20:22:20.000Z | 2021-06-07T19:21:34.000Z | test/functional/feature_minchainwork.py | slowriot/bitgesell | 9b7f9e207323e9863253ad2598068b0ad0b159d7 | [
"MIT"
] | 55 | 2021-03-24T15:00:42.000Z | 2022-02-22T10:07:14.000Z | test/functional/feature_minchainwork.py | slowriot/bitgesell | 9b7f9e207323e9863253ad2598068b0ad0b159d7 | [
"MIT"
] | 35 | 2021-02-03T03:02:04.000Z | 2021-11-22T07:27:55.000Z | #!/usr/bin/env python3
# Copyright (c) 2017-2020 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test logic for setting nMinimumChainWork on command line.
Nodes don't consider themselves out of "init... | 44.967033 | 108 | 0.69697 |
ce66df14ff1bda91a1197108557a64042ace103a | 10,957 | py | Python | graspologic/nominate/spectralVN.py | sneznaj/graspologic | 640811efb64061fee3b6ff7c94b2179aeabc0e4a | [
"MIT"
] | null | null | null | graspologic/nominate/spectralVN.py | sneznaj/graspologic | 640811efb64061fee3b6ff7c94b2179aeabc0e4a | [
"MIT"
] | null | null | null | graspologic/nominate/spectralVN.py | sneznaj/graspologic | 640811efb64061fee3b6ff7c94b2179aeabc0e4a | [
"MIT"
] | null | null | null | # Copyright (c) Microsoft Corporation and contributors.
# Licensed under the MIT License.
from typing import Any, Dict, List, Optional, Tuple, Union
import numpy as np
from sklearn.base import BaseEstimator
from sklearn.neighbors import NearestNeighbors
from sklearn.utils import check_array
from typing_extensions imp... | 41.503788 | 95 | 0.609017 |
98b2c504b3b7a09b7a3ba380754deaf2e6b37f17 | 7,072 | py | Python | data/humu22768-sup-0001-suppmat/Supp_Data_S1/DataS1/Scripts/single_scripts/figureS7_10.py | Zhenxuyang/PPSNV | 9e7092f6189af4759604cb1db8d9c2985e56c2ba | [
"MIT"
] | null | null | null | data/humu22768-sup-0001-suppmat/Supp_Data_S1/DataS1/Scripts/single_scripts/figureS7_10.py | Zhenxuyang/PPSNV | 9e7092f6189af4759604cb1db8d9c2985e56c2ba | [
"MIT"
] | null | null | null | data/humu22768-sup-0001-suppmat/Supp_Data_S1/DataS1/Scripts/single_scripts/figureS7_10.py | Zhenxuyang/PPSNV | 9e7092f6189af4759604cb1db8d9c2985e56c2ba | [
"MIT"
] | null | null | null | '''
################################################################################################################
Manuscript Title: Evaluation of tools used to predict the impact of missense variants is hindered by two types of circularity
#############################################################################... | 45.922078 | 241 | 0.660209 |
df74425a17dd3e5c3a1c31dc650c09376d785de8 | 14,055 | py | Python | openaerostruct/tests/test_aerostruct_wingbox_fuel_vol_constraint_opt.py | carlosferpereira/OpenAeroStruct | 35e1ff8aac5c67e40b1925829cfbc203ba1b2f2d | [
"Apache-2.0"
] | null | null | null | openaerostruct/tests/test_aerostruct_wingbox_fuel_vol_constraint_opt.py | carlosferpereira/OpenAeroStruct | 35e1ff8aac5c67e40b1925829cfbc203ba1b2f2d | [
"Apache-2.0"
] | null | null | null | openaerostruct/tests/test_aerostruct_wingbox_fuel_vol_constraint_opt.py | carlosferpereira/OpenAeroStruct | 35e1ff8aac5c67e40b1925829cfbc203ba1b2f2d | [
"Apache-2.0"
] | 1 | 2021-04-09T16:45:27.000Z | 2021-04-09T16:45:27.000Z | from openmdao.utils.assert_utils import assert_rel_error
import unittest
import numpy as np
from openaerostruct.geometry.utils import generate_mesh
from openaerostruct.integration.aerostruct_groups import AerostructGeometry, AerostructPoint
import openmdao.api as om
from openaerostruct.structures.wingbox_fu... | 59.054622 | 498 | 0.534614 |
9d5ff6c7e173424644552d6bf89832dd29af2cd1 | 167 | py | Python | src/sentry/services/__init__.py | NickPresta/sentry | ed3e6034ef560e18f392ba30071de860557b7b43 | [
"BSD-3-Clause"
] | 2 | 2015-10-14T12:45:32.000Z | 2016-01-27T03:24:43.000Z | src/sentry/services/__init__.py | NickPresta/sentry | ed3e6034ef560e18f392ba30071de860557b7b43 | [
"BSD-3-Clause"
] | null | null | null | src/sentry/services/__init__.py | NickPresta/sentry | ed3e6034ef560e18f392ba30071de860557b7b43 | [
"BSD-3-Clause"
] | null | null | null | """
sentry.services
~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2013 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
| 20.875 | 75 | 0.628743 |
aef33b116cd8a9b51d0091bd012a77a7415d5723 | 18,912 | py | Python | raiden/transfer/state.py | christianbrb/raiden | 64f0715af076747b293671157e2cbbd235cab81b | [
"MIT"
] | null | null | null | raiden/transfer/state.py | christianbrb/raiden | 64f0715af076747b293671157e2cbbd235cab81b | [
"MIT"
] | null | null | null | raiden/transfer/state.py | christianbrb/raiden | 64f0715af076747b293671157e2cbbd235cab81b | [
"MIT"
] | null | null | null | # pylint: disable=too-few-public-methods,too-many-arguments,too-many-instance-attributes
import random
from collections import defaultdict
from dataclasses import dataclass, field
from enum import Enum
from random import Random
import networkx
from eth_utils import to_hex
from raiden.constants import (
EMPTY_SECR... | 34.700917 | 99 | 0.718644 |
a4897b8ded9bf4603dc2794d59fdbd088c35962b | 311 | py | Python | nerodia/elements/d_list.py | harsh183/nerodia | 69c5e4408432e85b5af0b2da03015f729809dac4 | [
"MIT"
] | 83 | 2017-11-20T08:41:09.000Z | 2022-02-09T21:01:47.000Z | nerodia/elements/d_list.py | harsh183/nerodia | 69c5e4408432e85b5af0b2da03015f729809dac4 | [
"MIT"
] | 28 | 2017-11-21T02:25:03.000Z | 2021-04-15T15:26:30.000Z | nerodia/elements/d_list.py | harsh183/nerodia | 69c5e4408432e85b5af0b2da03015f729809dac4 | [
"MIT"
] | 14 | 2017-11-29T06:44:12.000Z | 2021-09-06T04:53:44.000Z | import six
from .html_elements import HTMLElement
from ..meta_elements import MetaHTMLElement
@six.add_metaclass(MetaHTMLElement)
class DList(HTMLElement):
def to_dict(self):
keys = [e.text for e in self.dts()]
values = [e.text for e in self.dds()]
return dict(zip(keys, values))
| 23.923077 | 45 | 0.694534 |
dbf13b15ebbc3af8076f0555ca2ebb6f2ecd350b | 115 | py | Python | Linear/Plates/test.py | jesusdalvarado/CalculiX-Examples | 79150c1167026cb6c0dfd2bd83f8abed144dcd75 | [
"MIT"
] | 2 | 2019-03-16T09:22:21.000Z | 2019-03-16T09:22:23.000Z | Linear/Plates/test.py | jesusdalvarado/CalculiX-Examples | 79150c1167026cb6c0dfd2bd83f8abed144dcd75 | [
"MIT"
] | null | null | null | Linear/Plates/test.py | jesusdalvarado/CalculiX-Examples | 79150c1167026cb6c0dfd2bd83f8abed144dcd75 | [
"MIT"
] | 1 | 2019-04-26T14:35:22.000Z | 2019-04-26T14:35:22.000Z | #!/usr/bin/python
import os
os.system("cgx -b pre.fbd")
os.system("ccx plates")
os.system("cgx -b post.fbd")
| 9.583333 | 28 | 0.643478 |
289b7e586f61efd3a0d9a3dc4e8227755db63ae5 | 1,457 | py | Python | model.py | Yusuke-Ikezaki/Capsule-DQN | 021ef0d50f6802d078126dc0d8f034581ff16e1c | [
"MIT"
] | null | null | null | model.py | Yusuke-Ikezaki/Capsule-DQN | 021ef0d50f6802d078126dc0d8f034581ff16e1c | [
"MIT"
] | 3 | 2018-05-07T09:42:13.000Z | 2022-02-09T23:44:57.000Z | model.py | Yusuke-Ikezaki/Capsule-DQN | 021ef0d50f6802d078126dc0d8f034581ff16e1c | [
"MIT"
] | 1 | 2019-08-25T07:19:12.000Z | 2019-08-25T07:19:12.000Z | import tensorflow as tf
from layers import conv, flatten, fc, capsule
from config import cfg
class QFunction:
def __init__(self, action_n, scope):
self.a = action_n
self.scope = scope
# build model
def _model(self, X, reuse=False):
X = tf.cast(X, tf.float32)
w... | 40.472222 | 112 | 0.573095 |
8fbf5390535108e5679b683563e9305c8805ac68 | 81,308 | py | Python | molo/core/migrations/0001_squashed_0077_molo_page.py | michaelzhang608/molo | 87962b69b9522e3f2b97a2425acef8ed29e6e718 | [
"BSD-2-Clause"
] | null | null | null | molo/core/migrations/0001_squashed_0077_molo_page.py | michaelzhang608/molo | 87962b69b9522e3f2b97a2425acef8ed29e6e718 | [
"BSD-2-Clause"
] | null | null | null | molo/core/migrations/0001_squashed_0077_molo_page.py | michaelzhang608/molo | 87962b69b9522e3f2b97a2425acef8ed29e6e718 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.10 on 2018-02-08 19:17
from __future__ import unicode_literals
from django.core.management.sql import emit_pre_migrate_signal, emit_post_migrate_signal
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import mo... | 55.92022 | 2,328 | 0.618377 |
5ffa293945d2917144ce86da93ccd011388be430 | 11,530 | py | Python | CommandLine.py | YijunWang0320/SocketChatRoom | ad6ec865827216a822d003652e6d82095c53aaf2 | [
"RSA-MD"
] | null | null | null | CommandLine.py | YijunWang0320/SocketChatRoom | ad6ec865827216a822d003652e6d82095c53aaf2 | [
"RSA-MD"
] | null | null | null | CommandLine.py | YijunWang0320/SocketChatRoom | ad6ec865827216a822d003652e6d82095c53aaf2 | [
"RSA-MD"
] | null | null | null | import sys
import select
import json
import socket
from Parser import Parser
from WatchDog import WatchDog
client_socket = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
watchDog = None
address_list = dict()
my_username = None
def check_time(user_name):
global watchDog
data = {'from': 'user', 'type': 'he... | 41.775362 | 159 | 0.488985 |
c6b1ea73a6c01638d16ae495cba25ba01386cd14 | 11,188 | py | Python | sourced/ml/core/tests/test_token_parser.py | Guillemdb/ml-core | eb5ed70e9af3ee4eed1610723aa93aa0d64394c8 | [
"Apache-2.0"
] | null | null | null | sourced/ml/core/tests/test_token_parser.py | Guillemdb/ml-core | eb5ed70e9af3ee4eed1610723aa93aa0d64394c8 | [
"Apache-2.0"
] | null | null | null | sourced/ml/core/tests/test_token_parser.py | Guillemdb/ml-core | eb5ed70e9af3ee4eed1610723aa93aa0d64394c8 | [
"Apache-2.0"
] | null | null | null | import pickle
import unittest
from sourced.ml.core.algorithms.token_parser import NoopTokenParser, TokenParser
class TokenParserTests(unittest.TestCase):
def setUp(self):
self.tp = TokenParser(stem_threshold=4, max_token_length=20, attach_upper=False)
self.tp._single_shot = False
def test_pr... | 41.746269 | 98 | 0.491509 |
e749becc87d82c1d359ba3bcd2de55d23a89c9bf | 11,331 | py | Python | tests/cupyx_tests/scipy_tests/sparse_tests/test_dia.py | viantirreau/cupy | cafe9af0e974ff88fc6aa43bf106e343a60fb983 | [
"MIT"
] | 1 | 2021-06-03T16:51:02.000Z | 2021-06-03T16:51:02.000Z | tests/cupyx_tests/scipy_tests/sparse_tests/test_dia.py | viantirreau/cupy | cafe9af0e974ff88fc6aa43bf106e343a60fb983 | [
"MIT"
] | null | null | null | tests/cupyx_tests/scipy_tests/sparse_tests/test_dia.py | viantirreau/cupy | cafe9af0e974ff88fc6aa43bf106e343a60fb983 | [
"MIT"
] | null | null | null | import pickle
import unittest
import numpy
import pytest
try:
import scipy.sparse # NOQA
scipy_available = True
except ImportError:
scipy_available = False
import cupy
from cupy import testing
from cupyx.scipy import sparse
def _make(xp, sp, dtype):
data = xp.array([[0, 1, 2], [3, 4, 5]], dtype)
... | 32.282051 | 79 | 0.577266 |
007945c0a3f460af8a98a38ed782271842d0be31 | 39,776 | py | Python | unittests/test_schedulers.py | rngoodner/reframe | 4b0cb19f72af8f4b9f954133a54240011bd510e8 | [
"BSD-3-Clause"
] | null | null | null | unittests/test_schedulers.py | rngoodner/reframe | 4b0cb19f72af8f4b9f954133a54240011bd510e8 | [
"BSD-3-Clause"
] | 1 | 2021-05-18T17:38:12.000Z | 2021-05-18T17:38:12.000Z | unittests/test_schedulers.py | giordano/reframe | 5b17b952f05dcc013888149c82b12d3f69306917 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2016-2021 Swiss National Supercomputing Centre (CSCS/ETH Zurich)
# ReFrame Project Developers. See the top-level LICENSE file for details.
#
# SPDX-License-Identifier: BSD-3-Clause
import os
import pytest
import re
import signal
import socket
import time
import reframe.core.runtime as rt
import unittests.... | 34.921861 | 79 | 0.652077 |
510d9471c3411b948f00f58e490de48643baabe1 | 2,971 | py | Python | sdk/keyvault/azure-keyvault-certificates/samples/contacts_async.py | srinathnarayanan/azure-sdk-for-python | 2fc8a56afccfe9facd46e788b4b31b9ba6eb4b3d | [
"MIT"
] | null | null | null | sdk/keyvault/azure-keyvault-certificates/samples/contacts_async.py | srinathnarayanan/azure-sdk-for-python | 2fc8a56afccfe9facd46e788b4b31b9ba6eb4b3d | [
"MIT"
] | null | null | null | sdk/keyvault/azure-keyvault-certificates/samples/contacts_async.py | srinathnarayanan/azure-sdk-for-python | 2fc8a56afccfe9facd46e788b4b31b9ba6eb4b3d | [
"MIT"
] | null | null | null | # ------------------------------------
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# ------------------------------------
import os
import asyncio
from azure.identity.aio import DefaultAzureCredential
from azure.keyvault.certificates.aio import CertificateClient
from azure.keyvault.certific... | 40.148649 | 125 | 0.620666 |
911ba07a0e24179fa941bf633d599074fd765205 | 1,706 | py | Python | src/rfremoterunner/agent.py | chrisBrookes93/robotframework-slave | 663fe5b6ffae4582f7edab012eb013904046349b | [
"MIT"
] | 6 | 2020-03-27T21:29:12.000Z | 2022-02-16T08:20:23.000Z | src/rfremoterunner/agent.py | chrisBrookes93/robotframework-slave | 663fe5b6ffae4582f7edab012eb013904046349b | [
"MIT"
] | 9 | 2020-12-30T18:21:51.000Z | 2021-02-05T10:00:46.000Z | src/rfremoterunner/agent.py | chrisBrookes93/robotframework-slave | 663fe5b6ffae4582f7edab012eb013904046349b | [
"MIT"
] | 3 | 2020-12-30T18:06:12.000Z | 2022-01-30T02:49:07.000Z | import argparse
import logging
from rfremoterunner.rf_server import RobotFrameworkServer
logger = logging.getLogger(__name__)
def run_agent_deprecated():
"""
Pass through for the deprecated command line script. Displays a deprecation warning and calls through to the new
entrypoint.
"""
... | 35.541667 | 121 | 0.612544 |
3d7fbd94f33678d82efa5a8d2f7d425f95dff03d | 4,178 | py | Python | sdks/python/apache_beam/transforms/write_ptransform_test.py | ravwojdyla/beam | fbcde4cdc7d68de8734bf540c079b2747631a854 | [
"Apache-2.0"
] | 2 | 2017-02-22T03:35:11.000Z | 2017-04-05T09:38:16.000Z | sdks/python/apache_beam/transforms/write_ptransform_test.py | kavyasmj/beam0.6 | d59dfeb339bd56feb7569531e5c421a297b0d3dc | [
"Apache-2.0"
] | 2 | 2017-04-24T20:32:25.000Z | 2022-03-29T12:59:55.000Z | sdks/python/apache_beam/transforms/write_ptransform_test.py | kavyasmj/beam0.6 | d59dfeb339bd56feb7569531e5c421a297b0d3dc | [
"Apache-2.0"
] | 2 | 2019-03-04T02:12:46.000Z | 2021-08-10T20:29:37.000Z | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | 32.897638 | 78 | 0.744615 |
f6f7b12bcd86adc13ec2f85ff2eb44de0d298a44 | 7,836 | py | Python | contrib/bitrpc/bitrpc.py | max11111111/maxcoin | 470e409ef3419d9ee3b483276bccfb1a82034f29 | [
"MIT"
] | null | null | null | contrib/bitrpc/bitrpc.py | max11111111/maxcoin | 470e409ef3419d9ee3b483276bccfb1a82034f29 | [
"MIT"
] | null | null | null | contrib/bitrpc/bitrpc.py | max11111111/maxcoin | 470e409ef3419d9ee3b483276bccfb1a82034f29 | [
"MIT"
] | null | null | null | from jsonrpc import ServiceProxy
import sys
import string
# ===== BEGIN USER SETTINGS =====
# if you do not set these you will be prompted for a password for every command
rpcuser = ""
rpcpass = ""
# ====== END USER SETTINGS ======
if rpcpass == "":
access = ServiceProxy("http://127.0.0.1:9332")
else:
access = Ser... | 24.110769 | 79 | 0.668198 |
01a8b9e70f532b63d817e131c9fde50953ecd4f3 | 242 | py | Python | topCoder/srms/100s/srm182/div2/ib_evaluator.py | gauravsingh58/algo | 397859a53429e7a585e5f6964ad24146c6261326 | [
"WTFPL"
] | 1 | 2020-09-30T19:53:08.000Z | 2020-09-30T19:53:08.000Z | topCoder/srms/100s/srm182/div2/ib_evaluator.py | gauravsingh58/algo | 397859a53429e7a585e5f6964ad24146c6261326 | [
"WTFPL"
] | null | null | null | topCoder/srms/100s/srm182/div2/ib_evaluator.py | gauravsingh58/algo | 397859a53429e7a585e5f6964ad24146c6261326 | [
"WTFPL"
] | 1 | 2020-10-15T09:10:57.000Z | 2020-10-15T09:10:57.000Z | class IBEvaluator:
def getSummary(self, predictedGrades, actualGrades):
r, l = [0]*7, len(actualGrades)
for p, a in zip(predictedGrades, actualGrades):
r[abs(p-a)] += 1
return map(lambda i: i*100/l, r)
| 34.571429 | 56 | 0.599174 |
4d011306678dd59e7d5e1c0bee72a2ee62465dc7 | 356 | py | Python | oosc/oosc/parents/models.py | C4DLabOrg/da_api | 3d876576a189ce35c6b4b2f1c728f4b91e4b2ed0 | [
"MIT"
] | null | null | null | oosc/oosc/parents/models.py | C4DLabOrg/da_api | 3d876576a189ce35c6b4b2f1c728f4b91e4b2ed0 | [
"MIT"
] | null | null | null | oosc/oosc/parents/models.py | C4DLabOrg/da_api | 3d876576a189ce35c6b4b2f1c728f4b91e4b2ed0 | [
"MIT"
] | null | null | null | from django.db import models
from oosc.students.models import Students
# Create your models here.
class Parents(models.Model):
parents_name = models.CharField(max_length=200)
phone_no = models.IntegerField(default=0)
student_id = models.ForeignKey(Students,on_delete=models.CASCADE)
def __str__(self... | 27.384615 | 69 | 0.755618 |
927752b075106e67a0180a2ed9797f725676a64c | 1,588 | py | Python | py_algo/disjoint_data_structures/disjoint_sets.py | Sk0uF/Algorithms | 236cc5b056ce2637d5d947c5fc1e3367cde886bf | [
"MIT"
] | 1 | 2021-07-05T15:39:04.000Z | 2021-07-05T15:39:04.000Z | py_algo/disjoint_data_structures/disjoint_sets.py | Sk0uF/Algorithms | 236cc5b056ce2637d5d947c5fc1e3367cde886bf | [
"MIT"
] | null | null | null | py_algo/disjoint_data_structures/disjoint_sets.py | Sk0uF/Algorithms | 236cc5b056ce2637d5d947c5fc1e3367cde886bf | [
"MIT"
] | 1 | 2021-09-02T21:31:34.000Z | 2021-09-02T21:31:34.000Z | # 8 7
# 1 2
# 3 4
# 1 3
# 5 6
# 7 8
# 5 8
# 4 8
def find_root_and_balance(array, value):
"""
Find the root and balance
Complexity: O(logN)
"""
if array[value] != value:
array[value] = find_root_and_balance(array, array[value])
return array[value]
def disjoint_sets_array(n, m):
"""
... | 28.357143 | 80 | 0.598866 |
ea50b19cc9e14b7f4ffd3698c32e4a9f282305fb | 4,550 | py | Python | test/regression/utils.py | lakshita-jain/cortx-k8s | 9f69fe3a403fb45bd144c5bdc0196422b093fe61 | [
"Apache-2.0"
] | 5 | 2021-11-29T16:45:41.000Z | 2022-02-24T10:01:27.000Z | test/regression/utils.py | lakshita-jain/cortx-k8s | 9f69fe3a403fb45bd144c5bdc0196422b093fe61 | [
"Apache-2.0"
] | 81 | 2021-11-29T17:00:12.000Z | 2022-03-31T14:29:49.000Z | test/regression/utils.py | lakshita-jain/cortx-k8s | 9f69fe3a403fb45bd144c5bdc0196422b093fe61 | [
"Apache-2.0"
] | 52 | 2021-11-18T20:38:41.000Z | 2022-03-25T07:04:21.000Z | import datetime
import os
import subprocess # nosec
import sys
import time
#################################################################
#
# Logger
#
################################################################
class Logger:
HEADER = '\033[95m'
OKBLUE = '\033[94m'
OKCYAN = '\033[96m'
OKGREEN... | 27.743902 | 78 | 0.524835 |
a6789a298763fcbf65184c98097a779855cbceb8 | 3,350 | py | Python | tests/test_pool.py | Alviner/aiomisc | 12bc05efe126e96aed419db49dd258836a065588 | [
"MIT"
] | 232 | 2019-05-17T18:43:29.000Z | 2022-03-04T20:40:39.000Z | tests/test_pool.py | Alviner/aiomisc | 12bc05efe126e96aed419db49dd258836a065588 | [
"MIT"
] | 25 | 2019-05-16T14:55:53.000Z | 2021-12-14T20:03:22.000Z | tests/test_pool.py | Alviner/aiomisc | 12bc05efe126e96aed419db49dd258836a065588 | [
"MIT"
] | 13 | 2019-09-03T17:52:30.000Z | 2021-11-28T23:59:06.000Z | import asyncio
import pytest
import aiomisc
pytestmark = pytest.mark.catch_loop_exceptions
async def test_base_class(loop: asyncio.AbstractEventLoop):
with pytest.raises(TypeError):
aiomisc.PoolBase()
class SimplePool(aiomisc.PoolBase):
async def _create_instance(self):
return self._loop... | 21.895425 | 63 | 0.634328 |
73198fcf2bd38178c425513d66b5c088b2a5216a | 2,305 | py | Python | tests/python/test_torch_ad.py | squarefk/test_actions | dd3b0305c49b577102786eb1c24c590ef160bc30 | [
"MIT"
] | 2 | 2021-05-03T12:59:01.000Z | 2021-11-22T04:30:28.000Z | tests/python/test_torch_ad.py | squarefk/test_actions | dd3b0305c49b577102786eb1c24c590ef160bc30 | [
"MIT"
] | null | null | null | tests/python/test_torch_ad.py | squarefk/test_actions | dd3b0305c49b577102786eb1c24c590ef160bc30 | [
"MIT"
] | 1 | 2021-08-09T15:47:24.000Z | 2021-08-09T15:47:24.000Z | import numpy as np
import taichi as ti
if ti.has_pytorch():
import torch
@ti.torch_test
def test_torch_ad():
n = 32
x = ti.field(ti.f32, shape=n, needs_grad=True)
y = ti.field(ti.f32, shape=n, needs_grad=True)
@ti.kernel
def torch_kernel():
for i in range(n):
# Do whate... | 25.611111 | 62 | 0.531453 |
13075d2f48355e308ef56d8aa5bb3c6848d9e420 | 6,731 | py | Python | graphnas/utils/label_split.py | RaphDal/GraphNAS | acb1fb978e10481b4417b7b4a22aec0482d8ff6b | [
"Apache-2.0"
] | 13 | 2020-07-29T12:45:22.000Z | 2022-03-07T06:26:02.000Z | src/graphnas/utils/label_split.py | mhnnunes/fla_nas_gnn | cf7f5c9143c4e6851eaef29af741ac8872364027 | [
"Apache-2.0"
] | null | null | null | src/graphnas/utils/label_split.py | mhnnunes/fla_nas_gnn | cf7f5c9143c4e6851eaef29af741ac8872364027 | [
"Apache-2.0"
] | 3 | 2020-09-27T06:43:17.000Z | 2020-11-26T08:43:35.000Z | import torch
def build_adj(edge_index, num_nodes):
"""
for undirected graph
:param edge_index:
:param num_nodes:
:return:
"""
if num_nodes is None:
num_nodes = max(edge_index[0]) + 1
edge_attr = torch.ones(edge_index.size(1), dtype=torch.float)
size = torch.Size([num_nodes,... | 36.188172 | 115 | 0.694548 |
6223f2eb6432f9f4f43b84c743f61f8582601834 | 1,034 | py | Python | edgeDetection/cannyEdgeDetection.py | vibinash/vision | 7d775d6a877412c963965ecca2eea71ee2def007 | [
"MIT"
] | null | null | null | edgeDetection/cannyEdgeDetection.py | vibinash/vision | 7d775d6a877412c963965ecca2eea71ee2def007 | [
"MIT"
] | null | null | null | edgeDetection/cannyEdgeDetection.py | vibinash/vision | 7d775d6a877412c963965ecca2eea71ee2def007 | [
"MIT"
] | null | null | null | import cv2
import numpy as np
from matplotlib import pyplot as plt
img = cv2.imread('../images/jurassic_world.jpg',0)
# Canny Edge Detection - multi stage algorithm
# 1. Noise Reduction (using a 5x5 gaussian filter)
# 2. Finding intensity gradient of the image
# - filtered with a Sobel kernel in both vertical and ho... | 35.655172 | 76 | 0.726306 |
e39e699638042d37fadac1d25bcd94ae8d4d230f | 114 | py | Python | board/stm32f769i-discovery/ucube.py | ruoranluomu/AliOS-Things | d0f3431bcacac5b61645e9beb231a0a53be8078b | [
"Apache-2.0"
] | 1 | 2021-06-10T01:39:39.000Z | 2021-06-10T01:39:39.000Z | board/stm32f769i-discovery/ucube.py | ewfweftwer/AliOS-Things | 26a5c1a2d6b1771590f5d302f0b2e7fe2fcf843e | [
"Apache-2.0"
] | null | null | null | board/stm32f769i-discovery/ucube.py | ewfweftwer/AliOS-Things | 26a5c1a2d6b1771590f5d302f0b2e7fe2fcf843e | [
"Apache-2.0"
] | 5 | 2020-11-04T04:36:37.000Z | 2021-11-10T08:05:49.000Z | linux_only_targets="helloworld modbus_demo udata_demo.sensor_local_demo udata_demo.udata_local_demo udataapp yts"
| 57 | 113 | 0.903509 |
10217ec89084ee8b7413dc6353a0b6052ad7e9dd | 24,598 | py | Python | data_preprocess/Yandex.py | CHIANGEL/GraphCM | ff1729336d5fce187386494d61a6468ed4709c78 | [
"MIT"
] | 6 | 2021-11-18T12:52:43.000Z | 2022-03-17T08:59:32.000Z | data_preprocess/Yandex.py | CHIANGEL/GraphCM | ff1729336d5fce187386494d61a6468ed4709c78 | [
"MIT"
] | null | null | null | data_preprocess/Yandex.py | CHIANGEL/GraphCM | ff1729336d5fce187386494d61a6468ed4709c78 | [
"MIT"
] | 1 | 2022-03-04T18:23:56.000Z | 2022-03-04T18:23:56.000Z | # !/usr/bin/python
# coding: utf8
from xml.dom.minidom import parse
import xml.dom.minidom
import time
import pprint
import string
import sys
sys.path.append("..")
import argparse
import re
import os
import numpy as np
import torch
import torch.nn as nn
from utils import *
from math import log
import random
import jso... | 47.763107 | 277 | 0.590292 |
8a1e750d6a721e2a45625e2769b152e563d7e84f | 1,150 | py | Python | .history/classes/Handler_20171106175108.py | reecebenson/DADSA-Tennis-PartA | d0763f819b300fcd0ce27041f5bc4ef0519c00bf | [
"MIT"
] | null | null | null | .history/classes/Handler_20171106175108.py | reecebenson/DADSA-Tennis-PartA | d0763f819b300fcd0ce27041f5bc4ef0519c00bf | [
"MIT"
] | null | null | null | .history/classes/Handler_20171106175108.py | reecebenson/DADSA-Tennis-PartA | d0763f819b300fcd0ce27041f5bc4ef0519c00bf | [
"MIT"
] | null | null | null | # DADSA - Assignment 1
# Reece Benson
import json
from classes import Player as Player
from classes import Season as Season
from classes import Tournament as Tournament
from classes import Round as Round
from classes import Match as Match
class Handler():
# Define the variables we will be using
seasons = { }
... | 33.823529 | 71 | 0.577391 |
1815fde2de17732fe6a9f95fa3a5394938ad8098 | 165,910 | py | Python | src/aks-preview/azext_aks_preview/custom.py | bragi92/azure-cli-extensions | 1f6f48f25d9fcd9753254d905c77960501945035 | [
"MIT"
] | null | null | null | src/aks-preview/azext_aks_preview/custom.py | bragi92/azure-cli-extensions | 1f6f48f25d9fcd9753254d905c77960501945035 | [
"MIT"
] | null | null | null | src/aks-preview/azext_aks_preview/custom.py | bragi92/azure-cli-extensions | 1f6f48f25d9fcd9753254d905c77960501945035 | [
"MIT"
] | null | null | null | # pylint: disable=too-many-lines
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# -----------------------------------... | 46.551627 | 227 | 0.639612 |
36b0290148d7ae4bed9bfa8fb5ec877363fc3738 | 13,436 | py | Python | mfplugin/configuration.py | albator75/mfplugin | eab633a8d95d8bc08f77709b9118b6af94d8a862 | [
"BSD-3-Clause"
] | null | null | null | mfplugin/configuration.py | albator75/mfplugin | eab633a8d95d8bc08f77709b9118b6af94d8a862 | [
"BSD-3-Clause"
] | 5 | 2020-05-28T07:32:40.000Z | 2021-08-17T10:37:40.000Z | mfplugin/configuration.py | albator75/mfplugin | eab633a8d95d8bc08f77709b9118b6af94d8a862 | [
"BSD-3-Clause"
] | 2 | 2021-08-17T09:41:55.000Z | 2021-08-17T10:25:16.000Z | import os
import re
import copy
import sys
import fnmatch
import inspect
import opinionated_configparser
import cerberus
from mfplugin.utils import validate_configparser, \
cerberus_errors_to_human_string
from mfplugin.app import APP_SCHEMA, App
from mfplugin.extra_daemon import EXTRA_DAEMON_SCHEMA, ExtraDaemon
fro... | 37.116022 | 78 | 0.524412 |
e158395f86ddd96c291fcdf381ceefdae9bd3e67 | 2,373 | py | Python | setup.py | JPchico/masci-tools | a950f492ecebcc1b15100e5dc891f5a6fa6c1a5b | [
"MIT"
] | 1 | 2021-06-26T20:37:12.000Z | 2021-06-26T20:37:12.000Z | setup.py | RubelMozumder/masci-tools | a950f492ecebcc1b15100e5dc891f5a6fa6c1a5b | [
"MIT"
] | null | null | null | setup.py | RubelMozumder/masci-tools | a950f492ecebcc1b15100e5dc891f5a6fa6c1a5b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
setup: usage: pip install -e .[graphs]
"""
from __future__ import absolute_import
from setuptools import setup, find_packages
import io # needed to have `open` with encoding option
# read the contents of your README file
from os import path
this_directory = path.abspath(path.dirname(__file... | 36.507692 | 206 | 0.577328 |
bda0b815a03833d6f3a63ddc4d4d7792af76eb52 | 2,027 | py | Python | setup.py | adamshephard/tiatoolbox | 28c32648bc1f3e842c7b241637fd25af290386e6 | [
"BSD-3-Clause"
] | null | null | null | setup.py | adamshephard/tiatoolbox | 28c32648bc1f3e842c7b241637fd25af290386e6 | [
"BSD-3-Clause"
] | null | null | null | setup.py | adamshephard/tiatoolbox | 28c32648bc1f3e842c7b241637fd25af290386e6 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
"""The setup script."""
from setuptools import find_packages, setup
with open("README.md") as readme_file:
readme = readme_file.read()
with open("HISTORY.md") as history_file:
history = history_file.read()
requirements = [
"albumentations>=1.1.0",
"Click>=8.1.2",
"defusedx... | 25.024691 | 75 | 0.605328 |
65c69a2b092a99e49ef60f9d9627277be2753091 | 6,338 | py | Python | selfcaptcha/iamnotarobot.py | mkukar/selfCAPTCHA | 21cba6bd9f0d7f2def0144b4ffe07442969d9d87 | [
"MIT"
] | 5 | 2019-09-05T14:25:54.000Z | 2021-10-02T03:55:25.000Z | selfcaptcha/iamnotarobot.py | mkukar/selfCAPTCHA | 21cba6bd9f0d7f2def0144b4ffe07442969d9d87 | [
"MIT"
] | null | null | null | selfcaptcha/iamnotarobot.py | mkukar/selfCAPTCHA | 21cba6bd9f0d7f2def0144b4ffe07442969d9d87 | [
"MIT"
] | 1 | 2020-10-03T19:43:24.000Z | 2020-10-03T19:43:24.000Z | # selfCAPTCHA Project
# CB: Michael Kukar 2019
# MIT License
import functools, os, random
from pprint import pprint
from flask import Blueprint, flash, g, redirect, render_template, request, session, url_for
from imageai.Prediction import ImagePrediction
from werkzeug.utils import secure_filename
bp = Blueprint('iam... | 47.654135 | 180 | 0.694225 |
2a094ecc693601cc6bbd4829d52808cf8ff692fa | 16,304 | py | Python | psdaq/psdaq/control_gui/CGWMain.py | JBlaschke/lcls2 | 30523ef069e823535475d68fa283c6387bcf817b | [
"BSD-3-Clause-LBNL"
] | null | null | null | psdaq/psdaq/control_gui/CGWMain.py | JBlaschke/lcls2 | 30523ef069e823535475d68fa283c6387bcf817b | [
"BSD-3-Clause-LBNL"
] | null | null | null | psdaq/psdaq/control_gui/CGWMain.py | JBlaschke/lcls2 | 30523ef069e823535475d68fa283c6387bcf817b | [
"BSD-3-Clause-LBNL"
] | null | null | null | """
Class :py:class:`CGWMain` is a QWidget for interactive image
============================================================
Usage ::
import sys
from PyQt5.QtWidgets import QApplication
from psdaq.control_gui.CGWMain import CGWMain
app = QApplication(sys.argv)
w = CGWMain(None, app)
w.show()
... | 36.070796 | 123 | 0.56434 |
92854e3eba3cfeb93b49221f215f02ff0fafdea5 | 2,347 | py | Python | mac/google-cloud-sdk/lib/surface/bigtable/instances/list.py | bopopescu/cndw | ee432efef88a4351b355f3d6d5350defc7f4246b | [
"Apache-2.0"
] | 2 | 2019-11-10T09:17:07.000Z | 2019-12-18T13:44:08.000Z | mac/google-cloud-sdk/lib/surface/bigtable/instances/list.py | bopopescu/cndw | ee432efef88a4351b355f3d6d5350defc7f4246b | [
"Apache-2.0"
] | 4 | 2020-07-21T12:51:46.000Z | 2022-01-22T10:29:25.000Z | mac/google-cloud-sdk/lib/surface/bigtable/instances/list.py | bopopescu/cndw | ee432efef88a4351b355f3d6d5350defc7f4246b | [
"Apache-2.0"
] | 1 | 2020-07-25T18:17:57.000Z | 2020-07-25T18:17:57.000Z | # -*- coding: utf-8 -*- #
# Copyright 2016 Google LLC. 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 requir... | 29.708861 | 79 | 0.700895 |
5e69af4ace13f137afde79586204616de1a4106d | 2,111 | py | Python | gym_scarecrow/main.py | ajberlier/gym-scarecrow | eb6f7f0b7938bcd5fd4149b7d9e07ea403347476 | [
"BSD-3-Clause"
] | null | null | null | gym_scarecrow/main.py | ajberlier/gym-scarecrow | eb6f7f0b7938bcd5fd4149b7d9e07ea403347476 | [
"BSD-3-Clause"
] | null | null | null | gym_scarecrow/main.py | ajberlier/gym-scarecrow | eb6f7f0b7938bcd5fd4149b7d9e07ea403347476 | [
"BSD-3-Clause"
] | null | null | null | import gym
import gym.spaces
import gym_scarecrow
from gym_scarecrow.params import *
from gym_scarecrow.envs.scarecrow_env import *
from gym_scarecrow.controllers.scarecrow_q import *
from gym_scarecrow.controllers.scarecrow_rules import *
from gym_scarecrow.controllers.scarecrow_human import *
from gym_scarecrow.envs... | 28.146667 | 91 | 0.700616 |
4aa4e55248c623ca6e0274dc82e3d998d7d97876 | 1,751 | py | Python | ietf/ietfauth/management/commands/send_apikey_usage_emails.py | hassanakbar4/ietfdb | cabee059092ae776015410640226064331c293b7 | [
"BSD-3-Clause"
] | 25 | 2022-03-05T08:26:52.000Z | 2022-03-30T15:45:42.000Z | ietf/ietfauth/management/commands/send_apikey_usage_emails.py | hassanakbar4/ietfdb | cabee059092ae776015410640226064331c293b7 | [
"BSD-3-Clause"
] | 219 | 2022-03-04T17:29:12.000Z | 2022-03-31T21:16:14.000Z | ietf/ietfauth/management/commands/send_apikey_usage_emails.py | hassanakbar4/ietfdb | cabee059092ae776015410640226064331c293b7 | [
"BSD-3-Clause"
] | 22 | 2022-03-04T15:34:34.000Z | 2022-03-28T13:30:59.000Z | # Copyright The IETF Trust 2017-2020, All Rights Reserved
# -*- coding: utf-8 -*-
import datetime
from textwrap import dedent
from django.conf import settings
from django.core.management.base import BaseCommand
import debug # pyflakes:ignore
from ietf.person.models import PersonalApiKey... | 33.673077 | 105 | 0.608795 |
9a7fe29586f69e3d92ff44a6c2a8e80c5c394b95 | 7,046 | py | Python | rdflib/namespace/_GEO.py | jclerman/rdflib | 75c545e0747032a700e0bfc68dd044b86c275d03 | [
"BSD-3-Clause"
] | 1 | 2021-05-25T12:32:26.000Z | 2021-05-25T12:32:26.000Z | rdflib/namespace/_GEO.py | jclerman/rdflib | 75c545e0747032a700e0bfc68dd044b86c275d03 | [
"BSD-3-Clause"
] | 19 | 2021-06-28T06:17:30.000Z | 2021-11-29T06:14:43.000Z | rdflib/namespace/_GEO.py | jclerman/rdflib | 75c545e0747032a700e0bfc68dd044b86c275d03 | [
"BSD-3-Clause"
] | 1 | 2021-05-16T08:08:56.000Z | 2021-05-16T08:08:56.000Z | from rdflib.term import URIRef
from rdflib.namespace import DefinedNamespace, Namespace
class GEO(DefinedNamespace):
"""
An RDF/OWL vocabulary for representing spatial information
Generated from: http://schemas.opengis.net/geosparql/1.0/geosparql_vocab_all.rdf
Date: 2021-12-27 17:38:15.101187
<h... | 95.216216 | 281 | 0.664632 |
00221fae797a6fb06bc1a41bdbe5a75904441d51 | 13,344 | py | Python | reme/reme.py | martinak1/reme | 370b56a76f62adfe104d033900ef353e223088d8 | [
"BSD-3-Clause"
] | null | null | null | reme/reme.py | martinak1/reme | 370b56a76f62adfe104d033900ef353e223088d8 | [
"BSD-3-Clause"
] | null | null | null | reme/reme.py | martinak1/reme | 370b56a76f62adfe104d033900ef353e223088d8 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
"""
reme.py
A Discord bot that reminds you of things.
[Exit Codes]
1 - No token found
2 - Unable to login
3 - Unable to connect to the database
4 - Unknown error
5 - Discord.Client error
6 - Asyncio exception thrown
"""
import asyncio
from . import db
import discord
from . import entry
#fro... | 35.023622 | 129 | 0.591876 |
92de83024c9f773d93729133b07bf9237f8d41d5 | 2,580 | py | Python | mapping/reciprocal.py | amandashack/QDmapping | ee93dc693ebc8e6cfd378d5b69367c5293d232be | [
"MIT"
] | null | null | null | mapping/reciprocal.py | amandashack/QDmapping | ee93dc693ebc8e6cfd378d5b69367c5293d232be | [
"MIT"
] | null | null | null | mapping/reciprocal.py | amandashack/QDmapping | ee93dc693ebc8e6cfd378d5b69367c5293d232be | [
"MIT"
] | null | null | null | import numpy as np
import cv2
def shift_dft(src, dst=None):
'''
Rearrange the quadrants of Fourier image so that the origin is at
the image center. Swaps quadrant 1 with 3, and 2 with 4.
src and dst arrays must be equal size & type
'''
if dst is None:
dst = np.empty(src.... | 30.714286 | 109 | 0.646512 |
c362af6f72e7bde8e11c59a6183031d614fa07e3 | 496 | py | Python | Blog2017/Blog2017/routes.py | ptrompeter/Blog2017 | e36aa3594781a926c8d90cde70b7c2fa6edc7472 | [
"MIT"
] | null | null | null | Blog2017/Blog2017/routes.py | ptrompeter/Blog2017 | e36aa3594781a926c8d90cde70b7c2fa6edc7472 | [
"MIT"
] | 3 | 2019-12-26T16:38:42.000Z | 2021-06-01T21:52:46.000Z | Blog2017/Blog2017/routes.py | ptrompeter/Blog2017 | e36aa3594781a926c8d90cde70b7c2fa6edc7472 | [
"MIT"
] | null | null | null | """Routes for blog access and login."""
def includeme(config):
"""Included routes are picked up by the configurator."""
config.add_static_view('static', 'static', cache_max_age=3600)
config.add_route('home', '/')
config.add_route('blog', '/blog/{id:\d+}/{slug}')
config.add_route('blog_action', '/b... | 38.153846 | 67 | 0.649194 |
2962e4f1669bcb6aabdfa233bfcaf2db2ffa130b | 3,281 | py | Python | gameproject/gameproject/settings.py | Rahul0700/Roras-gamehub | 864be4fd11aaf5ba1fc32d27e7411b2b533922fa | [
"MIT"
] | 1 | 2021-08-06T15:46:18.000Z | 2021-08-06T15:46:18.000Z | gameproject/gameproject/settings.py | Rahul0700/Roras-gamehub | 864be4fd11aaf5ba1fc32d27e7411b2b533922fa | [
"MIT"
] | null | null | null | gameproject/gameproject/settings.py | Rahul0700/Roras-gamehub | 864be4fd11aaf5ba1fc32d27e7411b2b533922fa | [
"MIT"
] | null | null | null | """
Django settings for gameproject project.
Generated by 'django-admin startproject' using Django 3.0.3.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.0/ref/settings/
"""
from secr... | 26.039683 | 91 | 0.703139 |
2a7a087b5cfe82e0be1396908ad1862d6fc1e453 | 816 | py | Python | ooobuild/dyn/text/defaults.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | ooobuild/dyn/text/defaults.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | ooobuild/dyn/text/defaults.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
#
# Copyright 2022 :Barry-Thomas-Paul: Moss
#
# 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... | 31.384615 | 74 | 0.75 |
317a52012e22c813988f7a8ffab426c27c16627a | 1,544 | py | Python | jdcloud_sdk/services/vm/apis/DetachDiskRequest.py | lidaobing/jdcloud-sdk-python | f305e8ddd74ab4ad445477744534e7299d4d93fb | [
"Apache-2.0"
] | null | null | null | jdcloud_sdk/services/vm/apis/DetachDiskRequest.py | lidaobing/jdcloud-sdk-python | f305e8ddd74ab4ad445477744534e7299d4d93fb | [
"Apache-2.0"
] | null | null | null | jdcloud_sdk/services/vm/apis/DetachDiskRequest.py | lidaobing/jdcloud-sdk-python | f305e8ddd74ab4ad445477744534e7299d4d93fb | [
"Apache-2.0"
] | 1 | 2019-03-01T08:44:37.000Z | 2019-03-01T08:44:37.000Z | # coding=utf8
# Copyright 2018-2025 JDCLOUD.COM
#
# 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 agr... | 29.132075 | 93 | 0.685233 |
1f06e72e7c51c32115ed51b034d1d6b7f44e9146 | 11,977 | py | Python | pex/variables.py | Djailla/pex | cf20f8fce16cc5d78962835ecc2824f372f17412 | [
"Apache-2.0"
] | null | null | null | pex/variables.py | Djailla/pex | cf20f8fce16cc5d78962835ecc2824f372f17412 | [
"Apache-2.0"
] | 1 | 2020-03-02T14:52:32.000Z | 2020-03-02T14:52:32.000Z | pex/variables.py | criteo-forks/pex | 7d593478280844370cda0f71df391148d129deb0 | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
# Due to the PEX_ properties, disable checkstyle.
# checkstyle: noqa
from __future__ import absolute_import
import os
import sys
from contextlib import contextmanager
from pex.common im... | 33.362117 | 110 | 0.703599 |
635a8607650ac6fea9f5b9498306049f6aee6f6e | 230 | py | Python | account/urls.py | shaxpakistan/e-stationery | 00c7027f74e9f0e90247e44d9dbd86203cd9dbb4 | [
"CC0-1.0"
] | 1 | 2022-02-17T19:13:40.000Z | 2022-02-17T19:13:40.000Z | account/urls.py | shaxpakistan/e-stationery | 00c7027f74e9f0e90247e44d9dbd86203cd9dbb4 | [
"CC0-1.0"
] | null | null | null | account/urls.py | shaxpakistan/e-stationery | 00c7027f74e9f0e90247e44d9dbd86203cd9dbb4 | [
"CC0-1.0"
] | null | null | null | from django.urls import path
from . import views
urlpatterns = [
path('register/', views.UserRegister, name = "register"),
path('login/', views.login, name = 'login'),
path('logout/', views.logout, name = 'logout'),
] | 28.75 | 61 | 0.652174 |
61ef404dd127aebd90d614f9e856540c903a9e12 | 3,507 | py | Python | tests/plugins/environments/test_slurm_environment.py | mathemusician/pytorch-lightning | 15fa5389387b3a220bc044dd30eb0be1e8f64944 | [
"Apache-2.0"
] | 3,469 | 2019-03-31T03:09:16.000Z | 2020-01-13T15:06:31.000Z | tests/plugins/environments/test_slurm_environment.py | mathemusician/pytorch-lightning | 15fa5389387b3a220bc044dd30eb0be1e8f64944 | [
"Apache-2.0"
] | 524 | 2019-04-02T12:33:39.000Z | 2020-01-14T02:53:33.000Z | tests/plugins/environments/test_slurm_environment.py | mathemusician/pytorch-lightning | 15fa5389387b3a220bc044dd30eb0be1e8f64944 | [
"Apache-2.0"
] | 365 | 2019-04-02T22:14:04.000Z | 2020-01-13T17:21:54.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... | 35.07 | 102 | 0.692044 |
97314211817c3095e08720e618eb381623dc449c | 3,866 | py | Python | ak02/consumer/Consumer_03_CommitSync.py | marx1992620/kafka_python | 07885f01d44b38861d75dc21add17d542806469c | [
"MIT"
] | null | null | null | ak02/consumer/Consumer_03_CommitSync.py | marx1992620/kafka_python | 07885f01d44b38861d75dc21add17d542806469c | [
"MIT"
] | null | null | null | ak02/consumer/Consumer_03_CommitSync.py | marx1992620/kafka_python | 07885f01d44b38861d75dc21add17d542806469c | [
"MIT"
] | 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 the ... | 34.828829 | 100 | 0.570874 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.