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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
c5eb8fd05fa4faca87d695320272cd91e6d68499 | 32,128 | py | Python | test/functional/fundrawtransaction.py | GenYuanLian/SourceChain | f278529e0a85d7be6aef1fa3989498a7dee70f51 | [
"MIT"
] | 7 | 2018-01-24T14:32:02.000Z | 2019-06-27T12:09:24.000Z | test/functional/fundrawtransaction.py | GenYuanLian/SourceChain | f278529e0a85d7be6aef1fa3989498a7dee70f51 | [
"MIT"
] | null | null | null | test/functional/fundrawtransaction.py | GenYuanLian/SourceChain | f278529e0a85d7be6aef1fa3989498a7dee70f51 | [
"MIT"
] | 4 | 2018-01-24T13:54:02.000Z | 2018-05-03T02:38:13.000Z | #!/usr/bin/env python3
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the fundrawtransaction RPC."""
from test_framework.test_framework import SrcchainTestFramework
fr... | 44.560333 | 223 | 0.56969 |
16f824f700b8b17c600d838fec55309b88a29ce2 | 20,635 | py | Python | mfm_mosi_acc.py | pliang279/factorized | 602b160ca162b35f2b2540754cbf23c18f352d51 | [
"MIT"
] | 53 | 2019-05-22T07:36:36.000Z | 2022-03-02T08:08:02.000Z | mfm_mosi_acc.py | pliang279/factorized | 602b160ca162b35f2b2540754cbf23c18f352d51 | [
"MIT"
] | 4 | 2019-06-04T08:52:58.000Z | 2021-09-05T03:17:53.000Z | mfm_mosi_acc.py | pliang279/factorized | 602b160ca162b35f2b2540754cbf23c18f352d51 | [
"MIT"
] | 11 | 2019-09-26T06:37:49.000Z | 2021-12-10T07:11:19.000Z | import numpy as np
seed = 123
np.random.seed(seed)
import random
import torch
torch.manual_seed(seed)
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
from torch.autograd import Variable, grad
from torch.optim.lr_scheduler import ReduceLROnPlateau
import data_loader as loader
from coll... | 36.651865 | 185 | 0.704773 |
237e8f35578325525274859c55f963c9fa66365b | 92 | py | Python | articles/apps.py | Blaise-design/Django-Hospital-Project | 30572cef02be343eda50390ca6bd1f239a37d9c1 | [
"MIT"
] | 2 | 2020-04-22T06:31:18.000Z | 2020-06-16T05:03:16.000Z | articles/apps.py | Blaise-design/Django-Hospital-Project | 30572cef02be343eda50390ca6bd1f239a37d9c1 | [
"MIT"
] | null | null | null | articles/apps.py | Blaise-design/Django-Hospital-Project | 30572cef02be343eda50390ca6bd1f239a37d9c1 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class ArticlesConfig(AppConfig):
name = 'articles'
| 15.333333 | 33 | 0.75 |
6fbe4c98e9e09367e756f5e23bdb1e9313fc35eb | 5,904 | py | Python | vnpy/app/trade_copy/ui/widget.py | liuying3013/vnpy | e1cc1ea4af5fa6ec9a31e5b954c19cfaa0a3130e | [
"MIT"
] | 323 | 2015-11-21T14:45:29.000Z | 2022-03-16T08:54:37.000Z | vnpy/app/trade_copy/ui/widget.py | liuying3013/vnpy | e1cc1ea4af5fa6ec9a31e5b954c19cfaa0a3130e | [
"MIT"
] | 9 | 2017-03-21T08:26:21.000Z | 2021-08-23T06:41:17.000Z | vnpy/app/trade_copy/ui/widget.py | liuying3013/vnpy | e1cc1ea4af5fa6ec9a31e5b954c19cfaa0a3130e | [
"MIT"
] | 148 | 2016-09-26T03:25:39.000Z | 2022-02-06T14:43:48.000Z | from datetime import datetime
from vnpy.event import Event, EventEngine
from vnpy.trader.engine import MainEngine
from vnpy.trader.ui import QtCore, QtWidgets, QtGui
from vnpy.trader.ui.widget import BaseCell, EnumCell, PnlCell, BaseMonitor, DirectionCell
from ..engine import (
APP_NAME,
EVENT_TRADECOPY_LOG,... | 31.913514 | 94 | 0.633808 |
c8d1501b3926104f7ebdff8769430c5ebf6a5a51 | 813 | py | Python | tools/bisect.py | MIPS/external-r8 | be69fcefad315b2068a9903019108f879ca4db56 | [
"BSD-3-Clause"
] | 26 | 2017-08-19T03:30:27.000Z | 2021-11-14T18:13:57.000Z | tools/bisect.py | Unpublished/r8 | 0541f5685b09694e9f4478f5156921055cb149ae | [
"BSD-3-Clause"
] | 1 | 2021-04-05T09:52:38.000Z | 2021-04-07T02:30:26.000Z | tools/bisect.py | Unpublished/r8 | 0541f5685b09694e9f4478f5156921055cb149ae | [
"BSD-3-Clause"
] | 3 | 2018-04-04T17:00:51.000Z | 2021-05-22T08:57:54.000Z | #!/usr/bin/env python
# Copyright (c) 2017, the R8 project authors. Please see the AUTHORS file
# for details. All rights reserved. Use of this source code is governed by a
# BSD-style license that can be found in the LICENSE file.
import gradle
import os
import subprocess
import sys
import utils
JAR = os.path.join(u... | 22.583333 | 76 | 0.651907 |
44e8ab93e095077cdb1cb0300460da101a3556e2 | 1,340 | py | Python | examples/wmc-1.py | gfrances/PySDD | 259e8b57c0c124a02099c5fbc78d2fbe56559bdf | [
"Apache-2.0"
] | 34 | 2018-03-21T01:26:57.000Z | 2022-03-10T08:53:18.000Z | examples/wmc-1.py | gfrances/PySDD | 259e8b57c0c124a02099c5fbc78d2fbe56559bdf | [
"Apache-2.0"
] | 12 | 2019-01-22T16:25:02.000Z | 2022-02-01T10:21:29.000Z | examples/wmc-1.py | gfrances/PySDD | 259e8b57c0c124a02099c5fbc78d2fbe56559bdf | [
"Apache-2.0"
] | 14 | 2018-12-17T17:40:48.000Z | 2022-03-22T02:53:01.000Z | #!/usr/bin/env python3
from pathlib import Path
import math
from pysdd.sdd import SddManager, Vtree, WmcManager
here = Path(__file__).parent
def main():
# Start from a given CNF and VTREE file
vtree = Vtree.from_file(bytes(here / "input" / "simple.vtree"))
sdd = SddManager.from_vtree(vtree)
print(f"... | 29.777778 | 75 | 0.639552 |
6b0dc47dc4f5559da52e749fdb8136a70ad4ae41 | 266 | py | Python | tsfel/feature_extraction/__init__.py | TSFDlib/TSFEL | a4c30acc93dd3717bf93b19e59c3dc927903caf2 | [
"MIT"
] | 1 | 2020-08-02T03:26:32.000Z | 2020-08-02T03:26:32.000Z | tsfel/feature_extraction/__init__.py | TSFDlib/TSFEL | a4c30acc93dd3717bf93b19e59c3dc927903caf2 | [
"MIT"
] | null | null | null | tsfel/feature_extraction/__init__.py | TSFDlib/TSFEL | a4c30acc93dd3717bf93b19e59c3dc927903caf2 | [
"MIT"
] | null | null | null | from TSFEL.tsfel.feature_extraction.get_features import extract_features
from TSFEL.tsfel.feature_extraction.feat_selection import correlation_report
from TSFEL.tsfel.feature_extraction.features import *
from TSFEL.tsfel.feature_extraction.feat_selection import FSE
| 53.2 | 76 | 0.890977 |
ae0c44e33a4095aacf8c4e1b0f2b60ec934b3ed5 | 1,385 | py | Python | oscar/lib/python2.7/site-packages/IPython/testing/__init__.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/IPython/testing/__init__.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/IPython/testing/__init__.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | """Testing support (tools to test IPython itself).
"""
#-----------------------------------------------------------------------------
# Copyright (C) 2009-2011 The IPython Development Team
#
# Distributed under the terms of the BSD License. The full license is in
# the file COPYING, distributed as part of ... | 35.512821 | 79 | 0.5213 |
75354e8c8471737847b638dfdefab364e8bba1b7 | 686 | py | Python | gc.py | aamberh/learning_python | 8879ec30901638ffdaf9c4df4b4f380b554f4a74 | [
"MIT"
] | null | null | null | gc.py | aamberh/learning_python | 8879ec30901638ffdaf9c4df4b4f380b554f4a74 | [
"MIT"
] | null | null | null | gc.py | aamberh/learning_python | 8879ec30901638ffdaf9c4df4b4f380b554f4a74 | [
"MIT"
] | null | null | null | # Write a program that computes the GC% of a DNA sequence
# Format the output for 2 decimal places
# Use all three formatting methods
0.42
0.42
0.42
dna = 'ACAGAGCCAGCAGATATACAGCAGATACTAT'
GC = 0
for total in range(0, len(dna)):
total += 1
for i in range(0, len(dna)):
if dna[i] == 'C':
GC += 1
elif dna[i] == 'G'... | 18.052632 | 57 | 0.61516 |
1e3503fa0c485882ec3ca97037d7be037f882307 | 2,893 | py | Python | google/cloud/videointelligence_v1/types/__init__.py | LaudateCorpus1/python-videointelligence | a35f538ae5595fb15112025e69661f0484317294 | [
"Apache-2.0"
] | 33 | 2019-12-23T14:22:10.000Z | 2022-03-16T09:31:08.000Z | google/cloud/videointelligence_v1/types/__init__.py | LaudateCorpus1/python-videointelligence | a35f538ae5595fb15112025e69661f0484317294 | [
"Apache-2.0"
] | 122 | 2020-01-28T13:29:24.000Z | 2022-03-30T22:42:11.000Z | google/cloud/videointelligence_v1/types/__init__.py | LaudateCorpus1/python-videointelligence | a35f538ae5595fb15112025e69661f0484317294 | [
"Apache-2.0"
] | 18 | 2019-12-21T21:48:00.000Z | 2022-01-29T08:15:00.000Z | # -*- coding: utf-8 -*-
# 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... | 25.60177 | 74 | 0.719323 |
c20f16c0e2740fe8ca9f36512dd233bf2ce60b67 | 1,547 | py | Python | test/mathutils/test_utils.py | endy-imam/XmasTree2021 | 57cd082255f06e866df700f5e466d89a9aadafb0 | [
"MIT"
] | null | null | null | test/mathutils/test_utils.py | endy-imam/XmasTree2021 | 57cd082255f06e866df700f5e466d89a9aadafb0 | [
"MIT"
] | null | null | null | test/mathutils/test_utils.py | endy-imam/XmasTree2021 | 57cd082255f06e866df700f5e466d89a9aadafb0 | [
"MIT"
] | null | null | null | import unittest
from math import pi
from xmastree.mathutils.utils import clamp, complex_polar, complex_magnitude, remap
def close_enough_complex(expect, actual, epsilon=1e-8):
return complex_magnitude(actual - expect) < epsilon
class TestMathUtils(unittest.TestCase):
def test_complex_polar(self):
... | 34.377778 | 83 | 0.626374 |
f942bc1c53c0a12c734a41af9a25315a56bf739d | 1,921 | py | Python | common/celery_tasks/sms/dysms/demo/demo_sms_send.py | qls7/heimatoutiao | dbdf0f3790d0dc5f233b4c9e7bd69927bbfff28d | [
"MIT"
] | 5 | 2019-08-22T15:25:39.000Z | 2021-11-26T06:07:51.000Z | common/celery_tasks/sms/dysms/demo/demo_sms_send.py | qls7/heimatoutiao | dbdf0f3790d0dc5f233b4c9e7bd69927bbfff28d | [
"MIT"
] | 2 | 2019-08-21T10:26:30.000Z | 2022-01-14T01:20:55.000Z | common/celery_tasks/sms/dysms/demo/demo_sms_send.py | qls7/heimatoutiao | dbdf0f3790d0dc5f233b4c9e7bd69927bbfff28d | [
"MIT"
] | 8 | 2019-08-26T10:23:22.000Z | 2022-02-24T07:01:25.000Z | # -*- coding: utf-8 -*-
import sys
from aliyunsdkdysmsapi.request.v20170525 import SendSmsRequest
from aliyunsdkdysmsapi.request.v20170525 import QuerySendDetailsRequest
from aliyunsdkcore.client import AcsClient
import uuid
from aliyunsdkcore.profile import region_provider
from aliyunsdkcore.http import method_... | 24.948052 | 89 | 0.706403 |
3354d4ac9cc441f653ce5ad47124a083fe7c0f37 | 998 | py | Python | ejercicios/arreglos/duplicados.py | leugimkm/Soluciones | d71601c8d9b5e86e926f48d9e49462af8a956b6d | [
"MIT"
] | 1 | 2022-02-02T04:44:56.000Z | 2022-02-02T04:44:56.000Z | ejercicios/arreglos/duplicados.py | leugimkm/Soluciones | d71601c8d9b5e86e926f48d9e49462af8a956b6d | [
"MIT"
] | null | null | null | ejercicios/arreglos/duplicados.py | leugimkm/Soluciones | d71601c8d9b5e86e926f48d9e49462af8a956b6d | [
"MIT"
] | null | null | null | """AyudaEnPython: https://www.facebook.com/groups/ayudapython
Sea una lista con palabras, escribir el código Python correspondiente,
para eliminar duplicados en la lista conservando el orden de los
elementos:
Ejemplo:
miLista = ["uno", "dos", "tres", "uno", "cuatro"]
resultado = ["uno", "dos", "tres", "cuatro"]
Sug... | 21.234043 | 70 | 0.631263 |
6fe1db710d61e1658d73cd81e95ba4e110477bb2 | 2,008 | py | Python | .venv/lib/python3.6/site-packages/pyglet/media/drivers/directsound/__init__.py | FedericoFontana/ray | 5a7feae15f8c74d5d196fea6697c1827008018f3 | [
"Apache-2.0"
] | 3 | 2019-04-01T11:03:04.000Z | 2019-12-31T02:17:15.000Z | .venv/lib/python3.6/site-packages/pyglet/media/drivers/directsound/__init__.py | FedericoFontana/ray | 5a7feae15f8c74d5d196fea6697c1827008018f3 | [
"Apache-2.0"
] | 1 | 2021-04-15T18:46:45.000Z | 2021-04-15T18:46:45.000Z | .venv/lib/python3.6/site-packages/pyglet/media/drivers/directsound/__init__.py | FedericoFontana/ray | 5a7feae15f8c74d5d196fea6697c1827008018f3 | [
"Apache-2.0"
] | 1 | 2020-11-06T18:46:35.000Z | 2020-11-06T18:46:35.000Z | # ----------------------------------------------------------------------------
# pyglet
# Copyright (c) 2006-2008 Alex Holkner
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistribu... | 45.636364 | 83 | 0.72012 |
807f7a8b6fd6c37ce078682b1f91e69d8828d4cf | 5,884 | py | Python | install/app_store/tk-maya/v0.9.1/startup/userSetup.py | JoanAzpeitia/lp_sg | e0ee79555e419dd2ae3a5f31e5515b3f40b22a62 | [
"MIT"
] | 4 | 2019-01-11T03:41:28.000Z | 2019-09-12T06:57:17.000Z | bundle_cache/app_store/tk-maya/v0.9.3.1/startup/userSetup.py | ColinKennedy/tk-config-default2-respawn | 855fb8033daa549b92615792442f19a7f9c4f55c | [
"Linux-OpenIB"
] | null | null | null | bundle_cache/app_store/tk-maya/v0.9.3.1/startup/userSetup.py | ColinKennedy/tk-config-default2-respawn | 855fb8033daa549b92615792442f19a7f9c4f55c | [
"Linux-OpenIB"
] | 2 | 2019-01-10T05:00:18.000Z | 2020-02-15T16:32:56.000Z | # Copyright (c) 2016 Shotgun Software Inc.
#
# CONFIDENTIAL AND PROPRIETARY
#
# This work is provided "AS IS" and subject to the Shotgun Pipeline Toolkit
# Source Code License included in this distribution package. See LICENSE.
# By accessing, using, copying or modifying this work you indicate your
# agreement to the S... | 37.006289 | 161 | 0.661285 |
ff39c2abb0036211c0953803eddc44df3545ae16 | 253 | py | Python | todoist_wrapper/field_analyzer.py | tivvit/ulo | b50078e011b3508049a42b6eedebd865c14f1826 | [
"MIT"
] | null | null | null | todoist_wrapper/field_analyzer.py | tivvit/ulo | b50078e011b3508049a42b6eedebd865c14f1826 | [
"MIT"
] | null | null | null | todoist_wrapper/field_analyzer.py | tivvit/ulo | b50078e011b3508049a42b6eedebd865c14f1826 | [
"MIT"
] | null | null | null | from typing import List, Any, Dict
def field_analyzer(models: List[Dict[str, Any]]):
props = {}
for m in models:
for k, v in m.items():
props[k] = type(v)
for k, v in props.items():
print(f"{k}: {v.__name__}")
| 21.083333 | 49 | 0.545455 |
ca69af8cf301c35ec6ec86fffd5592d5e6a2bb02 | 3,894 | py | Python | test/sample-test/check_notebook_results.py | solovyevt/pipelines | ddfe84efc62f579378563ac536c14ab2af4ec91f | [
"Apache-2.0"
] | 1 | 2018-12-07T18:50:13.000Z | 2018-12-07T18:50:13.000Z | test/sample-test/check_notebook_results.py | solovyevt/pipelines | ddfe84efc62f579378563ac536c14ab2af4ec91f | [
"Apache-2.0"
] | null | null | null | test/sample-test/check_notebook_results.py | solovyevt/pipelines | ddfe84efc62f579378563ac536c14ab2af4ec91f | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 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, ... | 42.326087 | 93 | 0.598613 |
0342dd8b37568c34d418bc38914a8df7b59b8dd0 | 1,300 | py | Python | py/client/tests/test_console.py | lbooker42/deephaven-core | 2d04563f18ae914754b28041475c02770e57af15 | [
"MIT"
] | null | null | null | py/client/tests/test_console.py | lbooker42/deephaven-core | 2d04563f18ae914754b28041475c02770e57af15 | [
"MIT"
] | null | null | null | py/client/tests/test_console.py | lbooker42/deephaven-core | 2d04563f18ae914754b28041475c02770e57af15 | [
"MIT"
] | null | null | null | #
# Copyright (c) 2016-2022 Deephaven Data Labs and Patent Pending
#
import unittest
from pyarrow import csv
from tests.testbase import BaseTestCase
class ConsoleTestCase(BaseTestCase):
def test_bind_table(self):
pa_table = csv.read_csv(self.csv_file)
user_table = self.session.import_table(pa_... | 28.26087 | 67 | 0.664615 |
6c7fb016ee52d244731470530d149bda16e322c4 | 3,628 | py | Python | ocrd_anybaseocr/cli/ocrd_anybaseocr_dewarp.py | wrznr/OCR-D-LAYoutERkennung | e94ee3b462e21f66b79e6cbebd959c03d631c52b | [
"Apache-2.0"
] | null | null | null | ocrd_anybaseocr/cli/ocrd_anybaseocr_dewarp.py | wrznr/OCR-D-LAYoutERkennung | e94ee3b462e21f66b79e6cbebd959c03d631c52b | [
"Apache-2.0"
] | null | null | null | ocrd_anybaseocr/cli/ocrd_anybaseocr_dewarp.py | wrznr/OCR-D-LAYoutERkennung | e94ee3b462e21f66b79e6cbebd959c03d631c52b | [
"Apache-2.0"
] | null | null | null | import torch
import sys
import os
import shutil
from ..constants import OCRD_TOOL
from ocrd import Processor
from ocrd_models.ocrd_page import parse
from ocrd_utils import getLogger, concat_padded
from ocrd_modelfactory import page_from_file
from ocrd_models.ocrd_page import to_xml,parse
import shutil
from pathlib ... | 39.868132 | 287 | 0.61108 |
1df791d2c8f92ebbd7dbb9c4ce5529c6edf52eb5 | 7,440 | py | Python | src/quiet_syntax_highlighting.py | hrishikesharma/Quiet-Text | 8ce9a29292602c4cf1051a70edc5cedc394ea9bc | [
"MIT"
] | 61 | 2020-10-05T20:08:28.000Z | 2022-03-14T07:59:18.000Z | src/quiet_syntax_highlighting.py | hrishikesharma/Quiet-Text | 8ce9a29292602c4cf1051a70edc5cedc394ea9bc | [
"MIT"
] | 73 | 2020-10-05T12:32:19.000Z | 2020-10-27T22:49:55.000Z | src/quiet_syntax_highlighting.py | hrishikesharma/Quiet-Text | 8ce9a29292602c4cf1051a70edc5cedc394ea9bc | [
"MIT"
] | 44 | 2020-10-05T17:06:50.000Z | 2021-12-24T15:10:01.000Z | import tkinter as tk
import tkinter.font as tk_font
from yaml import load, FullLoader
from pygments import lex
from quiet_syntax_and_themes import SyntaxAndThemes
from pygments.lexers import MarkdownLexer
class SyntaxHighlighting():
def __init__(self, parent, text_widget, initial_content):
self.parent = p... | 56.363636 | 125 | 0.700672 |
e21b5afcc8655367733591105a1f52ca691f0596 | 206 | py | Python | geometry/eolearn/geometry/__init__.py | Johannes-R-Schmid/eo-learn | f03d33fda4f1716ddf0841d6d30f51760ccd23e5 | [
"MIT"
] | null | null | null | geometry/eolearn/geometry/__init__.py | Johannes-R-Schmid/eo-learn | f03d33fda4f1716ddf0841d6d30f51760ccd23e5 | [
"MIT"
] | null | null | null | geometry/eolearn/geometry/__init__.py | Johannes-R-Schmid/eo-learn | f03d33fda4f1716ddf0841d6d30f51760ccd23e5 | [
"MIT"
] | null | null | null | """
Subpackage containing EOTasks for geometrical transformations
"""
from .utilities import VectorToRaster
from .sampling import PointSamplingTask, PointSampler, PointRasterSampler
__version__ = '0.3.1'
| 22.888889 | 73 | 0.815534 |
d46a0e04f942c5254b074077edb22443edd619aa | 737 | py | Python | 13.Learning Python Libraries/01.Learning Python Standard Library - KH/01.Python Built In/01_01_LogicalOperators.py | ptyadana/python-dojo | 98c7234b84f0afea99a091c7198342d66bbdff5b | [
"MIT"
] | 3 | 2020-06-01T04:17:18.000Z | 2020-12-18T03:05:55.000Z | 13.Learning Python Libraries/01.Learning Python Standard Library - KH/01.Python Built In/01_01_LogicalOperators.py | ptyadana/python-dojo | 98c7234b84f0afea99a091c7198342d66bbdff5b | [
"MIT"
] | 1 | 2020-04-25T08:01:59.000Z | 2020-04-25T08:01:59.000Z | 13.Learning Python Libraries/01.Learning Python Standard Library - KH/01.Python Built In/01_01_LogicalOperators.py | ptyadana/python-dojo | 98c7234b84f0afea99a091c7198342d66bbdff5b | [
"MIT"
] | 7 | 2020-04-26T10:02:36.000Z | 2021-06-08T05:12:46.000Z | # Python Logical Operators: And, Or, Not:
# What is a Boolean?
isRaining = False
isSunny = True
# Logical Operators -> Special Operators for Booleans
# AND
# true and true --> true
# false and true --> false
# true and false --> false
# false and false --> false
if isRaining and isSunny:
print("Rainbow might app... | 19.918919 | 55 | 0.644505 |
f260a760b4153a5639e271fae11d76758c527759 | 225 | py | Python | Dataset/Leetcode/test/66/545.py | kkcookies99/UAST | fff81885aa07901786141a71e5600a08d7cb4868 | [
"MIT"
] | null | null | null | Dataset/Leetcode/test/66/545.py | kkcookies99/UAST | fff81885aa07901786141a71e5600a08d7cb4868 | [
"MIT"
] | null | null | null | Dataset/Leetcode/test/66/545.py | kkcookies99/UAST | fff81885aa07901786141a71e5600a08d7cb4868 | [
"MIT"
] | null | null | null | class Solution:
def XXX(self, digits: List[int]) -> List[int]:
digitsLen =len(digits)
s = ''
for i in digits:
s = s+str(i)
s = str(int(s)+1)
return [int(x) for x in s]
| 22.5 | 50 | 0.471111 |
55745eb4ba8b7021a1ec29fa2bf06975cd835559 | 1,068 | py | Python | disaster.py | NORTHERNhacker/many-spiders | 2b743ebe1e74df15e557f40bcf47d7ebcd78c9ed | [
"Apache-2.0"
] | null | null | null | disaster.py | NORTHERNhacker/many-spiders | 2b743ebe1e74df15e557f40bcf47d7ebcd78c9ed | [
"Apache-2.0"
] | null | null | null | disaster.py | NORTHERNhacker/many-spiders | 2b743ebe1e74df15e557f40bcf47d7ebcd78c9ed | [
"Apache-2.0"
] | null | null | null | import requests
import json
import pymongo
key = ""#api的authkey
def get_disaster():
try:
client = pymongo.MongoClient('localhost', 27017)
tianqi = client['tianqi']
item_list = tianqi['tianqi_list']
except:
print('数据库连接失败')
try:
url = "https://api.seniverse.com/v3/weather/alarm.json?key="+key
r = request... | 28.864865 | 133 | 0.670412 |
ee7261bbcc2816e6249f338ad9389b8d155adb90 | 8,058 | py | Python | components/graph.py | chris-stock/pyglm | fff2e91b0936275f37a7860bd75f867b560f4993 | [
"MIT"
] | 1 | 2017-03-11T19:10:17.000Z | 2017-03-11T19:10:17.000Z | components/graph.py | chris-stock/pyglm | fff2e91b0936275f37a7860bd75f867b560f4993 | [
"MIT"
] | null | null | null | components/graph.py | chris-stock/pyglm | fff2e91b0936275f37a7860bd75f867b560f4993 | [
"MIT"
] | null | null | null | """
Weight models for the Network GLM
"""
import theano
import theano.tensor as T
import numpy as np
from component import Component
from priors import create_prior
from inference.log_sum_exp import log_sum_exp_sample
def create_graph_component(model):
type = model['network']['graph']['type'].lower()
... | 33.435685 | 92 | 0.543311 |
c22e688df71c8a3e48069d0d7750545b1432accf | 3,809 | py | Python | src/python/pants/base/mustache.py | AllClearID/pants | c4fdf00a3bdf9f26f876e85c46909d0729f7132c | [
"Apache-2.0"
] | 1 | 2018-12-10T21:31:02.000Z | 2018-12-10T21:31:02.000Z | src/python/pants/base/mustache.py | AllClearID/pants | c4fdf00a3bdf9f26f876e85c46909d0729f7132c | [
"Apache-2.0"
] | 2 | 2016-10-13T21:37:42.000Z | 2018-07-20T20:14:33.000Z | src/python/pants/base/mustache.py | AllClearID/pants | c4fdf00a3bdf9f26f876e85c46909d0729f7132c | [
"Apache-2.0"
] | 1 | 2018-03-08T22:21:44.000Z | 2018-03-08T22:21:44.000Z | # coding=utf-8
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import os
import pkg... | 38.474747 | 95 | 0.711473 |
7f1e0ac1aefa78fdca5930bb9b17acf50b0df074 | 13,580 | py | Python | examples/demo/advanced/data_cube.py | burnpanck/chaco | 6457cdd28625991ba69fbbee105051cab237aa51 | [
"BSD-3-Clause"
] | null | null | null | examples/demo/advanced/data_cube.py | burnpanck/chaco | 6457cdd28625991ba69fbbee105051cab237aa51 | [
"BSD-3-Clause"
] | null | null | null | examples/demo/advanced/data_cube.py | burnpanck/chaco | 6457cdd28625991ba69fbbee105051cab237aa51 | [
"BSD-3-Clause"
] | null | null | null | """
Allows isometric viewing of a 3D data cube.
Click or click-drag in any data window to set the slice to view.
"""
# Outstanding TODOs:
# - need to add line inspectors to side and bottom plots, and synchronize
# with center plot
# - need to set the various image plots to use the same colormap instance,
# an... | 34.292929 | 99 | 0.589912 |
7dfdb3c2a24037edc0302d6f886a3751cc80c771 | 582 | py | Python | fingerbank/__init__.py | justjake/py-fingerbank | 09e3395b7edda05cf9e328201fa01edad021eb22 | [
"OLDAP-2.6",
"Python-2.0"
] | 1 | 2015-05-16T17:49:24.000Z | 2015-05-16T17:49:24.000Z | fingerbank/__init__.py | justjake/py-fingerbank | 09e3395b7edda05cf9e328201fa01edad021eb22 | [
"OLDAP-2.6",
"Python-2.0"
] | null | null | null | fingerbank/__init__.py | justjake/py-fingerbank | 09e3395b7edda05cf9e328201fa01edad021eb22 | [
"OLDAP-2.6",
"Python-2.0"
] | null | null | null | """
Fingerbank tools.
Usage:
>>> import fingerbank
>>> oses, groups = fingerbank.read('data/dhcp_fingerprints.conf')
then implement your own filtering and selection on top of those nifty
values. More tools forthcoming in other modules
"""
from .parser import create_systems_and_groups, parse_config_with_heredo... | 26.454545 | 73 | 0.745704 |
40cf21fcae876d23ac1ed537ac764e3da34ac691 | 3,428 | py | Python | code/perspective/image_transformer.py | RobinMaas95/GTSRB_Visualization | fa837ff94e089a936ef4f4418970d262b35f70b6 | [
"MIT"
] | null | null | null | code/perspective/image_transformer.py | RobinMaas95/GTSRB_Visualization | fa837ff94e089a936ef4f4418970d262b35f70b6 | [
"MIT"
] | null | null | null | code/perspective/image_transformer.py | RobinMaas95/GTSRB_Visualization | fa837ff94e089a936ef4f4418970d262b35f70b6 | [
"MIT"
] | null | null | null | from util import *
import numpy as np
import cv2
# Usage:
# Change main function with ideal arguments
# Then
# from image_tranformer import ImageTransformer
#
# Parameters:
# image_path: the path of image that you want rotated
# shape : the ideal shape of input image, None for original size.
# ... | 31.740741 | 132 | 0.526254 |
4b62676d9e8af640ab8f716fc45078b92569c05a | 11,270 | py | Python | initfiles/sbin/cluster_script.py | miguelvazq/HPCC-Platform | 22ad8e5fcb59626abfd8febecbdfccb1e9fb0aa5 | [
"Apache-2.0"
] | null | null | null | initfiles/sbin/cluster_script.py | miguelvazq/HPCC-Platform | 22ad8e5fcb59626abfd8febecbdfccb1e9fb0aa5 | [
"Apache-2.0"
] | 1 | 2018-03-01T18:15:12.000Z | 2018-03-01T18:15:12.000Z | initfiles/sbin/cluster_script.py | miguelvazq/HPCC-Platform | 22ad8e5fcb59626abfd8febecbdfccb1e9fb0aa5 | [
"Apache-2.0"
] | 3 | 2021-05-02T17:01:57.000Z | 2021-05-02T17:02:28.000Z | #!/usr/bin/env python
'''
/*#############################################################################
HPCC SYSTEMS software Copyright (C) 2012 HPCC Systems(R).
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may o... | 34.570552 | 107 | 0.557054 |
42b6a0901852e8dc237327a71fa1342b0daa6c60 | 374 | py | Python | build/jackal_package/catkin_generated/pkg.develspace.context.pc.py | paulsebastian97/Moving-Jackal-Using-Face-Detection | 6ba628423f20cded832a430a940863bc8ed8a354 | [
"MIT"
] | null | null | null | build/jackal_package/catkin_generated/pkg.develspace.context.pc.py | paulsebastian97/Moving-Jackal-Using-Face-Detection | 6ba628423f20cded832a430a940863bc8ed8a354 | [
"MIT"
] | null | null | null | build/jackal_package/catkin_generated/pkg.develspace.context.pc.py | paulsebastian97/Moving-Jackal-Using-Face-Detection | 6ba628423f20cded832a430a940863bc8ed8a354 | [
"MIT"
] | null | null | null | # generated from catkin/cmake/template/pkg.context.pc.in
CATKIN_PACKAGE_PREFIX = ""
PROJECT_PKG_CONFIG_INCLUDE_DIRS = "".split(';') if "" != "" else []
PROJECT_CATKIN_DEPENDS = "".replace(';', ' ')
PKG_CONFIG_LIBRARIES_WITH_PREFIX = "".split(';') if "" != "" else []
PROJECT_NAME = "jackal_package"
PROJECT_SPACE_DIR = "... | 41.555556 | 68 | 0.705882 |
00901357796413eb566c018c2564c5ae555486d9 | 4,268 | py | Python | server/application/requests/instrument.py | cayman/decision | 3adeb0c64e7c6dc330fdd0f43c523e2bc42f7f52 | [
"MIT"
] | null | null | null | server/application/requests/instrument.py | cayman/decision | 3adeb0c64e7c6dc330fdd0f43c523e2bc42f7f52 | [
"MIT"
] | null | null | null | server/application/requests/instrument.py | cayman/decision | 3adeb0c64e7c6dc330fdd0f43c523e2bc42f7f52 | [
"MIT"
] | null | null | null | from flask import jsonify, request
from application import app, db
from application.models.company import Company
from application.models.instrument import Instrument, InstrumentType, InstrumentLink
from application.dto.instrument import InstrumentDTO, InstrumentTypeDTO, InstrumentLinkDTO
@app.route('/api/instrumen... | 29.434483 | 97 | 0.701734 |
fe490cc541682922c0573e8bcb4bc053a1bce621 | 4,573 | py | Python | AttendanceBot/GoogleBot.py | Aadityaprabu002/GoogleMeet_Attendance_Bot | 86aee5072d3c4035a051c51fe2c00e9c739e90af | [
"MIT"
] | 1 | 2021-11-28T17:43:39.000Z | 2021-11-28T17:43:39.000Z | AttendanceBot/GoogleBot.py | Aadityaprabu002/GoogleMeet_Attendance_Bot | 86aee5072d3c4035a051c51fe2c00e9c739e90af | [
"MIT"
] | null | null | null | AttendanceBot/GoogleBot.py | Aadityaprabu002/GoogleMeet_Attendance_Bot | 86aee5072d3c4035a051c51fe2c00e9c739e90af | [
"MIT"
] | null | null | null | from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.keys import Keys
import time
import TimeTable
import discordbot as DB
class GB(TimeTable.TT):
def __init__(self):
TimeTable.TT.__init_... | 44.833333 | 130 | 0.618194 |
e5dd6619c38541d80637b15789e3c0346d15275d | 628 | py | Python | cards/migrations/0002_card_user.py | yun-mh/uniwalk | f5307f6970b24736d13b56b4792c580398c35b3a | [
"Apache-2.0"
] | null | null | null | cards/migrations/0002_card_user.py | yun-mh/uniwalk | f5307f6970b24736d13b56b4792c580398c35b3a | [
"Apache-2.0"
] | 9 | 2020-01-10T14:10:02.000Z | 2022-03-12T00:08:19.000Z | cards/migrations/0002_card_user.py | yun-mh/uniwalk | f5307f6970b24736d13b56b4792c580398c35b3a | [
"Apache-2.0"
] | null | null | null | # Generated by Django 2.2.5 on 2019-12-02 07:10
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),
('cards', '0001_initial'),... | 27.304348 | 142 | 0.665605 |
22ab4e3b0d9215fef77f1fd88104eb1b88c50c94 | 3,006 | py | Python | postprocessing.py | node21challenge/rank1_node21_detection | 5c20bb650ed30c4a5f86cfa738018c456af7bfe9 | [
"Apache-2.0"
] | null | null | null | postprocessing.py | node21challenge/rank1_node21_detection | 5c20bb650ed30c4a5f86cfa738018c456af7bfe9 | [
"Apache-2.0"
] | null | null | null | postprocessing.py | node21challenge/rank1_node21_detection | 5c20bb650ed30c4a5f86cfa738018c456af7bfe9 | [
"Apache-2.0"
] | 2 | 2022-02-11T12:38:16.000Z | 2022-03-09T12:38:59.000Z | from torch import nn
import torch.nn.functional as F
import torch
from src.models.modules.DETR.util import box_ops
def get_NonMaxSup_boxes(pred_dict):
scores = pred_dict['scores']
boxes = pred_dict['boxes']
lambda_nms = 0.2
out_scores = []
out_boxes = []
for ix, (score,... | 42.338028 | 111 | 0.622422 |
a02eea961ce3f6282201c10870d1c6388f7aeef6 | 818 | py | Python | src/api/models/role/role_model.py | Avik32223/gala-iam-api | 2e9f852d016be651e90e21cd5693a10048e487e0 | [
"MIT"
] | null | null | null | src/api/models/role/role_model.py | Avik32223/gala-iam-api | 2e9f852d016be651e90e21cd5693a10048e487e0 | [
"MIT"
] | null | null | null | src/api/models/role/role_model.py | Avik32223/gala-iam-api | 2e9f852d016be651e90e21cd5693a10048e487e0 | [
"MIT"
] | null | null | null | from datetime import datetime
from enum import Enum
from typing import Dict, List, Optional, Union
from uuid import UUID
from pydantic import BaseModel
from models.base_record import BaseRecord, BaseRecordConfig
from models.resource.resource_model import ResourceKind
ROLE_MODEL_NAME = "roles"
class RoleMetadata(Ba... | 21.526316 | 59 | 0.765281 |
5087cb3e07964b4eba40a8b8733a27c940168945 | 1,957 | py | Python | test/functional/p2p_invalid_locator.py | vpubchain/syscoin | 72af49f24d2f4dd3628fd3ca8f7e3415534f55c8 | [
"MIT"
] | 1 | 2020-02-09T21:15:36.000Z | 2020-02-09T21:15:36.000Z | test/functional/p2p_invalid_locator.py | vpubchain/syscoin | 72af49f24d2f4dd3628fd3ca8f7e3415534f55c8 | [
"MIT"
] | null | null | null | test/functional/p2p_invalid_locator.py | vpubchain/syscoin | 72af49f24d2f4dd3628fd3ca8f7e3415534f55c8 | [
"MIT"
] | 1 | 2021-12-01T07:18:04.000Z | 2021-12-01T07:18:04.000Z | #!/usr/bin/env python3
# Copyright (c) 2015-2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test node responses to invalid locators.
"""
from test_framework.messages import msg_getheaders, msg_g... | 44.477273 | 135 | 0.685743 |
c453114c7f09d0753e3c670770ebbb1af32d15c0 | 309 | py | Python | main/views/admin/story/story_controller.py | tiberiucorbu/av-website | f26f44a367d718316442506b130a7034697670b8 | [
"MIT"
] | null | null | null | main/views/admin/story/story_controller.py | tiberiucorbu/av-website | f26f44a367d718316442506b130a7034697670b8 | [
"MIT"
] | null | null | null | main/views/admin/story/story_controller.py | tiberiucorbu/av-website | f26f44a367d718316442506b130a7034697670b8 | [
"MIT"
] | null | null | null | from flask.ext import wtf
import wtforms
import flask
import auth
import model
from main import app
import util
@app.route('/admin/stories', endpoint='admin_stories')
@auth.admin_required
def admin_stories():
return flask.render_template(
'admin/story/story.html',
title='Manage stories'
)
| 17.166667 | 54 | 0.747573 |
2f754d58a637b6a5e8fc78104b9094e3403840d6 | 4,327 | py | Python | libraries/python/coco/json_dataset.py | llyfacebook/caffe2-benchmarking | facb9502bba18c18b8396bea81e0c14afbb81d11 | [
"Apache-2.0"
] | null | null | null | libraries/python/coco/json_dataset.py | llyfacebook/caffe2-benchmarking | facb9502bba18c18b8396bea81e0c14afbb81d11 | [
"Apache-2.0"
] | null | null | null | libraries/python/coco/json_dataset.py | llyfacebook/caffe2-benchmarking | facb9502bba18c18b8396bea81e0c14afbb81d11 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
##############################################################################
# Copyright 2017-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
################################... | 33.542636 | 86 | 0.615207 |
f18db8c3846562bd7b3b5e21797e0f3ec25b1939 | 6,362 | py | Python | tests/storage/test_base.py | cleveritcz/synapse | caead3e45968a9f753da7bc11ee588ab4efda858 | [
"Apache-2.0"
] | 1 | 2019-03-20T12:41:08.000Z | 2019-03-20T12:41:08.000Z | tests/storage/test_base.py | cleveritcz/synapse | caead3e45968a9f753da7bc11ee588ab4efda858 | [
"Apache-2.0"
] | null | null | null | tests/storage/test_base.py | cleveritcz/synapse | caead3e45968a9f753da7bc11ee588ab4efda858 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2014-2016 OpenMarket Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 32.963731 | 85 | 0.620402 |
bbd5c64c8fdb35fe4454f318562dbefe8abe67ab | 6,987 | py | Python | accelbyte_py_sdk/api/basic/models/user_report_request.py | AccelByte/accelbyte-python-sdk | dcd311fad111c59da828278975340fb92e0f26f7 | [
"MIT"
] | null | null | null | accelbyte_py_sdk/api/basic/models/user_report_request.py | AccelByte/accelbyte-python-sdk | dcd311fad111c59da828278975340fb92e0f26f7 | [
"MIT"
] | 1 | 2021-10-13T03:46:58.000Z | 2021-10-13T03:46:58.000Z | accelbyte_py_sdk/api/basic/models/user_report_request.py | AccelByte/accelbyte-python-sdk | dcd311fad111c59da828278975340fb92e0f26f7 | [
"MIT"
] | null | null | null | # Copyright (c) 2021 AccelByte Inc. All Rights Reserved.
# This is licensed software from AccelByte Inc, for limitations
# and restrictions contact your company contract manager.
#
# Code generated. DO NOT EDIT!
# template file: justice_py_sdk_codegen/__main__.py
# justice-basic-service (1.36.3)
# pylint: disable=d... | 35.287879 | 172 | 0.599399 |
a8aadba0d2261af8d1d540988b1f84dab828d5f0 | 931 | py | Python | integration/python/test/test_md_quote_request_co.py | ShekharPaatni/SDK | 6534ffdb63af87c02c431df9add05a90370183cb | [
"Apache-2.0"
] | 11 | 2019-04-16T02:11:17.000Z | 2021-12-16T22:51:40.000Z | integration/python/test/test_md_quote_request_co.py | ShekharPaatni/SDK | 6534ffdb63af87c02c431df9add05a90370183cb | [
"Apache-2.0"
] | 81 | 2019-11-19T23:24:28.000Z | 2022-03-28T11:35:47.000Z | integration/python/test/test_md_quote_request_co.py | ShekharPaatni/SDK | 6534ffdb63af87c02c431df9add05a90370183cb | [
"Apache-2.0"
] | 11 | 2020-07-08T02:29:56.000Z | 2022-03-28T10:05:33.000Z | # coding: utf-8
"""
Hydrogen Integration API
The Hydrogen Integration API # noqa: E501
OpenAPI spec version: 1.3.1
Contact: info@hydrogenplatform.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import integration... | 22.707317 | 93 | 0.717508 |
05722c4fc174d2c99705ec89e03c2e692b4b0440 | 2,959 | py | Python | networks/FeatureGenerator.py | thomassutter/mmjsd | 51889cf35adcb53fa473ca84342209dc81ff7e0e | [
"MIT"
] | 12 | 2020-12-20T06:47:27.000Z | 2022-01-24T20:05:51.000Z | networks/FeatureGenerator.py | thomassutter/mmjsd | 51889cf35adcb53fa473ca84342209dc81ff7e0e | [
"MIT"
] | 1 | 2021-03-11T05:11:54.000Z | 2021-03-12T07:21:25.000Z | networks/FeatureGenerator.py | thomassutter/mmjsd | 51889cf35adcb53fa473ca84342209dc81ff7e0e | [
"MIT"
] | 6 | 2020-11-28T08:02:48.000Z | 2022-03-31T10:52:48.000Z | import numpy as np
import torch.nn as nn
from networks.ResidualBlocks import ResidualBlock1dTransposeConv
def make_res_block_decoder_feature_generator(channels_in, channels_out, a_val=2.0, b_val=0.3):
upsample = None;
if channels_in != channels_out:
upsample = nn.Sequential(nn.ConvTranspose1d(channe... | 49.316667 | 138 | 0.495438 |
d72e1f0f313e226bba530b40430a10b01e5a18a3 | 9,246 | py | Python | benchmarkbucket.py | MichaelORegan/46887-COMPUTATIONAL-THINKING-WITH-ALGORITHMS-PROJECT | 8d699e147fadd4eeb8652195c311a13c2d942a5b | [
"Apache-2.0"
] | null | null | null | benchmarkbucket.py | MichaelORegan/46887-COMPUTATIONAL-THINKING-WITH-ALGORITHMS-PROJECT | 8d699e147fadd4eeb8652195c311a13c2d942a5b | [
"Apache-2.0"
] | null | null | null | benchmarkbucket.py | MichaelORegan/46887-COMPUTATIONAL-THINKING-WITH-ALGORITHMS-PROJECT | 8d699e147fadd4eeb8652195c311a13c2d942a5b | [
"Apache-2.0"
] | null | null | null | # Michael O'Regan 05/May/2019
# http://interactivepython.org/runestone/static/pythonds/SortSearch/ThebucketSort.html
import time
import statistics
import numpy as np # importing numpy as np
np.random.seed(1) # seeding random on seed 1 so that all the arrays are the same
a = np.random.... | 50.25 | 178 | 0.612914 |
95482ce2d0ea6d703fd52ae9f8cc7f67282baff0 | 2,329 | py | Python | tools/combine_net_outputs.py | quantori/prj-covid-scoring | 98d80498ffbab1fdbbeec0fc4016f9a199dbf88e | [
"MIT"
] | null | null | null | tools/combine_net_outputs.py | quantori/prj-covid-scoring | 98d80498ffbab1fdbbeec0fc4016f9a199dbf88e | [
"MIT"
] | null | null | null | tools/combine_net_outputs.py | quantori/prj-covid-scoring | 98d80498ffbab1fdbbeec0fc4016f9a199dbf88e | [
"MIT"
] | null | null | null | import os
import argparse
import pandas as pd
from tools.utils import process_gt_metadata
def combine_inferences(
ground_truth_csv: str,
our_csv: str,
bsnet_csv: str,
covid_net_csv: str,
save_dir: str,
save_name: str,
) -> None:
df_ground_truth = pd.read_csv(ground_truth_csv)
df_grou... | 28.060241 | 81 | 0.633748 |
1b4bb7f235dbf1360bda2ca2e9a5af50691699c3 | 14,605 | py | Python | vc/service/helper/midas/midas/vit.py | very-meanly/vc | 41f63e8a8b159f3a49430bbee6872162de060901 | [
"MIT"
] | null | null | null | vc/service/helper/midas/midas/vit.py | very-meanly/vc | 41f63e8a8b159f3a49430bbee6872162de060901 | [
"MIT"
] | null | null | null | vc/service/helper/midas/midas/vit.py | very-meanly/vc | 41f63e8a8b159f3a49430bbee6872162de060901 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import timm
import types
import math
import torch.nn.functional as F
class Slice(nn.Module):
def __init__(self, start_index=1):
super(Slice, self).__init__()
self.start_index = start_index
def forward(self, x):
return x[:, self.start_index :]
class... | 29.806122 | 96 | 0.598904 |
71efb9d2ce35fdc8f9a63d9e234e57590fa86722 | 531 | py | Python | aglcheck/__init__.py | gjlbeckers-uu/aglcheck | f8d5260b4d1cb8878115bd55c1ed5c970c7bc4d5 | [
"BSD-3-Clause"
] | 3 | 2017-05-22T13:02:58.000Z | 2021-07-23T10:02:10.000Z | aglcheck/__init__.py | gjlbeckers-uu/aglcheck | f8d5260b4d1cb8878115bd55c1ed5c970c7bc4d5 | [
"BSD-3-Clause"
] | null | null | null | aglcheck/__init__.py | gjlbeckers-uu/aglcheck | f8d5260b4d1cb8878115bd55c1ed5c970c7bc4d5 | [
"BSD-3-Clause"
] | 1 | 2018-02-23T19:06:35.000Z | 2018-02-23T19:06:35.000Z | from __future__ import absolute_import
from .stringdata import read_stringdata, StringData
from ._examples import examplestringdata, get_examplestringdata
from . import stringcomparison
from . import stringsetcomparison
from . import plotting
from . import htmltables
from numpy.testing import Tester
test = Tester().te... | 27.947368 | 63 | 0.824859 |
7ccefcdc7ef66bc2cf82d7ded7925dd2797dda42 | 5,277 | py | Python | venv/lib/python3.6/site-packages/nlp/datasets/ted_multi/fcc3efb20ca917d5fb91a3bfb72d84fb22c1e2f8214f27d5eba76ce311c329a6/ted_multi.py | MachineLearningBCAM/minimax-risk-classifier | 82586c632268c103de269bcbffa5f7849b174a29 | [
"MIT"
] | 2 | 2021-09-28T01:36:21.000Z | 2021-12-22T08:24:17.000Z | venv/lib/python3.6/site-packages/nlp/datasets/ted_multi/fcc3efb20ca917d5fb91a3bfb72d84fb22c1e2f8214f27d5eba76ce311c329a6/ted_multi.py | MachineLearningBCAM/minimax-risk-classifier | 82586c632268c103de269bcbffa5f7849b174a29 | [
"MIT"
] | null | null | null | venv/lib/python3.6/site-packages/nlp/datasets/ted_multi/fcc3efb20ca917d5fb91a3bfb72d84fb22c1e2f8214f27d5eba76ce311c329a6/ted_multi.py | MachineLearningBCAM/minimax-risk-classifier | 82586c632268c103de269bcbffa5f7849b174a29 | [
"MIT"
] | 1 | 2020-12-08T10:36:30.000Z | 2020-12-08T10:36:30.000Z | # coding=utf-8
# Copyright 2020 The TensorFlow Datasets Authors and the HuggingFace NLP Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE... | 41.880952 | 689 | 0.633504 |
1a2022aacc9c12b9cc312728d5b7e086dc951ef4 | 12,649 | py | Python | google.py | petcupaula/fitrogue | 6c615e7f525c5b829a8591247f99ebee699558ff | [
"MIT"
] | 1 | 2019-11-18T15:00:04.000Z | 2019-11-18T15:00:04.000Z | google.py | petcupaula/fitrogue | 6c615e7f525c5b829a8591247f99ebee699558ff | [
"MIT"
] | null | null | null | google.py | petcupaula/fitrogue | 6c615e7f525c5b829a8591247f99ebee699558ff | [
"MIT"
] | 2 | 2020-05-14T08:05:49.000Z | 2020-12-17T08:49:04.000Z | import os
from datetime import date, timedelta, datetime
from flask import Flask, redirect, url_for, render_template, request, jsonify
from flask_dance.contrib.google import make_google_blueprint, google
import json
from ruamel.yaml import YAML
import backend.dungeon_time
yaml = YAML(typ='safe') # default, if not spe... | 36.98538 | 151 | 0.632461 |
cbc93fc85b0f2d9bb9a3c376d8ea993aa1ffddb2 | 518 | py | Python | pet_ct/model/modules.py | seyuboglu/weakly-supervised-petct | 182821ae6b6abe1bc3623692aeba85da8083b27b | [
"Apache-2.0"
] | 9 | 2020-08-09T23:25:41.000Z | 2022-03-09T20:24:02.000Z | pet_ct/model/modules.py | seyuboglu/weakly-supervised-petct | 182821ae6b6abe1bc3623692aeba85da8083b27b | [
"Apache-2.0"
] | 4 | 2020-09-17T10:47:09.000Z | 2022-03-12T00:20:26.000Z | pet_ct/model/modules.py | seyuboglu/weakly-supervised-petct | 182821ae6b6abe1bc3623692aeba85da8083b27b | [
"Apache-2.0"
] | 1 | 2021-04-12T17:42:02.000Z | 2021-04-12T17:42:02.000Z | """
"""
import torch
import torch.nn as nn
from transformers.modeling_bert import BertOnlyNSPHead, BertOnlyMLMHead, BertModel
from pet_ct.model.i3d import I3DEncoder, I3D, Mixed
from pet_ct.model.report_decoder import LSTMDecoder
from pet_ct.model.class_decoder import (ConvAttClassDecoder, LinearAttClassDecoder, AvgCl... | 43.166667 | 106 | 0.789575 |
14ae312eb11c4ed04244d072200b91445dbf631f | 1,740 | py | Python | 02-Advance_image_processing/01.1_Contours.py | myghact-1/complete-opencv | f89f7edce9d8ad1adde882e12d2e4eea91ea9155 | [
"MIT"
] | null | null | null | 02-Advance_image_processing/01.1_Contours.py | myghact-1/complete-opencv | f89f7edce9d8ad1adde882e12d2e4eea91ea9155 | [
"MIT"
] | null | null | null | 02-Advance_image_processing/01.1_Contours.py | myghact-1/complete-opencv | f89f7edce9d8ad1adde882e12d2e4eea91ea9155 | [
"MIT"
] | null | null | null | # https://docs.opencv.org/master/d3/d05/tutorial_py_table_of_contents_contours.html
import cv2
import numpy as np
image = cv2.imread("images\\cog2.jpg")
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
image2 = cv2.imread("images\\cog.jpg")
gray2 = cv2.cvtColor(image2, cv2.COLOR_BGR2GRAY)
def show_image(winname, im... | 29.491525 | 83 | 0.622414 |
818f82f076c03934de040c908d38904131a9da10 | 2,191 | py | Python | userbot/modules/wallpaper.py | aryazakaria01/CyberDyne-Userbot | 20e85ad5286bece5052a4ff636e6f0e3274bf2c5 | [
"PostgreSQL"
] | 5 | 2021-06-23T06:34:45.000Z | 2021-12-21T14:26:32.000Z | userbot/modules/wallpaper.py | aryazakaria01/CyberDyne-Userbot | 20e85ad5286bece5052a4ff636e6f0e3274bf2c5 | [
"PostgreSQL"
] | 65 | 2021-06-23T22:14:48.000Z | 2022-03-31T22:28:00.000Z | userbot/modules/wallpaper.py | aryazakaria01/CyberDyne-Userbot | 20e85ad5286bece5052a4ff636e6f0e3274bf2c5 | [
"PostgreSQL"
] | null | null | null | # Copyright (C) 2020 Alfiananda P.A
#
# Licensed under the General Public License, Version 3.0;
# you may not use this file except in compliance with the License.
#
import asyncio
import os
from asyncio.exceptions import TimeoutError
from telethon.errors.rpcerrorlist import YouBlockedUserError
from userbot import CM... | 35.918033 | 91 | 0.58649 |
9f87128a9894ba5954937e75f836df7174a6144b | 478 | py | Python | messaging/urls.py | ChrisMarsh82/iogt | 8141421a79b73bd038880a3be92fa6809adced13 | [
"BSD-2-Clause"
] | 20 | 2021-04-29T12:36:25.000Z | 2022-03-27T12:17:41.000Z | messaging/urls.py | ChrisMarsh82/iogt | 8141421a79b73bd038880a3be92fa6809adced13 | [
"BSD-2-Clause"
] | 892 | 2021-02-02T13:56:06.000Z | 2022-03-31T11:25:44.000Z | messaging/urls.py | ChrisMarsh82/iogt | 8141421a79b73bd038880a3be92fa6809adced13 | [
"BSD-2-Clause"
] | 28 | 2021-02-19T19:28:37.000Z | 2022-03-11T11:46:00.000Z | from django.urls import path, include
from . import views
app_name = "messaging"
urlpatterns = [
path('api/', include('messaging.api.urls')),
path('inbox/', views.InboxView.as_view(), name='inbox'),
path('message/<int:thread_id>', views.ThreadDetailView.as_view(), name='thread'),
path('message/create... | 31.866667 | 92 | 0.698745 |
6b6876afba7fa40ae6f5fbd395ea275834f88ee8 | 10,831 | py | Python | species_id/bin/color.py | MRSD2018/reefbot-1 | a595ca718d0cda277726894a3105815cef000475 | [
"MIT"
] | null | null | null | species_id/bin/color.py | MRSD2018/reefbot-1 | a595ca718d0cda277726894a3105815cef000475 | [
"MIT"
] | null | null | null | species_id/bin/color.py | MRSD2018/reefbot-1 | a595ca718d0cda277726894a3105815cef000475 | [
"MIT"
] | null | null | null |
import numpy as np
import scipy
import scipy.linalg
import os
# Various utilities and data for color processing
# See http://www.cvrl.org/ for text file of the data
# rgb the linear sRGB color space using D65 as a white-point
# (IEC 61966-2-1). Represents standard monitor (w/o gamma correction).
# rgbp is th... | 29.837466 | 76 | 0.599206 |
df798418d9a9d679064ecf937ad880bff8cd784a | 6,054 | py | Python | debug_funcs.py | Hroddric/cognionics-lsl-loop | baac7af6e2161978c4ff84f0c1bbd28fa9a34e5b | [
"CNRI-Python",
"Xnet",
"X11"
] | 2 | 2018-06-12T13:34:51.000Z | 2018-07-10T10:29:25.000Z | debug_funcs.py | Hroddric/cognionics-lsl-loop | baac7af6e2161978c4ff84f0c1bbd28fa9a34e5b | [
"CNRI-Python",
"Xnet",
"X11"
] | 3 | 2018-06-22T10:32:05.000Z | 2018-07-18T10:46:46.000Z | debug_funcs.py | Hroddric/cognionics-lsl-loop | baac7af6e2161978c4ff84f0c1bbd28fa9a34e5b | [
"CNRI-Python",
"Xnet",
"X11"
] | 1 | 2018-08-29T11:50:00.000Z | 2018-08-29T11:50:00.000Z | ### Debug functions ###
## IMPORTS ##
# General imports
import numpy as np
import scipy as sp
import scipy.fftpack as fft
import random as rand
import time
import sys
# Networking imports
from pylsl import StreamInfo, StreamOutlet, local_clock
def virtual_cognionics(channels=8, srate=500, chunk_size=1, buffer_size=... | 42.041667 | 105 | 0.656591 |
12dd0e7bf7fe11ceda759d134e69af946285ebdf | 1,229 | py | Python | tests/test_tabulate.py | mudcano/mudrich | 3f9c8c5ea0c61ace8a64eda02653f4caa56f895a | [
"MIT"
] | null | null | null | tests/test_tabulate.py | mudcano/mudrich | 3f9c8c5ea0c61ace8a64eda02653f4caa56f895a | [
"MIT"
] | 26 | 2021-06-14T08:31:45.000Z | 2022-03-28T05:15:04.000Z | tests/test_tabulate.py | volundmush/mudrich | 3f9c8c5ea0c61ace8a64eda02653f4caa56f895a | [
"MIT"
] | null | null | null | import itertools
from mudrich.style import Style
from mudrich.table import _Cell
from mudrich.tabulate import tabulate_mapping
def test_tabulate_mapping():
# TODO: tabulate_mapping may not be needed shortly
table = tabulate_mapping({"foo": "1", "bar": "2"})
assert len(table.columns) == 2
assert len(ta... | 35.114286 | 72 | 0.65419 |
41cb8b16cd72427c2e359b89401a25bb92864662 | 8,845 | py | Python | AppTaskQueue/test/unit/test_distributed_tq.py | isabella232/scale-safe | 8b887726768106b6b67d7be6ea257bee5cd83f9a | [
"Apache-2.0"
] | null | null | null | AppTaskQueue/test/unit/test_distributed_tq.py | isabella232/scale-safe | 8b887726768106b6b67d7be6ea257bee5cd83f9a | [
"Apache-2.0"
] | 1 | 2021-06-08T10:04:35.000Z | 2021-06-08T10:04:35.000Z | AppTaskQueue/test/unit/test_distributed_tq.py | isabella232/scale-safe | 8b887726768106b6b67d7be6ea257bee5cd83f9a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import json
import os
import sys
import unittest
import urllib2
from flexmock import flexmock
sys.path.append(os.path.join(os.path.dirname(__file__), "../../"))
from distributed_tq import DistributedTaskQueue
from tq_config import TaskQueueConfig
sys.path.append(os.path.join(os.path.dirname(__... | 31.365248 | 96 | 0.689316 |
452285a690002666bf6fc57a031d8dc3e30550f7 | 5,034 | py | Python | doc/conf.py | dhrone/pyASH | 85da060d135fb8be6475d58d4dc33acf88a3a9b2 | [
"MIT"
] | null | null | null | doc/conf.py | dhrone/pyASH | 85da060d135fb8be6475d58d4dc33acf88a3a9b2 | [
"MIT"
] | null | null | null | doc/conf.py | dhrone/pyASH | 85da060d135fb8be6475d58d4dc33acf88a3a9b2 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/stable/config
# -- Path setup ------------------------------------------------------------... | 30.143713 | 79 | 0.642034 |
812a949a30b7bbc42d6fd1592757fa43f9be6266 | 2,717 | py | Python | haystack/__init__.py | JTwo-Solutions/django-haystack | a06b435b5f22d5c3c3be50e8917d061c99419025 | [
"BSD-3-Clause"
] | null | null | null | haystack/__init__.py | JTwo-Solutions/django-haystack | a06b435b5f22d5c3c3be50e8917d061c99419025 | [
"BSD-3-Clause"
] | null | null | null | haystack/__init__.py | JTwo-Solutions/django-haystack | a06b435b5f22d5c3c3be50e8917d061c99419025 | [
"BSD-3-Clause"
] | null | null | null | # encoding: utf-8
from __future__ import absolute_import, division, print_function, unicode_literals
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from pkg_resources import DistributionNotFound, get_distribution, parse_version
from haystack import signals
from haystack.cons... | 33.134146 | 89 | 0.763342 |
8bd967acd698fe9841f70c7836fd209a55db8847 | 12,558 | py | Python | hdf5view/models.py | marts/hdf5view | 64ed71d0184cd7db9a31dc2c9052756a40692573 | [
"MIT"
] | 4 | 2020-02-04T18:18:46.000Z | 2022-02-13T17:12:01.000Z | hdf5view/models.py | marts/hdf5view | 64ed71d0184cd7db9a31dc2c9052756a40692573 | [
"MIT"
] | null | null | null | hdf5view/models.py | marts/hdf5view | 64ed71d0184cd7db9a31dc2c9052756a40692573 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import h5py
from qtpy.QtCore import (
QAbstractTableModel,
QModelIndex,
Qt,
)
from qtpy.QtGui import (
QBrush,
QIcon,
QStandardItem,
QStandardItemModel,
)
from qtpy.QtWidgets import (
QComboBox,
QStyledItemDelegate,
)
class TreeModel(QStandardItemModel):... | 27.6 | 115 | 0.545788 |
8db0213a0d9b61f3beabd8055e5f88c201aebf5f | 3,113 | py | Python | pokemon/settings.py | JuanJTorres11/pokemon | cbd6230e4937215f9e56eb3eed2f7e6c8af54b38 | [
"MIT"
] | 1 | 2020-08-19T17:53:37.000Z | 2020-08-19T17:53:37.000Z | pokemon/settings.py | JuanJTorres11/pokemon | cbd6230e4937215f9e56eb3eed2f7e6c8af54b38 | [
"MIT"
] | null | null | null | pokemon/settings.py | JuanJTorres11/pokemon | cbd6230e4937215f9e56eb3eed2f7e6c8af54b38 | [
"MIT"
] | null | null | null | """
Django settings for pokemon project.
Generated by 'django-admin startproject' using Django 3.0.5.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.0/ref/settings/
"""
import os
#... | 25.516393 | 91 | 0.695471 |
b7933ca19594c144f87e2b33e9dbc8c89faef727 | 2,338 | py | Python | apptools/apptools-windows-tests/apptools/manifest_app_name.py | jennycao/crosswalk-test-suite | 64874a2941276681cc9823c11dfc024cfe7aac47 | [
"BSD-3-Clause"
] | null | null | null | apptools/apptools-windows-tests/apptools/manifest_app_name.py | jennycao/crosswalk-test-suite | 64874a2941276681cc9823c11dfc024cfe7aac47 | [
"BSD-3-Clause"
] | null | null | null | apptools/apptools-windows-tests/apptools/manifest_app_name.py | jennycao/crosswalk-test-suite | 64874a2941276681cc9823c11dfc024cfe7aac47 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
#
# Copyright (c) 2015 Intel Corporation.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of works must retain the original copyright notice, this
# list of conditions and t... | 41.75 | 101 | 0.733533 |
2cff7e33bb0cef8fb92246a2fe2898993332cee1 | 11,589 | py | Python | imutils/convenience.py | Kwalish/imutils | b427aaa7844883821d271f5f5890df5d35a80ae3 | [
"MIT"
] | null | null | null | imutils/convenience.py | Kwalish/imutils | b427aaa7844883821d271f5f5890df5d35a80ae3 | [
"MIT"
] | null | null | null | imutils/convenience.py | Kwalish/imutils | b427aaa7844883821d271f5f5890df5d35a80ae3 | [
"MIT"
] | null | null | null | # author: Adrian Rosebrock
# website: http://www.pyimagesearch.com
# import the necessary packages
import numpy as np
import cv2
import sys
# import any special Python 2.7 packages
if sys.version_info.major == 2:
from urllib import urlopen
# import any special Python 3 packages
elif sys.version_info.major =... | 36.215625 | 123 | 0.625076 |
c6874f99e1e7f096dc35f212a2ce0472680d5017 | 12,010 | py | Python | devito/ir/clusters/algorithms.py | reguly/devito | 543b7be41ddbf1faa90224cca3824767756c9390 | [
"MIT"
] | 1 | 2022-01-25T02:20:52.000Z | 2022-01-25T02:20:52.000Z | devito/ir/clusters/algorithms.py | reguly/devito | 543b7be41ddbf1faa90224cca3824767756c9390 | [
"MIT"
] | null | null | null | devito/ir/clusters/algorithms.py | reguly/devito | 543b7be41ddbf1faa90224cca3824767756c9390 | [
"MIT"
] | null | null | null | from functools import partial
from itertools import groupby
import numpy as np
import sympy
from devito.exceptions import InvalidOperator
from devito.ir.support import Any, Backward, Forward, IterationSpace
from devito.ir.clusters.analysis import analyze
from devito.ir.clusters.cluster import Cluster, ClusterGroup
fr... | 40.43771 | 90 | 0.59642 |
cbde7edd629b08dc10e7635767c87c469c938ed4 | 11,228 | py | Python | running_video_file.py | abhi526691/Covid-Guard | 9c050ef44201c01f512169ffb146ad0da5278ec1 | [
"MIT"
] | 5 | 2020-08-26T18:39:29.000Z | 2020-11-16T13:05:11.000Z | running_video_file.py | abhi526691/Covid-Guard | 9c050ef44201c01f512169ffb146ad0da5278ec1 | [
"MIT"
] | null | null | null | running_video_file.py | abhi526691/Covid-Guard | 9c050ef44201c01f512169ffb146ad0da5278ec1 | [
"MIT"
] | 2 | 2020-10-07T15:12:51.000Z | 2020-10-22T08:49:13.000Z | # import the necessary packages
from tensorflow.keras.applications.mobilenet_v2 import preprocess_input
from tensorflow.keras.preprocessing.image import img_to_array
from tensorflow.keras.models import load_model
from imutils.video import VideoStream,FileVideoStream
import numpy as np
import imutils
import time
... | 31.717514 | 88 | 0.626915 |
75062cfdd46eb31c2d2d706dfbaf82d078d3bbec | 9,544 | py | Python | gen.py | chea-young/deep-anpr | 0faacfca2a8d0ed311834529f39b7f912980b8b8 | [
"MIT"
] | 1 | 2021-06-05T04:22:09.000Z | 2021-06-05T04:22:09.000Z | gen.py | chea-young/deep-anpr | 0faacfca2a8d0ed311834529f39b7f912980b8b8 | [
"MIT"
] | null | null | null | gen.py | chea-young/deep-anpr | 0faacfca2a8d0ed311834529f39b7f912980b8b8 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#
# Copyright (c) 2016 Matthew Earl
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modif... | 32.573379 | 79 | 0.595453 |
c7d64e405df3d55e43337fdd7c4903a28f0dcd4e | 1,743 | py | Python | regex/regex.py | zhaoyu69/python3-learning | faf786f03d13c632d107b1dbd42e923f8b012a28 | [
"MIT"
] | 1 | 2018-07-08T00:19:51.000Z | 2018-07-08T00:19:51.000Z | regex/regex.py | zhaoyu69/python3-learning | faf786f03d13c632d107b1dbd42e923f8b012a28 | [
"MIT"
] | null | null | null | regex/regex.py | zhaoyu69/python3-learning | faf786f03d13c632d107b1dbd42e923f8b012a28 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Python的r前缀,就不用考虑转义的问题
# s = 'ABC\\-001'
# s1 = r'ABC\-001'
# print(s,s1)
# 匹配成功返回match对象,失败返回None
# import re
# m = re.match(r'^\d{3}\-\d{3,8}$', '010-12345')
# print(m)
# m1 = re.match(r'^\d{3}\-\d{3,8}$', '010 12345')
# print(m1)
#
# test = '用户输入的字符串'
# if re.match(r... | 26.014925 | 155 | 0.562249 |
68930145030df5ef0fc243fdccdfc9130088b422 | 1,871 | py | Python | test/test_dump_sequence.py | rivethealth/slice-db | 2f94ae7e6c8970bd4ff42b10b0d612c4df179ab8 | [
"MIT"
] | 1 | 2021-04-07T18:13:56.000Z | 2021-04-07T18:13:56.000Z | test/test_dump_sequence.py | rivethealth/slice-db | 2f94ae7e6c8970bd4ff42b10b0d612c4df179ab8 | [
"MIT"
] | null | null | null | test/test_dump_sequence.py | rivethealth/slice-db | 2f94ae7e6c8970bd4ff42b10b0d612c4df179ab8 | [
"MIT"
] | null | null | null | import json
import os
import subprocess
from file import temp_file
from pg import connection, transaction
from process import run_process
_SCHEMA_SQL = """
CREATE TABLE datum (
id serial PRIMARY KEY,
color text NOT NULL
);
"""
def test_dump_sequence(pg_database, snapshot):
with temp_fil... | 24.946667 | 82 | 0.464992 |
3c9551e1ed3375001d418b1f81aac083d306909e | 815 | py | Python | build/lib/pyconfluent/kafka_streams/state/factory/key_value_store_factory.py | newellp2019/pyconfluent | b1de0b8255678c2e6a3a7d016df57b9f40cdc861 | [
"MIT"
] | null | null | null | build/lib/pyconfluent/kafka_streams/state/factory/key_value_store_factory.py | newellp2019/pyconfluent | b1de0b8255678c2e6a3a7d016df57b9f40cdc861 | [
"MIT"
] | null | null | null | build/lib/pyconfluent/kafka_streams/state/factory/key_value_store_factory.py | newellp2019/pyconfluent | b1de0b8255678c2e6a3a7d016df57b9f40cdc861 | [
"MIT"
] | null | null | null | from typing import TypeVar, Generic
from pyconfluent.kafka_streams.processor.serialization import Serde
from pyconfluent.kafka_streams.state.factory.in_memory_key_value_store_factory import InMemoryKeyValueStoreFactory
KT = TypeVar('KT') # Key type.
VT = TypeVar('VT') # Value type.
class KeyValueStoreFactory(Gene... | 38.809524 | 114 | 0.743558 |
2d8a8a962747a9e2e6933bed3a4bf17bf4a21a20 | 389 | py | Python | accounts/migrations/0004_auto_20191127_2121.py | gokul1630/Truecaller-APIs | d8ae0b08e60e470577931a81526c47a672b8dfe5 | [
"MIT"
] | 7 | 2020-12-19T07:23:32.000Z | 2022-03-10T20:03:15.000Z | accounts/migrations/0004_auto_20191127_2121.py | gokul1630/Truecaller-APIs | d8ae0b08e60e470577931a81526c47a672b8dfe5 | [
"MIT"
] | 6 | 2020-06-06T11:35:39.000Z | 2022-03-12T19:12:21.000Z | accounts/migrations/0004_auto_20191127_2121.py | gokul1630/Truecaller-APIs | d8ae0b08e60e470577931a81526c47a672b8dfe5 | [
"MIT"
] | 8 | 2020-08-14T00:08:11.000Z | 2021-11-18T10:20:57.000Z | # Generated by Django 2.2.7 on 2019-11-27 21:21
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('accounts', '0003_myuser_spam_count'),
]
operations = [
migrations.AlterField(
model_name='myuser',
name='spam_count'... | 20.473684 | 49 | 0.601542 |
81bc6e3c691756c5f70e67654e3711bf26579b38 | 12,003 | py | Python | tests/assemblers/test_xgboost.py | jasonkena/m2cgen | f831d4248fd9e3f47d1fc41fecc9fa94e056406d | [
"MIT"
] | 1 | 2021-01-25T09:55:29.000Z | 2021-01-25T09:55:29.000Z | tests/assemblers/test_xgboost.py | jasonkena/m2cgen | f831d4248fd9e3f47d1fc41fecc9fa94e056406d | [
"MIT"
] | null | null | null | tests/assemblers/test_xgboost.py | jasonkena/m2cgen | f831d4248fd9e3f47d1fc41fecc9fa94e056406d | [
"MIT"
] | null | null | null | import xgboost
import numpy as np
import os
from m2cgen import assemblers, ast
from tests import utils
def test_binary_classification():
estimator = xgboost.XGBClassifier(n_estimators=2, random_state=1,
max_depth=1)
utils.get_binary_classification_model_trainer()(estimat... | 32.440541 | 74 | 0.542448 |
9b0b04a6ea7164501ff5af6caace2bd4a6315cf4 | 74,283 | py | Python | python/paddle/fluid/executor.py | OuyangChao/Paddle | cac9635a6733ffbbd816b33e21c3054e0cd81ab1 | [
"Apache-2.0"
] | 2 | 2021-02-04T15:04:21.000Z | 2021-02-07T14:20:00.000Z | python/paddle/fluid/executor.py | OuyangChao/Paddle | cac9635a6733ffbbd816b33e21c3054e0cd81ab1 | [
"Apache-2.0"
] | 1 | 2021-01-25T09:40:19.000Z | 2021-01-25T09:40:19.000Z | python/paddle/fluid/executor.py | OuyangChao/Paddle | cac9635a6733ffbbd816b33e21c3054e0cd81ab1 | [
"Apache-2.0"
] | 3 | 2021-01-07T12:51:20.000Z | 2021-01-08T04:31:16.000Z | # Copyright (c) 2018 PaddlePaddle 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 app... | 43.465769 | 128 | 0.591683 |
5bea9bf8d3e991c7c980ad778a3767e4db41c0f4 | 1,294 | py | Python | scripts/csv_import.py | maximedenes/icubam | 0a4095cfa08d78058e70aa52891051d0694fdd36 | [
"Apache-2.0"
] | null | null | null | scripts/csv_import.py | maximedenes/icubam | 0a4095cfa08d78058e70aa52891051d0694fdd36 | [
"Apache-2.0"
] | null | null | null | scripts/csv_import.py | maximedenes/icubam | 0a4095cfa08d78058e70aa52891051d0694fdd36 | [
"Apache-2.0"
] | null | null | null | from absl import app
from absl import flags
from icubam import config
import icubam.db.store as db_store
from icubam.db import synchronizer
flags.DEFINE_string("config", "resources/config.toml", "Config file.")
flags.DEFINE_string("dotenv_path", "resources/.env", "Config file.")
flags.DEFINE_enum("mode", "dev", ["prod... | 28.755556 | 78 | 0.738794 |
6539a0c09cb0d43386417bb61bcecace3cdf8b74 | 1,132 | py | Python | app/mod_user/controllers.py | JackNeus/lampPost | f4614725ad6ef671507ddb268fab213ae869bd79 | [
"MIT"
] | null | null | null | app/mod_user/controllers.py | JackNeus/lampPost | f4614725ad6ef671507ddb268fab213ae869bd79 | [
"MIT"
] | 1 | 2021-12-13T19:50:13.000Z | 2021-12-13T19:50:13.000Z | app/mod_user/controllers.py | JackNeus/lampPost | f4614725ad6ef671507ddb268fab213ae869bd79 | [
"MIT"
] | null | null | null | from app import app, CONFIG
from flask import Blueprint, jsonify, request, render_template
from flask_login import LoginManager, login_user, logout_user, current_user
from app.mod_api import controllers as mod_api_controllers
from .models import *
from datetime import timedelta
login_manager = LoginManager()
login_man... | 27.609756 | 88 | 0.779152 |
18c91759f99cd8ca60d24d505073440d7f0f727d | 1,023 | py | Python | hwtLib/xilinx/slr_crossing_test.py | Nic30/hwtLib | 52fd28023c4a25f64da17bb4d7c3089d5c7348f4 | [
"MIT"
] | 24 | 2017-02-23T10:00:50.000Z | 2022-01-28T12:20:21.000Z | hwtLib/xilinx/slr_crossing_test.py | Nic30/hwtLib | 52fd28023c4a25f64da17bb4d7c3089d5c7348f4 | [
"MIT"
] | 32 | 2017-04-28T10:29:34.000Z | 2021-04-27T09:16:43.000Z | hwtLib/xilinx/slr_crossing_test.py | Nic30/hwtLib | 52fd28023c4a25f64da17bb4d7c3089d5c7348f4 | [
"MIT"
] | 8 | 2019-09-19T03:34:36.000Z | 2022-01-21T06:56:58.000Z | from hwtLib.xilinx.slr_crossing import HsSlrCrossing
from hwt.simulator.simTestCase import SimTestCase
from hwtSimApi.constants import CLK_PERIOD
class HsSlrCrossingTC(SimTestCase):
@classmethod
def setUpClass(cls):
u = cls.u = HsSlrCrossing()
u.DATA_WIDTH = 4
cls.compileSim(u)
d... | 26.230769 | 66 | 0.627566 |
45a4f964a54c060f6183b799020ce48b8902e8e0 | 19,390 | py | Python | lib/models/efficientnet_pytorch/biaozhun_model.py | sumaliqinghua/DSPNet | e82cc1938af65234471b6a139a8ac51f22de32a6 | [
"MIT"
] | 5 | 2020-12-04T05:50:09.000Z | 2022-01-14T12:37:44.000Z | lib/models/efficientnet_pytorch/biaozhun_model.py | sumaliqinghua/DSPNet | e82cc1938af65234471b6a139a8ac51f22de32a6 | [
"MIT"
] | 1 | 2021-01-28T03:20:00.000Z | 2021-01-28T03:20:00.000Z | lib/models/efficientnet_pytorch/biaozhun_model.py | sumaliqinghua/DSPNet | e82cc1938af65234471b6a139a8ac51f22de32a6 | [
"MIT"
] | 3 | 2020-12-02T03:18:59.000Z | 2021-09-12T11:29:19.000Z | '''
biaozhun
'''
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import torch
from torch import nn
from torch.nn import functional as F
from .utils import (
relu_fn,
round_filters,
round_repeats,
drop_connect,
get_same_padding_conv2d,
... | 41.698925 | 109 | 0.603868 |
5dec4b0e2ec7b957d8c72f4f1cd7879f065155d8 | 3,351 | py | Python | lumen/command.py | mattkram/lumen | b31eb80438151c57f03d2448dcfc3b5c9f57b579 | [
"BSD-3-Clause"
] | 96 | 2020-10-16T10:39:56.000Z | 2022-03-19T17:06:42.000Z | lumen/command.py | mattkram/lumen | b31eb80438151c57f03d2448dcfc3b5c9f57b579 | [
"BSD-3-Clause"
] | 72 | 2020-10-01T16:14:18.000Z | 2022-03-31T10:21:17.000Z | lumen/command.py | mattkram/lumen | b31eb80438151c57f03d2448dcfc3b5c9f57b579 | [
"BSD-3-Clause"
] | 11 | 2020-12-01T01:44:35.000Z | 2022-02-03T17:18:54.000Z | import argparse
import ast
import os
import sys
import bokeh.command.util
from bokeh.application.handlers.code import CodeHandler
from bokeh.command.util import build_single_handler_application as _build_application, die
from panel.command import main as _pn_main
from panel.io.server import Application
from . import... | 29.919643 | 113 | 0.631752 |
f6b2584d9cdcf1c41e7bf865df5a2b3578dcfa9f | 903 | py | Python | project_euler/problem_07/sol1.py | kostogls/Python | 81c2bcb3cbaeb4f861bc5c44df2526a89c616512 | [
"MIT"
] | 3 | 2020-05-31T11:28:07.000Z | 2020-10-25T15:37:09.000Z | project_euler/problem_07/sol1.py | Mathewsmusukuma/Python | 4866b1330bc7c77c0ed0e050e6b99efdeb026448 | [
"MIT"
] | 8 | 2020-03-24T17:47:23.000Z | 2022-03-12T00:33:21.000Z | project_euler/problem_07/sol1.py | Mathewsmusukuma/Python | 4866b1330bc7c77c0ed0e050e6b99efdeb026448 | [
"MIT"
] | 4 | 2020-03-06T00:53:00.000Z | 2021-01-05T13:42:35.000Z | """
By listing the first six prime numbers:
2, 3, 5, 7, 11, and 13
We can see that the 6th prime is 13. What is the Nth prime number?
"""
from math import sqrt
def isprime(n):
if n == 2:
return True
elif n % 2 == 0:
return False
else:
sq = int(sqrt(n)) + 1
for i in ra... | 16.418182 | 66 | 0.462901 |
b382c51d6241bc905e4e2af817da68b7e5ea7da3 | 15,585 | py | Python | minpy/nn/layers.py | yuhonghong66/minpy | 2e44927ad0fbff9295e2acf6db636e588fdc5b42 | [
"Apache-2.0"
] | 1,271 | 2015-11-05T10:53:40.000Z | 2022-02-20T08:33:35.000Z | minpy/nn/layers.py | yuhonghong66/minpy | 2e44927ad0fbff9295e2acf6db636e588fdc5b42 | [
"Apache-2.0"
] | 140 | 2016-04-07T02:55:19.000Z | 2019-08-02T06:01:53.000Z | minpy/nn/layers.py | yuhonghong66/minpy | 2e44927ad0fbff9295e2acf6db636e588fdc5b42 | [
"Apache-2.0"
] | 144 | 2015-11-05T10:53:45.000Z | 2022-03-25T05:38:09.000Z | """ DNN Layers. """
from __future__ import division
import minpy.numpy as np
import minpy.numpy.random as random
# pylint: disable=fixme, invalid-name, too-many-arguments, too-many-locals, no-member
def affine(x, w, b):
"""
Computes the forward pass for an affine (fully-connected) layer.
The input x ha... | 32.401247 | 91 | 0.614758 |
c0ed3503f701679ab7969ea4066ca0ab5a22137f | 64,190 | py | Python | pysnmp-with-texts/PEAKFLOW-SP-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 8 | 2019-05-09T17:04:00.000Z | 2021-06-09T06:50:51.000Z | pysnmp-with-texts/PEAKFLOW-SP-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 4 | 2019-05-31T16:42:59.000Z | 2020-01-31T21:57:17.000Z | pysnmp-with-texts/PEAKFLOW-SP-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 PEAKFLOW-SP-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/PEAKFLOW-SP-MIB
# Produced by pysmi-0.3.4 at Wed May 1 14:39:59 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27... | 137.45182 | 5,346 | 0.777146 |
d06b276f14a98221adba20da375c5dfdecaae582 | 10,940 | py | Python | mango/observables.py | neilfutureftr/mango-explorer | d8d5740cc53da90414323e8f62f5b6fbfc6ea5ed | [
"MIT"
] | null | null | null | mango/observables.py | neilfutureftr/mango-explorer | d8d5740cc53da90414323e8f62f5b6fbfc6ea5ed | [
"MIT"
] | null | null | null | mango/observables.py | neilfutureftr/mango-explorer | d8d5740cc53da90414323e8f62f5b6fbfc6ea5ed | [
"MIT"
] | 2 | 2021-09-01T18:29:44.000Z | 2021-09-02T22:31:33.000Z | # # ⚠ Warning
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
# LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
# NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIA... | 31.527378 | 227 | 0.688391 |
741ab02e39135022e535e76572dbc3dbb5fe0e17 | 423 | py | Python | tests/test_pyted.py | Antoch03/pyted | 997733c2ed002715067c18b73a30e84aeffac29d | [
"MIT"
] | null | null | null | tests/test_pyted.py | Antoch03/pyted | 997733c2ed002715067c18b73a30e84aeffac29d | [
"MIT"
] | null | null | null | tests/test_pyted.py | Antoch03/pyted | 997733c2ed002715067c18b73a30e84aeffac29d | [
"MIT"
] | null | null | null |
import unittest
import pyted
class TestMethods(unittest.TestCase):
def setUp(self):
pass
def test_add(self):
self.assertEqual(pyted.smile(), ":)")
def test_add_second(self):
self.assertEqual(pyted.frown(), ":(")
def test_version(self):
self.assertEqual(pyted.__ve... | 19.227273 | 47 | 0.612293 |
9b06d35490ea684c6a087a326b97912799a948b5 | 6,337 | py | Python | scripts/virtioforwarder_stats.py | bluca/virtio-forwarder | cac604efcdc4cdfc8f458b41ada478c4025b52d9 | [
"BSD-3-Clause"
] | 1 | 2021-11-25T06:22:00.000Z | 2021-11-25T06:22:00.000Z | scripts/virtioforwarder_stats.py | bluca/virtio-forwarder | cac604efcdc4cdfc8f458b41ada478c4025b52d9 | [
"BSD-3-Clause"
] | null | null | null | scripts/virtioforwarder_stats.py | bluca/virtio-forwarder | cac604efcdc4cdfc8f458b41ada478c4025b52d9 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/python2
# BSD LICENSE
#
# Copyright(c) 2016-2017 Netronome.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above ... | 32.664948 | 90 | 0.627584 |
f84c25070affed5aab9b9d2ccb61b199ca480895 | 235 | py | Python | src/lib/_init_paths.py | feihuidiqiu/CenterNet | f53aad36305c5e733f4bdccfd91041b5114c2da1 | [
"MIT"
] | null | null | null | src/lib/_init_paths.py | feihuidiqiu/CenterNet | f53aad36305c5e733f4bdccfd91041b5114c2da1 | [
"MIT"
] | null | null | null | src/lib/_init_paths.py | feihuidiqiu/CenterNet | f53aad36305c5e733f4bdccfd91041b5114c2da1 | [
"MIT"
] | null | null | null | import os.path as osp
import sys
def add_path(path):
if path not in sys.path:
sys.path.insert(0, path)
this_dir = osp.dirname(__file__)
# Add lib to PYTHONPATH
# lib_path = osp.join(this_dir, 'lib')
# add_path(lib_path)
| 18.076923 | 38 | 0.693617 |
b1485f828c45a4e6f5e5a2ad0c51c12180779d91 | 26,914 | py | Python | waymo_open_dataset/utils/range_image_utils.py | Xiangxu-0103/waymo-open-dataset | 071b5add2d0d809be2f18cec7922147c48c2efdf | [
"Apache-2.0"
] | null | null | null | waymo_open_dataset/utils/range_image_utils.py | Xiangxu-0103/waymo-open-dataset | 071b5add2d0d809be2f18cec7922147c48c2efdf | [
"Apache-2.0"
] | null | null | null | waymo_open_dataset/utils/range_image_utils.py | Xiangxu-0103/waymo-open-dataset | 071b5add2d0d809be2f18cec7922147c48c2efdf | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 The Waymo Open Dataset 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... | 37.432545 | 80 | 0.65204 |
6f235953e2707c5b3f5ca29f8092edffc651a3ec | 97,648 | py | Python | hydrus/client/networking/ClientLocalServerResources.py | SiNevesh/hydrus | 39f3a0589e5d9fe665babb7dc7535cf69d4bc582 | [
"WTFPL"
] | null | null | null | hydrus/client/networking/ClientLocalServerResources.py | SiNevesh/hydrus | 39f3a0589e5d9fe665babb7dc7535cf69d4bc582 | [
"WTFPL"
] | null | null | null | hydrus/client/networking/ClientLocalServerResources.py | SiNevesh/hydrus | 39f3a0589e5d9fe665babb7dc7535cf69d4bc582 | [
"WTFPL"
] | null | null | null | import collections
import collections.abc
import json
import os
import threading
import time
import traceback
import typing
from twisted.web.static import File as FileResource
from hydrus.core import HydrusConstants as HC
from hydrus.core import HydrusData
from hydrus.core import HydrusExceptions
from hydrus.core imp... | 37.413027 | 284 | 0.566033 |
0507dd7600d3c7b3bf24a0959d36840d96553607 | 1,568 | py | Python | ex42.py | Paul-Haley/LPTHW_python3 | 5900b719e7c206ec904954ec3d80889400ef1384 | [
"MIT"
] | null | null | null | ex42.py | Paul-Haley/LPTHW_python3 | 5900b719e7c206ec904954ec3d80889400ef1384 | [
"MIT"
] | 1 | 2017-01-26T14:27:23.000Z | 2017-02-06T01:55:41.000Z | ex42.py | Paul-Haley/LPTHW_python3 | 5900b719e7c206ec904954ec3d80889400ef1384 | [
"MIT"
] | null | null | null | ## Animal is-a object (yes, sort of confusing) look at the extra credit
class Animal(object):
pass
## Dog is-a Animal
class Dog(Animal):
def __init__(self, name):
## Dog has-a name
self.name = name
## Cat is-a Aniaml
class Cat(Animal):
def __init__(self, name):
## Cat has-a name
... | 19.6 | 79 | 0.632653 |
4a5ccb00268087ce793a0bb25d10bdb1606bd30f | 101,412 | py | Python | gclient.py | ghub/depot_tools | 46a672bafa212d2027fe68198840c68042e815d0 | [
"BSD-3-Clause"
] | null | null | null | gclient.py | ghub/depot_tools | 46a672bafa212d2027fe68198840c68042e815d0 | [
"BSD-3-Clause"
] | null | null | null | gclient.py | ghub/depot_tools | 46a672bafa212d2027fe68198840c68042e815d0 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Meta checkout dependency manager for Git."""
# Files
# .gclient : Current client configuration, written by 'config' comma... | 37.727679 | 80 | 0.638544 |
4fff10a4c225f4f78a39a1b9c4f31adf72957270 | 1,148 | py | Python | setup.py | jsolbrig/cookiecutter-satpy | 102ee3b9a4abdf6d5424235cf740df01be5de74f | [
"BSD-3-Clause"
] | null | null | null | setup.py | jsolbrig/cookiecutter-satpy | 102ee3b9a4abdf6d5424235cf740df01be5de74f | [
"BSD-3-Clause"
] | 3 | 2019-05-28T19:12:28.000Z | 2019-05-28T20:25:17.000Z | setup.py | jsolbrig/cookiecutter-satpy | 102ee3b9a4abdf6d5424235cf740df01be5de74f | [
"BSD-3-Clause"
] | null | null | null | # !/usr/bin/env python
from distutils.core import setup
setup(
name='cookiecutter-satpy',
packages=[],
version='0.1.0',
description='Cookiecutter template for a Python package',
author='Audrey Roy Greenfeld',
license='BSD',
author_email='aroy@alum.mit.edu',
url='https://github.com/jsolb... | 35.875 | 70 | 0.607143 |
15f236bffbef9c1871f838b4cdde02f834e6457f | 13,485 | py | Python | src/saltext/vmware/modules/nsxt_ip_pools.py | kdsalvy/salt-ext-modules-vmware-1 | 9fdc941692e4c526f575f33b2ce23c1470582934 | [
"Apache-2.0"
] | 10 | 2021-11-02T20:24:44.000Z | 2022-03-11T05:54:27.000Z | src/saltext/vmware/modules/nsxt_ip_pools.py | cmcmarrow/salt-ext-modules-vmware | c546a9f9ae121b7399dabae82f714117d0ab558d | [
"Apache-2.0"
] | 83 | 2021-10-01T15:13:02.000Z | 2022-03-31T16:22:40.000Z | src/saltext/vmware/modules/nsxt_ip_pools.py | cmcmarrow/salt-ext-modules-vmware | c546a9f9ae121b7399dabae82f714117d0ab558d | [
"Apache-2.0"
] | 15 | 2021-09-30T23:17:27.000Z | 2022-03-23T06:54:22.000Z | """
Salt Module to perform CRUD operations for NSX-T's IP Address Pools
"""
import logging
from saltext.vmware.utils import common
from saltext.vmware.utils import nsxt_request
log = logging.getLogger(__name__)
__virtual_name__ = "nsxt_ip_pools"
IP_POOLS_BASE_URL = "https://{}/api/v1/pools/ip-pools"
def __virtual... | 28.569915 | 139 | 0.621728 |
fb8379bc9b5320059dbaa706205b09ce1502f62f | 4,266 | py | Python | atari_zoo/log.py | calio/atari-model-zoo | 386f6ef7d3071ab3fcb541c700b34de771a5f1d9 | [
"Apache-2.0"
] | 206 | 2018-11-30T23:13:35.000Z | 2022-03-02T21:13:56.000Z | atari_zoo/log.py | calio/atari-model-zoo | 386f6ef7d3071ab3fcb541c700b34de771a5f1d9 | [
"Apache-2.0"
] | 6 | 2018-12-05T21:56:27.000Z | 2020-08-29T06:30:44.000Z | atari_zoo/log.py | calio/atari-model-zoo | 386f6ef7d3071ab3fcb541c700b34de771a5f1d9 | [
"Apache-2.0"
] | 33 | 2018-12-05T21:52:31.000Z | 2021-08-18T01:32:45.000Z | # Copyright (c) 2018 Uber Technologies, 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 ag... | 28.065789 | 105 | 0.641116 |
52e0291fff0c0c46a4831d67ed60bb0c97f98be0 | 3,294 | py | Python | dive_site_project/settings.py | Scuba-Chris/dive_site_api | 9c5f2a26e6c8a1e2eeaf6cd1b4174e764f83a6b6 | [
"MIT"
] | null | null | null | dive_site_project/settings.py | Scuba-Chris/dive_site_api | 9c5f2a26e6c8a1e2eeaf6cd1b4174e764f83a6b6 | [
"MIT"
] | 7 | 2020-06-05T21:03:39.000Z | 2021-09-22T18:33:33.000Z | dive_site_project/settings.py | Scuba-Chris/dive_site_api | 9c5f2a26e6c8a1e2eeaf6cd1b4174e764f83a6b6 | [
"MIT"
] | null | null | null | """
Django settings for dive_site_project project.
Generated by 'django-admin startproject' using Django 3.0.2.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.0/ref/settings/
"""
im... | 25.534884 | 91 | 0.69915 |
2d09624cf0c03c0ccb3b5b1a095d7fa711b47ad6 | 840 | py | Python | t_speech_assisstant/venv/lib/python3.7/site-packages/IMServicePlugIn/__init__.py | TEgo17/SpeechAssistant | 0e16dd4757f1b05f08ecbb4f4956b2ccd1a63c10 | [
"MIT"
] | 1 | 2020-09-01T16:24:50.000Z | 2020-09-01T16:24:50.000Z | t_speech_assisstant/venv/lib/python3.7/site-packages/IMServicePlugIn/__init__.py | TEgo17/SpeechAssistant | 0e16dd4757f1b05f08ecbb4f4956b2ccd1a63c10 | [
"MIT"
] | 1 | 2021-01-28T20:40:19.000Z | 2021-01-28T20:40:19.000Z | t_speech_assisstant/venv/lib/python3.7/site-packages/IMServicePlugIn/__init__.py | TEgo17/SpeechAssistant | 0e16dd4757f1b05f08ecbb4f4956b2ccd1a63c10 | [
"MIT"
] | null | null | null | """
Python mapping for the IMServicePlugIn framework.
This module does not contain docstrings for the wrapped code, check Apple's
documentation for details on how to use these functions and classes.
"""
import objc
import sys
import Cocoa
from IMServicePlugIn import _metadata, _IMServicePlugIn
try:
long
except ... | 22.105263 | 75 | 0.707143 |
dbbb3c4c7d53130519df7ba6499dd5f95fed904f | 343 | py | Python | setup.py | elerac/polanalyser | 801c6ed71d635dfc20e1514f76408133956c8d9d | [
"MIT"
] | 34 | 2020-09-05T07:41:49.000Z | 2022-03-29T22:25:53.000Z | setup.py | elerac/PolarizationImaging | 801c6ed71d635dfc20e1514f76408133956c8d9d | [
"MIT"
] | 3 | 2020-12-02T05:46:20.000Z | 2021-04-26T06:31:31.000Z | setup.py | elerac/polanalyser | 801c6ed71d635dfc20e1514f76408133956c8d9d | [
"MIT"
] | 9 | 2020-09-05T07:41:52.000Z | 2022-02-25T15:29:57.000Z | from setuptools import setup, find_packages
setup(
name='polanalyser',
version='1.2.0',
description='Polarization image analysis tool',
url='https://github.com/elerac/polanalyser',
author='Ryota Maeda',
author_email='maeda.ryota.elerac@gmail.com',
license='MIT',
packages=find_packages()... | 24.5 | 51 | 0.693878 |
55808747c2f4f39aea2a5dcc42ed177da6861940 | 13,486 | py | Python | cvtron/thirdparty/slim/nets/inception_v3_test.py | opencollective/CVTron | fd111d734fed4008ba9d04d18c359dbd441a1897 | [
"Apache-2.0"
] | 94 | 2018-03-31T06:32:50.000Z | 2020-09-25T10:19:23.000Z | cvtron/thirdparty/slim/nets/inception_v3_test.py | opencollective/CVTron | fd111d734fed4008ba9d04d18c359dbd441a1897 | [
"Apache-2.0"
] | 98 | 2018-04-02T15:55:25.000Z | 2020-04-06T09:35:36.000Z | cvtron/thirdparty/slim/nets/inception_v3_test.py | opencollective/CVTron | fd111d734fed4008ba9d04d18c359dbd441a1897 | [
"Apache-2.0"
] | 18 | 2018-07-10T22:54:19.000Z | 2021-03-23T05:17:39.000Z | # Copyright 2016 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 applicable ... | 41.881988 | 80 | 0.650156 |
b7ab46a09b61df08a18881bcbe35ac3ec92aa911 | 2,949 | py | Python | processing-backends/otc/scripts/otc_deploy.py | asamerh4/eo-analytics | fe1e61e8161fb9998345da0cd787b8dba0c56b24 | [
"Apache-2.0"
] | null | null | null | processing-backends/otc/scripts/otc_deploy.py | asamerh4/eo-analytics | fe1e61e8161fb9998345da0cd787b8dba0c56b24 | [
"Apache-2.0"
] | null | null | null | processing-backends/otc/scripts/otc_deploy.py | asamerh4/eo-analytics | fe1e61e8161fb9998345da0cd787b8dba0c56b24 | [
"Apache-2.0"
] | null | null | null | import argparse
from subprocess import call
parser = argparse.ArgumentParser(description = 'Deploy and manage a Mesos & Alluxio cluster on OTC.')
parser.add_argument("region",
choices = ["eu-de"],
help = "The OTC region to search and deploy Mesos into")
parser.add_argument('cl... | 44.681818 | 111 | 0.612411 |
76979641227b828b20a333e100dfe486cce00c37 | 3,842 | py | Python | gcs_basics.py | pearu/gcs | b54ba0cba9c853b797274ef26b6c42386f2cafa3 | [
"BSD-3-Clause"
] | 1 | 2022-01-07T19:28:00.000Z | 2022-01-07T19:28:00.000Z | gcs_basics.py | teoliphant/gcs | dc7f32ad0c7abc9d63abfb635534486c00733054 | [
"BSD-3-Clause"
] | null | null | null | gcs_basics.py | teoliphant/gcs | dc7f32ad0c7abc9d63abfb635534486c00733054 | [
"BSD-3-Clause"
] | 2 | 2020-12-17T15:28:18.000Z | 2021-10-06T15:12:36.000Z | """
"""
# Author: Pearu Peterson
# Created: December 2020
__all__ = ['create_reduction_metadata', 'reduction', 'promotion', 'compress_indices']
def product(seq):
return seq[0] * product(seq[1:]) if seq else 1
def create_reduction_metadata(shape, dimensions, partitioning):
"""Create metadata for dimension... | 33.408696 | 123 | 0.69469 |
41707a6256183bec39e9542b3b5ee2b19ccf9f5a | 2,211 | py | Python | packages/yolov5/setup.py | cuiboyuan/plato | 260b785cbbf8588c92331d6343211ff72321f90e | [
"Apache-2.0"
] | 135 | 2021-04-14T09:06:08.000Z | 2022-03-31T03:38:42.000Z | packages/yolov5/setup.py | cuiboyuan/plato | 260b785cbbf8588c92331d6343211ff72321f90e | [
"Apache-2.0"
] | 39 | 2021-05-16T00:34:08.000Z | 2022-03-10T22:03:57.000Z | packages/yolov5/setup.py | cuiboyuan/plato | 260b785cbbf8588c92331d6343211ff72321f90e | [
"Apache-2.0"
] | 41 | 2021-04-14T10:40:07.000Z | 2022-03-28T10:24:20.000Z | import io
import os
import re
import setuptools
def get_long_description():
base_dir = os.path.abspath(os.path.dirname(__file__))
with io.open(os.path.join(base_dir, "description.txt"), encoding="utf-8") as f:
return f.read()
def get_requirements():
with open("requirements.txt") as f:
r... | 34.546875 | 107 | 0.639077 |
f83282d6cde8952362c075f8c7976000f6e86edc | 17,373 | py | Python | pshmem/test.py | tskisner/mpi_shmem | f13f38a7c392e52db2757c4a662addead198675d | [
"BSD-2-Clause"
] | null | null | null | pshmem/test.py | tskisner/mpi_shmem | f13f38a7c392e52db2757c4a662addead198675d | [
"BSD-2-Clause"
] | 2 | 2019-02-08T19:12:53.000Z | 2019-02-08T19:15:06.000Z | pshmem/test.py | tskisner/mpi_shmem | f13f38a7c392e52db2757c4a662addead198675d | [
"BSD-2-Clause"
] | null | null | null | ##
# Copyright (c) 2017-2020, all rights reserved. Use of this source code
# is governed by a BSD license that can be found in the top-level
# LICENSE file.
##
import os
import sys
import time
import traceback
import unittest
import numpy as np
import numpy.testing as nt
from .shmem import MPIShared
from .locking ... | 38.606667 | 101 | 0.483164 |
a853edee051d878531ae97d45bb0dfa8d05515a9 | 752 | py | Python | Login/migrations/0001_initial.py | Enrialonso/DjangoLoginMongoDB | c816fade7e3c3814511c48d2b804d45359640907 | [
"Apache-2.0"
] | null | null | null | Login/migrations/0001_initial.py | Enrialonso/DjangoLoginMongoDB | c816fade7e3c3814511c48d2b804d45359640907 | [
"Apache-2.0"
] | null | null | null | Login/migrations/0001_initial.py | Enrialonso/DjangoLoginMongoDB | c816fade7e3c3814511c48d2b804d45359640907 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 2.0.2 on 2018-11-09 16:15
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Usuario',
fields=[
('id', models.AutoField(... | 28.923077 | 114 | 0.575798 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.