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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
91d9a92cc4c3aedfb9ae6cacbdd5d1dae45b92f2 | 837 | py | Python | day1/day1_2.py | jmcph4/advent2017 | f5f53e5a771b5b40b9fb8c5a2ea4e89d06279d32 | [
"MIT"
] | null | null | null | day1/day1_2.py | jmcph4/advent2017 | f5f53e5a771b5b40b9fb8c5a2ea4e89d06279d32 | [
"MIT"
] | null | null | null | day1/day1_2.py | jmcph4/advent2017 | f5f53e5a771b5b40b9fb8c5a2ea4e89d06279d32 | [
"MIT"
] | null | null | null | def sum_matching_digits(digits):
total = 0
n = len(digits)
if n == 0:
return total
if n == 1:
return digits[0]
shift = n // 2 # how far forward to look
for i in range(n):
if digits[i] == digits[(i+shift)%n]:
total += digits[i]
return total
"""
# t... | 19.928571 | 56 | 0.520908 |
91d9b04ffe8c5e2237854b624e427031b1cfd78d | 4,276 | py | Python | src/map/_map_logic.py | GriffithGNeumark/Hex-Invasion | 226e64686badae1cb4f290b6affa43d825ce43ed | [
"MIT"
] | null | null | null | src/map/_map_logic.py | GriffithGNeumark/Hex-Invasion | 226e64686badae1cb4f290b6affa43d825ce43ed | [
"MIT"
] | null | null | null | src/map/_map_logic.py | GriffithGNeumark/Hex-Invasion | 226e64686badae1cb4f290b6affa43d825ce43ed | [
"MIT"
] | null | null | null | """
.. module: _map_logic
:synopsis: Defines functions used in the Map class involving the game
state; for instance, collecting resources and making a move. All of
these functions are stored as methods for the Map class (see map.py).
"""
from . import cell
import numpy as np
def collectResources(self):... | 43.191919 | 102 | 0.649439 |
91d9b63ad9d2bad0a128449c35789e9c157d79c5 | 37,631 | py | Python | twisted/python/test/test_constants.py | sxamit/twisted | 30f6966329c857c3631c60aeb420d84d7828e01e | [
"MIT",
"Unlicense"
] | 1 | 2017-08-07T14:52:02.000Z | 2017-08-07T14:52:02.000Z | Lib/site-packages/twisted/python/test/test_constants.py | adzhou/Python27 | a7113b69d54a04cc780143241c2f1fe81939ad3a | [
"bzip2-1.0.6"
] | null | null | null | Lib/site-packages/twisted/python/test/test_constants.py | adzhou/Python27 | a7113b69d54a04cc780143241c2f1fe81939ad3a | [
"bzip2-1.0.6"
] | 1 | 2018-11-07T12:52:07.000Z | 2018-11-07T12:52:07.000Z | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Unit tests for L{twisted.python.constants}.
"""
from __future__ import division, absolute_import
from twisted.trial.unittest import TestCase
from twisted.python.constants import (
NamedConstant, Names, ValueConstant, Values, FlagConstan... | 33.331267 | 79 | 0.637825 |
91d9e5e9fbbdd331e0042e0fd718cc58f4986827 | 18,980 | py | Python | dis_snek/api/gateway/gateway.py | ShardlessBun/Dis-Snek | fd15b06c531e82a9682a7b139deec0df7b2aa2d0 | [
"MIT"
] | null | null | null | dis_snek/api/gateway/gateway.py | ShardlessBun/Dis-Snek | fd15b06c531e82a9682a7b139deec0df7b2aa2d0 | [
"MIT"
] | null | null | null | dis_snek/api/gateway/gateway.py | ShardlessBun/Dis-Snek | fd15b06c531e82a9682a7b139deec0df7b2aa2d0 | [
"MIT"
] | null | null | null | """This file outlines the interaction between snek and Discord's Gateway API."""
import asyncio
import collections
import logging
import random
import sys
import time
import zlib
from types import TracebackType
from typing import TypeVar, TYPE_CHECKING
from aiohttp import WSMsgType
from dis_snek.api import events
fro... | 35.94697 | 124 | 0.581085 |
91da01ebd02cacc5dfadcbe8f4f36aec298ca041 | 4,424 | py | Python | istio/datadog_checks/istio/config_models/instance.py | ypisetsky/integrations-core | f7153d3f896827c3325c7f0ec088bc17d088a894 | [
"BSD-3-Clause"
] | 1 | 2021-06-06T23:49:17.000Z | 2021-06-06T23:49:17.000Z | istio/datadog_checks/istio/config_models/instance.py | ypisetsky/integrations-core | f7153d3f896827c3325c7f0ec088bc17d088a894 | [
"BSD-3-Clause"
] | null | null | null | istio/datadog_checks/istio/config_models/instance.py | ypisetsky/integrations-core | f7153d3f896827c3325c7f0ec088bc17d088a894 | [
"BSD-3-Clause"
] | null | null | null | # (C) Datadog, Inc. 2021-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
from __future__ import annotations
from typing import Any, Mapping, Optional, Sequence, Union
from pydantic import BaseModel, root_validator, validator
from datadog_checks.base.utils.functions import id... | 30.722222 | 110 | 0.731239 |
91da7652876eb3be9886cc00b0c594a448558afb | 5,182 | py | Python | Tools/Scripts/ic-stats.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | 6 | 2021-07-05T16:09:39.000Z | 2022-03-06T22:44:42.000Z | Tools/Scripts/ic-stats.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | 7 | 2022-03-15T13:25:39.000Z | 2022-03-15T13:25:44.000Z | Tools/Scripts/ic-stats.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | null | null | null | #! /usr/bin/python
# Copyright (C) 2019 Apple 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:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of co... | 41.126984 | 143 | 0.577769 |
91dab5a0132b405b6911fd470f852095dfbcc87b | 529 | py | Python | jira/setup.py | TonyHamil/insightconnect-plugins | 63d985c798623a54b4be135d81197acea11f99ad | [
"MIT"
] | null | null | null | jira/setup.py | TonyHamil/insightconnect-plugins | 63d985c798623a54b4be135d81197acea11f99ad | [
"MIT"
] | null | null | null | jira/setup.py | TonyHamil/insightconnect-plugins | 63d985c798623a54b4be135d81197acea11f99ad | [
"MIT"
] | null | null | null | # GENERATED BY KOMAND SDK - DO NOT EDIT
from setuptools import setup, find_packages
setup(name='jira-rapid7-plugin',
version='3.1.1',
description='Jira is an issue tracking product, developed by Atlassian. It provides bug tracking, issue tracking, and project management functions',
author='rapid7',
... | 35.266667 | 154 | 0.688091 |
91dabc9665819c763341cda8a06677a674b23eb7 | 4,322 | py | Python | IMLearn/learners/classifiers/perceptron.py | yuvalarbel/IML.HUJI | 8ef0aa9403c97adc5b79d1ebd6780065cf0af1e7 | [
"MIT"
] | null | null | null | IMLearn/learners/classifiers/perceptron.py | yuvalarbel/IML.HUJI | 8ef0aa9403c97adc5b79d1ebd6780065cf0af1e7 | [
"MIT"
] | null | null | null | IMLearn/learners/classifiers/perceptron.py | yuvalarbel/IML.HUJI | 8ef0aa9403c97adc5b79d1ebd6780065cf0af1e7 | [
"MIT"
] | null | null | null | from __future__ import annotations
from typing import Callable
from typing import NoReturn
from ...base import BaseEstimator
import numpy as np
def default_callback(fit: Perceptron, x: np.ndarray, y: int):
pass
class Perceptron(BaseEstimator):
"""
Perceptron half-space classifier
Finds a separating... | 32.496241 | 115 | 0.599954 |
91daed5e0b006dd55c3118d9a457fa47ba541d9b | 9,128 | py | Python | searchsort/searchsort.py | Geometrically/python-projects | d63465a44c428b7c741e3491749c2e1e09a5bfa1 | [
"MIT"
] | null | null | null | searchsort/searchsort.py | Geometrically/python-projects | d63465a44c428b7c741e3491749c2e1e09a5bfa1 | [
"MIT"
] | null | null | null | searchsort/searchsort.py | Geometrically/python-projects | d63465a44c428b7c741e3491749c2e1e09a5bfa1 | [
"MIT"
] | 1 | 2021-10-01T04:14:17.000Z | 2021-10-01T04:14:17.000Z | import time
import random
import bisect
import sys
random.seed()
def insertion_sort(vals):
for i in range(1, len(vals)):
j = i
while j > 0 and vals[j - 1] > vals[j]:
vals[j], vals[j - 1] = vals[j - 1], vals[j]
j -= 1
def bubble_sort(vals):
n = len(va... | 28.886076 | 126 | 0.525307 |
91db18ba147ef474d41e36a13bfa691fbf2f4fd3 | 25,500 | py | Python | mnlite/mnode.py | datadavev/mnlite | be3118cde634fce97ea689e1044803edf3cbc1ea | [
"Apache-2.0"
] | null | null | null | mnlite/mnode.py | datadavev/mnlite | be3118cde634fce97ea689e1044803edf3cbc1ea | [
"Apache-2.0"
] | 14 | 2021-07-07T13:17:40.000Z | 2022-01-17T19:01:34.000Z | mnlite/mnode.py | datadavev/mnlite | be3118cde634fce97ea689e1044803edf3cbc1ea | [
"Apache-2.0"
] | null | null | null | import os
import re
import json
import logging
import flask
import click
import sqlalchemy
import sqlalchemy.orm
import opersist
import opersist.utils
import opersist.models
m_node = flask.Blueprint("m_node", __name__, template_folder="templates/mnode")
XML_TYPE = "text/xml"
PAGE_SIZE = 100
DEFAULT_NODE_CONFIG = {
... | 30.871671 | 118 | 0.643922 |
91db195f728a80885d24bc64bce17ef68ad9ee91 | 3,741 | py | Python | Tools/Scripts/webkitpy/tool/steps/validatechangelogs_unittest.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | 6 | 2021-07-05T16:09:39.000Z | 2022-03-06T22:44:42.000Z | Tools/Scripts/webkitpy/tool/steps/validatechangelogs_unittest.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | 7 | 2022-03-15T13:25:39.000Z | 2022-03-15T13:25:44.000Z | Tools/Scripts/webkitpy/tool/steps/validatechangelogs_unittest.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | null | null | null | # Copyright (C) 2010 Google 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, this list of conditions and the ... | 53.442857 | 149 | 0.751938 |
91db3dadbd2713daafcf7dddb23f9d4482f24fd4 | 770 | py | Python | dataset_builder/steps/directory_cleaner.py | statisticsnorway/microdata-dataset-builder | c58fe5804f146290e1d523536729f1a5b1ac2c73 | [
"Apache-2.0"
] | null | null | null | dataset_builder/steps/directory_cleaner.py | statisticsnorway/microdata-dataset-builder | c58fe5804f146290e1d523536729f1a5b1ac2c73 | [
"Apache-2.0"
] | 3 | 2022-01-18T15:21:49.000Z | 2022-03-07T13:49:03.000Z | dataset_builder/steps/directory_cleaner.py | statisticsnorway/microdata-dataset-builder | c58fe5804f146290e1d523536729f1a5b1ac2c73 | [
"Apache-2.0"
] | null | null | null | import os
import glob
import logging
from dataset_builder.config import config_provider
logger = logging.getLogger()
CONFIG = config_provider.get_config()
WORKING_DIR = CONFIG['WORKING_DIR']
PRESERVE_TEMPORARY_FILES = CONFIG['PRESERVE_TEMPORARY_FILES']
def run(dataset_name: str):
"""
Delete all files for th... | 27.5 | 65 | 0.690909 |
91db6c92eb18e0739d9ca52809c2ad2f5b2e67ec | 697 | py | Python | src/infi/instruct/errors.py | jasonjorge/infi.asi | 78a4c34a421102f99b959a659cf7303804627d9b | [
"BSD-3-Clause"
] | 2 | 2015-01-12T21:16:06.000Z | 2019-12-12T05:59:56.000Z | src/infi/instruct/errors.py | jasonjorge/infi.asi | 78a4c34a421102f99b959a659cf7303804627d9b | [
"BSD-3-Clause"
] | 4 | 2015-02-24T09:18:00.000Z | 2021-06-16T12:55:19.000Z | src/infi/instruct/errors.py | jasonjorge/infi.asi | 78a4c34a421102f99b959a659cf7303804627d9b | [
"BSD-3-Clause"
] | 4 | 2015-01-07T12:37:54.000Z | 2018-02-08T15:07:17.000Z | class InstructError(Exception):
pass
class NotEnoughDataError(InstructError):
def __init__(self, expected, actually_read):
super(NotEnoughDataError, self).__init__("expected to read %d bytes but read only %d bytes instead" %
(expected, actually_read))
c... | 29.041667 | 109 | 0.72023 |
91db6d5a991e852a4ecec2ac0f320407c9f159fd | 841 | py | Python | sdks/python/test/test_MSAUser.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | null | null | null | sdks/python/test/test_MSAUser.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 6 | 2019-10-23T06:38:53.000Z | 2022-01-22T07:57:58.000Z | sdks/python/test/test_MSAUser.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 2 | 2019-10-23T06:31:05.000Z | 2021-08-21T17:32:47.000Z | # coding: utf-8
"""
App Center Client
Microsoft Visual Studio App Center API # noqa: E501
OpenAPI spec version: preview
Contact: benedetto.abbenanti@gmail.com
Project Repository: https://github.com/b3nab/appcenter-sdks
"""
from __future__ import absolute_import
import unittest
import appcente... | 21.025 | 79 | 0.690844 |
91db7325b4861f98fe093e3e91460ef49317935d | 819 | py | Python | demo/demo/urls.py | ParikhKadam/django-cron | 82c4939af4691d2ba4deeb5c9bec4d1573b51815 | [
"MIT"
] | null | null | null | demo/demo/urls.py | ParikhKadam/django-cron | 82c4939af4691d2ba4deeb5c9bec4d1573b51815 | [
"MIT"
] | null | null | null | demo/demo/urls.py | ParikhKadam/django-cron | 82c4939af4691d2ba4deeb5c9bec4d1573b51815 | [
"MIT"
] | null | null | null | """demo URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.9/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-based ... | 35.608696 | 79 | 0.708181 |
91db9a31cac0c43c765157f90034e3b2ef118ecc | 3,173 | py | Python | bcbio/structural/delly.py | matanhofree/bcbio-nextgen | e6938cedb20ff3b7632165105941d71189e46aac | [
"MIT"
] | 1 | 2015-04-08T17:43:39.000Z | 2015-04-08T17:43:39.000Z | bcbio/structural/delly.py | matanhofree/bcbio-nextgen | e6938cedb20ff3b7632165105941d71189e46aac | [
"MIT"
] | null | null | null | bcbio/structural/delly.py | matanhofree/bcbio-nextgen | e6938cedb20ff3b7632165105941d71189e46aac | [
"MIT"
] | null | null | null | """Structural variant calling with Delly
https://github.com/tobiasrausch/delly
"""
import os
import copy
import subprocess
from bcbio import utils
from bcbio.distributed.multi import run_multicore, zeromq_aware_logging
from bcbio.distributed.transaction import file_transaction
from bcbio.provenance import do
from bcb... | 43.465753 | 99 | 0.614876 |
91dbcd0e6a808d4b9a526e1015e7fbf357d421fd | 629 | py | Python | shadowreader/plugins/loader_middleware.py | luckymike/shadowreader | 831fe8fbc8f980337285caabe24512b6ba73be11 | [
"Apache-2.0"
] | 150 | 2018-05-09T00:10:57.000Z | 2022-03-21T23:01:49.000Z | shadowreader/plugins/loader_middleware.py | NP-compete/shadowreader | b941797edbe2286aefdab714c30784b0b94fd5cb | [
"Apache-2.0"
] | 24 | 2018-08-10T19:36:56.000Z | 2020-07-03T03:28:26.000Z | shadowreader/plugins/loader_middleware.py | NP-compete/shadowreader | b941797edbe2286aefdab714c30784b0b94fd5cb | [
"Apache-2.0"
] | 13 | 2018-07-10T23:29:24.000Z | 2021-05-02T13:42:57.000Z | def _transform_uri(uri: str, base_url: str) -> str:
url = f"{base_url}{uri}"
return url
def _transform_load(load: list, base_url: str) -> list:
if "request_uri" in load[0]:
uri_key = "request_uri"
elif "uri" in load[0]:
uri_key = "uri"
for l in load:
l["url"] = _transform_... | 23.296296 | 61 | 0.599364 |
91dbdce6fce8c76018752a14e02e9ae88c1c6196 | 219 | py | Python | ginga/canvas/mixins.py | Cadair/ginga | 5afdd8824f27c7ae7d8d82b5013b0ff0068bd8b8 | [
"BSD-3-Clause"
] | null | null | null | ginga/canvas/mixins.py | Cadair/ginga | 5afdd8824f27c7ae7d8d82b5013b0ff0068bd8b8 | [
"BSD-3-Clause"
] | 20 | 2021-05-03T18:02:23.000Z | 2022-03-12T12:01:04.000Z | Lib/site-packages/ginga/canvas/mixins.py | fochoao/cpython | 3dc84b260e5bced65ebc2c45c40c8fa65f9b5aa9 | [
"bzip2-1.0.6",
"0BSD"
] | null | null | null | #
# convenience module for importing canvas mixin classes
#
from ginga.canvas.CompoundMixin import CompoundMixin
from ginga.canvas.CanvasMixin import CanvasMixin
from ginga.canvas.DrawingMixin import DrawingMixin
#END
| 24.333333 | 55 | 0.844749 |
91dbe29c6b5ce5a3b091d77c86049beea23ad87e | 172 | py | Python | src/olympia/tags/urls.py | shashwatsingh/addons-server | 8fce98901104349055a828b5a47865f5e8f4120b | [
"BSD-3-Clause"
] | 3 | 2020-03-05T18:17:14.000Z | 2020-03-09T01:24:38.000Z | src/olympia/tags/urls.py | shashwatsingh/addons-server | 8fce98901104349055a828b5a47865f5e8f4120b | [
"BSD-3-Clause"
] | 6 | 2020-09-28T03:15:57.000Z | 2021-09-28T23:33:19.000Z | src/olympia/tags/urls.py | shashwatsingh/addons-server | 8fce98901104349055a828b5a47865f5e8f4120b | [
"BSD-3-Clause"
] | 1 | 2020-06-04T10:18:59.000Z | 2020-06-04T10:18:59.000Z | from django.conf.urls import url
from olympia.amo.views import frontend_view
urlpatterns = [
url(r'^tag/(?P<tag_name>[^/]+)$', frontend_view, name='tags.detail'),
]
| 19.111111 | 73 | 0.69186 |
91dc44b47cd993f17dc2b777fccf0d34ea69c766 | 187 | py | Python | examples/quickstart/quickstart.py | JakubTesarek/dbgr | fc55cee5d5a69f3fa691579bc7d2627f51cbca03 | [
"Apache-2.0"
] | 8 | 2019-05-23T19:45:46.000Z | 2021-02-08T17:21:21.000Z | examples/quickstart/quickstart.py | JakubTesarek/dbgr | fc55cee5d5a69f3fa691579bc7d2627f51cbca03 | [
"Apache-2.0"
] | 86 | 2019-05-13T14:20:20.000Z | 2019-06-19T11:48:59.000Z | examples/quickstart/quickstart.py | JakubTesarek/dbgr | fc55cee5d5a69f3fa691579bc7d2627f51cbca03 | [
"Apache-2.0"
] | 1 | 2021-02-08T17:21:22.000Z | 2021-02-08T17:21:22.000Z | '''
Quickstart example for DBGR
'''
from dbgr import request
@request
async def get_example(session):
''' Retrieve example.com site'''
await session.get('http://example.com')
| 15.583333 | 43 | 0.68984 |
91dc5c6ee251c0291fe17a56d349e3d7cf44ded2 | 10,942 | py | Python | sleepy/converters.py | HitSyr/Sleepy | 70ec9479fb947a624e3c658ea39c886c30bf794d | [
"MIT"
] | 4 | 2021-12-08T21:38:14.000Z | 2022-01-30T04:16:38.000Z | sleepy/converters.py | HitSyr/Sleepy | 70ec9479fb947a624e3c658ea39c886c30bf794d | [
"MIT"
] | 2 | 2021-09-29T13:33:26.000Z | 2021-12-12T12:52:16.000Z | sleepy/converters.py | HitSyr/Sleepy | 70ec9479fb947a624e3c658ea39c886c30bf794d | [
"MIT"
] | null | null | null | """
Copyright (c) 2018-present HitchedSyringe
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at https://mozilla.org/MPL/2.0/.
"""
from __future__ import annotations
__all__ = (
"ImageAssetConversio... | 31.085227 | 88 | 0.658198 |
91dc5fd27a41a8c1354ebe3b4bf1988d1d30cbf7 | 84,380 | py | Python | premade_modules/2.79/2.79b/bpy/ops/object.py | echantry/fake-bpy-module | 004cdf198841e639b7d9a4c4db95ca1c0d3aa2c7 | [
"MIT"
] | null | null | null | premade_modules/2.79/2.79b/bpy/ops/object.py | echantry/fake-bpy-module | 004cdf198841e639b7d9a4c4db95ca1c0d3aa2c7 | [
"MIT"
] | null | null | null | premade_modules/2.79/2.79b/bpy/ops/object.py | echantry/fake-bpy-module | 004cdf198841e639b7d9a4c4db95ca1c0d3aa2c7 | [
"MIT"
] | null | null | null | def add(radius=1.0,
type='EMPTY',
view_align=False,
enter_editmode=False,
location=(0.0, 0.0, 0.0),
rotation=(0.0, 0.0, 0.0),
layers=(False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, Fal... | 37.171806 | 2,438 | 0.685613 |
91dc89876bc60cf39e46942cec4dd5c0dd1eb330 | 592 | py | Python | app/views/handlers/list_edit_question.py | ons-eq-team/eq-questionnaire-runner | 8d029097faa2b9d53d9621064243620db60c62c7 | [
"MIT"
] | null | null | null | app/views/handlers/list_edit_question.py | ons-eq-team/eq-questionnaire-runner | 8d029097faa2b9d53d9621064243620db60c62c7 | [
"MIT"
] | null | null | null | app/views/handlers/list_edit_question.py | ons-eq-team/eq-questionnaire-runner | 8d029097faa2b9d53d9621064243620db60c62c7 | [
"MIT"
] | null | null | null | from app.views.handlers.list_action import ListAction
class ListEditQuestion(ListAction):
def is_location_valid(self):
list_item_doesnt_exist = (
self._current_location.list_item_id
not in self._questionnaire_store.list_store[
self._current_location.list_name
... | 29.6 | 69 | 0.668919 |
91dc8a0b713500cb17baad9019c1514a3bccc5d5 | 421 | py | Python | forager_knn/src/forager_knn/reducers/base.py | forager-research/forager-server | 7557076f9114391cf3a6953d4312883a9de5ce27 | [
"MIT"
] | 4 | 2021-09-21T01:58:21.000Z | 2022-03-02T21:28:32.000Z | forager_knn/src/forager_knn/reducers/base.py | forager-research/forager-server | 7557076f9114391cf3a6953d4312883a9de5ce27 | [
"MIT"
] | 2 | 2021-10-19T19:39:52.000Z | 2021-11-18T23:53:26.000Z | forager_knn/src/forager_knn/reducers/base.py | forager-research/forager-server | 7557076f9114391cf3a6953d4312883a9de5ce27 | [
"MIT"
] | null | null | null | import abc
from typing import Any
from forager_knn.utils import JSONType
class Reducer(abc.ABC):
def handle_chunk_result(self, chunk: JSONType, chunk_output: JSONType) -> None:
pass
def finish(self) -> None:
pass
@abc.abstractmethod
def handle_result(self, input: JSONType, output: ... | 19.136364 | 83 | 0.662708 |
91dc920bf2b57af336a81692828945298b045f1f | 10,655 | py | Python | vplexapi-7.0.0/vplexapi/api/director_api.py | dell/python-vplex | 02c5df5e7f9ed61a13a2838f21ca6467a25dd392 | [
"Apache-2.0"
] | 3 | 2020-12-01T11:22:13.000Z | 2021-02-16T17:38:42.000Z | vplexapi-7.0.0/vplexapi/api/director_api.py | dell/python-vplex | 02c5df5e7f9ed61a13a2838f21ca6467a25dd392 | [
"Apache-2.0"
] | null | null | null | vplexapi-7.0.0/vplexapi/api/director_api.py | dell/python-vplex | 02c5df5e7f9ed61a13a2838f21ca6467a25dd392 | [
"Apache-2.0"
] | 3 | 2021-01-01T21:07:55.000Z | 2021-02-20T07:07:40.000Z | # coding: utf-8
"""
VPlex REST API
A definition for the next-gen VPlex API # noqa: E501
OpenAPI spec version: 0.1
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import re # noqa: F401
# python 2 and python 3 compatibility library... | 43.847737 | 157 | 0.632379 |
91dca368933ad0462ac8e9d3f1994075876cbdc1 | 3,811 | py | Python | hyperglass/models/commands/vyos.py | owensresearch/hyperglass | 5d3e5965b211e04637205ee510010d41edf16940 | [
"BSD-3-Clause-Clear"
] | null | null | null | hyperglass/models/commands/vyos.py | owensresearch/hyperglass | 5d3e5965b211e04637205ee510010d41edf16940 | [
"BSD-3-Clause-Clear"
] | null | null | null | hyperglass/models/commands/vyos.py | owensresearch/hyperglass | 5d3e5965b211e04637205ee510010d41edf16940 | [
"BSD-3-Clause-Clear"
] | null | null | null | """VyOS Command Model."""
# Third Party
from pydantic import StrictStr
# Local
from .common import CommandSet, CommandGroup
class _IPv4(CommandSet):
"""Validation model for non-default dual afi commands."""
bgp_route: StrictStr = "show ip bgp {target}"
bgp_aspath: StrictStr = 'show ip bgp regexp "{targ... | 40.542553 | 95 | 0.644975 |
91dcaeba225bde4525f2a741956754f0b2e99d14 | 8,819 | py | Python | simulations/drna.py | mavazquezlopez/distributed_particle_filtering | 5f3bce06c8dfb31e5af963f7a6389d2d299a5c60 | [
"Apache-2.0"
] | 4 | 2020-05-19T08:01:27.000Z | 2021-06-04T00:53:08.000Z | simulations/drna.py | mavazquezlopez/distributed_particle_filtering | 5f3bce06c8dfb31e5af963f7a6389d2d299a5c60 | [
"Apache-2.0"
] | null | null | null | simulations/drna.py | mavazquezlopez/distributed_particle_filtering | 5f3bce06c8dfb31e5af963f7a6389d2d299a5c60 | [
"Apache-2.0"
] | 3 | 2019-07-06T16:26:51.000Z | 2020-10-12T22:42:55.000Z | import numpy as np
import scipy.io
import h5py
import smc.particle_filter.centralized as centralized
import smc.particle_filter.distributed as distributed
import smc.exchange_recipe
import smc.estimator
import PEs_topology
import drnautil
import sensors_PEs_connector
import state
import simulations.base
class Conver... | 43.658416 | 120 | 0.760857 |
91dcbad01456ef02e5fc83672831e4279da8be9d | 410 | py | Python | chapter6/sign.py | cs50sacramento/source-code-16-17 | 8e8276de39ba3106b67549108f6ee4cf71836025 | [
"MIT"
] | null | null | null | chapter6/sign.py | cs50sacramento/source-code-16-17 | 8e8276de39ba3106b67549108f6ee4cf71836025 | [
"MIT"
] | null | null | null | chapter6/sign.py | cs50sacramento/source-code-16-17 | 8e8276de39ba3106b67549108f6ee4cf71836025 | [
"MIT"
] | null | null | null | import cs50
def posNeg(x):
if x > 0:
print("Positive!")
elif x < 0:
print("Negative!")
else:
print("Zero!")
def evenOdd(x):
if x % 2 == 0:
print("Even!")
else:
print("Odd!")
def main():
print("Enter an integer: ", end="")
userNum = cs50.get_... | 16.4 | 39 | 0.492683 |
91dcc9805752f92b96b5f37841421aff9e45e2c3 | 5,765 | py | Python | sdk/python/pulumi_consul/__init__.py | pulumi/pulumi-consul | 5b66c5b97fda6b5433bfb4d4173c999e468c82e8 | [
"ECL-2.0",
"Apache-2.0"
] | 3 | 2019-11-12T12:21:18.000Z | 2021-07-31T08:17:22.000Z | sdk/python/pulumi_consul/__init__.py | pulumi/pulumi-consul | 5b66c5b97fda6b5433bfb4d4173c999e468c82e8 | [
"ECL-2.0",
"Apache-2.0"
] | 38 | 2019-11-21T15:19:33.000Z | 2022-03-31T15:24:11.000Z | sdk/python/pulumi_consul/__init__.py | pulumi/pulumi-consul | 5b66c5b97fda6b5433bfb4d4173c999e468c82e8 | [
"ECL-2.0",
"Apache-2.0"
] | 2 | 2020-11-24T12:23:13.000Z | 2021-12-06T17:33:31.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
from . import _utilities
import typing
# Export this package's modules as members:
from .acl_auth_method import *
from .acl_binding_rul... | 22.173077 | 98 | 0.66765 |
91dcd892f59d11d06ef2f16461502e347d2d6d8a | 9,668 | py | Python | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2020_08_01_preview/aio/_storage_management_client.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2020_08_01_preview/aio/_storage_management_client.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2020_08_01_preview/aio/_storage_management_client.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.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 ... | 60.805031 | 500 | 0.772031 |
91dd079c4f75acbef563eaac8083f9d812797397 | 5,126 | py | Python | aggregators/brute.py | LPD-EPFL/DifferentialByzantine | 132d4feee305126c672b4f06198287daa615ec35 | [
"MIT"
] | 2 | 2021-10-18T02:56:19.000Z | 2021-11-13T02:31:15.000Z | aggregators/brute.py | IKACE/DifferentialByzantine-1 | 809fd6e070fedeb87a6dbff6f883e93e3c5c8e09 | [
"MIT"
] | null | null | null | aggregators/brute.py | IKACE/DifferentialByzantine-1 | 809fd6e070fedeb87a6dbff6f883e93e3c5c8e09 | [
"MIT"
] | 1 | 2021-12-04T21:58:48.000Z | 2021-12-04T21:58:48.000Z | # coding: utf-8
###
# @file brute.py
# @author Sébastien Rouault <sebastien.rouault@alumni.epfl.ch>
#
# @section LICENSE
#
# Copyright © 2018-2021 École Polytechnique Fédérale de Lausanne (EPFL).
# See LICENSE file.
#
# @section DESCRIPTION
#
# Brute GAR.
###
import tools
from . import register
import it... | 32.649682 | 133 | 0.665431 |
91dd207859bf87bd631a133df6cbd45dc47c91f9 | 9,654 | py | Python | nnutils/pytools.py | wangfeng012316/NNparser | 1e3a6fc6150ecf6d79ec1c674b58380ffad751cb | [
"MIT"
] | 31 | 2020-08-31T14:52:27.000Z | 2022-03-14T16:43:28.000Z | nnutils/pytools.py | wangfeng012316/NNparser | 1e3a6fc6150ecf6d79ec1c674b58380ffad751cb | [
"MIT"
] | 4 | 2020-10-21T12:44:50.000Z | 2022-02-10T01:59:27.000Z | nnutils/pytools.py | kiminh/NNparser | 1e3a6fc6150ecf6d79ec1c674b58380ffad751cb | [
"MIT"
] | 8 | 2020-09-01T06:32:21.000Z | 2022-01-05T00:25:41.000Z | # -*- coding: utf-8 -*-
"""
Created on Thu Jul 16 11:47:13 2020
@author: LL
Updated on Mon Aug 31 20:09:31 2020
@Stephen Qian
"""
import torch
from nnutils.torchsummary import summary
# from torch.autograd import Variable
import nnutils.formattable as ft
import nnutils.dotGen as dg
from torchvision import models
impo... | 35.362637 | 159 | 0.576031 |
91dd260cb673f220f3baab0c86cc574ca2b9ba7a | 433 | py | Python | setup_cron.py | akshay-99/Activity-Outline | d7c2b9fe533e57925aa2e29a0789df095ed3f91b | [
"MIT"
] | 13 | 2019-09-05T18:13:02.000Z | 2022-01-07T18:15:29.000Z | setup_cron.py | akshay-99/Activity-Outline | d7c2b9fe533e57925aa2e29a0789df095ed3f91b | [
"MIT"
] | null | null | null | setup_cron.py | akshay-99/Activity-Outline | d7c2b9fe533e57925aa2e29a0789df095ed3f91b | [
"MIT"
] | null | null | null | from crontab import CronTab
import os
def setup_cron():
user_cron = CronTab(user=True)
script_path = os.path.dirname(os.path.abspath(__file__))
for job in user_cron.crons:
if script_path in job.command:
return False
command = f"env DISPLAY=:0 python3 {os.path.join(script_path,... | 24.055556 | 78 | 0.662818 |
91dd3fab087f3ef564dc4327483823ebfa08b58f | 655 | py | Python | tron/Misc/Exceptions/Error.py | sdss/tron | 886c5c5fb6341ad85e4a9f5d6f5ecb6bbc0d8322 | [
"BSD-3-Clause"
] | null | null | null | tron/Misc/Exceptions/Error.py | sdss/tron | 886c5c5fb6341ad85e4a9f5d6f5ecb6bbc0d8322 | [
"BSD-3-Clause"
] | null | null | null | tron/Misc/Exceptions/Error.py | sdss/tron | 886c5c5fb6341ad85e4a9f5d6f5ecb6bbc0d8322 | [
"BSD-3-Clause"
] | null | null | null | __all__ = ['Error']
class Error(Exception):
def __init__(self, oneliner, **argv):
""" Create a generic error with arbitray attributes.
Args:
error - one line of text, intended for users.
argv - a dictionary of attributes.
"""
Exception.__init__(self)
... | 24.259259 | 68 | 0.554198 |
91dd4956caa095acece54f1cacffe66d24af6703 | 2,764 | py | Python | trac/about.py | mikiec84/trac | d51a7119b9fcb9061d7fe135c7d648fa671555dd | [
"BSD-3-Clause"
] | null | null | null | trac/about.py | mikiec84/trac | d51a7119b9fcb9061d7fe135c7d648fa671555dd | [
"BSD-3-Clause"
] | null | null | null | trac/about.py | mikiec84/trac | d51a7119b9fcb9061d7fe135c7d648fa671555dd | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (C) 2004-2020 Edgewall Software
# Copyright (C) 2004-2005 Jonas Borgström <jonas@edgewall.com>
# Copyright (C) 2004-2005 Daniel Lundin <daniel@edgewall.com>
# Copyright (C) 2005-2006 Christopher Lenz <cmlenz@gmx.de>
# All rights reserved.
#
# This software is licensed as described ... | 33.707317 | 77 | 0.68343 |
91dd4b5def4c0b39fb11d3979e297d49b3170c5c | 1,035 | py | Python | utils/Constants.py | mohankarthik/kitti-tracking | a89579039e7453dff3f4c2af49c514e01234fbe3 | [
"MIT"
] | 3 | 2018-08-18T12:48:40.000Z | 2019-03-05T07:55:04.000Z | utils/Constants.py | mohankarthik/kitti-tracking | a89579039e7453dff3f4c2af49c514e01234fbe3 | [
"MIT"
] | null | null | null | utils/Constants.py | mohankarthik/kitti-tracking | a89579039e7453dff3f4c2af49c514e01234fbe3 | [
"MIT"
] | null | null | null | import os
"""
PATHS
"""
OUTPUT_PATH = '.'
__TF_RECORD_ROOT_PATH = 'data'
TF_RECORD_TRAIN_PATH = os.path.join(__TF_RECORD_ROOT_PATH, 'train.tfrecord')
TF_RECORD_EVAL_PATH = os.path.join(__TF_RECORD_ROOT_PATH, 'eval.tfrecord')
TF_RECORD_TEST_PATH = os.path.join(__TF_RECORD_ROOT_PATH, 'test.tfrecord')
ROOT_PATH = '/mnt/... | 24.069767 | 79 | 0.709179 |
91dd5aad0478f8fd20e91c91dd0aba35e75c0b7e | 8,469 | py | Python | charts_config.py | gfranzini/dig_ed_cat | 5f1a64109010e5366d28d0639f088a2e895c3488 | [
"MIT"
] | null | null | null | charts_config.py | gfranzini/dig_ed_cat | 5f1a64109010e5366d28d0639f088a2e895c3488 | [
"MIT"
] | 10 | 2021-02-02T23:12:07.000Z | 2021-12-13T20:50:47.000Z | charts_config.py | gfranzini/dig_ed_cat | 5f1a64109010e5366d28d0639f088a2e895c3488 | [
"MIT"
] | null | null | null | {
"advanced_search": {
"chart_types": [
"bar",
"line",
"pie"
],
"help_text": "Provide some",
"label": "no label provided",
"lookup_expr": "exact"
},
"api": {
"chart_types": [
"bar",
"line",
... | 22.766129 | 53 | 0.39249 |
91dd7b8cb14f1053eb8e82b4877fdc46bc787d5c | 1,222 | py | Python | setup.py | mritv/edflow | 9bef77e32a74d9ee4108182d8cab177b5dd36731 | [
"MIT"
] | 1 | 2020-04-01T07:41:21.000Z | 2020-04-01T07:41:21.000Z | setup.py | mritv/edflow | 9bef77e32a74d9ee4108182d8cab177b5dd36731 | [
"MIT"
] | null | null | null | setup.py | mritv/edflow | 9bef77e32a74d9ee4108182d8cab177b5dd36731 | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
# allows to get version via python setup.py --version
__version__ = "0.2.1"
setup(
name="edflow",
version=__version__,
description="Logistics for Deep Learning",
url="https://github.com/pesser/edflow",
author="Mimo Tilbich et al.",
author_email="pa... | 24.938776 | 92 | 0.561375 |
91ddb9e2a6d41dc05a62968b4e9d9a2b8bee2751 | 11,400 | py | Python | methlab/shop/tasks.py | LDO-CERT/methlab | cf6f30cd1c47727a596ebafba2b1213808bd552c | [
"MIT"
] | 4 | 2021-03-17T10:09:31.000Z | 2021-12-20T22:50:59.000Z | methlab/shop/tasks.py | LDO-CERT/methlab | cf6f30cd1c47727a596ebafba2b1213808bd552c | [
"MIT"
] | 5 | 2021-03-19T13:54:43.000Z | 2021-10-01T20:21:03.000Z | methlab/shop/tasks.py | LDO-CERT/methlab | cf6f30cd1c47727a596ebafba2b1213808bd552c | [
"MIT"
] | null | null | null | import uuid
import time
import logging
import datetime
import kombu
import socket
import mailparser
from imaplib import IMAP4
from config import celery_app
from glom import glom, PathAccessError
from tld.utils import update_tld_names
from cortex4py.api import Api
from django.core.exceptions import ObjectDoesNotEx... | 30.645161 | 87 | 0.549474 |
91ddbd1a935183a2259be002d65bb0d8816491eb | 21 | py | Python | m2ext/__init__.py | abbot/m2ext | f56394240240fcda0b2abc14d69916d357c1c36e | [
"BSD-2-Clause"
] | 1 | 2015-11-03T19:58:18.000Z | 2015-11-03T19:58:18.000Z | m2ext/__init__.py | abbot/m2ext | f56394240240fcda0b2abc14d69916d357c1c36e | [
"BSD-2-Clause"
] | null | null | null | m2ext/__init__.py | abbot/m2ext | f56394240240fcda0b2abc14d69916d357c1c36e | [
"BSD-2-Clause"
] | null | null | null | import SSL
import m2
| 7 | 10 | 0.809524 |
91ddc5dc426779dfee3c719d72d7cc2a3d8204ed | 69,244 | py | Python | google-cloud-sdk/.install/.backup/lib/googlecloudsdk/third_party/apis/container/v1/container_v1_messages.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | 1 | 2017-11-29T18:52:27.000Z | 2017-11-29T18:52:27.000Z | google-cloud-sdk/.install/.backup/lib/googlecloudsdk/third_party/apis/container/v1/container_v1_messages.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | null | null | null | google-cloud-sdk/.install/.backup/lib/googlecloudsdk/third_party/apis/container/v1/container_v1_messages.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | 1 | 2020-07-25T12:09:01.000Z | 2020-07-25T12:09:01.000Z | """Generated message classes for container version v1.
Builds and manages clusters that run container-based applications, powered by
open source Kubernetes technology.
"""
# NOTE: This file is autogenerated and should not be edited by hand.
from apitools.base.protorpclite import messages as _messages
from apitools.ba... | 41.713253 | 94 | 0.746187 |
91dded88f8ad4eb54a748862078abd0936832eef | 1,910 | py | Python | main.py | seventwentyseven/guweb | cf65fa8b772db9d71f1edf3352cda408bb2fb8c8 | [
"MIT"
] | null | null | null | main.py | seventwentyseven/guweb | cf65fa8b772db9d71f1edf3352cda408bb2fb8c8 | [
"MIT"
] | null | null | null | main.py | seventwentyseven/guweb | cf65fa8b772db9d71f1edf3352cda408bb2fb8c8 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3.9
# -*- coding: utf-8 -*-
__all__ = ()
import os
import aiohttp
import orjson
from quart import Quart
from quart import render_template
from cmyui.logging import Ansi
from cmyui.logging import log
from cmyui.mysql import AsyncSQLPool
from cmyui.version import Version
from objects import glob... | 23.580247 | 66 | 0.757068 |
91ddf124181c2ab27b53a24a1afb3157f5da3898 | 352 | py | Python | utility/cog/combat_system/attribute/move.py | DrLarck/DiscordBallZ_ | c274e26efce4c5a757d258c54bc285d118618751 | [
"MIT"
] | 4 | 2020-01-19T13:53:43.000Z | 2020-01-20T13:34:17.000Z | utility/cog/combat_system/attribute/move.py | DrLarck/DiscordBallZ_ | c274e26efce4c5a757d258c54bc285d118618751 | [
"MIT"
] | 18 | 2020-01-19T17:52:17.000Z | 2020-02-17T15:06:13.000Z | utility/cog/combat_system/attribute/move.py | DrLarck/DiscordBallZ_ | c274e26efce4c5a757d258c54bc285d118618751 | [
"MIT"
] | 1 | 2020-01-19T16:33:19.000Z | 2020-01-19T16:33:19.000Z | """
Player move object
--
Author : DrLarck
Last update : 08/02/20 (DrLarck)
"""
class Move():
"""
Stores the player's move
- Attribute
`index` (`int`) : The player's move index
`target` (`Character()`) : `None` - The player move's target
"""
def __init__(self):
self.inde... | 14.666667 | 64 | 0.553977 |
91de182bcea26a82573da771a5b10a663d50d89b | 226 | py | Python | python/series/series.py | harshcurious/Exercism | 7cf05550ed242fe8ef942c8727ad28cc592e2e1e | [
"MIT"
] | null | null | null | python/series/series.py | harshcurious/Exercism | 7cf05550ed242fe8ef942c8727ad28cc592e2e1e | [
"MIT"
] | null | null | null | python/series/series.py | harshcurious/Exercism | 7cf05550ed242fe8ef942c8727ad28cc592e2e1e | [
"MIT"
] | null | null | null | def slices(series, length):
if length > len(series) or length <= 0:
raise ValueError(series, length)
sub = []
for i in range(len(series) - length + 1):
sub.append(series[i:i+length])
return sub
| 28.25 | 45 | 0.60177 |
91de3b5347e9fa9610ce3187bc840d45632d0334 | 239 | py | Python | python/covid_web/covid_web/wsgi.py | lukipuki/COVID-19-simulation | 5532a84f7af99223816dbeea9e9a2c359b0f569f | [
"Unlicense"
] | 3 | 2020-04-03T16:43:21.000Z | 2020-05-20T20:44:49.000Z | python/covid_web/covid_web/wsgi.py | lukipuki/COVID-19-simulation | 5532a84f7af99223816dbeea9e9a2c359b0f569f | [
"Unlicense"
] | 66 | 2020-04-11T19:40:53.000Z | 2020-11-21T14:11:55.000Z | python/covid_web/covid_web/wsgi.py | lukipuki/COVID-19-simulation | 5532a84f7af99223816dbeea9e9a2c359b0f569f | [
"Unlicense"
] | 1 | 2020-04-14T15:04:51.000Z | 2020-04-14T15:04:51.000Z | from os import getenv
from pathlib import Path
from .server import setup_server
data_path = Path(getenv(key="DATA_PATH", default="data"))
app = setup_server(data_path, data_path / "predictions")
if __name__ == "__main__":
app.run()
| 21.727273 | 57 | 0.740586 |
91de4a90053557c3e542b08b34539170546df3bb | 9,964 | py | Python | test/client/test_write_memory_by_address.py | autopi-io/py-udsoncan | 2351ee02bf4a70e5661d6fd5f48f58db740f244e | [
"MIT"
] | 1 | 2021-03-21T12:18:23.000Z | 2021-03-21T12:18:23.000Z | test/client/test_write_memory_by_address.py | autopi-io/py-udsoncan | 2351ee02bf4a70e5661d6fd5f48f58db740f244e | [
"MIT"
] | null | null | null | test/client/test_write_memory_by_address.py | autopi-io/py-udsoncan | 2351ee02bf4a70e5661d6fd5f48f58db740f244e | [
"MIT"
] | null | null | null | from __future__ import with_statement
from __future__ import absolute_import
from test.ClientServerTest import ClientServerTest
from udsoncan import MemoryLocation, AddressAndLengthFormatIdentifier
from udsoncan.exceptions import *
# Note :
# MemoryLocation object is unit tested in a separate file (test_helper_class)... | 51.895833 | 184 | 0.742573 |
91de4cc37de9385a7faace8835f1dbd99fc7dce0 | 4,762 | py | Python | alipay/aop/api/domain/AlipayUserCertifyVerificationQueryModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/AlipayUserCertifyVerificationQueryModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/AlipayUserCertifyVerificationQueryModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class AlipayUserCertifyVerificationQueryModel(object):
def __init__(self):
self._age = None
self._cert_name = None
self._cert_no = None
self._cert_type = None
se... | 29.57764 | 87 | 0.574549 |
91de4f9bc84ca6dc202a26d3708ec820cc863633 | 3,598 | py | Python | src/protos/heartbeat_pb2.py | fengjixuchui/clusterfuzz | ef89be3934936d1086b4a21bffca5506c8cb93be | [
"Apache-2.0"
] | 3 | 2020-12-30T07:00:55.000Z | 2021-03-16T10:55:05.000Z | src/protos/heartbeat_pb2.py | fengjixuchui/clusterfuzz | ef89be3934936d1086b4a21bffca5506c8cb93be | [
"Apache-2.0"
] | 1 | 2019-06-07T21:29:28.000Z | 2019-06-07T21:29:28.000Z | src/protos/heartbeat_pb2.py | fengjixuchui/clusterfuzz | ef89be3934936d1086b4a21bffca5506c8cb93be | [
"Apache-2.0"
] | 1 | 2020-04-25T16:37:10.000Z | 2020-04-25T16:37:10.000Z | # Copyright 2019 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, ... | 26.850746 | 229 | 0.769316 |
91de50a4f3437c9bfb5242929d08d49b06abd77e | 292 | py | Python | Hydro/device/urls.py | p-v-o-s/hydro | 34eaf227043c69b921650aa120516533d61c6854 | [
"BSD-3-Clause"
] | null | null | null | Hydro/device/urls.py | p-v-o-s/hydro | 34eaf227043c69b921650aa120516533d61c6854 | [
"BSD-3-Clause"
] | null | null | null | Hydro/device/urls.py | p-v-o-s/hydro | 34eaf227043c69b921650aa120516533d61c6854 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import unicode_literals
from django.conf.urls import url
from .views import DeviceDetailView, DeviceListView
urlpatterns = [
url(r'^$', DeviceListView.as_view(), name="list"),
url(r'^device/(?P<token>[A-Za-z0-9-]+)$', DeviceDetailView.as_view(), name="detail")
]
| 22.461538 | 88 | 0.708904 |
91de5e12b739d4ed1acf7de3f4c2924c8c80fb1c | 113 | py | Python | tools/array_viewer_test.py | yjy941124/PPR-FCN | 1eba5515b37e7b32413efdf14bb0c22a2e46fee9 | [
"MIT"
] | 20 | 2017-10-16T18:12:51.000Z | 2021-12-23T02:34:20.000Z | tools/array_viewer_test.py | yjy941124/PPR-FCN | 1eba5515b37e7b32413efdf14bb0c22a2e46fee9 | [
"MIT"
] | 1 | 2018-11-10T04:59:48.000Z | 2021-01-21T04:51:31.000Z | tools/array_viewer_test.py | yjy941124/PPR-FCN | 1eba5515b37e7b32413efdf14bb0c22a2e46fee9 | [
"MIT"
] | 5 | 2017-10-17T00:54:42.000Z | 2018-04-08T15:09:40.000Z | import numpy as np
import cv2
arr = np.zeros((10,10))+2
im = cv2.imread('/home/zawlin/data/indoor.jpg')
print arr | 22.6 | 47 | 0.716814 |
91de730fe97a5ec4b71bd5bbd065a5b0ffa1faff | 82,105 | py | Python | premade_modules/2.79/2.79b/bpy/ops/wm.py | echantry/fake-bpy-module | 004cdf198841e639b7d9a4c4db95ca1c0d3aa2c7 | [
"MIT"
] | null | null | null | premade_modules/2.79/2.79b/bpy/ops/wm.py | echantry/fake-bpy-module | 004cdf198841e639b7d9a4c4db95ca1c0d3aa2c7 | [
"MIT"
] | null | null | null | premade_modules/2.79/2.79b/bpy/ops/wm.py | echantry/fake-bpy-module | 004cdf198841e639b7d9a4c4db95ca1c0d3aa2c7 | [
"MIT"
] | null | null | null | def addon_disable(module=""):
'''Disable an add-on
:param module: Module, Module name of the add-on to disable
:type module: string, (optional, never None)
'''
pass
def addon_enable(module=""):
'''Enable an add-on
:param module: Module, Module name of the add-on to enable
:type ... | 40.247549 | 582 | 0.670763 |
91de8943a7368687fe1dbc7dd2e0042a2b903bf4 | 2,608 | py | Python | homeassistant/components/fibaro/cover.py | stravinci/AIS-home-assistant | ead4dafd3f801ebeb32860bd34443ed24a4f4167 | [
"Apache-2.0"
] | 5 | 2020-01-21T16:06:49.000Z | 2021-12-20T11:54:20.000Z | homeassistant/components/fibaro/cover.py | stravinci/AIS-home-assistant | ead4dafd3f801ebeb32860bd34443ed24a4f4167 | [
"Apache-2.0"
] | 68 | 2018-10-04T16:01:20.000Z | 2022-03-31T06:21:46.000Z | homeassistant/components/fibaro/cover.py | stravinci/AIS-home-assistant | ead4dafd3f801ebeb32860bd34443ed24a4f4167 | [
"Apache-2.0"
] | 7 | 2018-10-04T10:12:45.000Z | 2021-12-29T20:55:40.000Z | """Support for Fibaro cover - curtains, rollershutters etc."""
from homeassistant.components.cover import (
ATTR_POSITION,
ATTR_TILT_POSITION,
DOMAIN,
CoverEntity,
)
from . import FIBARO_DEVICES, FibaroDevice
# Ais dom
async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up... | 27.744681 | 84 | 0.628834 |
91deb1d284f54450987e28f996fbaac9080284b6 | 2,744 | py | Python | src/mesosim/lsr.py | MesoSim/mesosim-common | d6cda648ce7203820314f6bb7e763938be8bbd28 | [
"Apache-2.0"
] | 1 | 2020-03-01T05:08:19.000Z | 2020-03-01T05:08:19.000Z | src/mesosim/lsr.py | MesoSim/mesosim-common | d6cda648ce7203820314f6bb7e763938be8bbd28 | [
"Apache-2.0"
] | null | null | null | src/mesosim/lsr.py | MesoSim/mesosim-common | d6cda648ce7203820314f6bb7e763938be8bbd28 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2020 MesoSim Developers.
# Distributed under the terms of the Apache 2.0 License.
# SPDX-License-Identifier: Apache-2.0
"""
LSR-specific helper functions
...
"""
import textwrap
from math import floor
# Imports
import pytz
from dateutil import parser
from .core.timing import cur_time_from_arc
# Go... | 26.640777 | 86 | 0.571793 |
91df1e1cb5efd17afa7b39895af02826a564f76a | 7,996 | py | Python | metrics.py | peterwilliams97/ToneRanger | 61ab8b5a96bbf3f82b8e6a07e470831189afff8c | [
"MIT"
] | null | null | null | metrics.py | peterwilliams97/ToneRanger | 61ab8b5a96bbf3f82b8e6a07e470831189afff8c | [
"MIT"
] | null | null | null | metrics.py | peterwilliams97/ToneRanger | 61ab8b5a96bbf3f82b8e6a07e470831189afff8c | [
"MIT"
] | null | null | null | """
Compute some metrics
Sentences / paragraph
Words / paragrah
Characters / paragraph
Words / sentence
Characters / sentence
Characters / word
Word counts
"""
from glob import glob
from os.path import join
import spacy
from spacy.symbols import SPACE, PUNCT, NUM, SYM
from utils import ... | 32.11245 | 103 | 0.587919 |
91df1eeac89896eeb2cdb017a4d3d4c18dcbad53 | 283 | py | Python | eqd/eqd/pipelines.py | PythonIsMagic/scrape_mlp | bc7f9af57439477a4b959cc1e796837a7ff0d5ea | [
"MIT"
] | 1 | 2018-01-05T04:30:01.000Z | 2018-01-05T04:30:01.000Z | eqd/eqd/pipelines.py | PythonIsMagic/scrape_mlp | bc7f9af57439477a4b959cc1e796837a7ff0d5ea | [
"MIT"
] | null | null | null | eqd/eqd/pipelines.py | PythonIsMagic/scrape_mlp | bc7f9af57439477a4b959cc1e796837a7ff0d5ea | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html
class EqdPipeline(object):
def process_item(self, item, spider):
return item
| 23.583333 | 65 | 0.706714 |
91df68c3abf3280a799b2ddc6b6f96edafc70698 | 1,125 | bzl | Python | dependency_support/org_pcre_ftp/org_pcre_ftp.bzl | kammoh/bazel_rules_hdl | 17dfb5cea5ab58460f5ca55244f3afd0724a8a3a | [
"Apache-2.0"
] | 41 | 2020-12-05T21:46:35.000Z | 2022-03-24T22:22:48.000Z | dependency_support/org_pcre_ftp/org_pcre_ftp.bzl | kammoh/bazel_rules_hdl | 17dfb5cea5ab58460f5ca55244f3afd0724a8a3a | [
"Apache-2.0"
] | 63 | 2020-12-05T22:23:36.000Z | 2022-03-28T04:56:10.000Z | dependency_support/org_pcre_ftp/org_pcre_ftp.bzl | kammoh/bazel_rules_hdl | 17dfb5cea5ab58460f5ca55244f3afd0724a8a3a | [
"Apache-2.0"
] | 13 | 2020-12-15T10:11:39.000Z | 2022-03-27T20:17:10.000Z | # Copyright 2021 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, ... | 36.290323 | 84 | 0.705778 |
91df75db28692d2c2667fb15f2ee120b6d07c660 | 7,432 | py | Python | chapter4/yolov3_ascend/src/initializer.py | hu-qi/mindspore-21-days-tutorials | a9d3a024a0b17e48ae758de66195923b14f8ea6c | [
"Apache-2.0"
] | 1 | 2021-01-10T08:29:42.000Z | 2021-01-10T08:29:42.000Z | chapter4/yolov3_ascend/src/initializer.py | hu-qi/mindspore-21-days-tutorials | a9d3a024a0b17e48ae758de66195923b14f8ea6c | [
"Apache-2.0"
] | null | null | null | chapter4/yolov3_ascend/src/initializer.py | hu-qi/mindspore-21-days-tutorials | a9d3a024a0b17e48ae758de66195923b14f8ea6c | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 41.288889 | 117 | 0.604144 |
91dfa5e2a0567e7736249280379f277fe11ab03e | 1,639 | py | Python | iris_sdk/client.py | NumberAI/python-bandwidth-iris | 0e05f79d68b244812afb97e00fd65b3f46d00aa3 | [
"MIT"
] | 2 | 2020-04-13T13:47:59.000Z | 2022-02-23T20:32:41.000Z | iris_sdk/client.py | bandwidthcom/python-bandwidth-iris | dbcb30569631395041b92917252d913166f7d3c9 | [
"MIT"
] | 5 | 2020-09-18T20:59:24.000Z | 2021-08-25T16:51:42.000Z | iris_sdk/client.py | bandwidthcom/python-bandwidth-iris | dbcb30569631395041b92917252d913166f7d3c9 | [
"MIT"
] | 5 | 2018-12-12T14:39:50.000Z | 2020-11-17T21:42:29.000Z | #!/usr/bin/env python
from iris_sdk.utils.config import Config
from iris_sdk.utils.rest import RestClient
class Client(object):
"""HTTP requests"""
@property
def config(self):
return self._config
def __init__(
self, url=None, account_id=None, username=None, password=None,
... | 30.351852 | 78 | 0.608298 |
91dfa9362e95d5541e84b4a0fedb92e20e2f276e | 3,259 | py | Python | abrupt/spider.py | securusglobal/abrupt | f4e46ca28eabc5c3b61bbc674c792b438621477b | [
"BSD-3-Clause"
] | 3 | 2015-03-07T17:04:46.000Z | 2017-08-15T00:26:45.000Z | abrupt/spider.py | securusglobal/abrupt | f4e46ca28eabc5c3b61bbc674c792b438621477b | [
"BSD-3-Clause"
] | null | null | null | abrupt/spider.py | securusglobal/abrupt | f4e46ca28eabc5c3b61bbc674c792b438621477b | [
"BSD-3-Clause"
] | null | null | null | import re
import urlparse
from collections import deque
from abrupt.http import Request, RequestSet
from abrupt.utils import e, clear_line
from abrupt.color import *
try:
import lxml.html
import lxml.etree
has_lxml = True
except ImportError:
has_lxml = False
def _follow_redirect(r):
if r.response and r.res... | 29.098214 | 98 | 0.604173 |
91dfb8e6051db427042ea961a4040757744acc33 | 3,440 | py | Python | institution.py | Spider2themax/math_model_of_trust | 3aa1a03e31df2a4e0464b251a4de1280832b28d8 | [
"MIT"
] | null | null | null | institution.py | Spider2themax/math_model_of_trust | 3aa1a03e31df2a4e0464b251a4de1280832b28d8 | [
"MIT"
] | null | null | null | institution.py | Spider2themax/math_model_of_trust | 3aa1a03e31df2a4e0464b251a4de1280832b28d8 | [
"MIT"
] | null | null | null | # Copyright MaxAndMitchCorp 2020
# Create a class to model the institution. It should have a party composition
# attribute, a method to randomly generate a law to pass (normal distribution)
# and have its party composition update based off of the affiliations of the
# society.
import numpy as np
import random
import ... | 40.470588 | 125 | 0.671221 |
91dfc0478ae4c6e953338ae84d540d3a3389416b | 114,544 | py | Python | lib/matplotlib/axes/_base.py | yuvallanger/matplotlib | e0020d318a9a9685594c6bff4631f74599321459 | [
"MIT",
"BSD-3-Clause"
] | 8 | 2017-04-11T08:55:30.000Z | 2022-03-25T04:31:26.000Z | lib/matplotlib/axes/_base.py | epgauss/matplotlib | c9898ea9a30c67c579ab27cd61b68e2abae0fb0e | [
"MIT",
"BSD-3-Clause"
] | null | null | null | lib/matplotlib/axes/_base.py | epgauss/matplotlib | c9898ea9a30c67c579ab27cd61b68e2abae0fb0e | [
"MIT",
"BSD-3-Clause"
] | 14 | 2015-10-05T04:15:46.000Z | 2020-06-11T18:06:02.000Z | from __future__ import (absolute_import, division, print_function,
unicode_literals)
import six
from six.moves import xrange
import itertools
import warnings
import math
from operator import itemgetter
import numpy as np
from numpy import ma
import matplotlib
rcParams = matplotlib.rcParams
... | 34.366637 | 79 | 0.552059 |
91dfcd8913978f5b97f12832d44e5e6bdd4f3179 | 733 | py | Python | pydefect/util/logger.py | wangvei/pydefect | e909796c429e16982cefe549d16881039bce89e7 | [
"MIT"
] | 1 | 2021-06-07T03:05:39.000Z | 2021-06-07T03:05:39.000Z | pydefect/util/logger.py | wangvei/pydefect | e909796c429e16982cefe549d16881039bce89e7 | [
"MIT"
] | null | null | null | pydefect/util/logger.py | wangvei/pydefect | e909796c429e16982cefe549d16881039bce89e7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import logging
import sys
__author__ = "Yu Kumagai"
__maintainer__ = "Yu Kumagai"
def get_logger(name: str,
level=logging.DEBUG,
stream=sys.stdout,
log_format: str = None,
log_filename: str = None):
log_format= log_format or '%(... | 24.433333 | 78 | 0.639836 |
91dfed008e8c81cd8b6a50ad037677a41809c854 | 13,358 | py | Python | tests/test_packages/test_connections/test_http_client/test_http_client.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | null | null | null | tests/test_packages/test_connections/test_http_client/test_http_client.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | null | null | null | tests/test_packages/test_connections/test_http_client/test_http_client.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# ------------------------------------------------------------------------------
#
# Copyright 2022 Valory AG
# Copyright 2018-2021 Fetch.AI Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# ... | 37.312849 | 120 | 0.65399 |
91dff21de55d0c3bf393c3e27ed7ac00029368ad | 15,672 | py | Python | src/seq_game.py | kikatuso/Master-Thesis | 08ae1f1c68e103aedcf108f87eaed72204f7600d | [
"MIT"
] | null | null | null | src/seq_game.py | kikatuso/Master-Thesis | 08ae1f1c68e103aedcf108f87eaed72204f7600d | [
"MIT"
] | null | null | null | src/seq_game.py | kikatuso/Master-Thesis | 08ae1f1c68e103aedcf108f87eaed72204f7600d | [
"MIT"
] | null | null | null | import networkx as nx
import numpy as np
import math
from tqdm import tqdm
import numba
from numba.experimental import jitclass
from numba import jit
steadyspec = [
('adj_matrix',numba.float64[:,:]),
('graph_size',numba.int32),
('background_field',numba.float64[:]),
('fixed_point_iter',numba.int32)... | 31.095238 | 135 | 0.613451 |
91e00f46098bc6e2c798275c7621461ffd949d3d | 1,744 | py | Python | app/core/test/test_admin.py | naokiyama/django-app-api | c8cb363834cd11720e97b7e7c0dc607069afc909 | [
"MIT"
] | null | null | null | app/core/test/test_admin.py | naokiyama/django-app-api | c8cb363834cd11720e97b7e7c0dc607069afc909 | [
"MIT"
] | null | null | null | app/core/test/test_admin.py | naokiyama/django-app-api | c8cb363834cd11720e97b7e7c0dc607069afc909 | [
"MIT"
] | null | null | null | from django.test import TestCase, Client
from django.contrib.auth import get_user_model
from django.urls import reverse
class UserAdminModelTests(TestCase):
def setUp(self):
self.client = Client()
first_name = 'test'
last_name = 'test'
username = 'test'
phone_number = '1... | 29.066667 | 68 | 0.624427 |
91e024c5b5a1ef8c63e3f57819fcd50d58cb59a7 | 2,286 | py | Python | examples/utils/usbkeyboard.py | axelsimon/displayotron | 42315c47eb50d2f95d1fcade389ff57ad73e1b83 | [
"MIT"
] | 49 | 2017-06-07T05:09:23.000Z | 2021-10-08T14:32:05.000Z | examples/utils/usbkeyboard.py | axelsimon/displayotron | 42315c47eb50d2f95d1fcade389ff57ad73e1b83 | [
"MIT"
] | 19 | 2017-08-07T21:17:00.000Z | 2022-01-07T09:02:42.000Z | examples/utils/usbkeyboard.py | axelsimon/displayotron | 42315c47eb50d2f95d1fcade389ff57ad73e1b83 | [
"MIT"
] | 22 | 2017-06-07T05:09:25.000Z | 2021-08-17T10:52:58.000Z | import threading
from sys import exit
try:
import usb.core
import usb.util
except ImportError:
exit("This script requires the pyusb module\nInstall with: sudo pip install pyusb")
class StoppableThread(threading.Thread):
"""Basic stoppable thread wrapper
Adds Event for stopping the execution loop ... | 23.090909 | 120 | 0.639108 |
91e02b21c43b4cd31743a520a0f9119f066cd8fa | 1,140 | py | Python | benchmarks/benchmark_density_GaussianDensity.py | pbuslaev/freud | ed83bdc63ee8fddba78f070ce9ddf2a0021d67b8 | [
"BSD-3-Clause"
] | null | null | null | benchmarks/benchmark_density_GaussianDensity.py | pbuslaev/freud | ed83bdc63ee8fddba78f070ce9ddf2a0021d67b8 | [
"BSD-3-Clause"
] | null | null | null | benchmarks/benchmark_density_GaussianDensity.py | pbuslaev/freud | ed83bdc63ee8fddba78f070ce9ddf2a0021d67b8 | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
import freud
from benchmark import Benchmark
from benchmarker import run_benchmarks
class BenchmarkDensityGaussianDensity(Benchmark):
def __init__(self, width, r_max, sigma):
self.width = width
self.r_max = r_max
self.sigma = sigma
def bench_setup(self, N):
... | 27.142857 | 74 | 0.611404 |
91e03dfb70a4b50d963dca4157f6bad50df20383 | 1,945 | py | Python | Week 1 - Python Basics/submission.py | lvolkmann/CS-490-Deep-Learning | 48e637e6892d2e87999ed87b994be659cb30f1e2 | [
"MIT"
] | null | null | null | Week 1 - Python Basics/submission.py | lvolkmann/CS-490-Deep-Learning | 48e637e6892d2e87999ed87b994be659cb30f1e2 | [
"MIT"
] | null | null | null | Week 1 - Python Basics/submission.py | lvolkmann/CS-490-Deep-Learning | 48e637e6892d2e87999ed87b994be659cb30f1e2 | [
"MIT"
] | null | null | null | # @author Landon Volkmann
# Question 1
"""
The most notable differences between Python 2 and Python 3 include:
1. Small syntactical differences (eg print "hello" v print("hello")
2. Supported libraries
3. Community support
4. Python 2 is ASCII where 3 is Unicode
5. In Python ... | 22.356322 | 97 | 0.645244 |
91e04e92219e967bcd53826d60e4ad7c46f0d929 | 555 | py | Python | source/api/models/base.py | thearchitector/When2Meet2 | bca33501171ff30a65eec715493679770e17bb48 | [
"BSD-3-Clause"
] | 4 | 2019-04-15T01:17:56.000Z | 2019-06-25T19:45:30.000Z | source/api/models/base.py | thearchitector/When2Meet2 | bca33501171ff30a65eec715493679770e17bb48 | [
"BSD-3-Clause"
] | null | null | null | source/api/models/base.py | thearchitector/When2Meet2 | bca33501171ff30a65eec715493679770e17bb48 | [
"BSD-3-Clause"
] | null | null | null | """
Defines a simple base model to be used by all db models. A Meta inner class is
defined at runtime to hold a reference variable to the configured database.
@author: Elias Gabriel
@revision: v1.0
"""
from peewee import Model
from playhouse.pool import PooledMySQLDatabase
class BaseModel(Model):
"""
A base ... | 25.227273 | 78 | 0.724324 |
91e0549d3e1e10dabd75c78d2dda78c1a64e7330 | 4,866 | py | Python | dashboard/src/perf_tests.py | cnulenka/fabric8-analytics-common | 570bfa69d885543944f90decc23397f546385f69 | [
"Apache-2.0"
] | null | null | null | dashboard/src/perf_tests.py | cnulenka/fabric8-analytics-common | 570bfa69d885543944f90decc23397f546385f69 | [
"Apache-2.0"
] | null | null | null | dashboard/src/perf_tests.py | cnulenka/fabric8-analytics-common | 570bfa69d885543944f90decc23397f546385f69 | [
"Apache-2.0"
] | null | null | null | """Module with class that handle performance test results and compute statistic."""
import csv
class PerfTests:
"""Class that handle performance test results."""
INPUT_FILES = {
"component analysis": {
"sequenced_calls_known_component":
"component_analysis_sequenced_calls_... | 35.26087 | 98 | 0.590834 |
91e0ab95b70f1dcf576bbbca85d88342ac13ff66 | 3,985 | py | Python | eggNOGblast.py | tatumdmortimer/core-genome-alignment | d60799b2b6a47d9b983d332b2de814b991607886 | [
"MIT"
] | 18 | 2015-05-28T15:48:05.000Z | 2021-03-04T04:24:16.000Z | eggNOGblast.py | tatumdmortimer/core-genome-alignment | d60799b2b6a47d9b983d332b2de814b991607886 | [
"MIT"
] | null | null | null | eggNOGblast.py | tatumdmortimer/core-genome-alignment | d60799b2b6a47d9b983d332b2de814b991607886 | [
"MIT"
] | 3 | 2017-12-07T08:39:01.000Z | 2020-11-25T09:40:07.000Z | #!/usr/bin/env python
import sys
import os
import getopt
from Bio.Blast.Applications import NcbiblastxCommandline
from Bio.Blast import NCBIXML
# This script takes a file with fasta genes and uses NCBI BLAST+ to look for
# matches in the eggNOG BLAST database. It also uses eggNOG to assign functional
# categories to ... | 35.265487 | 80 | 0.609787 |
91e0d83be068ea54cdc5cc4c6856636307965f16 | 1,614 | py | Python | 6.extract_entities/twitterNLP/twitter_nlp_clone/python/twokenize_wrapper.py | esh-b/Resources-for-Twitter-related-projects | 28f2b54b47b76fdb5d4804692c13bccfef1805a0 | [
"BSD-3-Clause"
] | 2 | 2019-12-10T21:54:48.000Z | 2020-06-30T20:37:57.000Z | 6.extract_entities/twitterNLP/twitter_nlp_clone/python/twokenize_wrapper.py | esh-b/Resources-for-Twitter-related-projects | 28f2b54b47b76fdb5d4804692c13bccfef1805a0 | [
"BSD-3-Clause"
] | null | null | null | 6.extract_entities/twitterNLP/twitter_nlp_clone/python/twokenize_wrapper.py | esh-b/Resources-for-Twitter-related-projects | 28f2b54b47b76fdb5d4804692c13bccfef1805a0 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
###############################################################################
# Tokinizes strings using the 'twokenize' module, but also splits up
# contractions, which 'twokenize' fails to do.
#
###############################################################################
import sys
import t... | 31.647059 | 79 | 0.486369 |
91e1181a1fdad4e9ccf180ffc7e8a14437659596 | 8,169 | py | Python | experiments/es_helper.py | miqwit/claraprint | c2045a74ad2989fcc087305573b9620797d71633 | [
"MIT"
] | 3 | 2020-11-07T14:55:09.000Z | 2020-11-09T02:22:18.000Z | experiments/es_helper.py | miqwit/claraprint | c2045a74ad2989fcc087305573b9620797d71633 | [
"MIT"
] | 1 | 2021-04-12T10:44:23.000Z | 2021-04-22T16:27:38.000Z | experiments/es_helper.py | miqwit/claraprint | c2045a74ad2989fcc087305573b9620797d71633 | [
"MIT"
] | null | null | null | """
This file contains ES (elasticseach) functions that can be reused in multiple ES based experiments.
Each experiment can override one of these methods for its particular need
"""
from elasticsearch import Elasticsearch
from utils_experiments import get_all_fingerprints
from utils import fingerprints_to_words
from c... | 34.179916 | 128 | 0.570694 |
91e13a973b5fb1cef25ddbaf199b126768b34db4 | 1,583 | py | Python | PythonNetCode/chapter3/3_7_detect_inactive_machines.py | AirChen/PythonPractic | 676708237dc502ea9a60218a3ca134874bd18456 | [
"MIT"
] | null | null | null | PythonNetCode/chapter3/3_7_detect_inactive_machines.py | AirChen/PythonPractic | 676708237dc502ea9a60218a3ca134874bd18456 | [
"MIT"
] | null | null | null | PythonNetCode/chapter3/3_7_detect_inactive_machines.py | AirChen/PythonPractic | 676708237dc502ea9a60218a3ca134874bd18456 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# Python Network Programming Cookbook -- Chapter - 3
# This program is optimized for Python 2.7.
# It may run on any other version with/without modifications.
# Requires scapy-2.2.0 or higher
# Visit: http://www.secdev.org/projects/scapy/files/scapy-latest.zip
import argparse
import time
import ... | 30.442308 | 89 | 0.676563 |
91e13d25c937f1a15902ed5d12304780430e12a4 | 1,610 | py | Python | stats_test.py | martincochran/score-minion | 58197798a0a3a4fbcd54ffa0a2fab2e865985bfd | [
"Apache-2.0"
] | null | null | null | stats_test.py | martincochran/score-minion | 58197798a0a3a4fbcd54ffa0a2fab2e865985bfd | [
"Apache-2.0"
] | 3 | 2015-02-15T18:31:10.000Z | 2015-02-22T19:56:05.000Z | stats_test.py | martincochran/score-minion | 58197798a0a3a4fbcd54ffa0a2fab2e865985bfd | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#
# Copyright 2014 Martin Cochran
#
# 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... | 31.568627 | 74 | 0.745963 |
91e15e4924fc7e299eb8ee91373853512ca56ac6 | 1,411 | py | Python | alipay/aop/api/response/AlipayDataPrinterTaskSubmitResponse.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/response/AlipayDataPrinterTaskSubmitResponse.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/response/AlipayDataPrinterTaskSubmitResponse.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.response.AlipayResponse import AlipayResponse
class AlipayDataPrinterTaskSubmitResponse(AlipayResponse):
def __init__(self):
super(AlipayDataPrinterTaskSubmitResponse, self).__init__()
self._code = None
self._d... | 25.196429 | 108 | 0.627923 |
91e16289075d291e059bc95724122bd659e89dca | 2,008 | py | Python | setup.py | cbwang2016/quimb | 633ae4117e6fc5518f9b1bc07a0ae734f058072c | [
"Apache-2.0"
] | null | null | null | setup.py | cbwang2016/quimb | 633ae4117e6fc5518f9b1bc07a0ae734f058072c | [
"Apache-2.0"
] | null | null | null | setup.py | cbwang2016/quimb | 633ae4117e6fc5518f9b1bc07a0ae734f058072c | [
"Apache-2.0"
] | null | null | null | from setuptools import setup, find_packages
import versioneer
def readme():
with open('README.rst') as f:
import re
long_desc = f.read()
# strip out the raw html images
long_desc = re.sub(r'\.\. raw::[\S\s]*?>\n\n', "", long_desc)
return long_desc
setup(
name='quimb',... | 26.773333 | 69 | 0.501992 |
91e1658399982c7cfe024748f69a49eb9c7d174a | 733 | py | Python | alipay/aop/api/response/AlipayPayAppCarSignResponse.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/response/AlipayPayAppCarSignResponse.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/response/AlipayPayAppCarSignResponse.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.response.AlipayResponse import AlipayResponse
class AlipayPayAppCarSignResponse(AlipayResponse):
def __init__(self):
super(AlipayPayAppCarSignResponse, self).__init__()
self._context_token = None
@property
def... | 28.192308 | 100 | 0.721692 |
91e16c464a27dd7f8605c8a8caa147354392d7de | 5,416 | py | Python | jaxfg/sparse/_linear_solve.py | AvanDavad/jaxfg | 6d1559126ba872b452eca6a13c2688349f1c5f7e | [
"MIT"
] | 120 | 2020-11-28T19:43:31.000Z | 2022-03-29T02:35:46.000Z | jaxfg/sparse/_linear_solve.py | AvanDavad/jaxfg | 6d1559126ba872b452eca6a13c2688349f1c5f7e | [
"MIT"
] | 12 | 2021-05-24T09:02:12.000Z | 2022-03-30T19:51:40.000Z | jaxfg/sparse/_linear_solve.py | AvanDavad/jaxfg | 6d1559126ba872b452eca6a13c2688349f1c5f7e | [
"MIT"
] | 9 | 2021-05-06T15:31:23.000Z | 2022-03-23T12:06:44.000Z | import abc
from typing import Dict, Hashable, NamedTuple
import jax
import jax.experimental.host_callback as hcb
import jax_dataclasses
import numpy as onp
import sksparse
from jax import numpy as jnp
from overrides import EnforceOverrides, overrides
from .. import hints
from ._sparse_matrix import SparseCooMatrix
... | 33.432099 | 96 | 0.677068 |
91e1960c4f03f07eeedc619c49e9e799e83d5937 | 40,642 | py | Python | pyscf/ci/cisd.py | mussard/pyscf | 6c78bd73740544dd9b6b7e82b7da6b385eab38ab | [
"Apache-2.0"
] | 2 | 2019-05-28T05:25:56.000Z | 2019-11-09T02:16:43.000Z | pyscf/ci/cisd.py | mussard/pyscf | 6c78bd73740544dd9b6b7e82b7da6b385eab38ab | [
"Apache-2.0"
] | null | null | null | pyscf/ci/cisd.py | mussard/pyscf | 6c78bd73740544dd9b6b7e82b7da6b385eab38ab | [
"Apache-2.0"
] | 1 | 2019-11-09T02:13:16.000Z | 2019-11-09T02:13:16.000Z | #!/usr/bin/env python
# Copyright 2014-2019 The PySCF Developers. 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
#
# U... | 37.806512 | 104 | 0.587766 |
91e1d6a491bdc1b3639cc84a4f0cace5a0b9d388 | 261 | py | Python | img_utils/utils.py | ikornaselur/img-utils | 7ea37c1b51b6746ca6a2fc07a1c685240393a81a | [
"MIT"
] | 1 | 2021-07-15T16:58:21.000Z | 2021-07-15T16:58:21.000Z | img_utils/utils.py | ikornaselur/img-utils | 7ea37c1b51b6746ca6a2fc07a1c685240393a81a | [
"MIT"
] | 4 | 2019-09-02T20:09:47.000Z | 2021-03-22T13:58:05.000Z | img_utils/utils.py | ikornaselur/img-utils | 7ea37c1b51b6746ca6a2fc07a1c685240393a81a | [
"MIT"
] | null | null | null | def clamp(lower: int, value: int, upper: int) -> int:
""" Clamp a value between (inclusive) lower and upper """
return min(max(value, lower), upper)
def u8(value: int) -> int:
""" Clamp value to the range 0-255 """
return clamp(0, value, 255)
| 29 | 61 | 0.62069 |
91e1dcb918dd4366e602dbdc0b476d75cae55eb3 | 56 | py | Python | repos/spikeextractors/spikeextractors/extractors/rawrecordingextractor/__init__.py | tjd2002/spikeforest2 | 2e393564b858b2995aa2ccccd9bd73065681b5de | [
"Apache-2.0"
] | null | null | null | repos/spikeextractors/spikeextractors/extractors/rawrecordingextractor/__init__.py | tjd2002/spikeforest2 | 2e393564b858b2995aa2ccccd9bd73065681b5de | [
"Apache-2.0"
] | null | null | null | repos/spikeextractors/spikeextractors/extractors/rawrecordingextractor/__init__.py | tjd2002/spikeforest2 | 2e393564b858b2995aa2ccccd9bd73065681b5de | [
"Apache-2.0"
] | null | null | null | from .rawrecordingextractor import RawRecordingExtractor | 56 | 56 | 0.928571 |
91e1e28308d67bc31e85663b70fd98c12e25d58d | 6,600 | py | Python | imgfac/FilePersistentImageManager.py | henrysher/imgfac | e0979139a93b055f018f460b1404cc9b1796c838 | [
"Apache-2.0"
] | 1 | 2019-06-16T07:05:24.000Z | 2019-06-16T07:05:24.000Z | imgfac/FilePersistentImageManager.py | henrysher/imgfac | e0979139a93b055f018f460b1404cc9b1796c838 | [
"Apache-2.0"
] | null | null | null | imgfac/FilePersistentImageManager.py | henrysher/imgfac | e0979139a93b055f018f460b1404cc9b1796c838 | [
"Apache-2.0"
] | null | null | null | # encoding: utf-8
# Copyright 2012 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 34.375 | 145 | 0.606818 |
91e1ee9a67bd8206bf2e840e9a34d576625e4c7a | 11,744 | py | Python | deepsim/test/test_deepsim/sim_trackers/trackers/test_set_model_state_tracker.py | aws-deepracer/deepsim | cad2639f525c2f94ec5c03d8b855cc65b0b8ee55 | [
"Apache-2.0"
] | 1 | 2022-03-25T07:20:49.000Z | 2022-03-25T07:20:49.000Z | deepsim/test/test_deepsim/sim_trackers/trackers/test_set_model_state_tracker.py | aws-deepracer/deepsim | cad2639f525c2f94ec5c03d8b855cc65b0b8ee55 | [
"Apache-2.0"
] | null | null | null | deepsim/test/test_deepsim/sim_trackers/trackers/test_set_model_state_tracker.py | aws-deepracer/deepsim | cad2639f525c2f94ec5c03d8b855cc65b0b8ee55 | [
"Apache-2.0"
] | null | null | null | #################################################################################
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. #
# #
# Licensed under the Apache License, Version 2.0 (the "License"). ... | 50.839827 | 111 | 0.638283 |
91e1ff19d4f07270f39d1f4438b9287cc3db8136 | 336 | gyp | Python | cloud9_root/src/testing_targets/build/all_llvm-bak.gyp | DanielGuoVT/symsc | 95b705bd1f4d2863d79866c84fc7ee90aba743cb | [
"Apache-2.0"
] | 3 | 2019-02-12T04:14:39.000Z | 2020-11-05T08:46:20.000Z | cloud9_root/src/testing_targets/build/all_llvm-bak.gyp | DanielGuoVT/symsc | 95b705bd1f4d2863d79866c84fc7ee90aba743cb | [
"Apache-2.0"
] | null | null | null | cloud9_root/src/testing_targets/build/all_llvm-bak.gyp | DanielGuoVT/symsc | 95b705bd1f4d2863d79866c84fc7ee90aba743cb | [
"Apache-2.0"
] | null | null | null | #
# Cloud9 Parallel Symbolic Execution Engine
#
{
'targets': [
{
'target_name': 'AllTestingTargets',
'type': 'none',
'dependencies': [
'libcxx.gyp:*',
'../ots/ots-standalone.gyp:ot-sanitise',
'../examples/examples.gyp:*',
'../c9-tests/tests/tests.gyp:*',
]... | 17.684211 | 48 | 0.502976 |
91e20393ba55b60e55bd8259d98e7c465e5c73ec | 312 | py | Python | plugins/py_ncode.py | ItzSjDude/PikaBotPlugins | 6b468a43caefbea5b8f3cd2c1ca83790380e1f5b | [
"Apache-2.0"
] | 1 | 2020-10-29T15:44:57.000Z | 2020-10-29T15:44:57.000Z | plugins/py_ncode.py | ItzSjDude/PikaBotPlugins | 6b468a43caefbea5b8f3cd2c1ca83790380e1f5b | [
"Apache-2.0"
] | null | null | null | plugins/py_ncode.py | ItzSjDude/PikaBotPlugins | 6b468a43caefbea5b8f3cd2c1ca83790380e1f5b | [
"Apache-2.0"
] | 4 | 2020-10-28T09:02:35.000Z | 2020-12-27T22:45:57.000Z | """Beautifies nd convert python code into image
{i}ncode <reply to file for normal image>
{i}ncode doc <reply to file for document format>
"""
# created by @Buddhhu, Rebased by @ItzSjDude. All Rights Reserved
from . import _ncode
@ItzSjDude(pattern=r"ncode (.*)")
async def _(event):
await _ncode(event)
| 22.285714 | 65 | 0.721154 |
91e21802b15481986dd44a5ce67ce2d45682ce22 | 9,092 | py | Python | apysc/_display/graphics_expression.py | ynsnf/apysc | b10ffaf76ec6beb187477d0a744fca00e3efc3fb | [
"MIT"
] | 16 | 2021-04-16T02:01:29.000Z | 2022-01-01T08:53:49.000Z | apysc/_display/graphics_expression.py | ynsnf/apysc | b10ffaf76ec6beb187477d0a744fca00e3efc3fb | [
"MIT"
] | 613 | 2021-03-24T03:37:38.000Z | 2022-03-26T10:58:37.000Z | apysc/_display/graphics_expression.py | simon-ritchie/apyscript | c319f8ab2f1f5f7fad8d2a8b4fc06e7195476279 | [
"MIT"
] | 2 | 2021-06-20T07:32:58.000Z | 2021-12-26T08:22:11.000Z | """Graphics class related expression implementations.
"""
from apysc._display.graphics import Graphics
from apysc._display.graphics_base import GraphicsBase
def append_fill_expression(
*, graphics: Graphics, expression: str, indent_num: int) -> str:
"""
Append fill expression to specified e... | 30.716216 | 80 | 0.616146 |
91e22376342cc3aecf128a45fe3ff8ab20f57a11 | 5,062 | py | Python | act/original_demo.py | iganichev/scratch | e570f77abb855a21ec4ef893b5cfc97d331d0ce5 | [
"MIT"
] | null | null | null | act/original_demo.py | iganichev/scratch | e570f77abb855a21ec4ef893b5cfc97d331d0ce5 | [
"MIT"
] | null | null | null | act/original_demo.py | iganichev/scratch | e570f77abb855a21ec4ef893b5cfc97d331d0ce5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
""" Recurrent Neural Network.
A Recurrent Neural Network (LSTM) implementation example using TensorFlow library.
This example is using the MNIST database of handwritten digits (http://yann.lecun.com/exdb/mnist/)
Links:
[Long Short Term Memory](http://deeplearning.cs.cmu.edu/pdfs/Hochreiter9... | 36.157143 | 99 | 0.692019 |
91e2557b765dae92c5247763243dd8bc9e04f7ce | 1,223 | gyp | Python | base/third_party/libevent/libevent_nacl_nonsfi.gyp | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 27 | 2016-04-27T01:02:03.000Z | 2021-12-13T08:53:19.000Z | base/third_party/libevent/libevent_nacl_nonsfi.gyp | maidiHaitai/haitaibrowser | a232a56bcfb177913a14210e7733e0ea83a6b18d | [
"BSD-3-Clause"
] | 2 | 2017-03-09T09:00:50.000Z | 2017-09-21T15:48:20.000Z | base/third_party/libevent/libevent_nacl_nonsfi.gyp | maidiHaitai/haitaibrowser | a232a56bcfb177913a14210e7733e0ea83a6b18d | [
"BSD-3-Clause"
] | 17 | 2016-04-27T02:06:39.000Z | 2019-12-18T08:07:00.000Z | # Copyright 2014 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.
{
'includes': [
'../../../build/common_untrusted.gypi',
],
'conditions': [
['disable_nacl==0 and disable_nacl_untrusted==0', {
'targets':... | 25.479167 | 72 | 0.461161 |
91e27aeaaf4c95cc5653511fbf20ad9e257e1e05 | 134 | py | Python | rsh.py | sgriffith3/2021-08-30-PYNA | af9bfc595ef0dc2385d7a4751515050b9c6eb56f | [
"MIT"
] | null | null | null | rsh.py | sgriffith3/2021-08-30-PYNA | af9bfc595ef0dc2385d7a4751515050b9c6eb56f | [
"MIT"
] | null | null | null | rsh.py | sgriffith3/2021-08-30-PYNA | af9bfc595ef0dc2385d7a4751515050b9c6eb56f | [
"MIT"
] | null | null | null | import pyshark
def main():
cap = pyshark.FileCapture("pythoncapture.pcap")
for packet in cap:
print(packet)
main()
| 13.4 | 51 | 0.649254 |
91e297c84e82115990b7b6bdc87ae47b190055d0 | 6,959 | py | Python | venv/lib/python3.6/site-packages/kubernetes/client/models/v1beta1_validating_webhook_configuration_list.py | DiptoChakrabarty/Kube-Automate | 2072d1aadd58eb405c7308ff5cfecbf50300ead3 | [
"MIT"
] | null | null | null | venv/lib/python3.6/site-packages/kubernetes/client/models/v1beta1_validating_webhook_configuration_list.py | DiptoChakrabarty/Kube-Automate | 2072d1aadd58eb405c7308ff5cfecbf50300ead3 | [
"MIT"
] | null | null | null | venv/lib/python3.6/site-packages/kubernetes/client/models/v1beta1_validating_webhook_configuration_list.py | DiptoChakrabarty/Kube-Automate | 2072d1aadd58eb405c7308ff5cfecbf50300ead3 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
OpenAPI spec version: release-1.15
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
class V1bet... | 35.146465 | 295 | 0.644633 |
91e29dc7e4ca4d49e87c348140ea0fe073be19c9 | 3,640 | py | Python | lab/util/metrics.py | voschezang/distributed-systems | 6132dc33414d942378cd2b835408701c31075c91 | [
"MIT"
] | null | null | null | lab/util/metrics.py | voschezang/distributed-systems | 6132dc33414d942378cd2b835408701c31075c91 | [
"MIT"
] | null | null | null | lab/util/metrics.py | voschezang/distributed-systems | 6132dc33414d942378cd2b835408701c31075c91 | [
"MIT"
] | 1 | 2020-02-16T15:16:45.000Z | 2020-02-16T15:16:45.000Z | import numpy as np
import networkx as nx
from networkx.algorithms import approximation, distance_measures, cluster, shortest_paths
from networkx.exception import NetworkXError
from lab.util.argument_parser import get_arg
from lab.util.validation import assert_file
from lab.util.graph import Graph
def degree_distrib... | 32.212389 | 124 | 0.667033 |
91e2cb912bf20d13b10b916c841b232a4e6be53e | 11,118 | py | Python | util/data/gen/powrprof.dll.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | util/data/gen/powrprof.dll.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | util/data/gen/powrprof.dll.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | symbols = []
exports = [{'type': 'function', 'name': 'CallNtPowerInformation', 'address': '0x7ffb3b851a30'}, {'type': 'function', 'name': 'CanUserWritePwrScheme', 'address': '0x7ffb3b8551b0'}, {'type': 'function', 'name': 'DeletePwrScheme', 'address': '0x7ffb3b855260'}, {'type': 'function', 'name': 'DevicePowerClose', ... | 5,559 | 11,105 | 0.704533 |
91e2d5e445b0e2a346adc8473cd52a16a7fb6a2c | 752 | py | Python | agents/rl/utils.py | didi/MEEP | eb668fe598e40d244f204363d360babbe1fe0dc2 | [
"Apache-2.0"
] | 17 | 2020-09-09T02:32:14.000Z | 2021-10-01T09:46:40.000Z | agents/rl/utils.py | didi/MEEP | eb668fe598e40d244f204363d360babbe1fe0dc2 | [
"Apache-2.0"
] | 2 | 2020-12-02T09:10:03.000Z | 2020-12-02T20:31:05.000Z | agents/rl/utils.py | didi/MEEP | eb668fe598e40d244f204363d360babbe1fe0dc2 | [
"Apache-2.0"
] | 3 | 2020-10-10T09:14:43.000Z | 2022-01-18T02:36:31.000Z | def flatten_variables(variables):
flattened = []
if isinstance(variables, dict):
if 'variables' in variables:
# Variable group
flattened += flatten_variables(variables['variables'])
elif 'value' in variables:
# Variable value
if type(variables['val... | 37.6 | 67 | 0.550532 |
91e30c7b1b173393c032e134a3026c7f109e1b6a | 31,946 | py | Python | homeassistant/components/mqtt/climate.py | marioedani/homeassistant-core | 2bc5db857ec6aa605ea7ff363654db2109f7cec4 | [
"Apache-2.0"
] | 1 | 2021-09-29T20:33:32.000Z | 2021-09-29T20:33:32.000Z | homeassistant/components/mqtt/climate.py | tomachristian/core | 71c8fcee20c55536b33c3ee774c76c1795f37cd2 | [
"Apache-2.0"
] | 3 | 2021-09-08T03:31:36.000Z | 2022-03-12T01:00:03.000Z | homeassistant/components/mqtt/climate.py | tomachristian/core | 71c8fcee20c55536b33c3ee774c76c1795f37cd2 | [
"Apache-2.0"
] | 2 | 2020-04-19T13:35:24.000Z | 2020-04-19T13:35:51.000Z | """Support for MQTT climate devices."""
import logging
import voluptuous as vol
from homeassistant.components import climate, mqtt
from homeassistant.components.climate import (
PLATFORM_SCHEMA as CLIMATE_PLATFORM_SCHEMA,
ClimateDevice,
)
from homeassistant.components.climate.const import (
ATTR_HVAC_MODE... | 35.654018 | 88 | 0.66794 |
91e3298910de771c148ac26b07304620a4d6e39d | 4,900 | py | Python | code_python/2-PeopleCounter/simple_main.py | khanfarhan10/Computer-Vision-2 | 9ed58481e48d95f43464fb34d4da74ee0184bd14 | [
"MIT"
] | 1 | 2022-01-05T23:11:51.000Z | 2022-01-05T23:11:51.000Z | code_python/2-PeopleCounter/simple_main.py | khanfarhan10/Computer-Vision-2 | 9ed58481e48d95f43464fb34d4da74ee0184bd14 | [
"MIT"
] | null | null | null | code_python/2-PeopleCounter/simple_main.py | khanfarhan10/Computer-Vision-2 | 9ed58481e48d95f43464fb34d4da74ee0184bd14 | [
"MIT"
] | 2 | 2021-08-14T13:03:12.000Z | 2021-10-12T08:48:18.000Z | # Import Intel Real Sense SDK
from pyrealsense2 import pyrealsense2 as rs
# Import OpenCV for easy image rendering
from cv2 import cv2 as cv
# Import Numpy for easy array manipulation
import numpy as np
# Import CSV
import csv
# Import datetime
from datetime import datetime
# Import OS
import os
# Create CSV file
def... | 30.81761 | 77 | 0.63551 |
91e340c71cee9b479276ad168258d6966a256b6c | 127 | py | Python | abc/028/B.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | 2 | 2022-01-22T07:56:58.000Z | 2022-01-24T00:29:37.000Z | abc/028/B.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | abc/028/B.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | S = input()
alpha = [0] * 6
for s in S:
index = ord(s) - ord('A')
if index < 6:
alpha[index] += 1
print(*alpha) | 18.142857 | 29 | 0.488189 |
91e342a108353378d352f7e0cd8d0ae8179f49ad | 1,293 | py | Python | utilities/rgb2gray.py | LunaDilangalen/gpu-pathfinding | ba34c44595a6ede0c3c47bc60bb2a34355fc4891 | [
"MIT"
] | null | null | null | utilities/rgb2gray.py | LunaDilangalen/gpu-pathfinding | ba34c44595a6ede0c3c47bc60bb2a34355fc4891 | [
"MIT"
] | 4 | 2021-06-08T22:56:00.000Z | 2022-03-12T00:53:10.000Z | utilities/rgb2gray.py | LunaDilangalen/gpu-pathfinding | ba34c44595a6ede0c3c47bc60bb2a34355fc4891 | [
"MIT"
] | null | null | null | import cv2 as cv
import sys
img = cv.imread(cv.samples.findFile("dataset/da2-png/ht_keep.png"))
if img is None:
sys.exit("Could not read the image.")
# cv.imshow("Display window", img)
# k = cv.waitKey(0)
# if k == ord("s"):
print('Original Dimensions : ',img.shape)
scale_percent = 10 # percent of original size
... | 28.733333 | 74 | 0.673627 |
91e387307e953d18cf43b4caedecf34aff954180 | 23,137 | py | Python | analysis/loadcombos.py | buddyd16/theToolbox | b04ca462595af1e90b7c2d1d35527aaf19664b0d | [
"BSD-3-Clause"
] | 1 | 2022-02-21T16:06:22.000Z | 2022-02-21T16:06:22.000Z | analysis/loadcombos.py | buddyd16/theToolbox | b04ca462595af1e90b7c2d1d35527aaf19664b0d | [
"BSD-3-Clause"
] | 2 | 2022-02-10T03:38:50.000Z | 2022-03-02T14:52:43.000Z | analysis/loadcombos.py | buddyd16/theToolbox | b04ca462595af1e90b7c2d1d35527aaf19664b0d | [
"BSD-3-Clause"
] | null | null | null | '''
BSD 3-Clause License
Copyright (c) 2022, Donald N. Bockoven III
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, this
l... | 55.088095 | 132 | 0.471755 |
91e39da927e1ef74786918fae50b26d006bf6b44 | 749 | py | Python | onadata/libs/utils/qrcode.py | ubpd/kobocat | 45906e07e8f05c30e3e26bab5570a8ab1ee264db | [
"BSD-2-Clause"
] | null | null | null | onadata/libs/utils/qrcode.py | ubpd/kobocat | 45906e07e8f05c30e3e26bab5570a8ab1ee264db | [
"BSD-2-Clause"
] | null | null | null | onadata/libs/utils/qrcode.py | ubpd/kobocat | 45906e07e8f05c30e3e26bab5570a8ab1ee264db | [
"BSD-2-Clause"
] | null | null | null | # coding: utf-8
from __future__ import unicode_literals, print_function, division, absolute_import
import StringIO
from elaphe import barcode
from base64 import b64encode
def generate_qrcode(message, stream=None,
eclevel='M', margin=10,
data_mode='8bits', format='PNG', scale=2.... | 29.96 | 82 | 0.65287 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.