hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2e20f4c29e2891aeb19d8335ed206a571ff55926 | 1,058 | py | Python | ramdisk.py | mkollo/chiminey | a31f41d94c3725abef879269b64eb63f4f21f213 | [
"MIT"
] | null | null | null | ramdisk.py | mkollo/chiminey | a31f41d94c3725abef879269b64eb63f4f21f213 | [
"MIT"
] | null | null | null | ramdisk.py | mkollo/chiminey | a31f41d94c3725abef879269b64eb63f4f21f213 | [
"MIT"
] | 1 | 2020-10-16T15:21:56.000Z | 2020-10-16T15:21:56.000Z | # ___ _ _ ___ __ __ _____ __
# / __| || |_ _| \/ | _ \ \ / /
# | (__| __ || || |\/| | _/\ V /
# \___|_||_|___|_| |_|_| |_|
#
# Copyright (c) 2020 Mihaly Kollo. All rights reserved.
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MI... | 33.0625 | 84 | 0.591682 |
e5b2a136cc4a078f384bbf3ff3a759f4810931cd | 383 | py | Python | resources/test1/migrations/0003_auto_20150715_0435.py | masanorinyo/rest_django_api_boilerplate | 097ef8bf8405c804f79600585c6cfd21682f3066 | [
"MIT"
] | null | null | null | resources/test1/migrations/0003_auto_20150715_0435.py | masanorinyo/rest_django_api_boilerplate | 097ef8bf8405c804f79600585c6cfd21682f3066 | [
"MIT"
] | null | null | null | resources/test1/migrations/0003_auto_20150715_0435.py | masanorinyo/rest_django_api_boilerplate | 097ef8bf8405c804f79600585c6cfd21682f3066 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('test1', '0002_auto_20150714_2324'),
]
operations = [
migrations.RenameField(
model_name='test1',
old... | 19.15 | 45 | 0.590078 |
ddaec246e8af219866c4946984eb3f1dd8213c66 | 2,357 | py | Python | SecurityHub/list_securityhub_standard_controls.py | terratenney/aws-tools | d8ca07d56d812deb819b039752b94a0f1b9e6eb2 | [
"MIT"
] | 8 | 2020-12-27T18:44:17.000Z | 2022-03-10T22:20:28.000Z | SecurityHub/list_securityhub_standard_controls.py | terratenney/aws-tools | d8ca07d56d812deb819b039752b94a0f1b9e6eb2 | [
"MIT"
] | 28 | 2020-08-30T02:57:03.000Z | 2021-05-12T09:13:15.000Z | SecurityHub/list_securityhub_standard_controls.py | kyhau/aws-tools | 511ab6620d55566737b051bfccad4983600414f6 | [
"MIT"
] | 8 | 2020-09-03T19:00:13.000Z | 2022-03-31T05:31:35.000Z | """
Print current control status of Security Hub.
- Print "Subscription/ControlId,ControlStatus,Title" of a standard control by default.
- Print all details when `--detailed` is used.
"""
import json
import logging
import click
from helper.aws import AwsApiHelper
logging.getLogger().setLevel(logging.DEBUG)
STANDARD... | 36.261538 | 124 | 0.674162 |
17a331f6f9939a2a7a2f53749d70b7bf21674ea8 | 187 | py | Python | api/admin.py | saymedia/seosuite-dashboard-api | 7d65506f0aec3f7df60a77022726ccf8695c03a8 | [
"MIT"
] | null | null | null | api/admin.py | saymedia/seosuite-dashboard-api | 7d65506f0aec3f7df60a77022726ccf8695c03a8 | [
"MIT"
] | null | null | null | api/admin.py | saymedia/seosuite-dashboard-api | 7d65506f0aec3f7df60a77022726ccf8695c03a8 | [
"MIT"
] | null | null | null | from django.contrib import admin
from api.models import (
CrawlUrls,
CrawlLinks,
)
# Register your models here.
admin.site.register(CrawlUrls)
admin.site.register(CrawlLinks) | 20.777778 | 32 | 0.754011 |
98f831f37e4565f70c3ef766f0b1ab40bb71c2aa | 49,831 | py | Python | Xcode.app/Contents/SharedFrameworks/LLDB.framework/Versions/A/Resources/Python/lldb/macosx/crashlog.py | keith/Xcode.app-strings | bf8ff02d2fb92b792393901f31fc5f4c97ceaf19 | [
"MIT"
] | 72 | 2016-12-05T05:46:17.000Z | 2022-03-29T07:22:52.000Z | Xcode.app/Contents/SharedFrameworks/LLDB.framework/Versions/A/Resources/Python/lldb/macosx/crashlog.py | keith/Xcode.app-strings | bf8ff02d2fb92b792393901f31fc5f4c97ceaf19 | [
"MIT"
] | 1 | 2020-11-11T05:43:47.000Z | 2020-11-11T05:43:47.000Z | Xcode.app/Contents/SharedFrameworks/LLDB.framework/Versions/A/Resources/Python/lldb/macosx/crashlog.py | keith/Xcode.app-strings | bf8ff02d2fb92b792393901f31fc5f4c97ceaf19 | [
"MIT"
] | 20 | 2018-03-03T15:47:21.000Z | 2022-02-12T04:10:24.000Z | #!/usr/bin/python3
#----------------------------------------------------------------------
# Be sure to add the python path that points to the LLDB shared library.
# To use this in the embedded python interpreter using "lldb":
# cd /path/containing/crashlog.py
# lldb
# (lldb) script import crashlog
# "crashlog"... | 45.67461 | 185 | 0.551484 |
19bbbda851041f91a0c3b765a47d4d71d7ce4248 | 1,235 | py | Python | print_github_token.py | weka/gohomecli | adea7e130c1ae743848deb9a4d0e630fb16ef6c3 | [
"Apache-2.0"
] | null | null | null | print_github_token.py | weka/gohomecli | adea7e130c1ae743848deb9a4d0e630fb16ef6c3 | [
"Apache-2.0"
] | null | null | null | print_github_token.py | weka/gohomecli | adea7e130c1ae743848deb9a4d0e630fb16ef6c3 | [
"Apache-2.0"
] | null | null | null | import os
import time
import jwt
import requests
from cryptography.hazmat.backends import default_backend
def print_github_token():
app_id = os.environ['DEPLOY_APP_ID']
cert_str = os.environ['DEPLOY_APP_PRIVATE_KEY']
cert_bytes = cert_str.encode()
private_key = default_backend().load_pem_private_key(... | 31.666667 | 111 | 0.677733 |
09675384ba296a23fcecd1cd4ed6277d348c3264 | 2,401 | py | Python | website/website/apps/core/management/commands/list.py | SimonGreenhill/Language5 | c59f502dda7be27fc338f0338cc3b03e63bad9c8 | [
"MIT"
] | 1 | 2020-08-17T05:56:16.000Z | 2020-08-17T05:56:16.000Z | website/website/apps/core/management/commands/list.py | SimonGreenhill/Language5 | c59f502dda7be27fc338f0338cc3b03e63bad9c8 | [
"MIT"
] | 5 | 2020-06-05T17:51:56.000Z | 2022-01-13T00:42:51.000Z | website/website/apps/core/management/commands/list.py | SimonGreenhill/Language5 | c59f502dda7be27fc338f0338cc3b03e63bad9c8 | [
"MIT"
] | 1 | 2015-02-23T22:54:00.000Z | 2015-02-23T22:54:00.000Z | # -*- coding: utf-8 -*-
from django.core.management.base import BaseCommand
from website.apps.core.models import Language, Family, Source
try:
from website.apps.lexicon.models import Word
except ImportError:
# not installed
Word = None
class Command(BaseCommand):
args = 'list language/source/wor... | 30.392405 | 79 | 0.473969 |
ceb0fe27f4f1badc9991f7433f369a475be0d2cf | 1,693 | py | Python | frontier_exif_reordering.py | 4lch/Frontier-Exif-Reordering | 876adda36df3166e76e295b618b2f255d5f9cb93 | [
"MIT"
] | null | null | null | frontier_exif_reordering.py | 4lch/Frontier-Exif-Reordering | 876adda36df3166e76e295b618b2f255d5f9cb93 | [
"MIT"
] | null | null | null | frontier_exif_reordering.py | 4lch/Frontier-Exif-Reordering | 876adda36df3166e76e295b618b2f255d5f9cb93 | [
"MIT"
] | null | null | null | import sys
import os
import glob
from subprocess import check_output
# List of supported image file extensions, not case-sensitive
exts = ['jpg', 'jpeg']
# Get the folder that the user has dropped on the script
droppedFolder = sys.argv[1]
print(f'Working from {droppedFolder}.')
# Grab images with expected file exten... | 33.196078 | 108 | 0.677496 |
0cacceb8610e58512af83ec389c805584bfcd664 | 1,501 | py | Python | examples/C++/PaddleDetection/fcos_dcn_r50_fpn_1x_coco/test_client.py | avr248/Serving | bd12b303d3e490278dd94461fa8f70dc24c81ec0 | [
"Apache-2.0"
] | 789 | 2019-04-05T09:20:46.000Z | 2022-03-31T13:43:54.000Z | examples/C++/PaddleDetection/fcos_dcn_r50_fpn_1x_coco/test_client.py | avr248/Serving | bd12b303d3e490278dd94461fa8f70dc24c81ec0 | [
"Apache-2.0"
] | 1,195 | 2019-04-08T10:05:28.000Z | 2022-03-31T03:43:42.000Z | examples/C++/PaddleDetection/fcos_dcn_r50_fpn_1x_coco/test_client.py | avr248/Serving | bd12b303d3e490278dd94461fa8f70dc24c81ec0 | [
"Apache-2.0"
] | 229 | 2019-04-05T09:20:57.000Z | 2022-03-30T06:21:22.000Z | # Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 32.630435 | 79 | 0.729514 |
ae636028d31e61e97e679917e7bee06eea33480c | 183 | py | Python | aioredis/compat.py | sondrelg/aioredis-py | 0212b6a43a4a28d9887f92c55af5e54e1bc95d67 | [
"MIT"
] | 1,777 | 2015-01-25T17:26:56.000Z | 2021-03-18T08:39:55.000Z | aioredis/compat.py | sondrelg/aioredis-py | 0212b6a43a4a28d9887f92c55af5e54e1bc95d67 | [
"MIT"
] | 754 | 2015-02-22T13:36:08.000Z | 2021-03-18T23:11:21.000Z | aioredis/compat.py | seedofjoy/aioredis | 2f217e114a395b73d77952172eab4abeaa0dd2ff | [
"MIT"
] | 314 | 2015-02-24T20:18:46.000Z | 2021-03-13T01:47:06.000Z | import sys
if sys.version_info >= (3, 8):
from typing import Protocol, TypedDict
else:
from typing_extensions import Protocol, TypedDict
__all__ = ("Protocol", "TypedDict")
| 20.333333 | 53 | 0.726776 |
688bcceef89b75e6b7093b03a5d9ea1abcdf12d4 | 8,426 | py | Python | model/xgboost/dffml_model_xgboost/xgbregressor.py | yopknopixx/dffml | 7f295bb01b235a915c9f8015564b97a708cd5325 | [
"MIT"
] | null | null | null | model/xgboost/dffml_model_xgboost/xgbregressor.py | yopknopixx/dffml | 7f295bb01b235a915c9f8015564b97a708cd5325 | [
"MIT"
] | null | null | null | model/xgboost/dffml_model_xgboost/xgbregressor.py | yopknopixx/dffml | 7f295bb01b235a915c9f8015564b97a708cd5325 | [
"MIT"
] | null | null | null | # Co-authored-by: Oliver O'Brien <oliverobrien111@gmail.com>
# Co-authored-by: John Andersen <johnandersenpdx@gmail.com>
# Co-authored-by: Soren Andersen <sorenpdx@gmail.com>
import pathlib
from typing import AsyncIterator
import joblib
import numpy as np
import pandas as pd
import xgboost as xgb
from sklearn.metrics ... | 32.407692 | 145 | 0.614645 |
a9c042de916979274236fab2f9a3ed0f9400ef2f | 8,681 | py | Python | tests/queryset/test_queryset_aggregation.py | SolarTech/mongoengine | 772096ec55963fc6b079b84ccac2a9917deb9204 | [
"MIT"
] | 1 | 2021-10-02T08:42:08.000Z | 2021-10-02T08:42:08.000Z | tests/queryset/test_queryset_aggregation.py | SolarTech/mongoengine | 772096ec55963fc6b079b84ccac2a9917deb9204 | [
"MIT"
] | null | null | null | tests/queryset/test_queryset_aggregation.py | SolarTech/mongoengine | 772096ec55963fc6b079b84ccac2a9917deb9204 | [
"MIT"
] | null | null | null | import unittest
import warnings
from pymongo.read_preferences import ReadPreference
from mongoengine import *
from tests.utils import MongoDBTestCase
class TestQuerysetAggregate(MongoDBTestCase):
def test_read_preference_aggregation_framework(self):
class Bar(Document):
txt = StringField()
... | 34.177165 | 84 | 0.563645 |
ff070807a7854400304275375ada61eed029d4a5 | 819 | py | Python | bubu/feeds/migrations/0002_auto_20170805_0854.py | geofrocker/expert-octo-winner | c6419254325b2dc28e12e1e623d56abf4c124046 | [
"MIT"
] | null | null | null | bubu/feeds/migrations/0002_auto_20170805_0854.py | geofrocker/expert-octo-winner | c6419254325b2dc28e12e1e623d56abf4c124046 | [
"MIT"
] | 6 | 2020-03-24T15:50:34.000Z | 2021-06-10T20:29:34.000Z | bubu/feeds/migrations/0002_auto_20170805_0854.py | geofrocker/expert-octo-winner | c6419254325b2dc28e12e1e623d56abf4c124046 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2017-08-05 05:54
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('feeds', '0001_initial'),
]
operations = [
migrations.AddField(
... | 26.419355 | 129 | 0.583639 |
2c956c927f7289b879cd95fc9ffdab011fa515b0 | 5,294 | py | Python | src/citrine/informatics/design_spaces.py | lbianchini84/citrine-python | 0a99fcd3cfd0a464f5612fceed1dc6d1066a4680 | [
"Apache-2.0"
] | null | null | null | src/citrine/informatics/design_spaces.py | lbianchini84/citrine-python | 0a99fcd3cfd0a464f5612fceed1dc6d1066a4680 | [
"Apache-2.0"
] | null | null | null | src/citrine/informatics/design_spaces.py | lbianchini84/citrine-python | 0a99fcd3cfd0a464f5612fceed1dc6d1066a4680 | [
"Apache-2.0"
] | null | null | null | """Tools for working with design spaces."""
from typing import Any, List, Mapping, Type
from uuid import UUID
from citrine._rest.resource import Resource
from citrine._serialization import properties
from citrine._serialization.polymorphic_serializable import PolymorphicSerializable
from citrine._serialization.seriali... | 39.214815 | 206 | 0.687571 |
004dbff5a5f5798a650d2ac6f8b37f82f87d19e5 | 1,215 | py | Python | devfest-2010/whereiscoffee/geo/tests/geomath_test.py | DevAamir/googleMaps | 2306f68d169c36d14e01f5b6f1070d9e43782bc1 | [
"Apache-2.0"
] | 20 | 2015-04-05T05:44:20.000Z | 2020-12-27T19:47:34.000Z | geo/tests/geomath_test.py | slachiewicz/where-do-you-go | 4e5c6c3b47866f4a8875a940fa6e889d0ae4ee7b | [
"MIT"
] | 2 | 2015-03-02T15:16:09.000Z | 2016-11-16T11:20:15.000Z | geo/tests/geomath_test.py | slachiewicz/where-do-you-go | 4e5c6c3b47866f4a8875a940fa6e889d0ae4ee7b | [
"MIT"
] | 4 | 2015-04-05T05:44:25.000Z | 2019-01-22T20:54:40.000Z | #!/usr/bin/python2.5
#
# Copyright 2009 Roman Nurik
#
# 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... | 30.375 | 74 | 0.717695 |
bf8941a55b91aba4d35d008b14668b3f18e5c2a4 | 12,949 | py | Python | vnpy/trader/uiCryptoWindow.py | WongLynn/vnpy_Amerlin-1.1.20 | d701d8f12c29cc33f58ea025920b0c7240f74f82 | [
"MIT"
] | 11 | 2019-10-28T13:01:48.000Z | 2021-06-20T03:38:09.000Z | vnpy/trader/uiCryptoWindow.py | Rayshawn8/vnpy_Amerlin-1.1.20 | d701d8f12c29cc33f58ea025920b0c7240f74f82 | [
"MIT"
] | null | null | null | vnpy/trader/uiCryptoWindow.py | Rayshawn8/vnpy_Amerlin-1.1.20 | d701d8f12c29cc33f58ea025920b0c7240f74f82 | [
"MIT"
] | 6 | 2019-10-28T13:16:13.000Z | 2020-09-08T08:03:41.000Z | # encoding: UTF-8
import psutil
import traceback
from vnpy.trader.vtFunction import loadIconPath
from vnpy.trader.vtGlobal import globalSetting
from vnpy.trader.uiCryptoWidget import *
########################################################################
class MainWindow(QtWidgets.QMainWindow):
"""主窗口"""
... | 38.769461 | 137 | 0.522357 |
8311e1ce9df03105f8bcbce36174387e8b6cfaa4 | 425 | py | Python | chrome/browser/ui/webui/PRESUBMIT.py | nagineni/chromium-crosswalk | 5725642f1c67d0f97e8613ec1c3e8107ab53fdf8 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 231 | 2015-01-08T09:04:44.000Z | 2021-12-30T03:03:10.000Z | ui/resources/default_100_percent/aura/PRESUBMIT.py | 1065672644894730302/Chromium | 239dd49e906be4909e293d8991e998c9816eaa35 | [
"BSD-3-Clause"
] | 5 | 2015-03-27T14:29:23.000Z | 2019-09-25T13:23:12.000Z | ui/resources/default_100_percent/aura/PRESUBMIT.py | 1065672644894730302/Chromium | 239dd49e906be4909e293d8991e998c9816eaa35 | [
"BSD-3-Clause"
] | 268 | 2015-01-21T05:53:28.000Z | 2022-03-25T22:09:01.000Z | # Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Chromium presubmit script for src/chrome/browser/externsions.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more de... | 32.692308 | 75 | 0.774118 |
de51fe08ab51e1937198b8a01f9a46289c9818f4 | 1,393 | py | Python | simplegan/datasets/load_lsun.py | grohith327/EasyGAN | cbbff0283eda08f2d056215574f798e976d3ece0 | [
"MIT"
] | 23 | 2020-03-10T16:16:34.000Z | 2022-01-09T11:04:21.000Z | simplegan/datasets/load_lsun.py | grohith327/EasyGAN | cbbff0283eda08f2d056215574f798e976d3ece0 | [
"MIT"
] | 3 | 2020-03-09T01:43:45.000Z | 2020-05-19T14:52:28.000Z | simplegan/datasets/load_lsun.py | grohith327/EasyGAN | cbbff0283eda08f2d056215574f798e976d3ece0 | [
"MIT"
] | 1 | 2020-05-19T15:22:39.000Z | 2020-05-19T15:22:39.000Z | import tensorflow as tf
import cv2
from tqdm import tqdm
import tensorflow_datasets as tfds
import numpy as np
__all__ = ["load_lsun"]
def load_lsun(info=False, img_shape=(64, 64)):
r"""Loads the `LSUN <https://www.yf.io/p/lsun>`_ training data without labels - used in DCGAN
Args:
info (bool, opti... | 26.283019 | 101 | 0.626705 |
e965b9012c6e69808f7b31e651bff090363c8a7c | 84,180 | py | Python | ccxt/binance2.py | vinexnetwork/vinex-ccxt | 42625b42d00eec2c02b8f525e3544e313bc04b05 | [
"MIT"
] | 2 | 2021-06-05T07:16:17.000Z | 2022-03-22T11:48:31.000Z | ccxt/binance2.py | vinexnetwork/vinex-ccxt | 42625b42d00eec2c02b8f525e3544e313bc04b05 | [
"MIT"
] | 1 | 2020-03-02T03:05:45.000Z | 2020-03-02T03:05:45.000Z | ccxt/binance2.py | vinexnetwork/vinex-ccxt | 42625b42d00eec2c02b8f525e3544e313bc04b05 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import json
import math
from ccxt.base.decimal_to_precision import ROUND
from ccxt.base.errors import ArgumentsRequired
from ccxt.base.errors import AuthenticationError
from ccxt.base.errors import DDoSProtection
from ccxt.base.errors import ExchangeError
from ccxt.base.errors import ExchangeNo... | 41.818182 | 223 | 0.473474 |
9b14733220027bb1615d1721203b72ea59e38a62 | 639 | py | Python | key-send.py | linuxkay/SilenceisGolden | 50ade879e3ef45b3c00f73609bd3c28a7c153a56 | [
"MIT"
] | null | null | null | key-send.py | linuxkay/SilenceisGolden | 50ade879e3ef45b3c00f73609bd3c28a7c153a56 | [
"MIT"
] | null | null | null | key-send.py | linuxkay/SilenceisGolden | 50ade879e3ef45b3c00f73609bd3c28a7c153a56 | [
"MIT"
] | null | null | null | #!/usr/local/bin/python
import socket
while True:
key = input("Press 1:Run mjpgst, 2:Switch CAM, 4:Kill | 9:Run motion, 0:Kill ")
#while key != "":
if key == 1:
a = "getstream"
elif key == 2:
a = "restream"
elif key == 4:
a = "stopstream"
elif key == 9:
a = "startmotion"
elif key == 0:
... | 24.576923 | 84 | 0.602504 |
38633b01d9761c87199b675403a75c9ab2855d0b | 21,425 | py | Python | vta/tutorials/autotvm/tune_relay_vta.py | intheworld/incubator-tvm | c07aa37aeb602e1ade7e26061d0fd3e908dd3791 | [
"Apache-2.0"
] | null | null | null | vta/tutorials/autotvm/tune_relay_vta.py | intheworld/incubator-tvm | c07aa37aeb602e1ade7e26061d0fd3e908dd3791 | [
"Apache-2.0"
] | null | null | null | vta/tutorials/autotvm/tune_relay_vta.py | intheworld/incubator-tvm | c07aa37aeb602e1ade7e26061d0fd3e908dd3791 | [
"Apache-2.0"
] | 1 | 2020-10-02T09:49:47.000Z | 2020-10-02T09:49:47.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 41.764133 | 322 | 0.598086 |
db1fabb08619c9b5c8298ee8c221fc3e4d82af1d | 431 | py | Python | test/examples/with/test_simple_context_manager.py | rocky/xpython | ce4ed4329cee2af0aab94254276f5a5687dd25f9 | [
"MIT"
] | 47 | 2020-05-05T08:23:55.000Z | 2022-03-19T19:48:37.000Z | test/examples/with/test_simple_context_manager.py | rocky/xbyterun | fde8f8a31ffd3e3c4545d76b4b1edf4b7e0191d9 | [
"MIT"
] | null | null | null | test/examples/with/test_simple_context_manager.py | rocky/xbyterun | fde8f8a31ffd3e3c4545d76b4b1edf4b7e0191d9 | [
"MIT"
] | 3 | 2020-08-30T09:05:17.000Z | 2022-01-07T08:11:28.000Z | class NullContext(object):
def __enter__(self):
l.append("i")
# __enter__ usually returns self, but doesn't have to.
return 17
def __exit__(self, exc_type, exc_val, exc_tb):
l.append("o")
return False
l = []
for i in range(3):
with NullContext() as val:
ass... | 20.52381 | 62 | 0.568445 |
51036a94132778b561f0f8443e3c2d3560401bc8 | 2,738 | py | Python | SupportFiles/genStar.py | kolligj70/Agnesi-Fractals | 3a17ac20f2d3f00cd9c55519be4fa771ef8da457 | [
"MIT"
] | null | null | null | SupportFiles/genStar.py | kolligj70/Agnesi-Fractals | 3a17ac20f2d3f00cd9c55519be4fa771ef8da457 | [
"MIT"
] | null | null | null | SupportFiles/genStar.py | kolligj70/Agnesi-Fractals | 3a17ac20f2d3f00cd9c55519be4fa771ef8da457 | [
"MIT"
] | null | null | null | #! /usr/bin/python3
"""
Generate/plot a star with outward/inward spikes.
If output of image is desired, include any string as a
command line argument.
"""
import sys
import math
import matplotlib.pyplot as plt
import numpy as np
##### Star Parameters #####
xCenter = 2.0
yCenter = 3.0
nPts = 300
radius0 = 3.0 ... | 25.119266 | 67 | 0.663988 |
4b23bd73c7ee1c23abc16ba25d504588bf96e24f | 3,183 | py | Python | smartshark/management/commands/filter_job_logs.py | benjaminLedel/serverSHARK | 97decc03ba7bde8ad9c5f55d446d21ed5a26709c | [
"Apache-2.0"
] | 1 | 2019-11-09T21:18:05.000Z | 2019-11-09T21:18:05.000Z | smartshark/management/commands/filter_job_logs.py | ArtyMandy/serverSHARK | 7d3ce83c2bf310aeea7832dedbdaccd44ae7b1df | [
"Apache-2.0"
] | 34 | 2017-09-28T12:38:15.000Z | 2022-01-21T06:59:01.000Z | smartshark/management/commands/filter_job_logs.py | midasdev711/serverSHARK-backend | 989f242c5454aaf913734cdb5779e90408be74cb | [
"Apache-2.0"
] | 8 | 2018-05-23T12:46:45.000Z | 2021-12-04T09:23:48.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from smartshark.models import Job, Plugin, Project, PluginExecution
from smartshark.datacollection.pluginmanagementinterface import PluginManagementInterface
from django.core.management.base import BaseCommand
class Command(BaseCommand):
"""Fetch Logs for set of job... | 44.830986 | 218 | 0.630223 |
5356763acaf9e07e08b3786de532a8ff13e5887c | 839 | py | Python | polybius/managers/constantManager.py | TStalnaker44/python_jeopardy | 7044d9512d51c04e22a6d2cbfa9e9a82a384de85 | [
"MIT"
] | null | null | null | polybius/managers/constantManager.py | TStalnaker44/python_jeopardy | 7044d9512d51c04e22a6d2cbfa9e9a82a384de85 | [
"MIT"
] | null | null | null | polybius/managers/constantManager.py | TStalnaker44/python_jeopardy | 7044d9512d51c04e22a6d2cbfa9e9a82a384de85 | [
"MIT"
] | null | null | null | from .abstractManager import AbstractManager
class ConstantManager():
# The singleton instance variable
_INSTANCE = None
@classmethod
def getInstance(cls):
"""Used to obtain the singleton instance"""
if cls._INSTANCE == None:
cls._INSTANCE = cls._CM()
return cls... | 27.064516 | 66 | 0.605483 |
40ee79aa021413aaa5991c77aea28d777ac10ec1 | 53,230 | py | Python | tests/unit/gapic/compute_v1/test_region_ssl_certificates.py | georgiyekkert/python-compute | d128efbb3bf10af9b41e55b20aaa8080b3221e77 | [
"Apache-2.0"
] | null | null | null | tests/unit/gapic/compute_v1/test_region_ssl_certificates.py | georgiyekkert/python-compute | d128efbb3bf10af9b41e55b20aaa8080b3221e77 | [
"Apache-2.0"
] | null | null | null | tests/unit/gapic/compute_v1/test_region_ssl_certificates.py | georgiyekkert/python-compute | d128efbb3bf10af9b41e55b20aaa8080b3221e77 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 37.805398 | 131 | 0.685891 |
46f35166738898d6838272c7d7c78e65ce83bca8 | 18,045 | py | Python | dashboard/dashboard/migrate_test_names.py | alekzonder/catapult | f1017f0c7bd2b766674888d5e88d42fcc61d632c | [
"BSD-3-Clause"
] | null | null | null | dashboard/dashboard/migrate_test_names.py | alekzonder/catapult | f1017f0c7bd2b766674888d5e88d42fcc61d632c | [
"BSD-3-Clause"
] | 6 | 2020-07-19T21:51:44.000Z | 2022-02-13T08:22:58.000Z | dashboard/dashboard/migrate_test_names.py | alekzonder/catapult | f1017f0c7bd2b766674888d5e88d42fcc61d632c | [
"BSD-3-Clause"
] | 1 | 2020-07-24T18:22:03.000Z | 2020-07-24T18:22:03.000Z | # Copyright 2015 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.
"""Task queue task which migrates a TestMetadata and its Rows to a new name.
A rename consists of listing all TestMetadata entities which match the old_name... | 34.437023 | 80 | 0.72951 |
ef093f3b8ae14a685d9aad05b8b6da5d1605cf4f | 2,393 | py | Python | RFIDIOt-master/froschtest.py | kaosbeat/datakamp | 7ac90249b34aa4c3604fa4965ab124ab82d64ac3 | [
"MIT"
] | null | null | null | RFIDIOt-master/froschtest.py | kaosbeat/datakamp | 7ac90249b34aa4c3604fa4965ab124ab82d64ac3 | [
"MIT"
] | null | null | null | RFIDIOt-master/froschtest.py | kaosbeat/datakamp | 7ac90249b34aa4c3604fa4965ab124ab82d64ac3 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# froschtest.py - test frosch HTRM112 reader`
#
# Adam Laurie <adam@algroup.co.uk>
# http://rfidiot.org/
#
# This code is copyright (c) Adam Laurie, 2006, All rights reserved.
# For non-commercial use only, the following terms apply - for all other
# uses, please contact the author:
#
# Th... | 29.54321 | 89 | 0.710405 |
8f09110f3d0baae70ae636b4a9a238c1d200b28a | 11,366 | py | Python | signac/core/jsondict.py | ac-optimus/signac | 43a5519531cc8cc44199c9251d0fd4e6208b5bdb | [
"BSD-3-Clause"
] | null | null | null | signac/core/jsondict.py | ac-optimus/signac | 43a5519531cc8cc44199c9251d0fd4e6208b5bdb | [
"BSD-3-Clause"
] | 70 | 2020-07-23T00:33:50.000Z | 2022-03-01T10:01:21.000Z | signac/core/jsondict.py | vishav1771/signac | fd611167af50058ac507a41b5d37d426607be5fc | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2018 The Regents of the University of Michigan
# All rights reserved.
# This software is licensed under the BSD 3-Clause License.
"""Dict implementation with backend JSON file."""
import os
import sys
import errno
import uuid
import hashlib
import logging
from tempfile import mkstemp
from contextlib imp... | 33.137026 | 99 | 0.62643 |
d666790a4389094b0c34d541a23c79eb77386ea0 | 4,551 | py | Python | code/vae_train/vae_model.py | GT-SALT/Persuasive-Orderings | b7bd5980e47b1c698caa0a1e15847641bbc38f2e | [
"MIT"
] | 12 | 2020-10-05T13:54:23.000Z | 2022-01-27T07:09:05.000Z | code/vae_train/vae_model.py | GT-SALT/Persuasive-Orderings | b7bd5980e47b1c698caa0a1e15847641bbc38f2e | [
"MIT"
] | null | null | null | code/vae_train/vae_model.py | GT-SALT/Persuasive-Orderings | b7bd5980e47b1c698caa0a1e15847641bbc38f2e | [
"MIT"
] | 3 | 2020-10-06T04:32:21.000Z | 2021-08-16T19:03:14.000Z | import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
from vae_train.vae_encoder import *
from vae_train.vae_classifier import *
from vae_train.vae_generator import *
from vae_train.vae_predictor import *
from vae_train.vae_utils import *
class HierachyVAE(nn.Module):
def __init__(... | 36.119048 | 270 | 0.627554 |
824d90b1914d6b848bb74d74a8ca18e0e635927f | 47,737 | py | Python | src/redfish/ris/validation.py | JohnAZoidberg/python-ilorest-library | e4a05a3b21dafb6d6994d8a671c294479156b815 | [
"Apache-2.0"
] | 214 | 2016-04-04T12:24:52.000Z | 2022-03-28T11:35:46.000Z | src/redfish/ris/validation.py | JohnAZoidberg/python-ilorest-library | e4a05a3b21dafb6d6994d8a671c294479156b815 | [
"Apache-2.0"
] | 139 | 2016-04-02T04:22:29.000Z | 2022-03-25T06:54:45.000Z | src/redfish/ris/validation.py | JohnAZoidberg/python-ilorest-library | e4a05a3b21dafb6d6994d8a671c294479156b815 | [
"Apache-2.0"
] | 116 | 2016-04-04T20:39:42.000Z | 2021-11-13T06:53:41.000Z | ###
# Copyright 2020 Hewlett Packard Enterprise, Inc. 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 ... | 41.081756 | 145 | 0.538325 |
c0d8e4b9f9760c9ebf569be033227ae87220bf98 | 1,264 | py | Python | dat/RecipesScraper/RecipesScraper/middlewares.py | AaronWChen/food2vec | 167750f1dbe0f9873adee76ee9b01e31666c1d23 | [
"MIT"
] | null | null | null | dat/RecipesScraper/RecipesScraper/middlewares.py | AaronWChen/food2vec | 167750f1dbe0f9873adee76ee9b01e31666c1d23 | [
"MIT"
] | null | null | null | dat/RecipesScraper/RecipesScraper/middlewares.py | AaronWChen/food2vec | 167750f1dbe0f9873adee76ee9b01e31666c1d23 | [
"MIT"
] | null | null | null | """
Middleware for RecipesScraper, defines spider's workings.
"""
from scrapy import signals
class RecipesscraperSpiderMiddleware(object):
"""RecipesScraper middleware."""
# Not all methods need to be defined. If a method is not defined,
# scrapy acts as if the spider middleware does not modify the
... | 30.095238 | 75 | 0.698576 |
496bd66c75ee8540ebf641a8bd5bdd076d00dd0d | 18,122 | py | Python | zhaquirks/tuya/mcu/__init__.py | rforro/zha-device-handlers | c7f2c61fb71b0a4b01e17779644270ef9fc11326 | [
"Apache-2.0"
] | null | null | null | zhaquirks/tuya/mcu/__init__.py | rforro/zha-device-handlers | c7f2c61fb71b0a4b01e17779644270ef9fc11326 | [
"Apache-2.0"
] | null | null | null | zhaquirks/tuya/mcu/__init__.py | rforro/zha-device-handlers | c7f2c61fb71b0a4b01e17779644270ef9fc11326 | [
"Apache-2.0"
] | null | null | null | """Tuya MCU comunications."""
import dataclasses
from typing import Any, Callable, Dict, Optional, Tuple, Union
import zigpy.types as t
from zigpy.zcl import foundation
from zigpy.zcl.clusters.general import LevelControl, OnOff
from zhaquirks import Bus
from zhaquirks.tuya import (
ATTR_ON_OFF,
TUYA_MCU_COMMA... | 31.681818 | 150 | 0.582993 |
f3e3039aae13b1138549db11592f990495407a05 | 1,171 | py | Python | aries_cloudagent/protocols/discovery/v1_0/handlers/tests/test_disclose_handler.py | msembinelli/aries-cloudagent-python | a5a29dab30238f52dcfb6645aab115d01720a5c7 | [
"Apache-2.0"
] | 1 | 2020-07-02T12:36:32.000Z | 2020-07-02T12:36:32.000Z | aries_cloudagent/protocols/discovery/v1_0/handlers/tests/test_disclose_handler.py | msembinelli/aries-cloudagent-python | a5a29dab30238f52dcfb6645aab115d01720a5c7 | [
"Apache-2.0"
] | 1 | 2020-02-25T19:01:16.000Z | 2020-02-25T19:01:16.000Z | aries_cloudagent/protocols/discovery/v1_0/handlers/tests/test_disclose_handler.py | msembinelli/aries-cloudagent-python | a5a29dab30238f52dcfb6645aab115d01720a5c7 | [
"Apache-2.0"
] | 2 | 2020-02-18T20:34:01.000Z | 2021-03-12T16:18:30.000Z | import pytest
from aries_cloudagent.core.protocol_registry import ProtocolRegistry
from aries_cloudagent.messaging.base_handler import HandlerException
from aries_cloudagent.messaging.request_context import RequestContext
from aries_cloudagent.messaging.responder import MockResponder
from ...handlers.disclose_handler... | 32.527778 | 84 | 0.700256 |
4e40ded7a5d5b1d434b631d17e0374516ada0813 | 1,984 | py | Python | scrape.py | tokestermw/murakami-haruki-bot | 3040f5b391915ce390cade4930f288964f001fe4 | [
"MIT"
] | 4 | 2016-09-22T07:12:15.000Z | 2018-11-19T01:04:59.000Z | scrape.py | tokestermw/murakami-haruki-bot | 3040f5b391915ce390cade4930f288964f001fe4 | [
"MIT"
] | null | null | null | scrape.py | tokestermw/murakami-haruki-bot | 3040f5b391915ce390cade4930f288964f001fe4 | [
"MIT"
] | 1 | 2018-11-19T01:05:01.000Z | 2018-11-19T01:05:01.000Z | # -*- coding: utf-8 -*-
# scrape Murakami Haruki's blog
# 村上さんのところ
# http://www.welluneednt.com
# book version
# http://www.shinchosha.co.jp/murakamisannotokoro/books/
import requests
from bs4 import BeautifulSoup
from urlparse import urlparse
# get from wayback machine
BASE_URL = u'https://web.archive.org/web/20150... | 31.492063 | 108 | 0.56754 |
0f992b5e771fe956c89bf2579c8379cec7858b2e | 3,759 | py | Python | masonite/packages.py | nilsreichert/core | 048f45a2073f3a5c827f445bdf938c28a756af04 | [
"MIT"
] | null | null | null | masonite/packages.py | nilsreichert/core | 048f45a2073f3a5c827f445bdf938c28a756af04 | [
"MIT"
] | null | null | null | masonite/packages.py | nilsreichert/core | 048f45a2073f3a5c827f445bdf938c28a756af04 | [
"MIT"
] | null | null | null | """Third party package integrations."""
import os
import shutil
import sys
def create_or_append_config(location, name=False):
if name:
file_name = name
else:
file_name = os.path.basename(location)
# import it into the config directory
config_directory = os.path.join(os.getcwd(), 'conf... | 31.066116 | 135 | 0.636339 |
e7b79243a8fb9f091087f5c452c8192c49c81af2 | 1,354 | py | Python | youtube_dl/extractor/trutube.py | Logmytech/youtube-dl-QT | 1497297719a95c4f70fbfa32e0fa4e38cdd475dc | [
"MIT"
] | 1 | 2015-02-19T13:13:47.000Z | 2015-02-19T13:13:47.000Z | youtube_dl/extractor/trutube.py | Logmytech/youtube-dl-QT | 1497297719a95c4f70fbfa32e0fa4e38cdd475dc | [
"MIT"
] | 2 | 2019-05-20T12:46:30.000Z | 2020-11-07T12:50:32.000Z | youtube_dl/extractor/trutube.py | Logmytech/youtube-dl-QT | 1497297719a95c4f70fbfa32e0fa4e38cdd475dc | [
"MIT"
] | 5 | 2020-10-25T09:18:58.000Z | 2021-05-23T22:57:55.000Z | from __future__ import unicode_literals
from .common import InfoExtractor
from ..utils import xpath_text
class TruTubeIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?trutube\.tv/(?:video/|nuevo/player/embed\.php\?v=)(?P<id>[0-9]+)'
_TESTS = [{
'url': 'http://trutube.tv/video/14880/Ramses-II-Prov... | 33.02439 | 103 | 0.564993 |
c79d26555351b9df0aa6187150095f1bd88229bb | 49,506 | py | Python | src/sage/rings/rational_field.py | dimpase/sagetrac-mirror | 473cd41f19ec23df7e207391cfb0cf41c7c4ef46 | [
"BSL-1.0"
] | null | null | null | src/sage/rings/rational_field.py | dimpase/sagetrac-mirror | 473cd41f19ec23df7e207391cfb0cf41c7c4ef46 | [
"BSL-1.0"
] | null | null | null | src/sage/rings/rational_field.py | dimpase/sagetrac-mirror | 473cd41f19ec23df7e207391cfb0cf41c7c4ef46 | [
"BSL-1.0"
] | null | null | null | r"""
Field `\QQ` of Rational Numbers
The class :class:`RationalField` represents the field `\QQ` of (arbitrary
precision) rational numbers. Each rational number is an instance of the class
:class:`Rational`.
Interactively, an instance of :class:`RationalField` is available as ``QQ``::
sage: QQ
Rational Field... | 29.052817 | 121 | 0.527492 |
ef530897b4902724689208e045c730399611aed8 | 1,520 | py | Python | lnt/commands/kill.py | fold-team/lnt | d0724a8830a615acc69aaabfa103f9ed8f246e3b | [
"MIT"
] | 2 | 2019-08-07T17:58:23.000Z | 2019-11-05T21:39:59.000Z | lnt/commands/kill.py | fold-team/lnt | d0724a8830a615acc69aaabfa103f9ed8f246e3b | [
"MIT"
] | 19 | 2019-08-07T18:00:13.000Z | 2020-12-03T17:21:01.000Z | lnt/commands/kill.py | thesis/lnd-tools | d0724a8830a615acc69aaabfa103f9ed8f246e3b | [
"MIT"
] | 1 | 2019-11-05T21:38:29.000Z | 2019-11-05T21:38:29.000Z | # Mark 3rd party imports
import click
# Mark Local imports
import lnt.rpc.rpc_pb2 as ln
from lnt.rpc.api import getChanInfo, closeChannel
from .utils import utils
def channel(ctx):
testnet = ctx.parent.parent.config['LNT'].get('testnet', False)
chan_info = getChanInfo(ctx, ctx.channel_id)
funding_txid, o... | 36.190476 | 155 | 0.673026 |
3c825010a64d382797f5f4bf6c888928f88500b1 | 8,737 | py | Python | autoutils/color.py | rezazeiny/autoutils | 457a292679cc1c55679bc02af6867e0065949fe5 | [
"MIT"
] | null | null | null | autoutils/color.py | rezazeiny/autoutils | 457a292679cc1c55679bc02af6867e0065949fe5 | [
"MIT"
] | null | null | null | autoutils/color.py | rezazeiny/autoutils | 457a292679cc1c55679bc02af6867e0065949fe5 | [
"MIT"
] | null | null | null | """
Easy tools for nice string and printing
"""
__author__ = ('Reza Zeiny <rezazeiny1998@gmail.com>',)
import logging
import os
from datetime import datetime
from enum import Enum
from typing import Tuple, List
try:
from blessings import Terminal
except ImportError:
Terminal = None
logger = logging.getLo... | 29.616949 | 117 | 0.594712 |
02e4dcd8b6e2c7a7c5196d4046e534a48d888f20 | 10,236 | py | Python | implementation-contributed/v8/test262/testcfg.py | ajvincent/test262 | 51f7c9ad991d1f9ada196cbc0fb7ffc22af92379 | [
"BSD-3-Clause"
] | null | null | null | implementation-contributed/v8/test262/testcfg.py | ajvincent/test262 | 51f7c9ad991d1f9ada196cbc0fb7ffc22af92379 | [
"BSD-3-Clause"
] | null | null | null | implementation-contributed/v8/test262/testcfg.py | ajvincent/test262 | 51f7c9ad991d1f9ada196cbc0fb7ffc22af92379 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2012 the V8 project authors. 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 conditi... | 39.674419 | 80 | 0.680051 |
640b66a2d176de802cd939d276d656e7f1359cb8 | 6,517 | py | Python | dnacentersdk/models/validators/v2_1_2/jsd_1e962af345b8b59f.py | oboehmer/dnacentersdk | 25c4e99900640deee91a56aa886874d9cb0ca960 | [
"MIT"
] | 32 | 2019-09-05T05:16:56.000Z | 2022-03-22T09:50:38.000Z | dnacentersdk/models/validators/v2_1_2/jsd_1e962af345b8b59f.py | oboehmer/dnacentersdk | 25c4e99900640deee91a56aa886874d9cb0ca960 | [
"MIT"
] | 35 | 2019-09-07T18:58:54.000Z | 2022-03-24T19:29:36.000Z | dnacentersdk/models/validators/v2_1_2/jsd_1e962af345b8b59f.py | oboehmer/dnacentersdk | 25c4e99900640deee91a56aa886874d9cb0ca960 | [
"MIT"
] | 18 | 2019-09-09T11:07:21.000Z | 2022-03-25T08:49:59.000Z | # -*- coding: utf-8 -*-
"""Cisco DNA Center Add Virtual Account data model.
Copyright (c) 2019-2021 Cisco Systems.
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 w... | 26.709016 | 78 | 0.340648 |
6c0f8c3f91e9f91b28d66099f9f3c990902ba229 | 11,069 | py | Python | tests/test_content.py | andymckay/amo-validator | d13e3644eb657e56666ee40d91a9c67382cfa725 | [
"BSD-3-Clause"
] | null | null | null | tests/test_content.py | andymckay/amo-validator | d13e3644eb657e56666ee40d91a9c67382cfa725 | [
"BSD-3-Clause"
] | null | null | null | tests/test_content.py | andymckay/amo-validator | d13e3644eb657e56666ee40d91a9c67382cfa725 | [
"BSD-3-Clause"
] | null | null | null | from nose.tools import eq_
from helper import MockXPI
from js_helper import _do_test_raw
import validator.xpi as xpi
import validator.testcases.content as content
from validator.errorbundler import ErrorBundle
from validator.chromemanifest import ChromeManifest
from validator.constants import *
def test_xpcnativewr... | 33.340361 | 79 | 0.595627 |
bf0558d6bcd7c07da91704d81aa00a89f896b56c | 2,684 | py | Python | src/event/models.py | mr8bit/lambda-react-redux | 1e0dab401d19cd360675d843f89fc4273ab753ec | [
"MIT"
] | 1 | 2018-03-14T18:25:24.000Z | 2018-03-14T18:25:24.000Z | src/event/models.py | mr8bit/lambda-react-redux | 1e0dab401d19cd360675d843f89fc4273ab753ec | [
"MIT"
] | 13 | 2018-02-18T21:40:31.000Z | 2018-04-29T23:05:26.000Z | src/event/models.py | mr8bit/lambda-react-redux | 1e0dab401d19cd360675d843f89fc4273ab753ec | [
"MIT"
] | null | null | null | import locale
from colorfield.fields import ColorField
from django.db import models
from django.conf import settings
from ckeditor.fields import RichTextField
class Category(models.Model):
title = models.CharField(verbose_name="Название", max_length=120)
color = ColorField(verbose_name="Цвет", default='#FF000... | 37.277778 | 120 | 0.675857 |
55614e396bee3f105f2ef0f67718ef59b31df7d3 | 914 | py | Python | variation/classifiers/genomic_delins_classifier.py | cancervariants/varlex | 3806317fa0125c3098e80124d5169fe6a13d50db | [
"MIT"
] | null | null | null | variation/classifiers/genomic_delins_classifier.py | cancervariants/varlex | 3806317fa0125c3098e80124d5169fe6a13d50db | [
"MIT"
] | 15 | 2019-10-23T17:35:42.000Z | 2020-05-05T21:04:01.000Z | variation/classifiers/genomic_delins_classifier.py | cancervariants/varlex | 3806317fa0125c3098e80124d5169fe6a13d50db | [
"MIT"
] | null | null | null | """A module for the Genomic DelIns Classifier."""
from typing import List
from variation.schemas.classification_response_schema import ClassificationType
from .set_based_classifier import SetBasedClassifier
class GenomicDelInsClassifier(SetBasedClassifier):
"""The Genomic DelIns Classifier class."""
def cla... | 36.56 | 79 | 0.677243 |
4034d2006d51e49d8d5f48e2da93ffa6aa440d86 | 1,247 | py | Python | generate.py | bremersj/error-coding | be49f1c305231ca3aedecb4c06b6f222f73252c4 | [
"Apache-2.0"
] | null | null | null | generate.py | bremersj/error-coding | be49f1c305231ca3aedecb4c06b6f222f73252c4 | [
"Apache-2.0"
] | null | null | null | generate.py | bremersj/error-coding | be49f1c305231ca3aedecb4c06b6f222f73252c4 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Mon Jan 8 16:57:46 2018
@author: steve
Functions to generate random matrices and files with random characters.
"""
import numpy as np
AZ = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
def gen_rand_matrix(output_fn, row, col, low, high):
result = []
print('Starting...')
for ... | 24.45098 | 71 | 0.577386 |
dbd5b56b693bc4b46754257dd6038360095145e7 | 2,782 | py | Python | model-optimizer/extensions/front/squared_difference_test.py | zhoub/dldt | e42c01cf6e1d3aefa55e2c5df91f1054daddc575 | [
"Apache-2.0"
] | 3 | 2020-02-09T23:25:37.000Z | 2021-01-19T09:44:12.000Z | model-optimizer/extensions/front/squared_difference_test.py | zhoub/dldt | e42c01cf6e1d3aefa55e2c5df91f1054daddc575 | [
"Apache-2.0"
] | null | null | null | model-optimizer/extensions/front/squared_difference_test.py | zhoub/dldt | e42c01cf6e1d3aefa55e2c5df91f1054daddc575 | [
"Apache-2.0"
] | 2 | 2020-04-18T16:24:39.000Z | 2021-01-19T09:42:19.000Z | """
Copyright (c) 2019 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in wri... | 42.8 | 113 | 0.575485 |
941e127b481b802c9bdee06e7fc8932e7ec5b322 | 1,720 | py | Python | src/threads/queryThread.py | Alopex4/spruce | 2bf0bae18fe9b0d13691f2ee926071635cbe7c6f | [
"MIT"
] | 1 | 2019-07-04T10:32:07.000Z | 2019-07-04T10:32:07.000Z | src/threads/queryThread.py | Alopex4/spruce | 2bf0bae18fe9b0d13691f2ee926071635cbe7c6f | [
"MIT"
] | null | null | null | src/threads/queryThread.py | Alopex4/spruce | 2bf0bae18fe9b0d13691f2ee926071635cbe7c6f | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import requests
from PyQt5 import QtCore
class QueryThread(QtCore.QThread):
finishSignal = QtCore.pyqtSignal(bool)
jsonSignal = QtCore.pyqtSignal(str)
infoSignal = QtCore.pyqtSignal(str, str)
# def __init__(self, ip, token='80977e50c0ef36'):
# s... | 31.851852 | 79 | 0.582558 |
a44cd1ac9a8d8472dc1d59a6903bdfe20016a5db | 1,038 | py | Python | python/hello.py | dhavalpowar/learn | 6d73d6f2ee8ac35966fd5f89a5072ddbf0985e94 | [
"MIT"
] | null | null | null | python/hello.py | dhavalpowar/learn | 6d73d6f2ee8ac35966fd5f89a5072ddbf0985e94 | [
"MIT"
] | null | null | null | python/hello.py | dhavalpowar/learn | 6d73d6f2ee8ac35966fd5f89a5072ddbf0985e94 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
""" This is my first Python program """
NUMBER = 10
def my_func():
"""My first function """
msg = '''Printing
the
List'''
print msg
num_list = range(10)
for num in num_list:
print num
def some_function():
"""My second function """
try:
# Divisi... | 27.315789 | 87 | 0.654143 |
efffc4da7b13646d32419d9346013fc026dbc283 | 2,636 | py | Python | UnleashClient/strategies/Strategy.py | wbolster/unleash-client-python | c885f2966474f6449a47166e7dd5705f0be2b5e8 | [
"MIT"
] | null | null | null | UnleashClient/strategies/Strategy.py | wbolster/unleash-client-python | c885f2966474f6449a47166e7dd5705f0be2b5e8 | [
"MIT"
] | null | null | null | UnleashClient/strategies/Strategy.py | wbolster/unleash-client-python | c885f2966474f6449a47166e7dd5705f0be2b5e8 | [
"MIT"
] | null | null | null | # pylint: disable=dangerous-default-value
import warnings
from UnleashClient.constraints import Constraint
class Strategy:
"""
The parent class for default and custom strategies.
In general, default & custom classes should only need to override:
* __init__() - Depending on the parameters your feature... | 32.146341 | 118 | 0.632777 |
67fce80763a0bae673d848b284855cf1901bc964 | 573 | py | Python | onetime_fixing_base.py | ucsb-seclab/hacrs-input-generator | 7de089518541e3d0841622bcd3c950c7d83adc33 | [
"BSD-2-Clause"
] | 3 | 2019-12-20T02:04:42.000Z | 2019-12-20T02:04:51.000Z | onetime_fixing_base.py | ucsb-seclab/hacrs-input-generator | 7de089518541e3d0841622bcd3c950c7d83adc33 | [
"BSD-2-Clause"
] | null | null | null | onetime_fixing_base.py | ucsb-seclab/hacrs-input-generator | 7de089518541e3d0841622bcd3c950c7d83adc33 | [
"BSD-2-Clause"
] | null | null | null | import os
from config import *
base_dir = DESKTOP_BASE_DIR
def iterate_through_challenges(callback):
for event in EVENTS:
event_dir = get_challenges_dir(base_dir, event)
challenges = os.listdir(event_dir)
for challenge_name in challenges:
challenge_dir = os.path.join(event_d... | 28.65 | 87 | 0.664921 |
268f060d56cc66b7fba8fddf5278e9c2b204fff5 | 4,052 | py | Python | core/utils/validate_path_util.py | AsiganTheSunk/python3-gnosis-cli | c4c2638aa75b8a8268ad899d6cea1e602227ef19 | [
"MIT"
] | null | null | null | core/utils/validate_path_util.py | AsiganTheSunk/python3-gnosis-cli | c4c2638aa75b8a8268ad899d6cea1e602227ef19 | [
"MIT"
] | null | null | null | core/utils/validate_path_util.py | AsiganTheSunk/python3-gnosis-cli | c4c2638aa75b8a8268ad899d6cea1e602227ef19 | [
"MIT"
] | null | null | null | import errno
import os
import sys
# Sadly, Python fails to provide the following magic number for us.
ERROR_INVALID_NAME = 123
"""
Windows-specific error code indicating an invalid pathname.
See Also
----------
https://msdn.microsoft.com/en-us/library/windows/desktop/ms681382%28v=vs.85%29.aspx
Official listing of... | 47.116279 | 123 | 0.644126 |
47872f8e7c4856376a7387b557797e7d7eb9c882 | 193 | py | Python | syn/conf/__init__.py | mbodenhamer/syn | aeaa3ad8a49bac8f50cf89b6f1fe97ad43d1d258 | [
"MIT"
] | 1 | 2021-07-15T08:55:12.000Z | 2021-07-15T08:55:12.000Z | syn/conf/__init__.py | mbodenhamer/syn | aeaa3ad8a49bac8f50cf89b6f1fe97ad43d1d258 | [
"MIT"
] | 7 | 2021-01-07T23:51:57.000Z | 2021-12-13T19:50:57.000Z | syn/conf/__init__.py | mbodenhamer/syn | aeaa3ad8a49bac8f50cf89b6f1fe97ad43d1d258 | [
"MIT"
] | 2 | 2016-07-11T08:46:31.000Z | 2017-12-13T13:30:51.000Z | from .conf import *
from .conf2 import *
from .vars import *
from syn.base_utils import harvest_metadata, delete
with delete(harvest_metadata, delete):
harvest_metadata('../metadata.yml')
| 24.125 | 51 | 0.761658 |
aacf40484506b81e235aea83af9ad36be5ae25ca | 1,683 | py | Python | src/asldro/test_examples.py | gold-standard-phantoms/asldro | 6ae82ed69d66fed64e1e54e5394cc3b5d8dbe1bd | [
"MIT"
] | 3 | 2021-03-09T15:51:32.000Z | 2021-05-19T13:05:18.000Z | src/asldro/test_examples.py | gold-standard-phantoms/asldro | 6ae82ed69d66fed64e1e54e5394cc3b5d8dbe1bd | [
"MIT"
] | null | null | null | src/asldro/test_examples.py | gold-standard-phantoms/asldro | 6ae82ed69d66fed64e1e54e5394cc3b5d8dbe1bd | [
"MIT"
] | null | null | null | """ Example tests - only run when --runslow is passed to pytest """
import pytest
from asldro.examples import run_full_pipeline
from asldro.validators.user_parameter_input import get_example_input_params
@pytest.mark.slow
def test_run_full_pipeline():
""" Runs the full ASL DRO pipeline """
run_full_pipeline(... | 35.808511 | 82 | 0.730838 |
565040db7214d4de79c3eeb49041b63d3853aefb | 235 | py | Python | Pilling Up.py | purva-saxena/Python-programming | 9458ddca9fc890eeb1fb3a16ceed74cedfcb116d | [
"MIT"
] | 14 | 2020-09-29T07:29:33.000Z | 2020-11-03T04:26:39.000Z | Pilling Up.py | purva-saxena/Python-programming | 9458ddca9fc890eeb1fb3a16ceed74cedfcb116d | [
"MIT"
] | 4 | 2020-10-23T18:10:50.000Z | 2020-10-29T18:39:20.000Z | Pilling Up.py | purva-saxena/Python-programming | 9458ddca9fc890eeb1fb3a16ceed74cedfcb116d | [
"MIT"
] | 5 | 2020-10-15T23:49:29.000Z | 2020-10-28T20:16:42.000Z | def pillingup():
user_in = int(input())
user_list = list(map(int, input().split()))
if len(user_list) % 2 == 0:
print('Yes')
else:
print('No')
user = int(input())
for i in range(user):
pillingup()
| 18.076923 | 47 | 0.540426 |
62eaf9c8fda486cf72fbff1a42d58b90cc61a7c2 | 10,744 | py | Python | chips/memory/at24/at24.py | ariegg/webiopi-drivers | 47c3ce9c53c6928998acbdb259b06f47da2b634d | [
"Apache-2.0"
] | 2 | 2018-01-18T08:09:02.000Z | 2018-01-18T08:09:10.000Z | chips/memory/at24/at24.py | ariegg/webiopi-drivers | 47c3ce9c53c6928998acbdb259b06f47da2b634d | [
"Apache-2.0"
] | null | null | null | chips/memory/at24/at24.py | ariegg/webiopi-drivers | 47c3ce9c53c6928998acbdb259b06f47da2b634d | [
"Apache-2.0"
] | null | null | null | # Copyright 2014-2016 Andreas Riegg - t-h-i-n-x.net
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 38.508961 | 105 | 0.630491 |
daf2e4448444f6b7b6f873e271eec07b67fd63d4 | 607 | py | Python | bitmovin_api_sdk/encoding/encodings/input_streams/trimming/h264_picture_timing/h264_picture_timing_trimming_input_stream_list_query_params.py | jaythecaesarean/bitmovin-api-sdk-python | 48166511fcb9082041c552ace55a9b66cc59b794 | [
"MIT"
] | 11 | 2019-07-03T10:41:16.000Z | 2022-02-25T21:48:06.000Z | bitmovin_api_sdk/encoding/encodings/input_streams/trimming/h264_picture_timing/h264_picture_timing_trimming_input_stream_list_query_params.py | jaythecaesarean/bitmovin-api-sdk-python | 48166511fcb9082041c552ace55a9b66cc59b794 | [
"MIT"
] | 8 | 2019-11-23T00:01:25.000Z | 2021-04-29T12:30:31.000Z | bitmovin_api_sdk/encoding/encodings/input_streams/trimming/h264_picture_timing/h264_picture_timing_trimming_input_stream_list_query_params.py | jaythecaesarean/bitmovin-api-sdk-python | 48166511fcb9082041c552ace55a9b66cc59b794 | [
"MIT"
] | 13 | 2020-01-02T14:58:18.000Z | 2022-03-26T12:10:30.000Z | class H264PictureTimingTrimmingInputStreamListQueryParams(object):
def __init__(self, offset=None, limit=None):
# type: (int, int) -> None
super(H264PictureTimingTrimmingInputStreamListQueryParams, self).__init__()
self.offset = offset
self.limit = limit
@property
def opena... | 23.346154 | 83 | 0.568369 |
50d231edff357e1727e31436e1cf401953058988 | 4,252 | py | Python | var/spack/repos/builtin/packages/py-petsc4py/package.py | VladimirUspenskii/spack | 18b83c3833c0e138a7153bbb14e68b1147b3f3d1 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | var/spack/repos/builtin/packages/py-petsc4py/package.py | VladimirUspenskii/spack | 18b83c3833c0e138a7153bbb14e68b1147b3f3d1 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 6 | 2022-01-08T08:41:11.000Z | 2022-03-14T19:28:07.000Z | var/spack/repos/builtin/packages/py-petsc4py/package.py | foeroyingur/spack | 5300cbbb2e569190015c72d0970d25425ea38647 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | # Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class PyPetsc4py(PythonPackage):
"""This package provides Python bindings for the PETSc package.... | 54.512821 | 96 | 0.726246 |
cf3613087207102e7adb45f4110d374cab375778 | 493 | py | Python | bets/migrations/0002_auto_20181113_1931.py | tmooney/zach-loss-counter | 979a212b63695b34c201cdeec1309519422b0bae | [
"MIT"
] | null | null | null | bets/migrations/0002_auto_20181113_1931.py | tmooney/zach-loss-counter | 979a212b63695b34c201cdeec1309519422b0bae | [
"MIT"
] | 5 | 2019-01-08T18:35:19.000Z | 2019-03-26T17:58:09.000Z | bets/migrations/0002_auto_20181113_1931.py | tmooney/zach-loss-counter | 979a212b63695b34c201cdeec1309519422b0bae | [
"MIT"
] | 3 | 2018-11-27T18:06:52.000Z | 2019-03-12T18:02:03.000Z | # Generated by Django 2.1.3 on 2018-11-13 19:31
import bets.enums
from django.db import migrations
import enumchoicefield.fields
class Migration(migrations.Migration):
dependencies = [
('bets', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='bet',
... | 23.47619 | 133 | 0.653144 |
167bfe0de3bfaf78dad93b104fac4df4163bb15b | 3,903 | py | Python | synapse/streams/config.py | iot-factory/synapse | d3ac8fd87d85bd40d40b475d7a6f12f74ea0ddb0 | [
"Apache-2.0"
] | null | null | null | synapse/streams/config.py | iot-factory/synapse | d3ac8fd87d85bd40d40b475d7a6f12f74ea0ddb0 | [
"Apache-2.0"
] | null | null | null | synapse/streams/config.py | iot-factory/synapse | d3ac8fd87d85bd40d40b475d7a6f12f74ea0ddb0 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2014, 2015 OpenMarket Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 33.358974 | 78 | 0.6103 |
7c4f7105e176917846e2a4e56495d8a19e32b777 | 539 | py | Python | application.py | shubhamdipt/live-stream | 9b8e1aaafa69cb55def278f0245c06f9b441ca43 | [
"MIT"
] | null | null | null | application.py | shubhamdipt/live-stream | 9b8e1aaafa69cb55def278f0245c06f9b441ca43 | [
"MIT"
] | null | null | null | application.py | shubhamdipt/live-stream | 9b8e1aaafa69cb55def278f0245c06f9b441ca43 | [
"MIT"
] | null | null | null | from flask import Flask
from flask_basicauth import BasicAuth
import secrets
import configparser
app = Flask(__name__, template_folder='templates')
CONFIG = configparser.ConfigParser()
CONFIG.read("config.ini")
app.config['BASIC_AUTH_USERNAME'] = CONFIG["LIVESTREAM"]["username"]
app.config['BASIC_AUTH_PASSWORD'] = ... | 23.434783 | 68 | 0.769944 |
c2fd6291a328e9abad23bf5994edf6e432a837f1 | 17,760 | py | Python | ixnetwork_restpy/testplatform/sessions/ixnetwork/vport/protocolstack/dot1xrange_10a55379a7ab5b6c45876e08a693553f.py | OpenIxia/ixnetwork_restpy | f628db450573a104f327cf3c737ca25586e067ae | [
"MIT"
] | 20 | 2019-05-07T01:59:14.000Z | 2022-02-11T05:24:47.000Z | ixnetwork_restpy/testplatform/sessions/ixnetwork/vport/protocolstack/dot1xrange_0abc774b13abfe52478567e307225851.py | OpenIxia/ixnetwork_restpy | f628db450573a104f327cf3c737ca25586e067ae | [
"MIT"
] | 60 | 2019-04-03T18:59:35.000Z | 2022-02-22T12:05:05.000Z | ixnetwork_restpy/testplatform/sessions/ixnetwork/vport/protocolstack/dot1xrange_baa2114767a0f0b53b62b84b6392e6ad.py | OpenIxia/ixnetwork_restpy | f628db450573a104f327cf3c737ca25586e067ae | [
"MIT"
] | 13 | 2019-05-20T10:48:31.000Z | 2021-10-06T07:45:44.000Z | # MIT LICENSE
#
# Copyright 1997 - 2020 by IXIA Keysight
#
# 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, modify,... | 40.921659 | 264 | 0.634122 |
33cea7dcad93c9d88fdb8de79744dda6352f69a5 | 9,439 | py | Python | tsfresh/convenience/relevant_extraction.py | loiccoyle/tsfresh | 122e6be4e521483a3a0745a05431ed74b18cd52e | [
"MIT"
] | 51 | 2019-02-01T19:43:37.000Z | 2022-03-16T09:07:03.000Z | tsfresh/convenience/relevant_extraction.py | loiccoyle/tsfresh | 122e6be4e521483a3a0745a05431ed74b18cd52e | [
"MIT"
] | 2 | 2019-02-23T18:54:22.000Z | 2019-11-09T01:30:32.000Z | tsfresh/convenience/relevant_extraction.py | loiccoyle/tsfresh | 122e6be4e521483a3a0745a05431ed74b18cd52e | [
"MIT"
] | 35 | 2019-02-08T02:00:31.000Z | 2022-03-01T23:17:00.000Z | # -*- coding: utf-8 -*-
# This file as well as the whole tsfresh package are licenced under the MIT licence (see the LICENCE.txt)
# Maximilian Christ (maximilianchrist.com), Blue Yonder Gmbh, 2016
from __future__ import absolute_import
import pandas as pd
from tsfresh.feature_extraction import extract_features
from ts... | 51.862637 | 124 | 0.671469 |
255c4ca8e21929183b5ad1e6f60d3c5dc73c1cb1 | 43,308 | py | Python | rest_framework_swagger/introspectors.py | visasq/django-rest-swagger | 0d7acb7f42a7f32b238801540f1db790859041d1 | [
"BSD-2-Clause"
] | null | null | null | rest_framework_swagger/introspectors.py | visasq/django-rest-swagger | 0d7acb7f42a7f32b238801540f1db790859041d1 | [
"BSD-2-Clause"
] | 9 | 2020-06-05T17:07:13.000Z | 2022-01-13T00:36:30.000Z | rest_framework_swagger/introspectors.py | visasq/django-rest-swagger | 0d7acb7f42a7f32b238801540f1db790859041d1 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""Handles the instrospection of REST Framework Views and ViewSets."""
import inspect
import itertools
import re
import types
import yaml
import importlib
from .compat import OrderedDict, strip_tags, get_pagination_attribures
from abc import ABCMeta, abstractmethod
from django.http import Ht... | 33.28824 | 146 | 0.594093 |
bf66be76db3ee634937e831ea3550e5ee822d0a5 | 3,378 | py | Python | Decoder/make.py | ra-app/Broadway | d32f9deb2c39f15ba3f9ec5105f5cd31e244bd2d | [
"BSD-3-Clause"
] | 1,762 | 2015-01-01T02:58:37.000Z | 2022-03-25T08:20:09.000Z | Sight_Client/Broadway/Decoder/make.py | benjha/SightOptix | 148772d1cffdf9cc8c8d7a29dc3872b633ce89c4 | [
"ECL-2.0",
"Apache-2.0"
] | 217 | 2015-01-05T13:36:19.000Z | 2022-03-07T12:00:23.000Z | Sight_Client/Broadway/Decoder/make.py | benjha/SightOptix | 148772d1cffdf9cc8c8d7a29dc3872b633ce89c4 | [
"ECL-2.0",
"Apache-2.0"
] | 361 | 2015-01-12T08:31:10.000Z | 2022-03-21T17:50:21.000Z | #!/usr/bin/python
import os, sys, re, json, shutil
from subprocess import Popen, PIPE, STDOUT
exec(open(os.path.expanduser('~/.emscripten'), 'r').read())
sys.path.append(EMSCRIPTEN_ROOT)
import tools.shared as emscripten
emcc_args = [
#'-m32',
'-O3',
#'-Dxxx2yyy'
'--memory-init-file', '1',
'--llvm-opts', ... | 29.373913 | 259 | 0.649793 |
8b4c8a671a871dbe2b05d43eb0473a31e6c48d95 | 6,841 | py | Python | src/tuning/holdout_validation/run_parameter_search_user_item_all.py | riccardopoiani/recsys_2019 | 47a44d2f7d85e76e31dacf4ba2e69721d010b6b8 | [
"MIT"
] | 2 | 2020-10-01T11:08:32.000Z | 2020-11-25T11:05:37.000Z | src/tuning/holdout_validation/run_parameter_search_user_item_all.py | riccardopoiani/recsys_2019 | 47a44d2f7d85e76e31dacf4ba2e69721d010b6b8 | [
"MIT"
] | null | null | null | src/tuning/holdout_validation/run_parameter_search_user_item_all.py | riccardopoiani/recsys_2019 | 47a44d2f7d85e76e31dacf4ba2e69721d010b6b8 | [
"MIT"
] | 1 | 2020-10-01T11:08:33.000Z | 2020-10-01T11:08:33.000Z | import itertools
import multiprocessing
import os
from functools import partial
from skopt.space import Integer, Categorical, Real
from course_lib.ParameterTuning.SearchAbstractClass import SearchInputRecommenderArgs
from course_lib.ParameterTuning.SearchBayesianSkopt import SearchBayesianSkopt
def _get_feature_wei... | 59.486957 | 127 | 0.574331 |
824b327a2d5bc3a4d3ec1462604bf778d9e122c0 | 7,694 | py | Python | CNTK_Model.py | Tacklebox/CNTK-udacity-car-sim | 768f47afe80b1cc68bb581a544abccbde65c0ee7 | [
"MIT"
] | null | null | null | CNTK_Model.py | Tacklebox/CNTK-udacity-car-sim | 768f47afe80b1cc68bb581a544abccbde65c0ee7 | [
"MIT"
] | null | null | null | CNTK_Model.py | Tacklebox/CNTK-udacity-car-sim | 768f47afe80b1cc68bb581a544abccbde65c0ee7 | [
"MIT"
] | null | null | null |
# coding: utf-8
# In[ ]:
import pandas as pd # data analysis toolkit - create, read, update, delete datasets
import numpy as np #matrix math
from sklearn.model_selection import train_test_split #to split out training and testing data
#keras is a high level wrapper on top of tensorflow (machine learning library)
#T... | 41.815217 | 170 | 0.672212 |
d81b0eaa92f567214ea8624afcd44d481dc9856b | 19,680 | py | Python | font_to_py.py | briancappello/micropython-font-to-py | c5b9ce159d601312e529f0525f9a7e0288bbde6b | [
"MIT"
] | 6 | 2017-12-06T13:33:29.000Z | 2021-01-07T23:53:31.000Z | font_to_py.py | briancappello/micropython-font-to-py | c5b9ce159d601312e529f0525f9a7e0288bbde6b | [
"MIT"
] | null | null | null | font_to_py.py | briancappello/micropython-font-to-py | c5b9ce159d601312e529f0525f9a7e0288bbde6b | [
"MIT"
] | null | null | null | #! /usr/bin/python3
# -*- coding: utf-8 -*-
# Needs freetype-py>=1.0
# Implements multi-pass solution to setting an exact font height
# Some code adapted from Daniel Bader's work at the following URL
# http://dbader.org/blog/monochrome-font-rendering-with-freetype-and-python
# The MIT License (MIT)
#
# Copyright (c)... | 36.992481 | 97 | 0.602287 |
53f39fb1fef7c491ab8a33933c6d96c6e90e1b56 | 2,950 | py | Python | model/rcnn_emd_simple/config.py | erwulff/CrowdDet | 41d2d55b501e046d4e5cdba6aa5d3834fe026f19 | [
"MIT"
] | 389 | 2020-04-02T17:31:14.000Z | 2022-03-29T21:12:21.000Z | model/rcnn_emd_simple/config.py | erwulff/CrowdDet | 41d2d55b501e046d4e5cdba6aa5d3834fe026f19 | [
"MIT"
] | 76 | 2020-04-16T05:52:47.000Z | 2022-03-12T10:58:02.000Z | model/rcnn_emd_simple/config.py | erwulff/CrowdDet | 41d2d55b501e046d4e5cdba6aa5d3834fe026f19 | [
"MIT"
] | 87 | 2020-04-22T15:44:36.000Z | 2022-03-22T09:03:21.000Z | import os
import sys
import numpy as np
def add_path(path):
if path not in sys.path:
sys.path.insert(0, path)
root_dir = '../../'
add_path(os.path.join(root_dir))
add_path(os.path.join(root_dir, 'lib'))
class Crowd_human:
class_names = ['background', 'person']
num_classes = len(class_names)
... | 27.570093 | 75 | 0.656949 |
f1076b739052cb3a03041fdcca7d1f8c541cae44 | 651 | py | Python | plumbum/_testtools.py | damani42/plumbum | 55a5058ccc20745bae77db7b29ec7f1c1f9daef5 | [
"MIT"
] | null | null | null | plumbum/_testtools.py | damani42/plumbum | 55a5058ccc20745bae77db7b29ec7f1c1f9daef5 | [
"MIT"
] | null | null | null | plumbum/_testtools.py | damani42/plumbum | 55a5058ccc20745bae77db7b29ec7f1c1f9daef5 | [
"MIT"
] | null | null | null | import os
import platform
import sys
import pytest # type: ignore[import]
skip_without_chown = pytest.mark.skipif(
not hasattr(os, "chown"), reason="os.chown not supported"
)
skip_without_tty = pytest.mark.skipif(not sys.stdin.isatty(), reason="Not a TTY")
skip_on_windows = pytest.mark.skipif(
sys.platform... | 26.04 | 81 | 0.723502 |
a99b78bfbab64880a4aa42a4f0c18832a10ff205 | 1,055 | py | Python | compreface/client/__init__.py | exadel-inc/compreface-python-sdk | 2c7701095df97fcf78735fc50947940a6df8e883 | [
"Apache-2.0"
] | 20 | 2021-06-04T13:06:29.000Z | 2022-03-25T09:46:51.000Z | compreface/client/__init__.py | exadel-inc/compreface-python-sdk | 2c7701095df97fcf78735fc50947940a6df8e883 | [
"Apache-2.0"
] | 5 | 2021-07-21T20:13:32.000Z | 2021-12-08T16:20:08.000Z | compreface/client/__init__.py | exadel-inc/compreface-python-sdk | 2c7701095df97fcf78735fc50947940a6df8e883 | [
"Apache-2.0"
] | 9 | 2021-06-06T00:27:35.000Z | 2022-03-16T05:00:10.000Z | """
Copyright(c) 2021 the original author or authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https: // www.apache.org/licenses/LICENSE-2.0
Unless required by ap... | 43.958333 | 73 | 0.805687 |
28e174bcc9020dddb186ac07fda12a0aa35d7e6a | 4,316 | py | Python | kubevirt/models/k8s_io_api_core_v1_object_field_selector.py | gabriel-samfira/client-python | c2e184c3cad6797af35b0160a36ffcbba77284a7 | [
"Apache-2.0"
] | 21 | 2018-02-21T23:59:28.000Z | 2021-12-08T05:47:37.000Z | kubevirt/models/k8s_io_api_core_v1_object_field_selector.py | gabriel-samfira/client-python | c2e184c3cad6797af35b0160a36ffcbba77284a7 | [
"Apache-2.0"
] | 47 | 2018-02-01T15:35:01.000Z | 2022-02-11T07:45:54.000Z | kubevirt/models/k8s_io_api_core_v1_object_field_selector.py | gabriel-samfira/client-python | c2e184c3cad6797af35b0160a36ffcbba77284a7 | [
"Apache-2.0"
] | 19 | 2018-04-03T09:20:52.000Z | 2021-06-01T06:07:28.000Z | # coding: utf-8
"""
KubeVirt API
This is KubeVirt API an add-on for Kubernetes.
OpenAPI spec version: 1.0.0
Contact: kubevirt-dev@googlegroups.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
class K8sIoApi... | 27.845161 | 87 | 0.586423 |
3353f47ba027706f5f9223f2273d9ce7f65a17fd | 1,508 | py | Python | app/startupscreen.py | S0AndS0/ExpenseTracker | 9f024184c499c3af9421d872168447a9c9fae45b | [
"MIT"
] | null | null | null | app/startupscreen.py | S0AndS0/ExpenseTracker | 9f024184c499c3af9421d872168447a9c9fae45b | [
"MIT"
] | null | null | null | app/startupscreen.py | S0AndS0/ExpenseTracker | 9f024184c499c3af9421d872168447a9c9fae45b | [
"MIT"
] | null | null | null | from kivy.uix.screenmanager import Screen
from kivy.properties import ObjectProperty
from kivy.app import App
startupscreen = '''
<StartupScreen>
name: 'StartupScreen'
canvas.before:
Color:
rgba: (0,0,0,1)
Rectangle:
size: self.size
pos: self.pos
Image
... | 27.418182 | 74 | 0.627321 |
e450559e3e280000c19c4cc3c3faa893d6af555d | 1,562 | py | Python | samples/generated_samples/dialogflow_generated_dialogflowcx_v3beta1_agents_get_agent_validation_result_sync.py | nicain/python-dialogflow-cx | 2292ff540aea24c3c831a5ffe1604c2c022ccb82 | [
"Apache-2.0"
] | null | null | null | samples/generated_samples/dialogflow_generated_dialogflowcx_v3beta1_agents_get_agent_validation_result_sync.py | nicain/python-dialogflow-cx | 2292ff540aea24c3c831a5ffe1604c2c022ccb82 | [
"Apache-2.0"
] | null | null | null | samples/generated_samples/dialogflow_generated_dialogflowcx_v3beta1_agents_get_agent_validation_result_sync.py | nicain/python-dialogflow-cx | 2292ff540aea24c3c831a5ffe1604c2c022ccb82 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 33.956522 | 88 | 0.777209 |
a1f053b8079db1077148ab913813573a0bdbf5e3 | 207 | py | Python | setup_bgmapi.py | wattlebird/Bangumi_Spider | f221614714e9f257c1d667fa5a7f1fcb43587371 | [
"BSD-2-Clause"
] | 19 | 2015-01-28T08:09:34.000Z | 2021-12-18T05:40:52.000Z | setup_bgmapi.py | wattlebird/Bangumi_Spider | f221614714e9f257c1d667fa5a7f1fcb43587371 | [
"BSD-2-Clause"
] | null | null | null | setup_bgmapi.py | wattlebird/Bangumi_Spider | f221614714e9f257c1d667fa5a7f1fcb43587371 | [
"BSD-2-Clause"
] | 7 | 2015-06-16T06:32:11.000Z | 2021-11-02T11:40:03.000Z | from setuptools import setup, find_packages
setup(
name = 'project',
version = '1.0',
packages = find_packages(),
entry_points = {'scrapy': ['settings = bgmapi.settings']},
) | 29.571429 | 62 | 0.599034 |
a9503608b7f25eed6f965499e2f2bddb961dd774 | 23,018 | py | Python | python/pyspark/ml/regression.py | tianyi/spark | b3a7480ab0821ab38f710de96e3ac4a13f62dbca | [
"Apache-2.0",
"MIT"
] | null | null | null | python/pyspark/ml/regression.py | tianyi/spark | b3a7480ab0821ab38f710de96e3ac4a13f62dbca | [
"Apache-2.0",
"MIT"
] | null | null | null | python/pyspark/ml/regression.py | tianyi/spark | b3a7480ab0821ab38f710de96e3ac4a13f62dbca | [
"Apache-2.0",
"MIT"
] | 15 | 2017-01-12T10:41:50.000Z | 2019-04-19T08:28:15.000Z | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | 40.957295 | 100 | 0.629116 |
cabdd80e716ef844ab0753c98ec1154caa5a528c | 607 | py | Python | build_database.py | damiiegregorio/jobmonitorservice | 24e80f19ca8dce9eef681b91d534e5329cd81dd9 | [
"MIT"
] | null | null | null | build_database.py | damiiegregorio/jobmonitorservice | 24e80f19ca8dce9eef681b91d534e5329cd81dd9 | [
"MIT"
] | null | null | null | build_database.py | damiiegregorio/jobmonitorservice | 24e80f19ca8dce9eef681b91d534e5329cd81dd9 | [
"MIT"
] | null | null | null | import os
from config import db
from models import Job
import uuid
# Data to initialize database with
JOBS = [
# {'job_id ': uuid.uuid1(), 'app_name': 'Telegram', 'state': 'PROCESSING'},
{'app_name': 'Telegram', 'state': 'PROCESSING'},
]
# Delete database file if it exists currently
if os.path.exi... | 23.346154 | 80 | 0.660626 |
aca5b564a401172e37c446c7a3e560a906dae4fd | 5,400 | py | Python | rpcb/dispatcher/batch_message_dispatch.py | kouyt5/rabbit-rpc-batch | f5f30b3da1c7de004206bfe9de0446ff61bada35 | [
"MIT"
] | null | null | null | rpcb/dispatcher/batch_message_dispatch.py | kouyt5/rabbit-rpc-batch | f5f30b3da1c7de004206bfe9de0446ff61bada35 | [
"MIT"
] | null | null | null | rpcb/dispatcher/batch_message_dispatch.py | kouyt5/rabbit-rpc-batch | f5f30b3da1c7de004206bfe9de0446ff61bada35 | [
"MIT"
] | null | null | null | from rpcb.message_dispatch import MessageDispatch
from rpcb.service import Service
import threading
import time
import random
import pika
import queue
import logging
import pika.adapters.blocking_connection
"""
消息调度器实现,用于批处理数据,多个数据来了会打包为一个batch输入到模型中,从而提高整体的吞吐量
"""
class BatchMessageDispatcher(MessageDispatch):
d... | 36.734694 | 141 | 0.616481 |
060eb6dd657d85e34da7387d19c2aa5b17c6458b | 7,378 | py | Python | models/rmc_vanilla.py | YuiZh0u/RelGAN | 740272542e04728fca859680e91420b82a7cd1c5 | [
"MIT"
] | 127 | 2019-02-19T04:42:58.000Z | 2022-03-16T12:01:25.000Z | models/rmc_vanilla.py | YuiZh0u/RelGAN | 740272542e04728fca859680e91420b82a7cd1c5 | [
"MIT"
] | 25 | 2019-03-26T08:36:50.000Z | 2020-12-17T17:32:38.000Z | models/rmc_vanilla.py | YuiZh0u/RelGAN | 740272542e04728fca859680e91420b82a7cd1c5 | [
"MIT"
] | 30 | 2019-04-12T16:13:26.000Z | 2022-02-25T12:37:42.000Z | import tensorflow as tf
from utils.models.relational_memory import RelationalMemory
from tensorflow.python.ops import tensor_array_ops, control_flow_ops
from utils.ops import *
# The generator network based on the Relational Memory
def generator(x_real, temperature, vocab_size, batch_size, seq_len, gen_emb_dim, mem_s... | 51.236111 | 120 | 0.684467 |
9c3cff3cb8004a0be53923646ea8d3ac17a5eaea | 1,576 | py | Python | src/minimalkb/services/lifespan.py | severin-lemaignan/minimalkb | 27da95173ae7392e7949d13e2cd4fad9ea48405f | [
"BSD-3-Clause"
] | 5 | 2015-06-22T18:47:13.000Z | 2020-08-25T23:31:19.000Z | src/minimalkb/services/lifespan.py | severin-lemaignan/minimalkb | 27da95173ae7392e7949d13e2cd4fad9ea48405f | [
"BSD-3-Clause"
] | 1 | 2021-02-25T14:15:41.000Z | 2021-02-25T22:24:30.000Z | src/minimalkb/services/lifespan.py | severin-lemaignan/minimalkb | 27da95173ae7392e7949d13e2cd4fad9ea48405f | [
"BSD-3-Clause"
] | 4 | 2017-06-08T06:11:03.000Z | 2022-01-27T16:14:21.000Z | import logging; logger = logging.getLogger("minimalKB."+__name__);
DEBUG_LEVEL=logging.DEBUG
import time
import datetime
import sqlite3
CLEANING_RATE = 2 #Hz
class SQLiteLifespanManager:
def __init__(self, database = "kb.db"):
self.db = sqlite3.connect(database)
self.running = True
logg... | 25.419355 | 108 | 0.53236 |
dd6bd6fb71cc83e0fdfb9cb93c77e5f808f8258b | 3,182 | py | Python | transformation/patsub/min_contour_filter.py | dpazel/music_rep | 2f9de9b98b13df98f1a0a2120b84714725ce527e | [
"MIT"
] | 1 | 2021-05-06T19:45:54.000Z | 2021-05-06T19:45:54.000Z | transformation/patsub/min_contour_filter.py | dpazel/music_rep | 2f9de9b98b13df98f1a0a2120b84714725ce527e | [
"MIT"
] | null | null | null | transformation/patsub/min_contour_filter.py | dpazel/music_rep | 2f9de9b98b13df98f1a0a2120b84714725ce527e | [
"MIT"
] | null | null | null | """
File: min_contour_filter.py
Purpose: To provide a ranking of patsub solutions.
"""
from structure.line import Line
from timemodel.offset import Offset
class MinContourFilter(object):
"""
For a given target pattern, and a set of results, e.g. patsub, based on the target pattern, rank the results
bes... | 37.880952 | 156 | 0.666248 |
fd4a680bdce9f4f8105ec745843bea91e1225f32 | 923 | py | Python | src/wai/annotations/subdir/specifier/_SubDirOutputFormatSpecifier.py | waikato-ufdl/wai-annotations-subdir | 071b82153f1a42e245c9c705e3b849a7b5f1e8e3 | [
"Apache-2.0"
] | null | null | null | src/wai/annotations/subdir/specifier/_SubDirOutputFormatSpecifier.py | waikato-ufdl/wai-annotations-subdir | 071b82153f1a42e245c9c705e3b849a7b5f1e8e3 | [
"Apache-2.0"
] | null | null | null | src/wai/annotations/subdir/specifier/_SubDirOutputFormatSpecifier.py | waikato-ufdl/wai-annotations-subdir | 071b82153f1a42e245c9c705e3b849a7b5f1e8e3 | [
"Apache-2.0"
] | null | null | null | from typing import Type, Tuple
from wai.annotations.core.component import Component
from wai.annotations.core.domain import DomainSpecifier
from wai.annotations.core.specifier import SinkStageSpecifier
class SubDirOutputFormatSpecifier(SinkStageSpecifier):
"""
Specifier of the components for writing image cl... | 35.5 | 98 | 0.755146 |
be7b01600b93fa87bda1a8e1f01ad0f74c7a22ad | 28 | py | Python | test1.py | Lapin1018/pyneta | 969fc65a064d85de498ee045ac41b49494cc5928 | [
"Apache-2.0"
] | null | null | null | test1.py | Lapin1018/pyneta | 969fc65a064d85de498ee045ac41b49494cc5928 | [
"Apache-2.0"
] | null | null | null | test1.py | Lapin1018/pyneta | 969fc65a064d85de498ee045ac41b49494cc5928 | [
"Apache-2.0"
] | null | null | null | 1 print ("show something")
| 9.333333 | 26 | 0.678571 |
c73ee0e3891290c740c27e87f2db31cdca70ff8e | 816 | py | Python | ooobuild/dyn/i18n/collator.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | ooobuild/dyn/i18n/collator.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | ooobuild/dyn/i18n/collator.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
#
# Copyright 2022 :Barry-Thomas-Paul: Moss
#
# Licensed under the Apache License, Version 2.0 (the "License")
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http: // www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 31.384615 | 74 | 0.75 |
ba3c2fc28968754a539ec57a5c95dc1059ef104b | 2,740 | py | Python | asgi_webdav/dev.py | ported-pw/asgi-webdav | 78bf1efcb7658ab3ead92292ff7ca574dfc22641 | [
"MIT"
] | null | null | null | asgi_webdav/dev.py | ported-pw/asgi-webdav | 78bf1efcb7658ab3ead92292ff7ca574dfc22641 | [
"MIT"
] | null | null | null | asgi_webdav/dev.py | ported-pw/asgi-webdav | 78bf1efcb7658ab3ead92292ff7ca574dfc22641 | [
"MIT"
] | null | null | null | # from asgi_webdav.middleware.debug import DebugMiddleware
from asgi_webdav.constants import AppEntryParameters
from asgi_webdav.server import get_asgi_app
# init config
config_object = {
"account_mapping": [
{
"username": "username",
"password": "password",
"permissions... | 29.148936 | 80 | 0.477372 |
02e2fc694d12c3dc40e454a0525b5c058a5903b0 | 4,079 | py | Python | tests/unit/test_get_mood.py | jmhossler/twitter-mood | 34dbee378a95ffc7a02e30925d248bc5f6685ce5 | [
"MIT"
] | null | null | null | tests/unit/test_get_mood.py | jmhossler/twitter-mood | 34dbee378a95ffc7a02e30925d248bc5f6685ce5 | [
"MIT"
] | 7 | 2018-03-20T02:14:02.000Z | 2021-06-01T22:07:32.000Z | tests/unit/test_get_mood.py | jmhossler/twitter-mood | 34dbee378a95ffc7a02e30925d248bc5f6685ce5 | [
"MIT"
] | null | null | null | from unittest.mock import MagicMock, patch
from twitter_mood.mood_gatherer import TwitterMoodGatherer
class TestGetMoodSuite:
def test_get_mood_empty_tweets(self):
twitter_mock = MagicMock()
mood_gatherer = TwitterMoodGatherer(twitter_mock, 'foo')
mood = mood_gatherer.get_mood()
as... | 39.990196 | 92 | 0.596225 |
35513c2f4b80973e52ee6375842b7e97b399e368 | 1,564 | py | Python | DeepLearningExamples/TensorFlow/Recommendation/VAE-CF/vae/metrics/recall.py | puririshi98/benchmark | 79f554f1e1cf36f62994c78e0e6e5b360f554022 | [
"BSD-3-Clause"
] | null | null | null | DeepLearningExamples/TensorFlow/Recommendation/VAE-CF/vae/metrics/recall.py | puririshi98/benchmark | 79f554f1e1cf36f62994c78e0e6e5b360f554022 | [
"BSD-3-Clause"
] | null | null | null | DeepLearningExamples/TensorFlow/Recommendation/VAE-CF/vae/metrics/recall.py | puririshi98/benchmark | 79f554f1e1cf36f62994c78e0e6e5b360f554022 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 34 | 83 | 0.71867 |
a8d8b1991e9e99ebe9ce3ed3f85fa8b9babeb783 | 2,469 | py | Python | remote_control/stm32_nec.py | cpriouzeau/stm32-libraries | ed2d0c362ef6a03b5e5249905b8d7f8a407fd6c7 | [
"MIT"
] | null | null | null | remote_control/stm32_nec.py | cpriouzeau/stm32-libraries | ed2d0c362ef6a03b5e5249905b8d7f8a407fd6c7 | [
"MIT"
] | 1 | 2022-03-01T11:58:47.000Z | 2022-03-01T11:58:47.000Z | remote_control/stm32_nec.py | cpriouzeau/stm32-libraries | ed2d0c362ef6a03b5e5249905b8d7f8a407fd6c7 | [
"MIT"
] | 3 | 2021-09-02T09:01:38.000Z | 2022-03-30T07:30:23.000Z | # nec.py Decoder for IR remote control using synchronous code
# Supports NEC protocol.
# For a remote using NEC see https://www.adafruit.com/products/389
# Author: Peter Hinch
# Copyright Peter Hinch 2020 Released under the MIT license
from utime import ticks_us, ticks_diff
from stm32_ir_receiver import IR_RX
class ... | 39.190476 | 100 | 0.64115 |
2497c72e7581a6d1c689b97d272b6da345e5f7e2 | 9,680 | py | Python | src/brouwers/general/migrations/0001_initial.py | modelbrouwers/modelbrouwers | e0ba4819bf726d6144c0a648fdd4731cdc098a52 | [
"MIT"
] | 6 | 2015-03-03T13:23:07.000Z | 2021-12-19T18:12:41.000Z | src/brouwers/general/migrations/0001_initial.py | modelbrouwers/modelbrouwers | e0ba4819bf726d6144c0a648fdd4731cdc098a52 | [
"MIT"
] | 95 | 2015-02-07T00:55:39.000Z | 2022-02-08T20:22:05.000Z | src/brouwers/general/migrations/0001_initial.py | modelbrouwers/modelbrouwers | e0ba4819bf726d6144c0a648fdd4731cdc098a52 | [
"MIT"
] | 2 | 2016-03-22T16:53:26.000Z | 2019-02-09T22:46:04.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2016-08-11 20:30
from __future__ import unicode_literals
import datetime
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
... | 34.820144 | 155 | 0.369112 |
3945714b3552178e799cc9950dbe8c100a02a34b | 68,038 | py | Python | numba/codegen/translate.py | liuzhenhai/numba | 855a2b262ae3d82bd6ac1c3e1c0acb36ee2e2acf | [
"BSD-2-Clause"
] | null | null | null | numba/codegen/translate.py | liuzhenhai/numba | 855a2b262ae3d82bd6ac1c3e1c0acb36ee2e2acf | [
"BSD-2-Clause"
] | null | null | null | numba/codegen/translate.py | liuzhenhai/numba | 855a2b262ae3d82bd6ac1c3e1c0acb36ee2e2acf | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import print_function, division, absolute_import
import ast
import llvm
import llvm.core as lc
import llvm.core
from numba.llvm_types import _int1, _int32, _LLVMCaster
from numba.multiarray_api import MultiarrayAPI # not used
from numba.typesystem import llvmtypes
from numba im... | 37.590055 | 91 | 0.568403 |
901db99681c66bb779689092446a87bbfd453a9c | 1,303 | py | Python | mdmm/urls.py | aminabromand/mdmm | e8f995e886b4042d33079977935a0ad546fa82e3 | [
"Apache-2.0"
] | null | null | null | mdmm/urls.py | aminabromand/mdmm | e8f995e886b4042d33079977935a0ad546fa82e3 | [
"Apache-2.0"
] | 6 | 2020-02-11T23:39:54.000Z | 2021-09-08T00:43:26.000Z | mdmm/urls.py | aminabromand/mdmm | e8f995e886b4042d33079977935a0ad546fa82e3 | [
"Apache-2.0"
] | null | null | null | """mdmm URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.1/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based views
1. A... | 34.289474 | 92 | 0.735994 |
754353778825b3471dac876b2b7d8e401c83168f | 931 | py | Python | aiotdlib/api/functions/set_alarm.py | jraylan/aiotdlib | 4528fcfca7c5c69b54a878ce6ce60e934a2dcc73 | [
"MIT"
] | 37 | 2021-05-04T10:41:41.000Z | 2022-03-30T13:48:05.000Z | aiotdlib/api/functions/set_alarm.py | jraylan/aiotdlib | 4528fcfca7c5c69b54a878ce6ce60e934a2dcc73 | [
"MIT"
] | 13 | 2021-07-17T19:54:51.000Z | 2022-02-26T06:50:00.000Z | aiotdlib/api/functions/set_alarm.py | jraylan/aiotdlib | 4528fcfca7c5c69b54a878ce6ce60e934a2dcc73 | [
"MIT"
] | 7 | 2021-09-22T21:27:11.000Z | 2022-02-20T02:33:19.000Z | # =============================================================================== #
# #
# This file has been generated automatically!! Do not change this manually! #
# ... | 33.25 | 93 | 0.440387 |
b2ca49c9527a3d10efa0f666bea5808d655aed54 | 20,594 | pyw | Python | canvas/red-RCanvas.pyw | PiRSquared17/r-orange | 6bc383f1db3c10c59e16b39daffc44df904ce031 | [
"Apache-2.0"
] | 1 | 2019-04-15T13:50:30.000Z | 2019-04-15T13:50:30.000Z | canvas/red-RCanvas.pyw | PiRSquared17/r-orange | 6bc383f1db3c10c59e16b39daffc44df904ce031 | [
"Apache-2.0"
] | null | null | null | canvas/red-RCanvas.pyw | PiRSquared17/r-orange | 6bc383f1db3c10c59e16b39daffc44df904ce031 | [
"Apache-2.0"
] | 1 | 2016-01-21T23:00:21.000Z | 2016-01-21T23:00:21.000Z | # -*- coding: utf-8 -*-
# Author: Kyle R Covington and Anup Parikh, adapted from orangeCanvas
# Description:
# main file, that creates the MDI environment
print "Staring Up"
import sys, os, cPickle, time
#print time.time()
from PyQt4.QtCore import *
from PyQt4.QtGui import *
#import redRApplication, redRE... | 39.452107 | 158 | 0.584248 |
9886ed0065693332a9e7d621cbfbbb2f99a10c50 | 1,608 | py | Python | div/main.py | jjbeto/pycalc-micro | 87f7c644e85676ca86088012a95403fd9bd0e6ce | [
"Apache-2.0"
] | null | null | null | div/main.py | jjbeto/pycalc-micro | 87f7c644e85676ca86088012a95403fd9bd0e6ce | [
"Apache-2.0"
] | null | null | null | div/main.py | jjbeto/pycalc-micro | 87f7c644e85676ca86088012a95403fd9bd0e6ce | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# main.py
#
# Copyright 2020 Jose Jouberto Fonseca Lopes.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | 28.210526 | 82 | 0.723881 |
14b85ffd9cb8e940cb9db2b34737e90dde57be69 | 1,432 | py | Python | api/managers/message.py | aarongrisez/MagentaRapidsBackend | 5491f843ec4e823fe984597449c918ac7df8dd60 | [
"MIT"
] | null | null | null | api/managers/message.py | aarongrisez/MagentaRapidsBackend | 5491f843ec4e823fe984597449c918ac7df8dd60 | [
"MIT"
] | null | null | null | api/managers/message.py | aarongrisez/MagentaRapidsBackend | 5491f843ec4e823fe984597449c918ac7df8dd60 | [
"MIT"
] | null | null | null | from functools import lru_cache
import logging
from typing import Union
from fastapi import WebSocket
from api.models.event import SynthesizedEvent
from aiocache import cached
from .connection import WebSocketConnectionManager
logger = logging.getLogger("api")
Message = SynthesizedEvent
class MessageManager:
... | 27.538462 | 68 | 0.722067 |
30769f24048ca2d733b99859a180a40bfd48814f | 54,663 | py | Python | analytics/views.py | myii/zulip | 915d8013271f1823954dd8d4441842842857ab9f | [
"Apache-2.0"
] | null | null | null | analytics/views.py | myii/zulip | 915d8013271f1823954dd8d4441842842857ab9f | [
"Apache-2.0"
] | null | null | null | analytics/views.py | myii/zulip | 915d8013271f1823954dd8d4441842842857ab9f | [
"Apache-2.0"
] | null | null | null | import itertools
import logging
import re
import time
import urllib
from collections import defaultdict
from datetime import datetime, timedelta
from decimal import Decimal
from typing import Any, Callable, Dict, List, \
Optional, Set, Tuple, Type, Union
import pytz
from django.conf import settings
from django.ur... | 36.51503 | 109 | 0.601357 |
7344c651f50fb9e4d83c5fd42846003d82e98711 | 2,072 | py | Python | arcpyext/_native/arcgispro.py | PeterReyne/arcpyext | 9307115da8f0b6a30e2ca741fb6a7d09e54fd0f3 | [
"BSD-3-Clause"
] | 11 | 2015-05-01T04:08:30.000Z | 2019-09-21T05:00:58.000Z | arcpyext/_native/arcgispro.py | PeterReyne/arcpyext | 9307115da8f0b6a30e2ca741fb6a7d09e54fd0f3 | [
"BSD-3-Clause"
] | 14 | 2015-06-23T02:46:44.000Z | 2019-10-11T00:46:11.000Z | arcpyext/_native/arcgispro.py | PeterReyne/arcpyext | 9307115da8f0b6a30e2ca741fb6a7d09e54fd0f3 | [
"BSD-3-Clause"
] | 9 | 2015-02-27T05:25:42.000Z | 2020-01-19T05:43:14.000Z | # coding=utf-8
"""
This module contains functionality for accessing ArcObjects from Python
Based on code from here: http://www.pierssen.com/arcgis10/python.htm
"""
# Python 2/3 compatibility
# pylint: disable=wildcard-import,unused-wildcard-import,wrong-import-order,wrong-import-position
from __future__ import (absol... | 32.375 | 111 | 0.730695 |
94e4a0340bbcf8862dc7b969f6e03f0462e3a2e9 | 53 | py | Python | doodledashboard/__about__.py | FlyingTopHat/Slack-Dashboard | 28ed478d8927b8e71db48a521493919a9c0b5797 | [
"MIT"
] | 1 | 2019-09-21T09:03:54.000Z | 2019-09-21T09:03:54.000Z | doodledashboard/__about__.py | FlyingTopHat/Slack-Dashboard | 28ed478d8927b8e71db48a521493919a9c0b5797 | [
"MIT"
] | 46 | 2018-01-01T12:56:30.000Z | 2020-02-11T08:30:42.000Z | doodledashboard/__about__.py | FlyingTopHat/Slack-Dashboard | 28ed478d8927b8e71db48a521493919a9c0b5797 | [
"MIT"
] | 2 | 2018-08-26T08:25:49.000Z | 2020-11-04T03:47:08.000Z | __name__ = "doodle-dashboard"
__version__ = "0.0.23"
| 17.666667 | 29 | 0.716981 |
075849f2e3201e22de6550f86ee7c82c14043ab8 | 4,803 | py | Python | docs/conf.py | kristianbonnici/mlvizlib | dc1bf9d1b0c3a1471a3fd0a93925cbe9e302dce6 | [
"MIT"
] | 1 | 2021-06-24T20:15:35.000Z | 2021-06-24T20:15:35.000Z | docs/conf.py | kristianbonnici/mlvizlib | dc1bf9d1b0c3a1471a3fd0a93925cbe9e302dce6 | [
"MIT"
] | null | null | null | docs/conf.py | kristianbonnici/mlvizlib | dc1bf9d1b0c3a1471a3fd0a93925cbe9e302dce6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#
# mlvizlib documentation build configuration file, created by
# sphinx-quickstart on Fri Jun 9 13:47:02 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# Al... | 29.466258 | 77 | 0.685613 |
1b9b3246a7471a94d68e4a3eee88699caaf844f8 | 2,464 | py | Python | pelican/pelicanconf.py | golly-splorts/gollyx-hellmouth-pelican | 1946f4f45ae8e6518075a40d0a4ba5f30fcfc398 | [
"MIT"
] | null | null | null | pelican/pelicanconf.py | golly-splorts/gollyx-hellmouth-pelican | 1946f4f45ae8e6518075a40d0a4ba5f30fcfc398 | [
"MIT"
] | null | null | null | pelican/pelicanconf.py | golly-splorts/gollyx-hellmouth-pelican | 1946f4f45ae8e6518075a40d0a4ba5f30fcfc398 | [
"MIT"
] | null | null | null | import os, re, glob
GOLLYX_HELLMOUTH_PELICAN_VERSION = "42.0.0.dev0"
# Yes, this is supposed to be UI not URI...
SITEURL = os.environ.get('GOLLYX_BASE_UI', '')
AUTHOR = u'Ch4zm of Hellmouth'
HERE = os.path.abspath(os.path.dirname(__file__))
stage = os.environ.get('GOLLYX_STAGE', '')
if stage=="integration":
... | 23.466667 | 101 | 0.696834 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.