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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
03e442347da669ff4abcb819da10f03d6e973dee | 3,611 | py | Python | example_diabetic/step.py | kyriacosparperis/apm_python | 1f7701131db1414d4274be71dd6bfa6b0c71de6b | [
"BSD-2-Clause-FreeBSD"
] | 99 | 2015-07-05T06:12:16.000Z | 2021-12-16T17:52:48.000Z | example_diabetic/step.py | kyriacosparperis/apm_python | 1f7701131db1414d4274be71dd6bfa6b0c71de6b | [
"BSD-2-Clause-FreeBSD"
] | 4 | 2018-03-27T01:30:40.000Z | 2019-06-24T20:00:18.000Z | example_diabetic/step.py | kyriacosparperis/apm_python | 1f7701131db1414d4274be71dd6bfa6b0c71de6b | [
"BSD-2-Clause-FreeBSD"
] | 35 | 2015-07-05T06:12:19.000Z | 2021-08-09T08:33:52.000Z | # Import
from apm import *
# Select server
server = 'http://byu.apmonitor.com'
# Application name
app = 'diabetic'
# Clear previous application
apm(server,app,'clear all')
# Load model file
apm_load(server,app,'diabetic.apm')
# Load time points for future predictions
csv_load(server,app,'diabetic.csv')
# Load rep... | 26.551471 | 75 | 0.712545 |
03e44d325fb3ade936e4f6df2c3bffc15beec0f4 | 1,909 | py | Python | sdk/keyvault/azure-keyvault-certificates/tests/_shared/test_case_async.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-01-24T08:54:57.000Z | 2022-01-24T08:54:57.000Z | sdk/keyvault/azure-keyvault-certificates/tests/_shared/test_case_async.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/keyvault/azure-keyvault-certificates/tests/_shared/test_case_async.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | # ------------------------------------
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# ------------------------------------
import asyncio
from azure_devtools.scenario_tests.patches import mock_in_unit_test
from devtools_testutils import AzureRecordedTestCase
from azure.keyvault.certificate... | 36.018868 | 116 | 0.647459 |
03e46cc620a899fec050f096de8159839b12611f | 2,261 | py | Python | src/radical/cm/planner/base.py | iparask/campaign_manager | 7d7f3934fdde6acadc7581825697c89009fcf6fd | [
"MIT"
] | 1 | 2019-12-18T16:46:35.000Z | 2019-12-18T16:46:35.000Z | src/radical/cm/planner/base.py | radical-project/campaign_manager | 7d7f3934fdde6acadc7581825697c89009fcf6fd | [
"MIT"
] | 22 | 2019-12-12T16:31:36.000Z | 2020-12-14T22:45:40.000Z | src/radical/cm/planner/base.py | iparask/campaign_manager | 7d7f3934fdde6acadc7581825697c89009fcf6fd | [
"MIT"
] | null | null | null | """
Author: Ioannis Paraskevakos
License: MIT
Copyright: 2018-2019
"""
import os
import radical.utils as ru
class Planner(object):
'''
The planner receives a campaign, a set of resources, and an execution time
estimation for each workflow per resource, and calculates a plan. The plan is
a list of tup... | 32.3 | 82 | 0.626714 |
03e489792eda8af7a4ea266fc84fb4973ba91efe | 421 | py | Python | python-to-redis/setup.py | lethain/digg-streaming | 363f8fa2ff87000f3070ace187c7c76a05ab5a0d | [
"MIT"
] | 1 | 2021-04-26T09:26:51.000Z | 2021-04-26T09:26:51.000Z | python-to-redis/setup.py | lethain/digg-streaming | 363f8fa2ff87000f3070ace187c7c76a05ab5a0d | [
"MIT"
] | null | null | null | python-to-redis/setup.py | lethain/digg-streaming | 363f8fa2ff87000f3070ace187c7c76a05ab5a0d | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from setuptools import setup, find_packages
setup(name="Digg Streaming",
version="1.0",
description="Python interface for Digg Streaming API",
author="Will Larson",
packages=find_packages(),
include_package_data=True,
license="MIT",
author_email="wlarson... | 26.3125 | 60 | 0.657957 |
03e48ea67b4b16be02aa2cd317b24737479201df | 4,064 | py | Python | source/api/dataplane/runtime/app.py | awslabs/aws-media-replay-engine | 2c217eff42f8e2c56b43e2ecf593f5aaa92c5451 | [
"Apache-2.0"
] | 22 | 2021-11-24T01:23:07.000Z | 2022-03-26T23:24:46.000Z | source/api/dataplane/runtime/app.py | awslabs/aws-media-replay-engine | 2c217eff42f8e2c56b43e2ecf593f5aaa92c5451 | [
"Apache-2.0"
] | null | null | null | source/api/dataplane/runtime/app.py | awslabs/aws-media-replay-engine | 2c217eff42f8e2c56b43e2ecf593f5aaa92c5451 | [
"Apache-2.0"
] | 3 | 2021-12-10T09:42:51.000Z | 2022-02-16T02:22:50.000Z | # Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
import urllib.parse
import boto3
from chalice import Chalice
from chalice import IAMAuthorizer
from chalice import ChaliceViewError
from botocore.config import Config
from botocore.client import ClientError... | 29.664234 | 120 | 0.654528 |
03e49f81f16a4231fe1e0ac30a43135e9b4e85a8 | 815 | py | Python | test/test_random.py | evopy/evopy | b9322cd71728e23ec425a115b65eaf8727a6e8c7 | [
"MIT"
] | 8 | 2019-05-24T09:34:29.000Z | 2020-03-11T22:12:17.000Z | test/test_random.py | ThomasKluiters/evopy | 1ca150c0a4bd76cde3e989aafa114dc476928201 | [
"MIT"
] | 22 | 2019-05-24T09:58:41.000Z | 2019-06-01T18:46:17.000Z | test/test_random.py | ThomasKluiters/evopy | 1ca150c0a4bd76cde3e989aafa114dc476928201 | [
"MIT"
] | 2 | 2019-05-26T12:58:18.000Z | 2019-05-31T17:35:34.000Z | """Tests for (non-)deterministic behavior in evopy."""
import numpy as np
from nose.tools import raises
from evopy.utils import random_with_seed
def random_integer_seed_test():
"""Test if integers are correctly used."""
random = random_with_seed(42)
assert random.randint(100) == 51
def random_state_see... | 26.290323 | 77 | 0.716564 |
03e50a8e39a5d2aa21c9b901cbdd807a991a30e7 | 4,004 | py | Python | alipay/aop/api/request/AlipaySocialBaseQuestInstanceQueryRequest.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/request/AlipaySocialBaseQuestInstanceQueryRequest.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/request/AlipaySocialBaseQuestInstanceQueryRequest.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.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.AlipaySocialBaseQuestInstanceQueryModel import AlipaySocialBaseQuestInstanceQueryModel
class AlipaySocialBaseQuestInstanceQueryReque... | 27.613793 | 148 | 0.647353 |
03e50ad21a6f107fc9b2030fea1171e0ab15264f | 731 | py | Python | src/ggrc_workflows/migrations/versions/20140714205200_19a67dc67c3_add_workflow_notification_fields.py | Killswitchz/ggrc-core | 2460df94daf66727af248ad821462692917c97a9 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2018-03-30T11:28:48.000Z | 2018-03-30T11:28:48.000Z | src/ggrc_workflows/migrations/versions/20140714205200_19a67dc67c3_add_workflow_notification_fields.py | trevordonnelly/ggrc-core | 499cf0d3cce70737b080991b12c203ec22015cea | [
"ECL-2.0",
"Apache-2.0"
] | 10 | 2018-07-06T00:04:23.000Z | 2021-02-26T21:13:20.000Z | src/ggrc_workflows/migrations/versions/20140714205200_19a67dc67c3_add_workflow_notification_fields.py | zidarsk8/ggrc-core | 2509c989eddf434249d3bef50c21e08dbf56c1a4 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2017-11-11T22:16:56.000Z | 2017-11-11T22:16:56.000Z | # Copyright (C) 2017 Google Inc.
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
"""Add workflow notification fields
Revision ID: 19a67dc67c3
Revises: 51ec129d9dde
Create Date: 2014-07-14 20:52:00.013439
"""
# revision identifiers, used by Alembic.
revision = '19a67dc67c3'
down_revis... | 25.206897 | 104 | 0.746922 |
03e52f898d49d87b42bf45b8ca3f085594f60553 | 7,891 | py | Python | data/level/level1077.py | levelupai/match3-level-similarity | cc9b28b8741b41bea1273c8bc9b4d265d79a1dca | [
"Apache-2.0"
] | null | null | null | data/level/level1077.py | levelupai/match3-level-similarity | cc9b28b8741b41bea1273c8bc9b4d265d79a1dca | [
"Apache-2.0"
] | 6 | 2020-07-04T02:53:08.000Z | 2022-03-11T23:53:14.000Z | data/level/level1077.py | levelupai/match3-level-similarity | cc9b28b8741b41bea1273c8bc9b4d265d79a1dca | [
"Apache-2.0"
] | 3 | 2019-12-31T11:42:59.000Z | 2021-03-28T20:06:13.000Z | data = {
'level_index': 1077,
'move_count': 25,
'board_info': {
(0, 0): {
'base': (6, 1),
'prev': (0, -1),
'next': (0, 1),
'fall_point': (0, -1)
},
(0, 1): {
'base': (1, 1),
'prev': (0, -1),
'next': (... | 22.806358 | 33 | 0.195286 |
03e553173ecf954eac32dd123268caf3944b8284 | 1,845 | py | Python | test_projects/line_joints/main.py | ynsnf/apysc | b10ffaf76ec6beb187477d0a744fca00e3efc3fb | [
"MIT"
] | 16 | 2021-04-16T02:01:29.000Z | 2022-01-01T08:53:49.000Z | test_projects/line_joints/main.py | ynsnf/apysc | b10ffaf76ec6beb187477d0a744fca00e3efc3fb | [
"MIT"
] | 613 | 2021-03-24T03:37:38.000Z | 2022-03-26T10:58:37.000Z | test_projects/line_joints/main.py | simon-ritchie/apyscript | c319f8ab2f1f5f7fad8d2a8b4fc06e7195476279 | [
"MIT"
] | 2 | 2021-06-20T07:32:58.000Z | 2021-12-26T08:22:11.000Z | """Test project for line_joints setting.
Command examples:
$ python test_projects/line_joints/main.py
"""
import sys
sys.path.append('./')
import os
from types import ModuleType
import apysc as ap
from apysc._file import file_util
this_module: ModuleType = sys.modules[__name__]
_DEST_DIR_PATH: ... | 25.625 | 69 | 0.656911 |
03e55318cc639a9d425af673e575e0533f0df47a | 418 | py | Python | pylib/base/environment.py | xkmato/py77 | 9c44d8f8924f47a7331c29fd0287a4bb9416d316 | [
"MIT"
] | null | null | null | pylib/base/environment.py | xkmato/py77 | 9c44d8f8924f47a7331c29fd0287a4bb9416d316 | [
"MIT"
] | null | null | null | pylib/base/environment.py | xkmato/py77 | 9c44d8f8924f47a7331c29fd0287a4bb9416d316 | [
"MIT"
] | 2 | 2018-07-16T19:14:11.000Z | 2020-10-15T08:48:32.000Z | """
module for managing machine environments
"""
__copyright__ = '2013, Room 77, Inc.'
__author__ = 'Kyle Konrad'
import os
import subprocess
__PRODUCTION_FILE = '/home/config/prod_machine'
__STAGING_FILE = '/home/config/staging_machine'
__TEST_FILE = '/localdisk/home/is_r77_test'
IN_PRODUCTION = os.path.exists(__P... | 23.222222 | 49 | 0.782297 |
03e553b9056f9fe415e251229e214bd1fbad49ed | 5,709 | py | Python | scripts/ros_lcd_data_provider.py | marcusabate/Kimera-LCD-ROS | a6a98c109f6be0cf6c32423c74c70cfcfc9eba90 | [
"BSD-2-Clause"
] | null | null | null | scripts/ros_lcd_data_provider.py | marcusabate/Kimera-LCD-ROS | a6a98c109f6be0cf6c32423c74c70cfcfc9eba90 | [
"BSD-2-Clause"
] | null | null | null | scripts/ros_lcd_data_provider.py | marcusabate/Kimera-LCD-ROS | a6a98c109f6be0cf6c32423c74c70cfcfc9eba90 | [
"BSD-2-Clause"
] | null | null | null | #! /usr/bin/env python
import rospy
import numpy as np
import message_filters
from sensor_msgs.msg import Image, CameraInfo
from geometry_msgs.msg import Pose
import tf.transformations as transformations
from kimera_lcd_ros.msg import LcdInputPayload, StereoFrame, StereoMatchingParams, CameraParams
class RosLcdDataP... | 41.071942 | 115 | 0.675425 |
03e5852a094eef84ce9e0873dec79eb7f2ca7bc1 | 10,430 | py | Python | experiments/ashvin/rss/pusher1/original/rig_demos.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/rss/pusher1/original/rig_demos.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/rss/pusher1/original/rig_demos.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | import rlkit.misc.hyperparameter as hyp
from multiworld.envs.mujoco.cameras import sawyer_pusher_camera_upright_v2
from rlkit.launchers.launcher_util import run_experiment
from rlkit.torch.grill.launcher import full_experiment_variant_preprocess, grill_her_td3_full_experiment
from rlkit.launchers.arglauncher import run... | 34.882943 | 117 | 0.604219 |
03e587ad46494da4a350780cd17b355a8ebe5203 | 772 | py | Python | v2/bindings/python/swisnap-publisher-plugin-lib-example.py | solarwinds/snap-plugin-lib-go | 33805aab6d093b08d360520255e684126c5314db | [
"Apache-2.0"
] | 3 | 2020-10-05T01:48:25.000Z | 2021-09-06T09:24:35.000Z | v2/bindings/python/swisnap-publisher-plugin-lib-example.py | solarwinds/snap-plugin-lib-go | 33805aab6d093b08d360520255e684126c5314db | [
"Apache-2.0"
] | 8 | 2020-10-05T09:25:47.000Z | 2021-11-23T17:59:10.000Z | v2/bindings/python/swisnap-publisher-plugin-lib-example.py | solarwinds/snap-plugin-lib-go | 33805aab6d093b08d360520255e684126c5314db | [
"Apache-2.0"
] | null | null | null | import time
from swisnap_plugin_lib_py import BasePublisher, start_publisher, LOGLEVEL_INFO
import pprint
class ExamplePublisherPlugin(BasePublisher):
def define_plugin(self, ctx):
pass
def publish(self, ctx):
ctx.log(LOGLEVEL_INFO, "Plugin is publishing", {"name": self._name})
pprin... | 29.692308 | 80 | 0.69171 |
03e58bb5759819c2884937779fe388c104e123d0 | 799 | py | Python | app/main/views.py | Kipngetich33/news-highlights | 773d4852d28d56b0c313b6da397d46fc0ca9a054 | [
"Unlicense"
] | null | null | null | app/main/views.py | Kipngetich33/news-highlights | 773d4852d28d56b0c313b6da397d46fc0ca9a054 | [
"Unlicense"
] | null | null | null | app/main/views.py | Kipngetich33/news-highlights | 773d4852d28d56b0c313b6da397d46fc0ca9a054 | [
"Unlicense"
] | null | null | null | from flask import render_template, request, redirect, url_for
from . import main
from ..requests import get_source_names, get_articles
@main.route('/')
def index():
'''
Functiont that returns the index page and its data
'''
title = 'Trending News Base'
sources_and_name = get_source_names('sources'... | 31.96 | 104 | 0.729662 |
03e58c7a3e78abe9e94738acbffe4ee3c15e4971 | 11,101 | py | Python | src/api-server/venv/lib/python3.8/site-packages/aniso8601/interval.py | srikanteswartalluri/container-orchestrator | 3cd07989e28ece0038cb0b7c6bbdc83c1c0ba7a9 | [
"Apache-2.0"
] | 1 | 2021-07-14T23:39:19.000Z | 2021-07-14T23:39:19.000Z | src/api-server/venv/lib/python3.8/site-packages/aniso8601/interval.py | srikanteswartalluri/container-orchestrator | 3cd07989e28ece0038cb0b7c6bbdc83c1c0ba7a9 | [
"Apache-2.0"
] | null | null | null | src/api-server/venv/lib/python3.8/site-packages/aniso8601/interval.py | srikanteswartalluri/container-orchestrator | 3cd07989e28ece0038cb0b7c6bbdc83c1c0ba7a9 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2021, Brandon Nielsen
# All rights reserved.
#
# This software may be modified and distributed under the terms
# of the BSD license. See the LICENSE file for details.
from aniso8601.builders import TupleBuilder, DateTuple, DatetimeTuple
from aniso8601.builders.python import Py... | 35.809677 | 135 | 0.643996 |
03e596db48c42d4f94606b6c375704a2514061ed | 2,813 | py | Python | RF_initialize_vibetest.py | aoltean-Q2S/DS1COM2 | 006286779989defc2c163c20d67010b306d20ccb | [
"MIT"
] | null | null | null | RF_initialize_vibetest.py | aoltean-Q2S/DS1COM2 | 006286779989defc2c163c20d67010b306d20ccb | [
"MIT"
] | null | null | null | RF_initialize_vibetest.py | aoltean-Q2S/DS1COM2 | 006286779989defc2c163c20d67010b306d20ccb | [
"MIT"
] | 1 | 2019-06-28T19:19:28.000Z | 2019-06-28T19:19:28.000Z | #!/usr/bin/env python
"""initializes RF front end"""
__author__ = "Paul Sturmer"
import spidev
import time
import RPi.GPIO as GPIO
from time import sleep
#SPI initialization for PLL/VCO
bus = 0
registers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
##first_data = [0x02, 0x04, 0x0C, 0x00, 0x64, 0x17, 0x70, 0x33, 0x... | 27.048077 | 100 | 0.604692 |
03e5ac59a0297ec21f7e135a65c9e8bc16a49682 | 2,927 | py | Python | heat/engine/resources/network_interface.py | CiscoSystems/heat | 1b609f3c0621c44e4988a166a38f36c2b57eb4c6 | [
"Apache-2.0"
] | 1 | 2020-08-15T14:29:15.000Z | 2020-08-15T14:29:15.000Z | heat/engine/resources/network_interface.py | CiscoSystems/heat | 1b609f3c0621c44e4988a166a38f36c2b57eb4c6 | [
"Apache-2.0"
] | null | null | null | heat/engine/resources/network_interface.py | CiscoSystems/heat | 1b609f3c0621c44e4988a166a38f36c2b57eb4c6 | [
"Apache-2.0"
] | null | null | null | # vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 32.522222 | 78 | 0.607448 |
03e5d10b216158afc00cf8b5992d752d97537387 | 3,780 | py | Python | legal-api/src/legal_api/resources/business/business.py | jachurchill/lear | 1abeadfa8a68fe84eae28957fcd762d45712b931 | [
"Apache-2.0"
] | 1 | 2019-11-07T20:32:59.000Z | 2019-11-07T20:32:59.000Z | legal-api/src/legal_api/resources/business/business.py | jachurchill/lear | 1abeadfa8a68fe84eae28957fcd762d45712b931 | [
"Apache-2.0"
] | null | null | null | legal-api/src/legal_api/resources/business/business.py | jachurchill/lear | 1abeadfa8a68fe84eae28957fcd762d45712b931 | [
"Apache-2.0"
] | null | null | null | # Copyright © 2019 Province of British Columbia
#
# 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 agr... | 41.086957 | 109 | 0.698677 |
03e5f74f46e65dc5f66cd0e2d064678892d30876 | 2,005 | py | Python | airbyte-integrations/connectors/source-google-adwords-singer/integration_tests/standard_source_test.py | ntucker/airbyte | 3670545995a6cbc6579104ac9726f82315b1003d | [
"MIT"
] | null | null | null | airbyte-integrations/connectors/source-google-adwords-singer/integration_tests/standard_source_test.py | ntucker/airbyte | 3670545995a6cbc6579104ac9726f82315b1003d | [
"MIT"
] | 1 | 2020-12-15T18:11:29.000Z | 2020-12-15T20:26:08.000Z | airbyte-integrations/connectors/source-google-adwords-singer/integration_tests/standard_source_test.py | ntucker/airbyte | 3670545995a6cbc6579104ac9726f82315b1003d | [
"MIT"
] | null | null | null | """
MIT License
Copyright (c) 2020 Airbyte
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, merge, publish, distr... | 38.557692 | 99 | 0.767082 |
03e601bcd66fee87764eaccd3df58f6bc8bfaefb | 3,202 | py | Python | ngraph/transformers/passes/flexpass.py | NervanaSystems/ngraph-python | ac032c83c7152b615a9ad129d54d350f9d6a2986 | [
"Apache-2.0"
] | 18 | 2018-03-19T04:16:49.000Z | 2021-02-08T14:44:58.000Z | ngraph/transformers/passes/flexpass.py | rsumner31/ngraph | 5e5c9bb9f24d95aee190b914dd2d44122fc3be53 | [
"Apache-2.0"
] | 2 | 2019-04-16T06:41:49.000Z | 2019-05-06T14:08:13.000Z | ngraph/transformers/passes/flexpass.py | rsumner31/ngraph | 5e5c9bb9f24d95aee190b914dd2d44122fc3be53 | [
"Apache-2.0"
] | 11 | 2018-06-16T15:59:08.000Z | 2021-03-06T00:45:30.000Z | # ******************************************************************************
# Copyright 2017-2018 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.apa... | 39.530864 | 95 | 0.684572 |
03e60727b8e9ef97f2b355f3265c946097da098d | 389 | py | Python | {{cookiecutter.PROJECT_NAME}}/tag/admin.py | pyFigure/cc_django | afb640816291ffc2ed2038bdee6ea60b27d71fb2 | [
"BSD-3-Clause"
] | 4 | 2020-09-01T06:37:17.000Z | 2020-09-01T07:11:32.000Z | {{cookiecutter.PROJECT_NAME}}/tag/admin.py | pyFigure/cc_django | afb640816291ffc2ed2038bdee6ea60b27d71fb2 | [
"BSD-3-Clause"
] | null | null | null | {{cookiecutter.PROJECT_NAME}}/tag/admin.py | pyFigure/cc_django | afb640816291ffc2ed2038bdee6ea60b27d71fb2 | [
"BSD-3-Clause"
] | null | null | null | from django.contrib import admin
from tag.models import ColoredTag
@admin.register(ColoredTag)
class ColorTagAdmin(admin.ModelAdmin):
list_display = ['name', 'color', 'content_type', 'object_id']
search_fields = ['name']
fieldsets = [
("基础信息", {'classes': ['grp-collapse grp-open'],
... | 29.923077 | 77 | 0.632391 |
03e60ed0a916cc1f836d26b639ff2e49affc6afb | 7,934 | py | Python | lib_drl/layer_utils/proposal_target_layer.py | chang010453/GRP-HAI | 60f7c7633e33dbdd852f5df3e0a3d1017b6b2a22 | [
"MIT"
] | null | null | null | lib_drl/layer_utils/proposal_target_layer.py | chang010453/GRP-HAI | 60f7c7633e33dbdd852f5df3e0a3d1017b6b2a22 | [
"MIT"
] | null | null | null | lib_drl/layer_utils/proposal_target_layer.py | chang010453/GRP-HAI | 60f7c7633e33dbdd852f5df3e0a3d1017b6b2a22 | [
"MIT"
] | null | null | null | # --------------------------------------------------------
# Faster R-CNN
# Copyright (c) 2015 Microsoft
# Licensed under The MIT License [see LICENSE for details]
# Written by Ross Girshick, Sean Bell and Xinlei Chen
# --------------------------------------------------------
from __future__ import absolute_import
from... | 40.896907 | 102 | 0.694858 |
03e6193db41d80a1667b8b90ee43b252c8250208 | 8,959 | py | Python | python/example/state_force_2d.py | srl-ethz/diffPD_sim2real | e491668995a163b8ff7542d99f0b4e0c0f4ed2df | [
"MIT"
] | 4 | 2022-02-10T02:28:42.000Z | 2022-02-10T07:28:35.000Z | python/example/state_force_2d.py | srl-ethz/diffPD_sim2real | e491668995a163b8ff7542d99f0b4e0c0f4ed2df | [
"MIT"
] | null | null | null | python/example/state_force_2d.py | srl-ethz/diffPD_sim2real | e491668995a163b8ff7542d99f0b4e0c0f4ed2df | [
"MIT"
] | null | null | null | import sys
sys.path.append('../')
from pathlib import Path
import shutil
import numpy as np
from py_diff_pd.core.py_diff_pd_core import QuadDeformable, QuadMesh2d, StdRealVector
from py_diff_pd.core.py_diff_pd_core import StdRealVector, StdRealArray2d
from py_diff_pd.core.py_diff_pd_core import GravitationalStateForc... | 40.538462 | 130 | 0.659225 |
03e619e514d6e96736ab5e883eae67a977421f37 | 2,203 | py | Python | os_migrate/plugins/modules/os_routers_info.py | carlosdcg/os-migrate | 8abcfc16f8d47c4924cf8abaef1d0dc729d8f2f7 | [
"Apache-2.0"
] | null | null | null | os_migrate/plugins/modules/os_routers_info.py | carlosdcg/os-migrate | 8abcfc16f8d47c4924cf8abaef1d0dc729d8f2f7 | [
"Apache-2.0"
] | null | null | null | os_migrate/plugins/modules/os_routers_info.py | carlosdcg/os-migrate | 8abcfc16f8d47c4924cf8abaef1d0dc729d8f2f7 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
ANSIBLE_METADATA = {
'metadata_version': '1.1',
'status': ['preview'],
'supported_by': 'community'
}
DOCUMENTATION = '''
---
module: os_routers_info
short_description: Get routers info
extends_doc... | 21.811881 | 88 | 0.677258 |
03e621df2eef99991f36f30d5ccdfc4d26f7784b | 2,223 | py | Python | ai_ml_projects/masters_courses/nlp/rdvsearley.py | 5aurabhpathak/src | dda72beba2aaae67542a2f10e89048e86d04cb28 | [
"BSD-3-Clause"
] | 1 | 2021-07-07T06:51:18.000Z | 2021-07-07T06:51:18.000Z | ai_ml_projects/masters_courses/nlp/rdvsearley.py | 5aurabhpathak/all-I-ve-done | dda72beba2aaae67542a2f10e89048e86d04cb28 | [
"BSD-3-Clause"
] | null | null | null | ai_ml_projects/masters_courses/nlp/rdvsearley.py | 5aurabhpathak/all-I-ve-done | dda72beba2aaae67542a2f10e89048e86d04cb28 | [
"BSD-3-Clause"
] | 1 | 2020-08-11T09:53:22.000Z | 2020-08-11T09:53:22.000Z | #!/bin/env python3.5
from nltk import RecursiveDescentParser, pos_tag, CFG, Tree
from nltk.parse.earleychart import EarleyChartParser
from nltk.draw import TreeView
from os import system, remove
grammar1 = CFG.fromstring("""S -> NP VP
PP -> P | P NP | P VP
NP -> Det NP PP1 | Adj N PP1 | N PP1 | N NP PP1
P... | 32.691176 | 96 | 0.560954 |
03e6497576863dd647bbb62a3974888a9a413f81 | 857 | py | Python | alipay/aop/api/domain/AlipaySocialForestSimplecertificateQueryModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/domain/AlipaySocialForestSimplecertificateQueryModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/domain/AlipaySocialForestSimplecertificateQueryModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class AlipaySocialForestSimplecertificateQueryModel(object):
def __init__(self):
self._year = None
@property
def year(self):
return self._year
@year.setter
def year(se... | 20.902439 | 60 | 0.577596 |
03e64fed8d23e96fd70fbe4214c94e3423d974a0 | 14,978 | py | Python | pyointillism_pop50_selection__mutation_crossover_random - M0.4 X0.8.py | kashiy/optimized_pyointillism | 61755ecb26951f0131c9a73524e44b0c302d46b8 | [
"MIT"
] | null | null | null | pyointillism_pop50_selection__mutation_crossover_random - M0.4 X0.8.py | kashiy/optimized_pyointillism | 61755ecb26951f0131c9a73524e44b0c302d46b8 | [
"MIT"
] | null | null | null | pyointillism_pop50_selection__mutation_crossover_random - M0.4 X0.8.py | kashiy/optimized_pyointillism | 61755ecb26951f0131c9a73524e44b0c302d46b8 | [
"MIT"
] | null | null | null | # -------------------------------------------------------------------------------------------------
# MIT License
# If you use this in something awesome, credit would be nice but isn't required
# Written by Keilan
# Website: www.scholtek.com
# Github: https://github.com/Keilan
# ----------------------------------... | 36.178744 | 117 | 0.536787 |
03e68ba4867281d71487335afdb0cd09f1d70014 | 654 | py | Python | backend/config.py | Kwsswart/flask-react-phonebook | bcde5e462191d092c704434ae4dd4c719fa0e3aa | [
"MIT"
] | null | null | null | backend/config.py | Kwsswart/flask-react-phonebook | bcde5e462191d092c704434ae4dd4c719fa0e3aa | [
"MIT"
] | null | null | null | backend/config.py | Kwsswart/flask-react-phonebook | bcde5e462191d092c704434ae4dd4c719fa0e3aa | [
"MIT"
] | null | null | null | import os
from dotenv import load_dotenv
basedir = os.path.abspath(os.path.dirname(__file__))
load_dotenv(os.path.join(basedir, '.env'))
class Config(object):
""" Retain all config variables """
SECRET_KEY = os.environ.get('SECRET_KEY') or 'you-will-never-guess'
JWT_SECRET_KEY = os.environ.get("JWT_S... | 34.421053 | 91 | 0.69419 |
03e6af778ff4843214b677d0c426fd32dcb52f92 | 14,342 | py | Python | irida_uploader_cl/parsers/miniseq/sample_parser.py | duanjunhyq/irida_uploader_cl | d0e5d404c5b5b10c3411ded71a20f5ab062aabba | [
"MIT"
] | null | null | null | irida_uploader_cl/parsers/miniseq/sample_parser.py | duanjunhyq/irida_uploader_cl | d0e5d404c5b5b10c3411ded71a20f5ab062aabba | [
"MIT"
] | null | null | null | irida_uploader_cl/parsers/miniseq/sample_parser.py | duanjunhyq/irida_uploader_cl | d0e5d404c5b5b10c3411ded71a20f5ab062aabba | [
"MIT"
] | null | null | null | import re
from os import path, walk
from csv import reader
from collections import OrderedDict
from copy import deepcopy
import logging
import irida_uploader_cl.model as model
from irida_uploader_cl.parsers import exceptions
def parse_metadata(sample_sheet_file):
"""
Parse all lines under [Header], [Reads] ... | 38.867209 | 118 | 0.638196 |
03e6c1af428e100435b78edaee9528e295cff6d2 | 29,903 | py | Python | luna/translation_db.py | Hakanaou/deepLuna | c67b68a5a4361e4e4f03f825b1e7f26dc74660e1 | [
"BSD-2-Clause"
] | 26 | 2021-09-02T17:12:02.000Z | 2022-02-21T08:35:15.000Z | luna/translation_db.py | Hakanaou/deepLuna | c67b68a5a4361e4e4f03f825b1e7f26dc74660e1 | [
"BSD-2-Clause"
] | 17 | 2021-09-02T18:06:33.000Z | 2022-01-06T08:04:51.000Z | luna/translation_db.py | Hakanaou/deepLuna | c67b68a5a4361e4e4f03f825b1e7f26dc74660e1 | [
"BSD-2-Clause"
] | 5 | 2021-09-02T18:05:05.000Z | 2021-11-15T06:23:54.000Z | import io
import copy
import hashlib
import json
import multiprocessing
import os
import re
import struct
import sys
from luna.constants import Constants
from luna.mrg_parser import Mzp
from luna.mzx import Mzx
from luna.readable_exporter import ReadableExporter
from luna.ruby_utils import RubyUtils
class Translatio... | 38.23913 | 79 | 0.569475 |
03e713c72d99db06d75539c9b9af516c63d05bf1 | 1,447 | py | Python | python/src/cryptopals/set6/challenge41.py | ocirne/cryptopals | 3835bbeef3e521d48814795b94d426139918b9cd | [
"Unlicense"
] | 1 | 2021-02-20T16:38:25.000Z | 2021-02-20T16:38:25.000Z | python/src/cryptopals/set6/challenge41.py | ocirne/cryptopals | 3835bbeef3e521d48814795b94d426139918b9cd | [
"Unlicense"
] | null | null | null | python/src/cryptopals/set6/challenge41.py | ocirne/cryptopals | 3835bbeef3e521d48814795b94d426139918b9cd | [
"Unlicense"
] | null | null | null | from cryptopals.crypto import RSA, int_to_str
class Bob:
def __init__(self, rsa: RSA):
self.rsa = rsa
self.seen = []
def get_public_key(self):
return self.rsa.public_key()
def please_decrypt(self, ct):
if ct in self.seen:
return None
self.seen.append(c... | 24.116667 | 68 | 0.577056 |
03e71cb192ca55f9b5479b662e3eca7e4afa68ab | 7,612 | py | Python | whatsminer/api.py | satoshi-anonymoto/whatsminer-api | d7e6fb379da1ec0736c61ccc941b5438c028d427 | [
"MIT"
] | 11 | 2021-08-23T01:08:06.000Z | 2022-03-20T15:05:10.000Z | whatsminer/api.py | satoshi-anonymoto/whatsminer-api | d7e6fb379da1ec0736c61ccc941b5438c028d427 | [
"MIT"
] | null | null | null | whatsminer/api.py | satoshi-anonymoto/whatsminer-api | d7e6fb379da1ec0736c61ccc941b5438c028d427 | [
"MIT"
] | 7 | 2021-08-23T01:41:21.000Z | 2022-03-06T23:20:00.000Z | """
Heavily assisted by and modified from code found from an unknown source on Telegram
with the following credit:
* @Author: passby
* @Date: 2020-07-23 00:16:29
"""
import base64
import binascii
import datetime
import hashlib
import json
import logging
import os
import re
import select
import socket
from base64 im... | 32.391489 | 116 | 0.619548 |
03e75a617bb9f2624c89fec34620b9effb979978 | 9,088 | py | Python | src/test/tests/rendering/saveformats.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/test/tests/rendering/saveformats.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 5,100 | 2019-01-14T18:19:25.000Z | 2022-03-31T23:08:36.000Z | src/test/tests/rendering/saveformats.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 84 | 2019-01-24T17:41:50.000Z | 2022-03-10T10:01:46.000Z | # ----------------------------------------------------------------------------
# CLASSES: nightly
#
# Test Case: saveformats.py
#
# Tests: save window formats
#
# Programmer: Mark C. Miller
# Date: September 20, 2005
#
# Modifications:
# Jeremy Meredith, Mon Apr 23 14:07:35 EDT 2007
# Don't c... | 33.411765 | 102 | 0.542804 |
03e7661552daf787e73df2661d4dca2e2f79dd20 | 4,659 | py | Python | src/modules/web/fingerprint.py | The-Cracker-Technology/nullscan | 47fb41f17c59201a0d65a14705b4ff95fcc50a03 | [
"MIT"
] | 46 | 2020-04-18T16:42:59.000Z | 2022-01-31T22:08:52.000Z | src/modules/web/fingerprint.py | The-Cracker-Technology/nullscan | 47fb41f17c59201a0d65a14705b4ff95fcc50a03 | [
"MIT"
] | null | null | null | src/modules/web/fingerprint.py | The-Cracker-Technology/nullscan | 47fb41f17c59201a0d65a14705b4ff95fcc50a03 | [
"MIT"
] | 11 | 2020-04-23T12:46:18.000Z | 2022-02-04T12:53:50.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*- ########################################################
# ____ _ __ #
# ___ __ __/ / /__ ___ ______ ______(_) /___ __ #
# / _ \/ // / / (_-</ -_) __/ // / __/ / __/ // / ... | 25.598901 | 80 | 0.465765 |
03e777a7f7ddef76a63d0f180a930e3fc596c57f | 106 | py | Python | tests/helpers.py | tyarkoni/precis | a53a2f9c50760856aedcc0dca72a6c751928c174 | [
"MIT"
] | 7 | 2015-02-11T08:42:11.000Z | 2019-10-02T00:23:13.000Z | tests/helpers.py | tyarkoni/precis | a53a2f9c50760856aedcc0dca72a6c751928c174 | [
"MIT"
] | null | null | null | tests/helpers.py | tyarkoni/precis | a53a2f9c50760856aedcc0dca72a6c751928c174 | [
"MIT"
] | 5 | 2015-06-03T15:08:38.000Z | 2019-08-28T10:34:52.000Z | import os
def get_test_data_path():
return os.path.join(os.path.dirname(__file__), 'data') + os.path.sep | 26.5 | 69 | 0.745283 |
03e7782deda07483349d51911e87b208648c67d2 | 504 | py | Python | sendim/templatetags/addFontColor.py | ZuluPro/snafu | dbd79da4617db315ba7e76a0af6805cc3b1cbae2 | [
"BSD-3-Clause"
] | 1 | 2017-12-13T20:28:32.000Z | 2017-12-13T20:28:32.000Z | sendim/templatetags/addFontColor.py | ZuluPro/snafu | dbd79da4617db315ba7e76a0af6805cc3b1cbae2 | [
"BSD-3-Clause"
] | null | null | null | sendim/templatetags/addFontColor.py | ZuluPro/snafu | dbd79da4617db315ba7e76a0af6805cc3b1cbae2 | [
"BSD-3-Clause"
] | null | null | null | from sendim.models import *
from django import template
register = template.Library()
@register.filter(name='addFontColor', is_safe=True)
def addFontColor(value, arg) :
"""Return the given string between <font>...</font> markup.
string is colorized by the color given in arg."""
for color,status in ( ('gr... | 38.769231 | 138 | 0.640873 |
03e7793031ce7c5bf235fabc30f4887b2e8fa671 | 951 | py | Python | fairscale/nn/pipe/__init__.py | aurickq/fairscale | 909c84462c6c53abcc4c2841d14a9496e6a3e033 | [
"Apache-2.0",
"BSD-3-Clause"
] | 1 | 2020-07-23T22:30:36.000Z | 2020-07-23T22:30:36.000Z | fairscale/nn/pipe/__init__.py | aurickq/fairscale | 909c84462c6c53abcc4c2841d14a9496e6a3e033 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | fairscale/nn/pipe/__init__.py | aurickq/fairscale | 909c84462c6c53abcc4c2841d14a9496e6a3e033 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
#
# This source code is licensed under the BSD license found in the
# LICENSE file in the root directory of this source tree.
# Copyright 2019 Kakao Brain
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this f... | 38.04 | 74 | 0.764458 |
03e7afac6ebaa1584c3586463269a1a224e850ed | 156 | py | Python | accounts/admin.py | Wings30306/callingmrschristmas | 2957e4fd3e61e0df4f3135113d52a518eae6270e | [
"PostgreSQL"
] | 4 | 2020-01-31T13:49:43.000Z | 2020-02-05T22:47:51.000Z | accounts/admin.py | Wings30306/callingmrschristmas | 2957e4fd3e61e0df4f3135113d52a518eae6270e | [
"PostgreSQL"
] | 13 | 2019-12-07T12:16:27.000Z | 2022-03-12T00:06:22.000Z | accounts/admin.py | Wings30306/callingmrschristmas | 2957e4fd3e61e0df4f3135113d52a518eae6270e | [
"PostgreSQL"
] | 1 | 2020-02-01T00:23:19.000Z | 2020-02-01T00:23:19.000Z | from django.contrib import admin
from .models import ContactDetails
""" Register the ContactDetails model to admin """
admin.site.register(ContactDetails)
| 26 | 50 | 0.807692 |
03e7b290b15077c2000c051f76afcd55975c5139 | 3,792 | py | Python | git_t5/cli/train_model.py | formermagic/git-t5 | 5ee27d1be72988986f03659bd79fc2f9680e5372 | [
"MIT"
] | 1 | 2021-07-05T18:40:35.000Z | 2021-07-05T18:40:35.000Z | git_t5/cli/train_model.py | formermagic/git-t5 | 5ee27d1be72988986f03659bd79fc2f9680e5372 | [
"MIT"
] | null | null | null | git_t5/cli/train_model.py | formermagic/git-t5 | 5ee27d1be72988986f03659bd79fc2f9680e5372 | [
"MIT"
] | null | null | null | import os
from dataclasses import dataclass
import hydra
from git_t5.core import (
T5DataModule,
T5DataModuleConfig,
T5ModelForPreTraining,
T5ModelForPreTrainingConfig,
T5Trainer,
T5TrainerConfig,
WandbLogger,
WandbLoggerConfig,
)
from git_t5.core.configs import (
HFDatasetConfig,
... | 22.706587 | 70 | 0.654008 |
03e7c23bf74f171f33dafb72329b067d9cdf9c4e | 21,016 | py | Python | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/_virtual_machine_images_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2021-09-07T18:39:05.000Z | 2021-09-07T18:39:05.000Z | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/_virtual_machine_images_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/_virtual_machine_images_operations.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 ... | 39.578154 | 221 | 0.669395 |
03e7d80d16d53be7008d5f635a4606efb8ae63d5 | 343 | py | Python | modules/onode/__init__.py | opennode/opennode-tui | 1f92da5690a42ad71b1030c72db4b5a1158ab052 | [
"Apache-1.1"
] | 4 | 2015-05-21T20:21:26.000Z | 2020-12-18T06:50:06.000Z | modules/onode/__init__.py | opennode/opennode-tui | 1f92da5690a42ad71b1030c72db4b5a1158ab052 | [
"Apache-1.1"
] | null | null | null | modules/onode/__init__.py | opennode/opennode-tui | 1f92da5690a42ad71b1030c72db4b5a1158ab052 | [
"Apache-1.1"
] | 1 | 2016-02-08T00:43:44.000Z | 2016-02-08T00:43:44.000Z | from func.minion.modules import func_module
import sys
import opennode.cli.actions
sys.path.append('/home/marko/Projects/opennode/opennode-tui')
class OpenNode(func_module.FuncModule):
version = "0.0.1"
api_version = "0.0.1"
description = "opennode module"
def metrics(self):
return opennode... | 21.4375 | 61 | 0.723032 |
03e8225c5061962d75705684dc678e5b2ed03f9b | 250 | py | Python | erpnext2alfresco/erpnext2alfresco/doctype/mapping/mapping.py | CWTGMBH/erpnext2alfresco | a6ac05a48b16dff568e670749cfca3b0ceaf049d | [
"MIT"
] | null | null | null | erpnext2alfresco/erpnext2alfresco/doctype/mapping/mapping.py | CWTGMBH/erpnext2alfresco | a6ac05a48b16dff568e670749cfca3b0ceaf049d | [
"MIT"
] | null | null | null | erpnext2alfresco/erpnext2alfresco/doctype/mapping/mapping.py | CWTGMBH/erpnext2alfresco | a6ac05a48b16dff568e670749cfca3b0ceaf049d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2015, Arizem and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
class Mapping(Document):
pass
| 22.727273 | 49 | 0.776 |
03e841e2775401513ef4af641571f38b42faf61e | 8,809 | py | Python | models/experimental/resnet50_keras/resnet50_ctl_tf1.py | skydooms/tpu | 4553e1ed26763769768b9ba6744431908f7e37c0 | [
"Apache-2.0"
] | null | null | null | models/experimental/resnet50_keras/resnet50_ctl_tf1.py | skydooms/tpu | 4553e1ed26763769768b9ba6744431908f7e37c0 | [
"Apache-2.0"
] | null | null | null | models/experimental/resnet50_keras/resnet50_ctl_tf1.py | skydooms/tpu | 4553e1ed26763769768b9ba6744431908f7e37c0 | [
"Apache-2.0"
] | 1 | 2020-01-30T21:12:05.000Z | 2020-01-30T21:12:05.000Z | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 38.467249 | 91 | 0.714497 |
03e84c255de423ac19157de9a77eb4b4f2506532 | 389 | py | Python | tgbot/services/setting_commands.py | mezgoodle/genji-moderator | 452ca2e0c622f29e980a403ceed9ecc16e8f86c7 | [
"MIT"
] | 3 | 2021-11-11T17:03:02.000Z | 2022-02-25T06:48:33.000Z | tgbot/services/setting_commands.py | mezgoodle/genji-moderator | 452ca2e0c622f29e980a403ceed9ecc16e8f86c7 | [
"MIT"
] | 21 | 2021-11-01T03:05:01.000Z | 2022-03-02T15:19:58.000Z | tgbot/services/setting_commands.py | mezgoodle/genji-moderator | 452ca2e0c622f29e980a403ceed9ecc16e8f86c7 | [
"MIT"
] | null | null | null | from aiogram import Bot
from aiogram.types import BotCommand
async def set_default_commands(bot: Bot) -> None:
commands = [
BotCommand(command='start', description='Start the bot'),
BotCommand(command='help', description='Show help'),
BotCommand(command='admins', description='Show admins o... | 32.416667 | 76 | 0.70437 |
03e8584a89224cad5f4ea168ae9751a1d8f76e24 | 2,448 | py | Python | src/pywriter/converter/yw_cnv.py | peter88213/yWrestler | 32a152e8b814983ecaef6e9861df1d6b7008568d | [
"MIT"
] | null | null | null | src/pywriter/converter/yw_cnv.py | peter88213/yWrestler | 32a152e8b814983ecaef6e9861df1d6b7008568d | [
"MIT"
] | null | null | null | src/pywriter/converter/yw_cnv.py | peter88213/yWrestler | 32a152e8b814983ecaef6e9861df1d6b7008568d | [
"MIT"
] | null | null | null | """Provide the base class for Novel file conversion.
All converters inherit from this class.
Copyright (c) 2022 Peter Triesberger
For further information see https://github.com/peter88213/PyWriter
Published under the MIT License (https://opensource.org/licenses/mit-license.php)
"""
import os
from pywriter.p... | 35.478261 | 104 | 0.639297 |
03e8856e780d1a692d5d83333e9f8fb0361c3b4a | 3,989 | py | Python | data/operator/bbox/utility/image.py | zhangzhengde0225/SwinTrack | 526be17f8ef266cb924c6939bd8dda23e9b73249 | [
"MIT"
] | 143 | 2021-12-03T02:33:36.000Z | 2022-03-29T00:01:48.000Z | data/operator/bbox/utility/image.py | zhangzhengde0225/SwinTrack | 526be17f8ef266cb924c6939bd8dda23e9b73249 | [
"MIT"
] | 33 | 2021-12-03T10:32:05.000Z | 2022-03-31T02:13:55.000Z | data/operator/bbox/utility/image.py | zhangzhengde0225/SwinTrack | 526be17f8ef266cb924c6939bd8dda23e9b73249 | [
"MIT"
] | 24 | 2021-12-04T06:46:42.000Z | 2022-03-30T07:57:47.000Z | from data.types.pixel_coordinate_system import PixelCoordinateSystem
from data.types.bounding_box_format import BoundingBoxFormat
from data.types.bounding_box_coordinate_system import BoundingBoxCoordinateSystem
from data.types.pixel_definition import PixelDefinition
def _common_routine(bounding_box, image_size, boun... | 71.232143 | 116 | 0.713462 |
03e888bfba5d6f25ed22c60c182286325880b3b7 | 746 | py | Python | tests/test_dataloading_images.py | i008/zeroml | 849258d34606698aba44c5f0028254025755e8ff | [
"MIT"
] | null | null | null | tests/test_dataloading_images.py | i008/zeroml | 849258d34606698aba44c5f0028254025755e8ff | [
"MIT"
] | null | null | null | tests/test_dataloading_images.py | i008/zeroml | 849258d34606698aba44c5f0028254025755e8ff | [
"MIT"
] | null | null | null | from zeroml.dataloading.image.datasets import ImageClfAlbuDataset
from zeroml.dataloading.image.transforms import build_training_transform
def test_build_training_transform():
transform = build_training_transform(224, model=None, augment='noaug')
transform = build_training_transform(224, model='resnet18', aug... | 28.692308 | 101 | 0.764075 |
03e8cec3d06339c68bd4b32bd0ec6573a58e1a86 | 1,307 | py | Python | e3nn/util/broadcast.py | SuperXiang/e3nn | b97b2b9e83f896c6b8b21b2fe20dc356a2c18e0c | [
"MIT"
] | 1 | 2021-02-09T10:34:09.000Z | 2021-02-09T10:34:09.000Z | e3nn/util/broadcast.py | SuperXiang/e3nn | b97b2b9e83f896c6b8b21b2fe20dc356a2c18e0c | [
"MIT"
] | null | null | null | e3nn/util/broadcast.py | SuperXiang/e3nn | b97b2b9e83f896c6b8b21b2fe20dc356a2c18e0c | [
"MIT"
] | null | null | null | from typing import Tuple, List
import torch
@torch.jit.script
def broadcast_tensors(x: torch.Tensor,
y: torch.Tensor,
dim_x: int=-1,
dim_y: int=-1) -> Tuple[torch.Tensor, torch.Tensor]:
r"""
Examples
--------
>>> import torch
>>> ... | 24.203704 | 93 | 0.515685 |
03e8f63032062e8b72c87d9afab69b12c62be7d2 | 1,087 | py | Python | datawinners/feeds/database.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | 1 | 2015-11-02T09:11:12.000Z | 2015-11-02T09:11:12.000Z | datawinners/feeds/database.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | null | null | null | datawinners/feeds/database.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | null | null | null | from django.conf import settings
from mangrove.datastore.database import get_db_manager
def feeds_db_name(database_name):
return 'feed_' + database_name
def get_feed_database_name(user):
from datawinners.main.utils import get_database_name
database_name = get_database_name(user)
return feeds_db_name(d... | 31.970588 | 90 | 0.797608 |
03e9418934d98bb0350c124a3b75344ae8f26de2 | 38,029 | py | Python | improver_tests/nowcasting/optical_flow/test_OpticalFlow.py | owena11/improver | ff658db31364c0bdf3af3940736c260e10544705 | [
"BSD-3-Clause"
] | 77 | 2017-04-26T07:47:40.000Z | 2022-03-31T09:40:49.000Z | improver_tests/nowcasting/optical_flow/test_OpticalFlow.py | owena11/improver | ff658db31364c0bdf3af3940736c260e10544705 | [
"BSD-3-Clause"
] | 1,440 | 2017-03-29T10:04:15.000Z | 2022-03-28T10:11:29.000Z | improver_tests/nowcasting/optical_flow/test_OpticalFlow.py | MoseleyS/improver | ca028e3a1c842e3ff00b188c8ea6eaedd0a07149 | [
"BSD-3-Clause"
] | 72 | 2017-03-17T16:53:45.000Z | 2022-02-16T09:41:37.000Z | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# (C) British Crown Copyright 2017-2021 Met Office.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions a... | 40.979526 | 87 | 0.606064 |
03e94cf0d9cda6c8b696dbfdcb9f72afbf0d4669 | 493 | py | Python | Sockets-TCP-UDP/src/xenoteo/com/github/lab/task2/PythonUdpClient.py | xenoteo/Distributed-Systems | 86157328921e0b444f3597cb7f6b413ea8acfd51 | [
"MIT"
] | null | null | null | Sockets-TCP-UDP/src/xenoteo/com/github/lab/task2/PythonUdpClient.py | xenoteo/Distributed-Systems | 86157328921e0b444f3597cb7f6b413ea8acfd51 | [
"MIT"
] | null | null | null | Sockets-TCP-UDP/src/xenoteo/com/github/lab/task2/PythonUdpClient.py | xenoteo/Distributed-Systems | 86157328921e0b444f3597cb7f6b413ea8acfd51 | [
"MIT"
] | null | null | null | import socket
print('PYTHON UDP CLIENT')
serverIP = "127.0.0.1"
serverPort = 9008
client = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
while True:
msg = input("Enter the message (q to stop): ")
if msg == "q":
client.sendto(bytes("Finishing the transmission...", 'UTF-8'), (serverIP, serverPort))
... | 29 | 94 | 0.655172 |
03e96dfdab89fc3b5d19bff68f1bcd23e01bb783 | 39,806 | py | Python | Viewer.py | notatallshaw/Grail-0.6 | 2b850a4a3dcfcb6cb4cf891f2c2f9ee0509c7b43 | [
"CNRI-Jython"
] | null | null | null | Viewer.py | notatallshaw/Grail-0.6 | 2b850a4a3dcfcb6cb4cf891f2c2f9ee0509c7b43 | [
"CNRI-Jython"
] | null | null | null | Viewer.py | notatallshaw/Grail-0.6 | 2b850a4a3dcfcb6cb4cf891f2c2f9ee0509c7b43 | [
"CNRI-Jython"
] | null | null | null | """Viewer class."""
import sys
from tkinter import *
from typing import Tuple
import tk_tools
import formatter
import string
from string import strip
from Context import Context, SimpleContext
from Cursors import *
from types import StringType
from urllib import urljoin, urllib
from Stylesheet import UndefinedStyle
... | 36.960074 | 79 | 0.572376 |
03e971f62758194f08396aff0e22176f1f751ae8 | 5,086 | py | Python | cogs/utils/misc.py | HypixelBot/bot | 672e17c5bbd37b0e7e54581b679051b7e59575d2 | [
"MIT"
] | 10 | 2020-06-06T13:57:46.000Z | 2021-11-08T09:27:42.000Z | cogs/utils/misc.py | HypixelBot/Bot | 672e17c5bbd37b0e7e54581b679051b7e59575d2 | [
"MIT"
] | 7 | 2020-06-06T14:04:05.000Z | 2020-07-05T04:05:37.000Z | cogs/utils/misc.py | HypixelBot/bot | 672e17c5bbd37b0e7e54581b679051b7e59575d2 | [
"MIT"
] | 14 | 2020-06-09T17:12:52.000Z | 2021-07-21T23:24:30.000Z | # from PIL import Image, ImageDraw, ImageFont
# from io import BytesIO
import random
import json
import aiohttp
from urllib.parse import quote as uriquote
try:
from lxml import etree
except ImportError:
from bs4 import BeautifulSoup
from urllib.parse import parse_qs, quote_plus
def rainbow():
color = ''.j... | 37.397059 | 216 | 0.58022 |
03e97255731f73292cc4081d3ab8ac588729e83e | 1,108 | py | Python | setup.py | JulianFlesch/discavar-vcf | 84e89f57abb3ae07e5c857e6a700ebb4bcea2c64 | [
"MIT"
] | null | null | null | setup.py | JulianFlesch/discavar-vcf | 84e89f57abb3ae07e5c857e6a700ebb4bcea2c64 | [
"MIT"
] | null | null | null | setup.py | JulianFlesch/discavar-vcf | 84e89f57abb3ae07e5c857e6a700ebb4bcea2c64 | [
"MIT"
] | null | null | null | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="discavar-vcf",
version="0.1",
author="Julian Flesch",
author_email="",
keywords="bioinformatics ngs-analysis vcf cohort disease causing",
description="Variant Cohort Analysis from VCF... | 27.02439 | 72 | 0.600181 |
03e97ae8d93d253ac278407733f296199725842c | 8,629 | py | Python | src/utils/pytorch/ts_loader.py | cor-e-software/nbeatsx | 90a6f5b5740556a7549fd9940cde8c3af46250c7 | [
"MIT"
] | 54 | 2021-04-21T21:08:06.000Z | 2022-03-10T04:30:56.000Z | src/utils/pytorch/ts_loader.py | JoshuaC3/nbeatsx | 6e0f6dd7c9ff196ac9b71f059fc52c2df3adfb56 | [
"MIT"
] | 5 | 2021-04-27T12:26:54.000Z | 2022-02-23T18:43:22.000Z | src/utils/pytorch/ts_loader.py | JoshuaC3/nbeatsx | 6e0f6dd7c9ff196ac9b71f059fc52c2df3adfb56 | [
"MIT"
] | 15 | 2021-05-08T07:58:39.000Z | 2022-03-29T14:29:07.000Z | import numpy as np
import pandas as pd
import random
import torch as t
import copy
from src.utils.pytorch.ts_dataset import TimeSeriesDataset
from collections import defaultdict
class TimeSeriesLoader(object):
def __init__(self,
ts_dataset:TimeSeriesDataset,
model:str,
... | 45.656085 | 132 | 0.659984 |
03e97ffda2c2954d09f269329ee9aee48e26587d | 1,503 | py | Python | src/djangoflash/storage/cookie.py | duct-tape/django-flash | ce77d3ca3d6823068984f898c3b44e2fef0beb8b | [
"BSD-3-Clause"
] | null | null | null | src/djangoflash/storage/cookie.py | duct-tape/django-flash | ce77d3ca3d6823068984f898c3b44e2fef0beb8b | [
"BSD-3-Clause"
] | null | null | null | src/djangoflash/storage/cookie.py | duct-tape/django-flash | ce77d3ca3d6823068984f898c3b44e2fef0beb8b | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""This module provides a cookie-based flash storage backend.
.. warning::
The actual :class:`FlashScope` object is sent back to the user in a cookie.
Although some encryption is performed to help spot when the flash data is
modified by third-parties, this backend should be avoided wh... | 33.4 | 79 | 0.671989 |
03e985d6c8bb1fa8fd3e77f0c7d92af57874d2ed | 1,108 | py | Python | History/20211230-011142_76_best/example_adapter_orig.py | oldpaws/AI3601_RL_Final_Project_MAGAIL | 6e53d5c4ad21c9e3907e6d14b20c04b3287800cf | [
"MIT"
] | null | null | null | History/20211230-011142_76_best/example_adapter_orig.py | oldpaws/AI3601_RL_Final_Project_MAGAIL | 6e53d5c4ad21c9e3907e6d14b20c04b3287800cf | [
"MIT"
] | null | null | null | History/20211230-011142_76_best/example_adapter_orig.py | oldpaws/AI3601_RL_Final_Project_MAGAIL | 6e53d5c4ad21c9e3907e6d14b20c04b3287800cf | [
"MIT"
] | null | null | null | import gym
import utils
def get_observation_adapter(obs_stack_size):
stack_size = obs_stack_size
# look_ahead = 10
closest_neighbor_num = 8
img_resolution = 40
observe_lane_num = 3
subscribed_features = dict(
# distance_to_center=(stack_size, 1),
ego_pos=(stack_size, 2),
... | 30.777778 | 86 | 0.685018 |
03e9a0c22d8ae4be097dae104fb63f1e12d06ff8 | 1,185 | py | Python | setup.py | hnjm/preview-card | 46f5ef7422aac896b3a98e8b07f6eee8a2ba8991 | [
"MIT"
] | 1 | 2019-09-19T03:36:44.000Z | 2019-09-19T03:36:44.000Z | setup.py | hnjm/preview-card | 46f5ef7422aac896b3a98e8b07f6eee8a2ba8991 | [
"MIT"
] | null | null | null | setup.py | hnjm/preview-card | 46f5ef7422aac896b3a98e8b07f6eee8a2ba8991 | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
setup(
name = 'django-preview-card',
version = '1.0.0',
description = 'Anyone can obtain data(url, image, title, description, etc) easily from plain text for showing preview card like Twitter, Facebook newsfeed',
long_description = o... | 43.888889 | 165 | 0.591561 |
03e9a71184a1dc312d135d71f309ae9e774a0dd4 | 5,908 | py | Python | ote_cli/ote_cli/tools/utils/demo/visualization.py | ntyukaev/training_extensions | c897d42e50828fea853ceda0795e1f0e7d6e9909 | [
"Apache-2.0"
] | null | null | null | ote_cli/ote_cli/tools/utils/demo/visualization.py | ntyukaev/training_extensions | c897d42e50828fea853ceda0795e1f0e7d6e9909 | [
"Apache-2.0"
] | null | null | null | ote_cli/ote_cli/tools/utils/demo/visualization.py | ntyukaev/training_extensions | c897d42e50828fea853ceda0795e1f0e7d6e9909 | [
"Apache-2.0"
] | null | null | null | """
Visualisation module.
"""
# Copyright (C) 2021 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 app... | 36.245399 | 92 | 0.659953 |
03ea099e4df4a625f9cc63da05ff829dbab93074 | 7,958 | py | Python | source/tools/utils/git_log_review_commits.py | 1-MillionParanoidTterabytes/Blender-2.79b-blackened | e8d767324e69015aa66850d13bee7db1dc7d084b | [
"Unlicense"
] | 2 | 2018-06-18T01:50:25.000Z | 2018-06-18T01:50:32.000Z | source/tools/utils/git_log_review_commits.py | 1-MillionParanoidTterabytes/Blender-2.79b-blackened | e8d767324e69015aa66850d13bee7db1dc7d084b | [
"Unlicense"
] | null | null | null | source/tools/utils/git_log_review_commits.py | 1-MillionParanoidTterabytes/Blender-2.79b-blackened | e8d767324e69015aa66850d13bee7db1dc7d084b | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python3
# ***** BEGIN GPL LICENSE BLOCK ***** #
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This... | 29.043796 | 113 | 0.545489 |
03ea0a4c69eaac6cbdd55a7e475289e22ab76b0a | 839 | py | Python | utils/base.py | eleGAN23/QVAE | 7315aae7a03637dcc2e2226644d591c4f034527e | [
"MIT"
] | 10 | 2021-03-25T11:56:37.000Z | 2021-12-25T19:40:29.000Z | utils/base.py | eleGAN23/QVAE | 7315aae7a03637dcc2e2226644d591c4f034527e | [
"MIT"
] | null | null | null | utils/base.py | eleGAN23/QVAE | 7315aae7a03637dcc2e2226644d591c4f034527e | [
"MIT"
] | 1 | 2021-12-28T10:39:57.000Z | 2021-12-28T10:39:57.000Z | from torch import nn
from abc import abstractmethod
from typing import List, Callable, Union, Any, TypeVar, Tuple
# from torch import tensor as Tensor
Tensor = TypeVar('torch.tensor')
class BaseVAE(nn.Module):
def __init__(self) -> None:
super(BaseVAE, self).__init__()
def encode(self, input: Te... | 25.424242 | 78 | 0.665077 |
03ea148476b48fca9ec044be1b32c204f6dba984 | 618 | py | Python | client/verta/verta/_swagger/_public/modeldb/model/ModeldbGetProjectByIdResponse.py | CaptEmulation/modeldb | 78b10aca553e386554f9740db63466b1cf013a1a | [
"Apache-2.0"
] | 835 | 2017-02-08T20:14:24.000Z | 2020-03-12T17:37:49.000Z | client/verta/verta/_swagger/_public/modeldb/model/ModeldbGetProjectByIdResponse.py | CaptEmulation/modeldb | 78b10aca553e386554f9740db63466b1cf013a1a | [
"Apache-2.0"
] | 651 | 2019-04-18T12:55:07.000Z | 2022-03-31T23:45:09.000Z | client/verta/verta/_swagger/_public/modeldb/model/ModeldbGetProjectByIdResponse.py | CaptEmulation/modeldb | 78b10aca553e386554f9740db63466b1cf013a1a | [
"Apache-2.0"
] | 170 | 2017-02-13T14:49:22.000Z | 2020-02-19T17:59:12.000Z | # THIS FILE IS AUTO-GENERATED. DO NOT EDIT
from verta._swagger.base_type import BaseType
class ModeldbGetProjectByIdResponse(BaseType):
def __init__(self, project=None):
required = {
"project": False,
}
self.project = project
for k, v in required.items():
if self[k] is None and v:
... | 24.72 | 62 | 0.68123 |
03ea30ccb8c510172c21d1e9eaaffc9e67fa7e6e | 4,794 | py | Python | example/test_full/tests/test07_o2o.py | olivierdalang/django-computedfields | 13a5c107904e7596eeafe948ffc66c9702d95589 | [
"MIT"
] | null | null | null | example/test_full/tests/test07_o2o.py | olivierdalang/django-computedfields | 13a5c107904e7596eeafe948ffc66c9702d95589 | [
"MIT"
] | null | null | null | example/test_full/tests/test07_o2o.py | olivierdalang/django-computedfields | 13a5c107904e7596eeafe948ffc66c9702d95589 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from .base import GenericModelTestBase
# copied from test01_fk and
# fk relations changed to o2o
class ForeignKeyDependencies(GenericModelTestBase):
"""
Test cases for foreign key relations.
"""
def setUp(self):
self.setDeps({
... | 36.876923 | 116 | 0.572799 |
03ea74a23403d6de420ca041eb960252ee9fb6ae | 2,115 | py | Python | homeassistant/components/skybell/switch.py | marioedani/homeassistant-core | 2bc5db857ec6aa605ea7ff363654db2109f7cec4 | [
"Apache-2.0"
] | 7 | 2019-02-07T14:14:12.000Z | 2019-07-28T06:56:10.000Z | homeassistant/components/skybell/switch.py | tomachristian/core | 71c8fcee20c55536b33c3ee774c76c1795f37cd2 | [
"Apache-2.0"
] | 6 | 2021-02-08T20:54:31.000Z | 2022-03-12T00:50:43.000Z | homeassistant/components/skybell/switch.py | tomachristian/core | 71c8fcee20c55536b33c3ee774c76c1795f37cd2 | [
"Apache-2.0"
] | 2 | 2020-04-19T13:35:24.000Z | 2020-04-19T13:35:51.000Z | """Switch support for the Skybell HD Doorbell."""
import logging
import voluptuous as vol
from homeassistant.components.switch import PLATFORM_SCHEMA, SwitchDevice
from homeassistant.const import CONF_ENTITY_NAMESPACE, CONF_MONITORED_CONDITIONS
import homeassistant.helpers.config_validation as cv
from . import DEFAU... | 29.375 | 80 | 0.678014 |
03ea7defb07745b710be64c830be0d75677bb12b | 979 | py | Python | skimage/filter/setup.py | jaberg/scikits-image | 2ab3e2dfb341189ef2ff9370c6cf3d33ef6ec88d | [
"BSD-3-Clause"
] | 2 | 2020-02-17T18:54:33.000Z | 2021-09-28T15:18:23.000Z | skimage/filter/setup.py | amueller/scikit-image | a8bfc5c5814a3c7fe363cfcad0c68b935706cd3c | [
"BSD-3-Clause"
] | 1 | 2015-09-04T09:25:46.000Z | 2015-09-04T09:25:46.000Z | skimage/filter/setup.py | emmanuelle/scikit-image | eccc41907135cf81b99c4be18a480a9bc705485d | [
"BSD-3-Clause"
] | 1 | 2019-12-20T19:19:59.000Z | 2019-12-20T19:19:59.000Z | #!/usr/bin/env python
import os
from skimage._build import cython
base_path = os.path.abspath(os.path.dirname(__file__))
def configuration(parent_package='', top_path=None):
from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs
config = Configuration('filter', parent_package, top_path... | 30.59375 | 79 | 0.679265 |
03eaa9dcd846ee4c585677a55ae171b149eec1d9 | 10,904 | py | Python | tracker/evaluator.py | batra-mlp-lab/vln-chasing-ghosts | f819aea21b94d9d3e23d9b6b9264054ee50c007b | [
"MIT"
] | 9 | 2019-11-29T15:02:13.000Z | 2021-02-14T11:03:26.000Z | tracker/evaluator.py | batra-mlp-lab/vln-chasing-ghosts | f819aea21b94d9d3e23d9b6b9264054ee50c007b | [
"MIT"
] | 1 | 2021-05-08T01:05:21.000Z | 2021-05-08T01:05:21.000Z | tracker/evaluator.py | batra-mlp-lab/vln-chasing-ghosts | f819aea21b94d9d3e23d9b6b9264054ee50c007b | [
"MIT"
] | 3 | 2020-03-05T06:48:13.000Z | 2021-01-22T17:37:52.000Z | from abc import abstractmethod
import math
import numpy as np
import torch
import torch.nn.functional as F
from tqdm import tqdm
from trainer import Trainer
from modules.mapper import Mapper
import metrics
import utils
class Evaluator(Trainer):
""" Generic class for running evaluations for different models on t... | 59.584699 | 315 | 0.655172 |
03eaac9c196e7306ee05e0fa211385d55a99d979 | 2,078 | py | Python | tests.py | LeMinaw/instruments.py | 8c74c690f6ee50a51ac1d5d6d3664bdb2b62b680 | [
"MIT"
] | null | null | null | tests.py | LeMinaw/instruments.py | 8c74c690f6ee50a51ac1d5d6d3664bdb2b62b680 | [
"MIT"
] | null | null | null | tests.py | LeMinaw/instruments.py | 8c74c690f6ee50a51ac1d5d6d3664bdb2b62b680 | [
"MIT"
] | null | null | null | from pytest import fixture, approx, raises
from instruments import Pipe, QuenaBody, ClarinetBody, Quena
from notes import NOTES
# FIXTURES
@fixture
def water_pipe():
return Pipe(18, 3.5)
@fixture
def quena_G4(water_pipe):
return Quena(
pipe = water_pipe,
freq = NOTES['G4'],
holes_freq... | 26.641026 | 86 | 0.62127 |
03eabec5bf1524577d508db4097dff62b2408751 | 9,304 | py | Python | napari/conftest.py | mkitti/napari | 4e954d30b5a1b70c5e495db1b8f48a3bdda1ff86 | [
"BSD-3-Clause"
] | null | null | null | napari/conftest.py | mkitti/napari | 4e954d30b5a1b70c5e495db1b8f48a3bdda1ff86 | [
"BSD-3-Clause"
] | null | null | null | napari/conftest.py | mkitti/napari | 4e954d30b5a1b70c5e495db1b8f48a3bdda1ff86 | [
"BSD-3-Clause"
] | null | null | null | import warnings
from functools import partial
from typing import List
import numpy as np
import pytest
from qtpy.QtWidgets import QApplication
from napari import Viewer
from napari.components import LayerList
from napari.layers import Image, Labels, Points, Shapes, Vectors
from napari.plugins._builtins import (
n... | 29.075 | 79 | 0.617369 |
03eac636856441a2012f0117c17a99add1835f1d | 1,403 | py | Python | pathogen_memo/forms/pathogen_form.py | NajlaBioinfo/pathogen_memo_app | 426a0ef545ffc96da8c6fc1bca5eb19caaf1879c | [
"MIT"
] | null | null | null | pathogen_memo/forms/pathogen_form.py | NajlaBioinfo/pathogen_memo_app | 426a0ef545ffc96da8c6fc1bca5eb19caaf1879c | [
"MIT"
] | 3 | 2021-09-03T10:33:09.000Z | 2022-03-12T00:17:18.000Z | pathogen_memo/forms/pathogen_form.py | NajlaBioinfo/pathogen_memo_app | 426a0ef545ffc96da8c6fc1bca5eb19caaf1879c | [
"MIT"
] | null | null | null | from flask_wtf import FlaskForm
from wtforms import StringField, TextField, SubmitField, SelectField
from wtforms.validators import DataRequired, Length
class PathogenForm(FlaskForm):
"""Pathogen form."""
gram_types = [
('Gram-positive', 'Gram-positive'),
('Gram-negative', 'Gram-negative')
... | 30.5 | 69 | 0.600143 |
03eac837da8218cfafa92e9b23af9d6e8b68c458 | 5,287 | py | Python | ripley/test/python/run_pasoSolversOnRipley.py | markendr/esys-escript.github.io | 0023eab09cd71f830ab098cb3a468e6139191e8d | [
"Apache-2.0"
] | null | null | null | ripley/test/python/run_pasoSolversOnRipley.py | markendr/esys-escript.github.io | 0023eab09cd71f830ab098cb3a468e6139191e8d | [
"Apache-2.0"
] | null | null | null | ripley/test/python/run_pasoSolversOnRipley.py | markendr/esys-escript.github.io | 0023eab09cd71f830ab098cb3a468e6139191e8d | [
"Apache-2.0"
] | null | null | null |
##############################################################################
#
# Copyright (c) 2003-2018 by The University of Queensland
# http://www.uq.edu.au
#
# Primary Business: Queensland, Australia
# Licensed under the Apache License, version 2.0
# http://www.apache.org/licenses/LICENSE-2.0
#
# Development unt... | 32.635802 | 93 | 0.682429 |
03eaeb6bdea3eaf75e5e2a83da084b18e0423fe1 | 6,340 | py | Python | pycatia/drafting_interfaces/drawing_threads.py | Tian-Jionglu/pycatia | b315aeb3a74846f134ff6b67b3a6334b9d3905fa | [
"MIT"
] | 1 | 2020-04-27T13:59:10.000Z | 2020-04-27T13:59:10.000Z | pycatia/drafting_interfaces/drawing_threads.py | Luanee/pycatia | ea5eef8178f73de12404561c00baf7a7ca30da59 | [
"MIT"
] | null | null | null | pycatia/drafting_interfaces/drawing_threads.py | Luanee/pycatia | ea5eef8178f73de12404561c00baf7a7ca30da59 | [
"MIT"
] | null | null | null | #! usr/bin/python3.6
"""
Module initially auto generated using V5Automation files from CATIA V5 R28 on 2020-06-11 12:40:47.360445
.. warning::
The notes denoted "CAA V5 Visual Basic Help" are to be used as reference only.
They are there as a guide as to how the visual basic / catscript function... | 40.382166 | 109 | 0.506309 |
03eaed0fd89c9c17a06e41b07845f5fc4d0c2424 | 3,208 | py | Python | sdk/cognitiveservices/azure-cognitiveservices-language-spellcheck/setup.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 2,728 | 2015-01-09T10:19:32.000Z | 2022-03-31T14:50:33.000Z | sdk/cognitiveservices/azure-cognitiveservices-language-spellcheck/setup.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 17,773 | 2015-01-05T15:57:17.000Z | 2022-03-31T23:50:25.000Z | sdk/cognitiveservices/azure-cognitiveservices-language-spellcheck/setup.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 1,916 | 2015-01-19T05:05:41.000Z | 2022-03-31T19:36:44.000Z | #!/usr/bin/env python
#-------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#----------------------------------------------------------------... | 34.494624 | 91 | 0.615337 |
03eafe1d7c03d6c4c15664789894e3853f691a91 | 1,661 | py | Python | app/__init__.py | mukul-pathania/flaskapp | 8aab014f011082183be416a784b61e94ead40054 | [
"MIT"
] | 3 | 2020-01-20T02:53:07.000Z | 2020-06-28T02:10:16.000Z | app/__init__.py | mukul-pathania/flaskapp | 8aab014f011082183be416a784b61e94ead40054 | [
"MIT"
] | null | null | null | app/__init__.py | mukul-pathania/flaskapp | 8aab014f011082183be416a784b61e94ead40054 | [
"MIT"
] | 3 | 2020-01-16T08:51:27.000Z | 2020-06-20T14:18:48.000Z | from flask import Flask
from config import Config
from flask_login import LoginManager
import logging
from logging.handlers import SMTPHandler, RotatingFileHandler
import os
from flask_mail import Mail
from flask_bootstrap import Bootstrap
from flask_moment import Moment
app = Flask(__name__)
app.config.from_object(Co... | 32.568627 | 79 | 0.673089 |
03eb0bf92a644528ced061788fe8fb15a1bbcdf3 | 252 | py | Python | CodeChef/JULY20/CHEFSTR1.py | mishrakeshav/Competitive-Programming | b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2 | [
"MIT"
] | 2 | 2020-06-25T21:10:32.000Z | 2020-12-10T06:53:45.000Z | CodeChef/JULY20/CHEFSTR1.py | mishrakeshav/Competitive-Programming | b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2 | [
"MIT"
] | null | null | null | CodeChef/JULY20/CHEFSTR1.py | mishrakeshav/Competitive-Programming | b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2 | [
"MIT"
] | 3 | 2020-05-15T14:17:09.000Z | 2021-07-25T13:18:20.000Z |
if __name__ == '__main__':
for t in range(int(input())):
n = int(input())
s = list(map(int,input().split()))
count = 0
for i in range(1,n):
count += abs(s[i-1] - s[i]) - 1
print(count)
| 22.909091 | 43 | 0.436508 |
03eb4a631d8481ac1aace29508f023e82618f734 | 316 | py | Python | oscar/lib/python2.7/site-packages/faker/providers/phone_number/es_ES/__init__.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/faker/providers/phone_number/es_ES/__init__.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/faker/providers/phone_number/es_ES/__init__.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import unicode_literals
from .. import Provider as PhoneNumberProvider
class Provider(PhoneNumberProvider):
formats = (
'+34 ### ### ###',
'+34 #########',
'+34 ### ## ## ##',
'+34### ### ###',
'+34#########',
'+34### ## ## ##',
) | 24.307692 | 47 | 0.398734 |
03eb4c7876629e0b0c9375057d6b83e6074d5481 | 3,578 | py | Python | execution_workflows/APAtrap/bin/check_samplesheet.py | iRNA-COSI/APAeval | cf1032d23ff3020e0b5ba50b3217b94d2b2d728d | [
"MIT"
] | 9 | 2021-05-25T17:01:09.000Z | 2022-02-11T22:07:46.000Z | execution_workflows/APAtrap/bin/check_samplesheet.py | iRNA-COSI/APAeval | cf1032d23ff3020e0b5ba50b3217b94d2b2d728d | [
"MIT"
] | 146 | 2021-05-18T23:55:56.000Z | 2022-03-31T14:34:06.000Z | execution_workflows/APAtrap/bin/check_samplesheet.py | iRNA-COSI/APAeval | cf1032d23ff3020e0b5ba50b3217b94d2b2d728d | [
"MIT"
] | 14 | 2021-05-03T14:38:33.000Z | 2021-08-21T21:21:22.000Z | #!/usr/bin/env python3
import os
import sys
import argparse
def parse_args(args=None):
Description = "Reformat APAeval samplesheet file and check its contents."
Epilog = "Example usage: python check_samplesheet.py <FILE_IN> <FILE_OUT>"
parser = argparse.ArgumentParser(description=Description, epilog=Epil... | 35.078431 | 125 | 0.58692 |
03eb869f3fa37b80ae900676c0c6c38fa33d5915 | 6,722 | py | Python | configs/wxcs/faster_rcnn_r50_fpn_1x_wxcs.py | mgnfcnt-ec/mmdet | 46647fba610dfb396569d7910058c707d67d4ec4 | [
"Apache-2.0"
] | 1 | 2022-03-01T02:46:52.000Z | 2022-03-01T02:46:52.000Z | configs/wxcs/faster_rcnn_r50_fpn_1x_wxcs.py | mgnfcnt-ec/mmdet | 46647fba610dfb396569d7910058c707d67d4ec4 | [
"Apache-2.0"
] | null | null | null | configs/wxcs/faster_rcnn_r50_fpn_1x_wxcs.py | mgnfcnt-ec/mmdet | 46647fba610dfb396569d7910058c707d67d4ec4 | [
"Apache-2.0"
] | null | null | null | # model settings
fp16 = dict(loss_scale=512.)
model = dict(
type='FasterRCNN',
backbone=dict(
type='ResNet',
depth=101,
num_stages=4,
out_indices=(0, 1, 2, 3),
frozen_stages=1,
norm_cfg=dict(type='BN', requires_grad=True),
norm_eval=True,
dcn=dict... | 31.411215 | 82 | 0.548646 |
03eb902ac3a984374774a2716eeb4ffbe9602c6b | 3,019 | py | Python | A6/a6_helper.py | Sundragon1993/CS231n_2020 | 47ebb67491dfedf1d9040866422b6cf369f0fbac | [
"MIT"
] | null | null | null | A6/a6_helper.py | Sundragon1993/CS231n_2020 | 47ebb67491dfedf1d9040866422b6cf369f0fbac | [
"MIT"
] | null | null | null | A6/a6_helper.py | Sundragon1993/CS231n_2020 | 47ebb67491dfedf1d9040866422b6cf369f0fbac | [
"MIT"
] | null | null | null | import torch
import time
import math
import os
import shutil
import torch.optim as optim
from torchvision import models, datasets, transforms
from torch.utils.data import DataLoader
import matplotlib.pyplot as plt
import matplotlib.gridspec as gridspec
from vae import loss_function
from torch import nn
def hello_help... | 30.806122 | 94 | 0.662471 |
03eb95ce22b427ff3f937598e516b6b865e28cb7 | 2,119 | py | Python | data/transcoder_evaluation_gfg/python/MOVE_ZEROES_END_ARRAY.py | mxl1n/CodeGen | e5101dd5c5e9c3720c70c80f78b18f13e118335a | [
"MIT"
] | 241 | 2021-07-20T08:35:20.000Z | 2022-03-31T02:39:08.000Z | data/transcoder_evaluation_gfg/python/MOVE_ZEROES_END_ARRAY.py | mxl1n/CodeGen | e5101dd5c5e9c3720c70c80f78b18f13e118335a | [
"MIT"
] | 49 | 2021-07-22T23:18:42.000Z | 2022-03-24T09:15:26.000Z | data/transcoder_evaluation_gfg/python/MOVE_ZEROES_END_ARRAY.py | mxl1n/CodeGen | e5101dd5c5e9c3720c70c80f78b18f13e118335a | [
"MIT"
] | 71 | 2021-07-21T05:17:52.000Z | 2022-03-29T23:49:28.000Z | # Copyright (c) 2019-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
#
def f_gold ( arr , n ) :
count = 0
for i in range ( n ) :
if arr [ i ] != 0 :
arr [ count ] = arr [ ... | 40.75 | 107 | 0.450212 |
03ebaa39951a93c8b6656f9c23c7602cae02ff33 | 7,832 | py | Python | src/dcos_e2e_cli/dcos_docker/commands/mac_network.py | cprovencher/dcos-e2e | c54b3d41f246efe3f90dcf225b0bffdc1f615daa | [
"Apache-2.0"
] | null | null | null | src/dcos_e2e_cli/dcos_docker/commands/mac_network.py | cprovencher/dcos-e2e | c54b3d41f246efe3f90dcf225b0bffdc1f615daa | [
"Apache-2.0"
] | null | null | null | src/dcos_e2e_cli/dcos_docker/commands/mac_network.py | cprovencher/dcos-e2e | c54b3d41f246efe3f90dcf225b0bffdc1f615daa | [
"Apache-2.0"
] | null | null | null | """
Tools for managing networking for Docker for Mac.
"""
import sys
import tarfile
import time
from io import BytesIO
from pathlib import Path
from shutil import copy, copytree, rmtree
from tempfile import TemporaryDirectory
from typing import Any # noqa: F401
from typing import Union
import click
import click_spin... | 29.89313 | 79 | 0.640194 |
03ebb04d26edec0e685b52e02324d822773201f4 | 22,628 | py | Python | sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/aio/operations/_queries_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-01-24T08:54:57.000Z | 2022-01-24T08:54:57.000Z | sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/aio/operations/_queries_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/aio/operations/_queries_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 46.752066 | 197 | 0.670806 |
03ebb80af94d3ededff330755986eaca93a1ca89 | 11,874 | py | Python | froide/foirequest/signals.py | ashmpace/question-mtl | 5ce1289cd6db0e629aa138d2dee235d9a4c4546b | [
"MIT"
] | null | null | null | froide/foirequest/signals.py | ashmpace/question-mtl | 5ce1289cd6db0e629aa138d2dee235d9a4c4546b | [
"MIT"
] | 3 | 2020-02-11T21:43:56.000Z | 2021-11-15T17:47:06.000Z | froide/foirequest/signals.py | ashmpace/question-mtl | 5ce1289cd6db0e629aa138d2dee235d9a4c4546b | [
"MIT"
] | null | null | null | from __future__ import unicode_literals
from django.db.models import signals
from django.dispatch import receiver
from django.core.mail import send_mail
from django.template.loader import render_to_string
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
from haystack.utils impo... | 36.990654 | 91 | 0.686205 |
03ebed4f3a5bc15b204f33e832cf2d9cb6872386 | 1,170 | py | Python | day12/test.py | mpirnat/adventofcode | f63ce466b91d5be2687be95fd4ab0b442f1ea5c8 | [
"MIT"
] | 12 | 2015-12-02T05:56:36.000Z | 2017-11-29T18:58:47.000Z | day12/test.py | mpirnat/adventofcode | f63ce466b91d5be2687be95fd4ab0b442f1ea5c8 | [
"MIT"
] | 1 | 2015-12-06T03:36:18.000Z | 2015-12-06T20:52:29.000Z | day12/test.py | mpirnat/adventofcode | f63ce466b91d5be2687be95fd4ab0b442f1ea5c8 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import unittest
from day12 import lolsum
from day12 import jsonsum
class TestLolSums(unittest.TestCase):
cases = (
([1, 2, 3], 6),
({"a":2,"b":4}, 6),
([[[3]]], 3),
({"a":{"b":4},"c":-1}, 3),
({"a":[-1,1]}, 0),
([-1,{"a":1}], 0),
([],... | 23.877551 | 66 | 0.469231 |
03ebee25140de419fda002320b1c4def2944c52f | 2,318 | py | Python | Models/ticker_utils.py | patmbee/ml_project_2 | 077c3cfeac160e615692aaf77a82dcfbc6c534b1 | [
"MIT"
] | null | null | null | Models/ticker_utils.py | patmbee/ml_project_2 | 077c3cfeac160e615692aaf77a82dcfbc6c534b1 | [
"MIT"
] | null | null | null | Models/ticker_utils.py | patmbee/ml_project_2 | 077c3cfeac160e615692aaf77a82dcfbc6c534b1 | [
"MIT"
] | null | null | null | # Import Modules
import pandas as pd
import numpy as np
#Modules for Yahoo!Finance
from pandas_datareader import data as pdr
import yfinance as yf
# Import the finta library
from finta import TA
def get_historical_data(symbol, start_date, end_date):
ticker = yf.Ticker(symbol)
ticker_df = ticker.history(star... | 30.906667 | 95 | 0.675582 |
03ebf36d845938121a35f7019820ade97408342b | 397 | py | Python | app/mod_api/views.py | crtarsorg/izborna-platforma | 3f3b8f89a8888e958c36d92438fd782fc25229f0 | [
"CC0-1.0"
] | null | null | null | app/mod_api/views.py | crtarsorg/izborna-platforma | 3f3b8f89a8888e958c36d92438fd782fc25229f0 | [
"CC0-1.0"
] | 112 | 2016-10-24T09:34:43.000Z | 2017-05-18T14:58:21.000Z | app/mod_api/views.py | crtarsorg/izborna-platforma | 3f3b8f89a8888e958c36d92438fd782fc25229f0 | [
"CC0-1.0"
] | null | null | null | # coding=utf-8
import pprint
from flask import Blueprint,request
from flask import render_template
import json,urllib
mod_api = Blueprint('api', __name__, url_prefix="/<lang_code>/api", static_folder="static", template_folder='templates')
#get data for all territories selected by year
@mod_api.route('/', methods=[... | 20.894737 | 120 | 0.75063 |
03ebf87301aa98c45c017190fd6597f66c3ed167 | 1,539 | py | Python | Code/Duplicates collections/findDuplicates.py | KunalSin9h/Playlist_Analysis | e8f7313f7c6dfcd3b3cabdfde89c8cdcc1f72f06 | [
"MIT"
] | 3 | 2021-09-23T12:08:40.000Z | 2021-09-25T08:38:29.000Z | Code/Duplicates collections/findDuplicates.py | KunalSin9h/Playlist_Analysis | e8f7313f7c6dfcd3b3cabdfde89c8cdcc1f72f06 | [
"MIT"
] | 1 | 2021-09-18T06:13:27.000Z | 2021-09-22T04:55:24.000Z | Code/Duplicates collections/findDuplicates.py | KunalSin9h/Playlist_Analysis | e8f7313f7c6dfcd3b3cabdfde89c8cdcc1f72f06 | [
"MIT"
] | null | null | null | """
Function to process track name and their duration and give the dictionary cantaing {track_name: (duration, count)} .
Author: Kunal Singh
Email: pykunalsingh@gmail.com
"""
def findDuplicates(fileName):
print("Finding duplicate tracks in %s..."%fileName)
#read in a playlist
with open(fileName, 'rb') a... | 35.790698 | 117 | 0.549058 |
03ebf9d5662fdcfbca096785c82e711b06b9b7d8 | 5,966 | py | Python | distributed/protocol/compression.py | willirath/distributed | 67fe8208a0a6edc18e02a4c5080d81fb11eab338 | [
"BSD-3-Clause"
] | null | null | null | distributed/protocol/compression.py | willirath/distributed | 67fe8208a0a6edc18e02a4c5080d81fb11eab338 | [
"BSD-3-Clause"
] | 2 | 2021-05-11T16:00:55.000Z | 2021-08-23T20:45:22.000Z | distributed/protocol/compression.py | willirath/distributed | 67fe8208a0a6edc18e02a4c5080d81fb11eab338 | [
"BSD-3-Clause"
] | 1 | 2020-12-16T05:38:10.000Z | 2020-12-16T05:38:10.000Z | """
Record known compressors
Includes utilities for determining whether or not to compress
"""
from contextlib import suppress
from functools import partial
import logging
import random
import dask
from tlz import identity
try:
import blosc
n = blosc.set_nthreads(2)
if hasattr("blosc", "releasegil"):
... | 27.366972 | 85 | 0.65052 |
03ec615f45884d28b3b4d60d0d37ed0aa8b57c25 | 3,443 | py | Python | test_app/tests/test_filters.py | makinacorpus/django-mapentity | 69a53fb8a676a9d4f6173b77fc09f99d38c4795e | [
"BSD-3-Clause"
] | 26 | 2015-01-12T13:22:40.000Z | 2022-03-07T16:50:52.000Z | test_app/tests/test_filters.py | makinacorpus/django-mapentity | 69a53fb8a676a9d4f6173b77fc09f99d38c4795e | [
"BSD-3-Clause"
] | 94 | 2015-01-21T16:20:47.000Z | 2022-03-24T13:44:56.000Z | test_app/tests/test_filters.py | makinacorpus/django-mapentity | 69a53fb8a676a9d4f6173b77fc09f99d38c4795e | [
"BSD-3-Clause"
] | 13 | 2015-01-22T07:11:15.000Z | 2019-10-28T02:07:48.000Z | from django_filters import CharFilter
from django.test import TestCase
from django.contrib.gis.geos import GEOSGeometry
from django.conf import settings
from mapentity.settings import API_SRID
from mapentity.filters import PythonPolygonFilter, PolygonFilter, MapEntityFilterSet
from ..models import MushroomSpot, Weath... | 36.62766 | 112 | 0.68603 |
03ec94439d449e674248d48fb6db7f5a0c79b6c0 | 25,855 | py | Python | python/gdx/gdx.py | 4beddgroup221/godirect-examples | 87728510c3eb92fd42b0ab73adcb07068555f995 | [
"BSD-3-Clause"
] | 13 | 2019-01-16T02:45:00.000Z | 2022-02-22T19:30:29.000Z | python/gdx/gdx.py | 4beddgroup221/godirect-examples | 87728510c3eb92fd42b0ab73adcb07068555f995 | [
"BSD-3-Clause"
] | 21 | 2019-01-17T20:47:28.000Z | 2022-03-17T17:35:37.000Z | python/gdx/gdx.py | 4beddgroup221/godirect-examples | 87728510c3eb92fd42b0ab73adcb07068555f995 | [
"BSD-3-Clause"
] | 19 | 2018-11-19T18:33:02.000Z | 2022-03-14T11:36:41.000Z | # To use Go Direct sensors with Python 3 you must install the godirect module
# using pip3 install godirect[usb,ble]
# If you plan to use the native Windows 10 BLE stack, the Bleak module must also
# be installed using pip3 install bleak
from godirect import GoDirect
import logging
import time ... | 44.045997 | 132 | 0.548482 |
03ece1760c234362bf299171fa6f5bbe942d8f34 | 51,807 | py | Python | gnocchi/rest/__init__.py | ISCAS-VDI/gnocchi-base | c5ed96a6fb8d925702f410c1382eb36bd991443b | [
"Apache-2.0"
] | null | null | null | gnocchi/rest/__init__.py | ISCAS-VDI/gnocchi-base | c5ed96a6fb8d925702f410c1382eb36bd991443b | [
"Apache-2.0"
] | null | null | null | gnocchi/rest/__init__.py | ISCAS-VDI/gnocchi-base | c5ed96a6fb8d925702f410c1382eb36bd991443b | [
"Apache-2.0"
] | null | null | null | # -*- encoding: utf-8 -*-
#
# Copyright © 2016 Red Hat, Inc.
# Copyright © 2014-2015 eNovance
#
# 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... | 34.400398 | 99 | 0.590885 |
03ece744d413beedf679c07edf05f470f737c8ba | 2,421 | py | Python | homeassistant/components/dynalite/convert_config.py | marioedani/homeassistant-core | 2bc5db857ec6aa605ea7ff363654db2109f7cec4 | [
"Apache-2.0"
] | 7 | 2019-02-07T14:14:12.000Z | 2019-07-28T06:56:10.000Z | homeassistant/components/dynalite/convert_config.py | tomachristian/core | 71c8fcee20c55536b33c3ee774c76c1795f37cd2 | [
"Apache-2.0"
] | 6 | 2021-02-08T20:54:31.000Z | 2022-03-12T00:50:43.000Z | homeassistant/components/dynalite/convert_config.py | tomachristian/core | 71c8fcee20c55536b33c3ee774c76c1795f37cd2 | [
"Apache-2.0"
] | 2 | 2020-04-19T13:35:24.000Z | 2020-04-19T13:35:51.000Z | """Convert the HA config to the dynalite config."""
from typing import Any, Dict
from dynalite_devices_lib import const as dyn_const
from homeassistant.const import CONF_HOST, CONF_NAME, CONF_PORT, CONF_ROOM, CONF_TYPE
from .const import (
ACTIVE_INIT,
ACTIVE_OFF,
ACTIVE_ON,
CONF_ACTIVE,
CONF_AR... | 30.64557 | 85 | 0.736059 |
03ecf49402beb18eccc396a8cf3074e84b466189 | 1,176 | py | Python | src/pyfuzz/string_mutations.py | fabriceyhc/pyfuzz | 67f8bd844f63139ca8f795b2bc6e30a419fa037e | [
"MIT"
] | null | null | null | src/pyfuzz/string_mutations.py | fabriceyhc/pyfuzz | 67f8bd844f63139ca8f795b2bc6e30a419fa037e | [
"MIT"
] | null | null | null | src/pyfuzz/string_mutations.py | fabriceyhc/pyfuzz | 67f8bd844f63139ca8f795b2bc6e30a419fa037e | [
"MIT"
] | null | null | null | import random
def delete_random_character(s):
"""Returns s with a random character deleted"""
if s == "":
return s
pos = random.randint(0, len(s) - 1)
# print("Deleting", repr(s[pos]), "at", pos)
return s[:pos] + s[pos + 1:]
def insert_random_character(s):
"""Returns s with a random c... | 29.4 | 69 | 0.610544 |
03ecff09e2d053dd8ff52d5925125641ec857bdd | 1,303 | py | Python | fosae/view_plot.py | cyclone923/blocks-world | 808127e6b4fde2a9cb499cf6934db7ff73e2f534 | [
"Apache-2.0",
"BSD-3-Clause"
] | 1 | 2021-05-19T10:58:54.000Z | 2021-05-19T10:58:54.000Z | fosae/view_plot.py | cyclone923/blocks-world | 808127e6b4fde2a9cb499cf6934db7ff73e2f534 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | fosae/view_plot.py | cyclone923/blocks-world | 808127e6b4fde2a9cb499cf6934db7ff73e2f534 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | import matplotlib.pyplot as plt
import numpy as np
from fosae.get_view_data import MAX_N
def dis(preds, preds_next):
for a,b in zip(preds, preds_next):
print(a-b)
print("-"*10)
data = np.load("fosae/block_data/block_data.npy")
preds = np.load("fosae/block_data/block_preds.npy")
data_next = np.loa... | 25.54902 | 68 | 0.613968 |
03ed4e4ddaa46dc6ad2fb8ae181ccf685805ac51 | 1,545 | py | Python | common/common/utils/managed_thread_pool.py | ravirahman/sancus | 6563852b98edeb1068574e2d99e1fc18b815bee3 | [
"MIT"
] | 2 | 2022-03-17T04:50:20.000Z | 2022-03-17T04:51:31.000Z | common/common/utils/managed_thread_pool.py | ravirahman/sancus | 6563852b98edeb1068574e2d99e1fc18b815bee3 | [
"MIT"
] | null | null | null | common/common/utils/managed_thread_pool.py | ravirahman/sancus | 6563852b98edeb1068574e2d99e1fc18b815bee3 | [
"MIT"
] | null | null | null | import logging
from concurrent.futures import ThreadPoolExecutor
from types import TracebackType
from typing import TYPE_CHECKING, Callable, Optional, Type
if TYPE_CHECKING:
from concurrent.futures import Future # pylint: disable=ungrouped-imports
from typing import List # pylint: disable=ungrouped-imports
... | 34.333333 | 120 | 0.656958 |
03ed532ba55a82fc7c5e4b1dd35464b327ca473c | 5,956 | py | Python | scripts/create_topological_sort_of_all_services.py | OsamaAdam98/oppia | 9c9c3d0fc6710f58394c5e28d414043340ed2a62 | [
"Apache-2.0"
] | 2 | 2019-03-31T07:03:32.000Z | 2019-04-24T18:12:53.000Z | scripts/create_topological_sort_of_all_services.py | OsamaAdam98/oppia | 9c9c3d0fc6710f58394c5e28d414043340ed2a62 | [
"Apache-2.0"
] | 3 | 2019-08-01T18:38:54.000Z | 2019-08-12T03:02:59.000Z | scripts/create_topological_sort_of_all_services.py | RafayGhafoor/oppia | 855d02414ca00d0807d841e48be7ce7b94d68c29 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
#
# Copyright 2019 The Oppia 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 requi... | 38.425806 | 80 | 0.554567 |
03ed8748a5c4fdffca5393a85b6e3e29bc720165 | 2,680 | py | Python | sdk/deploymentmanager/azure-mgmt-deploymentmanager/setup.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/deploymentmanager/azure-mgmt-deploymentmanager/setup.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/deploymentmanager/azure-mgmt-deploymentmanager/setup.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#-------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#----------------------------------------------------------------... | 35.733333 | 103 | 0.610821 |
03ed89bc8e844eed0b952b5e0c2f0928af94f059 | 1,826 | py | Python | src/ggrc/migrations/versions/20160707132122_1269660b288b_remove_ca_duplicate_values.py | Killswitchz/ggrc-core | 2460df94daf66727af248ad821462692917c97a9 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2018-03-30T11:28:48.000Z | 2018-03-30T11:28:48.000Z | src/ggrc/migrations/versions/20160707132122_1269660b288b_remove_ca_duplicate_values.py | trevordonnelly/ggrc-core | 499cf0d3cce70737b080991b12c203ec22015cea | [
"ECL-2.0",
"Apache-2.0"
] | 10 | 2018-07-06T00:04:23.000Z | 2021-02-26T21:13:20.000Z | src/ggrc/migrations/versions/20160707132122_1269660b288b_remove_ca_duplicate_values.py | zidarsk8/ggrc-core | 2509c989eddf434249d3bef50c21e08dbf56c1a4 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2017-11-11T22:16:56.000Z | 2017-11-11T22:16:56.000Z | # Copyright (C) 2017 Google Inc.
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
"""
remove ca duplicate values
Create Date: 2016-07-07 13:21:22.732299
"""
# disable Invalid constant name pylint warning for mandatory Alembic variables.
# pylint: disable=invalid-name
from alembic impor... | 28.092308 | 79 | 0.711391 |
03edb185c3da189197a9ac639e89144b98c7c3d8 | 803 | py | Python | master/aircrack-ng-1.2-rc4/aircrack-ng-1.2-rc4/scripts/airdrop-ng/airdrop/__init__.py | AlexRogalskiy/DevArtifacts | 931aabb8cbf27656151c54856eb2ea7d1153203a | [
"MIT"
] | 4 | 2018-09-07T15:35:24.000Z | 2019-03-27T09:48:12.000Z | master/aircrack-ng-1.2-rc4/aircrack-ng-1.2-rc4/scripts/airdrop-ng/airdrop/__init__.py | AlexRogalskiy/DevArtifacts | 931aabb8cbf27656151c54856eb2ea7d1153203a | [
"MIT"
] | 371 | 2020-03-04T21:51:56.000Z | 2022-03-31T20:59:11.000Z | master/aircrack-ng-1.2-rc4/aircrack-ng-1.2-rc4/scripts/airdrop-ng/airdrop/__init__.py | AlexRogalskiy/DevArtifacts | 931aabb8cbf27656151c54856eb2ea7d1153203a | [
"MIT"
] | 3 | 2019-06-18T19:57:17.000Z | 2020-11-06T03:55:08.000Z | import os, sys
class bcolors:
"""
class for using colored text
"""
HEADER = '\033[95m' #pink
OKBLUE = '\033[94m' #blue
OKGREEN = '\033[92m' #green
WARNING = '\033[93m' #yellow
FAIL = '\033[91m' #red
ENDC = '\033[0m' #white
def disable(self):
"""
... | 24.333333 | 85 | 0.56787 |
03edcb372799999aa207a067d8ccdae5d2a7a647 | 16,763 | py | Python | vqvae.py | jmnyman/vq-vae-2-pytorch | 48502ebf9120677f3b493d33261177951eebce99 | [
"MIT"
] | null | null | null | vqvae.py | jmnyman/vq-vae-2-pytorch | 48502ebf9120677f3b493d33261177951eebce99 | [
"MIT"
] | null | null | null | vqvae.py | jmnyman/vq-vae-2-pytorch | 48502ebf9120677f3b493d33261177951eebce99 | [
"MIT"
] | null | null | null | import torch
from torch import nn
from torch.nn import functional as F
# Copyright 2018 The Sonnet 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
#
... | 39.349765 | 124 | 0.613076 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.