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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2b3e31697255a8a75c6e99f73eedb9d930e36533 | 522 | py | Python | task003.py | lessunc/python-guanabara | 5c4c41eb46cc1742fdf36e3dc3c830a189344fad | [
"MIT"
] | 32 | 2018-12-09T00:44:20.000Z | 2022-03-11T19:28:53.000Z | task003.py | lessunc/python-guanabara | 5c4c41eb46cc1742fdf36e3dc3c830a189344fad | [
"MIT"
] | null | null | null | task003.py | lessunc/python-guanabara | 5c4c41eb46cc1742fdf36e3dc3c830a189344fad | [
"MIT"
] | 4 | 2019-01-21T08:04:29.000Z | 2020-06-01T14:27:15.000Z | #coding: utf-8
#-------------------------------------------------------------------
# Um programa que recebe dois valores e retorna a soma entre eles.
#-------------------------------------------------------------------
# Somando no Python - Exercício #003
#------------------------------------------------------------... | 32.625 | 68 | 0.377395 |
13f68dd0fe0df8ec273db94cd2007f608eeaec88 | 18,859 | py | Python | SMPyBandits/main.py | balbok0/SMPyBandits | c8ff765687989e0c20ab42c2e2e1d8440923225b | [
"MIT"
] | 309 | 2018-03-03T22:07:59.000Z | 2022-03-26T08:15:58.000Z | SMPyBandits/main.py | balbok0/SMPyBandits | c8ff765687989e0c20ab42c2e2e1d8440923225b | [
"MIT"
] | 125 | 2018-02-27T22:54:03.000Z | 2021-11-05T10:50:15.000Z | SMPyBandits/main.py | balbok0/SMPyBandits | c8ff765687989e0c20ab42c2e2e1d8440923225b | [
"MIT"
] | 60 | 2018-04-30T20:54:24.000Z | 2022-02-21T22:41:46.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Script to load the config, run the simulations, and plot them.
"""
from __future__ import division, print_function # Python 2 compatibility
__author__ = "Lilian Besson"
__version__ = "0.9"
# Generic imports
import sys
from os import mkdir, getenv
import os.path
impor... | 53.424929 | 189 | 0.651678 |
c8f41bcb84c03c892e260b0958c2977b8768ccad | 4,193 | py | Python | paradrop/daemon/paradrop/lib/misc/procmon.py | lhartung/paradrop-test | 22a491bf3198bf61bcabaedfaecde5b9be97e76f | [
"Apache-2.0"
] | 1 | 2018-03-22T13:04:19.000Z | 2018-03-22T13:04:19.000Z | paradrop/daemon/paradrop/lib/misc/procmon.py | VegetableChook/Paradrop | a38e1773877d5b136c3b626edd8c033a12b43e56 | [
"Apache-2.0"
] | 7 | 2021-03-18T20:54:50.000Z | 2022-03-11T23:27:40.000Z | paradrop/daemon/paradrop/lib/misc/procmon.py | lhartung/paradrop-test | 22a491bf3198bf61bcabaedfaecde5b9be97e76f | [
"Apache-2.0"
] | null | null | null | """
The ProcessMonitor class ensures that a service is running and that its pid
file is consistent.
This addresses an issue we have had with Docker on Ubuntu Snappy, where its
pid file sometimes persists and prevents the service from starting.
"""
import glob
import os
import subprocess
import time
import psutil
c... | 32.253846 | 90 | 0.584307 |
1957f5e26bdf58278258a8b7f2912801d0fefd20 | 2,204 | py | Python | pytests/tuqquery/tuq_queryworkbench.py | pavithra-mahamani/testrunner | d204491caa23f1fbe90505646534ed7810d96289 | [
"Apache-2.0"
] | null | null | null | pytests/tuqquery/tuq_queryworkbench.py | pavithra-mahamani/testrunner | d204491caa23f1fbe90505646534ed7810d96289 | [
"Apache-2.0"
] | null | null | null | pytests/tuqquery/tuq_queryworkbench.py | pavithra-mahamani/testrunner | d204491caa23f1fbe90505646534ed7810d96289 | [
"Apache-2.0"
] | 1 | 2020-07-24T07:15:59.000Z | 2020-07-24T07:15:59.000Z | import time
from TestInput import TestInputSingleton
from basetestcase import BaseTestCase
from couchbase_helper.documentgenerator import BlobGenerator
from membase.api.rest_client import RestConnection
class QueryWorkbenchTests(BaseTestCase):
n1ql_port =8093
_input = TestInputSingleton.input
num_items = _... | 38.666667 | 83 | 0.598457 |
fb7b33920348c9d6df96f724df004fb8546536df | 3,490 | py | Python | Algorithms/problem28/main28.py | lrussell21/ICPC_Template_Code | 0aa5f202c17e2fd8101821685c9ce459a15e2f96 | [
"MIT"
] | null | null | null | Algorithms/problem28/main28.py | lrussell21/ICPC_Template_Code | 0aa5f202c17e2fd8101821685c9ce459a15e2f96 | [
"MIT"
] | null | null | null | Algorithms/problem28/main28.py | lrussell21/ICPC_Template_Code | 0aa5f202c17e2fd8101821685c9ce459a15e2f96 | [
"MIT"
] | null | null | null | import os
from collections import defaultdict
# Used Tarjan's algorithm mentioned in class.
# Got it from here https://www.geeksforgeeks.org/tarjan-algorithm-find-strongly-connected-components/
class Graph:
def __init__(self,vertices):
#No. of vertices
self.V= vertices
#... | 28.842975 | 101 | 0.513467 |
cc44b83a7d2676115a908689ca484abe77d6af67 | 687 | py | Python | 15/15_xjf.py | kbcao/leetcode | b7d90d3141546b353dd80a99864f4bc0578a7c63 | [
"MIT"
] | null | null | null | 15/15_xjf.py | kbcao/leetcode | b7d90d3141546b353dd80a99864f4bc0578a7c63 | [
"MIT"
] | null | null | null | 15/15_xjf.py | kbcao/leetcode | b7d90d3141546b353dd80a99864f4bc0578a7c63 | [
"MIT"
] | null | null | null | class Solution:
def threeSum(self, nums: List[int]) -> List[List[int]]:
dic, res = {}, []
for n in nums:
dic.setdefault(n, 0)
dic[n] += 1
nums = list(dic.keys())
nums.sort()
for i in range(len(nums)):
n1 = nums[i]
if n1 > 0: bre... | 36.157895 | 66 | 0.413392 |
51d3892b97ab7b5bf7a0cd844028e5a069ddbadf | 56,772 | py | Python | rampwf/externals/tabulate.py | gregoire-colin/ramp_workflow | 12512a3192bcc515c2da956a6a6704849cdadeee | [
"BSD-3-Clause"
] | null | null | null | rampwf/externals/tabulate.py | gregoire-colin/ramp_workflow | 12512a3192bcc515c2da956a6a6704849cdadeee | [
"BSD-3-Clause"
] | 1 | 2020-01-18T09:47:03.000Z | 2020-01-20T15:33:11.000Z | rampwf/externals/tabulate.py | lucyleeow/ramp-workflow | 0bd6f7bbea65255fd964ddefcb21fe628ab1abbc | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""Pretty-print tabular data."""
from __future__ import print_function
from __future__ import unicode_literals
from collections import namedtuple, Iterable
from platform import python_version_tuple
from signal import signal, SIGPIPE, SIG_DFL
import re
import math
if python_version_tuple()[0]... | 37.423863 | 197 | 0.554005 |
5ceb7f1247afc7244865cebe4f94ecf65cbf1186 | 1,050 | py | Python | code/findMotifs_std.py | NIEHS/P-MACD | 82fa36f6ccbdccb63985d28b0c41c9084b9e2b18 | [
"MIT"
] | 2 | 2021-06-02T20:34:27.000Z | 2021-09-06T22:36:10.000Z | code/findMotifs_std.py | NIEHS/P-MACD | 82fa36f6ccbdccb63985d28b0c41c9084b9e2b18 | [
"MIT"
] | null | null | null | code/findMotifs_std.py | NIEHS/P-MACD | 82fa36f6ccbdccb63985d28b0c41c9084b9e2b18 | [
"MIT"
] | 2 | 2021-04-03T00:31:13.000Z | 2022-01-31T15:40:29.000Z | # source("/home/klimczakl/projects/yeast/context/findMotif.py")
motifs2Find = ("A", "T", "G", "C", "Cg", "cG", "tC[at]", "[at]Ga", "tCa", "tGa", "tCt", "aGa", "tC", "Ga", "tC[atc]", "[atg]Ga", "cC", "Gg", "[at][ag]C", "G[ct][at]", "Cc", "gG", "[at]A", "T[at]")
findTitles = ("A", "T", "G", "C", "Cg", "cG", "tCw", "wGa"... | 70 | 196 | 0.510476 |
ba0fd526145ad558ee6ebc5b0dd7389c50904a77 | 1,048 | py | Python | src/features/utils.py | jejjohnson/2019_rbig_rs | 00df5c623d55895e0b43a4130bb6c601fae84890 | [
"MIT"
] | 2 | 2020-05-15T17:31:39.000Z | 2021-03-16T08:49:33.000Z | src/features/utils.py | jejjohnson/rbig_eo | 00df5c623d55895e0b43a4130bb6c601fae84890 | [
"MIT"
] | null | null | null | src/features/utils.py | jejjohnson/rbig_eo | 00df5c623d55895e0b43a4130bb6c601fae84890 | [
"MIT"
] | null | null | null | from typing import Tuple, Optional
from sklearn.utils import check_random_state
import numpy as np
import pandas as pd
def move_variables(df: pd.DataFrame, variable: str) -> pd.DataFrame:
# cond1 = df['variable1'] == variable
cond = df["variable2"] == variable
df.loc[cond, ["variable2", "variable1"]] ... | 29.942857 | 76 | 0.664122 |
6d9bb4eb303b83893aa650e1904ae6dc87060c4a | 1,215 | py | Python | mmaction/core/bbox/transforms.py | rlleshi/mmaction2 | 6993693f178b1a59e5eb07f1a3db484d5e5de61a | [
"Apache-2.0"
] | 1,870 | 2020-07-11T09:33:46.000Z | 2022-03-31T13:21:36.000Z | mmaction/core/bbox/transforms.py | rlleshi/mmaction2 | 6993693f178b1a59e5eb07f1a3db484d5e5de61a | [
"Apache-2.0"
] | 1,285 | 2020-07-11T11:18:57.000Z | 2022-03-31T08:41:17.000Z | mmaction/core/bbox/transforms.py | rlleshi/mmaction2 | 6993693f178b1a59e5eb07f1a3db484d5e5de61a | [
"Apache-2.0"
] | 557 | 2020-07-11T09:51:57.000Z | 2022-03-31T13:21:35.000Z | # Copyright (c) OpenMMLab. All rights reserved.
import numpy as np
def bbox2result(bboxes, labels, num_classes, thr=0.01):
"""Convert detection results to a list of numpy arrays.
Args:
bboxes (Tensor): shape (n, 4)
labels (Tensor): shape (n, #num_classes)
num_classes (int): class numb... | 31.973684 | 76 | 0.609053 |
442f248390deb58225429480c3870eec42baf24a | 1,956 | py | Python | kms/api-client/iam_add_member.py | apecr/python-docs-samples | 26b581bb6ce148e13a9c7f2cd801f138b8aa8412 | [
"Apache-2.0"
] | 1 | 2020-06-04T16:50:49.000Z | 2020-06-04T16:50:49.000Z | kms/api-client/iam_add_member.py | apecr/python-docs-samples | 26b581bb6ce148e13a9c7f2cd801f138b8aa8412 | [
"Apache-2.0"
] | null | null | null | kms/api-client/iam_add_member.py | apecr/python-docs-samples | 26b581bb6ce148e13a9c7f2cd801f138b8aa8412 | [
"Apache-2.0"
] | 1 | 2020-05-29T20:33:18.000Z | 2020-05-29T20:33:18.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, s... | 34.315789 | 88 | 0.699898 |
c11ab33609bc91c53b27be3ea3a51967a0ded354 | 3,703 | py | Python | gaphor/plugins/diagramexport/gaphorconvert.py | bertob/gaphor | a1d6f8dd8c878f299980bba6c055436148573274 | [
"Apache-2.0"
] | null | null | null | gaphor/plugins/diagramexport/gaphorconvert.py | bertob/gaphor | a1d6f8dd8c878f299980bba6c055436148573274 | [
"Apache-2.0"
] | null | null | null | gaphor/plugins/diagramexport/gaphorconvert.py | bertob/gaphor | a1d6f8dd8c878f299980bba6c055436148573274 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
import optparse
import os
import re
import sys
from gaphor.application import Session
from gaphor.core.modeling import Diagram
from gaphor.storage import storage
def pkg2dir(package):
"""Return directory path from package class."""
name = []
while package:
name.insert(0, packag... | 27.634328 | 85 | 0.57872 |
568e6944a5e1535e5d348279515c04c37c3f89bc | 10,224 | py | Python | blowdrycss/unitparser.py | acnagy/test-blowdrycss | bd9603dc87dc304b811213e3e6c3c97afa7f5966 | [
"MIT"
] | null | null | null | blowdrycss/unitparser.py | acnagy/test-blowdrycss | bd9603dc87dc304b811213e3e6c3c97afa7f5966 | [
"MIT"
] | null | null | null | blowdrycss/unitparser.py | acnagy/test-blowdrycss | bd9603dc87dc304b811213e3e6c3c97afa7f5966 | [
"MIT"
] | null | null | null | # python 2
from __future__ import absolute_import
# builtins
from string import digits
# custom
import blowdrycss_settings as settings
__author__ = 'chad nelson'
__project__ = 'blowdrycss'
class UnitParser(object):
"""
**Used in these cases:**
- No units are provided and default units need to be added... | 46.899083 | 119 | 0.529245 |
b175bf3a54036468fe2e1be5e6519961a9d42b20 | 23,213 | py | Python | tests/fnet/test_modeling_fnet.py | techthiyanes/transformers | 705d65368fb28246534ef636fe62c008f4fb2682 | [
"Apache-2.0"
] | 2 | 2021-11-25T13:27:29.000Z | 2022-02-25T19:21:19.000Z | tests/fnet/test_modeling_fnet.py | techthiyanes/transformers | 705d65368fb28246534ef636fe62c008f4fb2682 | [
"Apache-2.0"
] | 1 | 2022-03-26T12:10:11.000Z | 2022-03-26T12:10:11.000Z | tests/fnet/test_modeling_fnet.py | techthiyanes/transformers | 705d65368fb28246534ef636fe62c008f4fb2682 | [
"Apache-2.0"
] | 1 | 2022-01-12T14:45:41.000Z | 2022-01-12T14:45:41.000Z | # coding=utf-8
# Copyright 2021 The HuggingFace Inc. team. 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 r... | 41.525939 | 315 | 0.669711 |
1a128d5e56766edad28c97b713d77d3b3ef8da02 | 67 | py | Python | mapping/enable/primitives/api.py | nmichaud/enable-mapping | 421aae6c3c700406df0f2438cec190daf5074084 | [
"BSD-3-Clause"
] | 1 | 2019-04-22T16:36:06.000Z | 2019-04-22T16:36:06.000Z | mapping/enable/primitives/api.py | pombreda/enable-mapping | 421aae6c3c700406df0f2438cec190daf5074084 | [
"BSD-3-Clause"
] | null | null | null | mapping/enable/primitives/api.py | pombreda/enable-mapping | 421aae6c3c700406df0f2438cec190daf5074084 | [
"BSD-3-Clause"
] | 2 | 2015-04-14T10:06:03.000Z | 2020-10-03T03:56:47.000Z |
from geo_circle import GeoCircle
from geo_marker import GeoMarker
| 16.75 | 32 | 0.865672 |
a267239e4373e2ae20914c31d23d992c10ead5af | 365 | py | Python | Python/Skrypty/Python - Szkolenie_11-2015/przyklady_rec_python/pickler.py | Elzei/show-off | fd6c46480160d795a7c1c833a798f3d49eddf144 | [
"MIT"
] | null | null | null | Python/Skrypty/Python - Szkolenie_11-2015/przyklady_rec_python/pickler.py | Elzei/show-off | fd6c46480160d795a7c1c833a798f3d49eddf144 | [
"MIT"
] | null | null | null | Python/Skrypty/Python - Szkolenie_11-2015/przyklady_rec_python/pickler.py | Elzei/show-off | fd6c46480160d795a7c1c833a798f3d49eddf144 | [
"MIT"
] | null | null | null | #!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
import pickle
class MyContainer(object):
def __init__(self, data):
self._data = data
def get_data(self):
return self._data
d1 = MyContainer([2, 5, 4, 3, [ 12, 3, 5 ], 32, { 'a': 12, 'b': 43}])
with open('/tmp/pickle_data.dat', "wb") as f:
... | 16.590909 | 69 | 0.561644 |
0104993a0b4d2816985e9cb2c62962b04fe0f7c6 | 1,251 | py | Python | userbot/plugins/fleaveme_IQ.py | noornoor600/telethon-iraq | f958af26e8686f432760ae9b0fce90b94d1d731a | [
"Apache-2.0"
] | 2 | 2022-02-27T11:39:58.000Z | 2022-02-27T11:40:00.000Z | userbot/plugins/fleaveme_IQ.py | ForSimo/Telethon | 70b6169d367321af55e74589482699b0e90e3c0f | [
"Apache-2.0"
] | null | null | null | userbot/plugins/fleaveme_IQ.py | ForSimo/Telethon | 70b6169d367321af55e74589482699b0e90e3c0f | [
"Apache-2.0"
] | null | null | null | #redit: @KLANR
"""Emoji
Available Commands:
.fleave"""
from telethon import events
import asyncio
@borg.on(events.NewMessage(pattern=r"\.(.*)", outgoing=True))
async def _(event):
if event.fwd_from:
return
animation_interval = 1
animation_ttl = range(0, 17)
input_str = event.patte... | 21.20339 | 75 | 0.453237 |
50840b1c592e2ed25c9ef59a755b548812ce851a | 18,790 | py | Python | lib/googlecloudsdk/calliope/exceptions.py | kustodian/google-cloud-sdk | b6bae4137d4b58030adb3dcb1271216dfb19f96d | [
"Apache-2.0"
] | null | null | null | lib/googlecloudsdk/calliope/exceptions.py | kustodian/google-cloud-sdk | b6bae4137d4b58030adb3dcb1271216dfb19f96d | [
"Apache-2.0"
] | null | null | null | lib/googlecloudsdk/calliope/exceptions.py | kustodian/google-cloud-sdk | b6bae4137d4b58030adb3dcb1271216dfb19f96d | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*- #
# Copyright 2013 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... | 34.796296 | 80 | 0.714476 |
e9ce0845f3b552a47981f84f1c94393045958930 | 8,804 | py | Python | tests/tensortrade/orders/test_broker.py | Kukunin/tensortrade | c5b5c40232a334d9b38359eab0c0ce0e4c9e43ed | [
"Apache-2.0"
] | 6 | 2020-03-05T14:49:01.000Z | 2022-02-28T01:55:50.000Z | tests/tensortrade/orders/test_broker.py | Machine-Learning-Labs/tensortrade | 3fe7793a6c1d3d7bfe772166578f624f3f572eca | [
"Apache-2.0"
] | null | null | null | tests/tensortrade/orders/test_broker.py | Machine-Learning-Labs/tensortrade | 3fe7793a6c1d3d7bfe772166578f624f3f572eca | [
"Apache-2.0"
] | null | null | null |
import pytest
import unittest.mock as mock
from tensortrade.orders import Broker, OrderStatus, Order, OrderSpec
from tensortrade.orders.criteria import Stop
from tensortrade.wallets import Wallet, Portfolio
from tensortrade.trades import TradeSide, TradeType
from tensortrade.instruments import USD, BTC, Quantity
@m... | 29.249169 | 96 | 0.677079 |
94292bbe36047d5efe647010767d8fd6a0f692e4 | 1,403 | py | Python | setup.py | metaist/attrbox | 68c595f58e641f6e8ab1d5eb0bd163819823dd25 | [
"MIT"
] | null | null | null | setup.py | metaist/attrbox | 68c595f58e641f6e8ab1d5eb0bd163819823dd25 | [
"MIT"
] | null | null | null | setup.py | metaist/attrbox | 68c595f58e641f6e8ab1d5eb0bd163819823dd25 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# coding: utf-8
"""Install library package."""
# native
from pathlib import Path
import site
import sys
# lib
from setuptools import setup, find_namespace_packages
# pkg
pkg = {}
here = Path(__file__).parent.resolve()
exec( # pylint: disable=exec-used
(here / "src" / "attrbox" / "__about_... | 28.06 | 82 | 0.655738 |
69602341b98c1a1c9600bbf47271386f31dbffb5 | 2,065 | py | Python | autorest/python/emsapi/models/adi_ems_web_api_v2_dto_ems_profile_ems_profile.py | ge-flight-analytics/ems-api-wrappers | 5e787e0cbc72e7a3b06fa83ff6ba07968231f89c | [
"MIT"
] | 2 | 2017-02-20T18:32:02.000Z | 2018-08-01T11:45:29.000Z | autorest/python/emsapi/models/adi_ems_web_api_v2_dto_ems_profile_ems_profile.py | ge-flight-analytics/ems-api-wrappers | 5e787e0cbc72e7a3b06fa83ff6ba07968231f89c | [
"MIT"
] | 10 | 2017-02-20T16:17:04.000Z | 2019-04-02T16:52:49.000Z | autorest/python/emsapi/models/adi_ems_web_api_v2_dto_ems_profile_ems_profile.py | ge-flight-analytics/ems-api-wrappers | 5e787e0cbc72e7a3b06fa83ff6ba07968231f89c | [
"MIT"
] | 2 | 2017-02-18T23:22:20.000Z | 2017-02-20T19:35:38.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
from ... | 37.545455 | 95 | 0.599031 |
37920055d0056c7586e982605ed94ee9ce144795 | 242 | py | Python | 03/get_entropy.py | MarBry111/KiBIF | 06cc6d969323045b38a52831a695d13bb5ebc2ab | [
"MIT"
] | null | null | null | 03/get_entropy.py | MarBry111/KiBIF | 06cc6d969323045b38a52831a695d13bb5ebc2ab | [
"MIT"
] | null | null | null | 03/get_entropy.py | MarBry111/KiBIF | 06cc6d969323045b38a52831a695d13bb5ebc2ab | [
"MIT"
] | null | null | null | import struct
import time
import os
t = 0.5
T = 100
for ii in range(int(T*60/t)):
time.sleep(t)
#os.system('cat /proc/sys/kernel/random/entropy_avail')
os.system('cat /proc/sys/kernel/random/entropy_avail >> ~/Desktop/entropy.txt')
| 16.133333 | 80 | 0.698347 |
dbe01842bebe419900324ef00b06f3f69ed5c950 | 4,771 | py | Python | rlmolecule/alphazero/alphazero.py | dmdu/rlmolecule | 5c9187775ef99ea6a06992788116754b1b308a8c | [
"BSD-3-Clause"
] | null | null | null | rlmolecule/alphazero/alphazero.py | dmdu/rlmolecule | 5c9187775ef99ea6a06992788116754b1b308a8c | [
"BSD-3-Clause"
] | null | null | null | rlmolecule/alphazero/alphazero.py | dmdu/rlmolecule | 5c9187775ef99ea6a06992788116754b1b308a8c | [
"BSD-3-Clause"
] | null | null | null | import logging
import math
import numpy as np
from rlmolecule.alphazero.alphazero_problem import AlphaZeroProblem
from rlmolecule.alphazero.alphazero_vertex import AlphaZeroVertex
from rlmolecule.mcts.mcts import MCTS
from rlmolecule.mcts.mcts_vertex import MCTSVertex
from rlmolecule.tree_search.graph_search_state im... | 40.777778 | 114 | 0.673653 |
1c317c6f990469410000fc123e1ab7a1df626cbd | 314 | py | Python | LC/70.py | szhu3210/LeetCode_Solutions | 64747eb172c2ecb3c889830246f3282669516e10 | [
"MIT"
] | 2 | 2018-02-24T17:20:02.000Z | 2018-02-24T17:25:43.000Z | LC/70.py | szhu3210/LeetCode_Solutions | 64747eb172c2ecb3c889830246f3282669516e10 | [
"MIT"
] | null | null | null | LC/70.py | szhu3210/LeetCode_Solutions | 64747eb172c2ecb3c889830246f3282669516e10 | [
"MIT"
] | null | null | null | class Solution(object):
dict={1:1, 2:2}
def climbStairs(self, n):
"""
:type n: int
:rtype: int
"""
if n in self.dict:
return self.dict[n]
else:
self.dict[n] = self.climbStairs(n-2) + njh
return self.dict[n] | 26.166667 | 74 | 0.43949 |
4527fbaf17dcc4265c1148afd93472cbb2c8112c | 7,325 | py | Python | mmseg/core/evaluation/class_names.py | weiyx16/mmsegmentation | 6d35d76195f173fbc6b119a7d7815e67d78024c6 | [
"Apache-2.0"
] | 18 | 2022-03-28T12:36:21.000Z | 2022-03-31T10:47:07.000Z | mmseg/core/evaluation/class_names.py | weiyx16/mmsegmentation | 6d35d76195f173fbc6b119a7d7815e67d78024c6 | [
"Apache-2.0"
] | 13 | 2022-02-15T20:05:18.000Z | 2022-02-15T20:05:21.000Z | mmseg/core/evaluation/class_names.py | weiyx16/mmsegmentation | 6d35d76195f173fbc6b119a7d7815e67d78024c6 | [
"Apache-2.0"
] | 4 | 2022-03-28T14:19:41.000Z | 2022-03-30T08:06:55.000Z | # Copyright (c) OpenMMLab. All rights reserved.
import mmcv
def cityscapes_classes():
"""Cityscapes class names for external use."""
return [
'road', 'sidewalk', 'building', 'wall', 'fence', 'pole',
'traffic light', 'traffic sign', 'vegetation', 'terrain', 'sky',
'person', 'rider', 'ca... | 47.564935 | 79 | 0.484642 |
5de8398b704d04047899f2ed2ed5eff0cf9f95aa | 1,371 | py | Python | src/models/activity_paper.py | mirgee/thesis_project | 296f292a84fe4756374d87c81e657ac991766a60 | [
"MIT"
] | null | null | null | src/models/activity_paper.py | mirgee/thesis_project | 296f292a84fe4756374d87c81e657ac991766a60 | [
"MIT"
] | 2 | 2020-03-24T17:03:19.000Z | 2020-03-31T03:19:19.000Z | src/models/activity_paper.py | mirgee/thesis_project | 296f292a84fe4756374d87c81e657ac991766a60 | [
"MIT"
] | null | null | null | from keras.models import Sequential
from keras.layers import Conv2D, MaxPooling2D, Activation, Dropout, Flatten, Dense, BatchNormalization
from keras.models import Sequential
from keras import optimizers
from keras import initializers
# From 'Classification of Recurrence Plots’ Distance Matrices with a Convolutional ... | 45.7 | 119 | 0.706054 |
32e0425be109268a570067cd95b0b8a86ca6bf4d | 199 | py | Python | controller/test_op.py | airlovelq/flask-frame | 86a97522a6eff4e34f0cd5c131ebf68f7c78390a | [
"Apache-2.0"
] | null | null | null | controller/test_op.py | airlovelq/flask-frame | 86a97522a6eff4e34f0cd5c131ebf68f7c78390a | [
"Apache-2.0"
] | null | null | null | controller/test_op.py | airlovelq/flask-frame | 86a97522a6eff4e34f0cd5c131ebf68f7c78390a | [
"Apache-2.0"
] | null | null | null | from .base_op import BaseOp
class TestOp(BaseOp):
def __init__(self, **kwargs):
super().__init__(**kwargs)
def test(self, msg):
return self._database.get_user_by_id(user_id) | 24.875 | 53 | 0.673367 |
f18c0483ef053224feda41a53b5a7770de9e095f | 2,373 | py | Python | examples/fetch.py | adbenitez/fbchat | 8052b818de5de9682f6d64405579ad640cd657ee | [
"BSD-3-Clause"
] | 1 | 2020-08-06T00:51:25.000Z | 2020-08-06T00:51:25.000Z | examples/fetch.py | adbenitez/fbchat | 8052b818de5de9682f6d64405579ad640cd657ee | [
"BSD-3-Clause"
] | null | null | null | examples/fetch.py | adbenitez/fbchat | 8052b818de5de9682f6d64405579ad640cd657ee | [
"BSD-3-Clause"
] | null | null | null | from itertools import islice
from fbchat import Client
from fbchat.models import *
client = Client("<email>", "<password>")
# Fetches a list of all users you're currently chatting with, as `User` objects
users = client.fetchAllUsers()
print("users' IDs: {}".format([user.uid for user in users]))
print("users' names: ... | 33.9 | 97 | 0.719343 |
277594fdad58a976f3b0de7bf2e8d6864cfe83ac | 2,850 | py | Python | SMS-Back-End/microservicio1/APIDB/aprovisionadorDBCrudo.py | mresti/StudentsManagementSystem | a1d67af517379b249630cac70a55bdfd9f77c54a | [
"Apache-2.0"
] | null | null | null | SMS-Back-End/microservicio1/APIDB/aprovisionadorDBCrudo.py | mresti/StudentsManagementSystem | a1d67af517379b249630cac70a55bdfd9f77c54a | [
"Apache-2.0"
] | null | null | null | SMS-Back-End/microservicio1/APIDB/aprovisionadorDBCrudo.py | mresti/StudentsManagementSystem | a1d67af517379b249630cac70a55bdfd9f77c54a | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#Fichero que cargará de contenido la base de datos para pruebas o cualquier otro menester.
import MySQLdb
db = MySQLdb.connect(host="localhost", user="root", passwd="root", db="smm");
cursor = db.cursor()
MAX=5
#Aprovisionamos de contenido la tabla Alumnos
'''
Esquema de la tabla:
CREATE TA... | 24.358974 | 144 | 0.614035 |
b2039665fd176be713ad304e6c5ecfb6d43592a4 | 92 | py | Python | .history/myblog/admin_20200416025918.py | abhinavmarwaha/demo-django-blog | c80a7d825e44d7e1589d9272c3583764562a2515 | [
"MIT"
] | null | null | null | .history/myblog/admin_20200416025918.py | abhinavmarwaha/demo-django-blog | c80a7d825e44d7e1589d9272c3583764562a2515 | [
"MIT"
] | null | null | null | .history/myblog/admin_20200416025918.py | abhinavmarwaha/demo-django-blog | c80a7d825e44d7e1589d9272c3583764562a2515 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Post
class PostAdmin(admin.ModelAdmin) | 23 | 33 | 0.836957 |
0887893cdb5abb36440f8755024552eea744deff | 172 | py | Python | app/__main__.py | heaptracetechnology/github | 7b7eaddf2e2eec4d28855c81d68ded65dc05cc09 | [
"MIT"
] | null | null | null | app/__main__.py | heaptracetechnology/github | 7b7eaddf2e2eec4d28855c81d68ded65dc05cc09 | [
"MIT"
] | null | null | null | app/__main__.py | heaptracetechnology/github | 7b7eaddf2e2eec4d28855c81d68ded65dc05cc09 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from . import app
from . import api
from . import graphql
from . import login
from . import webhooks
if __name__ == '__main__':
app.api.run() | 15.636364 | 26 | 0.656977 |
92ae209efc825a19636a0334eb49d982509a2f72 | 28,081 | py | Python | Guidelet/GuideletLib/Guidelet.py | basharbme/SlicerIGT | 00ff9bf070d538d5c713bfc375f544ee4e8033bc | [
"BSD-3-Clause"
] | 1 | 2019-07-10T02:43:48.000Z | 2019-07-10T02:43:48.000Z | Guidelet/GuideletLib/Guidelet.py | rprueckl/SlicerIGT | 00ff9bf070d538d5c713bfc375f544ee4e8033bc | [
"BSD-3-Clause"
] | null | null | null | Guidelet/GuideletLib/Guidelet.py | rprueckl/SlicerIGT | 00ff9bf070d538d5c713bfc375f544ee4e8033bc | [
"BSD-3-Clause"
] | null | null | null | import os
from __main__ import vtk, qt, ctk, slicer
import logging
import time
# fix unicode error by aliasing str as unicode in Python 3
if slicer.app.majorVersion >= 5 or (slicer.app.majorVersion >= 4 and slicer.app.minorVersion >= 11):
unicode = str
from .UltraSound import UltraSound
class Guidelet(object):
@... | 40.57948 | 149 | 0.712083 |
84958f398cb4096fd9d491ac28249cf18157a758 | 1,171 | py | Python | python/plots/plot_event.py | billy000400/ImageTrk | 085817e5ab76f3f753a8075bec54f5604a5c9b3d | [
"MIT"
] | null | null | null | python/plots/plot_event.py | billy000400/ImageTrk | 085817e5ab76f3f753a8075bec54f5604a5c9b3d | [
"MIT"
] | 1 | 2021-01-03T08:57:34.000Z | 2021-01-03T23:41:22.000Z | python/plots/plot_event.py | billy000400/ImageTrk | 085817e5ab76f3f753a8075bec54f5604a5c9b3d | [
"MIT"
] | null | null | null | import sys
from pathlib import Path
import numpy as np
from matplotlib import pyplot as plt
util_dir = Path.cwd().parent.joinpath('Utility')
sys.path.insert(1, str(util_dir))
from Information import *
from HitGenerators import Event
track_dir = Path("../../tracks")
db_files = [track_dir.joinpath('train_CeEndpoint-mi... | 27.232558 | 82 | 0.649018 |
384d856e8183dea6702c32e0bd60e0367df90cdf | 1,126 | py | Python | rundeck/defaults.py | otupman/rundeckrun | ca78bc7e9fb1becf940c949e20b820af89f9cecc | [
"Apache-2.0"
] | 49 | 2015-01-21T10:07:16.000Z | 2021-11-15T11:43:19.000Z | rundeck/defaults.py | otupman/rundeckrun | ca78bc7e9fb1becf940c949e20b820af89f9cecc | [
"Apache-2.0"
] | 19 | 2015-01-21T10:18:42.000Z | 2019-10-04T03:32:32.000Z | rundeck/defaults.py | otupman/rundeckrun | ca78bc7e9fb1becf940c949e20b820af89f9cecc | [
"Apache-2.0"
] | 32 | 2015-09-09T04:58:39.000Z | 2022-03-17T10:10:25.000Z | """
:summary: Default values
:license: Apache License, Version 2.0
:author: Mark LaPerriere
:contact: rundeckrun@mindmind.com
:copyright: Mark LaPerriere 2015
"""
__docformat__ = "restructuredtext en"
def enum(name, *sequential, **named):
values = dict(zip(sequential, range(len(sequential))), **named)
values... | 19.084746 | 67 | 0.645648 |
f77244a584ed40646735855711930fa9229515da | 3,550 | py | Python | homeassistant/components/ness_alarm/alarm_control_panel.py | itewk/home-assistant | 769cf19052f8c9ef374d8ba8ae7705ccc7bf4cf4 | [
"Apache-2.0"
] | 23 | 2017-11-15T21:03:53.000Z | 2021-03-29T21:33:48.000Z | homeassistant/components/ness_alarm/alarm_control_panel.py | itewk/home-assistant | 769cf19052f8c9ef374d8ba8ae7705ccc7bf4cf4 | [
"Apache-2.0"
] | 9 | 2022-01-27T06:32:10.000Z | 2022-03-31T07:07:51.000Z | homeassistant/components/ness_alarm/alarm_control_panel.py | itewk/home-assistant | 769cf19052f8c9ef374d8ba8ae7705ccc7bf4cf4 | [
"Apache-2.0"
] | 10 | 2018-01-01T00:12:51.000Z | 2021-12-21T23:08:05.000Z | """Support for Ness D8X/D16X alarm panel."""
import logging
from nessclient import ArmingState
import homeassistant.components.alarm_control_panel as alarm
from homeassistant.components.alarm_control_panel.const import (
SUPPORT_ALARM_ARM_AWAY,
SUPPORT_ALARM_ARM_HOME,
SUPPORT_ALARM_TRIGGER,
)
from homeas... | 30.869565 | 86 | 0.68338 |
2f1d8d40dd3ee600424a9d83658a463e94a5f2d9 | 566 | py | Python | fair/forcing/ozone_st.py | OMS-NetZero/FAIR-pro | 61b068858a043c21916f5e73bedd91eec0d27c57 | [
"Apache-2.0"
] | 4 | 2017-09-26T12:04:04.000Z | 2020-04-16T16:29:06.000Z | fair/forcing/ozone_st.py | OMS-NetZero/FAIR-pro | 61b068858a043c21916f5e73bedd91eec0d27c57 | [
"Apache-2.0"
] | 16 | 2017-06-17T07:42:50.000Z | 2018-07-27T16:01:03.000Z | fair/forcing/ozone_st.py | OMS-NetZero/FAIR-pro | 61b068858a043c21916f5e73bedd91eec0d27c57 | [
"Apache-2.0"
] | 2 | 2017-07-04T12:06:23.000Z | 2017-07-04T12:07:41.000Z | import numpy as np
from ..constants import cl_atoms, br_atoms, fracrel
def magicc(C_ODS,
C0,
eta1=-1.46030698e-5,
eta2=2.05401270e-3,
eta3=1.03143308):
Cl = np.array(cl_atoms.aslist)
Br = np.array(br_atoms.aslist)
FC = np.array(fracrel.aslist)
EESC = (np.s... | 24.608696 | 65 | 0.565371 |
3befa25b4a4efeb95aefb397ce5b2c674720a76d | 414 | py | Python | EstruturaSequencial/exercicio8.py | EugenioAntunes/lista-de-exercicios | 4f19d30b502da064171d7d148b4e235e253fe992 | [
"MIT"
] | null | null | null | EstruturaSequencial/exercicio8.py | EugenioAntunes/lista-de-exercicios | 4f19d30b502da064171d7d148b4e235e253fe992 | [
"MIT"
] | null | null | null | EstruturaSequencial/exercicio8.py | EugenioAntunes/lista-de-exercicios | 4f19d30b502da064171d7d148b4e235e253fe992 | [
"MIT"
] | null | null | null | '''
8.Faça um Programa que pergunte quanto você ganha por hora e o número de horas trabalhadas no mês. Calcule e mostre o total do seu salário no referido mês.
'''
valor_hora = float(input('Valor da hora: '))
qunt_hora = int(input('Quantidade de horas trabalhadas: '))
def salario(valor_hora, qunt_hora):
return va... | 41.4 | 156 | 0.746377 |
6532f4b9ca309604bb35641c5de385784d406c75 | 17,771 | py | Python | mgetool/imports.py | MGEdata/mgetool | 6f5a46b47c7abe58b26727080de4b82e76746112 | [
"BSD-3-Clause"
] | 1 | 2021-12-28T09:27:10.000Z | 2021-12-28T09:27:10.000Z | mgetool/imports.py | boliqq07/mgetool | 6f5a46b47c7abe58b26727080de4b82e76746112 | [
"BSD-3-Clause"
] | null | null | null | mgetool/imports.py | boliqq07/mgetool | 6f5a46b47c7abe58b26727080de4b82e76746112 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/python3.7
# -*- coding: utf-8 -*-
# @Time : 2019/7/29 19:47
# @Author : Administrator
# @Software: PyCharm
# @License: BSD 3-Clause
"""
Notes:
import data simply.
# Just a copy from xenonpy
for pictures use skimage.io.ImageCollection
"""
import copy
import glob
import os
import re
import sh... | 32.193841 | 109 | 0.533622 |
985c9f7b13b348633d97babe0fd8230b8c09c946 | 2,018 | py | Python | pontoon/insights/models.py | dothq/pontoon | fa85710f56e50d500e6bf8e6c82626ce64440a62 | [
"BSD-3-Clause"
] | 1 | 2021-10-03T20:48:42.000Z | 2021-10-03T20:48:42.000Z | pontoon/insights/models.py | dothq/pontoon | fa85710f56e50d500e6bf8e6c82626ce64440a62 | [
"BSD-3-Clause"
] | 14 | 2021-06-05T00:09:20.000Z | 2021-09-03T01:48:36.000Z | pontoon/insights/models.py | dothq/pontoon | fa85710f56e50d500e6bf8e6c82626ce64440a62 | [
"BSD-3-Clause"
] | null | null | null | from datetime import timedelta
from django.db import models
from django.utils import timezone
from pontoon.base.models import AggregatedStats
def active_users_default():
return {
"managers": 0,
"reviewers": 0,
"contributors": 0,
}
class InsightsSnapshot(AggregatedStats, models.Model... | 34.20339 | 80 | 0.777502 |
479a0f434cfdf5d2c2915f8fa16ad9980e630b8c | 4,904 | py | Python | constance/backends/database/__init__.py | Anders-Linden/django-constance | 41762b3dd6a9194c4d062261246d95ddb3677d7e | [
"BSD-3-Clause"
] | null | null | null | constance/backends/database/__init__.py | Anders-Linden/django-constance | 41762b3dd6a9194c4d062261246d95ddb3677d7e | [
"BSD-3-Clause"
] | null | null | null | constance/backends/database/__init__.py | Anders-Linden/django-constance | 41762b3dd6a9194c4d062261246d95ddb3677d7e | [
"BSD-3-Clause"
] | null | null | null | from django.core.cache import caches
from django.http import request
from django.contrib.sites.shortcuts import get_current_site
from django.core.cache.backends.locmem import LocMemCache
from django.core.exceptions import ImproperlyConfigured
from django.db import (
IntegrityError,
OperationalError,
Program... | 37.151515 | 109 | 0.618679 |
1ea9e1c3a17d30ac35b053d4e2563897802a1f5d | 360 | py | Python | desktop.py | babyabdul/GUI_Tkinter | 7c2bf09fede95d22a90da786f55dfd2052b8f87f | [
"MIT"
] | null | null | null | desktop.py | babyabdul/GUI_Tkinter | 7c2bf09fede95d22a90da786f55dfd2052b8f87f | [
"MIT"
] | null | null | null | desktop.py | babyabdul/GUI_Tkinter | 7c2bf09fede95d22a90da786f55dfd2052b8f87f | [
"MIT"
] | null | null | null | from tkinter import *
root = Tk()
#1. Creating a label Widget
myLabek1 = Label(root, text="Hello From TKinter")
myLabek2 = Label(root, text="My name is Abdul Rafik")
myLabel3 = Label(root, text="")
# 2.Showing it onto screen
myLabek1.grid(row=0, column=0)
myLabek2.grid(row=1, column=5)
myLabel3.... | 20 | 54 | 0.672222 |
b8027c36538607548a4aeda994432706ea9cf9de | 3,633 | py | Python | yandex/cloud/mdb/kafka/v1/common_pb2.py | korsar182/python-sdk | 873bf2a9b136a8f2faae72e86fae1f5b5c3d896a | [
"MIT"
] | 36 | 2018-12-23T13:51:50.000Z | 2022-03-25T07:48:24.000Z | yandex/cloud/mdb/kafka/v1/common_pb2.py | korsar182/python-sdk | 873bf2a9b136a8f2faae72e86fae1f5b5c3d896a | [
"MIT"
] | 15 | 2019-02-28T04:55:09.000Z | 2022-03-06T23:17:24.000Z | yandex/cloud/mdb/kafka/v1/common_pb2.py | korsar182/python-sdk | 873bf2a9b136a8f2faae72e86fae1f5b5c3d896a | [
"MIT"
] | 18 | 2019-02-23T07:10:57.000Z | 2022-03-28T14:41:08.000Z | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: yandex/cloud/mdb/kafka/v1/common.proto
"""Generated protocol buffer code."""
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _m... | 39.48913 | 585 | 0.784476 |
e0ea9c53ed365f420bf3f60807d3393e9a519ec5 | 239 | py | Python | unzip_all/unzip_all.py | samuelyeungkc/PythonToolBox | fba65bd87239ede54e9a206cd4a90344723d619d | [
"MIT"
] | null | null | null | unzip_all/unzip_all.py | samuelyeungkc/PythonToolBox | fba65bd87239ede54e9a206cd4a90344723d619d | [
"MIT"
] | null | null | null | unzip_all/unzip_all.py | samuelyeungkc/PythonToolBox | fba65bd87239ede54e9a206cd4a90344723d619d | [
"MIT"
] | null | null | null | import os
import subprocess
list = os.listdir(".")
unzipped = []
for f in list:
if f != __file__ and f.endswith(".zip"):
subprocess.call(["unzip", f])
unzipped.append(f)
print "Unzipped file : " + str(unzipped)
print os.listdir(".")
| 19.916667 | 41 | 0.661088 |
92946d8d839cf10a23473640c52b39d653738fdd | 1,647 | py | Python | tests/TestScripts/testConfigureDisable.py | sketchylizard/Catch2 | c9df70e34e631ca22dad6480a13a65c24034a4af | [
"BSL-1.0"
] | 62 | 2021-09-21T18:58:02.000Z | 2022-03-07T02:17:43.000Z | tests/TestScripts/testConfigureDisable.py | sketchylizard/Catch2 | c9df70e34e631ca22dad6480a13a65c24034a4af | [
"BSL-1.0"
] | 8 | 2017-11-03T12:08:09.000Z | 2017-11-03T12:08:10.000Z | tests/TestScripts/testConfigureDisable.py | sketchylizard/Catch2 | c9df70e34e631ca22dad6480a13a65c24034a4af | [
"BSL-1.0"
] | null | null | null | #!/usr/bin/env python3
# Copyright Catch2 Authors
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# https://www.boost.org/LICENSE_1_0.txt)
# SPDX-License-Identifier: BSL-1.0
from ConfigureTestsCommon import configure_and_build, ru... | 33.612245 | 90 | 0.645416 |
5c6c0dd154f2cbf7f644c35c4a7bf94ea93eac69 | 259 | py | Python | app.py | Orange9887/taxSystem | 2ebf51826f1f997c999581613a7a1ce12cae8397 | [
"Apache-2.0"
] | null | null | null | app.py | Orange9887/taxSystem | 2ebf51826f1f997c999581613a7a1ce12cae8397 | [
"Apache-2.0"
] | null | null | null | app.py | Orange9887/taxSystem | 2ebf51826f1f997c999581613a7a1ce12cae8397 | [
"Apache-2.0"
] | null | null | null | from flask import Flask
app = Flask(__name__)
@app.route('/')
def hello_world():
return 'Hello World!'
@app.route('/')
def hello_world():
return 'Hello World1!'
if __name__ == '__main__':
app.run()
if __name__ == '__main__':
app.run()
| 12.333333 | 26 | 0.621622 |
f0c362fe516a7bc9b5fe0168a106fab58a691ca3 | 12,176 | py | Python | yellowbox/extras/webserver/webserver.py | bharel/Yellowbox | d397d878ccd074af21f552cb1375714ba97e9e22 | [
"MIT"
] | 1 | 2020-08-07T20:02:12.000Z | 2020-08-07T20:02:12.000Z | yellowbox/extras/webserver/webserver.py | bharel/yellowbox | d397d878ccd074af21f552cb1375714ba97e9e22 | [
"MIT"
] | null | null | null | yellowbox/extras/webserver/webserver.py | bharel/yellowbox | d397d878ccd074af21f552cb1375714ba97e9e22 | [
"MIT"
] | null | null | null | from __future__ import annotations
from contextlib import contextmanager
from threading import Lock, Thread
from time import sleep
from typing import ContextManager, Iterator, Mapping, Optional, Union, overload
from requests import ConnectionError, HTTPError, get
from starlette.applications import Starlette
from star... | 37.235474 | 120 | 0.620894 |
c882caa8a1bf937b8d42e3e5d4b4f79a49d8f4a6 | 970 | py | Python | samples/python_durable_bindings/DurableOrchestrationTrigger/__init__.py | msarm/azure-functions-durable-python | 8ecd30574502f34332e9e61d269f79a3fd66b666 | [
"MIT"
] | 9 | 2019-08-16T15:37:51.000Z | 2020-05-12T17:33:50.000Z | samples/python_durable_bindings/DurableOrchestrationTrigger/__init__.py | msarm/azure-functions-durable-python | 8ecd30574502f34332e9e61d269f79a3fd66b666 | [
"MIT"
] | 7 | 2019-07-26T00:24:20.000Z | 2020-01-29T16:30:06.000Z | samples/python_durable_bindings/DurableOrchestrationTrigger/__init__.py | msarm/azure-functions-durable-python | 8ecd30574502f34332e9e61d269f79a3fd66b666 | [
"MIT"
] | 11 | 2019-07-22T17:40:47.000Z | 2020-06-24T14:43:18.000Z | import logging
import azure.functions as func
import azure.durable_functions as df
def generator_function(context):
outputs = []
task1 = yield context.df.callActivity("DurableActivity", "One")
logging.warn(f"!!!task1: {task1}")
task2 = yield context.df.callActivity("DurableActivity", "Two... | 28.529412 | 70 | 0.663918 |
3d380ff0385206b1628eb8afe98892d7b36dd5de | 20,268 | py | Python | tensorflow/lite/testing/zip_test_utils.py | leike666666/tensorflow | a3fd0ddfcb716be124e95b51e96e6c1e4507ef64 | [
"Apache-2.0"
] | 2 | 2021-08-03T18:03:33.000Z | 2021-08-03T18:03:49.000Z | tensorflow/lite/testing/zip_test_utils.py | leike666666/tensorflow | a3fd0ddfcb716be124e95b51e96e6c1e4507ef64 | [
"Apache-2.0"
] | 2 | 2021-08-25T16:14:24.000Z | 2022-02-10T02:58:17.000Z | tensorflow/lite/testing/zip_test_utils.py | leike666666/tensorflow | a3fd0ddfcb716be124e95b51e96e6c1e4507ef64 | [
"Apache-2.0"
] | 1 | 2017-11-27T02:55:11.000Z | 2017-11-27T02:55:11.000Z | # Copyright 2019 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... | 37.120879 | 80 | 0.667357 |
bfbe662442307b6d1c359f9d2e939fc870461f2c | 2,624 | py | Python | shape_bruteforce/training.py | ahmedkhalf/Shape-Bruteforce | 4a9c205c9777c07a1fa7ecf7f4b27549b2d7dc7a | [
"MIT"
] | 2 | 2020-07-27T15:02:57.000Z | 2022-03-12T02:41:02.000Z | shape_bruteforce/training.py | ahmedkhalf/Shape-Bruteforce | 4a9c205c9777c07a1fa7ecf7f4b27549b2d7dc7a | [
"MIT"
] | null | null | null | shape_bruteforce/training.py | ahmedkhalf/Shape-Bruteforce | 4a9c205c9777c07a1fa7ecf7f4b27549b2d7dc7a | [
"MIT"
] | null | null | null | import random
import math
import cairo
import numpy as np
import tqdm
from shape_bruteforce import shapes
class Image:
def __init__(self, width, height):
self.width = width
self.height = height
self.surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, width, height)
self.ctx = cairo... | 32 | 101 | 0.61471 |
a20ea0117cb13cb33ce797f281755d892050b2ea | 2,094 | py | Python | pierre-feuille-ciseaux.py | xeorion/pierre-feuille-ciseaux | abc880dcc4c2290765d606854b168793e640164e | [
"CC0-1.0"
] | null | null | null | pierre-feuille-ciseaux.py | xeorion/pierre-feuille-ciseaux | abc880dcc4c2290765d606854b168793e640164e | [
"CC0-1.0"
] | null | null | null | pierre-feuille-ciseaux.py | xeorion/pierre-feuille-ciseaux | abc880dcc4c2290765d606854b168793e640164e | [
"CC0-1.0"
] | null | null | null | #Voici un petit pierre, feuille, ciseaux. Créé le 21/11/2021
import numpy as np #on importe la blibliothèque qui nous permet de faire un choix aléatoire pour l'ordianateur
choix=['pierre', 'feuille', 'ciseaux'] #on initialise une variable listant les différents choix possibles pour l'ordinateur
gg='Bravo, vous avez ... | 38.777778 | 123 | 0.680038 |
56bc55b0350bab8733573425a2e63ed484c5752c | 2,260 | py | Python | tests/e2e/test_running_cluster_monitoring_with_persistent_storage.py | jhutar/ocs-ci | da604424550ffa4af0bd1cfc4447a539a85164e6 | [
"MIT"
] | null | null | null | tests/e2e/test_running_cluster_monitoring_with_persistent_storage.py | jhutar/ocs-ci | da604424550ffa4af0bd1cfc4447a539a85164e6 | [
"MIT"
] | null | null | null | tests/e2e/test_running_cluster_monitoring_with_persistent_storage.py | jhutar/ocs-ci | da604424550ffa4af0bd1cfc4447a539a85164e6 | [
"MIT"
] | null | null | null | import logging
import pytest
from ocs_ci.ocs.ocp import OCP
from ocs_ci.framework.testlib import tier1, E2ETest
from ocs_ci.ocs.resources.pvc import delete_pvcs
from ocs_ci.ocs.monitoring import (
create_configmap_cluster_monitoring_pod,
validate_pvc_created_and_bound_on_monitoring_pods,
validate_pvc_are_... | 28.974359 | 73 | 0.738053 |
8369f46a608b102cf95e62939ee8f97e34633932 | 7,267 | py | Python | tests/test_snap.py | aalexanderkevin/midtrans-python-client | b026075d2a38f86c96627d16d60cc02ebd3ed9b2 | [
"MIT"
] | null | null | null | tests/test_snap.py | aalexanderkevin/midtrans-python-client | b026075d2a38f86c96627d16d60cc02ebd3ed9b2 | [
"MIT"
] | null | null | null | tests/test_snap.py | aalexanderkevin/midtrans-python-client | b026075d2a38f86c96627d16d60cc02ebd3ed9b2 | [
"MIT"
] | null | null | null | import pytest
from .helpers import is_str
from .context import midtransclient
import datetime
from pprint import pprint
reused_order_id = "py-midtransclient-test-"+str(datetime.datetime.now()).replace(" ", "").replace(":", "")
def test_snap_class():
snap = generate_snap_instance()
methods = dir(snap)
asse... | 32.882353 | 270 | 0.562818 |
08d15b9c17723f4a0c65eef69635972c7a21108c | 1,340 | py | Python | aa2020/python/plot_shortest_path_tree.py | gianlucacovini/opt4ds | c8927ad36cace51c501527b2f8e8e93857c80d95 | [
"MIT"
] | 14 | 2020-03-04T18:02:47.000Z | 2022-02-27T17:40:09.000Z | aa2020/python/plot_shortest_path_tree.py | gianlucacovini/opt4ds | c8927ad36cace51c501527b2f8e8e93857c80d95 | [
"MIT"
] | 1 | 2021-03-23T11:47:24.000Z | 2021-03-28T12:23:21.000Z | aa2020/python/plot_shortest_path_tree.py | mathcoding/opt4ds | 42904fd56c18a83fd5ff6f068bbd20b055a40734 | [
"MIT"
] | 7 | 2020-03-12T23:41:21.000Z | 2022-03-03T13:41:29.000Z | # -*- coding: utf-8 -*-
"""
Created on Thu Mar 26 11:14:53 2020
@author: Gualandi
"""
import networkx as nx
import matplotlib.pyplot as plt
Ls = [('a', 'b', 5), ('a', 'c', 3), ('a', 'd', 3), ('b', 'c', 2),
('b', 'd', 5), ('c', 'e', 2), ('c', 'd', 3), ('d', 'e', 2),
('d', 'f', 3), ('e', 'g', 3), ('f', '... | 29.130435 | 84 | 0.578358 |
e7681b697a99068749e1c13b5d99139a9495e0ff | 14,891 | py | Python | oslo-modules/oslo_db/sqlalchemy/engines.py | esse-io/zen-common | 8ede82ab81bad53c3b947084b812c44e329f159b | [
"Apache-2.0"
] | null | null | null | oslo-modules/oslo_db/sqlalchemy/engines.py | esse-io/zen-common | 8ede82ab81bad53c3b947084b812c44e329f159b | [
"Apache-2.0"
] | null | null | null | oslo-modules/oslo_db/sqlalchemy/engines.py | esse-io/zen-common | 8ede82ab81bad53c3b947084b812c44e329f159b | [
"Apache-2.0"
] | null | null | null | # Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a ... | 35.454762 | 79 | 0.665704 |
001d2b53fb66094a41d034ab82c4992d3f4992ea | 3,575 | py | Python | vg_analyze_relationships.py | MeMAD-project/statistic-tools | 6257d3913b4a359516dd93a89730ca4e3bf0565b | [
"MIT"
] | 1 | 2020-06-10T11:17:00.000Z | 2020-06-10T11:17:00.000Z | vg_analyze_relationships.py | MeMAD-project/statistical-tools | 6257d3913b4a359516dd93a89730ca4e3bf0565b | [
"MIT"
] | null | null | null | vg_analyze_relationships.py | MeMAD-project/statistical-tools | 6257d3913b4a359516dd93a89730ca4e3bf0565b | [
"MIT"
] | null | null | null | import sys
import analysis_funs as va
import argparse
def main(args):
print("Loading relationships data from: {}".format(args.relationships_json))
data = va.load_json(args.relationships_json)
assert len(data) == 108077
print("=" * 80)
if args.rel_counts:
print("Count all relationships (... | 44.135802 | 87 | 0.593287 |
a9965939b0e0fc629e29e9ff3a0bb6a34a23ddaf | 347 | py | Python | Classes/TP2/Lat-long/lat_long-v2.py | LuisPereira23/PL-2021 | 951190835d8989e3afda1fd0f8f9ef08f5d85e07 | [
"MIT"
] | null | null | null | Classes/TP2/Lat-long/lat_long-v2.py | LuisPereira23/PL-2021 | 951190835d8989e3afda1fd0f8f9ef08f5d85e07 | [
"MIT"
] | null | null | null | Classes/TP2/Lat-long/lat_long-v2.py | LuisPereira23/PL-2021 | 951190835d8989e3afda1fd0f8f9ef08f5d85e07 | [
"MIT"
] | null | null | null | import re
latLong = re.compile(r'(^\([+\-]?([1-8]?[0-9](\.[0-9]+)?|90(\.0+)?), [+\-]?((([1-9]?[0-9]|1[0-7][0-9])(\.[0-9]+)?)|180(\.0+)?)\)$)')
n = int(input())
for i in range(n):
linha = input()
res = latLong.search(linha)
if(res):
print(res)
print("VALIDO")
else:
print(linha)... | 21.6875 | 132 | 0.43804 |
a37017aeea4d3700f8a5d481a1f64b45645a38f6 | 6,420 | py | Python | aiida/backends/sqlalchemy/migrations/versions/a6048f0ffca8_update_linktypes.py | astamminger/aiida_core | b01ad8236f21804f273c9d2a0365ecee62255cbb | [
"BSD-2-Clause"
] | null | null | null | aiida/backends/sqlalchemy/migrations/versions/a6048f0ffca8_update_linktypes.py | astamminger/aiida_core | b01ad8236f21804f273c9d2a0365ecee62255cbb | [
"BSD-2-Clause"
] | null | null | null | aiida/backends/sqlalchemy/migrations/versions/a6048f0ffca8_update_linktypes.py | astamminger/aiida_core | b01ad8236f21804f273c9d2a0365ecee62255cbb | [
"BSD-2-Clause"
] | 1 | 2018-12-21T11:10:09.000Z | 2018-12-21T11:10:09.000Z | # -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
# ... | 45.211268 | 120 | 0.614953 |
a3e346c11ade601676eb14a61f45c970e1f2887e | 593 | py | Python | webempresa/pages/migrations/0003_auto_20190924_1131.py | FelixCastillo798/web-empresa-curso-django-2 | 26d24e62175160cf8e1b57f411361b17e5fdcc20 | [
"Apache-2.0"
] | null | null | null | webempresa/pages/migrations/0003_auto_20190924_1131.py | FelixCastillo798/web-empresa-curso-django-2 | 26d24e62175160cf8e1b57f411361b17e5fdcc20 | [
"Apache-2.0"
] | null | null | null | webempresa/pages/migrations/0003_auto_20190924_1131.py | FelixCastillo798/web-empresa-curso-django-2 | 26d24e62175160cf8e1b57f411361b17e5fdcc20 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 2.0.2 on 2019-09-24 16:31
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('pages', '0002_auto_20190920_1958'),
]
operations = [
migrations.AlterModelOptions(
name='page',
options={'ordering':... | 25.782609 | 113 | 0.588533 |
0afbb9809034c9265c2172633d0222221386eb73 | 16,170 | py | Python | src/data_loader/loader.py | zsscode/MGP-AttTCN | 7659af8c69204a3ad557f22593ea0027ee3003a5 | [
"MIT"
] | null | null | null | src/data_loader/loader.py | zsscode/MGP-AttTCN | 7659af8c69204a3ad557f22593ea0027ee3003a5 | [
"MIT"
] | null | null | null | src/data_loader/loader.py | zsscode/MGP-AttTCN | 7659af8c69204a3ad557f22593ea0027ee3003a5 | [
"MIT"
] | 1 | 2020-09-01T12:17:36.000Z | 2020-09-01T12:17:36.000Z | import os
import pickle
import sys
import tensorflow as tf
# appending head path
cwd = os.path.dirname(os.path.abspath(__file__))
head = os.path.abspath(os.path.join(cwd, os.pardir, os.pardir))
sys.path.append(head)
from src.utils.debug import t_print
from src.data_loader.utils import reduce_data, new_indices, pad_raw... | 53.016393 | 133 | 0.54026 |
a2ccb17ecf6e2e53b98e52198074a94a115ae93f | 633 | py | Python | contrib/qt_translations.py | zero24x/billiecoin | 1b943b84aa687136edeb6c1fa258705a99157463 | [
"MIT"
] | 3 | 2020-02-06T11:26:43.000Z | 2020-03-29T16:16:30.000Z | contrib/qt_translations.py | zero24x/billiecoin | 1b943b84aa687136edeb6c1fa258705a99157463 | [
"MIT"
] | null | null | null | contrib/qt_translations.py | zero24x/billiecoin | 1b943b84aa687136edeb6c1fa258705a99157463 | [
"MIT"
] | 3 | 2020-01-30T20:11:16.000Z | 2021-08-09T05:59:05.000Z | #!/usr/bin/env python
# Helpful little script that spits out a comma-separated list of
# language codes for Qt icons that should be included
# in binary Billiecoin Core distributions
import glob
import os
import re
import sys
if len(sys.argv) != 3:
sys.exit("Usage: %s $QTDIR/translations $BILLIECOINDIR/src/qt/loca... | 27.521739 | 114 | 0.688784 |
c14f5244df62e3be421bf19941eea7e7fbb8fb3e | 1,786 | py | Python | molecool/visualize.py | molssi-workshops/molecool | e875876e8333b1ae5f97c2f8907836b861264e50 | [
"BSD-3-Clause"
] | null | null | null | molecool/visualize.py | molssi-workshops/molecool | e875876e8333b1ae5f97c2f8907836b861264e50 | [
"BSD-3-Clause"
] | 1 | 2021-09-17T18:19:04.000Z | 2021-09-17T18:19:04.000Z | molecool/visualize.py | molssi-workshops/molecool | e875876e8333b1ae5f97c2f8907836b861264e50 | [
"BSD-3-Clause"
] | null | null | null | """
Functions for visualization of molecules.
"""
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
from .atom_data import atom_colors
def draw_molecule(coordinates, symbols, draw_bonds=None, save_location=None, dpi=300):
# Draw a picture of a molecule using matplotlib... | 25.514286 | 98 | 0.655655 |
4c56bb1eccef5f9d87378c531608b9d2152a7365 | 2,828 | py | Python | Algorithms_medium/1429. First Unique Number.py | VinceW0/Leetcode_Python_solutions | 09e9720afce21632372431606ebec4129eb79734 | [
"Xnet",
"X11"
] | 4 | 2020-08-11T20:45:15.000Z | 2021-03-12T00:33:34.000Z | Algorithms_medium/1429. First Unique Number.py | VinceW0/Leetcode_Python_solutions | 09e9720afce21632372431606ebec4129eb79734 | [
"Xnet",
"X11"
] | null | null | null | Algorithms_medium/1429. First Unique Number.py | VinceW0/Leetcode_Python_solutions | 09e9720afce21632372431606ebec4129eb79734 | [
"Xnet",
"X11"
] | null | null | null | """
1429. First Unique Number
Medium
You have a queue of integers, you need to retrieve the first unique integer in the queue.
Implement the FirstUnique class:
FirstUnique(int[] nums) Initializes the object with the numbers in the queue.
int showFirstUnique() returns the value of the first unique integer of the que... | 31.076923 | 125 | 0.641089 |
f5a35cfc9b81c0c6a6c195f2fbc4735513435ff4 | 1,033 | py | Python | profiling/bspline_point_calculation.py | jkjt/ezdxf | 2acc5611b81476ea16b98063b9f55446a9182b81 | [
"MIT"
] | 515 | 2017-01-25T05:46:52.000Z | 2022-03-29T09:52:27.000Z | profiling/bspline_point_calculation.py | jkjt/ezdxf | 2acc5611b81476ea16b98063b9f55446a9182b81 | [
"MIT"
] | 417 | 2017-01-25T10:01:17.000Z | 2022-03-29T09:22:04.000Z | profiling/bspline_point_calculation.py | jkjt/ezdxf | 2acc5611b81476ea16b98063b9f55446a9182b81 | [
"MIT"
] | 149 | 2017-02-01T15:52:02.000Z | 2022-03-17T10:33:38.000Z | # Copyright (c) 2020, Manfred Moitzi
# License: MIT License
from typing import Iterable
import time
import ezdxf
from pathlib import Path
import math
from ezdxf.math import global_bspline_interpolation, linspace
from ezdxf.render import random_3d_path
DIR = Path("~/Desktop/Outbox").expanduser()
path = list(random_3d_... | 24.595238 | 77 | 0.712488 |
6ca1963479ff1683b88dfd03c218e1a40b956b67 | 173 | py | Python | pacote-download/CursoemVideo/ex066.py | pemedeiros/python-CeV | e34eebdfd6f5cf254a9ad1ce076083c735f68f28 | [
"MIT"
] | null | null | null | pacote-download/CursoemVideo/ex066.py | pemedeiros/python-CeV | e34eebdfd6f5cf254a9ad1ce076083c735f68f28 | [
"MIT"
] | null | null | null | pacote-download/CursoemVideo/ex066.py | pemedeiros/python-CeV | e34eebdfd6f5cf254a9ad1ce076083c735f68f28 | [
"MIT"
] | null | null | null | c = s = 0
while True:
n = int(input('Digite um número(999 para parar): '))
if n == 999:
break
c += 1
s += n
print(f'A soma dos {c} números foi {s}')
| 19.222222 | 56 | 0.508671 |
c723fb4c711526c86b4199ba294c9f333a4f5b74 | 930 | py | Python | view_breadcrumbs/generic/delete.py | sveetch/django-view-breadcrumbs | 95943340b6cf5ffa98b73aa8fa553d96cd57c6fe | [
"BSD-3-Clause"
] | 29 | 2020-10-17T05:28:52.000Z | 2022-03-10T21:14:06.000Z | view_breadcrumbs/generic/delete.py | sveetch/django-view-breadcrumbs | 95943340b6cf5ffa98b73aa8fa553d96cd57c6fe | [
"BSD-3-Clause"
] | 225 | 2020-08-17T13:21:41.000Z | 2022-03-31T11:58:50.000Z | view_breadcrumbs/generic/delete.py | sveetch/django-view-breadcrumbs | 95943340b6cf5ffa98b73aa8fa553d96cd57c6fe | [
"BSD-3-Clause"
] | 5 | 2021-04-24T21:30:21.000Z | 2021-11-01T20:28:19.000Z | from django.urls import reverse
from ..utils import action_view_name, classproperty
from .list import ListBreadcrumbMixin
class DeleteBreadcrumbMixin(ListBreadcrumbMixin):
@classproperty
def delete_view_name(self):
return action_view_name(
model=self.model,
action=self.delete_... | 28.181818 | 84 | 0.648387 |
38719afcc01b477ec643c795a4d82dada574aa33 | 2,156 | py | Python | mak/libs/pyxx/cxx/grammar/template/name.py | bugengine/BugEngine | 1b3831d494ee06b0bd74a8227c939dd774b91226 | [
"BSD-3-Clause"
] | 4 | 2015-05-13T16:28:36.000Z | 2017-05-24T15:34:14.000Z | mak/libs/pyxx/cxx/grammar/template/name.py | bugengine/BugEngine | 1b3831d494ee06b0bd74a8227c939dd774b91226 | [
"BSD-3-Clause"
] | null | null | null | mak/libs/pyxx/cxx/grammar/template/name.py | bugengine/BugEngine | 1b3831d494ee06b0bd74a8227c939dd774b91226 | [
"BSD-3-Clause"
] | 1 | 2017-03-21T08:28:07.000Z | 2017-03-21T08:28:07.000Z | """
simple-template-id:
template-name < template-argument-list? >
template-id:
simple-template-id
operator-function-id < template-argument-list? >
literal-operator-id < template-argument-list? >
template-name:
identifier
template-argument-list:
template-argument ...?
template-argument-lis... | 26.617284 | 103 | 0.707328 |
b5ff7d8bc8ffb893045f23875c17c07ae96def75 | 1,038 | py | Python | tripleoclient/tests/v1/overcloud_ffwd_upgrade/fakes.py | cloudnull/python-tripleoclient | 93952566d6615deb2c81467df7743d872ff77e8d | [
"Apache-2.0"
] | null | null | null | tripleoclient/tests/v1/overcloud_ffwd_upgrade/fakes.py | cloudnull/python-tripleoclient | 93952566d6615deb2c81467df7743d872ff77e8d | [
"Apache-2.0"
] | null | null | null | tripleoclient/tests/v1/overcloud_ffwd_upgrade/fakes.py | cloudnull/python-tripleoclient | 93952566d6615deb2c81467df7743d872ff77e8d | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | 29.657143 | 77 | 0.739884 |
795eb767d48958deae999ffe011691cd57517ba6 | 1,451 | py | Python | Codementor.io/GarethDwyer/apps/flask-crud-app/bookmanager.py | nitin-cherian/Webapps | fbfbef6cb22fc742ee66460268afe6ff7834faa1 | [
"MIT"
] | 1 | 2017-11-22T08:56:06.000Z | 2017-11-22T08:56:06.000Z | Codementor.io/GarethDwyer/apps/flask-crud-app/bookmanager.py | nitin-cherian/Webapps | fbfbef6cb22fc742ee66460268afe6ff7834faa1 | [
"MIT"
] | null | null | null | Codementor.io/GarethDwyer/apps/flask-crud-app/bookmanager.py | nitin-cherian/Webapps | fbfbef6cb22fc742ee66460268afe6ff7834faa1 | [
"MIT"
] | null | null | null | # bookmanager.py
import os
from flask import Flask, render_template, request, redirect
from flask_sqlalchemy import SQLAlchemy
project_dir = os.path.dirname(os.path.abspath(__file__))
database_file = "sqlite:///{}".format(os.path.join(project_dir, "bookdatabase.db"))
app = Flask(__name__)
app.config['SQLALCHEMY_DATAB... | 25.017241 | 83 | 0.665748 |
36f1d988ebf12f6af33a2f9420d4202e3693dc32 | 342 | py | Python | pydash/Dash/Properties/Components.py | ensomniac/dash | 5a5cabd1a1d057015dd1446b6b1000af1e521355 | [
"MIT"
] | null | null | null | pydash/Dash/Properties/Components.py | ensomniac/dash | 5a5cabd1a1d057015dd1446b6b1000af1e521355 | [
"MIT"
] | null | null | null | pydash/Dash/Properties/Components.py | ensomniac/dash | 5a5cabd1a1d057015dd1446b6b1000af1e521355 | [
"MIT"
] | null | null | null | #!/usr/bin/python
#
# 2022 Ryan Martin, ryan@ensomniac.com
# Andrew Stet, stetandrew@gmail.com
import os
import sys
from Dash.Properties.Configuration import Configuration
class Components(Configuration):
def __init__(self, dash_context_asset_path):
Configuration.__init__(self, dash_context_asset_p... | 22.8 | 78 | 0.77193 |
39fa63cbbe0404392afbf01b3659827d53536475 | 2,897 | py | Python | file/fetch_data_tse_party_members.py | gabrielacaesar/partei-brasilien | 356a139b495949b00afaa70f78e15631f8dbadbd | [
"MIT"
] | null | null | null | file/fetch_data_tse_party_members.py | gabrielacaesar/partei-brasilien | 356a139b495949b00afaa70f78e15631f8dbadbd | [
"MIT"
] | null | null | null | file/fetch_data_tse_party_members.py | gabrielacaesar/partei-brasilien | 356a139b495949b00afaa70f78e15631f8dbadbd | [
"MIT"
] | null | null | null | """"
This script downloads and format some data from TSE website.
The first objective with this data is to obtain a list of members of parties in Brazil.
In july 2017, the data available in TSE website contained information about membership and disfellowship in brazilian parties of each state.
The data is available in ... | 35.329268 | 180 | 0.672075 |
53e49c5c4427d89ef236180fd2b3b978003aa968 | 1,395 | py | Python | tests/groups/test_views.py | uktrade/directory-cms | 8c8d13ce29ea74ddce7a40f3dd29c8847145d549 | [
"MIT"
] | 6 | 2018-03-20T11:19:07.000Z | 2021-10-05T07:53:11.000Z | tests/groups/test_views.py | uktrade/directory-cms | 8c8d13ce29ea74ddce7a40f3dd29c8847145d549 | [
"MIT"
] | 802 | 2018-02-05T14:16:13.000Z | 2022-02-10T10:59:21.000Z | tests/groups/test_views.py | uktrade/directory-cms | 8c8d13ce29ea74ddce7a40f3dd29c8847145d549 | [
"MIT"
] | 6 | 2019-01-22T13:19:37.000Z | 2019-07-01T10:35:26.000Z | import pytest
from django.conf import settings
from django.urls import reverse
from groups.models import GroupInfo
@pytest.mark.django_db
def test_group_info_modal_only_available_to_authenticated_users(client):
response = client.get(reverse('group-info'))
assert response.status_code == 302
assert respons... | 34.875 | 78 | 0.74552 |
310bdc6709c2e41934f9b1c8dc4fa1af1c65912e | 44,505 | py | Python | python/ccxt/bitbay.py | caoshitong369/ccxt | e0f183448bbf8f95e84c71e5f185404dabab3955 | [
"MIT"
] | 3 | 2020-06-02T10:48:48.000Z | 2022-03-12T20:46:01.000Z | python/ccxt/bitbay.py | caoshitong369/ccxt | e0f183448bbf8f95e84c71e5f185404dabab3955 | [
"MIT"
] | 3 | 2020-09-08T00:13:39.000Z | 2021-05-08T20:05:48.000Z | python/ccxt/bitbay.py | caoshitong369/ccxt | e0f183448bbf8f95e84c71e5f185404dabab3955 | [
"MIT"
] | 1 | 2020-03-16T03:22:17.000Z | 2020-03-16T03:22:17.000Z | # -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.base.exchange import Exchange
import hashlib
from ccxt.base.errors import ExchangeError
from ccxt.base.errors import Authenticati... | 40.718207 | 132 | 0.469003 |
335d349c493109f3d1b7529de06909067996fd5c | 5,499 | py | Python | kerMIT/kerMIT/explain/genericMultiLayer_LRP.py | ART-Group-it/kerMIT | ff309ce3154c5292602c53cd19633d789bf759e2 | [
"MIT"
] | 1 | 2020-07-03T13:29:12.000Z | 2020-07-03T13:29:12.000Z | kerMIT/kerMIT/explain/genericMultiLayer_LRP.py | ART-Group-it/kerMIT | ff309ce3154c5292602c53cd19633d789bf759e2 | [
"MIT"
] | null | null | null | kerMIT/kerMIT/explain/genericMultiLayer_LRP.py | ART-Group-it/kerMIT | ff309ce3154c5292602c53cd19633d789bf759e2 | [
"MIT"
] | 1 | 2020-05-07T17:16:41.000Z | 2020-05-07T17:16:41.000Z | import torch
#### INIZIO DARIO
#activation = {}
def get_activation(name, activation):
def hook(model, input, output):
activation[name] = output.detach()
return hook
def getWeightAnBiasByName(model, layer_name):
# weight, bias = _, _
weight, bias = None, None
for name, param in model.na... | 44.346774 | 146 | 0.626659 |
b4ca080ffaec77847ca5ae2bafcc13bd4ee79e42 | 963 | py | Python | wueevents/webapi/tests/test_private_api_tests.py | suspect22/wueevents | c8fb54c76da74d1c553418d04ea38cda810913ab | [
"MIT"
] | null | null | null | wueevents/webapi/tests/test_private_api_tests.py | suspect22/wueevents | c8fb54c76da74d1c553418d04ea38cda810913ab | [
"MIT"
] | null | null | null | wueevents/webapi/tests/test_private_api_tests.py | suspect22/wueevents | c8fb54c76da74d1c553418d04ea38cda810913ab | [
"MIT"
] | null | null | null | from django.test import TestCase
from rest_framework.test import APIClient
from django.urls import reverse
from django.contrib.auth import get_user_model
class PrivateApiTests(TestCase):
"""Holds all API Tests which will doesn't require authenticated Users"""
API_ENDPOINT_WEBSITE = reverse("webapi:website-li... | 27.514286 | 76 | 0.707165 |
ef855ddae8558366409489bae703fdc1f3d38f6e | 9,869 | py | Python | c-deps/krb5/src/tests/t_proxy.py | Yangjxxxxx/ZNBase | dcf993b73250dd5cb63041f4d9cf098941f67b2b | [
"MIT",
"BSD-3-Clause"
] | null | null | null | c-deps/krb5/src/tests/t_proxy.py | Yangjxxxxx/ZNBase | dcf993b73250dd5cb63041f4d9cf098941f67b2b | [
"MIT",
"BSD-3-Clause"
] | null | null | null | c-deps/krb5/src/tests/t_proxy.py | Yangjxxxxx/ZNBase | dcf993b73250dd5cb63041f4d9cf098941f67b2b | [
"MIT",
"BSD-3-Clause"
] | null | null | null | from k5test import *
# Skip this test if we're missing proxy functionality or parts of the proxy.
if runenv.tls_impl == 'no':
skip_rest('HTTP proxy tests', 'TLS build support not enabled')
try:
from paste import httpserver
except:
skip_rest('HTTP proxy tests', 'Python paste module not found')
try:
impo... | 43.09607 | 78 | 0.704124 |
8a9ebb7da56f301be015af6363fcaa5ebdbaa02c | 5,545 | py | Python | pypyr/pipelinerunner.py | mofm/pypyr | f417f69ba9a607d8a93019854105cfbc4dc9c36d | [
"Apache-2.0"
] | 1 | 2021-12-30T20:47:18.000Z | 2021-12-30T20:47:18.000Z | pypyr/pipelinerunner.py | mofm/pypyr | f417f69ba9a607d8a93019854105cfbc4dc9c36d | [
"Apache-2.0"
] | null | null | null | pypyr/pipelinerunner.py | mofm/pypyr | f417f69ba9a607d8a93019854105cfbc4dc9c36d | [
"Apache-2.0"
] | null | null | null | """pypyr pipeline runner.
This is the entrypoint for the pypyr API.
Use run() to run a pipeline.
"""
# can remove __future__ once py 3.10 the lowest supported version
from __future__ import annotations
import logging
from os import PathLike
from pypyr.context import Context
from pypyr.pipeline import Pipeline
logge... | 38.241379 | 79 | 0.676826 |
3292ba661c9beb7131e7285f0de31ecb1e6e3e19 | 480 | py | Python | Intermediate/sending.py | Fernal73/LearnPython3 | 5288017c0dbf95633b84f1e6324f00dec6982d36 | [
"MIT"
] | 1 | 2021-12-17T11:03:13.000Z | 2021-12-17T11:03:13.000Z | Intermediate/sending.py | Fernal73/LearnPython3 | 5288017c0dbf95633b84f1e6324f00dec6982d36 | [
"MIT"
] | 1 | 2020-02-05T00:14:43.000Z | 2020-02-06T09:22:49.000Z | Intermediate/sending.py | Fernal73/LearnPython3 | 5288017c0dbf95633b84f1e6324f00dec6982d36 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""Infinite looper with send."""
def infinite_looper(objects):
"""Loop indefinitely."""
count = 0
while True:
if count >= len(objects):
count = 0
message = yield objects[count]
if message is not None:
count = 0 if message < 0 else mess... | 20.869565 | 49 | 0.577083 |
8afe9e58590fc7520b54516894082d7dd1aa3d3a | 303 | py | Python | configs/hpt-pretrain/resisc-ucmerced/imagenet_r50_supervised_resisc_50000it_basetrain/5000-iters.py | Berkeley-Data/OpenSelfSup | 221191b88d891de57725b149caf237ffef72e529 | [
"Apache-2.0"
] | null | null | null | configs/hpt-pretrain/resisc-ucmerced/imagenet_r50_supervised_resisc_50000it_basetrain/5000-iters.py | Berkeley-Data/OpenSelfSup | 221191b88d891de57725b149caf237ffef72e529 | [
"Apache-2.0"
] | 6 | 2021-03-11T05:35:54.000Z | 2021-04-03T22:25:11.000Z | configs/hpt-pretrain/resisc-ucmerced/imagenet_r50_supervised_resisc_50000it_basetrain/5000-iters.py | Berkeley-Data/OpenSelfSup | 221191b88d891de57725b149caf237ffef72e529 | [
"Apache-2.0"
] | 1 | 2021-07-04T00:47:46.000Z | 2021-07-04T00:47:46.000Z | _base_="../base-resisc-ucmerced-config.py"
# this will merge with the parent
model=dict(pretrained='work_dirs/hpt-pretrain/resisc/imagenet_r50_supervised_basetrain/50000-iters/imagenet_r50_supervised_resisc_50000it.pth')
# epoch related
total_iters=5000
checkpoint_config = dict(interval=total_iters)
| 33.666667 | 143 | 0.838284 |
6a3ec4b49d6d7efc3b1c93e2bf9f9469544c47a9 | 13,345 | py | Python | src/roslibpy/comm/comm_cli.py | kikass13/roslibpy | e090c01906e076f95d75f9d7890cd55279544746 | [
"MIT"
] | null | null | null | src/roslibpy/comm/comm_cli.py | kikass13/roslibpy | e090c01906e076f95d75f9d7890cd55279544746 | [
"MIT"
] | null | null | null | src/roslibpy/comm/comm_cli.py | kikass13/roslibpy | e090c01906e076f95d75f9d7890cd55279544746 | [
"MIT"
] | null | null | null | from __future__ import print_function
import logging
import math
from System import Action
from System import Array
from System import ArraySegment
from System import Byte
from System import TimeSpan
from System import Uri
from System import UriBuilder
from System.Net.WebSockets import ClientWebSocket
from System.Net... | 39.25 | 169 | 0.638891 |
54589df1b49c587a653ef88179415c9d1ff34413 | 1,382 | py | Python | twitter/direct_message.py | kwnktks0515/Twitter_with_Python | 80dff5e0f0080a7e5b64dfa134f2e33aba0ed5f8 | [
"MIT"
] | null | null | null | twitter/direct_message.py | kwnktks0515/Twitter_with_Python | 80dff5e0f0080a7e5b64dfa134f2e33aba0ed5f8 | [
"MIT"
] | null | null | null | twitter/direct_message.py | kwnktks0515/Twitter_with_Python | 80dff5e0f0080a7e5b64dfa134f2e33aba0ed5f8 | [
"MIT"
] | null | null | null | """direct_messages"""
from twitter.core import DirectMessageData
class DirectMessages:
"""direct_messages"""
def __init__(self, twitter):
self.twitter = twitter
def get(self, params):
"""Hello"""
url = "direct_messages"
result = self.twitter.get(url, params=params)
r... | 36.368421 | 77 | 0.600579 |
beb5fc7736a00a037c2b289e0d9642bcded557ae | 11,571 | py | Python | auctions/views.py | nmk0462/commerce | a5dee3a63d986bf8630cccc859f372133d5084f9 | [
"MIT"
] | 14 | 2020-07-26T07:45:54.000Z | 2022-03-31T00:05:58.000Z | auctions/views.py | nmk0462/commerce | a5dee3a63d986bf8630cccc859f372133d5084f9 | [
"MIT"
] | null | null | null | auctions/views.py | nmk0462/commerce | a5dee3a63d986bf8630cccc859f372133d5084f9 | [
"MIT"
] | 17 | 2020-07-20T06:22:12.000Z | 2021-04-12T11:12:09.000Z | from django.contrib.auth import authenticate, login, logout
from django.db import IntegrityError
from django.http import HttpResponse, HttpResponseRedirect
from django.shortcuts import render,redirect
from django.urls import reverse
from django.contrib.auth.decorators import login_required
from .models import User,Bid,... | 31.188679 | 93 | 0.566762 |
c67cb2bf07b7878ad6b6c2c0426dd128f3b75435 | 166 | py | Python | models3CwProject/models3CwProblem1App/views.py | cs-fullstack-2019-spring/django-models3-cw-MelaatiJ | cba6396f46f959b9b89fe22430de541aee164e60 | [
"Apache-2.0"
] | null | null | null | models3CwProject/models3CwProblem1App/views.py | cs-fullstack-2019-spring/django-models3-cw-MelaatiJ | cba6396f46f959b9b89fe22430de541aee164e60 | [
"Apache-2.0"
] | null | null | null | models3CwProject/models3CwProblem1App/views.py | cs-fullstack-2019-spring/django-models3-cw-MelaatiJ | cba6396f46f959b9b89fe22430de541aee164e60 | [
"Apache-2.0"
] | null | null | null | from django.shortcuts import render
# Create your views here.
from django.http import HttpResponse
from .models import Book
def printAll():
def filtergte():
| 10.375 | 36 | 0.753012 |
11977ff74b22671df42367f516ff86357300e1a4 | 782 | py | Python | tests/keras2onnx_applications/model_source/densenet_1/tensorflow_backend.py | pbeukema/tensorflow-onnx | a8d5a3cc72d24ca18d64572588ad06490940a230 | [
"Apache-2.0"
] | 1,473 | 2018-03-16T02:47:33.000Z | 2022-03-31T03:43:52.000Z | tests/keras2onnx_applications/model_source/densenet_1/tensorflow_backend.py | pbeukema/tensorflow-onnx | a8d5a3cc72d24ca18d64572588ad06490940a230 | [
"Apache-2.0"
] | 1,208 | 2018-03-14T09:58:49.000Z | 2022-03-31T17:56:20.000Z | tests/keras2onnx_applications/model_source/densenet_1/tensorflow_backend.py | pbeukema/tensorflow-onnx | a8d5a3cc72d24ca18d64572588ad06490940a230 | [
"Apache-2.0"
] | 350 | 2018-04-03T03:48:40.000Z | 2022-03-30T11:23:55.000Z | # SPDX-License-Identifier: Apache-2.0
# From https://github.com/titu1994/DenseNet/blob/master/tensorflow_backend.py
# Modifications Copyright (c) Microsoft.
import tensorflow as tf
from mock_keras2onnx.proto import keras
from keras.backend import tensorflow_backend as KTF
from keras.backend.common import image_data_... | 28.962963 | 87 | 0.742967 |
eff0d3faf7c5f0777b777317268bb2c83bc43a5e | 6,694 | py | Python | dialogs/contact_to_infected.py | Maxwingber/corobot | a959e0deba734d3900d7b8a826b3fb56964db4c6 | [
"MIT"
] | null | null | null | dialogs/contact_to_infected.py | Maxwingber/corobot | a959e0deba734d3900d7b8a826b3fb56964db4c6 | [
"MIT"
] | null | null | null | dialogs/contact_to_infected.py | Maxwingber/corobot | a959e0deba734d3900d7b8a826b3fb56964db4c6 | [
"MIT"
] | 2 | 2020-03-22T11:38:54.000Z | 2020-03-24T11:11:56.000Z | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
from datetime import time
from typing import List
from botbuilder.dialogs import (
WaterfallDialog,
WaterfallStepContext,
DialogTurnResult,
ComponentDialog)
from botbuilder.dialogs.prompts import ChoicePrompt,... | 44.039474 | 255 | 0.655363 |
8f5f488da6ad8704cb411e23fc770e1456f58843 | 1,826 | py | Python | lambdas/stepfunctions/CTE_InvokeCreateAccountFn/src/main.py | meh485/aws-sdlc-controltower-extension | ce08b639bd97a0b017aa67e5d9697b7177e77539 | [
"Apache-2.0"
] | null | null | null | lambdas/stepfunctions/CTE_InvokeCreateAccountFn/src/main.py | meh485/aws-sdlc-controltower-extension | ce08b639bd97a0b017aa67e5d9697b7177e77539 | [
"Apache-2.0"
] | null | null | null | lambdas/stepfunctions/CTE_InvokeCreateAccountFn/src/main.py | meh485/aws-sdlc-controltower-extension | ce08b639bd97a0b017aa67e5d9697b7177e77539 | [
"Apache-2.0"
] | null | null | null | # (c) 2021 Amazon Web Services, Inc. or its affiliates. All Rights Reserved.
# This AWS Content is provided subject to the terms of the AWS Customer Agreement
# available at http://aws.amazon.com/agreement or other written agreement between
# Customer and Amazon Web Services, Inc.
import json
import logging
import cfn... | 31.482759 | 96 | 0.653341 |
d0073ef87352146884b7f9d622563379f32e3c90 | 3,988 | py | Python | tests/test_exceptions.py | gouttegd/click-shell | a6b4f5c712c569897f4aeb4d76504740e3b63be1 | [
"BSD-3-Clause"
] | null | null | null | tests/test_exceptions.py | gouttegd/click-shell | a6b4f5c712c569897f4aeb4d76504740e3b63be1 | [
"BSD-3-Clause"
] | null | null | null | tests/test_exceptions.py | gouttegd/click-shell | a6b4f5c712c569897f4aeb4d76504740e3b63be1 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# incenp.click_shell - A shell extension for Click
# Copyright © 2021 Niall Byrne
# Copyright © 2021 Damien Goutte-Gattat
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
... | 32.422764 | 84 | 0.754012 |
3c61a27331a27e5283b40ddf9da7ea69c2deabc2 | 1,329 | py | Python | middleware.py | davidbetz/middleware | 1f6b0dce915099e8ff85ab5f433e70b96e1424a1 | [
"MIT"
] | null | null | null | middleware.py | davidbetz/middleware | 1f6b0dce915099e8ff85ab5f433e70b96e1424a1 | [
"MIT"
] | null | null | null | middleware.py | davidbetz/middleware | 1f6b0dce915099e8ff85ab5f433e70b96e1424a1 | [
"MIT"
] | null | null | null | import types
class Middleware():
def __init__(self, action=None):
self._action = action
def read(self, context, *args):
return [context[_] for _ in args]
def write(self, context, **kwargs):
context.update(kwargs)
def execute(self, mwa, context):
if self._action is not... | 25.557692 | 63 | 0.585403 |
c79f72116981a076fae5d5414fea2ba429a637cb | 10,369 | py | Python | estimators/tabular_bayes_dice.py | SnowflyLXF/FedDICE | a63a3233037e37ae27d6c130f37ffc4b92190d5e | [
"Apache-2.0"
] | null | null | null | estimators/tabular_bayes_dice.py | SnowflyLXF/FedDICE | a63a3233037e37ae27d6c130f37ffc4b92190d5e | [
"Apache-2.0"
] | null | null | null | estimators/tabular_bayes_dice.py | SnowflyLXF/FedDICE | a63a3233037e37ae27d6c130f37ffc4b92190d5e | [
"Apache-2.0"
] | null | null | null | # 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, ... | 43.024896 | 82 | 0.681647 |
de0574698f6a399dd13b607b34aaa00de2df1bdd | 5,341 | py | Python | mysite/settings.py | JenMart/Nat-Poll-App | db4f1a7a31930d78a5fa509045ade395179b49ec | [
"BSD-3-Clause"
] | null | null | null | mysite/settings.py | JenMart/Nat-Poll-App | db4f1a7a31930d78a5fa509045ade395179b49ec | [
"BSD-3-Clause"
] | null | null | null | mysite/settings.py | JenMart/Nat-Poll-App | db4f1a7a31930d78a5fa509045ade395179b49ec | [
"BSD-3-Clause"
] | null | null | null | import os
# Django settings for mysite project.
DEBUG = True
TEMPLATE_DEBUG = DEBUG
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
# print("pip1")
ADMINS = (
# ('Your Name', 'your_email@example.com'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3', # A... | 32.969136 | 129 | 0.692754 |
8ed88856632ec51212d0c68880e23da60c53a623 | 4,889 | py | Python | alipay/aop/api/domain/KoubeiCateringKmsBakingSyncModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/domain/KoubeiCateringKmsBakingSyncModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/domain/KoubeiCateringKmsBakingSyncModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.KmsBakingCheckDTO import KmsBakingCheckDTO
from alipay.aop.api.domain.KmsBakingInventoryDTO import KmsBakingInventoryDTO
from alipay.aop.api.domain.KmsBakingPromotionDTO import KmsB... | 33.951389 | 90 | 0.58785 |
3b9980b4f20896863b64a6a254bc36480c5cd72f | 369 | py | Python | tests/env_test.py | geirem/pyconfig | e99693b7bc0acb3fe6b82acd29e8724336f95c43 | [
"CC0-1.0"
] | 1 | 2020-05-15T16:22:36.000Z | 2020-05-15T16:22:36.000Z | tests/env_test.py | geirem/pyconfig | e99693b7bc0acb3fe6b82acd29e8724336f95c43 | [
"CC0-1.0"
] | 9 | 2020-05-14T08:31:48.000Z | 2021-04-22T12:35:15.000Z | tests/env_test.py | geirem/pyconfig | e99693b7bc0acb3fe6b82acd29e8724336f95c43 | [
"CC0-1.0"
] | null | null | null | import envyconfig
def test_use_default_when_env_var_is_not_defined():
config = envyconfig.load('fixtures/basic_env.yaml')
assert config['foo'] == 'bar'
def test_with_env_var(monkeypatch):
expected = 'some string'
monkeypatch.setenv("TESTENVVAR", expected)
config = envyconfig.load('fixtures/basic... | 26.357143 | 55 | 0.731707 |
694a848915959c4dcd606cc035b174b5bab5a86f | 247 | py | Python | configs/_base_/schedules/bdd100k.py | XDong18/mmclassification | 115c39ed4673d9cdd7b5f543482c1038f0c77ab5 | [
"Apache-2.0"
] | null | null | null | configs/_base_/schedules/bdd100k.py | XDong18/mmclassification | 115c39ed4673d9cdd7b5f543482c1038f0c77ab5 | [
"Apache-2.0"
] | null | null | null | configs/_base_/schedules/bdd100k.py | XDong18/mmclassification | 115c39ed4673d9cdd7b5f543482c1038f0c77ab5 | [
"Apache-2.0"
] | null | null | null | # optimizer
optimizer = dict(type='SGD', lr=0.002, momentum=0.9, weight_decay=0.0001)
optimizer_config = dict(grad_clip=None)
# learning policy
lr_config = dict(policy='step', step=[80, 110])
runner = dict(type='EpochBasedRunner', max_epochs=120)
| 35.285714 | 73 | 0.744939 |
52059a9bbb955841c9d27ed207fea9f0791af8e7 | 3,737 | py | Python | venv/Lib/site-packages/traits/observation/tests/test_parsing.py | richung99/digitizePlots | 6b408c820660a415a289726e3223e8f558d3e18b | [
"MIT"
] | 1 | 2022-01-18T17:56:51.000Z | 2022-01-18T17:56:51.000Z | venv/Lib/site-packages/traits/observation/tests/test_parsing.py | richung99/digitizePlots | 6b408c820660a415a289726e3223e8f558d3e18b | [
"MIT"
] | null | null | null | venv/Lib/site-packages/traits/observation/tests/test_parsing.py | richung99/digitizePlots | 6b408c820660a415a289726e3223e8f558d3e18b | [
"MIT"
] | null | null | null | # (C) Copyright 2005-2021 Enthought, Inc., Austin, TX
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in LICENSE.txt and may be redistributed only under
# the conditions described in the aforementioned license. The license
# is also available online at... | 29.65873 | 79 | 0.617875 |
4637a2fcc729a0ac7bffc55f7cf1462f4f2814c1 | 36 | py | Python | passenger_wsgi.py | ericmuh/recruitment-system | d9964e7c48ac8af74995e28f489135c1d8f940be | [
"MIT"
] | null | null | null | passenger_wsgi.py | ericmuh/recruitment-system | d9964e7c48ac8af74995e28f489135c1d8f940be | [
"MIT"
] | null | null | null | passenger_wsgi.py | ericmuh/recruitment-system | d9964e7c48ac8af74995e28f489135c1d8f940be | [
"MIT"
] | null | null | null | from recruit.wsgi import application | 36 | 36 | 0.888889 |
6b94fed0eaad7d5e1f484a2ba802733b7fb8beb2 | 1,081 | py | Python | main.py | flaviuvadan/explore-rl | 9748038612872b90776675ed5db6272dbc6e5843 | [
"MIT"
] | null | null | null | main.py | flaviuvadan/explore-rl | 9748038612872b90776675ed5db6272dbc6e5843 | [
"MIT"
] | null | null | null | main.py | flaviuvadan/explore-rl | 9748038612872b90776675ed5db6272dbc6e5843 | [
"MIT"
] | null | null | null | """ Main file """
import gym
import numpy as np
import rl
if __name__ == '__main__':
env = gym.make('CartPole-v1')
observation_space = env.observation_space.shape[0]
action_space = env.action_space.n
model = rl.Model(observation_space, action_space)
while True:
current_state = env.reset()... | 33.78125 | 100 | 0.601295 |
47a069db03b12de2c7e16a2e5347d2d87c24dfd5 | 189 | py | Python | tests/web_platform/CSS2/normal_flow/test_block_in_inline_remove_004_nosplit_ref.py | jonboland/colosseum | cbf974be54fd7f6fddbe7285704cfaf7a866c5c5 | [
"BSD-3-Clause"
] | 71 | 2015-04-13T09:44:14.000Z | 2019-03-24T01:03:02.000Z | tests/web_platform/CSS2/normal_flow/test_block_in_inline_remove_004_nosplit_ref.py | jonboland/colosseum | cbf974be54fd7f6fddbe7285704cfaf7a866c5c5 | [
"BSD-3-Clause"
] | 35 | 2019-05-06T15:26:09.000Z | 2022-03-28T06:30:33.000Z | tests/web_platform/CSS2/normal_flow/test_block_in_inline_remove_004_nosplit_ref.py | jonboland/colosseum | cbf974be54fd7f6fddbe7285704cfaf7a866c5c5 | [
"BSD-3-Clause"
] | 139 | 2015-05-30T18:37:43.000Z | 2019-03-27T17:14:05.000Z | from tests.utils import W3CTestCase
class TestBlockInInlineRemove004NosplitRef(W3CTestCase):
vars().update(W3CTestCase.find_tests(__file__, 'block-in-inline-remove-004-nosplit-ref'))
| 31.5 | 93 | 0.814815 |
179065f80bfad5b59e29beb11633f0dd3b63cff5 | 2,026 | py | Python | helpers/RulesStuff/stringParser v1.py | thejeswi/BobGoesToJail | ac8a6e4242446634837d6166158fc5401c2818ac | [
"MIT"
] | 3 | 2018-08-20T14:14:01.000Z | 2020-06-15T17:39:24.000Z | helpers/RulesStuff/stringParser v1.py | thejeswi/BobGoesToJail | ac8a6e4242446634837d6166158fc5401c2818ac | [
"MIT"
] | null | null | null | helpers/RulesStuff/stringParser v1.py | thejeswi/BobGoesToJail | ac8a6e4242446634837d6166158fc5401c2818ac | [
"MIT"
] | 1 | 2020-06-15T17:39:26.000Z | 2020-06-15T17:39:26.000Z | import re
from nltk import ParentedTree
import os
clear = lambda: os.system('clear')
parsedSent = """(ROOT
(SBAR (IN If)
(S
(S
(NP (DT the) (NN perpetrator))
(VP (VBZ exceeds)
(S
(NP
(NP (DT the) (NNS limits))
(PP (IN of)
(N... | 28.138889 | 90 | 0.549852 |
dd450678db82fd00235bdd3f3c18c332b950dfd4 | 991 | py | Python | examples/double_pendulum/double_pendulum_with_rrt.py | echoix/pyro | 787920cb14e3669bc65c530fd8f91d4277a24279 | [
"MIT"
] | null | null | null | examples/double_pendulum/double_pendulum_with_rrt.py | echoix/pyro | 787920cb14e3669bc65c530fd8f91d4277a24279 | [
"MIT"
] | null | null | null | examples/double_pendulum/double_pendulum_with_rrt.py | echoix/pyro | 787920cb14e3669bc65c530fd8f91d4277a24279 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Mon Nov 12 20:28:17 2018
@author: Alexandre
"""
###############################################################################
import numpy as np
###############################################################################
from pyro.dynamic import pendulum
from pyro.planning... | 23.595238 | 79 | 0.440969 |
6ab47373375712721a009a8cb6961d509bc5ea80 | 1,607 | py | Python | python/server.template.py | Saevon/Recipes | ab8ca9b5244805d545da2dd1d80d249f1ec6057d | [
"MIT"
] | null | null | null | python/server.template.py | Saevon/Recipes | ab8ca9b5244805d545da2dd1d80d249f1ec6057d | [
"MIT"
] | null | null | null | python/server.template.py | Saevon/Recipes | ab8ca9b5244805d545da2dd1d80d249f1ec6057d | [
"MIT"
] | null | null | null | #!/usr/bin/python
import bottle
app = bottle.Bottle()
@app.route('/<filename:path>')
def hive_js(filename):
'''
Allows access to any file in the static directory
'''
return bottle.static_file(filename, root="static")
##################################################
# Settings & Stratup
#########... | 21.144737 | 86 | 0.580585 |
2b406dacc5caa7e87c9c2fc4c193de1a6444d2ee | 2,178 | py | Python | workshop_2018/workshop_2018.py | rudolphpienaar/pl-workshop-2018 | 1b4c6a3b04e93b034e378d78c4e4875320855f7a | [
"MIT"
] | null | null | null | workshop_2018/workshop_2018.py | rudolphpienaar/pl-workshop-2018 | 1b4c6a3b04e93b034e378d78c4e4875320855f7a | [
"MIT"
] | null | null | null | workshop_2018/workshop_2018.py | rudolphpienaar/pl-workshop-2018 | 1b4c6a3b04e93b034e378d78c4e4875320855f7a | [
"MIT"
] | null | null | null | # _
# workshop_2018 ds app
#
# (c) 2016 Fetal-Neonatal Neuroimaging & Developmental Science Center
# Boston Children's Hospital
#
# http://childrenshospital.org/FNNDSC/
# dev@babyMRI.org
#
import os
# impo... | 34.571429 | 105 | 0.59596 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.