hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
281d7407a5c3dbd72c6d44bef7211680fea8bcb6 | 248 | py | Python | Task/Runtime-evaluation-In-an-environment/Python/runtime-evaluation-in-an-environment-2.py | LaudateCorpus1/RosettaCodeData | 9ad63ea473a958506c041077f1d810c0c7c8c18d | [
"Info-ZIP"
] | 1 | 2018-11-09T22:08:38.000Z | 2018-11-09T22:08:38.000Z | Task/Runtime-evaluation-In-an-environment/Python/runtime-evaluation-in-an-environment-2.py | seanwallawalla-forks/RosettaCodeData | 9ad63ea473a958506c041077f1d810c0c7c8c18d | [
"Info-ZIP"
] | null | null | null | Task/Runtime-evaluation-In-an-environment/Python/runtime-evaluation-in-an-environment-2.py | seanwallawalla-forks/RosettaCodeData | 9ad63ea473a958506c041077f1d810c0c7c8c18d | [
"Info-ZIP"
] | 1 | 2018-11-09T22:08:40.000Z | 2018-11-09T22:08:40.000Z | >>> def eval_with_args(code, **kwordargs):
return eval(code, kwordargs)
>>> code = '2 ** x'
>>> eval_with_args(code, x=5) - eval_with_args(code, x=3)
24
>>> code = '3 * x + y'
>>> eval_with_args(code, x=5, y=2) - eval_with_args(code, x=3, y=1)
7
| 24.8 | 67 | 0.616935 |
b4f3938c5ade309d469ab6829aad476c6440d0ce | 1,083 | py | Python | server/Category/views.py | adamA113/servize | 89933c3864d997188ec79ad690b37f51bca54aa3 | [
"MIT"
] | null | null | null | server/Category/views.py | adamA113/servize | 89933c3864d997188ec79ad690b37f51bca54aa3 | [
"MIT"
] | null | null | null | server/Category/views.py | adamA113/servize | 89933c3864d997188ec79ad690b37f51bca54aa3 | [
"MIT"
] | 2 | 2020-12-26T09:50:17.000Z | 2020-12-26T09:52:45.000Z | from django.shortcuts import render
from rest_framework import generics # for post and get
from Category.models import Category
from Category.serialize import CategorySerializer,JustCategorySerializer
from Category.filter import CategoryFilter
from rest_framework.decorators import api_view
from rest_framework.resp... | 40.111111 | 78 | 0.77747 |
2d077a46643277e2c3147b930505514f811abcbf | 11,757 | py | Python | client/verta/tests/test_permissions/test_visibility_e2e.py | stefan-petrov-toptal/modeldb | a8a9b9da6ed964c91351230b2f0d2703c75794de | [
"Apache-2.0"
] | null | null | null | client/verta/tests/test_permissions/test_visibility_e2e.py | stefan-petrov-toptal/modeldb | a8a9b9da6ed964c91351230b2f0d2703c75794de | [
"Apache-2.0"
] | null | null | null | client/verta/tests/test_permissions/test_visibility_e2e.py | stefan-petrov-toptal/modeldb | a8a9b9da6ed964c91351230b2f0d2703c75794de | [
"Apache-2.0"
] | null | null | null | """
End-to-end tests for org permissions access and actions.
"""
import pytest
import requests
from verta._internal_utils import _utils
from verta.visibility import (
OrgCustom,
Private,
)
from verta.dataset import Path
from verta.environment import Python
pytestmark = pytest.mark.not_oss
class TestAcces... | 42.908759 | 108 | 0.698307 |
75d232bcaab153a0e4b83d93e150a4e5a38b754a | 1,932 | py | Python | backend/atlas/mutations/delete_team.py | getsentry/atlas | 9bf4a236b99a24a7a17700591a0ff94feecf7ce7 | [
"Apache-2.0"
] | 18 | 2019-09-24T23:49:41.000Z | 2020-11-14T17:30:27.000Z | backend/atlas/mutations/delete_team.py | getsentry/atlas | 9bf4a236b99a24a7a17700591a0ff94feecf7ce7 | [
"Apache-2.0"
] | 53 | 2019-09-24T18:50:25.000Z | 2022-02-27T11:44:55.000Z | backend/atlas/mutations/delete_team.py | getsentry/atlas | 9bf4a236b99a24a7a17700591a0ff94feecf7ce7 | [
"Apache-2.0"
] | 2 | 2020-02-03T08:22:36.000Z | 2021-02-28T12:55:48.000Z | import graphene
from django.db import transaction
from atlas.models import Profile, Team
from atlas.tasks import update_profile
class DeleteTeam(graphene.Mutation):
class Arguments:
team = graphene.UUID(required=True)
new_team = graphene.UUID(required=False)
ok = graphene.Boolean()
error... | 33.310345 | 81 | 0.60766 |
6551476f5d10eacc070b9c99c88308811de0717d | 29,617 | py | Python | pysnmp/CISCO-WIRELESS-P2MP-RF-METRICS-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 11 | 2021-02-02T16:27:16.000Z | 2021-08-31T06:22:49.000Z | pysnmp/CISCO-WIRELESS-P2MP-RF-METRICS-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 75 | 2021-02-24T17:30:31.000Z | 2021-12-08T00:01:18.000Z | pysnmp/CISCO-WIRELESS-P2MP-RF-METRICS-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 CISCO-WIRELESS-P2MP-RF-METRICS-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-WIRELESS-P2MP-RF-METRICS-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 18:05:15 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using... | 137.115741 | 3,946 | 0.759091 |
97c1b71b3e56bfe4d5cd92f4af99022e21fc48fa | 3,321 | py | Python | MarkovChain/distribution.py | kierke-gaard/markov-chains-py | 19ec0e1e9dbc9db6eac59c9906c732fe3a0396ac | [
"MIT"
] | null | null | null | MarkovChain/distribution.py | kierke-gaard/markov-chains-py | 19ec0e1e9dbc9db6eac59c9906c732fe3a0396ac | [
"MIT"
] | null | null | null | MarkovChain/distribution.py | kierke-gaard/markov-chains-py | 19ec0e1e9dbc9db6eac59c9906c732fe3a0396ac | [
"MIT"
] | null | null | null | """
distibtion - basic functionality for distibution handling like
histogram and inverse distribution look ups.
Assuming that the observations are integers starting from 0.
"""
#%% Dependencies and Configuration
import numpy as np
from collections import Counter
from itertools import groupby
state_type = np.uint8
#%... | 38.616279 | 101 | 0.732611 |
7df53458075e336ee378c6fd6d2bab13a3bd2efd | 1,541 | py | Python | qzails/utils/common/serialize_variable.py | pyxsqbs/qzails | 30f5bca3e8dd0c3b783a14bbbc22a6767a0bfa10 | [
"MIT"
] | null | null | null | qzails/utils/common/serialize_variable.py | pyxsqbs/qzails | 30f5bca3e8dd0c3b783a14bbbc22a6767a0bfa10 | [
"MIT"
] | 1 | 2019-12-13T10:14:05.000Z | 2019-12-13T10:14:26.000Z | qzails/utils/common/serialize_variable.py | pyxsqbs/qzails | 30f5bca3e8dd0c3b783a14bbbc22a6767a0bfa10 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
@ Author: qinbaoshuai
@ Date: 2019-07-17 10:17:41
@ Email: qinbaoshuai@cloudwalk.cn
@ LastEditors: qinbaoshuai
@ LastEditTime: 2019-08-16 14:39:50
@ Description: 公共变量的保存、载入,所有算子都可以访问到公共变量
"""
import json
import os
import dill as pickle
# 公共变量的二进制文件的父目录
DATA_PK_PATH = '... | 27.517857 | 105 | 0.656716 |
2d71b9447d3069590e5440f58a288471e7946d17 | 13,640 | py | Python | nrcan_etl/tests/test_dwelling.py | cds-snc/nrcan_api | 795e001d24b67230cf92ba4cb409b37452c0d4a8 | [
"MIT"
] | 7 | 2017-12-15T03:58:29.000Z | 2018-04-23T22:48:53.000Z | nrcan_etl/tests/test_dwelling.py | NRCan/energuide_api | 795e001d24b67230cf92ba4cb409b37452c0d4a8 | [
"MIT"
] | 137 | 2018-01-24T16:44:57.000Z | 2018-06-25T14:02:10.000Z | nrcan_etl/tests/test_dwelling.py | cds-snc/nrcan_api | 795e001d24b67230cf92ba4cb409b37452c0d4a8 | [
"MIT"
] | 4 | 2018-02-15T12:40:52.000Z | 2018-07-03T14:22:51.000Z | import copy
import datetime
import typing
import pytest
from energuide import dwelling
from energuide.embedded import upgrade
from energuide.embedded import measurement
from energuide.embedded import composite
from energuide.embedded import walls
from energuide.embedded import region
from energuide.embedded import eval... | 35.428571 | 104 | 0.517595 |
93735b6e4d415232f3caeeae47ac7cc4aec58016 | 75,197 | py | Python | cinder-14.0.0/cinder/volume/drivers/ibm/ibm_storage/ds8k_proxy.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | 2 | 2019-05-24T14:13:50.000Z | 2019-05-24T14:21:13.000Z | cinder-14.0.0/cinder/volume/drivers/ibm/ibm_storage/ds8k_proxy.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | 5 | 2019-08-14T06:46:03.000Z | 2021-12-13T20:01:25.000Z | cinder-14.0.0/cinder/volume/drivers/ibm/ibm_storage/ds8k_proxy.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | 2 | 2020-03-15T01:24:15.000Z | 2020-07-22T20:34:26.000Z | # Copyright (c) 2016 IBM Corporation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless req... | 44.733492 | 79 | 0.579199 |
eba3bd349eaac8627e58f49b576fd73b30890f51 | 4,027 | py | Python | e2e_testing/torchscript/conv.py | pashu123/torch-mlir | 7c3ba25238ac73850fcdd698be1fb084f8a58e49 | [
"Apache-2.0"
] | null | null | null | e2e_testing/torchscript/conv.py | pashu123/torch-mlir | 7c3ba25238ac73850fcdd698be1fb084f8a58e49 | [
"Apache-2.0"
] | null | null | null | e2e_testing/torchscript/conv.py | pashu123/torch-mlir | 7c3ba25238ac73850fcdd698be1fb084f8a58e49 | [
"Apache-2.0"
] | null | null | null | # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
# Also available under a BSD-style license. See LICENSE.
import torch
from torch_mlir_e2e_test.torchscript.framework impo... | 29.610294 | 80 | 0.583561 |
54fb626267d97bc470e45076008d4e0141e587c0 | 1,469 | py | Python | samples/snippets/noxfile_config.py | tmdiep/python-pubsublite | 8edef6708fab60ce29c040f3de60783fe31b55ae | [
"Apache-2.0"
] | 15 | 2020-11-10T15:36:52.000Z | 2022-03-06T15:00:25.000Z | samples/snippets/noxfile_config.py | tmdiep/python-pubsublite | 8edef6708fab60ce29c040f3de60783fe31b55ae | [
"Apache-2.0"
] | 110 | 2020-11-11T18:14:31.000Z | 2022-03-30T22:42:17.000Z | samples/snippets/noxfile_config.py | tmdiep/python-pubsublite | 8edef6708fab60ce29c040f3de60783fe31b55ae | [
"Apache-2.0"
] | 6 | 2020-11-13T19:24:27.000Z | 2022-01-29T08:13:14.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, ... | 40.805556 | 90 | 0.744044 |
1f1b36e479edcabc1fdc1ba9d42fa1ca1355c00a | 17,320 | py | Python | PyPoE/cli/exporter/wiki/parsers/area.py | aang521/PyPoE | b11f751b27d6fa917b895c1844b9f3955f23702c | [
"MIT"
] | 247 | 2015-07-06T19:39:11.000Z | 2022-03-30T13:11:03.000Z | PyPoE/cli/exporter/wiki/parsers/area.py | dbjorge/PyPoE | 0932bd729211488cfb3f57ed63fcb358a22b6bff | [
"MIT"
] | 121 | 2015-09-01T23:50:22.000Z | 2021-08-23T21:06:47.000Z | PyPoE/cli/exporter/wiki/parsers/area.py | dbjorge/PyPoE | 0932bd729211488cfb3f57ed63fcb358a22b6bff | [
"MIT"
] | 109 | 2015-09-09T06:37:56.000Z | 2022-03-20T16:06:33.000Z | """
Overview
===============================================================================
+----------+------------------------------------------------------------------+
| Path | PyPoE/cli/exporter/wiki/parsers/area.py |
+----------+------------------------------------------------------... | 32.990476 | 90 | 0.411836 |
cc690a2fd8757a4dc3a5206495d6e5b9c4e57053 | 4,108 | py | Python | setup.py | Acidburn0zzz/pkgbuilder | f8a62d9f232178e628d7404bbe4efccb05f2a857 | [
"BSD-3-Clause"
] | 1 | 2018-06-30T17:10:17.000Z | 2018-06-30T17:10:17.000Z | setup.py | Acidburn0zzz/pkgbuilder | f8a62d9f232178e628d7404bbe4efccb05f2a857 | [
"BSD-3-Clause"
] | null | null | null | setup.py | Acidburn0zzz/pkgbuilder | f8a62d9f232178e628d7404bbe4efccb05f2a857 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# -*- encoding: utf-8 -*-
import sys
from setuptools import setup
from setuptools.command.test import test as TestCommand
class PyTest(TestCommand):
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = ['tests/']
self.test_suite = True
... | 48.329412 | 79 | 0.47371 |
a1bc3e66fb1e8dad7af339815e183c5138c659c1 | 1,220 | py | Python | orchestrator/helpers/vendor/zipstream/compat.py | darius-kia/director4 | 1d2c2c4c3ec12cc9b7f846d5dc075ea3bbef36f9 | [
"MIT"
] | 7 | 2020-08-23T23:08:34.000Z | 2021-12-02T04:17:37.000Z | orchestrator/helpers/vendor/zipstream/compat.py | darius-kia/director4 | 1d2c2c4c3ec12cc9b7f846d5dc075ea3bbef36f9 | [
"MIT"
] | 43 | 2020-08-24T16:48:29.000Z | 2022-03-02T19:45:54.000Z | orchestrator/helpers/vendor/zipstream/compat.py | darius-kia/director4 | 1d2c2c4c3ec12cc9b7f846d5dc075ea3bbef36f9 | [
"MIT"
] | 10 | 2020-08-17T20:42:52.000Z | 2021-07-16T03:46:51.000Z | # -*- coding: utf-8 -*-
"""
pythoncompat
Copied from requests
"""
import sys
# -------
# Pythons
# -------
PY2 = sys.version_info[0] == 2
PY3 = sys.version_info[0] == 3
# ---------
# Specifics
# ---------
if PY2:
builtin_str = str
bytes = str
str = unicode
basestring = basestring
numeric_ty... | 16.266667 | 84 | 0.661475 |
e62ea412d6cc66afdfd5979917c68d0914421328 | 4,278 | py | Python | adobe_aam/segmentFolders/segmentFolders.py | TrevorMcCormick/adobe_aam | 8ea92c8e199647382947f68f384e887ce7385cff | [
"MIT"
] | null | null | null | adobe_aam/segmentFolders/segmentFolders.py | TrevorMcCormick/adobe_aam | 8ea92c8e199647382947f68f384e887ce7385cff | [
"MIT"
] | null | null | null | adobe_aam/segmentFolders/segmentFolders.py | TrevorMcCormick/adobe_aam | 8ea92c8e199647382947f68f384e887ce7385cff | [
"MIT"
] | null | null | null | # Import packages
import os
import json
from datetime import datetime, timedelta
import requests
import jwt
import pandas as pd
from adobe_aam.helpers.headers import *
from adobe_aam.helpers.simplify import *
from pandas import json_normalize
def bytesToJson(response_content):
json_response = json.loads(response... | 35.355372 | 113 | 0.536466 |
6875185254c19a0b6dda325d5dab51ca6489776d | 3,072 | py | Python | .history/classes/Handler_20171106214820.py | reecebenson/DADSA-Tennis-PartA | d0763f819b300fcd0ce27041f5bc4ef0519c00bf | [
"MIT"
] | null | null | null | .history/classes/Handler_20171106214820.py | reecebenson/DADSA-Tennis-PartA | d0763f819b300fcd0ce27041f5bc4ef0519c00bf | [
"MIT"
] | null | null | null | .history/classes/Handler_20171106214820.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
app = None
... | 35.72093 | 93 | 0.581706 |
070463d0b3a3cbb93eac672995e253db731f0ace | 286 | py | Python | atbash-cipher/atbash_cipher.py | pierrebeaucamp/Exercism-Python | 910b764c6726e9f131fb3a394c70d9b5bb167be9 | [
"Unlicense"
] | null | null | null | atbash-cipher/atbash_cipher.py | pierrebeaucamp/Exercism-Python | 910b764c6726e9f131fb3a394c70d9b5bb167be9 | [
"Unlicense"
] | null | null | null | atbash-cipher/atbash_cipher.py | pierrebeaucamp/Exercism-Python | 910b764c6726e9f131fb3a394c70d9b5bb167be9 | [
"Unlicense"
] | null | null | null | import regex
import string
abc = list(string.ascii_lowercase)
def decode(txt):
txt = regex.sub(r'\p{P}+|\s', "", txt)
return regex.sub(r'[a-z]', lambda m: abc[-abc.index(m.group(0)) -1], txt)
def encode(txt):
return regex.sub(r'(.{5})(?!$)', '\\1 ', decode(txt.lower()))
| 23.833333 | 77 | 0.594406 |
57f239b9fe682826249ac62dbee0ff3448f5c215 | 766 | py | Python | napalm_flexfabric/__init__.py | firefly-serenity/napalm-flexfabric | a9ce5d696f4bb5d1b03b0c49f2fcbd1588499543 | [
"Apache-2.0"
] | 6 | 2019-09-22T05:38:50.000Z | 2021-09-09T08:52:01.000Z | napalm_flexfabric/__init__.py | fmbrieva/napalm-flexfabric | 997e70780c0ff44942f6dfa27375c8124865aa0f | [
"Apache-2.0"
] | null | null | null | napalm_flexfabric/__init__.py | fmbrieva/napalm-flexfabric | 997e70780c0ff44942f6dfa27375c8124865aa0f | [
"Apache-2.0"
] | 3 | 2020-07-26T15:17:10.000Z | 2022-02-05T09:53:19.000Z | # Copyright 2019 Steffen Walter. All rights reserved.
#
# The contents of this file are 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
#
# ... | 42.555556 | 80 | 0.759791 |
fa5547775aec543812a612c5e8d7d8a0434cd8d7 | 4,965 | py | Python | random-images/wallpapers/dots.py | dominicschaff/random | 14a19b976a09c768ab8844b7cda237c17a92c9ae | [
"MIT"
] | null | null | null | random-images/wallpapers/dots.py | dominicschaff/random | 14a19b976a09c768ab8844b7cda237c17a92c9ae | [
"MIT"
] | null | null | null | random-images/wallpapers/dots.py | dominicschaff/random | 14a19b976a09c768ab8844b7cda237c17a92c9ae | [
"MIT"
] | null | null | null | import PIL.Image as Image
import PIL.ImageDraw as ImageDraw
from random import *
import sys
from math import cos, sin, pi, sqrt, tan
amount = 1
prepend = "wp-"
if len(sys.argv)>1:
amount = int(sys.argv[1])
if len(sys.argv)>2:
prepend = sys.argv[2]
#formulas:
def form_circle(x,y,i,d):
return int(x + d*cos(... | 28.699422 | 111 | 0.453978 |
7db5968171497a419fef5fbf99463e981519a929 | 714 | py | Python | setup.py | AkadioInc/firefly | d6c48ff9999ffedcaa294fcd956eb97b90408583 | [
"BSD-2-Clause"
] | null | null | null | setup.py | AkadioInc/firefly | d6c48ff9999ffedcaa294fcd956eb97b90408583 | [
"BSD-2-Clause"
] | null | null | null | setup.py | AkadioInc/firefly | d6c48ff9999ffedcaa294fcd956eb97b90408583 | [
"BSD-2-Clause"
] | null | null | null | from setuptools import setup, find_packages
setup(
name='firefly',
version='0.0.5',
description='Scripts and modules for the FIREfly project',
long_description='To be provided.',
long_description_content_type='text',
url='TBA',
author='Akadio Inc',
author_email='admin@akadio.com',
... | 25.5 | 65 | 0.60084 |
4a9264a3c4801e478aa30d02ad56633a054a8f8e | 1,152 | py | Python | api.py | zlikun/python-proxy-ip-pool | fac087e4abfb85771505fb6eabd5ce9eb434f7d5 | [
"Apache-2.0"
] | 3 | 2018-07-20T12:45:38.000Z | 2019-05-09T04:20:30.000Z | api.py | zlikun/python-proxy-ip-pool | fac087e4abfb85771505fb6eabd5ce9eb434f7d5 | [
"Apache-2.0"
] | null | null | null | api.py | zlikun/python-proxy-ip-pool | fac087e4abfb85771505fb6eabd5ce9eb434f7d5 | [
"Apache-2.0"
] | 2 | 2019-02-02T14:32:42.000Z | 2019-03-08T06:44:26.000Z | # -*- coding: utf-8 -*-
import redis
from flask import Flask, jsonify
import config
from process import DataProcessor
app = Flask(__name__)
dp = DataProcessor()
client = redis.StrictRedis(host=config.redis_host,
port=config.redis_port,
decode_responses=True,
... | 18.285714 | 67 | 0.578125 |
89f7190af160b033cd6a60bffba646b9af3b6804 | 4,897 | py | Python | flexbe_core/flexbe_core/core/event_state.py | Jmz919/flexbe_behavior_engine | bdb85de41fafbfea6e4eb74c271b9cee18be4d8b | [
"BSD-3-Clause"
] | 1 | 2022-03-11T04:56:31.000Z | 2022-03-11T04:56:31.000Z | flexbe_core/flexbe_core/core/event_state.py | FlexBE/flexbe_behavior_engine | 735a3b68dfbe817db9383e53fef63afd6868219d | [
"BSD-3-Clause"
] | null | null | null | flexbe_core/flexbe_core/core/event_state.py | FlexBE/flexbe_behavior_engine | 735a3b68dfbe817db9383e53fef63afd6868219d | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
from flexbe_core.logger import Logger
from flexbe_core.state_logger import StateLogger
from flexbe_core.core.preemptable_state import PreemptableState
from flexbe_core.core.priority_container import PriorityContainer
from flexbe_msgs.msg import CommandFeedback
from std_msgs.msg import Bool, Empty... | 34.730496 | 99 | 0.633449 |
489ca84ac778f45da6f4fe68301b47a277486321 | 30,489 | py | Python | core/sawtooth/cli/stats_client.py | jrineck/sawtooth-core | e3eb79f32c97a25993c87eda7f77a02fd2086c7c | [
"Apache-2.0"
] | null | null | null | core/sawtooth/cli/stats_client.py | jrineck/sawtooth-core | e3eb79f32c97a25993c87eda7f77a02fd2086c7c | [
"Apache-2.0"
] | null | null | null | core/sawtooth/cli/stats_client.py | jrineck/sawtooth-core | e3eb79f32c97a25993c87eda7f77a02fd2086c7c | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | 36.956364 | 80 | 0.585195 |
4b6a98eb9a682d64ba53b329f1482c0068f26b4b | 177 | py | Python | 2. Programming Fundamentals With Python (May 2021)/05. Exercise - Data Types and Variables/01_integer_operations.py | kzborisov/SoftUni | ccb2b8850adc79bfb2652a45124c3ff11183412e | [
"MIT"
] | 1 | 2021-02-07T07:51:12.000Z | 2021-02-07T07:51:12.000Z | 2. Programming Fundamentals With Python (May 2021)/05. Exercise - Data Types and Variables/01_integer_operations.py | kzborisov/softuni | 9c5b45c74fa7d9748e9b3ea65a5ae4e15c142751 | [
"MIT"
] | null | null | null | 2. Programming Fundamentals With Python (May 2021)/05. Exercise - Data Types and Variables/01_integer_operations.py | kzborisov/softuni | 9c5b45c74fa7d9748e9b3ea65a5ae4e15c142751 | [
"MIT"
] | null | null | null | # Task 01. Integer Operations
first = int(input())
second = int(input())
third = int(input())
fourth = int(input())
result = ((first + second) // third) * fourth
print(result)
| 19.666667 | 45 | 0.655367 |
141fd4410fc8885a8e15101fa5abb828b7d0bb18 | 3,037 | py | Python | azure-servicefabric/azure/servicefabric/models/stateful_service_type_description.py | SUSE/azure-sdk-for-python | 324f99d26dd6f4ee9793b9bf1d4d5f928e4b6c2f | [
"MIT"
] | 2 | 2020-07-29T14:22:17.000Z | 2020-11-06T18:47:40.000Z | azure-servicefabric/azure/servicefabric/models/stateful_service_type_description.py | SUSE/azure-sdk-for-python | 324f99d26dd6f4ee9793b9bf1d4d5f928e4b6c2f | [
"MIT"
] | 1 | 2016-08-01T07:37:04.000Z | 2016-08-01T07:37:04.000Z | azure-servicefabric/azure/servicefabric/models/stateful_service_type_description.py | SUSE/azure-sdk-for-python | 324f99d26dd6f4ee9793b9bf1d4d5f928e4b6c2f | [
"MIT"
] | 1 | 2020-12-12T21:04:41.000Z | 2020-12-12T21:04:41.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 ... | 49.786885 | 245 | 0.702667 |
748f13b5ee88241ff423517351f146cd908d63a8 | 253 | py | Python | eval/ds/ds1/partie_c/probleme1.py | icecodder/nsi | eeb08932c1aa11f31bbdaae01361a526c5279527 | [
"MIT"
] | 4 | 2021-09-24T16:19:06.000Z | 2021-10-06T16:21:53.000Z | eval/ds/ds1/partie_c/probleme1.py | icecodder/nsi | eeb08932c1aa11f31bbdaae01361a526c5279527 | [
"MIT"
] | 1 | 2021-10-06T16:25:25.000Z | 2021-11-28T08:11:14.000Z | eval/ds/ds1/partie_c/probleme1.py | icecodder/nsi | eeb08932c1aa11f31bbdaae01361a526c5279527 | [
"MIT"
] | null | null | null | """
Sujet: NSI DS1 - Partie C : Problème 1
Nom: Charrier
Prénom: Max
Date: 7/10/2021
"""
def tiragePhotos(n):
if n < 50:
return 0.2 * n
elif n >= 100 and n < 100:
return 0.15 * n
elif n >= 100:
return 0.1 * n
print(tiragePhotos(10))
| 14.882353 | 38 | 0.588933 |
2fee837fe917d9bc1f8cedc1cd348c0b69e89044 | 20,851 | py | Python | packages/pytea/pytest/benchmarks/transformers/examples/seq2seq/test_seq2seq_examples.py | lego0901/pytea | 8ede650def2e68f4610ba816451d8b9e28f09f76 | [
"MIT"
] | 1 | 2020-11-14T06:08:38.000Z | 2020-11-14T06:08:38.000Z | packages/pytea/pytest/benchmarks/transformers/examples/seq2seq/test_seq2seq_examples.py | lego0901/pytea | 8ede650def2e68f4610ba816451d8b9e28f09f76 | [
"MIT"
] | null | null | null | packages/pytea/pytest/benchmarks/transformers/examples/seq2seq/test_seq2seq_examples.py | lego0901/pytea | 8ede650def2e68f4610ba816451d8b9e28f09f76 | [
"MIT"
] | 1 | 2020-11-16T23:12:50.000Z | 2020-11-16T23:12:50.000Z | import argparse
import logging
import os
import sys
import tempfile
from pathlib import Path
from unittest.mock import patch
import pytest
import pytorch_lightning as pl
import torch
import lightning_base
from convert_pl_checkpoint_to_hf import convert_pl_to_hf
from distillation import distill_main
from finetune impo... | 37.773551 | 118 | 0.646204 |
7de9086bfc4dca142bb0d5c83f797c7d24a24d2c | 1,224 | py | Python | nomadgram/notifications/models.py | HaeSeon0363/instaclone | fd65bb466769175dc607d369e10d01dbd077af06 | [
"MIT"
] | null | null | null | nomadgram/notifications/models.py | HaeSeon0363/instaclone | fd65bb466769175dc607d369e10d01dbd077af06 | [
"MIT"
] | null | null | null | nomadgram/notifications/models.py | HaeSeon0363/instaclone | fd65bb466769175dc607d369e10d01dbd077af06 | [
"MIT"
] | null | null | null | from django.db import models
from django.utils.encoding import python_2_unicode_compatible
from nomadgram.users import models as user_models
from nomadgram.images import models as image_models
class Notification(image_models.TimeStampedModel):
TYPE_CHOICES = (
('like', 'Like'),
('comment', 'Commen... | 29.142857 | 100 | 0.696078 |
82739159fa9261b001680091bf5a1572bf54d1c5 | 3,298 | py | Python | src/emptool/emp_utils.py | Visoar/EMP-FOR-ESP8266 | e045ed711f3c7a4de059bba3b8351ccdaa72eff7 | [
"MIT"
] | 4 | 2018-12-21T14:01:34.000Z | 2018-12-22T08:08:44.000Z | src/emptool/emp_utils.py | Visoar/EMP-FOR-ESP8266 | e045ed711f3c7a4de059bba3b8351ccdaa72eff7 | [
"MIT"
] | 1 | 2018-12-22T04:56:05.000Z | 2018-12-22T05:58:18.000Z | src/emptool/emp_utils.py | Visoar/EMP-FOR-ESP8266 | e045ed711f3c7a4de059bba3b8351ccdaa72eff7 | [
"MIT"
] | 1 | 2018-12-29T17:06:53.000Z | 2018-12-29T17:06:53.000Z | import gc
import os
class _const:
class ConstError(TypeError):
pass
def __setattr__(self, name, value):
if self.__dict__.get(name):
raise self.ConstError("Can't rebind const (%s)" % name)
else:
self.__dict__[name] = value
def is_folder(path):
try:
... | 24.984848 | 75 | 0.576713 |
6b539cbe98866b68a65660f750af25209b36b6ee | 10,723 | py | Python | linemorph.py | reidevries/picmorph | be0ae0cb327b2560bfb57a81f26b2c8049fb4091 | [
"Unlicense"
] | null | null | null | linemorph.py | reidevries/picmorph | be0ae0cb327b2560bfb57a81f26b2c8049fb4091 | [
"Unlicense"
] | null | null | null | linemorph.py | reidevries/picmorph | be0ae0cb327b2560bfb57a81f26b2c8049fb4091 | [
"Unlicense"
] | null | null | null | from PIL import Image, ImageDraw, ImageChops
from scipy.spatial import Delaunay
import numpy as np
import os
import math
import subprocess
import shlex
M_PI = 3.14
reduce_width = 512
reduce_height = 512
def getPixel(image, coord):
i = coord[0]
j = coord[1]
width, height = image.size
pixel = image.getpixel((max(... | 29.458791 | 144 | 0.6556 |
b67700b44bbf74ca214d531938c9d9df1fcd044e | 535 | py | Python | kubernetes/get_wandb_api_key.py | ClashLuke/gpt-neox | 3291d0e6c867d9d328b96e8377f5b77c6f66c323 | [
"MIT"
] | 3 | 2021-02-13T21:51:45.000Z | 2021-02-14T23:15:02.000Z | kubernetes/get_wandb_api_key.py | ClashLuke/gpt-neox | 3291d0e6c867d9d328b96e8377f5b77c6f66c323 | [
"MIT"
] | 13 | 2021-02-08T11:22:38.000Z | 2021-02-18T20:13:10.000Z | kubernetes/get_wandb_api_key.py | ClashLuke/gpt-neox | 3291d0e6c867d9d328b96e8377f5b77c6f66c323 | [
"MIT"
] | 2 | 2021-02-13T22:13:21.000Z | 2021-10-12T06:39:33.000Z | #!/usr/bin/env python
"""
Get Weights and Biases API key
"""
import requests
import os
def get_wandb_api_key():
""" Get Weights and Biases API key from ENV or .netrc file. Otherwise return None """
if 'WANDB_API_KEY' in os.environ:
return os.environ['WANDB_API_KEY']
wandb_token = requests.utils.... | 22.291667 | 89 | 0.678505 |
8fdec65b6686dd49b78df3a2805193f81a366b40 | 19,133 | py | Python | zentral/contrib/santa/views.py | johnmikep/zentral | e321e877b3759bffd8fecdcdad3d9535ea78c579 | [
"Apache-2.0"
] | null | null | null | zentral/contrib/santa/views.py | johnmikep/zentral | e321e877b3759bffd8fecdcdad3d9535ea78c579 | [
"Apache-2.0"
] | null | null | null | zentral/contrib/santa/views.py | johnmikep/zentral | e321e877b3759bffd8fecdcdad3d9535ea78c579 | [
"Apache-2.0"
] | null | null | null | import base64
import json
import logging
from django.core.exceptions import SuspiciousOperation
from django.urls import reverse
from django.contrib.auth.mixins import LoginRequiredMixin
from django.db import transaction
from django.http import Http404, HttpResponseRedirect, JsonResponse
from django.shortcuts import get... | 40.195378 | 113 | 0.644436 |
b258af18b22b3a7c4d3a4c202c4a533f6a3b5803 | 10,503 | py | Python | nailgun/nailgun/test/integration/test_network_models.py | dnikishov/fuel-web | 152c2072cf585fc61d7e157ccf9a7ea1d0377daa | [
"Apache-2.0"
] | null | null | null | nailgun/nailgun/test/integration/test_network_models.py | dnikishov/fuel-web | 152c2072cf585fc61d7e157ccf9a7ea1d0377daa | [
"Apache-2.0"
] | null | null | null | nailgun/nailgun/test/integration/test_network_models.py | dnikishov/fuel-web | 152c2072cf585fc61d7e157ccf9a7ea1d0377daa | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2013 Mirantis, 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 requi... | 39.190299 | 79 | 0.638199 |
a711f095b90ab3b66ee72c8a9401fdb7df3b25c5 | 1,124 | py | Python | setup.py | lucidrains/tf-bind-transformer | 420d9382305d99de8a604a980099b634361d21d0 | [
"MIT"
] | 43 | 2021-12-08T02:20:58.000Z | 2022-03-29T18:18:10.000Z | setup.py | lucidrains/tf-bind-transformer | 420d9382305d99de8a604a980099b634361d21d0 | [
"MIT"
] | null | null | null | setup.py | lucidrains/tf-bind-transformer | 420d9382305d99de8a604a980099b634361d21d0 | [
"MIT"
] | 4 | 2021-12-24T02:10:00.000Z | 2022-01-11T19:49:10.000Z | from setuptools import setup, find_packages
setup(
name = 'tf-bind-transformer',
packages = find_packages(exclude=[]),
version = '0.0.118',
license='MIT',
description = 'Transformer for Transcription Factor Binding',
author = 'Phil Wang',
author_email = 'lucidrains@gmail.com',
url = 'https://github.com... | 25.545455 | 65 | 0.643238 |
a13a9214ce80a0b44a8a9fdb48e545575be22846 | 26,193 | py | Python | pyscf/dft/xcfun.py | 1QB-Information-Technologies/pyscf | 8730b90439ca68106dca54d22c0d61e7422e557f | [
"BSD-2-Clause"
] | null | null | null | pyscf/dft/xcfun.py | 1QB-Information-Technologies/pyscf | 8730b90439ca68106dca54d22c0d61e7422e557f | [
"BSD-2-Clause"
] | null | null | null | pyscf/dft/xcfun.py | 1QB-Information-Technologies/pyscf | 8730b90439ca68106dca54d22c0d61e7422e557f | [
"BSD-2-Clause"
] | 1 | 2018-12-06T03:10:50.000Z | 2018-12-06T03:10:50.000Z | #!/usr/bin/env python
#
# Author: Qiming Sun <osirpt.sun@gmail.com>
#
'''
XC functional, the interface to xcfun (https://github.com/dftlibs/xcfun)
U. Ekstrom et al, J. Chem. Theory Comput., 6, 1971
'''
import copy
import ctypes
import math
import numpy
from pyscf import lib
_itrf = lib.load_library('libxcfun_itrf')
... | 31.182143 | 140 | 0.597221 |
fa870e5c9ad5f65e7bb5bfb556cdafda53687457 | 13,395 | py | Python | qiskit/algorithms/optimizers/aqgd.py | gadial/qiskit-terra | 0fc83f44a6e80969875c738b2cee7bc33223e45f | [
"Apache-2.0"
] | 1 | 2021-10-05T11:56:53.000Z | 2021-10-05T11:56:53.000Z | qiskit/algorithms/optimizers/aqgd.py | gadial/qiskit-terra | 0fc83f44a6e80969875c738b2cee7bc33223e45f | [
"Apache-2.0"
] | 24 | 2021-01-27T08:20:27.000Z | 2021-07-06T09:42:28.000Z | qiskit/algorithms/optimizers/aqgd.py | gadial/qiskit-terra | 0fc83f44a6e80969875c738b2cee7bc33223e45f | [
"Apache-2.0"
] | 4 | 2021-10-05T12:07:27.000Z | 2022-01-28T18:37:28.000Z | # This code is part of Qiskit.
#
# (C) Copyright IBM 2019, 2021.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivat... | 40.468278 | 100 | 0.617096 |
6559d35fe7c8cba23463979d48e8ff09c8d71274 | 1,380 | py | Python | main.py | jalaj-07/marx | 92191e844a09bff8c7adfb6bea1f5130ec2b4841 | [
"MIT"
] | 1 | 2022-02-07T10:52:02.000Z | 2022-02-07T10:52:02.000Z | main.py | jalaj-07/marx | 92191e844a09bff8c7adfb6bea1f5130ec2b4841 | [
"MIT"
] | null | null | null | main.py | jalaj-07/marx | 92191e844a09bff8c7adfb6bea1f5130ec2b4841 | [
"MIT"
] | null | null | null | from typing import Dict
import flask
import json
from bson.objectid import ObjectId
from pymongo import MongoClient
client = MongoClient("localhost", 27017)
db = client['marx']
notes = db['notes']
app = flask.Flask(__name__, static_folder="./build", static_url_path="/web")
def _convert_obj_id(lst):
for i in range... | 26.538462 | 76 | 0.634058 |
f704311c1696242df8f2316227f5b99a2b3d08b4 | 506 | py | Python | Week1/Lecture2/Fexes/l2f1.py | MorbidValkyria/MIT6.0001x | 3c80ffd50871387f560c2e820ad1fa05c61d9132 | [
"MIT"
] | null | null | null | Week1/Lecture2/Fexes/l2f1.py | MorbidValkyria/MIT6.0001x | 3c80ffd50871387f560c2e820ad1fa05c61d9132 | [
"MIT"
] | null | null | null | Week1/Lecture2/Fexes/l2f1.py | MorbidValkyria/MIT6.0001x | 3c80ffd50871387f560c2e820ad1fa05c61d9132 | [
"MIT"
] | null | null | null | """
1) "a" + "bc" -> abc
2) 3 * "bc" -> bcbcbc
3) "3" * "bc" -> error as we can't use the * operator on two strings
4) abcd"[2] -> c (Just takes the character at index 2 in the string. a has index 0 and b index 1)
5) "abcd"[0:2] -> ab (Returns the substring from index 0 all the way to index n -1 in this case b)
6)... | 31.625 | 98 | 0.626482 |
fc0934a20ac4500a2962f86dbed63c737f72823c | 2,326 | py | Python | pyabsa/core/apc/classic/__bert__/models/aoa_bert.py | brightgems/PyABSA | f51d18da12f12759cfc972369736e46232627d4d | [
"MIT"
] | null | null | null | pyabsa/core/apc/classic/__bert__/models/aoa_bert.py | brightgems/PyABSA | f51d18da12f12759cfc972369736e46232627d4d | [
"MIT"
] | null | null | null | pyabsa/core/apc/classic/__bert__/models/aoa_bert.py | brightgems/PyABSA | f51d18da12f12759cfc972369736e46232627d4d | [
"MIT"
] | 1 | 2022-03-01T08:35:37.000Z | 2022-03-01T08:35:37.000Z | # -*- coding: utf-8 -*-
# file: aoa.py
# author: gene_zc <gene_zhangchen@163.com>
# Copyright (C) 2018. All Rights Reserved.
import torch
import torch.nn as nn
import torch.nn.functional as F
from ..layers.dynamic_rnn import DynamicLSTM
class AOA_BERT(nn.Module):
inputs = ['text_bert_indices', 'aspect_indices',... | 54.093023 | 152 | 0.679278 |
15b55ab0bfe68a444fc825fe27f989d9dc96ad17 | 426 | py | Python | inventory/urls.py | CNicox/inventory | 6a85e3155a7215182f892bbc712f49f85db5d8f8 | [
"Unlicense"
] | 1 | 2022-01-11T13:51:35.000Z | 2022-01-11T13:51:35.000Z | inventory/urls.py | CNicox/inventory | 6a85e3155a7215182f892bbc712f49f85db5d8f8 | [
"Unlicense"
] | null | null | null | inventory/urls.py | CNicox/inventory | 6a85e3155a7215182f892bbc712f49f85db5d8f8 | [
"Unlicense"
] | null | null | null | from django.urls import path
from . import views
app_name = "inventory"
urlpatterns = [
path('index/', views.IndexView.as_view(), name="index"),
path('registration/', views.RegistrationView.as_view(), name='registration'),
path('change-password/', views.ChangePasswordView.as_view(), name='change-password')... | 38.727273 | 89 | 0.694836 |
f95e1b7a7a76be5b87a819d24518fa641a926f28 | 649 | py | Python | vendor/github.com/DataDog/datadog-agent/pkg/collector/py/tests/kwargs_init_signature.py | dragon3/datadog-trace-agent | 5e69c6a432f0a9f50d4a95112e8d9861dd91243f | [
"BSD-3-Clause"
] | null | null | null | vendor/github.com/DataDog/datadog-agent/pkg/collector/py/tests/kwargs_init_signature.py | dragon3/datadog-trace-agent | 5e69c6a432f0a9f50d4a95112e8d9861dd91243f | [
"BSD-3-Clause"
] | null | null | null | vendor/github.com/DataDog/datadog-agent/pkg/collector/py/tests/kwargs_init_signature.py | dragon3/datadog-trace-agent | 5e69c6a432f0a9f50d4a95112e8d9861dd91243f | [
"BSD-3-Clause"
] | null | null | null | # Unless explicitly stated otherwise all files in this repository are licensed
# under the Apache License Version 2.0.
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2017 Datadog, Inc.
from checks import AgentCheck
from common import assert_init_config_init, assert_agen... | 32.45 | 90 | 0.747304 |
b92be6de29f005417a8ca8424dcff728d6bc353d | 1,655 | py | Python | Code/hime_main.py | dcsozturk/hime | 07c056e48258d8e3de7c99cde9a9b1c8d073285e | [
"Apache-2.0"
] | 3 | 2020-09-02T05:21:01.000Z | 2021-03-19T06:28:18.000Z | Code/hime_main.py | dcsozturk/hime | 07c056e48258d8e3de7c99cde9a9b1c8d073285e | [
"Apache-2.0"
] | null | null | null | Code/hime_main.py | dcsozturk/hime | 07c056e48258d8e3de7c99cde9a9b1c8d073285e | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Author: Dogacan S. Ozturk
# Import default Python libraries.
import os
import sys
from glob import glob
import tables
import numpy as np
import datetime as dt
import matplotlib
import matplotlib.pyplot as plt
from matplotlib.colors import LinearSegmentedColormap
import matplotlib.dates as mdat... | 33.77551 | 232 | 0.812085 |
550aa19a5edd30baafd7edc92de0e668a4795f15 | 8,498 | py | Python | official/recommendation/ncf_test.py | Wu-Zhe/maskgan-local | 446688d9317fea0a5cbb4bd8b1cf227df6679dc7 | [
"Apache-2.0"
] | 4 | 2018-09-18T11:27:22.000Z | 2019-10-02T01:15:46.000Z | official/recommendation/ncf_test.py | Wu-Zhe/maskgan-local | 446688d9317fea0a5cbb4bd8b1cf227df6679dc7 | [
"Apache-2.0"
] | null | null | null | official/recommendation/ncf_test.py | Wu-Zhe/maskgan-local | 446688d9317fea0a5cbb4bd8b1cf227df6679dc7 | [
"Apache-2.0"
] | 4 | 2019-03-12T09:41:01.000Z | 2019-10-01T22:49:21.000Z | # 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... | 38.627273 | 80 | 0.63662 |
942e1960d84d97a50cfcfe8a0e311f47f1018ca9 | 4,081 | py | Python | pygs/test/unit_test/test_pypayload.py | graphserver/graphserver | 1fdce42a747df35a54ed4fa364837fb73710c226 | [
"BSD-3-Clause-Clear"
] | 58 | 2015-01-28T01:06:36.000Z | 2022-03-11T08:25:49.000Z | pygs/test/unit_test/test_pypayload.py | wlach/graphserver | 52dac7487673aa5f28bfe2342dbe93ce03880f7a | [
"BSD-3-Clause-Clear"
] | 1 | 2018-05-18T10:49:09.000Z | 2018-05-18T10:49:09.000Z | pygs/test/unit_test/test_pypayload.py | wlach/graphserver | 52dac7487673aa5f28bfe2342dbe93ce03880f7a | [
"BSD-3-Clause-Clear"
] | 12 | 2015-03-01T12:23:33.000Z | 2020-09-10T13:59:53.000Z | from graphserver.core import *
import unittest
import StringIO
import sys
class TestPyPayload(unittest.TestCase):
def _minimal_graph(self):
g = Graph()
g.add_vertex( "Seattle" )
g.add_vertex( "Portland" )
return g
def test_basic(self):
p = NoOpPyPayload(1.1... | 32.388889 | 103 | 0.557461 |
1b2431d5ef27a6b50153f3071f6f92d2f27f642e | 6,013 | py | Python | quran/usecase/ayah/find_ayah.py | octabytes/quran | 974d351cf5e6a12a28a5ac9f29c8d2753ae6dd86 | [
"Apache-2.0"
] | null | null | null | quran/usecase/ayah/find_ayah.py | octabytes/quran | 974d351cf5e6a12a28a5ac9f29c8d2753ae6dd86 | [
"Apache-2.0"
] | null | null | null | quran/usecase/ayah/find_ayah.py | octabytes/quran | 974d351cf5e6a12a28a5ac9f29c8d2753ae6dd86 | [
"Apache-2.0"
] | null | null | null | from quran.repository.repo_responses import AyahResponse
from quran.utils.response import Response
class FindAyah:
def __init__(self, ayah_repo, find_translation, find_surah, find_edition, find_audio, find_image):
self.ayah_repo = ayah_repo
self.find_translation = find_translation
self.fi... | 48.491935 | 105 | 0.685515 |
194c02d96b499d398d0de7f0a574cc6a02a85d87 | 1,031 | py | Python | alipay/aop/api/response/AlipayDataAiserviceSgxGatewayQueryResponse.py | articuly/alipay-sdk-python-all | 0259cd28eca0f219b97dac7f41c2458441d5e7a6 | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/response/AlipayDataAiserviceSgxGatewayQueryResponse.py | articuly/alipay-sdk-python-all | 0259cd28eca0f219b97dac7f41c2458441d5e7a6 | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/response/AlipayDataAiserviceSgxGatewayQueryResponse.py | articuly/alipay-sdk-python-all | 0259cd28eca0f219b97dac7f41c2458441d5e7a6 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import simplejson as json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
class AlipayDataAiserviceSgxGatewayQueryResponse(AlipayResponse):
def __init__(self):
super(AlipayDataAiserviceSgxGatewayQueryResponse, self).__init__()
self.... | 28.638889 | 115 | 0.696411 |
2b49b2087b5cd1a0e60cff7e75a70dfd649f257a | 1,942 | py | Python | src/toil/batchSystems/__init__.py | YeoLab/toil | 9837c396b946bc4a0cf97e7c2705e5892b88707b | [
"Apache-2.0"
] | null | null | null | src/toil/batchSystems/__init__.py | YeoLab/toil | 9837c396b946bc4a0cf97e7c2705e5892b88707b | [
"Apache-2.0"
] | 1 | 2017-07-31T23:47:25.000Z | 2017-07-31T23:47:25.000Z | src/toil/batchSystems/__init__.py | lexentbio/toil | 6ad3813af4450962d0899aa6c821189f86472ef9 | [
"Apache-2.0"
] | 1 | 2020-09-17T17:49:32.000Z | 2020-09-17T17:49:32.000Z | # Copyright (C) 2015-2016 Regents of the University of California
#
# 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... | 34.070175 | 117 | 0.591658 |
f7640dd716bbc4e0653c1ad225bfb12ccc97959f | 1,933 | py | Python | tests/textunits/test_bosyl.py | Esukhia/botok | 9009581cc290c800e7d93a405969e10a7c9d2f51 | [
"Apache-2.0"
] | 17 | 2019-10-19T15:29:52.000Z | 2022-03-01T19:43:15.000Z | tests/textunits/test_bosyl.py | drupchen/pybo | eac38e7c574e2e99a4f43ca641782d8616bb684d | [
"Apache-2.0"
] | 29 | 2019-09-01T21:33:15.000Z | 2022-01-11T08:57:50.000Z | tests/textunits/test_bosyl.py | Esukhia/botok | 9009581cc290c800e7d93a405969e10a7c9d2f51 | [
"Apache-2.0"
] | 8 | 2020-01-14T17:45:11.000Z | 2022-03-28T09:31:35.000Z | # coding: utf8
from botok import BoSyl
bs = BoSyl()
def test_bosyl():
# is_affixable() Vs. SylComponents.is_thame()
assert bs.is_thame("ཀུན") is False and bs.is_affixable("ཀུན") is False
assert bs.is_thame("དེའིའམ") is True and bs.is_affixable("དེའིའམ") is False
assert bs.is_thame("དེའི") is True and... | 41.12766 | 79 | 0.457838 |
162d9e96ee831393864e3bac624b027dda45ed50 | 3,712 | py | Python | e2e/Tests/RPC/Personal/PersonalDataTest.py | kayabaNerve/Currency | 260ebc20f1704f42ad6183fee39ad58ec6d07961 | [
"CC0-1.0"
] | 66 | 2019-01-14T08:39:52.000Z | 2022-01-06T11:39:15.000Z | e2e/Tests/RPC/Personal/PersonalDataTest.py | kayabaNerve/Currency | 260ebc20f1704f42ad6183fee39ad58ec6d07961 | [
"CC0-1.0"
] | 228 | 2019-01-16T15:42:44.000Z | 2022-02-05T07:48:07.000Z | e2e/Tests/RPC/Personal/PersonalDataTest.py | kayabaNerve/Currency | 260ebc20f1704f42ad6183fee39ad58ec6d07961 | [
"CC0-1.0"
] | 19 | 2019-01-14T08:53:04.000Z | 2021-11-03T20:19:28.000Z | from time import sleep
from typing import Dict, Any
from e2e.Meros.Meros import Meros
from e2e.Meros.RPC import RPC
from e2e.Tests.Errors import TestError
from e2e.Tests.RPC.Personal.Lib import decodeAddress
def checkData(
rpc: RPC,
dataHash: str,
expected: bytes
) -> str:
data: Dict[str, Any] = rpc.call("t... | 35.018868 | 117 | 0.656789 |
839342928073c27e67d5e3d25c523461f9cc3049 | 1,732 | py | Python | src/settings.py | gabrwagn/signerupper | 34072f2db8bbb87ce1d581cda140f15c35b52827 | [
"MIT"
] | 1 | 2021-11-10T00:10:37.000Z | 2021-11-10T00:10:37.000Z | src/settings.py | gabrwagn/signerupper | 34072f2db8bbb87ce1d581cda140f15c35b52827 | [
"MIT"
] | null | null | null | src/settings.py | gabrwagn/signerupper | 34072f2db8bbb87ce1d581cda140f15c35b52827 | [
"MIT"
] | null | null | null | # Formats
TIME_FORMAT = '%H:%M'
DATE_FORMAT = '%Y-%m-%d'
DATE_TIME_FORMAT = f'{DATE_FORMAT} {TIME_FORMAT}'
PARTICIPANT_MAX_NAME_LENGTH = 11
# Announcement
ANNOUNCEMENT_CHANNEL_NAME = "Announcements"
class MESSAGE:
NEW_EVENT = "New raid event: {} at {} {}, go sign up now in {}!"
REMINDER = "Hey! Dont for get ... | 21.121951 | 81 | 0.561778 |
8be2ee55222f31e0aded677bc2e0a4893118146b | 3,103 | py | Python | mapping/enable/geojson_overlay.py | nmichaud/enable-mapping | 421aae6c3c700406df0f2438cec190daf5074084 | [
"BSD-3-Clause"
] | 1 | 2019-04-22T16:36:06.000Z | 2019-04-22T16:36:06.000Z | mapping/enable/geojson_overlay.py | pombreda/enable-mapping | 421aae6c3c700406df0f2438cec190daf5074084 | [
"BSD-3-Clause"
] | null | null | null | mapping/enable/geojson_overlay.py | pombreda/enable-mapping | 421aae6c3c700406df0f2438cec190daf5074084 | [
"BSD-3-Clause"
] | 2 | 2015-04-14T10:06:03.000Z | 2020-10-03T03:56:47.000Z |
import geojson
import numpy as np
# Enthought library imports
from traits.api import Str, List, Instance, Array, on_trait_change
from chaco.api import AbstractOverlay
from enable.compiled_path import CompiledPath
from kiva.constants import STROKE, FILL_STROKE
class GeoJSONOverlay(AbstractOverlay):
geojs_filenam... | 31.663265 | 83 | 0.588463 |
3012e11e4e487556925210e8d7ecb657f3941127 | 971 | py | Python | thetacontroller/ptpcam_example.py | daniego/rover-thetacontroller | 043df9966f3313dcdde2e70091460fafe904af23 | [
"Apache-2.0"
] | null | null | null | thetacontroller/ptpcam_example.py | daniego/rover-thetacontroller | 043df9966f3313dcdde2e70091460fafe904af23 | [
"Apache-2.0"
] | null | null | null | thetacontroller/ptpcam_example.py | daniego/rover-thetacontroller | 043df9966f3313dcdde2e70091460fafe904af23 | [
"Apache-2.0"
] | null | null | null | import subprocess
## example of taking a picture
def takePicture():
subprocess.call("ptpcam -c", shell=True)
takePicture()
# example of grabbing device info and using it in your python program.
ptpinfo = subprocess.Popen(["ptpcam", "--info"], stdout=subprocess.PIPE)
# although this simply prints to stdout, you c... | 28.558824 | 72 | 0.722966 |
cc3245c70c25aa583f637fa8c48e6806946320bb | 1,875 | py | Python | languages/python/algorithm_scrmable.py | RohitAthithya/learntosolveit | fe1df98534d3af2fb3ba87c6540d9d8fa883c244 | [
"BSD-3-Clause"
] | 136 | 2015-03-06T18:11:21.000Z | 2022-03-10T22:31:40.000Z | languages/python/algorithm_scrmable.py | RohitAthithya/learntosolveit | fe1df98534d3af2fb3ba87c6540d9d8fa883c244 | [
"BSD-3-Clause"
] | 27 | 2015-01-07T01:38:03.000Z | 2021-12-22T19:20:15.000Z | languages/python/algorithm_scrmable.py | RohitAthithya/learntosolveit | fe1df98534d3af2fb3ba87c6540d9d8fa883c244 | [
"BSD-3-Clause"
] | 1,582 | 2015-01-01T20:37:06.000Z | 2022-03-30T12:29:24.000Z | #!/usr/bin/env python
# Cphryigot: O.R.Senthil Kumaran <orsenthil@gmail.com>
#
# Inrpeisd from jwz scrmable: http://www.jwz.org/hacks/scrmable.pl
#
# Tihs pgrarom is fere sortfwae; you can rrtiestiubde it ad/onr mdfioy
# it udenr the tmers of the GNU Graneel Pbuilc Liscene as phlibsued by
# the Fere Sfwartoe Fanouiodtn... | 28.409091 | 76 | 0.637333 |
d5d84d8398f22729d6f762f1cb9b9ab8050692ac | 145 | py | Python | ex003.py | LeoWshington/Exercicios_CursoEmVideo_Python | 294d14d9aaab5e32aaf39d70b0cd1266f0b55a02 | [
"MIT"
] | null | null | null | ex003.py | LeoWshington/Exercicios_CursoEmVideo_Python | 294d14d9aaab5e32aaf39d70b0cd1266f0b55a02 | [
"MIT"
] | null | null | null | ex003.py | LeoWshington/Exercicios_CursoEmVideo_Python | 294d14d9aaab5e32aaf39d70b0cd1266f0b55a02 | [
"MIT"
] | null | null | null | n1 = float(input('Digite um número: '))
n2 = float(input('Digiete outro número: '))
print(f'A soma entre {n1:.0f} e {n2:.0f} é {n1 + n2 :.0f}.')
| 36.25 | 60 | 0.606897 |
de68b780c59418e92c9ba2df56c4b93e94143723 | 281 | py | Python | tests/artificial/transf_RelativeDifference/trend_MovingMedian/cycle_5/ar_12/test_artificial_32_RelativeDifference_MovingMedian_5_12_20.py | jmabry/pyaf | afbc15a851a2445a7824bf255af612dc429265af | [
"BSD-3-Clause"
] | null | null | null | tests/artificial/transf_RelativeDifference/trend_MovingMedian/cycle_5/ar_12/test_artificial_32_RelativeDifference_MovingMedian_5_12_20.py | jmabry/pyaf | afbc15a851a2445a7824bf255af612dc429265af | [
"BSD-3-Clause"
] | 1 | 2019-11-30T23:39:38.000Z | 2019-12-01T04:34:35.000Z | tests/artificial/transf_RelativeDifference/trend_MovingMedian/cycle_5/ar_12/test_artificial_32_RelativeDifference_MovingMedian_5_12_20.py | jmabry/pyaf | afbc15a851a2445a7824bf255af612dc429265af | [
"BSD-3-Clause"
] | null | null | null | import pyaf.Bench.TS_datasets as tsds
import pyaf.tests.artificial.process_artificial_dataset as art
art.process_dataset(N = 32 , FREQ = 'D', seed = 0, trendtype = "MovingMedian", cycle_length = 5, transform = "RelativeDifference", sigma = 0.0, exog_count = 20, ar_order = 12); | 40.142857 | 176 | 0.743772 |
8f1304dee60ad2c28f64c5e77852b48a999211f9 | 3,489 | py | Python | handDetector.py | ryanyen2/CS4187-Final-Report-VirtualPiano | 7f1f2e3afbc6e2db3b41c851d29ce3648277fec7 | [
"MIT"
] | null | null | null | handDetector.py | ryanyen2/CS4187-Final-Report-VirtualPiano | 7f1f2e3afbc6e2db3b41c851d29ce3648277fec7 | [
"MIT"
] | null | null | null | handDetector.py | ryanyen2/CS4187-Final-Report-VirtualPiano | 7f1f2e3afbc6e2db3b41c851d29ce3648277fec7 | [
"MIT"
] | null | null | null | import cv2
import mediapipe as mp
import math
class HandDetector:
def __init__(self, mode=False, maxHands=2, detectionCon=0.5, minTrackCon=0.5):
self.mode = mode
self.maxHands = maxHands
self.detectionCon = detectionCon
self.minTrackCon = minTrackCon
self.mpHands = mp.solu... | 39.647727 | 127 | 0.472342 |
6476f7ec856777272cce560374a37f91e7658674 | 2,897 | py | Python | treedb/raw/models.py | glottolog/treedb | 4aa735632d6add5c81cc1d7be42833446e2a447a | [
"MIT"
] | 4 | 2019-07-13T14:39:01.000Z | 2021-04-17T13:38:47.000Z | treedb/raw/models.py | glottolog/treedb | 4aa735632d6add5c81cc1d7be42833446e2a447a | [
"MIT"
] | 1 | 2020-12-02T12:02:47.000Z | 2020-12-02T15:05:25.000Z | treedb/raw/models.py | glottolog/treedb | 4aa735632d6add5c81cc1d7be42833446e2a447a | [
"MIT"
] | 2 | 2020-04-11T19:46:48.000Z | 2020-04-13T19:40:24.000Z | """Raw tables schema."""
import sqlalchemy as sa
from sqlalchemy import (Column, Integer, String, Text, Boolean,
ForeignKey, CheckConstraint, UniqueConstraint)
from .._globals import REGISTRY as registry
__all__ = ['File', 'Option', 'Value']
PREFIX = '_'
@registry.mapped
class File:
"... | 34.903614 | 92 | 0.63583 |
772667b6b50578328331e03863723c31cade5e47 | 1,350 | py | Python | tests/components/nut/util.py | erogleva/core | 994ae09f69afe772150a698953c0d7386a745de2 | [
"Apache-2.0"
] | 6 | 2016-11-25T06:36:27.000Z | 2021-11-16T11:20:23.000Z | tests/components/nut/util.py | erogleva/core | 994ae09f69afe772150a698953c0d7386a745de2 | [
"Apache-2.0"
] | 56 | 2020-08-03T07:30:54.000Z | 2022-03-31T06:02:04.000Z | tests/components/nut/util.py | erogleva/core | 994ae09f69afe772150a698953c0d7386a745de2 | [
"Apache-2.0"
] | 2 | 2021-07-14T20:22:04.000Z | 2021-09-22T08:56:16.000Z | """Tests for the nut integration."""
import json
from homeassistant.components.nut.const import DOMAIN
from homeassistant.const import CONF_HOST, CONF_PORT, CONF_RESOURCES
from homeassistant.core import HomeAssistant
from tests.async_mock import MagicMock, patch
from tests.common import MockConfigEntry, load_fixture... | 30.681818 | 87 | 0.73037 |
87eca60c100e6d585e10898064cd1514b5bf2f0e | 1,343 | py | Python | CsvCodeGen.py | f3wwrvf4/CsvCodeGen | 5acc5ceafce801a12d9b017aea93d69252953f24 | [
"MIT"
] | null | null | null | CsvCodeGen.py | f3wwrvf4/CsvCodeGen | 5acc5ceafce801a12d9b017aea93d69252953f24 | [
"MIT"
] | null | null | null | CsvCodeGen.py | f3wwrvf4/CsvCodeGen | 5acc5ceafce801a12d9b017aea93d69252953f24 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# CsvCodeGen.py
import pandas as pd
import os
import sys
from jinja2 import Template, Environment, FileSystemLoader
def Parse(header, line):
tpl_root = 'TemplateFiles'
data = dict(zip(header, line))
tpl = line[0]
tpl_path = os.path.join(tpl_root, tpl)
env = Environment(l... | 21.66129 | 58 | 0.516754 |
4a8f405ea868c18ee873802cfa153558d1d0b3fe | 546 | py | Python | server/noteapp/player/__init__.py | torniken/easynotes | be0654d1857e1975b3adb5928103be1b3b1ad7a0 | [
"MIT"
] | null | null | null | server/noteapp/player/__init__.py | torniken/easynotes | be0654d1857e1975b3adb5928103be1b3b1ad7a0 | [
"MIT"
] | 4 | 2021-03-09T10:04:58.000Z | 2022-02-18T03:40:05.000Z | server/noteapp/player/__init__.py | torniken/easynotes | be0654d1857e1975b3adb5928103be1b3b1ad7a0 | [
"MIT"
] | null | null | null | from flask import Blueprint, request, Response
import requests
player = Blueprint('player', __name__)
def generate_data_from_response(resp, chunk=2048):
for data_chunk in resp.iter_content(chunk_size=chunk):
yield data_chunk
@player.route('/play')
def play_youtube():
id = request.args.get('id', Non... | 28.736842 | 79 | 0.703297 |
e617225a2fa8e28139e906c8ad70959a8c1541bb | 16,190 | py | Python | daal4py/sklearn/neighbors/_base.py | KalyanovD/daal4py | 7b75aa795863415a1ae35e24ac4357ab7b6e2faa | [
"Apache-2.0"
] | null | null | null | daal4py/sklearn/neighbors/_base.py | KalyanovD/daal4py | 7b75aa795863415a1ae35e24ac4357ab7b6e2faa | [
"Apache-2.0"
] | null | null | null | daal4py/sklearn/neighbors/_base.py | KalyanovD/daal4py | 7b75aa795863415a1ae35e24ac4357ab7b6e2faa | [
"Apache-2.0"
] | null | null | null | #===============================================================================
# Copyright 2020-2021 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apa... | 36.628959 | 89 | 0.605435 |
fde5726f8d1251849648d860293f2cefe9f2f027 | 10,515 | py | Python | parsley/tests/tests.py | Tivix/Django-parsley | dbe1ab8b6c58168c5ae267241f0c849c9eae631b | [
"BSD-3-Clause"
] | 2 | 2015-06-02T22:49:52.000Z | 2016-09-28T23:08:09.000Z | parsley/tests/tests.py | Tivix/Django-parsley | dbe1ab8b6c58168c5ae267241f0c849c9eae631b | [
"BSD-3-Clause"
] | null | null | null | parsley/tests/tests.py | Tivix/Django-parsley | dbe1ab8b6c58168c5ae267241f0c849c9eae631b | [
"BSD-3-Clause"
] | null | null | null | import re
import six
from django import forms
from django.contrib import admin
from django.test import TestCase
from django.utils.translation import ugettext_lazy as _
from parsley.decorators import parsleyfy
from .forms import (TextForm, TextForm2, FieldTypeForm, ExtraDataForm,
ExtraDataMissingFieldForm, Fo... | 35.765306 | 106 | 0.623585 |
887b2139291e8c2dcff729503edb3683c29e043a | 2,761 | py | Python | tests/snapshots/snap_test_holidata/test_holidata_produces_holidays_for_locale_and_year[sk_SK-2016] 1.py | gour/holidata | 89c7323f9c5345a3ecbf5cd5a835b0e08cfebc13 | [
"MIT"
] | 32 | 2019-04-12T08:01:34.000Z | 2022-02-28T04:41:50.000Z | tests/snapshots/snap_test_holidata/test_holidata_produces_holidays_for_locale_and_year[sk_SK-2016] 1.py | gour/holidata | 89c7323f9c5345a3ecbf5cd5a835b0e08cfebc13 | [
"MIT"
] | 74 | 2019-07-09T16:35:20.000Z | 2022-03-09T16:41:34.000Z | tests/snapshots/snap_test_holidata/test_holidata_produces_holidays_for_locale_and_year[sk_SK-2016] 1.py | gour/holidata | 89c7323f9c5345a3ecbf5cd5a835b0e08cfebc13 | [
"MIT"
] | 20 | 2019-01-28T07:41:02.000Z | 2022-02-16T02:38:57.000Z | [
{
'date': '2016-01-01',
'description': 'Deň vzniku Slovenskej republiky',
'locale': 'sk-SK',
'notes': '',
'region': '',
'type': 'NF'
},
{
'date': '2016-01-06',
'description': 'Zjavenie Pána / Traja králi',
'locale': 'sk-SK',
'... | 22.631148 | 58 | 0.383194 |
1dafa06ee04079fada7a42be81e5d5c1ca7031b4 | 3,224 | py | Python | scripts/examples/OpenMV/22-Optical-Flow/absolute-rotation-scale.py | jiskra/openmv | a0f321836f77f94d8118910598dcdb79eb784d58 | [
"MIT"
] | 1,761 | 2015-07-10T23:14:17.000Z | 2022-03-30T07:49:49.000Z | scripts/examples/OpenMV/22-Optical-Flow/absolute-rotation-scale.py | jiskra/openmv | a0f321836f77f94d8118910598dcdb79eb784d58 | [
"MIT"
] | 487 | 2015-07-07T23:21:20.000Z | 2022-03-30T17:13:22.000Z | scripts/examples/OpenMV/22-Optical-Flow/absolute-rotation-scale.py | jiskra/openmv | a0f321836f77f94d8118910598dcdb79eb784d58 | [
"MIT"
] | 882 | 2015-08-01T08:34:19.000Z | 2022-03-30T07:36:23.000Z | # Absolute Optical Flow Rotation/Scale
#
# This example shows off using your OpenMV Cam to measure
# rotation/scale by comparing the current and a previous
# image against each other. Note that only rotation/scale is
# handled - not X and Y translation in this mode.
# To run this demo effectively please mount your Ope... | 47.411765 | 97 | 0.71495 |
19a05eefbc8fa633dd497383f55e26bfe6b00a2a | 311 | py | Python | exercicios/Exercicios Diversos/ex027.py | Roberto-Sartore/Python | 98f91f13cf78d761893c4a1f3264ed999244d32b | [
"MIT"
] | null | null | null | exercicios/Exercicios Diversos/ex027.py | Roberto-Sartore/Python | 98f91f13cf78d761893c4a1f3264ed999244d32b | [
"MIT"
] | null | null | null | exercicios/Exercicios Diversos/ex027.py | Roberto-Sartore/Python | 98f91f13cf78d761893c4a1f3264ed999244d32b | [
"MIT"
] | null | null | null | """Faça um Programa que leia três números e mostre-os em ordem decrescente."""
n1 = int(input('Digite o 1º número: '))
n2 = int(input('Digite o 2º número: '))
n3 = int(input('Digite o 3º número: '))
lista = [n1, n2, n3]
lista.sort(reverse=True)
print(f'Os números digitado em ordem descrescente são {lista}.')
| 34.555556 | 78 | 0.691318 |
f897d65e559b5ac483688db183b5ae473323ca51 | 1,307 | py | Python | src/test/parser/template/graph_tests/test_authorise_passthrough.py | narnikgamarnikus/program-y | 777b9a8a75ec787c037de9f11a8527875ff450b1 | [
"MIT"
] | null | null | null | src/test/parser/template/graph_tests/test_authorise_passthrough.py | narnikgamarnikus/program-y | 777b9a8a75ec787c037de9f11a8527875ff450b1 | [
"MIT"
] | null | null | null | src/test/parser/template/graph_tests/test_authorise_passthrough.py | narnikgamarnikus/program-y | 777b9a8a75ec787c037de9f11a8527875ff450b1 | [
"MIT"
] | null | null | null | import xml.etree.ElementTree as ET
from programy.parser.exceptions import ParserException
from programy.parser.template.nodes.base import TemplateNode
from programy.parser.template.nodes.authorise import TemplateAuthoriseNode
from programy.config.sections.brain.brain import BrainConfiguration
from test.parser.templat... | 31.878049 | 86 | 0.738332 |
74a21dd90e9955f5c724d88c92867c87ae9fff32 | 4,021 | py | Python | perfkitbenchmarker/linux_benchmarks/openssl_speed_benchmark.py | Nowasky/PerfKitBenchmarker | cfa88e269eb373780910896ed4bdc8db09469753 | [
"Apache-2.0"
] | 3 | 2018-04-28T13:06:14.000Z | 2020-06-09T02:39:44.000Z | perfkitbenchmarker/linux_benchmarks/openssl_speed_benchmark.py | Nowasky/PerfKitBenchmarker | cfa88e269eb373780910896ed4bdc8db09469753 | [
"Apache-2.0"
] | 1 | 2018-03-15T21:01:27.000Z | 2018-03-15T21:01:27.000Z | perfkitbenchmarker/linux_benchmarks/openssl_speed_benchmark.py | Nowasky/PerfKitBenchmarker | cfa88e269eb373780910896ed4bdc8db09469753 | [
"Apache-2.0"
] | 6 | 2019-06-11T18:59:57.000Z | 2021-03-02T19:14:42.000Z | # Copyright 2021 PerfKitBenchmarker 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 appli... | 34.367521 | 80 | 0.716737 |
edddd2446d906bfc0b93df47b6f18a45ac42bc79 | 3,026 | py | Python | imaginaire/third_party/flow_net/flownet2/networks/flownet_fusion.py | hw07216/imaginaire | 87c774114622e39488a5ea8a7728b1a20896afb9 | [
"RSA-MD"
] | 3,308 | 2020-07-15T17:50:13.000Z | 2022-03-31T14:53:31.000Z | imaginaire/third_party/flow_net/flownet2/networks/flownet_fusion.py | hw07216/imaginaire | 87c774114622e39488a5ea8a7728b1a20896afb9 | [
"RSA-MD"
] | 132 | 2020-09-20T17:36:28.000Z | 2022-03-28T12:40:03.000Z | src/imaginaire/third_party/flow_net/flownet2/networks/flownet_fusion.py | livingbio/imaginaire-fsvid2vid | d82c87aced50afd44fd162491ba5b59056b74034 | [
"RSA-MD"
] | 370 | 2020-09-29T00:34:08.000Z | 2022-03-30T04:12:48.000Z | # Copyright (C) 2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This work is made available under the Nvidia Source Code License-NC.
# To view a copy of this license, check out LICENSE.md
# The file is duplicated from https://github.com/NVIDIA/flownet2-pytorch
# with some modifications.
from torch.nn im... | 36.457831 | 77 | 0.645737 |
fd609eb1c234e36a949fc7ca37f9baf61f7f61e0 | 20,550 | py | Python | flux_combined_high_binding/model_311.py | LoLab-VU/Bayesian_Inference_of_Network_Dynamics | 54a5ef7e868be34289836bbbb024a2963c0c9c86 | [
"MIT"
] | null | null | null | flux_combined_high_binding/model_311.py | LoLab-VU/Bayesian_Inference_of_Network_Dynamics | 54a5ef7e868be34289836bbbb024a2963c0c9c86 | [
"MIT"
] | null | null | null | flux_combined_high_binding/model_311.py | LoLab-VU/Bayesian_Inference_of_Network_Dynamics | 54a5ef7e868be34289836bbbb024a2963c0c9c86 | [
"MIT"
] | null | null | null | # exported from PySB model 'model'
from pysb import Model, Monomer, Parameter, Expression, Compartment, Rule, Observable, Initial, MatchOnce, Annotation, ANY, WILD
Model()
Monomer('Ligand', ['Receptor'])
Monomer('ParpU', ['C3A'])
Monomer('C8A', ['BidU', 'C3pro'])
Monomer('SmacM', ['BaxA'])
Monomer('BaxM', ['BidM', '... | 95.138889 | 798 | 0.804136 |
9f19504c70d1e22254bc9760af753f76c8371b43 | 3,760 | py | Python | maskrcnn_benchmark/modeling/make_layers.py | megvii-model/DetNAS | aa92a90604c870fcb7e3ea9f60d16e6f107454d9 | [
"MIT"
] | 290 | 2019-10-26T03:37:41.000Z | 2022-03-07T11:16:34.000Z | maskrcnn_benchmark/modeling/make_layers.py | pawopawo/DetNAS | 49b4e458c5fe68765ec1590433114db7cda28810 | [
"MIT"
] | 37 | 2019-10-29T12:18:59.000Z | 2022-03-04T07:54:52.000Z | maskrcnn_benchmark/modeling/make_layers.py | pawopawo/DetNAS | 49b4e458c5fe68765ec1590433114db7cda28810 | [
"MIT"
] | 52 | 2019-10-26T13:13:55.000Z | 2022-01-18T00:57:08.000Z | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
"""
Miscellaneous utility functions
"""
import torch
from torch import nn
from torch.nn import functional as F
from maskrcnn_benchmark.config import cfg
from maskrcnn_benchmark.layers import Conv2d
from maskrcnn_benchmark.modeling.poolers import P... | 29.84127 | 82 | 0.639362 |
5084c07b0b1f393b3863cf69f142e97dbb672dcc | 5,173 | py | Python | model_driven_method/main.py | vjhansen/IRSTD | 0470b6bd14701bfc12737f774686b84b03d48e1d | [
"MIT"
] | 2 | 2021-06-23T13:16:50.000Z | 2021-09-14T13:25:02.000Z | model_driven_method/main.py | vjhansen/IRSTD | 0470b6bd14701bfc12737f774686b84b03d48e1d | [
"MIT"
] | null | null | null | model_driven_method/main.py | vjhansen/IRSTD | 0470b6bd14701bfc12737f774686b84b03d48e1d | [
"MIT"
] | 2 | 2021-09-14T13:25:58.000Z | 2021-09-29T03:29:26.000Z | """
Model-driven approach for IR Small Target Detection
Concept based on:
C. Gao, D. Meng, Y. Yang, Y. Wang, X. Zhou and A. G. Hauptmann,
"Infrared Patch-Image Model for Small Target Detection in a Single Image,"
in IEEE Transactions on Image Processing, vol. 22, no. 12, pp. 4996-5009,
Dec. 2013, doi: 10.1109/TIP.2... | 31.932099 | 94 | 0.586507 |
96a6765e518e989dbb7d60315c62e33058ee2b54 | 654 | py | Python | leetcode/easy_top_interview_question/design/minstack.py | alvinctk/google-tech-dev-guide | 9d7759bea1f44673c2de4f25a94b27368928a59f | [
"Apache-2.0"
] | 26 | 2019-06-07T05:29:47.000Z | 2022-03-19T15:32:27.000Z | leetcode/easy_top_interview_question/design/minstack.py | alvinctk/google-tech-dev-guide | 9d7759bea1f44673c2de4f25a94b27368928a59f | [
"Apache-2.0"
] | null | null | null | leetcode/easy_top_interview_question/design/minstack.py | alvinctk/google-tech-dev-guide | 9d7759bea1f44673c2de4f25a94b27368928a59f | [
"Apache-2.0"
] | 6 | 2019-10-10T06:39:28.000Z | 2020-05-12T19:50:55.000Z | class MinStack:
def __init__(self):
"""
initialize your data structure here.
"""
self.min = []
self.stack = []
def push(self, x: int) -> None:
self.stack.append(x)
self.min.append(min(self.min[-1] if self.min else float("inf"), x))
def pop(self) -> ... | 21.096774 | 75 | 0.553517 |
fb7ea75d424ab14adb0e45d064761ffc4a60eeb3 | 2,802 | py | Python | labgraph/events/event_generator_node.py | leaflabs/labgraph | e95eb3e6fed0aef8a50f1a1bbf353cf4c46aa76e | [
"MIT"
] | 1 | 2021-08-01T06:31:08.000Z | 2021-08-01T06:31:08.000Z | labgraph/events/event_generator_node.py | VanEdward/labgraph | 9488feac59f9ef86091befdeaddb69d84e4d6fb3 | [
"MIT"
] | null | null | null | labgraph/events/event_generator_node.py | VanEdward/labgraph | 9488feac59f9ef86091befdeaddb69d84e4d6fb3 | [
"MIT"
] | 1 | 2021-12-28T18:52:58.000Z | 2021-12-28T18:52:58.000Z | #!/usr/bin/env python3
# Copyright 2004-present Facebook. All Rights Reserved.
from abc import abstractmethod
from time import time # TODO: Replace with LabGraph clock
from typing import Any, Dict, List, Tuple
from ..graphs.method import AsyncPublisher, get_method_metadata
from ..graphs.node import Node, NodeMeta
fr... | 32.581395 | 78 | 0.691292 |
134c381ae095720c3b305be9d564682c13f181b3 | 749 | py | Python | app/feedreader/migrations/0006_mptt_update.py | jawsper/feedreader | b2b4d8151a786c822e1b59e93d2d8e8959cd210d | [
"MIT"
] | null | null | null | app/feedreader/migrations/0006_mptt_update.py | jawsper/feedreader | b2b4d8151a786c822e1b59e93d2d8e8959cd210d | [
"MIT"
] | 28 | 2017-03-16T14:39:53.000Z | 2022-02-10T09:52:58.000Z | app/feedreader/migrations/0006_mptt_update.py | jawsper/feedreader | b2b4d8151a786c822e1b59e93d2d8e8959cd210d | [
"MIT"
] | null | null | null | # Generated by Django 2.2.5 on 2019-09-15 06:31
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("feedreader", "0005_feed_quirk_fix_invalid_publication_date"),
]
operations = [
migrations.AlterField(
model_name="outline",
... | 25.827586 | 71 | 0.59279 |
6d196a6626ae5835ccc5f61584026266d4551be2 | 1,477 | py | Python | route/filter_inter_wiki_delete.py | k0000k/openNAMU | b5862a7e5a1f1a2a6bee5eec5b3d9784528f42e8 | [
"BSD-3-Clause"
] | 3 | 2018-10-06T09:02:34.000Z | 2018-10-20T02:42:31.000Z | route/filter_inter_wiki_delete.py | k0000k/openNAMU | b5862a7e5a1f1a2a6bee5eec5b3d9784528f42e8 | [
"BSD-3-Clause"
] | 42 | 2018-09-16T16:30:54.000Z | 2018-11-24T17:45:08.000Z | route/filter_inter_wiki_delete.py | k0000k/openNAMU | b5862a7e5a1f1a2a6bee5eec5b3d9784528f42e8 | [
"BSD-3-Clause"
] | 6 | 2018-09-23T12:29:19.000Z | 2018-11-24T17:31:35.000Z | from .tool.func import *
def filter_inter_wiki_delete(tool, name = 'Test'):
with get_db_connect() as conn:
curs = conn.cursor()
if admin_check(None, tool) != 1:
return re_error('/error/3')
if tool == 'del_inter_wiki':
curs.execute(db_change("delete from htm... | 50.931034 | 112 | 0.607989 |
09c4da1f824b9466b954a47a4b9ac5ac4f78fc89 | 404 | py | Python | tk12.py | NomuFuga/tkinter_sample | 5e44496fb7fb96180a2060a327f8792bccdd7974 | [
"MIT"
] | null | null | null | tk12.py | NomuFuga/tkinter_sample | 5e44496fb7fb96180a2060a327f8792bccdd7974 | [
"MIT"
] | null | null | null | tk12.py | NomuFuga/tkinter_sample | 5e44496fb7fb96180a2060a327f8792bccdd7974 | [
"MIT"
] | null | null | null | import tkinter as tk
root = tk.Tk()
root.geometry("200x150")
lb_rgb = tk.Label(text="rgb",fg="#000",bg="#fff")
lb_rrggbb = tk.Label(text="rrggbb",fg="#abcdef",bg="#123456")
lb_rrrgggbbb = tk.Label(text="rrrgggbbb",fg="#123456789",bg="#987abcdef")
lb_colorname = tk.Label(text="colorname",fg="magenta",bg="yellow")
[widge... | 44.888889 | 74 | 0.720297 |
bf18057996e17e79aa81122a227102fb6ed27620 | 8,218 | py | Python | genweb/scholarship/api/scholarships.py | UPCnet/genweb.scholarship | 8661e2271dc3489934de5330ebfdcbd9df439991 | [
"MIT"
] | null | null | null | genweb/scholarship/api/scholarships.py | UPCnet/genweb.scholarship | 8661e2271dc3489934de5330ebfdcbd9df439991 | [
"MIT"
] | null | null | null | genweb/scholarship/api/scholarships.py | UPCnet/genweb.scholarship | 8661e2271dc3489934de5330ebfdcbd9df439991 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from Products.CMFPlone.interfaces import IPloneSiteRoot
from plone import api
from five import grok
from genweb.scholarship.api import ApiResponse
from genweb.scholarship.api import ObjectNotFound
from genweb.scholarship.api import REST
from genweb.scholarship.api import api_resource
from genwe... | 48.627219 | 101 | 0.503285 |
b98f84d6311b2fec5d422f2e5ddd73fcd66c84e1 | 1,693 | py | Python | examples/07-filter/06-mask.py | pepsipepsi/nodebox_opengl_python3 | cfb2633df1055a028672b11311603cc2241a1378 | [
"BSD-3-Clause"
] | 1 | 2017-03-19T16:56:46.000Z | 2017-03-19T16:56:46.000Z | examples/07-filter/06-mask.py | pepsipepsi/nodebox_opengl_python3 | cfb2633df1055a028672b11311603cc2241a1378 | [
"BSD-3-Clause"
] | null | null | null | examples/07-filter/06-mask.py | pepsipepsi/nodebox_opengl_python3 | cfb2633df1055a028672b11311603cc2241a1378 | [
"BSD-3-Clause"
] | null | null | null | import os, sys
sys.path.insert(0, os.path.join("..",".."))
from nodebox.graphics.context import *
from nodebox.graphics import *
from nodebox.graphics.shader import gradient, RADIAL, mask, invert
# Render a radial gradient image.
# Without additional parameters, the gradient will be grayscale.
g = gradient(350, 350... | 37.622222 | 77 | 0.712936 |
66bd3f180e0a61bc7431f53f899e717cadde6a04 | 385 | py | Python | examples/data/infos.py | axju/dogsbody | 05a95b8925e0c560040727e603e4591fff1b9bc3 | [
"MIT"
] | null | null | null | examples/data/infos.py | axju/dogsbody | 05a95b8925e0c560040727e603e4591fff1b9bc3 | [
"MIT"
] | null | null | null | examples/data/infos.py | axju/dogsbody | 05a95b8925e0c560040727e603e4591fff1b9bc3 | [
"MIT"
] | null | null | null | from pkg_resources import working_set
from dogsbody import runtime
packages = {}
for dist in list(working_set):
packages[dist.project_name] = dist.version
length = max([len(name) for name in packages])
with open(runtime.SOURCE.parent / 'infos.txt', 'w') as target:
for name, version in packages.items():
... | 29.615385 | 69 | 0.703896 |
e8386111baf7cb71746a978637dabc9a0155d8cd | 12,173 | py | Python | assignment2/cs231n/solver.py | lalithnag/cs231n | ed540c4ed06a6ee01966314e4106b8c44f58546b | [
"MIT"
] | null | null | null | assignment2/cs231n/solver.py | lalithnag/cs231n | ed540c4ed06a6ee01966314e4106b8c44f58546b | [
"MIT"
] | null | null | null | assignment2/cs231n/solver.py | lalithnag/cs231n | ed540c4ed06a6ee01966314e4106b8c44f58546b | [
"MIT"
] | null | null | null | from __future__ import print_function, division
from future import standard_library
standard_library.install_aliases()
from builtins import range
from builtins import object
import os
import pickle as pickle
import numpy as np
from cs231n import optim
class Solver(object):
"""
A Solver encapsulates all the ... | 39.651466 | 86 | 0.615789 |
5005cd0032ff0461de7aef786b598e5a5c927d9f | 532 | py | Python | Python3.6.5/Classic_Algorithms/closest_pair/demo2.py | huioo/Mega-Project-List | e17fb5b0bdff54e4d6feb59fead520e44803548d | [
"MIT"
] | null | null | null | Python3.6.5/Classic_Algorithms/closest_pair/demo2.py | huioo/Mega-Project-List | e17fb5b0bdff54e4d6feb59fead520e44803548d | [
"MIT"
] | null | null | null | Python3.6.5/Classic_Algorithms/closest_pair/demo2.py | huioo/Mega-Project-List | e17fb5b0bdff54e4d6feb59fead520e44803548d | [
"MIT"
] | null | null | null | # Closest pair problem
"""
The closest pair of points problem or closest pair problem is a problem of computational geometry:
given n points in metric space, find a pair of points with the smallest distance between them.
最接近的点问题或最接近的一对问题是计算几何的问题:
在度量(矩阵)空间中给定n个点,找到一对点,它们之间的距离最小。
"""
import random
# test cod... | 20.461538 | 99 | 0.712406 |
58ec3addf0388e5b48df96984d2730a140e35aa8 | 6,799 | py | Python | blog/app/controller/admin/user.py | henrY2Young/flask-jwt | f1c47efee7fd7f271c02172371c2d9cec8adde5d | [
"MIT"
] | null | null | null | blog/app/controller/admin/user.py | henrY2Young/flask-jwt | f1c47efee7fd7f271c02172371c2d9cec8adde5d | [
"MIT"
] | null | null | null | blog/app/controller/admin/user.py | henrY2Young/flask-jwt | f1c47efee7fd7f271c02172371c2d9cec8adde5d | [
"MIT"
] | null | null | null | from time import time
import time
from flask import request, jsonify, Flask, render_template, session, redirect, url_for, g
from app import db
from app.controller.admin import user
from app.controller.home import home
from app.models.Users import Users
from function import Common
from app.controller.auth import Auth
... | 32.222749 | 120 | 0.683924 |
6b7f40b80127e7303b509b6a47676381137259f8 | 825 | py | Python | Autocoders/Python/src/fprime_ac/generators/visitors/TestImplVisitorBase.py | chrisdonlan/fprime | 0cab90e238cff1b50c20f1e148a44cf8827a5bf8 | [
"Apache-2.0"
] | 5 | 2019-10-22T03:41:02.000Z | 2022-01-16T12:48:31.000Z | Autocoders/Python/src/fprime_ac/generators/visitors/TestImplVisitorBase.py | chrisdonlan/fprime | 0cab90e238cff1b50c20f1e148a44cf8827a5bf8 | [
"Apache-2.0"
] | 27 | 2019-02-07T17:58:58.000Z | 2019-08-13T00:46:24.000Z | Autocoders/Python/src/fprime_ac/generators/visitors/TestImplVisitorBase.py | chrisdonlan/fprime | 0cab90e238cff1b50c20f1e148a44cf8827a5bf8 | [
"Apache-2.0"
] | 3 | 2019-01-01T18:44:37.000Z | 2019-08-01T01:19:39.000Z | #!/bin/env python
#===============================================================================
# NAME: TestImplVisitorBase.py
#
# DESCRIPTION: A base class for TestImpl visitors
#
# AUTHOR: bocchino
# EMAIL: bocchino@jpl.nasa.gov
# DATE CREATED: November 14, 2015
#
# Copyright 2015, California Institute of Technol... | 30.555556 | 80 | 0.579394 |
43a57be4c2845edba3718c78bc596fbb6e3b5100 | 1,234 | py | Python | tests/conftest.py | njdister/njdister-github3.py | 7a714ad0c9d9ddfda9c3e20d76f94ec992661edc | [
"BSD-3-Clause"
] | null | null | null | tests/conftest.py | njdister/njdister-github3.py | 7a714ad0c9d9ddfda9c3e20d76f94ec992661edc | [
"BSD-3-Clause"
] | null | null | null | tests/conftest.py | njdister/njdister-github3.py | 7a714ad0c9d9ddfda9c3e20d76f94ec992661edc | [
"BSD-3-Clause"
] | 1 | 2021-09-13T09:01:57.000Z | 2021-09-13T09:01:57.000Z | import base64
import betamax
import os
import pytest
from betamax_matchers import json_body
credentials = [os.environ.get('GH_USER', 'foo').encode(),
os.environ.get('GH_PASSWORD', 'bar').encode()]
betamax.Betamax.register_request_matcher(json_body.JSONBodyMatcher)
with betamax.Betamax.configure() as ... | 27.422222 | 76 | 0.700162 |
b495e591de75149419c7ff59863ad756c08a6f7d | 428 | py | Python | packages/python/plotly/plotly/validators/histogram/marker/pattern/_shapesrc.py | mastermind88/plotly.py | efa70710df1af22958e1be080e105130042f1839 | [
"MIT"
] | null | null | null | packages/python/plotly/plotly/validators/histogram/marker/pattern/_shapesrc.py | mastermind88/plotly.py | efa70710df1af22958e1be080e105130042f1839 | [
"MIT"
] | null | null | null | packages/python/plotly/plotly/validators/histogram/marker/pattern/_shapesrc.py | mastermind88/plotly.py | efa70710df1af22958e1be080e105130042f1839 | [
"MIT"
] | null | null | null | import _plotly_utils.basevalidators
class ShapesrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self, plotly_name="shapesrc", parent_name="histogram.marker.pattern", **kwargs
):
super(ShapesrcValidator, self).__init__(
plotly_name=plotly_name,
pare... | 30.571429 | 86 | 0.658879 |
9dfe6718aeb68b0e70dfdefc7df04fe49d48184b | 3,317 | py | Python | chatbot/corpus/cornelldata.py | HarshitBagla/Chatbot | 09b41b3bb48b0ba0f0532adbac0331799d53ca60 | [
"Apache-2.0"
] | null | null | null | chatbot/corpus/cornelldata.py | HarshitBagla/Chatbot | 09b41b3bb48b0ba0f0532adbac0331799d53ca60 | [
"Apache-2.0"
] | null | null | null | chatbot/corpus/cornelldata.py | HarshitBagla/Chatbot | 09b41b3bb48b0ba0f0532adbac0331799d53ca60 | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 Conchylicultor. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | 33.17 | 129 | 0.571902 |
4e38b47c8088ead45820b7fc0afd212c32199875 | 189 | py | Python | app_python/conftest.py | SmirnovaMarina/devops | 63badf302d809bfc20a1dab990938e4b4c201997 | [
"MIT"
] | null | null | null | app_python/conftest.py | SmirnovaMarina/devops | 63badf302d809bfc20a1dab990938e4b4c201997 | [
"MIT"
] | null | null | null | app_python/conftest.py | SmirnovaMarina/devops | 63badf302d809bfc20a1dab990938e4b4c201997 | [
"MIT"
] | 1 | 2021-08-23T08:23:17.000Z | 2021-08-23T08:23:17.000Z | import pytest
from main import create_app
@pytest.fixture
def app():
app = create_app({'TESTING': True})
yield app
@pytest.fixture
def client(app):
return app.test_client()
| 13.5 | 39 | 0.698413 |
558f76aafd7960785b77e82d3a3acc05e04c4ac6 | 23,873 | py | Python | hydrus/client/gui/ClientGUIControls.py | ReAnzu/hydrus | 069f77e1941d13b3bdd969aeeffd7ae003fcb71e | [
"WTFPL"
] | 1 | 2021-02-24T22:12:30.000Z | 2021-02-24T22:12:30.000Z | hydrus/client/gui/ClientGUIControls.py | ReAnzu/hydrus | 069f77e1941d13b3bdd969aeeffd7ae003fcb71e | [
"WTFPL"
] | null | null | null | hydrus/client/gui/ClientGUIControls.py | ReAnzu/hydrus | 069f77e1941d13b3bdd969aeeffd7ae003fcb71e | [
"WTFPL"
] | null | null | null | import typing
from qtpy import QtCore as QC
from qtpy import QtWidgets as QW
from hydrus.core import HydrusConstants as HC
from hydrus.core import HydrusData
from hydrus.core import HydrusExceptions
from hydrus.core import HydrusGlobals as HG
from hydrus.core import HydrusNetworking
from hydrus.core import HydrusText... | 31.746011 | 294 | 0.536799 |
d40d7e83fee4185eacdcae4287e23baf582632ad | 2,489 | py | Python | python_challenge/tests.py | predator4hack/JdeRobot_Programming_tests | b9bb5bf2d3afec3815d50933882a03df90b293e2 | [
"MIT"
] | null | null | null | python_challenge/tests.py | predator4hack/JdeRobot_Programming_tests | b9bb5bf2d3afec3815d50933882a03df90b293e2 | [
"MIT"
] | null | null | null | python_challenge/tests.py | predator4hack/JdeRobot_Programming_tests | b9bb5bf2d3afec3815d50933882a03df90b293e2 | [
"MIT"
] | null | null | null | from game_of_life import GameOfLife
import numpy as np
import json
import unittest
from sample_app import configurations
class TestCgolMethods(unittest.TestCase):
def setUp(self):
self.g = GameOfLife()
self.conf = configurations()
with open('config.json') as config_fd:
config = json.load(config_fd)
self.gr... | 42.186441 | 105 | 0.644837 |
98eb93a6121bd498ef038fc512f075acef371977 | 10,063 | py | Python | scripts/replication_studies.py | gregstarr/trough_stats | 4e8229eb55e016d4910420ede035ace1b1b52d38 | [
"MIT"
] | null | null | null | scripts/replication_studies.py | gregstarr/trough_stats | 4e8229eb55e016d4910420ede035ace1b1b52d38 | [
"MIT"
] | null | null | null | scripts/replication_studies.py | gregstarr/trough_stats | 4e8229eb55e016d4910420ede035ace1b1b52d38 | [
"MIT"
] | null | null | null | import pandas
import pathlib
import numpy as np
from scipy.stats import binned_statistic, linregress
from matplotlib import pyplot as plt
from ttools import io, utils, config, plotting
from get_dataset import get_tec_dataset
plt.style.use('ggplot')
colors = plt.rcParams['axes.prop_cycle'].by_key()['color']
plt.style... | 41.073469 | 127 | 0.643744 |
2ba7ad2883a3d2116f1b47a199a29f943d3d52c0 | 333 | py | Python | dora/tests/test_share.py | fairinternal/dora | 817c4763057bc8238bedfbf59ca1cdf8c3de7ae7 | [
"MIT"
] | 98 | 2021-09-21T14:27:21.000Z | 2022-03-18T17:46:45.000Z | dora/tests/test_share.py | fairinternal/dora | 817c4763057bc8238bedfbf59ca1cdf8c3de7ae7 | [
"MIT"
] | 6 | 2021-09-22T13:29:48.000Z | 2022-03-14T16:45:30.000Z | dora/tests/test_share.py | fairinternal/dora | 817c4763057bc8238bedfbf59ca1cdf8c3de7ae7 | [
"MIT"
] | 5 | 2021-09-21T12:42:01.000Z | 2022-01-27T17:22:17.000Z | # Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
from dora.share import dump, load
def test_dump_load():
x = [1, 2, 4, {'youpi': 'test', 'b': 56.3}]
assert load(d... | 25.615385 | 61 | 0.675676 |
bddfb4aa8d6ed85cbd7e99359e5e2c9a4a05e397 | 1,111 | py | Python | examples/scikit-learn/logger.py | altescy/logexp | 19389c884c686ca42f691500e82e8963bd039f0c | [
"MIT"
] | 14 | 2020-01-19T08:07:14.000Z | 2021-01-18T19:06:23.000Z | examples/scikit-learn/logger.py | altescy/logexp | 19389c884c686ca42f691500e82e8963bd039f0c | [
"MIT"
] | null | null | null | examples/scikit-learn/logger.py | altescy/logexp | 19389c884c686ca42f691500e82e8963bd039f0c | [
"MIT"
] | null | null | null | from __future__ import annotations
import typing as tp
import logging
import time
from datetime import timedelta
class LogFormatter(logging.Formatter):
def __init__(self) -> None:
super().__init__()
self.start_time = time.time()
def format(self, record):
elapsed_seconds = round(recor... | 27.097561 | 71 | 0.649865 |
98e4e29d1b9497117e98ef9dcc0faa8c818d5214 | 29,747 | py | Python | github/NamedUser.py | aantr/WindowsHostManager | 75d248fc8991d471c6802fa79e7dee44a5708c65 | [
"CNRI-Python-GPL-Compatible"
] | 1 | 2021-06-25T09:13:12.000Z | 2021-06-25T09:13:12.000Z | venv/lib/python3.6/site-packages/github/NamedUser.py | rongshaoshuai/blogs | dafeb789428436c1ec8069e605400612b776b8f2 | [
"MIT"
] | 3 | 2021-03-30T23:03:03.000Z | 2021-03-30T23:06:57.000Z | lib/github/NamedUser.py | Corionis/Knobs-And-Scripts | 81a954fd0ed697e5759359ec0383a3f16a841143 | [
"MIT"
] | null | null | null | ############################ Copyrights and license ############################
# #
# Copyright 2012 Steve English <steve.english@navetas.com> #
# Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> ... | 36.998756 | 142 | 0.60433 |
ab81800c1e21abbb85573d262a8209d993f20f06 | 2,616 | py | Python | corehq/apps/reminders/management/commands/populate_app_id_for_survey_keyword.py | tstalka/commcare-hq | 902412b0f97ba0daac173fe284f3adc4c01bcd76 | [
"BSD-3-Clause"
] | null | null | null | corehq/apps/reminders/management/commands/populate_app_id_for_survey_keyword.py | tstalka/commcare-hq | 902412b0f97ba0daac173fe284f3adc4c01bcd76 | [
"BSD-3-Clause"
] | null | null | null | corehq/apps/reminders/management/commands/populate_app_id_for_survey_keyword.py | tstalka/commcare-hq | 902412b0f97ba0daac173fe284f3adc4c01bcd76 | [
"BSD-3-Clause"
] | null | null | null | import logging
from django.core.management.base import BaseCommand
from corehq.apps.app_manager.util import get_app_id_from_form_unique_id
from corehq.apps.reminders.models import SurveyKeyword
from corehq.dbaccessors.couchapps.all_docs import (
get_deleted_doc_ids_by_class,
get_doc_ids_by_class,
)
from coreh... | 45.103448 | 112 | 0.542813 |
ba2803782ddf3264e06f3fb1e3760e37362f5acd | 1,203 | py | Python | tests/core/objects/exceptions.py | idjaw/netman | 58ba898de6e450a24b4f1721ce274ad3e12f9d33 | [
"Apache-2.0"
] | 1 | 2016-01-28T17:56:51.000Z | 2016-01-28T17:56:51.000Z | tests/core/objects/exceptions.py | idjaw/netman | 58ba898de6e450a24b4f1721ce274ad3e12f9d33 | [
"Apache-2.0"
] | 2 | 2021-12-13T20:55:50.000Z | 2022-03-29T22:07:13.000Z | tests/core/objects/exceptions.py | idjaw/netman | 58ba898de6e450a24b4f1721ce274ad3e12f9d33 | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 Internap.
#
# 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, so... | 36.454545 | 109 | 0.723192 |
50f0f1f527ae05ae74c8b037e9601cfc2e358626 | 2,268 | py | Python | tests/en_spell_test.py | zouning68/pycorrector | 4daaf13e566f2cecc724fb5a77db5d89f1f25203 | [
"Apache-2.0"
] | 1 | 2019-08-07T05:14:01.000Z | 2019-08-07T05:14:01.000Z | tests/en_spell_test.py | zouning68/pycorrector | 4daaf13e566f2cecc724fb5a77db5d89f1f25203 | [
"Apache-2.0"
] | null | null | null | tests/en_spell_test.py | zouning68/pycorrector | 4daaf13e566f2cecc724fb5a77db5d89f1f25203 | [
"Apache-2.0"
] | 1 | 2020-09-23T09:11:49.000Z | 2020-09-23T09:11:49.000Z | # -*- coding: utf-8 -*-
# Author: XuMing <xuming624@qq.com>
# Brief:
import sys
sys.path.append("../")
from pycorrector.en_spell import *
def correction_t():
assert correction('spelling') == 'spelling' # no error
assert correction('speling') == 'spelling' # insert
assert correction('correctud') == 'corre... | 36 | 118 | 0.604056 |
52a823b6a0ea6eb3f80a94828258d94152530c1a | 13,253 | py | Python | lib/modules/_collections.py | JJTech0130/pypyjs-pwa | 1b5820212971cfab683715b21cd97e335b681546 | [
"MIT"
] | 195 | 2016-01-14T16:03:02.000Z | 2021-12-29T09:15:02.000Z | lib/modules/_collections.py | JJTech0130/pypyjs-pwa | 1b5820212971cfab683715b21cd97e335b681546 | [
"MIT"
] | 75 | 2016-01-14T16:03:02.000Z | 2020-04-29T22:51:53.000Z | lib/modules/_collections.py | JJTech0130/pypyjs-pwa | 1b5820212971cfab683715b21cd97e335b681546 | [
"MIT"
] | 11 | 2015-09-07T14:26:08.000Z | 2020-04-10T07:20:41.000Z | """High performance data structures
"""
#
# Copied and completed from the sandbox of CPython
# (nondist/sandbox/collections/pydeque.py rev 1.1, Raymond Hettinger)
#
# Note that PyPy also contains a built-in module '_collections' which will hide
# this one if compiled in.
try:
from threading import _get_ident as... | 30.396789 | 108 | 0.526598 |
85a3300b9884358c8b2521d3d409003617f8d8f6 | 162 | py | Python | contrib/tests/assets/python/tests/test_sample.py | rockstack/rock | 1d010d942c5b1c8fd198223ac1f4a3dd5d690edb | [
"MIT"
] | 1 | 2015-03-13T06:01:06.000Z | 2015-03-13T06:01:06.000Z | contrib/tests/assets/python/tests/test_sample.py | rockstack/rock | 1d010d942c5b1c8fd198223ac1f4a3dd5d690edb | [
"MIT"
] | null | null | null | contrib/tests/assets/python/tests/test_sample.py | rockstack/rock | 1d010d942c5b1c8fd198223ac1f4a3dd5d690edb | [
"MIT"
] | null | null | null | import unittest
import sample
class TestCase(unittest.TestCase):
def test_simple(self):
self.assertEqual(sample.convert('# Test'), '<h1>Test</h1>')
| 20.25 | 67 | 0.697531 |
3e50bc50221b9a4a6d3b0fd77623d2ff08fce1b1 | 3,412 | py | Python | preprocess/PTMsites_src/PTMsites_process.py | Rongtingting/PTM-X- | 48865210a78599542f63d62709ac42acfb6eb8b4 | [
"Apache-2.0"
] | 2 | 2017-12-07T03:31:30.000Z | 2021-07-15T09:38:16.000Z | preprocess/PTMsites_src/PTMsites_process.py | Rongtingting/PTM-X- | 48865210a78599542f63d62709ac42acfb6eb8b4 | [
"Apache-2.0"
] | null | null | null | preprocess/PTMsites_src/PTMsites_process.py | Rongtingting/PTM-X- | 48865210a78599542f63d62709ac42acfb6eb8b4 | [
"Apache-2.0"
] | 2 | 2018-01-15T07:46:30.000Z | 2020-07-08T12:57:03.000Z | #!/usr/bin/python2.7
# run python PTMsites_process.py
import os
import numpy as np
from optparse import OptionParser
def load_file(PTM_file, species_name, keys):
data = np.loadtxt(PTM_file, delimiter='\t', skiprows=3, dtype="str")
key_idx = np.array([],"int")
for i in range(len(keys)):
_idx = np.w... | 39.218391 | 93 | 0.621043 |
e5728d096ff479d854c970b37756cd83b98e40b9 | 571 | py | Python | lello/users/migrations/0002_auto_20200603_0840.py | FR98/lello-API | 2b2deddd04b00d893fdd1194674d354e5002b40e | [
"MIT"
] | null | null | null | lello/users/migrations/0002_auto_20200603_0840.py | FR98/lello-API | 2b2deddd04b00d893fdd1194674d354e5002b40e | [
"MIT"
] | null | null | null | lello/users/migrations/0002_auto_20200603_0840.py | FR98/lello-API | 2b2deddd04b00d893fdd1194674d354e5002b40e | [
"MIT"
] | null | null | null | # Generated by Django 3.0.6 on 2020-06-03 08:40
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),
('users', '0001_initial'),... | 25.954545 | 113 | 0.672504 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.