hexsha stringlengths 40 40 | size int64 2 1.05M | ext stringclasses 9
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 193 | max_stars_repo_name stringlengths 6 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 36.6k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 193 | max_issues_repo_name stringlengths 6 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 29.8k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 193 | max_forks_repo_name stringlengths 6 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 11.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.05M | avg_line_length float64 1 404k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
74bddcecfc4c9a6791d78987d853647889522d17 | 3,535 | py | Python | services/activities/approver/receive.py | CPSSD/rabble | 88ad5f4cfd49c00037ffdd0f0b5d463dcbf299c9 | [
"MIT"
] | 3 | 2020-03-17T23:18:39.000Z | 2021-03-06T02:56:46.000Z | services/activities/approver/receive.py | CPSSD/rabble | 88ad5f4cfd49c00037ffdd0f0b5d463dcbf299c9 | [
"MIT"
] | 3 | 2020-03-21T08:47:34.000Z | 2020-05-11T21:56:56.000Z | services/activities/approver/receive.py | CPSSD/rabble | 88ad5f4cfd49c00037ffdd0f0b5d463dcbf299c9 | [
"MIT"
] | 1 | 2020-03-17T14:13:54.000Z | 2020-03-17T14:13:54.000Z | from services.proto import approver_pb2
from services.proto import database_pb2
class ReceiveApprovalServicer:
def __init__(self, logger, db_stub, users_util):
self._logger = logger
self._db_stub = db_stub
self._users_util = users_util
def _get_users(self, resp, req):
# TODO(d... | 38.423913 | 78 | 0.576238 |
74be29cf153b8e48045b7cc3030b611c6deb4722 | 13,560 | py | Python | Multitask-CNN-RNN/models/resnet50.py | wtomin/Multitask-Emotion-Recognition-with-Incomplete-Labels | e6df7ffc9b0318fdce405e40993c79785b47c785 | [
"MIT"
] | 74 | 2020-03-08T15:29:00.000Z | 2022-03-05T14:57:33.000Z | Multitask-CNN-RNN/models/resnet50.py | wtomin/Multitask-Emotion-Recognition-with-Incomplete-Labels | e6df7ffc9b0318fdce405e40993c79785b47c785 | [
"MIT"
] | 19 | 2020-03-06T08:56:51.000Z | 2022-03-27T05:07:35.000Z | Multitask-CNN-RNN/models/resnet50.py | wtomin/Multitask-Emotion-Recognition-with-Incomplete-Labels | e6df7ffc9b0318fdce405e40993c79785b47c785 | [
"MIT"
] | 23 | 2020-03-20T08:19:55.000Z | 2022-03-16T17:40:09.000Z | import torch
import torch.nn as nn
from collections import OrderedDict
from torch.autograd import Variable
from .models import BaseModel
from .models import ModelsFactory
import os
import numpy as np
import torch.nn.functional as F
from PATH import PATH
PRESET_VARS = PATH()
MODEL_DIR = PRESET_VARS.MODEL_DIR
from copy i... | 50.597015 | 191 | 0.586136 |
74be5d577da0aa76861f295f4659de7b057ffced | 50 | py | Python | potion/notion_block.py | cardosofede/potion | 478d869c7745736d2d5691545366611b96795de4 | [
"MIT"
] | null | null | null | potion/notion_block.py | cardosofede/potion | 478d869c7745736d2d5691545366611b96795de4 | [
"MIT"
] | null | null | null | potion/notion_block.py | cardosofede/potion | 478d869c7745736d2d5691545366611b96795de4 | [
"MIT"
] | null | null | null | class Block:
def __init__(self):
pass
| 12.5 | 23 | 0.58 |
74be724d3360c0938d11640201b43027cf1a79e6 | 3,099 | py | Python | control/policy.py | nyucan/can-selfdriving | 2a0c68eb1e5ce01bf8fe1c408fbb256184376694 | [
"MIT"
] | 3 | 2019-02-19T22:22:07.000Z | 2019-03-16T04:58:58.000Z | control/policy.py | nyucan/can-selfdriving | 2a0c68eb1e5ce01bf8fe1c408fbb256184376694 | [
"MIT"
] | null | null | null | control/policy.py | nyucan/can-selfdriving | 2a0c68eb1e5ce01bf8fe1c408fbb256184376694 | [
"MIT"
] | null | null | null | import numpy as np
def adp(distance_2_tan, radian_at_tan, distance_integral, K):
""" Control with `distance_2_tan`, `radian_at_tan` and `distance_integral`
with `K` trained from the ADP algorithm.
"""
state = np.array([distance_2_tan, radian_at_tan, distance_integral])
differential_drive = np.c... | 37.792683 | 100 | 0.65989 |
74be9bbde261ee1f2e62a80a94d31d3447b3338f | 1,469 | py | Python | msl/examples/qt/loop_until_abort.py | rebeccahawke/msl-qt | 753ea28aa385a39a33827de2c229e9944a3b1cf3 | [
"MIT"
] | null | null | null | msl/examples/qt/loop_until_abort.py | rebeccahawke/msl-qt | 753ea28aa385a39a33827de2c229e9944a3b1cf3 | [
"MIT"
] | null | null | null | msl/examples/qt/loop_until_abort.py | rebeccahawke/msl-qt | 753ea28aa385a39a33827de2c229e9944a3b1cf3 | [
"MIT"
] | null | null | null | """
Example script to repeatedly write data to a file until aborted by the user.
"""
import tempfile
from msl.qt import prompt, LoopUntilAbort
class LoopExample(LoopUntilAbort):
def __init__(self):
"""Initialize the LoopUntilAbort class and create a file to write data to.
Use a 250 ms delay bet... | 29.979592 | 82 | 0.643975 |
74beafede677374547e9b89748fa5ac7a27f6ea6 | 2,146 | py | Python | marble/common.py | carnby/marble | 00992e630d391052d2803f54ff7ecb52cc2e2110 | [
"BSD-3-Clause"
] | null | null | null | marble/common.py | carnby/marble | 00992e630d391052d2803f54ff7ecb52cc2e2110 | [
"BSD-3-Clause"
] | null | null | null | marble/common.py | carnby/marble | 00992e630d391052d2803f54ff7ecb52cc2e2110 | [
"BSD-3-Clause"
] | 1 | 2019-10-29T20:57:32.000Z | 2019-10-29T20:57:32.000Z | # -*- coding: utf-8 -*-
"""common.py
Contains basic functions that are shared throughout the module
"""
__author__ = """\t""".join(["Rémi Louf <remi.louf@sciti.es>"])
def compute_totals(distribution, classes):
"Compute the number of individuals per class, per unit and in total"
N_unit = {au:sum([distribu... | 30.657143 | 90 | 0.637465 |
74bec0ed6c3f4f6cbac5425dfb1feaa53ec39537 | 1,422 | py | Python | tavern/util/exceptions.py | MaxFedotov/tavern | cb027703cb848e113c69454b7c0147d10984d7ca | [
"MIT"
] | null | null | null | tavern/util/exceptions.py | MaxFedotov/tavern | cb027703cb848e113c69454b7c0147d10984d7ca | [
"MIT"
] | null | null | null | tavern/util/exceptions.py | MaxFedotov/tavern | cb027703cb848e113c69454b7c0147d10984d7ca | [
"MIT"
] | 1 | 2018-08-22T17:51:54.000Z | 2018-08-22T17:51:54.000Z | class TavernException(Exception):
"""Base exception
"""
class BadSchemaError(TavernException):
"""Schema mismatch
"""
class TestFailError(TavernException):
"""Test failed somehow
"""
class KeyMismatchError(TavernException):
"""Mismatch found while validating keys in response
"""
... | 20.314286 | 77 | 0.709564 |
74beceb9ee5856f05918054e601153dd742b279a | 3,492 | py | Python | openapi_client/models/bad_request.py | hypostulate/mbta-api-client | f18903b6269c523c733a31574ff4579349fed3f8 | [
"MIT"
] | null | null | null | openapi_client/models/bad_request.py | hypostulate/mbta-api-client | f18903b6269c523c733a31574ff4579349fed3f8 | [
"MIT"
] | null | null | null | openapi_client/models/bad_request.py | hypostulate/mbta-api-client | f18903b6269c523c733a31574ff4579349fed3f8 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
MBTA
MBTA service API. https://www.mbta.com Source code: https://github.com/mbta/api # noqa: E501
The version of the OpenAPI document: 3.0
Contact: developer@mbta.com
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
from op... | 28.390244 | 97 | 0.579611 |
74bedb90cbca5b02d585eb1fad6afd13e294732b | 3,512 | py | Python | backend/corpora/common/upload.py | HumanCellAtlas/dcp-prototype | 44ca66a266004124f39d7d3e3dd75e9076012ff0 | [
"MIT"
] | 2 | 2020-02-07T18:12:12.000Z | 2020-02-11T14:59:03.000Z | backend/corpora/common/upload.py | HumanCellAtlas/dcp-prototype | 44ca66a266004124f39d7d3e3dd75e9076012ff0 | [
"MIT"
] | 173 | 2020-01-29T17:48:02.000Z | 2020-03-20T02:52:58.000Z | backend/corpora/common/upload.py | HumanCellAtlas/dcp-prototype | 44ca66a266004124f39d7d3e3dd75e9076012ff0 | [
"MIT"
] | null | null | null | import boto3
import json
import time
from sqlalchemy.orm import Session
from .corpora_config import CorporaConfig
import os
from .corpora_orm import CollectionVisibility, ProcessingStatus
from .entities import Collection, Dataset
from .utils.authorization_checks import owner_or_allowed
from .utils.exceptions import ... | 32.518519 | 115 | 0.720103 |
74bf0a8412ccd6f57a6e7ab74a1a48570d29a620 | 2,331 | py | Python | appengine/swarming/swarming_bot/test_env_bot.py | stefb965/luci-py | e0a8a5640c4104e5c90781d833168aa8a8d1f24d | [
"Apache-2.0"
] | 1 | 2017-10-30T15:08:10.000Z | 2017-10-30T15:08:10.000Z | appengine/swarming/swarming_bot/test_env_bot.py | stefb965/luci-py | e0a8a5640c4104e5c90781d833168aa8a8d1f24d | [
"Apache-2.0"
] | null | null | null | appengine/swarming/swarming_bot/test_env_bot.py | stefb965/luci-py | e0a8a5640c4104e5c90781d833168aa8a8d1f24d | [
"Apache-2.0"
] | 1 | 2020-07-05T19:54:40.000Z | 2020-07-05T19:54:40.000Z | # Copyright 2015 The LUCI Authors. All rights reserved.
# Use of this source code is governed under the Apache License, Version 2.0
# that can be found in the LICENSE file.
import os
import sys
# swarming_bot/
BOT_DIR = os.path.dirname(os.path.realpath(os.path.abspath(__file__)))
def init_symlinks(root):
"""Adds... | 32.375 | 80 | 0.677392 |
74bf173901dd406ea6277623f950be6010552728 | 9,980 | py | Python | leetcode_python/Array/flatten-2d-vector.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | null | null | null | leetcode_python/Array/flatten-2d-vector.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | null | null | null | leetcode_python/Array/flatten-2d-vector.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | null | null | null | """
251. Flatten 2D Vector
Medium
Design an iterator to flatten a 2D vector. It should support the next and hasNext operations.
Implement the Vector2D class:
Vector2D(int[][] vec) initializes the object with the 2D vector vec.
next() returns the next element from the 2D vector and moves the pointer one step forward... | 29.352941 | 143 | 0.569038 |
74bf48942ff6f1bbeb1bbec0d8889b781be5d1b2 | 4,395 | py | Python | django_joblog/impl/JobModelAbstraction.py | defgsus/django-joblog | 88467f951d7ebc586c69e421cab39e4caa395cca | [
"MIT"
] | null | null | null | django_joblog/impl/JobModelAbstraction.py | defgsus/django-joblog | 88467f951d7ebc586c69e421cab39e4caa395cca | [
"MIT"
] | null | null | null | django_joblog/impl/JobModelAbstraction.py | defgsus/django-joblog | 88467f951d7ebc586c69e421cab39e4caa395cca | [
"MIT"
] | null | null | null | # encoding=utf-8
from __future__ import unicode_literals
from django.utils.translation import ugettext_lazy as _
from django.utils import timezone
from django.db import transaction
from .exceptions import JobIsAlreadyRunningError
class JobModelAbstraction(object):
"""
Helper for JobLogger communication with... | 36.322314 | 110 | 0.617065 |
74bf6088166a922a8b39889b7d6829538b13244e | 3,148 | py | Python | carrot/migrations/0001_initial.py | martinell/django-carrot | 11c8790d8e68ccd7757cc9187d852acb2f528a8d | [
"Apache-2.0"
] | 63 | 2017-10-12T19:38:17.000Z | 2022-02-21T15:56:17.000Z | carrot/migrations/0001_initial.py | martinell/django-carrot | 11c8790d8e68ccd7757cc9187d852acb2f528a8d | [
"Apache-2.0"
] | 93 | 2017-10-13T06:17:14.000Z | 2022-03-02T14:25:40.000Z | carrot/migrations/0001_initial.py | martinell/django-carrot | 11c8790d8e68ccd7757cc9187d852acb2f528a8d | [
"Apache-2.0"
] | 19 | 2018-03-26T08:33:13.000Z | 2022-03-17T04:33:49.000Z | # Generated by Django 2.0.5 on 2018-05-08 12:04
import django.core.validators
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies: list = [
]
operations = [
migrations.CreateModel(
name='MessageLog',
fields=[
... | 56.214286 | 201 | 0.596252 |
74bf73c8cd3a71aeba53d8da94c2dd13b0ae5250 | 23,347 | py | Python | data/level/level133.py | levelupai/match3-level-similarity | cc9b28b8741b41bea1273c8bc9b4d265d79a1dca | [
"Apache-2.0"
] | null | null | null | data/level/level133.py | levelupai/match3-level-similarity | cc9b28b8741b41bea1273c8bc9b4d265d79a1dca | [
"Apache-2.0"
] | 6 | 2020-07-04T02:53:08.000Z | 2022-03-11T23:53:14.000Z | data/level/level133.py | levelupai/match3-level-similarity | cc9b28b8741b41bea1273c8bc9b4d265d79a1dca | [
"Apache-2.0"
] | 3 | 2019-12-31T11:42:59.000Z | 2021-03-28T20:06:13.000Z | data = {
'level_index': 133,
'move_count': 31,
'board_info': {
(0, 0): {
'base': (51, 1),
'fall_point': (0, -1, {'random_list': [1, 2, 4, 5]}),
'next': (0, 1),
'prev': (0, -1)
},
(0, 1): {
'base': (4, 1),
'cover'... | 24.345151 | 65 | 0.212147 |
74bf941608fd81654f2c238b4218c20a825ee239 | 2,021 | py | Python | src/aoiklivereload/demo/bottle_demo.py | AoiKuiyuyou/AoikLiveReload | 0d5adb12118a33749e6690a8165fdb769cff7d5c | [
"MIT"
] | 25 | 2016-12-22T13:28:30.000Z | 2021-06-15T13:07:13.000Z | src/aoiklivereload/demo/bottle_demo.py | AoiKuiyuyou/AoikLiveReload | 0d5adb12118a33749e6690a8165fdb769cff7d5c | [
"MIT"
] | 1 | 2017-10-29T21:21:32.000Z | 2017-10-29T21:35:58.000Z | src/aoiklivereload/demo/bottle_demo.py | AoiKuiyuyou/AoikLiveReload | 0d5adb12118a33749e6690a8165fdb769cff7d5c | [
"MIT"
] | 5 | 2017-05-18T05:34:21.000Z | 2018-08-18T05:07:58.000Z | # coding: utf-8
"""
Demo for the live reloading of Bottle server.
"""
from __future__ import absolute_import
# Standard imports
import os
import sys
# External imports
import bottle
def main():
"""
Main function.
:return:
None.
"""
try:
# Get the `src` directory's absolute path
... | 22.208791 | 79 | 0.529936 |
74bfa0369332e8c3cfaaa912f588875633a4203a | 151 | py | Python | app/api/v2/__init__.py | MbuguaCaleb/Questioner-V2-API | 9e3a5593250a12b74ad5dcbe220827040fa3d676 | [
"MIT"
] | null | null | null | app/api/v2/__init__.py | MbuguaCaleb/Questioner-V2-API | 9e3a5593250a12b74ad5dcbe220827040fa3d676 | [
"MIT"
] | 1 | 2019-01-19T13:10:02.000Z | 2019-01-19T13:10:02.000Z | app/api/v2/__init__.py | MbuguaCaleb/Questioner-V2-API | 9e3a5593250a12b74ad5dcbe220827040fa3d676 | [
"MIT"
] | null | null | null | """ Initiates blueprints for version 2 of the API """
from flask import Blueprint
version_2 = Blueprint('version_2', __name__, url_prefix='/api/v2')
| 25.166667 | 66 | 0.741722 |
74bfb8edb1784f8142abd21fe18ab34a13ad4cb1 | 27,797 | py | Python | tf2onnx/tfonnx.py | LoicDagnas/tensorflow-onnx | 6691850e79047d05d85017573170fd8240393b57 | [
"Apache-2.0"
] | 1,473 | 2018-03-16T02:47:33.000Z | 2022-03-31T03:43:52.000Z | tf2onnx/tfonnx.py | LoicDagnas/tensorflow-onnx | 6691850e79047d05d85017573170fd8240393b57 | [
"Apache-2.0"
] | 1,208 | 2018-03-14T09:58:49.000Z | 2022-03-31T17:56:20.000Z | tf2onnx/tfonnx.py | LoicDagnas/tensorflow-onnx | 6691850e79047d05d85017573170fd8240393b57 | [
"Apache-2.0"
] | 350 | 2018-04-03T03:48:40.000Z | 2022-03-30T11:23:55.000Z | # SPDX-License-Identifier: Apache-2.0
"""
tf2onnx.tf2onnx - rewrite tensorflow graph to onnx graph
"""
import collections
import sys
import traceback
import numpy as np
from onnx import onnx_pb
import tf2onnx
import tf2onnx.onnx_opset # pylint: disable=unused-import
import tf2onnx.tflite_handlers # pylint: disab... | 43.982595 | 119 | 0.622441 |
74bfdea47ce59fe788ae31bfa2a8592dc20d9b3a | 1,467 | py | Python | remora/renderer/manifests/__init__.py | yuanying/remora | b61cfc7c5035d8dc9a887bbdd9da333b05c2f6d3 | [
"Apache-2.0"
] | 5 | 2017-11-24T11:14:39.000Z | 2022-02-07T19:41:16.000Z | remora/renderer/manifests/__init__.py | yuanying/remora | b61cfc7c5035d8dc9a887bbdd9da333b05c2f6d3 | [
"Apache-2.0"
] | 17 | 2017-04-11T01:35:03.000Z | 2018-07-26T04:21:40.000Z | remora/renderer/manifests/__init__.py | yuanying/remora | b61cfc7c5035d8dc9a887bbdd9da333b05c2f6d3 | [
"Apache-2.0"
] | 7 | 2017-03-08T04:44:09.000Z | 2022-02-07T19:41:16.000Z | #
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distr... | 24.864407 | 77 | 0.678255 |
74bfded6daa6730847852b2193e84b212b1fbd60 | 5,946 | py | Python | salt/client/ssh/state.py | johngrasty/salt | f66b18d8ee52eb988c3dbd8ba3ff6a6173c8aea5 | [
"Apache-2.0"
] | 3 | 2015-04-16T18:42:35.000Z | 2017-10-30T16:57:49.000Z | salt/client/ssh/state.py | lyft/salt | 2715908423a412f736253d0e5d3cfe185a0179a2 | [
"Apache-2.0"
] | 16 | 2015-11-18T00:44:03.000Z | 2018-10-29T20:48:27.000Z | salt/client/ssh/state.py | johngrasty/salt | f66b18d8ee52eb988c3dbd8ba3ff6a6173c8aea5 | [
"Apache-2.0"
] | 1 | 2017-01-27T21:33:36.000Z | 2017-01-27T21:33:36.000Z | # -*- coding: utf-8 -*-
'''
Create ssh executor system
'''
from __future__ import absolute_import
# Import python libs
import os
import tarfile
import tempfile
import json
import shutil
from contextlib import closing
# Import salt libs
import salt.client.ssh.shell
import salt.client.ssh
import salt.utils
import salt.u... | 30.80829 | 77 | 0.551295 |
74bfe428ee8df5e1aff1efbbc4f6d39d67ace8d9 | 9,902 | py | Python | sprokit/tests/bindings/python/sprokit/pipeline/test-run.py | dstoup/kwiver | a3a36317b446baf0feb6274235ab1ac6b4329ead | [
"BSD-3-Clause"
] | 1 | 2017-07-31T07:07:32.000Z | 2017-07-31T07:07:32.000Z | sprokit/tests/bindings/python/sprokit/pipeline/test-run.py | dstoup/kwiver | a3a36317b446baf0feb6274235ab1ac6b4329ead | [
"BSD-3-Clause"
] | 3 | 2021-03-19T15:39:43.000Z | 2021-09-08T02:47:15.000Z | sprokit/tests/bindings/python/sprokit/pipeline/test-run.py | acidburn0zzz/kwiver | 6e4205f1c46df04759c57c040f01cc804b27e00d | [
"BSD-3-Clause"
] | null | null | null | #!@PYTHON_EXECUTABLE@
#ckwg +28
# Copyright 2011-2013 by Kitware, Inc.
# 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 copyright notice,... | 25.989501 | 102 | 0.659867 |
74bfe6fb726fda59975cd3eb23bca5dfdb600fc6 | 393 | py | Python | pysal/tests/test_imports.py | martinfleis/pysal | d2e0667d825d403efe7182ecda210dc152ec206d | [
"BSD-3-Clause"
] | 941 | 2015-01-12T22:25:55.000Z | 2022-03-27T15:41:29.000Z | pysal/tests/test_imports.py | anekekarina99/pysal | bd8c954d34b4694416830a852e26fe40d64424f2 | [
"BSD-3-Clause"
] | 589 | 2015-01-09T03:58:03.000Z | 2022-02-26T02:17:15.000Z | pysal/tests/test_imports.py | anekekarina99/pysal | bd8c954d34b4694416830a852e26fe40d64424f2 | [
"BSD-3-Clause"
] | 303 | 2015-01-10T02:59:04.000Z | 2022-03-05T04:21:55.000Z | from pkgutil import iter_modules
from pysal import federation_hierarchy
def module_exists(module_name):
return module_name in (name for loader, name, ispkg in iter_modules())
def test_imports():
for layer in federation_hierarchy:
packages = federation_hierarchy[layer]
for package in packages:... | 30.230769 | 74 | 0.737913 |
74c01acd5a249face2f06d5b351f0e0f51f0c085 | 2,113 | py | Python | venv/Lib/site-packages/pyrogram/raw/types/input_theme_slug.py | D1ne2021/jjhhhjj | a090da30983b3ef276dfe4cef2ded4526f36002a | [
"MIT"
] | 2 | 2021-12-13T07:09:55.000Z | 2022-01-12T12:15:20.000Z | venv/Lib/site-packages/pyrogram/raw/types/input_theme_slug.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pyrogram/raw/types/input_theme_slug.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | # Pyrogram - Telegram MTProto API Client Library for Python
# Copyright (C) 2017-2021 Dan <https://github.com/delivrance>
#
# This file is part of Pyrogram.
#
# Pyrogram is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free... | 30.623188 | 103 | 0.618552 |
74c01bb135574845c52da3e311d425e4a81654c6 | 1,504 | py | Python | utm_tracker/session.py | czue/django-utm-tracker | 32c89676f121315d82591ccef81971cb24eddd77 | [
"MIT"
] | null | null | null | utm_tracker/session.py | czue/django-utm-tracker | 32c89676f121315d82591ccef81971cb24eddd77 | [
"MIT"
] | null | null | null | utm_tracker/session.py | czue/django-utm-tracker | 32c89676f121315d82591ccef81971cb24eddd77 | [
"MIT"
] | null | null | null | import logging
from typing import Any, List
from django.contrib.sessions.backends.base import SessionBase
from .models import LeadSource
from .types import UtmParamsDict
SESSION_KEY_UTM_PARAMS = "utm_params"
logger = logging.getLogger(__name__)
def stash_utm_params(session: SessionBase, params: UtmParamsDict) -> ... | 28.377358 | 83 | 0.711436 |
74c02d7c510ab45e1c31270560fcb8682efa5857 | 1,446 | py | Python | phr/establecimiento/migrations/0008_auto_20170424_1124.py | richardqa/django-ex | e5b8585f28a97477150ac5daf5e55c74b70d87da | [
"CC0-1.0"
] | null | null | null | phr/establecimiento/migrations/0008_auto_20170424_1124.py | richardqa/django-ex | e5b8585f28a97477150ac5daf5e55c74b70d87da | [
"CC0-1.0"
] | null | null | null | phr/establecimiento/migrations/0008_auto_20170424_1124.py | richardqa/django-ex | e5b8585f28a97477150ac5daf5e55c74b70d87da | [
"CC0-1.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.10.7 on 2017-04-24 11:24
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('establecimiento', '0007_auto_20170424_1122'),
]
op... | 39.081081 | 192 | 0.671508 |
74c036779b7f4253f48bbbb2edf20abd6c6e7115 | 12,857 | py | Python | src/util/bicubic_patch.py | joeedh/fairmotion | 5c322fc012cdd94ddc2f21d68264c845b3c2c770 | [
"MIT"
] | 1 | 2015-05-22T14:11:17.000Z | 2015-05-22T14:11:17.000Z | src/util/bicubic_patch.py | joeedh/fairmotion | 5c322fc012cdd94ddc2f21d68264c845b3c2c770 | [
"MIT"
] | 2 | 2021-09-02T20:01:35.000Z | 2022-01-26T19:47:35.000Z | src/util/bicubic_patch.py | joeedh/fairmotion | 5c322fc012cdd94ddc2f21d68264c845b3c2c770 | [
"MIT"
] | null | null | null | import bpy
from mathutils import *
from math import *
import bmesh
import time, random, sys, os, io, imp
def facto(n):
prod = 1
for i in range(1, n+1):
prod *= i
return prod
class Vector1 (object):
def __init__(self, vec=None):
self.vec = [0.0, 0.0, 0.0]
if vec !... | 26.079108 | 155 | 0.426538 |
74c03e09529d6508151500172da60adf91633897 | 2,521 | py | Python | src/api/bkuser_core/tests/apis/v3/departments/test_list.py | Canway-shiisa/bk-user | a049e80d12082960828015742cea4b041f4af796 | [
"MIT"
] | null | null | null | src/api/bkuser_core/tests/apis/v3/departments/test_list.py | Canway-shiisa/bk-user | a049e80d12082960828015742cea4b041f4af796 | [
"MIT"
] | null | null | null | src/api/bkuser_core/tests/apis/v3/departments/test_list.py | Canway-shiisa/bk-user | a049e80d12082960828015742cea4b041f4af796 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-用户管理(Bk-User) available.
Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in compliance with the Lic... | 38.19697 | 115 | 0.587862 |
74c0477db698054df54858eeb26e221ae4cadaa8 | 1,508 | py | Python | echome/network/xml_generator.py | mgtrrz/echome | b3a123391089d4a09b4eb6e240bb783ef5bc06cc | [
"MIT"
] | 2 | 2022-01-31T19:32:51.000Z | 2022-01-31T22:42:13.000Z | echome/network/xml_generator.py | mgtrrz/echome | b3a123391089d4a09b4eb6e240bb783ef5bc06cc | [
"MIT"
] | 7 | 2021-04-04T01:15:53.000Z | 2022-02-07T03:34:48.000Z | echome/network/xml_generator.py | mgtrrz/echome | b3a123391089d4a09b4eb6e240bb783ef5bc06cc | [
"MIT"
] | 1 | 2022-02-01T11:34:50.000Z | 2022-02-01T11:34:50.000Z | import xmltodict
import logging
from typing import List
from enum import Enum
from dataclasses import dataclass, field
# from .models import VirtualNetwork
# from echome.config import ecHomeConfig
logger = logging.getLogger(__name__)
# <network>
# <name>examplenetwork</name>
# <bridge name="virbr100" />
# <for... | 23.5625 | 113 | 0.56565 |
74c093739d9a212d1722a710e72c6047342ecd25 | 3,212 | py | Python | toontown/pets/PetActionFSM.py | LittleNed/toontown-stride | 1252a8f9a8816c1810106006d09c8bdfe6ad1e57 | [
"Apache-2.0"
] | 1 | 2018-06-16T23:06:38.000Z | 2018-06-16T23:06:38.000Z | toontown/pets/PetActionFSM.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | null | null | null | toontown/pets/PetActionFSM.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | 4 | 2019-06-20T23:45:23.000Z | 2020-10-14T20:30:15.000Z | from direct.directnotify import DirectNotifyGlobal
from direct.fsm import FSM
from direct.interval.IntervalGlobal import *
from direct.task import Task
from direct.distributed.ClockDelta import globalClockDelta
from toontown.toonbase.ToonPythonUtil import lerp
from toontown.pets import PetTricks
from toontown.toon impo... | 36.5 | 142 | 0.634496 |
74c0969f65e1d879d8c40235ffe81a760f1b8d9c | 3,486 | py | Python | telegram-phone-validation.py | AnonCollaborator/telegram-phone-number-checker | d1f92d3b0af81bec077395ca47aa833eecb01731 | [
"MIT"
] | null | null | null | telegram-phone-validation.py | AnonCollaborator/telegram-phone-number-checker | d1f92d3b0af81bec077395ca47aa833eecb01731 | [
"MIT"
] | null | null | null | telegram-phone-validation.py | AnonCollaborator/telegram-phone-number-checker | d1f92d3b0af81bec077395ca47aa833eecb01731 | [
"MIT"
] | null | null | null | #!/usr/local/bin/python3
from telethon import TelegramClient, errors, events, sync
from telethon.tl.types import InputPhoneContact
from telethon import functions, types
from dotenv import load_dotenv
import argparse
import os
from getpass import getpass
load_dotenv()
API_ID = os.getenv('API_ID')
API_HASH = os.getenv... | 38.733333 | 161 | 0.668101 |
74c0b0bd4423b25226c402b93c0c335c35f957be | 999 | py | Python | toontown/coghq/CashbotMintLavaRoomFoyer_Battle01_Cogs.py | LittleNed/toontown-stride | 1252a8f9a8816c1810106006d09c8bdfe6ad1e57 | [
"Apache-2.0"
] | 3 | 2020-01-02T08:43:36.000Z | 2020-07-05T08:59:02.000Z | toontown/coghq/CashbotMintLavaRoomFoyer_Battle01_Cogs.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | null | null | null | toontown/coghq/CashbotMintLavaRoomFoyer_Battle01_Cogs.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | 4 | 2019-06-20T23:45:23.000Z | 2020-10-14T20:30:15.000Z | from toontown.coghq.SpecImports import *
from toontown.toonbase import ToontownGlobals
CogParent = 10000
BattleParent = 10005
BattleCellId = 0
BattleCells = {BattleCellId: {'parentEntId': BattleParent,
'pos': Point3(0, 0, 0)}}
CogData = [{'parentEntId': CogParent,
'boss': 1,
'level': 14,
'battleCe... | 22.2 | 58 | 0.598599 |
74c0bd5e781b007c637d201e6f26f5603a12e05c | 2,464 | py | Python | test.py | franciol/Servidor_de_desafios | 3ce3de561af5ce5182a3d0f5db0a7dfd3b51a8fc | [
"MIT"
] | null | null | null | test.py | franciol/Servidor_de_desafios | 3ce3de561af5ce5182a3d0f5db0a7dfd3b51a8fc | [
"MIT"
] | null | null | null | test.py | franciol/Servidor_de_desafios | 3ce3de561af5ce5182a3d0f5db0a7dfd3b51a8fc | [
"MIT"
] | null | null | null | import pytest
import sys
import os
import time
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from softdes import lambda_handler
a = {'ndes': '1', 'code': '"""Arquivo a ser enviado ao sistema"""\n\ndef desafio1(number):\n """Função que retorna o valor entrado"""\n return number... | 39.111111 | 228 | 0.625 |
74c0deb4a219e9e75e5163a63a0c63fc176fd26a | 1,803 | py | Python | setup.py | gnmerritt/pyramid_log | 2731813f7d9cff38ab392859212d26c7b64e0698 | [
"BSD-3-Clause"
] | null | null | null | setup.py | gnmerritt/pyramid_log | 2731813f7d9cff38ab392859212d26c7b64e0698 | [
"BSD-3-Clause"
] | null | null | null | setup.py | gnmerritt/pyramid_log | 2731813f7d9cff38ab392859212d26c7b64e0698 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright © 2014 Geoffrey T. Dairiki <dairiki@dairiki.org>
#
import os
import sys
from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README.rst')).read()
CHANGES = open(os.path.join(here, 'CHANGES.rst')).read()
ve... | 30.05 | 74 | 0.640044 |
74c0f1ba67732b594d67eb5181d803c768fa9cfc | 572 | py | Python | mintoweb/http_parser.py | decebel/mintoweb | 6479c20331ed339d35de1ef9bfef09f2abd5a1a8 | [
"Apache-2.0"
] | null | null | null | mintoweb/http_parser.py | decebel/mintoweb | 6479c20331ed339d35de1ef9bfef09f2abd5a1a8 | [
"Apache-2.0"
] | null | null | null | mintoweb/http_parser.py | decebel/mintoweb | 6479c20331ed339d35de1ef9bfef09f2abd5a1a8 | [
"Apache-2.0"
] | null | null | null | import os
import sys
from request import Request, RequestError
BASE_URL = "http://appengine.com/"
RESOURCE_SEPARATOR = "/"
def get_url_endpoint(url):
if not url:
return None
if RESOURCE_SEPARATOR not in url:
return None
parts = url.split("/")
if not parts or not parts[0]:
return None
return parts[... | 11.673469 | 48 | 0.687063 |
74c1194fe078b4aa875596083d91dd03c22617dd | 45,119 | py | Python | mediagoblin/db/migrations.py | Piratas/biblioteca | 1770feba67173a3beb43853eed33586d47abeac1 | [
"CC0-1.0"
] | null | null | null | mediagoblin/db/migrations.py | Piratas/biblioteca | 1770feba67173a3beb43853eed33586d47abeac1 | [
"CC0-1.0"
] | 1 | 2018-01-06T18:12:02.000Z | 2018-01-06T18:27:31.000Z | mediagoblin/db/migrations.py | Piratas/biblioteca | 1770feba67173a3beb43853eed33586d47abeac1 | [
"CC0-1.0"
] | 1 | 2019-05-13T15:04:10.000Z | 2019-05-13T15:04:10.000Z | # GNU MediaGoblin -- federated, autonomous media hosting
# Copyright (C) 2011, 2012 MediaGoblin contributors. See AUTHORS.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either versio... | 36.03754 | 80 | 0.680667 |
74c11b759ebfa7d2e10e7c17e20ab40e45761d80 | 5,026 | py | Python | persist.py | susemm/wsjimg | f0b294e563f442c021db278e061f53275fd4493d | [
"MIT"
] | null | null | null | persist.py | susemm/wsjimg | f0b294e563f442c021db278e061f53275fd4493d | [
"MIT"
] | null | null | null | persist.py | susemm/wsjimg | f0b294e563f442c021db278e061f53275fd4493d | [
"MIT"
] | null | null | null | __author__ = 'vin@misday.com'
from pyvin.core import SqliteHelp
# article
## id, title, content, date, url, download, read, deleted,
# picture
## id, article_id, url, filename, description
# trigger
## delete picture items while deleting article.
class WsjPersist(SqliteHelp):
DB_NAME = 'data.db'
... | 31.610063 | 121 | 0.543971 |
74c144d604dd0a3dc0ccb75562cd1c592810833f | 1,955 | py | Python | PYTHON/Billing.py | Danish-Belal/CodeCollection | cd3914d3d73542dd5f20755c4b1e42906f443b03 | [
"MIT"
] | 125 | 2021-10-01T19:05:26.000Z | 2021-10-03T13:32:42.000Z | PYTHON/Billing.py | Danish-Belal/CodeCollection | cd3914d3d73542dd5f20755c4b1e42906f443b03 | [
"MIT"
] | 201 | 2021-10-30T20:40:01.000Z | 2022-03-22T17:26:28.000Z | PYTHON/Billing.py | Danish-Belal/CodeCollection | cd3914d3d73542dd5f20755c4b1e42906f443b03 | [
"MIT"
] | 294 | 2021-10-01T18:46:05.000Z | 2021-10-03T14:25:07.000Z | from tkinter import *
window=Tk()
window.geometry("700x500")
#---------------calculting function
def calculate():
rice=e1.get()
samosa=e2.get()
those=e3.get()
tea=e4.get()
print(type(tea))
total=((int(rice)*250)+(int(samosa)*50)+(int(those)*40)+(int(tea)*30))
labelt=Label(wi... | 25.064103 | 84 | 0.573913 |
74c15030655258b745fecd9156f770712582c0b5 | 5,149 | py | Python | tests/unit/h_vialib/client_test.py | hypothesis/h-vialib | 7b4e75c24e16363a11fe446b0a9f24c54becc70b | [
"BSD-2-Clause"
] | null | null | null | tests/unit/h_vialib/client_test.py | hypothesis/h-vialib | 7b4e75c24e16363a11fe446b0a9f24c54becc70b | [
"BSD-2-Clause"
] | 9 | 2021-02-05T16:23:17.000Z | 2021-04-16T13:47:15.000Z | tests/unit/h_vialib/client_test.py | hypothesis/h-vialib | 7b4e75c24e16363a11fe446b0a9f24c54becc70b | [
"BSD-2-Clause"
] | null | null | null | import pytest
from h_matchers import Any
from h_vialib import ViaClient, ViaDoc
class TestViaDoc:
@pytest.mark.parametrize(
"url,content_type,is_pdf",
(
("http://example.com", None, False),
("http://example.com", "html", False),
("http://example.com", "pdf", Tr... | 33.00641 | 88 | 0.587881 |
74c1516a1c73fd576dddc49e537a94efa16089ef | 1,220 | py | Python | gen3_replicator/submission_helper.py | ohsu-comp-bio/gen3-etl-lite | c91093e6c7b269db5baca41619a93356a68c4e97 | [
"MIT"
] | null | null | null | gen3_replicator/submission_helper.py | ohsu-comp-bio/gen3-etl-lite | c91093e6c7b269db5baca41619a93356a68c4e97 | [
"MIT"
] | 1 | 2021-03-25T22:26:08.000Z | 2021-03-25T22:26:08.000Z | gen3_replicator/submission_helper.py | ohsu-comp-bio/gen3-etl-lite | c91093e6c7b269db5baca41619a93356a68c4e97 | [
"MIT"
] | null | null | null | from gen3.auth import Gen3Auth
from gen3.submission import Gen3Submission
from graph_helper import db_credentials
from config_helper import load_json, config_path
# db passwords, etc.
creds = load_json('creds.json')
DEFAULT_ENDPOINT = 'https://{}'.format(creds['host'])
# DEFAULT_ENDPOINT = 'https://gen3.compbio.ohsu.... | 42.068966 | 118 | 0.787705 |
74c1716e4a921f04bb72320ee4a0bbb35ae9e4da | 2,457 | py | Python | tests/test_recurrence.py | dmcgee/exchangelib | b2f7006835393132bdf2cfb416ba44f847c8bbf2 | [
"BSD-2-Clause"
] | null | null | null | tests/test_recurrence.py | dmcgee/exchangelib | b2f7006835393132bdf2cfb416ba44f847c8bbf2 | [
"BSD-2-Clause"
] | null | null | null | tests/test_recurrence.py | dmcgee/exchangelib | b2f7006835393132bdf2cfb416ba44f847c8bbf2 | [
"BSD-2-Clause"
] | null | null | null | # coding=utf-8
from exchangelib import EWSDate
from exchangelib.fields import MONDAY, WEDNESDAY, FEBRUARY, AUGUST, SECOND, LAST, WEEKEND_DAY
from exchangelib.recurrence import Recurrence, AbsoluteYearlyPattern, RelativeYearlyPattern, AbsoluteMonthlyPattern, \
RelativeMonthlyPattern, WeeklyPattern, DailyPattern, NoE... | 58.5 | 118 | 0.706553 |
74c223bd79b82d2f51cb4b42147b9e6bd2b296ee | 3,692 | py | Python | bp_acceptance_tests/level_1/acceptance_test_copy.py | nicholas-moreles/blaspy | c4af6258e17dd996c4b6d90bbaae15b31b8702b4 | [
"BSD-3-Clause"
] | 4 | 2015-01-25T12:44:44.000Z | 2022-03-19T08:36:19.000Z | bp_acceptance_tests/level_1/acceptance_test_copy.py | nicholas-moreles/blaspy | c4af6258e17dd996c4b6d90bbaae15b31b8702b4 | [
"BSD-3-Clause"
] | 7 | 2015-01-20T13:35:39.000Z | 2015-05-31T17:11:50.000Z | bp_acceptance_tests/level_1/acceptance_test_copy.py | nicholas-moreles/blaspy | c4af6258e17dd996c4b6d90bbaae15b31b8702b4 | [
"BSD-3-Clause"
] | null | null | null | """
Copyright (c) 2014-2015-2015, The University of Texas at Austin.
All rights reserved.
This file is part of BLASpy and is available under the 3-Clause
BSD License, which can be found in the LICENSE file at the top-level
directory or at http://opensource.org/licenses/BSD-3-Clause
"""
from ..he... | 35.5 | 100 | 0.622156 |
74c22b8287a6bd1155dd8016b417ac9497d8b968 | 3,492 | py | Python | src/server/http/server_cfg.py | shield-h2020/nfvo | 1226f3d4824d1e39dd1e986ae541820e0ac9c422 | [
"Apache-2.0"
] | null | null | null | src/server/http/server_cfg.py | shield-h2020/nfvo | 1226f3d4824d1e39dd1e986ae541820e0ac9c422 | [
"Apache-2.0"
] | null | null | null | src/server/http/server_cfg.py | shield-h2020/nfvo | 1226f3d4824d1e39dd1e986ae541820e0ac9c422 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2017-present i2CAT
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | 33.902913 | 74 | 0.644616 |
74c23ef413d6b7fe16569d963e260c9026c719f3 | 2,168 | py | Python | oscar/lib/python2.7/site-packages/IPython/core/display_trap.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/IPython/core/display_trap.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/IPython/core/display_trap.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | # encoding: utf-8
"""
A context manager for handling sys.displayhook.
Authors:
* Robert Kern
* Brian Granger
"""
#-----------------------------------------------------------------------------
# Copyright (C) 2008-2011 The IPython Development Team
#
# Distributed under the terms of the BSD License. T... | 30.535211 | 79 | 0.489391 |
74c2af0b7ae57c8a73dcf5e8ab001ec338d324db | 347 | py | Python | examples/web/socket/test_IP_adress.py | robotafm/Capsule | bf1ceef28f3ef2c0e97ee78203815f51783270e3 | [
"MIT"
] | null | null | null | examples/web/socket/test_IP_adress.py | robotafm/Capsule | bf1ceef28f3ef2c0e97ee78203815f51783270e3 | [
"MIT"
] | null | null | null | examples/web/socket/test_IP_adress.py | robotafm/Capsule | bf1ceef28f3ef2c0e97ee78203815f51783270e3 | [
"MIT"
] | null | null | null | ## importing socket module
import socket
## getting the hostname by socket.gethostname() method
hostname = socket.gethostname()
## getting the IP address using socket.gethostbyname() method
ip_address = socket.gethostbyname(hostname)
## printing the hostname and ip_address
print(f"Hostname: {hostname}")
print(f... | 38.555556 | 62 | 0.766571 |
74c2b35d82ee85c14bfb7f4d3bb0e2199527ca9e | 5,150 | py | Python | xenserver/tests/helpers.py | praekeltfoundation/xenzen | 5dc670302052bb4cd9a89351bda613cc436573a0 | [
"MIT"
] | 3 | 2016-09-25T01:17:19.000Z | 2017-07-12T13:38:49.000Z | xenserver/tests/helpers.py | praekeltfoundation/xenzen | 5dc670302052bb4cd9a89351bda613cc436573a0 | [
"MIT"
] | 15 | 2016-08-26T10:42:52.000Z | 2017-05-12T09:10:46.000Z | xenserver/tests/helpers.py | praekeltfoundation/xenzen | 5dc670302052bb4cd9a89351bda613cc436573a0 | [
"MIT"
] | 5 | 2017-05-18T07:58:37.000Z | 2021-11-14T03:51:05.000Z | """
Test helpers.
"""
from xenserver.models import (
AddressPool, Project, Template, XenServer, XenVM, Zone)
from xenserver.tests.fake_xen_server import FakeXenServer
HOST_MEM = 64*1024
HOST_CPUS = 16
VM_MEM = 2048
VM_CPUS = 1
VM_DISK = 10240
DEFAULT_SUBNET = "192.168.199.0/24"
DEFAULT_GATEWAY = "192.168.199.1"
... | 32.802548 | 78 | 0.626408 |
74c2c18127dcc64e1022ec49817626d48eecbd6b | 14,764 | py | Python | tensorflow/contrib/learn/python/learn/estimators/composable_model.py | smarthi/tensorflow | 55b01593515817992821423fec19733bca91c918 | [
"Apache-2.0"
] | 2 | 2019-10-09T08:06:48.000Z | 2021-01-07T03:16:09.000Z | tensorflow/contrib/learn/python/learn/estimators/composable_model.py | gjmulder/tensorflow | 55b01593515817992821423fec19733bca91c918 | [
"Apache-2.0"
] | 1 | 2017-02-06T08:12:22.000Z | 2017-02-06T08:12:22.000Z | tensorflow/contrib/learn/python/learn/estimators/composable_model.py | gjmulder/tensorflow | 55b01593515817992821423fec19733bca91c918 | [
"Apache-2.0"
] | null | null | null | # 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 applica... | 37.377215 | 80 | 0.687348 |
74c2d153d513b5b60153f4c15dc4226c53773b73 | 13,597 | py | Python | src/ConfigManager/scripts/rebuild_ConfigManager.py | xylsxyls/xueyelingshuan | 61eb1c7c4f76c3eaf4cf26e4b2b37b6ed2abc5b9 | [
"MIT"
] | 3 | 2019-11-26T05:33:47.000Z | 2020-05-18T06:49:41.000Z | src/ConfigManager/scripts/rebuild_ConfigManager.py | xylsxyls/xueyelingshuan | 61eb1c7c4f76c3eaf4cf26e4b2b37b6ed2abc5b9 | [
"MIT"
] | null | null | null | src/ConfigManager/scripts/rebuild_ConfigManager.py | xylsxyls/xueyelingshuan | 61eb1c7c4f76c3eaf4cf26e4b2b37b6ed2abc5b9 | [
"MIT"
] | null | null | null | #!python3
# -*- coding:utf-8 -*-
import os
import sys
import time
import ctypes
import shutil
import subprocess
IsPy3 = sys.version_info[0] >= 3
if IsPy3:
import winreg
else:
import codecs
import _winreg as winreg
BuildType = 'Release'
IsRebuild = True
Build = 'Rebuild'
Update = False
Copy = False
CleanAl... | 38.19382 | 195 | 0.596161 |
74c2d61a313ad9428623cb95f0b38367a4c7b8c4 | 12,384 | py | Python | oscar/lib/python2.7/site-packages/dateutil/tz/_common.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/dateutil/tz/_common.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/dateutil/tz/_common.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | from six import PY3
from functools import wraps
from datetime import datetime, timedelta, tzinfo
ZERO = timedelta(0)
__all__ = ['tzname_in_python2', 'enfold']
def tzname_in_python2(namefunc):
"""Change unicode output into bytestrings in Python 2
tzname() API changed in Python 3. It used t... | 31.351899 | 81 | 0.578811 |
74c303978022b4030c006df71b2e39f791fbb053 | 1,183 | py | Python | example.py | lyf44/CS4278-5478-Project-Materials | 685419c65847e72450e99586e9e0f3794369b4a3 | [
"MIT"
] | null | null | null | example.py | lyf44/CS4278-5478-Project-Materials | 685419c65847e72450e99586e9e0f3794369b4a3 | [
"MIT"
] | null | null | null | example.py | lyf44/CS4278-5478-Project-Materials | 685419c65847e72450e99586e9e0f3794369b4a3 | [
"MIT"
] | null | null | null | import argparse
import numpy as np
from gym_duckietown.envs import DuckietownEnv
# declare the arguments
parser = argparse.ArgumentParser()
# Do not change this
parser.add_argument('--max_steps', type=int, default=1500, help='max_steps')
# You should set them to different map name and seed accordingly
parser.add_arg... | 26.288889 | 105 | 0.712595 |
74c305dcec59d228cd01e76638d8c6eaf40cb536 | 71 | py | Python | ghibli/api/routes/films/__init__.py | chris-verclytte/ghibli-back | 149314ab31705590051516940d38d0c84a10c8ed | [
"Apache-2.0"
] | null | null | null | ghibli/api/routes/films/__init__.py | chris-verclytte/ghibli-back | 149314ab31705590051516940d38d0c84a10c8ed | [
"Apache-2.0"
] | 2 | 2020-08-13T12:16:27.000Z | 2020-08-13T13:21:21.000Z | ghibli/api/routes/films/__init__.py | chris-verclytte/ghibli-back | 149314ab31705590051516940d38d0c84a10c8ed | [
"Apache-2.0"
] | null | null | null | """Ghibli films module"""
from .register_routes import register_routes
| 23.666667 | 44 | 0.802817 |
74c30ff8bb18d23072bfa762fb88ab64552b2a39 | 1,032 | py | Python | sequencesEnea.py | chapman-phys220-2018f/cw03-thepenguins | fcbc40b5e54a923d235932ffb1bae3878bf79cb4 | [
"MIT"
] | null | null | null | sequencesEnea.py | chapman-phys220-2018f/cw03-thepenguins | fcbc40b5e54a923d235932ffb1bae3878bf79cb4 | [
"MIT"
] | null | null | null | sequencesEnea.py | chapman-phys220-2018f/cw03-thepenguins | fcbc40b5e54a923d235932ffb1bae3878bf79cb4 | [
"MIT"
] | null | null | null | #1/usr/bin/env python3
# -*- coding: utf-8 -*-
###
# Name: Enea Dodi
# Student ID: 2296306
# Email: dodi@chapman.edu
# Course: PHYS220/MATH220/CPSC220 Fall 2018
# Assignment: CW03
###
"""This module simple returns a fibonacci sequence
all the way to the "n"th term. N is defined by the user
"""
def fibonacci(n):
... | 24.571429 | 91 | 0.606589 |
74c3190eab22aea5257c6615fe4a2243e7cf87d6 | 1,994 | py | Python | monitoring/tracer/resources.py | rpai1/dss | 79d8110c336851b155a6e5417692ec68b70c0c07 | [
"Apache-2.0"
] | null | null | null | monitoring/tracer/resources.py | rpai1/dss | 79d8110c336851b155a6e5417692ec68b70c0c07 | [
"Apache-2.0"
] | null | null | null | monitoring/tracer/resources.py | rpai1/dss | 79d8110c336851b155a6e5417692ec68b70c0c07 | [
"Apache-2.0"
] | null | null | null | import argparse
import datetime
import s2sphere
from monitoring.monitorlib import auth, infrastructure
from monitoring.tracer import geo, tracerlog
class ResourceSet(object):
"""Set of resources necessary to obtain information from the UTM system."""
def __init__(self,
dss_client: infrastructure... | 44.311111 | 142 | 0.729689 |
74c31d10768b1230385958ee9f31c87e56225d42 | 1,394 | py | Python | challenges/ciphers/challenges/morse-code/code/Morse_code.py | acasi-ctf/ctf | 1136185c359252d80f5dd4ebd4ce4cc404cd4ea3 | [
"Apache-2.0"
] | 4 | 2021-03-13T04:45:23.000Z | 2022-03-22T06:45:04.000Z | challenges/ciphers/challenges/morse-code/code/Morse_code.py | acasi-ctf/ctf | 1136185c359252d80f5dd4ebd4ce4cc404cd4ea3 | [
"Apache-2.0"
] | 207 | 2021-03-09T22:36:46.000Z | 2022-03-28T13:49:50.000Z | challenges/ciphers/challenges/morse-code/code/Morse_code.py | acasi-ctf/ctf | 1136185c359252d80f5dd4ebd4ce4cc404cd4ea3 | [
"Apache-2.0"
] | 2 | 2021-03-13T01:07:37.000Z | 2021-12-23T00:01:40.000Z | import random
import base64
#dictionary for encode
code = {'A':'.-' ,'B':'-...','C':'-.-.','D':'-..','E':'.',
'F':'..-.','G':'--.' ,'H':'....','I':'..' ,'J':'.---',
'K':'-.-' ,'L':'.-..','M':'--' ,'N':'-.' ,'O':'---',
'P':'.--.','Q':'--.-','R':'.-.' ,'S':'...' ,'T':'-',
'U':'..-' ,'... | 23.233333 | 69 | 0.473458 |
74c31eb397e75e644c055cafa53b866ed6ca470d | 628 | py | Python | manage.py | IS-AgroSmart/MVP | b347e7c846a9a29584a6baee0b825381d5bc62a3 | [
"CNRI-Python"
] | null | null | null | manage.py | IS-AgroSmart/MVP | b347e7c846a9a29584a6baee0b825381d5bc62a3 | [
"CNRI-Python"
] | 140 | 2020-01-21T15:42:29.000Z | 2021-08-21T18:04:19.000Z | manage.py | IS-AgroSmart/AgroSmart-Web | b347e7c846a9a29584a6baee0b825381d5bc62a3 | [
"CNRI-Python"
] | 1 | 2021-05-03T06:12:35.000Z | 2021-05-03T06:12:35.000Z | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'IngSoft1.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise Impor... | 28.545455 | 73 | 0.683121 |
74c36fe936a794b246b7563cbde651f00ba3bb5e | 400 | py | Python | setup.py | littlezz/fix-headers-parse | 527f6b792a905dfee4347e0d1af97546f9021499 | [
"MIT"
] | null | null | null | setup.py | littlezz/fix-headers-parse | 527f6b792a905dfee4347e0d1af97546f9021499 | [
"MIT"
] | null | null | null | setup.py | littlezz/fix-headers-parse | 527f6b792a905dfee4347e0d1af97546f9021499 | [
"MIT"
] | null | null | null | __author__ = 'zz'
from setuptools import setup
setup(
name='fix_headers_parse',
version=0.1,
author='zz',
author_email='zz.at.field@gmail.com',
url='https://github.com/littlezz/fix-headers-parse',
description='monkey patch to fix python3 headers parse when headers contain some special characte... | 25 | 122 | 0.7025 |
74c37f370ab95920e2594aa5f16b6c8d3831830c | 56 | py | Python | pandaharvester/commit_timestamp.py | tsulaiav/harvester | ca3f78348019dd616738f2da7d50e81700a8e6b9 | [
"Apache-2.0"
] | null | null | null | pandaharvester/commit_timestamp.py | tsulaiav/harvester | ca3f78348019dd616738f2da7d50e81700a8e6b9 | [
"Apache-2.0"
] | null | null | null | pandaharvester/commit_timestamp.py | tsulaiav/harvester | ca3f78348019dd616738f2da7d50e81700a8e6b9 | [
"Apache-2.0"
] | null | null | null | timestamp = "22-04-2021 08:32:17 on master (by tmaeno)"
| 28 | 55 | 0.696429 |
74c39903f07e0a4b75e4739712928cc9d14d9f1e | 655 | py | Python | data/transcoder_evaluation_gfg/python/C_PROGRAM_FACTORIAL_NUMBER_2.py | mxl1n/CodeGen | e5101dd5c5e9c3720c70c80f78b18f13e118335a | [
"MIT"
] | 241 | 2021-07-20T08:35:20.000Z | 2022-03-31T02:39:08.000Z | data/transcoder_evaluation_gfg/python/C_PROGRAM_FACTORIAL_NUMBER_2.py | mxl1n/CodeGen | e5101dd5c5e9c3720c70c80f78b18f13e118335a | [
"MIT"
] | 49 | 2021-07-22T23:18:42.000Z | 2022-03-24T09:15:26.000Z | data/transcoder_evaluation_gfg/python/C_PROGRAM_FACTORIAL_NUMBER_2.py | mxl1n/CodeGen | e5101dd5c5e9c3720c70c80f78b18f13e118335a | [
"MIT"
] | 71 | 2021-07-21T05:17:52.000Z | 2022-03-29T23:49:28.000Z | # Copyright (c) 2019-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.
#
def f_gold ( n ) :
return 1 if ( n == 1 or n == 0 ) else n * f_gold ( n - 1 )
#TOFILL
if __name__ == '__main__':
para... | 21.833333 | 64 | 0.548092 |
74c39ab7e00b8d669180838b727f44b07b34182a | 9,421 | py | Python | tests/regressiontests/templates/custom.py | hafeez3000/django | 08e1175ac8d683b692ec3c67dc31df149f07dc8f | [
"BSD-3-Clause"
] | 4 | 2015-08-27T22:03:47.000Z | 2017-09-04T08:13:44.000Z | tests/regressiontests/templates/custom.py | hafeez3000/django | 08e1175ac8d683b692ec3c67dc31df149f07dc8f | [
"BSD-3-Clause"
] | null | null | null | tests/regressiontests/templates/custom.py | hafeez3000/django | 08e1175ac8d683b692ec3c67dc31df149f07dc8f | [
"BSD-3-Clause"
] | 1 | 2020-01-04T14:51:18.000Z | 2020-01-04T14:51:18.000Z | from __future__ import with_statement
from django import template
from django.utils.unittest import TestCase
from templatetags import custom
class CustomFilterTests(TestCase):
def test_filter(self):
t = template.Template("{% load custom %}{{ string|trim:5 }}")
self.assertEqual(
t.rende... | 53.528409 | 128 | 0.69292 |
74c3a0cd1a1c9a88ecf1f94d3838ef8099046c3b | 10,783 | py | Python | app_data/forms.py | ella/django-appdata | 2a1bbc2c4b4569ebcd1bee98b29431df206912c9 | [
"BSD-3-Clause"
] | 13 | 2015-03-13T11:40:43.000Z | 2020-07-19T04:33:59.000Z | app_data/forms.py | ella/django-appdata | 2a1bbc2c4b4569ebcd1bee98b29431df206912c9 | [
"BSD-3-Clause"
] | 20 | 2015-01-03T07:26:56.000Z | 2020-10-29T09:44:29.000Z | app_data/forms.py | ella/django-appdata | 2a1bbc2c4b4569ebcd1bee98b29431df206912c9 | [
"BSD-3-Clause"
] | 15 | 2015-01-03T07:27:09.000Z | 2020-05-14T07:15:27.000Z | from operator import methodcaller
from copy import deepcopy
import six
from django.forms.forms import NON_FIELD_ERRORS, Form
from django.forms.formsets import formset_factory
from django.forms.models import modelform_factory, _get_foreign_key, BaseInlineFormSet, BaseModelFormSet
from django.forms.utils import pretty_... | 35.354098 | 131 | 0.624687 |
74c3c16803a30694dded2bd42bef91625c5290cd | 367 | py | Python | thread2vec/preprocessing/targets.py | georgiosrizos/thread2vec | 9f7e281eed487e1a50266c09ab6e848c87f61117 | [
"Apache-2.0"
] | null | null | null | thread2vec/preprocessing/targets.py | georgiosrizos/thread2vec | 9f7e281eed487e1a50266c09ab6e848c87f61117 | [
"Apache-2.0"
] | null | null | null | thread2vec/preprocessing/targets.py | georgiosrizos/thread2vec | 9f7e281eed487e1a50266c09ab6e848c87f61117 | [
"Apache-2.0"
] | null | null | null | __author__ = 'Georgios Rizos (georgerizos@iti.gr)'
import numpy as np
def ci_lower_bound(pos, n, confidence):
if n == 0:
return 0.0
# z = pnormaldist(1 - (1 - confidence)/2)
z = 1.96
phat = 1.0*pos/n
lower_bound = (phat + (z*z)/(2*n) - z * np.sqrt((phat * (1 - phat) + (z*z)/(4*... | 26.214286 | 104 | 0.536785 |
74c3cfa2112ace000a93276d669ad3e1a2724aa0 | 10,796 | py | Python | app/api/restx.py | DaSKITA/tilter | 4de2550b962ca04285ccfbe7e924bb0c5f7a74a6 | [
"MIT"
] | 3 | 2021-07-09T05:53:00.000Z | 2021-11-19T09:19:18.000Z | app/api/restx.py | DaSKITA/tilter | 4de2550b962ca04285ccfbe7e924bb0c5f7a74a6 | [
"MIT"
] | 13 | 2021-07-14T12:31:28.000Z | 2022-01-21T16:45:25.000Z | app/api/restx.py | DaSKITA/tilter | 4de2550b962ca04285ccfbe7e924bb0c5f7a74a6 | [
"MIT"
] | 1 | 2021-07-08T18:31:56.000Z | 2021-07-08T18:31:56.000Z | from utils.document_annotation_collector import DocumentAnnotationCollector
from database.models import Annotation, Task
from flask import request
from flask_jwt_extended import jwt_required
from flask_restx import fields, Namespace, Resource
from utils.create_tilt import create_tilt
from utils.label import Annotatio... | 33.949686 | 131 | 0.618748 |
74c3d3f4e00b04b54750f52a569229d2ddf34d54 | 968 | py | Python | py_src/Renderer.py | raphaelreyna/Subseries | 3ecd6b33b8edd6495d5202f04824c7347b506f34 | [
"MIT"
] | null | null | null | py_src/Renderer.py | raphaelreyna/Subseries | 3ecd6b33b8edd6495d5202f04824c7347b506f34 | [
"MIT"
] | null | null | null | py_src/Renderer.py | raphaelreyna/Subseries | 3ecd6b33b8edd6495d5202f04824c7347b506f34 | [
"MIT"
] | null | null | null | """
This class handles displaying the generated data.
"""
from PIL import Image, ImageDraw
from itertools import starmap
from functools import reduce
import json
class Renderer:
def __init__(self, points = None, size = (500,500), bg = (255,255,255,255)):
self.points = points
self.image = Image.new(... | 33.37931 | 80 | 0.636364 |
74c3f5539777e7c29cdf52e637f8b1c299697986 | 3,608 | py | Python | test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v1/models/_models_py3.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 35 | 2018-04-03T12:15:53.000Z | 2022-03-11T14:03:34.000Z | test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v1/models/_models_py3.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 652 | 2017-08-28T22:44:41.000Z | 2022-03-31T21:20:31.000Z | test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v1/models/_models_py3.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 29 | 2017-08-28T20:57:01.000Z | 2022-03-11T14:03:38.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 26.529412 | 100 | 0.561807 |
74c40fc455c4573c1e1db185b42d778220f18ebf | 22,270 | py | Python | microbenthos/model/model.py | achennu/microbenthos | c83fb60d05b5614546466601e973721640e685d4 | [
"MIT"
] | 3 | 2018-04-23T13:51:36.000Z | 2021-08-05T01:53:51.000Z | microbenthos/model/model.py | achennu/microbenthos | c83fb60d05b5614546466601e973721640e685d4 | [
"MIT"
] | 5 | 2018-04-09T20:08:40.000Z | 2018-05-04T23:08:50.000Z | microbenthos/model/model.py | achennu/microbenthos | c83fb60d05b5614546466601e973721640e685d4 | [
"MIT"
] | 2 | 2018-04-09T20:11:50.000Z | 2021-08-06T03:34:06.000Z | import itertools
import logging
import operator
from collections.abc import Mapping
from functools import reduce
import fipy.tools.numerix as np
import h5py as hdf
import sympy as sp
from fipy import PhysicalField, Variable
from sympy import Lambda, symbols
sp.init_printing()
from ..core import Entity, Expression, S... | 33.691377 | 99 | 0.556084 |
74c41a135bb3326272f433e3c20b9fab98b1db92 | 3,560 | py | Python | config_cub_1.py | YLFF/2004P_Pytorch-Networks | 2d84fe1d904b17d0c55aa2a7a7dba82dea3dae05 | [
"MIT"
] | 454 | 2019-12-26T15:04:02.000Z | 2020-10-24T13:57:35.000Z | config_cub_1.py | YLFF/2004P_Pytorch-Networks | 2d84fe1d904b17d0c55aa2a7a7dba82dea3dae05 | [
"MIT"
] | 1 | 2020-05-14T06:01:18.000Z | 2020-05-14T06:01:18.000Z | config_cub_1.py | YLFF/2004P_Pytorch-Networks | 2d84fe1d904b17d0c55aa2a7a7dba82dea3dae05 | [
"MIT"
] | 17 | 2019-12-27T12:19:47.000Z | 2020-02-03T07:42:05.000Z | import os
from easydict import EasyDict as edict
cfg1 = edict()
cfg1.PATH = edict()
cfg1.PATH.DATA = ['/home/liuhaiyang/dataset/CUB_200_2011/images.txt',
'/home/liuhaiyang/dataset/CUB_200_2011/train_test_split.txt',
'/home/liuhaiyang/dataset/CUB_200_2011/images/']
cfg1.PATH.LABEL = '/home/liuhaiyang/da... | 28.709677 | 93 | 0.711517 |
74c429b684a4625a223c42e4433f8a400ed5f26b | 1,624 | py | Python | examples/alignment_example.py | the-maverick-lab/pysle | 35ffa2dbeb2a62a0649a0fc72ee229e4a437657e | [
"MIT"
] | null | null | null | examples/alignment_example.py | the-maverick-lab/pysle | 35ffa2dbeb2a62a0649a0fc72ee229e4a437657e | [
"MIT"
] | null | null | null | examples/alignment_example.py | the-maverick-lab/pysle | 35ffa2dbeb2a62a0649a0fc72ee229e4a437657e | [
"MIT"
] | null | null | null | #encoding: utf-8
'''
An example of using the naive alignment code. There are two functions
for naive alignment. naiveWordAlignment and naivePhoneAlignment. They
operate at the word and phone levels respectively.
Naive alignment is naive because it gives all phones the same length.
Word duration is then driven by th... | 32.48 | 73 | 0.75431 |
74c43941e603ab06373efde20d2d5f1613e9f022 | 1,581 | py | Python | pyfacebook/utils/param_validation.py | Socian-Ltd/python-facebook-1 | e9a4f626b37541103c9534a29342ef6033c09c06 | [
"Apache-2.0"
] | null | null | null | pyfacebook/utils/param_validation.py | Socian-Ltd/python-facebook-1 | e9a4f626b37541103c9534a29342ef6033c09c06 | [
"Apache-2.0"
] | null | null | null | pyfacebook/utils/param_validation.py | Socian-Ltd/python-facebook-1 | e9a4f626b37541103c9534a29342ef6033c09c06 | [
"Apache-2.0"
] | 1 | 2021-08-25T05:34:14.000Z | 2021-08-25T05:34:14.000Z | """
function's to validate parameters.
"""
import logging
from typing import Optional, Union
import pyfacebook
logger = logging.getLogger(__name__)
def enf_comma_separated(
field, # type: str
value, # type: Optional[Union[str, list, tuple, set]]
):
# type: (...) -> str
"""
Check to... | 26.79661 | 116 | 0.5642 |
74c4c32c9620876576ba059871d854f67eb4aedc | 158 | py | Python | ersteops/emergency/apps.py | Prescrypto/ErsteOps | 0b744173fb4f500003c96c4dcb26fb67d6eaa5ec | [
"MIT"
] | null | null | null | ersteops/emergency/apps.py | Prescrypto/ErsteOps | 0b744173fb4f500003c96c4dcb26fb67d6eaa5ec | [
"MIT"
] | 33 | 2017-11-24T19:44:57.000Z | 2022-02-12T07:02:53.000Z | ersteops/emergency/apps.py | Prescrypto/ErsteOps | 0b744173fb4f500003c96c4dcb26fb67d6eaa5ec | [
"MIT"
] | 1 | 2017-12-11T09:15:04.000Z | 2017-12-11T09:15:04.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.apps import AppConfig
class EmergencyConfig(AppConfig):
name = 'emergency'
| 17.555556 | 39 | 0.740506 |
74c4cb4de2b8b00608c7ad6175bb8913a02f0bb0 | 4,621 | py | Python | Lib/site-packages/py2exe/samples/advanced/setup.py | Aakash10399/simple-health-glucheck | 1f7c4ff7778a44f09b1c8cb0089fef51dc26cea2 | [
"bzip2-1.0.6"
] | 35 | 2015-08-15T14:32:38.000Z | 2021-12-09T16:21:26.000Z | Lib/site-packages/py2exe/samples/advanced/setup.py | Aakash10399/simple-health-glucheck | 1f7c4ff7778a44f09b1c8cb0089fef51dc26cea2 | [
"bzip2-1.0.6"
] | 4 | 2015-09-12T10:42:57.000Z | 2017-02-27T04:05:51.000Z | Lib/site-packages/py2exe/samples/advanced/setup.py | Aakash10399/simple-health-glucheck | 1f7c4ff7778a44f09b1c8cb0089fef51dc26cea2 | [
"bzip2-1.0.6"
] | 15 | 2015-07-10T23:58:07.000Z | 2022-01-23T22:16:33.000Z | # A setup script showing advanced features.
#
# Note that for the NT service to build correctly, you need at least
# win32all build 161, for the COM samples, you need build 163.
# Requires wxPython, and Tim Golden's WMI module.
# Note: WMI is probably NOT a good example for demonstrating how to
# include a pywin32 typ... | 32.542254 | 86 | 0.604198 |
74c4dba9eb0e69fc77837cafb669887de1e9bc2f | 2,159 | py | Python | sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_03_01_preview/models/__init__.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-02-01T18:50:12.000Z | 2022-02-01T18:50:12.000Z | sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_03_01_preview/models/__init__.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_03_01_preview/models/__init__.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 33.734375 | 94 | 0.74201 |
74c4dfdea1ea9b42cdefb76bfa5c511b30d76968 | 2,931 | py | Python | retrobiocat_web/app/retrobiocat/routes/network_explorer/change_network_options.py | ihayhurst/RetroBioCat | d674897459c0ab65faad5ed3017c55cf51bcc020 | [
"MIT"
] | 9 | 2020-12-01T16:33:02.000Z | 2022-01-19T20:02:42.000Z | retrobiocat_web/app/retrobiocat/routes/network_explorer/change_network_options.py | ihayhurst/RetroBioCat | d674897459c0ab65faad5ed3017c55cf51bcc020 | [
"MIT"
] | 4 | 2020-10-02T14:38:32.000Z | 2021-08-02T09:23:58.000Z | retrobiocat_web/app/retrobiocat/routes/network_explorer/change_network_options.py | ihayhurst/RetroBioCat | d674897459c0ab65faad5ed3017c55cf51bcc020 | [
"MIT"
] | 6 | 2021-01-14T07:48:36.000Z | 2022-03-20T17:34:27.000Z | from retrobiocat_web.app.retrobiocat import bp
from flask import jsonify, request
import networkx as nx
import json
from flask import current_app
from retrobiocat_web.app.retrobiocat.routes.network_explorer.functions import add_new
from retrobiocat_web.retro.generation.network_generation.network import Network
@bp.rou... | 39.08 | 85 | 0.729785 |
74c50028553b2461d622184501d3ecf5bf789410 | 7,134 | py | Python | seven23/settings.py | sebastienbarbier/seven23_server | a085f7aa84cf9d282e6d873ba6c1c1deed74db90 | [
"MIT"
] | 27 | 2019-03-07T17:23:59.000Z | 2022-01-29T16:08:09.000Z | seven23/settings.py | sebastienbarbier/seven23_server | a085f7aa84cf9d282e6d873ba6c1c1deed74db90 | [
"MIT"
] | 31 | 2017-06-14T08:19:48.000Z | 2022-01-26T14:55:39.000Z | seven23/settings.py | sebastienbarbier/seven23_server | a085f7aa84cf9d282e6d873ba6c1c1deed74db90 | [
"MIT"
] | 14 | 2019-07-22T09:49:13.000Z | 2021-12-21T08:52:02.000Z | """
Django settings for seven23 project.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.6/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
im... | 30.618026 | 105 | 0.721475 |
74c509759d65efd846dcf7b3737baa26eb642c24 | 10,342 | py | Python | onadata/apps/logger/south_migrations/0031_auto__add_field_ziggyinstance_form_version.py | ubpd/kobocat | 45906e07e8f05c30e3e26bab5570a8ab1ee264db | [
"BSD-2-Clause"
] | null | null | null | onadata/apps/logger/south_migrations/0031_auto__add_field_ziggyinstance_form_version.py | ubpd/kobocat | 45906e07e8f05c30e3e26bab5570a8ab1ee264db | [
"BSD-2-Clause"
] | null | null | null | onadata/apps/logger/south_migrations/0031_auto__add_field_ziggyinstance_form_version.py | ubpd/kobocat | 45906e07e8f05c30e3e26bab5570a8ab1ee264db | [
"BSD-2-Clause"
] | null | null | null | # coding: utf-8
from __future__ import unicode_literals, print_function, division, absolute_import
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'ZiggyInstance.form_versio... | 75.489051 | 182 | 0.566041 |
74c5159e0f8c0043298b3cb9615da55f565e9fa1 | 2,442 | py | Python | unittests/test_data_bus.py | threathunterX/nebula_query_web | 9c73d82f7e6bc322ea2edfd86ff62727c49d7abb | [
"Apache-2.0"
] | 1 | 2019-05-01T09:42:31.000Z | 2019-05-01T09:42:31.000Z | unittests/test_data_bus.py | threathunterX/nebula_query_web | 9c73d82f7e6bc322ea2edfd86ff62727c49d7abb | [
"Apache-2.0"
] | null | null | null | unittests/test_data_bus.py | threathunterX/nebula_query_web | 9c73d82f7e6bc322ea2edfd86ff62727c49d7abb | [
"Apache-2.0"
] | 5 | 2019-06-24T05:48:54.000Z | 2022-02-18T03:34:30.000Z | # -*- coding: utf-8 -*-
import json
import pytest
from query_web import app
app.config["TESTING"] = True
test_app = app.test_client()
def test_add_logquery_babel():
pass
def test_del_logquery_babel():
pass
def test_fetch_logquery_progress():
pass
def test_fetch_logquery_data():
pass
def test... | 34.885714 | 105 | 0.61507 |
74c54c59a57d809ef07ac3bfaa20312f53f1ece8 | 6,242 | py | Python | instana/collector/aws_fargate.py | rlopes-ki/python-sensor | 07e827f9982b2a0c482e8eab82d1a420923efd5e | [
"MIT"
] | 61 | 2017-09-27T02:50:17.000Z | 2022-03-22T12:13:37.000Z | instana/collector/aws_fargate.py | rlopes-ki/python-sensor | 07e827f9982b2a0c482e8eab82d1a420923efd5e | [
"MIT"
] | 82 | 2017-07-11T13:47:33.000Z | 2022-03-22T10:10:38.000Z | instana/collector/aws_fargate.py | rlopes-ki/python-sensor | 07e827f9982b2a0c482e8eab82d1a420923efd5e | [
"MIT"
] | 27 | 2017-09-11T16:22:32.000Z | 2022-03-11T17:21:49.000Z | # (c) Copyright IBM Corp. 2021
# (c) Copyright Instana Inc. 2020
"""
AWS Fargate Collector: Manages the periodic collection of metrics & snapshot data
"""
import os
import json
from time import time
import requests
from ..log import logger
from .base import BaseCollector
from ..util import DictionaryOfStan, validate_... | 35.465909 | 113 | 0.642102 |
74c555b59dfe1a1c2040f9a35f7386738fe14f6b | 466 | py | Python | functional/improper/functional_boom_tk.py | rik0/rk-exempla | 811f859a0980b0636bbafa2656893d988c4d0e32 | [
"MIT"
] | 1 | 2017-02-20T21:04:47.000Z | 2017-02-20T21:04:47.000Z | functional/improper/functional_boom_tk.py | rik0/rk-exempla | 811f859a0980b0636bbafa2656893d988c4d0e32 | [
"MIT"
] | null | null | null | functional/improper/functional_boom_tk.py | rik0/rk-exempla | 811f859a0980b0636bbafa2656893d988c4d0e32 | [
"MIT"
] | 2 | 2017-02-20T21:04:49.000Z | 2021-05-18T11:29:16.000Z | import tkinter as tk
class Window(tk.Frame):
def __init__(self, root):
tk.Frame.__init__(self, root)
value = 0
def inc():
nonlocal value
value += 1
self.label.config(text=str(value))
self.label = tk.Label(text=str(value))
self.label.pack()... | 24.526316 | 62 | 0.56867 |
74c566638a88f1d4c84e4589a9e6539fc0caa5db | 1,311 | py | Python | alipay/aop/api/domain/AlipayBossFncGfsettleprodNoinvoicePayModel.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/AlipayBossFncGfsettleprodNoinvoicePayModel.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/AlipayBossFncGfsettleprodNoinvoicePayModel.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.NoInvoicePayOrder import NoInvoicePayOrder
class AlipayBossFncGfsettleprodNoinvoicePayModel(object):
def __init__(self):
self._no_invoice_pay_order = None
@prope... | 29.133333 | 91 | 0.680397 |
74c58eab12bd0ce2c74808ffb5d52f1b14bfe35b | 1,432 | py | Python | urlservice/UrlShortService/routers/adduserrouter.py | dotan-dvir/url_short_service | a9f0da4ea0872116cade7900d735aeb406fbc773 | [
"Apache-2.0"
] | null | null | null | urlservice/UrlShortService/routers/adduserrouter.py | dotan-dvir/url_short_service | a9f0da4ea0872116cade7900d735aeb406fbc773 | [
"Apache-2.0"
] | null | null | null | urlservice/UrlShortService/routers/adduserrouter.py | dotan-dvir/url_short_service | a9f0da4ea0872116cade7900d735aeb406fbc773 | [
"Apache-2.0"
] | null | null | null | from models.userhandler import UserHandler
import json
import re
import falcon.request
import falcon.response
from util.stringutil import validateString
from util.httputil import sendErrorMessage,sendSuccessMessage,sendSuccessObject,sendRedirectResponse
from .baserouter import BaseRouter
class AddUserRouter(BaseRoute... | 31.130435 | 100 | 0.696927 |
74c58f29ce72079f4f52b00c9706ba9c3afe4006 | 17,206 | py | Python | synapse/push/httppusher.py | skytalk-io/synapse | db5e9e5fc8b0a61ee245c3e25d2072e951b087da | [
"Apache-2.0"
] | null | null | null | synapse/push/httppusher.py | skytalk-io/synapse | db5e9e5fc8b0a61ee245c3e25d2072e951b087da | [
"Apache-2.0"
] | 1 | 2022-01-09T15:16:27.000Z | 2022-01-09T15:16:27.000Z | synapse/push/httppusher.py | skytalk-io/synapse | db5e9e5fc8b0a61ee245c3e25d2072e951b087da | [
"Apache-2.0"
] | null | null | null | # Copyright 2015, 2016 OpenMarket Ltd
# Copyright 2017 New Vector 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... | 38.665169 | 89 | 0.563873 |
74c5b1cfd855a459c7934f8c1087be065fa2aab8 | 650 | py | Python | goods2/migrations/0017_auto_20180621_1143.py | huachao2017/goodsdl | 3616d53b90696a97a5d56a064e2a14d484b821d7 | [
"Apache-2.0"
] | 3 | 2018-10-16T09:36:12.000Z | 2019-04-15T03:12:49.000Z | goods2/migrations/0017_auto_20180621_1143.py | huachao2017/goodsdl | 3616d53b90696a97a5d56a064e2a14d484b821d7 | [
"Apache-2.0"
] | null | null | null | goods2/migrations/0017_auto_20180621_1143.py | huachao2017/goodsdl | 3616d53b90696a97a5d56a064e2a14d484b821d7 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2018-06-21 11:43
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('goods2', '0016_trainaction_complete_time'),
]
operations = [
migrations.Add... | 25 | 83 | 0.607692 |
74c5b38731bb66d45ffdf31eecd8668ab4c9bff9 | 13,157 | py | Python | open_worm_analysis_toolbox/statistics/histogram_manager.py | suzil/open-worm-analysis-toolbox | ea1d3cddcefb6724e3d531cbced32092ac431411 | [
"MIT"
] | 35 | 2016-03-02T06:32:16.000Z | 2021-12-17T22:57:22.000Z | open_worm_analysis_toolbox/statistics/histogram_manager.py | suzil/open-worm-analysis-toolbox | ea1d3cddcefb6724e3d531cbced32092ac431411 | [
"MIT"
] | 80 | 2015-12-30T21:55:57.000Z | 2021-03-13T10:38:47.000Z | open_worm_analysis_toolbox/statistics/histogram_manager.py | suzil/open-worm-analysis-toolbox | ea1d3cddcefb6724e3d531cbced32092ac431411 | [
"MIT"
] | 17 | 2016-02-19T09:25:39.000Z | 2021-12-17T22:57:33.000Z | # -*- coding: utf-8 -*-
"""
Entry Point
-----------
mv.HistogramManager(feature_path_or_object_list)
The current processing approach is to take a set of features from an
experiment and to summarize each of these features as a binned data set
(i.e. a histogram) where for each bin of a given width the # of values
occup... | 33.822622 | 99 | 0.591624 |
74c5d5d4cde9a556bc1c41b11740704e08f5d554 | 1,495 | py | Python | transfer_people.py | brotskydotcom/public-services.py | 5cb0b57cb8f1c9d5b3e907cf27a6a560cbfe0020 | [
"MIT"
] | null | null | null | transfer_people.py | brotskydotcom/public-services.py | 5cb0b57cb8f1c9d5b3e907cf27a6a560cbfe0020 | [
"MIT"
] | 46 | 2020-07-19T05:02:36.000Z | 2020-12-13T18:32:47.000Z | transfer_people.py | brotskydotcom/public-services.py | 5cb0b57cb8f1c9d5b3e907cf27a6a560cbfe0020 | [
"MIT"
] | null | null | null | # MIT License
#
# Copyright (c) 2020 Daniel C. Brotsky
#
# 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, mod... | 41.527778 | 81 | 0.745151 |
74c5e531adfb5b626c0d630b05237ea64e24b4b2 | 9,084 | py | Python | conans/client/generators/cmake_find_package_common.py | chhitz/conan | f361690beae3608d93a8d79dec7abb24f75ddd85 | [
"MIT"
] | null | null | null | conans/client/generators/cmake_find_package_common.py | chhitz/conan | f361690beae3608d93a8d79dec7abb24f75ddd85 | [
"MIT"
] | null | null | null | conans/client/generators/cmake_find_package_common.py | chhitz/conan | f361690beae3608d93a8d79dec7abb24f75ddd85 | [
"MIT"
] | null | null | null | import textwrap
from conans.client.generators.cmake_common import CMakeCommonMacros
target_template = """
set({name}_INCLUDE_DIRS{build_type_suffix} {deps.include_paths})
set({name}_INCLUDE_DIR{build_type_suffix} {deps.include_path})
set({name}_INCLUDES{build_type_suffix} {deps.include_paths})
set({name}_RES_DIRS{bui... | 52.813953 | 163 | 0.648613 |
74c6068db555443e17641f7c32deb1795e99af2b | 2,545 | py | Python | cogs/hyphen.py | etcadinfinitum/CSSBot_Py | 553d2110240e7d643fcaa9f202532ce2bfd77187 | [
"MIT"
] | 6 | 2018-01-31T01:26:55.000Z | 2021-07-05T06:38:38.000Z | cogs/hyphen.py | etcadinfinitum/CSSBot_Py | 553d2110240e7d643fcaa9f202532ce2bfd77187 | [
"MIT"
] | 18 | 2018-01-11T22:11:36.000Z | 2021-10-01T20:47:57.000Z | cogs/hyphen.py | etcadinfinitum/CSSBot_Py | 553d2110240e7d643fcaa9f202532ce2bfd77187 | [
"MIT"
] | 6 | 2018-01-11T21:31:59.000Z | 2021-03-16T17:15:49.000Z | """
Hyphen
Converts messages that are hyphenated
based on the "Hyphen" xkcd comic
https://xkcd.com/37/
"""
import discord
from discord.ext import commands
import re
import logging
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
# this is probably the best regex I've ever made
hyphen_regex = r"(\w... | 27.365591 | 92 | 0.608644 |
74c65be70252d419d8e66b19150831a9428d7fde | 481 | py | Python | src/spotipie/auth/_app/__init__.py | janLuke/spotipie | a902c6cda9a3e61bbcfd4915e5102479a68ef3cb | [
"MIT"
] | 1 | 2021-05-02T10:32:38.000Z | 2021-05-02T10:32:38.000Z | src/spotipie/auth/_app/__init__.py | janLuke/spotipie | a902c6cda9a3e61bbcfd4915e5102479a68ef3cb | [
"MIT"
] | null | null | null | src/spotipie/auth/_app/__init__.py | janLuke/spotipie | a902c6cda9a3e61bbcfd4915e5102479a68ef3cb | [
"MIT"
] | null | null | null | # flake8: noqa F401
try:
from .app import start_authorization_app
except ImportError as exc:
raise ImportError(f"""
An import error was raised while trying to import the authorization app.
This error is likely due to the fact you did not install the optional
dependencies required to run... | 32.066667 | 80 | 0.650728 |
74c66f5d851577725991910cebabf911f3e9720f | 105 | py | Python | setup.py | TYPO3-Documentation/sphinxcontrib-docstypo3 | 6797d1cd1e0e4202bcb99327c49281263f3819b9 | [
"BSD-2-Clause"
] | null | null | null | setup.py | TYPO3-Documentation/sphinxcontrib-docstypo3 | 6797d1cd1e0e4202bcb99327c49281263f3819b9 | [
"BSD-2-Clause"
] | null | null | null | setup.py | TYPO3-Documentation/sphinxcontrib-docstypo3 | 6797d1cd1e0e4202bcb99327c49281263f3819b9 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
import setuptools
setuptools.setup(
setup_requires=["pbr"],
pbr=True,
)
| 10.5 | 27 | 0.666667 |
74c6a263e005e3b4b955941ee7668f110770a31c | 6,528 | py | Python | experiments/qlearning/easy_v_ql_exp.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | 1 | 2020-10-23T14:40:09.000Z | 2020-10-23T14:40:09.000Z | experiments/qlearning/easy_v_ql_exp.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/qlearning/easy_v_ql_exp.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | 1 | 2021-05-27T20:38:45.000Z | 2021-05-27T20:38:45.000Z | """
Try out Easy V Q-Learning.
"""
import random
import numpy as np
from rlkit.envs.env_utils import gym_env
from rlkit.envs.time_limited_env import TimeLimitedEnv
from rlkit.exploration_strategies.ou_strategy import OUStrategy
from rlkit.launchers.launcher_util import run_experiment
import rlkit.misc.hyperparameter a... | 31.68932 | 78 | 0.564645 |
74c6b039a8a52e86aea1292bbab87b7953073fa4 | 64,387 | py | Python | KPConv-PyTorch/datasets/ScanNet_beta.py | dcy0577/Enhancing-3D-Point-Cloud-Segmentation-Using-Multi-Modal-Fusion-with-2D-Images | b0e9c0d26177f74b20cbf95f15cefba9af695c70 | [
"MIT"
] | 3 | 2021-12-20T02:41:28.000Z | 2022-02-18T15:47:48.000Z | KPConv-PyTorch/datasets/ScanNet_beta.py | dcy0577/Enhancing-3D-Point-Cloud-Segmentation-Using-Multi-Modal-Fusion-with-2D-Images | b0e9c0d26177f74b20cbf95f15cefba9af695c70 | [
"MIT"
] | null | null | null | KPConv-PyTorch/datasets/ScanNet_beta.py | dcy0577/Enhancing-3D-Point-Cloud-Segmentation-Using-Multi-Modal-Fusion-with-2D-Images | b0e9c0d26177f74b20cbf95f15cefba9af695c70 | [
"MIT"
] | null | null | null | #
#
# 0=================================0
# | Kernel Point Convolutions |
# 0=================================0
#
#
# ----------------------------------------------------------------------------------------------------------------------
#
# Class handling ScanNet dataset.
# Implements a D... | 38.053783 | 135 | 0.501095 |
74c6cbdd319a3a0476adbff08fc6e70fee65df5c | 3,478 | py | Python | tensorflow/python/eager/memory_test.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 71 | 2017-05-25T16:02:15.000Z | 2021-06-09T16:08:08.000Z | tensorflow/python/eager/memory_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/python/eager/memory_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 26 | 2017-04-12T16:25:44.000Z | 2018-10-30T10:10:15.000Z | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 31.908257 | 80 | 0.690339 |
74c6e525a888185d4a1a62e222734ee65e1aa77e | 3,899 | py | Python | scales/redis/sink.py | steveniemitz/scales | 153fff192a11fbda18afdea12652b090e33b3c59 | [
"MIT"
] | 48 | 2015-06-04T00:08:44.000Z | 2021-02-27T16:00:50.000Z | scales/redis/sink.py | steveniemitz/pynagle | 153fff192a11fbda18afdea12652b090e33b3c59 | [
"MIT"
] | 10 | 2015-07-30T20:54:02.000Z | 2020-02-24T15:39:49.000Z | scales/redis/sink.py | steveniemitz/pynagle | 153fff192a11fbda18afdea12652b090e33b3c59 | [
"MIT"
] | 11 | 2015-06-10T19:44:34.000Z | 2020-02-14T02:02:40.000Z | import time
import gevent
import redis
from ..asynchronous import (
AsyncResult,
NoopTimeout
)
from ..sink import (
ClientMessageSink,
SinkProvider
)
from ..constants import (
ChannelState,
SinkProperties,
)
from ..message import (
ChannelConcurrencyError,
Deadline,
MethodReturnMessage,
TimeoutErr... | 28.459854 | 93 | 0.689664 |
74c6e886d304af8d063a7157c903caa55a7bd2a2 | 6,099 | py | Python | redmine_book/packages/redmine/resultsets.py | qqbuby/redmine_book | 2b92ece9e6fd5f3003164151eebfd7143e47d776 | [
"MIT"
] | 5 | 2015-12-16T03:37:28.000Z | 2016-10-07T00:58:46.000Z | redmine_book/packages/redmine/resultsets.py | qqbuby/redmine_book | 2b92ece9e6fd5f3003164151eebfd7143e47d776 | [
"MIT"
] | 1 | 2016-01-30T14:51:37.000Z | 2016-02-01T10:45:16.000Z | redmine_book/packages/redmine/resultsets.py | qqbuby/redmine_book | 2b92ece9e6fd5f3003164151eebfd7143e47d776 | [
"MIT"
] | null | null | null | import itertools
from .exceptions import (
ResourceSetIndexError,
ResourceSetFilterParamError,
ResultSetTotalCountError
)
class ResourceSet(object):
"""Represents a set of Redmine resources as objects"""
limit = 0
offset = 0
_total_count = -1
def __init__(self, manager, resources=Non... | 33.146739 | 107 | 0.621577 |
74c6fd7bb7efed0629a80760ac5cc58d7960c805 | 8,241 | py | Python | CHIP-Network-Model/bhm_local_search.py | IdeasLabUT/WSDM-2022-Challenge | f4d0aa8dc3491c8ab77b86e376f37d04720389e3 | [
"BSD-3-Clause"
] | 2 | 2022-01-22T21:53:36.000Z | 2022-01-25T08:05:21.000Z | CHIP-Network-Model/bhm_local_search.py | IdeasLabUT/WSDM-2022-Challenge | f4d0aa8dc3491c8ab77b86e376f37d04720389e3 | [
"BSD-3-Clause"
] | null | null | null | CHIP-Network-Model/bhm_local_search.py | IdeasLabUT/WSDM-2022-Challenge | f4d0aa8dc3491c8ab77b86e376f37d04720389e3 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
@author: Makan Arastuie
"""
import time
import numpy as np
import multiprocessing
from joblib import Parallel, delayed
import generative_model_utils as utils
import bhm_generative_model as bhm
from sklearn.metrics import adjusted_rand_score
from spectral_clustering import regularized_spectr... | 45.032787 | 120 | 0.615095 |
74c70432c1138e7fdded1755bb026e7278d6bb12 | 2,956 | py | Python | unit_tests/payloads6.py | LandRegistry/validation-api | f24930236622de7b481bbd378138ab1d6b5345b4 | [
"MIT"
] | null | null | null | unit_tests/payloads6.py | LandRegistry/validation-api | f24930236622de7b481bbd378138ab1d6b5345b4 | [
"MIT"
] | null | null | null | unit_tests/payloads6.py | LandRegistry/validation-api | f24930236622de7b481bbd378138ab1d6b5345b4 | [
"MIT"
] | 1 | 2021-04-11T05:24:47.000Z | 2021-04-11T05:24:47.000Z | llc_v6_janky_ids = {
"schema-version": "6.0",
"author": {
"email": "llclradmin@nonexistanttest.com",
"full-name": "LR Admin",
"organisation": "HM Land Registry"
},
"geometry": {
"type": "FeatureCollection",
"features": [{
"type": "Feature",
... | 29.858586 | 91 | 0.433694 |
74c70a3c20c718330ed4f41e414d6e0fe511df98 | 16,819 | py | Python | classifiers/SVMs/svm_keeping_supportVectors.py | gionanide/Speech-Signal-Processing-and-Classification | eff023fd491697a89cdb0491393d2e9600b65895 | [
"MIT"
] | null | null | null | classifiers/SVMs/svm_keeping_supportVectors.py | gionanide/Speech-Signal-Processing-and-Classification | eff023fd491697a89cdb0491393d2e9600b65895 | [
"MIT"
] | null | null | null | classifiers/SVMs/svm_keeping_supportVectors.py | gionanide/Speech-Signal-Processing-and-Classification | eff023fd491697a89cdb0491393d2e9600b65895 | [
"MIT"
] | null | null | null | #!usr/bin/python
from __future__ import division
import pandas as pd
from sklearn import model_selection
from sklearn.svm import SVC # support vectors for classification
from sklearn.metrics import accuracy_score, confusion_matrix, classification_report
from sklearn.model_selection import cross_val_score, GridSearchCV
... | 47.377465 | 236 | 0.768595 |
74c72b5b5b1cfc2cc509c3ab0da391c3993eedf9 | 13,812 | py | Python | src/wdhetnetbuilder.py | andrawaag/WRP | df58b060b21df23c4fdc09ca7f2dc7ff63602049 | [
"CC0-1.0"
] | 2 | 2019-10-26T21:01:25.000Z | 2021-12-09T11:29:52.000Z | 1_code/wdhetnetbuilder.py | sabahzero/WD-rephetio-analysis | 4a884cf5ff181047e3a118c310d1ce942f61c28b | [
"Apache-2.0"
] | 2 | 2021-03-30T16:17:22.000Z | 2021-12-09T19:04:16.000Z | 1_code/wdhetnetbuilder.py | sabahzero/WD-rephetio-analysis | 4a884cf5ff181047e3a118c310d1ce942f61c28b | [
"Apache-2.0"
] | null | null | null | import os
import json
from collections import Counter
from wikidataintegrator.wdi_core import WDItemEngine
from hetnet_ml.src import graph_tools as gt
def parse_result_uris(result):
for c in result:
idx = result[c].str.startswith('http://www.wikidata.org/entity')
if sum(idx) > 0:
resul... | 37.945055 | 120 | 0.599986 |
74c72b9d093a6a308f066d5e15421fd4dc180d10 | 10,399 | py | Python | py_trees/console.py | fjulian/py_trees | 63fffdfb581f390546c375f13d064b10fdace786 | [
"BSD-3-Clause"
] | null | null | null | py_trees/console.py | fjulian/py_trees | 63fffdfb581f390546c375f13d064b10fdace786 | [
"BSD-3-Clause"
] | null | null | null | py_trees/console.py | fjulian/py_trees | 63fffdfb581f390546c375f13d064b10fdace786 | [
"BSD-3-Clause"
] | null | null | null | #
# License: BSD
# https://raw.githubusercontent.com/splintered-reality/py_trees/devel/LICENSE
#
##############################################################################
# Description
##############################################################################
"""
Simple colour definitions and syntax highli... | 31.134731 | 153 | 0.559765 |
74c72eebbad924949214de58902472d1327a6353 | 483 | py | Python | apps/iiif/manifests/migrations/0023_auto_20210928_1325.py | ecds/readux | 4eac8b48efef8126f4f2be28b5eb943c85a89c2e | [
"Apache-2.0"
] | 18 | 2017-06-12T09:58:02.000Z | 2021-10-01T11:14:34.000Z | apps/iiif/manifests/migrations/0023_auto_20210928_1325.py | ecds/readux | 4eac8b48efef8126f4f2be28b5eb943c85a89c2e | [
"Apache-2.0"
] | 276 | 2019-04-26T20:13:01.000Z | 2022-03-31T10:26:28.000Z | apps/iiif/manifests/migrations/0023_auto_20210928_1325.py | ecds/readux | 4eac8b48efef8126f4f2be28b5eb943c85a89c2e | [
"Apache-2.0"
] | 7 | 2018-03-13T23:44:26.000Z | 2021-09-15T17:54:55.000Z | # Generated by Django 2.2.23 on 2021-09-28 13:25
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('manifests', '0022_auto_20210928_1322'),
]
operations = [
migrations.AlterField(
model_name='manifest',
name='pid',
... | 25.421053 | 145 | 0.623188 |
74c74cca158daef66c8c328d7fd6bd859f36e6ea | 2,071 | py | Python | oscar/lib/python2.7/site-packages/phonenumbers/geodata/__init__.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/phonenumbers/geodata/__init__.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/phonenumbers/geodata/__init__.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | """Per-prefix data, mapping each prefix to a dict of locale:name.
Auto-generated file, do not edit by hand.
"""
from ..util import u
# Copyright (C) 2011-2017 The Libphonenumber Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with t... | 28.763889 | 75 | 0.769676 |
74c78a5808a7c3da01eaa7f4fda3ca37260ce9ba | 977 | py | Python | venv/Lib/site-packages/PygameLord/Surface.py | apoorv-x12/SpaceInvadersClassicGame-Myfirst-game | 5a4ac187c19a7decfb900b392c3fb897f6613a2c | [
"MIT"
] | null | null | null | venv/Lib/site-packages/PygameLord/Surface.py | apoorv-x12/SpaceInvadersClassicGame-Myfirst-game | 5a4ac187c19a7decfb900b392c3fb897f6613a2c | [
"MIT"
] | null | null | null | venv/Lib/site-packages/PygameLord/Surface.py | apoorv-x12/SpaceInvadersClassicGame-Myfirst-game | 5a4ac187c19a7decfb900b392c3fb897f6613a2c | [
"MIT"
] | null | null | null | #LordLynx
#Part of PygameLord
import pygame
from pygame.locals import*
pygame.init()
'''
Surfaces to display your project on, windows...
Help for these.
'''
'''
resize_window(event)
event: the event set from' for event in pygame.event.get(): ' Alteritivly another way if you desire
it returns a tuple for screen size
''... | 29.606061 | 110 | 0.749232 |
74c78c2229ac11a100c7a2f700d65bdab58dabda | 43,038 | py | Python | spoffy/modules/modules.py | steinitzu/spoffy | 40cce0f00accbe006084a610d0d50396c21ec96c | [
"Apache-2.0"
] | 1 | 2019-04-24T19:50:03.000Z | 2019-04-24T19:50:03.000Z | spoffy/modules/modules.py | steinitzu/spoffy | 40cce0f00accbe006084a610d0d50396c21ec96c | [
"Apache-2.0"
] | 3 | 2019-10-11T20:31:57.000Z | 2020-04-13T16:06:43.000Z | spoffy/modules/modules.py | steinitzu/spoffy | 40cce0f00accbe006084a610d0d50396c21ec96c | [
"Apache-2.0"
] | null | null | null | from typing import Sequence, Optional, Dict, Union, IO
from spoffy import models
from spoffy.modules.apimodule import ApiModule, AsyncApiModule
from spoffy.modules import sansio as builders, mixins
class Artists(ApiModule):
__builder_class__ = builders.Artists
def artist(self, artist_id: str) -> models.Artis... | 30.372618 | 79 | 0.580208 |
74c78c9da10cbd9c10bd697d3da7e56384ab1abd | 1,776 | py | Python | Tron_Files/tools/ECE385-HelperTools/PNG-To-Hex/On-Chip Memory/scripts/png_to_palette_relative_resizer.py | goelp14/TronOnFPGA | 7447905f3dbcbb8e8876e6a33f8f56d42fe51ad8 | [
"MIT"
] | null | null | null | Tron_Files/tools/ECE385-HelperTools/PNG-To-Hex/On-Chip Memory/scripts/png_to_palette_relative_resizer.py | goelp14/TronOnFPGA | 7447905f3dbcbb8e8876e6a33f8f56d42fe51ad8 | [
"MIT"
] | null | null | null | Tron_Files/tools/ECE385-HelperTools/PNG-To-Hex/On-Chip Memory/scripts/png_to_palette_relative_resizer.py | goelp14/TronOnFPGA | 7447905f3dbcbb8e8876e6a33f8f56d42fe51ad8 | [
"MIT"
] | null | null | null | from PIL import Image
from collections import Counter
from scipy.spatial import KDTree
import numpy as np
def hex_to_rgb(num):
h = str(num)
return int(h[0:4], 16), int(('0x' + h[4:6]), 16), int(('0x' + h[6:8]), 16)
def rgb_to_hex(num):
h = str(num)
return int(h[0:4], 16), int(('0x' + h[4:6]), 16), int((... | 41.302326 | 204 | 0.618806 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.