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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
73539a8ec76c25e434be4bf11e4ed66f352984c0 | 267 | py | Python | antarest/study/storage/variantstudy/business/matrix_constants/hydro/v7.py | AntaresSimulatorTeam/antaREST | d686d2a86a52737c211ae67f3cee591f559909f2 | [
"Apache-2.0"
] | 2 | 2020-09-30T11:40:22.000Z | 2020-11-09T09:06:30.000Z | antarest/study/storage/variantstudy/business/matrix_constants/hydro/v7.py | AntaresSimulatorTeam/antaREST | d686d2a86a52737c211ae67f3cee591f559909f2 | [
"Apache-2.0"
] | 542 | 2021-01-11T13:23:47.000Z | 2022-03-31T15:38:10.000Z | antarest/study/storage/variantstudy/business/matrix_constants/hydro/v7.py | AntaresSimulatorTeam/antaREST | d686d2a86a52737c211ae67f3cee591f559909f2 | [
"Apache-2.0"
] | 1 | 2020-10-01T12:18:15.000Z | 2020-10-01T12:18:15.000Z | from antarest.matrixstore.model import MatrixContent
credit_modulations = MatrixContent(data=[[1] * 101] * 2)
inflow_pattern = MatrixContent(data=[[1]] * 365)
max_power = MatrixContent(data=[[0, 24, 0, 24]] * 365)
reservoir = MatrixContent(data=[[0, 0.5, 1]] * 365)
| 38.142857 | 56 | 0.71161 |
7353ad5ccd796c3fbc51a2c08074133638eabdee | 22,205 | py | Python | cosy/data/data.py | jobcpf/cosy | 572409156bd82195acb74cf93b15213fda223186 | [
"BSD-3-Clause"
] | null | null | null | cosy/data/data.py | jobcpf/cosy | 572409156bd82195acb74cf93b15213fda223186 | [
"BSD-3-Clause"
] | null | null | null | cosy/data/data.py | jobcpf/cosy | 572409156bd82195acb74cf93b15213fda223186 | [
"BSD-3-Clause"
] | null | null | null | """
Module ...
@Author:
@Date:
"""
################## Packages #################################### Packages #################################### Variables ##################
# Standard import
import os
import sys
import time
from datetime import datetime
import sqlite3
#print "sqlite3 ", sqlite3.version, "run-... | 41.427239 | 188 | 0.486692 |
7353b60a4c481f305ce685cde571495624e855fb | 2,109 | py | Python | alipay/aop/api/domain/AlipayOpenSearchOrderwordnumQueryModel.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/AlipayOpenSearchOrderwordnumQueryModel.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/AlipayOpenSearchOrderwordnumQueryModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.SearchOrderBaseKeyWordNumRequest import SearchOrderBaseKeyWordNumRequest
class AlipayOpenSearchOrderwordnumQueryModel(object):
def __init__(self):
self._biz_data = No... | 28.12 | 99 | 0.604078 |
7353bda7f60fc77c42ff04ce57a41a61e3692ce2 | 3,828 | py | Python | tests/formulagrader/test_intervalgrader.py | drhodes/mitx-grading-library | 5ce94addd91dbd3826b97ae44de6aa146018d455 | [
"BSD-3-Clause"
] | 17 | 2018-06-20T19:38:13.000Z | 2021-12-31T19:52:52.000Z | tests/formulagrader/test_intervalgrader.py | drhodes/mitx-grading-library | 5ce94addd91dbd3826b97ae44de6aa146018d455 | [
"BSD-3-Clause"
] | 282 | 2017-11-07T13:34:03.000Z | 2022-03-26T04:25:20.000Z | tests/formulagrader/test_intervalgrader.py | drhodes/mitx-grading-library | 5ce94addd91dbd3826b97ae44de6aa146018d455 | [
"BSD-3-Clause"
] | 7 | 2018-06-05T23:27:00.000Z | 2022-03-26T08:02:50.000Z | """
Tests for FormulaGrader and NumericalGrader
"""
from __future__ import print_function, division, absolute_import
from pytest import raises
from voluptuous import Error
from mitxgraders import IntervalGrader, NumericalGrader, FormulaGrader, StringGrader
from mitxgraders.exceptions import ConfigError, InvalidInput
... | 37.529412 | 121 | 0.612069 |
7353dc17965d91011c47f6a1308e9f237599ddf2 | 8,327 | py | Python | sdk/labservices/azure-mgmt-labservices/azure/mgmt/labservices/models/_lab_services_client_enums.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2021-09-07T18:39:05.000Z | 2021-09-07T18:39:05.000Z | sdk/labservices/azure-mgmt-labservices/azure/mgmt/labservices/models/_lab_services_client_enums.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/labservices/azure-mgmt-labservices/azure/mgmt/labservices/models/_lab_services_client_enums.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 ... | 31.541667 | 102 | 0.675393 |
7353ecc6edf5238faa6f59644a88a39a25b20978 | 3,887 | py | Python | examples/loss_and_gradient_so3.py | opeltre/geomstats | 135d5bb6f19e29dd453c68399e04100a9e2c76bf | [
"MIT"
] | null | null | null | examples/loss_and_gradient_so3.py | opeltre/geomstats | 135d5bb6f19e29dd453c68399e04100a9e2c76bf | [
"MIT"
] | null | null | null | examples/loss_and_gradient_so3.py | opeltre/geomstats | 135d5bb6f19e29dd453c68399e04100a9e2c76bf | [
"MIT"
] | null | null | null | """
Predict on manifolds: losses.
"""
import os
import tensorflow as tf
import geomstats.backend as gs
import geomstats.geometry.lie_group as lie_group
from geomstats.geometry.special_orthogonal_group import SpecialOrthogonalGroup
SO3 = SpecialOrthogonalGroup(n=3)
def loss(y_pred, y_true,
metric=SO3.bi_... | 31.601626 | 78 | 0.625933 |
7353f30d91f8345f2b4ba26d4d7396a9507693e2 | 1,074 | py | Python | backend/api/migrations/0009_auto_20180318_1028.py | Carbonara-Project/Carbonara-Web | be1fac46ed3e4f590f3d885e646970a29ec43cb5 | [
"MIT"
] | 2 | 2020-01-07T12:35:11.000Z | 2021-09-18T10:30:57.000Z | backend/api/migrations/0009_auto_20180318_1028.py | Carbonara-Project/Carbonara-Web | be1fac46ed3e4f590f3d885e646970a29ec43cb5 | [
"MIT"
] | null | null | null | backend/api/migrations/0009_auto_20180318_1028.py | Carbonara-Project/Carbonara-Web | be1fac46ed3e4f590f3d885e646970a29ec43cb5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.5 on 2018-03-18 10:28
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_depende... | 33.5625 | 118 | 0.630354 |
73540cd56650609f0fa3b4ac9ee994cd8ca7917d | 1,436 | py | Python | sagan/utils/export_imdb.py | DeepTrickLab/Self-Attention-GAN | a6fa4f0d7916e0721c9797adec1ab5d9c6b76636 | [
"MIT"
] | 2 | 2020-09-18T03:45:24.000Z | 2021-11-18T11:01:52.000Z | sagan/utils/export_imdb.py | DeepTrickLab/Self-Attention-GAN | a6fa4f0d7916e0721c9797adec1ab5d9c6b76636 | [
"MIT"
] | null | null | null | sagan/utils/export_imdb.py | DeepTrickLab/Self-Attention-GAN | a6fa4f0d7916e0721c9797adec1ab5d9c6b76636 | [
"MIT"
] | null | null | null | import os
import lmdb
from PIL import Image
import tempfile
db_path = "/root/notebooks/data/bridge_train_lmdb"
def _export_mdb_images(db_path, out_dir=None, flat=True, limit=-1, size=256):
out_dir = out_dir
env = lmdb.open(
db_path, map_size=1099511627776,
max_readers=1000, readonly=True
... | 31.911111 | 79 | 0.566156 |
735414eb5a0cf25ba65326dd7cc3a0b2acaea272 | 2,978 | py | Python | scripts/preprocess_for_prediction.py | jmueller95/deepgrind | 1fdca224a5256b820fa817a529e79b70c8808d65 | [
"Apache-2.0"
] | null | null | null | scripts/preprocess_for_prediction.py | jmueller95/deepgrind | 1fdca224a5256b820fa817a529e79b70c8808d65 | [
"Apache-2.0"
] | null | null | null | scripts/preprocess_for_prediction.py | jmueller95/deepgrind | 1fdca224a5256b820fa817a529e79b70c8808d65 | [
"Apache-2.0"
] | null | null | null | import pandas as pd
import utils
def check_msms_model_name(converter):
def wrapper(*args, **kwargs):
if kwargs['style'] not in ["pdeep", "prosit"]:
raise Exception("MSMS model must be 'pdeep' or 'prosit'")
converter(*args, **kwargs)
return wrapper
@check_msms_model_name... | 46.53125 | 131 | 0.624244 |
7354160cccfd834e96da68d81a9387cee05dc931 | 1,420 | py | Python | utility.py | TerryRPatterson/activity-reader-bot | a32eddafc1363d82e3384ea0dba6c97c9b4ed62a | [
"Apache-2.0"
] | 1 | 2019-03-11T12:45:15.000Z | 2019-03-11T12:45:15.000Z | utility.py | TerryRPatterson/activity-reader-bot | a32eddafc1363d82e3384ea0dba6c97c9b4ed62a | [
"Apache-2.0"
] | 1 | 2019-02-05T00:07:25.000Z | 2019-02-05T00:07:25.000Z | utility.py | TerryRPatterson/activity-reader-bot | a32eddafc1363d82e3384ea0dba6c97c9b4ed62a | [
"Apache-2.0"
] | null | null | null | """
Various utility functions for activityReader project.
Copyright 2018 Terry Patterson
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
... | 33.023256 | 79 | 0.68662 |
73544fcbc5e9f5ac0ba86fea0be746297a28827f | 1,373 | py | Python | utils/Letter_loader.py | tomsal/endtoenddecisiontrees | be4cf69f530cbbd3cd1a2443c9cc513482a9a2c3 | [
"MIT"
] | 13 | 2019-08-14T05:22:27.000Z | 2022-02-27T20:57:22.000Z | utils/Letter_loader.py | tomsal/endtoenddecisiontrees | be4cf69f530cbbd3cd1a2443c9cc513482a9a2c3 | [
"MIT"
] | 1 | 2020-05-26T19:40:19.000Z | 2021-09-01T12:44:36.000Z | utils/Letter_loader.py | tomsal/endtoenddecisiontrees | be4cf69f530cbbd3cd1a2443c9cc513482a9a2c3 | [
"MIT"
] | 2 | 2020-04-04T20:45:30.000Z | 2022-02-27T20:57:22.000Z | import numpy as np
import torch
import torch.utils.data
from sklearn.preprocessing import StandardScaler
#import ipdb
DATA_DIR = "data/UCI/"
PATH = "{}/letter-recognition.data".format(DATA_DIR)
def map_capital_alphabet(c):
return ord(c) - ord('A')
def parse_data_file():
with open(PATH, 'r') as fp:
X = []
... | 27.46 | 66 | 0.690459 |
735461c03a9d179669f26981fcb4efa9957828ac | 6,212 | py | Python | ote_sdk/ote_sdk/tests/configuration/dummy_config.py | ntyukaev/training_extensions | c897d42e50828fea853ceda0795e1f0e7d6e9909 | [
"Apache-2.0"
] | 775 | 2019-03-01T02:13:33.000Z | 2020-09-07T22:49:15.000Z | ote_sdk/ote_sdk/tests/configuration/dummy_config.py | ntyukaev/training_extensions | c897d42e50828fea853ceda0795e1f0e7d6e9909 | [
"Apache-2.0"
] | 229 | 2019-02-28T21:37:08.000Z | 2020-09-07T15:11:49.000Z | ote_sdk/ote_sdk/tests/configuration/dummy_config.py | ntyukaev/training_extensions | c897d42e50828fea853ceda0795e1f0e7d6e9909 | [
"Apache-2.0"
] | 290 | 2019-02-28T20:32:11.000Z | 2020-09-07T05:51:41.000Z | # Copyright (C) 2021-2022 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
"""
Dummy configurable parameter class to test configuration functionality
"""
import attr
from ote_sdk.configuration import (
ConfigurableParameters,
ModelLifecycle,
Operator,
Rule,
UIRules,
)
from ote_sdk.configu... | 32.354167 | 113 | 0.632807 |
735470c255c01ce883550e0d2d8eaaa4c57e9c8b | 3,434 | py | Python | flask_pony/repositories.py | kyzima-spb/flask-pony | 6cf28d70b7ebf415d58fa138fcc70b8dd57432c7 | [
"Apache-2.0"
] | 13 | 2016-12-03T18:13:08.000Z | 2022-02-26T12:47:42.000Z | flask_pony/repositories.py | kyzima-spb/flask-pony | 6cf28d70b7ebf415d58fa138fcc70b8dd57432c7 | [
"Apache-2.0"
] | 2 | 2018-03-11T15:33:12.000Z | 2018-04-01T13:55:52.000Z | flask_pony/repositories.py | kyzima-spb/flask-pony | 6cf28d70b7ebf415d58fa138fcc70b8dd57432c7 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
#
# Copyright 2017 Kirill Vercetti
#
# 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 ... | 27.472 | 94 | 0.647932 |
7354820bf07150e788c6acb142023186560623e4 | 5,427 | py | Python | intersight/models/iaas_license_utilization_info.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/models/iaas_license_utilization_info.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/models/iaas_license_utilization_info.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Intersight REST API
This is Intersight REST API
OpenAPI spec version: 1.0.9-255
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
class IaasLicenseUtilizationInfo(object):
"""
NOTE:... | 25.842857 | 85 | 0.570849 |
73548ccb43706f61753ba30700d12de2e4959ae9 | 1,403 | py | Python | larq/activations.py | sbrugman/larq | b080d9452847e9403b3d2fafd9425b488be71567 | [
"Apache-2.0"
] | null | null | null | larq/activations.py | sbrugman/larq | b080d9452847e9403b3d2fafd9425b488be71567 | [
"Apache-2.0"
] | null | null | null | larq/activations.py | sbrugman/larq | b080d9452847e9403b3d2fafd9425b488be71567 | [
"Apache-2.0"
] | null | null | null | """Activations can either be used through an `Activation` layer, or through the
`activation` argument supported by all forward layers:
```python
import tensorflow as tf
import larq as lq
model.add(lq.layers.QuantDense(64))
model.add(tf.keras.layers.Activation('hard_tanh'))
```
This is equivalent to:
```python
model... | 21.257576 | 79 | 0.67712 |
73550a90e72cc13ef65289f64f9524ff98024861 | 15,613 | py | Python | RogyAudio.py | ndrogness/RogyPyMods | 40cd007666daf00c2a68c22eaa6dc9ba22683689 | [
"MIT"
] | null | null | null | RogyAudio.py | ndrogness/RogyPyMods | 40cd007666daf00c2a68c22eaa6dc9ba22683689 | [
"MIT"
] | null | null | null | RogyAudio.py | ndrogness/RogyPyMods | 40cd007666daf00c2a68c22eaa6dc9ba22683689 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import sys
import os
import random
import alsaaudio as aa
import wave
from struct import unpack
import numpy as np
# Global Defines
# Maximum Signal intensity
MAX_SIGNAL_LEVEL = 8
# Default Frequencies & Weights for FFT analysis
DEFAULT_FREQUENCIES = [80, 150, 310, 450, 800, 2500, 5000, 10000... | 29.514178 | 141 | 0.596106 |
7355162783ce2b818236affeb88dd5e1103f46cf | 639 | py | Python | plugins/maya/publish/validate_camera_bake_step.py | davidlatwe/reveries-config | 4a282dd64a32a9b87bd1a070759b6425ff785d68 | [
"MIT"
] | 3 | 2020-04-01T10:51:17.000Z | 2021-08-05T18:35:23.000Z | plugins/maya/publish/validate_camera_bake_step.py | davidlatwe/reveries-config | 4a282dd64a32a9b87bd1a070759b6425ff785d68 | [
"MIT"
] | null | null | null | plugins/maya/publish/validate_camera_bake_step.py | davidlatwe/reveries-config | 4a282dd64a32a9b87bd1a070759b6425ff785d68 | [
"MIT"
] | 1 | 2020-07-05T12:06:30.000Z | 2020-07-05T12:06:30.000Z | import pyblish.api
class ValidateCameraBakeStep(pyblish.api.InstancePlugin):
"""Ensure camera bake step is a valid float
"""
order = pyblish.api.ValidatorOrder
hosts = ["maya"]
label = "Camera Bake Step"
families = [
"reveries.camera",
]
def process(self, instance):
b... | 25.56 | 71 | 0.613459 |
73551867388eba151856a27827b7c7dc84bdfc32 | 602 | py | Python | Pandas_to_JSON.py | glickmac/Misc_Scripts | 7e18be79b84a309a1e79935f4470ea915141938d | [
"MIT"
] | null | null | null | Pandas_to_JSON.py | glickmac/Misc_Scripts | 7e18be79b84a309a1e79935f4470ea915141938d | [
"MIT"
] | null | null | null | Pandas_to_JSON.py | glickmac/Misc_Scripts | 7e18be79b84a309a1e79935f4470ea915141938d | [
"MIT"
] | 1 | 2020-07-30T17:37:12.000Z | 2020-07-30T17:37:12.000Z | #!/usr/bin/env python
import json
import pandas as pd
# Read the data from file
# We now have a Python dictionary
with open('data.json') as f:
data_listofdict = json.load(f)
# We can do the same thing with pandas
data_df = pd.read_json('data.json', orient='records')
# We can write a dictionary to JSON like s... | 28.666667 | 67 | 0.722591 |
73553929d242d911afb5b6d89d0beb8b7a671050 | 792 | py | Python | launch_system_modes/launch_system_modes/event_handlers/__init__.py | micro-ROS/system_modes | d62e24c2d27287bcd3996f553106eb5e9508c1ad | [
"Apache-2.0"
] | 19 | 2019-05-10T15:54:34.000Z | 2021-09-29T16:33:19.000Z | launch_system_modes/launch_system_modes/event_handlers/__init__.py | micro-ROS/system_modes | d62e24c2d27287bcd3996f553106eb5e9508c1ad | [
"Apache-2.0"
] | 60 | 2019-05-06T13:24:47.000Z | 2022-03-10T08:05:52.000Z | launch_system_modes/launch_system_modes/event_handlers/__init__.py | micro-ROS/system_modes | d62e24c2d27287bcd3996f553106eb5e9508c1ad | [
"Apache-2.0"
] | 6 | 2019-05-02T08:24:08.000Z | 2020-07-09T23:02:32.000Z | # Copyright 2021 Robert Bosch GmbH
#
# 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... | 33 | 74 | 0.767677 |
7355408e667ae2ddad8344f7979d58d1f581f5f0 | 26,980 | py | Python | geosoft/gxpy/tests/test_map.py | fearaschiarrai/gxpy | 4c5e7594b24e530a8cd94df1eef562c5c6ce3e92 | [
"BSD-2-Clause"
] | 25 | 2017-07-14T06:39:37.000Z | 2022-03-09T21:39:51.000Z | geosoft/gxpy/tests/test_map.py | fearaschiarrai/gxpy | 4c5e7594b24e530a8cd94df1eef562c5c6ce3e92 | [
"BSD-2-Clause"
] | 100 | 2016-12-13T17:30:41.000Z | 2021-08-01T20:21:13.000Z | geosoft/gxpy/tests/test_map.py | fearaschiarrai/gxpy | 4c5e7594b24e530a8cd94df1eef562c5c6ce3e92 | [
"BSD-2-Clause"
] | 28 | 2016-12-12T17:34:40.000Z | 2022-03-16T15:39:39.000Z | import unittest
import os
import numpy as np
import geosoft
import geosoft.gxapi as gxapi
import geosoft.gxpy.gx as gx
import geosoft.gxpy.map as gxmap
import geosoft.gxpy.view as gxv
import geosoft.gxpy.geometry as gxgm
import geosoft.gxpy.coordinate_system as gxcs
import geosoft.gxpy.system as gxsys
import geosoft.g... | 39.444444 | 125 | 0.530504 |
7355418fb7183ff6a94ff60ffee8f654e1fb3d29 | 2,215 | py | Python | python-client/test/test_batch_defaults.py | gabisurita/kinto-codegen-tutorial | b5921ec603df031f9ff25683b7a3fbed5af79094 | [
"MIT"
] | 2 | 2017-03-02T13:12:24.000Z | 2017-10-22T10:31:09.000Z | python-client/test/test_batch_defaults.py | gabisurita/kinto-codegen-tutorial | b5921ec603df031f9ff25683b7a3fbed5af79094 | [
"MIT"
] | null | null | null | python-client/test/test_batch_defaults.py | gabisurita/kinto-codegen-tutorial | b5921ec603df031f9ff25683b7a3fbed5af79094 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
kinto
Kinto is a minimalist JSON storage service with synchronisation and sharing abilities. It is meant to be easy to use and easy to self-host. **Limitations of this OpenAPI specification:** 1. Validation on OR clauses is not supported (e.g. provide `data` or `permissions` in patch ... | 41.018519 | 938 | 0.731828 |
73554284f45510f8389acc32d64958bb54f53f99 | 2,940 | py | Python | ResNet/train.py | shreyansh26/DL-Code-Repository | f1974eedc1fef54b2d274703390a22721e46f502 | [
"MIT"
] | null | null | null | ResNet/train.py | shreyansh26/DL-Code-Repository | f1974eedc1fef54b2d274703390a22721e46f502 | [
"MIT"
] | null | null | null | ResNet/train.py | shreyansh26/DL-Code-Repository | f1974eedc1fef54b2d274703390a22721e46f502 | [
"MIT"
] | null | null | null | from typing import List, Optional
from torch import nn
from torch.autograd.variable import Variable
from model import ResNetBase
import torch
import torchvision
import torchvision.transforms as transforms
import torch.optim as optim
CUDA_AVAILABLE = torch.cuda.is_available()
class Configs():
n_blocks: List[int] ... | 32.307692 | 117 | 0.597959 |
73555a83346e3628cc8a0b4f578f6fd0d6810684 | 22,211 | py | Python | mediapipe/util/tracking/motion_models_pb2.py | mengfu188/simple-mediapipe | 85dc8a87c9586312c2d057ad587bfccf3b5e2eb6 | [
"Apache-2.0"
] | 5 | 2021-01-01T11:02:41.000Z | 2022-03-11T19:44:29.000Z | mediapipe/util/tracking/motion_models_pb2.py | mengfu188/simple-mediapipe | 85dc8a87c9586312c2d057ad587bfccf3b5e2eb6 | [
"Apache-2.0"
] | null | null | null | mediapipe/util/tracking/motion_models_pb2.py | mengfu188/simple-mediapipe | 85dc8a87c9586312c2d057ad587bfccf3b5e2eb6 | [
"Apache-2.0"
] | 1 | 2021-04-12T05:59:46.000Z | 2021-04-12T05:59:46.000Z | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: mediapipe/util/tracking/motion_models.proto
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf impor... | 41.75 | 1,822 | 0.754266 |
73555c8e5cc092986bdd2821760a3b3af8abf902 | 213 | py | Python | Kerning/adjustKerning-decrease100.py | protimient/Glyphs-Scripts | 0481ea01153844667cff8cfa3fad97c33af09956 | [
"Apache-2.0"
] | 2 | 2021-02-12T20:36:29.000Z | 2021-11-03T08:04:01.000Z | Kerning/adjustKerning-decrease100.py | protimient/Glyphs-Scripts | 0481ea01153844667cff8cfa3fad97c33af09956 | [
"Apache-2.0"
] | null | null | null | Kerning/adjustKerning-decrease100.py | protimient/Glyphs-Scripts | 0481ea01153844667cff8cfa3fad97c33af09956 | [
"Apache-2.0"
] | null | null | null | # MenuTitle: Adjust Kerning -100
# -*- coding: utf-8 -*-
__doc__ = """
Adjusts the kerning between the current 2 layers by the specified amount.
"""
from adjustKerning import adjust_kerning
adjust_kerning(-100)
| 21.3 | 73 | 0.737089 |
735599400c9c2874df24208a4f1ff4bc4b2fdd61 | 1,977 | py | Python | lib/vrd/train.py | yjy941124/PPR-FCN | 1eba5515b37e7b32413efdf14bb0c22a2e46fee9 | [
"MIT"
] | 20 | 2017-10-16T18:12:51.000Z | 2021-12-23T02:34:20.000Z | lib/vrd/train.py | yjy941124/PPR-FCN | 1eba5515b37e7b32413efdf14bb0c22a2e46fee9 | [
"MIT"
] | 1 | 2018-11-10T04:59:48.000Z | 2021-01-21T04:51:31.000Z | lib/vrd/train.py | yjy941124/PPR-FCN | 1eba5515b37e7b32413efdf14bb0c22a2e46fee9 | [
"MIT"
] | 5 | 2017-10-17T00:54:42.000Z | 2018-04-08T15:09:40.000Z | import _init_paths
import cv2
import numpy as np
import caffe
import os
import cifar.layer
from caffe.proto import caffe_pb2
from caffe.io import blobproto_to_array
def start_train():
caffe.set_device(0)
caffe.set_mode_gpu()
### load the solver and create train and test nets
solver = None
#solve... | 43.933333 | 108 | 0.777946 |
7355c283078577edd9936620495be5ac60bcdc4a | 3,050 | py | Python | run_cross_test.py | tp-m/meson | 2d1aa395e86848ca948d30d83cc5357777e5b490 | [
"Apache-2.0"
] | null | null | null | run_cross_test.py | tp-m/meson | 2d1aa395e86848ca948d30d83cc5357777e5b490 | [
"Apache-2.0"
] | null | null | null | run_cross_test.py | tp-m/meson | 2d1aa395e86848ca948d30d83cc5357777e5b490 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# Copyright 2013-2014 The Meson development team
# 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... | 33.888889 | 127 | 0.707869 |
7355eccb4d8dd19decefe69966b2758fadab1075 | 137 | py | Python | helper.py | artiso-solutions/carved-pixel-image | 7fbb305984d26b82aad50d9d8db811d6c6250db0 | [
"MIT"
] | null | null | null | helper.py | artiso-solutions/carved-pixel-image | 7fbb305984d26b82aad50d9d8db811d6c6250db0 | [
"MIT"
] | null | null | null | helper.py | artiso-solutions/carved-pixel-image | 7fbb305984d26b82aad50d9d8db811d6c6250db0 | [
"MIT"
] | null | null | null | def chunks(lst, n):
"""Yield successive n-sized chunks from lst."""
for i in range(0, len(lst), n):
yield lst[i:i + n] | 34.25 | 52 | 0.562044 |
7355f63bac78edafa0349dfae485c2a1525b5725 | 2,024 | py | Python | sem/features/triggeredfeatures.py | YoannDupont/SEM | ff21c5dc9a8e99eda81dc266e67cfa97dec7c243 | [
"MIT"
] | 22 | 2016-11-13T21:08:58.000Z | 2021-04-26T07:04:54.000Z | sem/features/triggeredfeatures.py | Raphencoder/SEM | ff21c5dc9a8e99eda81dc266e67cfa97dec7c243 | [
"MIT"
] | 15 | 2016-11-15T10:21:07.000Z | 2021-11-08T10:08:05.000Z | sem/features/triggeredfeatures.py | Raphencoder/SEM | ff21c5dc9a8e99eda81dc266e67cfa97dec7c243 | [
"MIT"
] | 8 | 2016-11-15T10:21:41.000Z | 2022-03-04T21:28:05.000Z | # -*- coding: utf-8 -*-
"""
file: triggeredfeatures.py
Description: defines features that will only be extracted when
a given condition is met (when it is triggered).
author: Yoann Dupont
MIT License
Copyright (c) 2018 Yoann Dupont
Permission is hereby granted, free of charge, to any person obtaining a copy
of th... | 36.8 | 85 | 0.727273 |
7355f87462095bd92622c11e45d6c00c80b6ec61 | 11,341 | py | Python | conpaas-director/cpsdirector/cloud.py | bopopescu/conpaas | e0a2955ae3e7da7525d799bed411e9f76ecf0919 | [
"BSD-3-Clause"
] | 1 | 2015-09-20T18:20:01.000Z | 2015-09-20T18:20:01.000Z | conpaas-director/cpsdirector/cloud.py | bopopescu/conpaas | e0a2955ae3e7da7525d799bed411e9f76ecf0919 | [
"BSD-3-Clause"
] | 1 | 2020-07-27T11:56:18.000Z | 2020-07-27T11:56:18.000Z | conpaas-director/cpsdirector/cloud.py | bopopescu/conpaas | e0a2955ae3e7da7525d799bed411e9f76ecf0919 | [
"BSD-3-Clause"
] | 3 | 2018-09-14T16:54:14.000Z | 2020-07-26T03:14:56.000Z | import os.path
import simplejson
from netaddr import IPNetwork
from conpaas.core.controller import Controller
from conpaas.core.misc import file_get_contents
from conpaas.core.node import ServiceNode
from cpsdirector.x509cert import generate_certificate
from cpsdirector.common import config_parser, log
from cpsdirec... | 38.706485 | 84 | 0.62155 |
7355ff11e68c04edcc8c4e2fa23bd4f04b02ad1c | 2,584 | py | Python | repos/system_upgrade/el7toel8/actors/ipuworkflowconfig/tests/test_ipuworkflowconfig.py | tiran/leapp-repository | d6ac29cdc3abec639cbff391605498c6f83af863 | [
"Apache-2.0"
] | null | null | null | repos/system_upgrade/el7toel8/actors/ipuworkflowconfig/tests/test_ipuworkflowconfig.py | tiran/leapp-repository | d6ac29cdc3abec639cbff391605498c6f83af863 | [
"Apache-2.0"
] | null | null | null | repos/system_upgrade/el7toel8/actors/ipuworkflowconfig/tests/test_ipuworkflowconfig.py | tiran/leapp-repository | d6ac29cdc3abec639cbff391605498c6f83af863 | [
"Apache-2.0"
] | null | null | null | import os
import pytest
from leapp import reporting
from leapp.exceptions import StopActorExecutionError
from leapp.libraries.actor import library
from leapp.libraries.common.testutils import produce_mocked, create_report_mocked
from leapp.libraries.stdlib import CalledProcessError
from leapp.models import OSRelease
... | 34 | 93 | 0.718266 |
735602336402a8e8a4da0f2acb6875790724481e | 10,469 | py | Python | savu/plugins/plugin.py | elainehoml/Savu | e4772704606f71d6803d832084e10faa585e7358 | [
"Apache-2.0"
] | 39 | 2015-03-30T14:03:42.000Z | 2022-03-16T16:50:33.000Z | savu/plugins/plugin.py | elainehoml/Savu | e4772704606f71d6803d832084e10faa585e7358 | [
"Apache-2.0"
] | 670 | 2015-02-11T11:08:09.000Z | 2022-03-21T09:27:57.000Z | savu/plugins/plugin.py | elainehoml/Savu | e4772704606f71d6803d832084e10faa585e7358 | [
"Apache-2.0"
] | 54 | 2015-02-13T14:09:52.000Z | 2022-01-24T13:57:09.000Z | # Copyright 2014 Diamond Light Source Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... | 32.818182 | 79 | 0.638361 |
73560443e2708548ebed5a7a68fbea4fc4ab8acf | 9,878 | py | Python | tests/utils.py | whksmo/deep-intent | 2617373cf94fccbe9fc37d50ee010a5c2b8418b0 | [
"MIT"
] | 1 | 2019-07-29T13:33:12.000Z | 2019-07-29T13:33:12.000Z | tests/utils.py | ocelot43/DeepCTR | 8182ea386e6529a1a2294d8e2d33fc040d0cbfb2 | [
"MIT"
] | 7 | 2019-12-16T22:03:26.000Z | 2022-02-10T00:17:03.000Z | tests/utils.py | whksmo/deep-intent | 2617373cf94fccbe9fc37d50ee010a5c2b8418b0 | [
"MIT"
] | null | null | null | from __future__ import absolute_import, division, print_function
import inspect
import sys
import numpy as np
import tensorflow as tf
from numpy.testing import assert_allclose
from tensorflow.python.keras import backend as K
from tensorflow.python.keras.layers import Input, Masking
from tensorflow.python.keras.model... | 27.669468 | 133 | 0.634339 |
73561a316aa245d1407e3bf356d945b9e9ae9807 | 952 | py | Python | tests/TestNoUnspecifiedArgumentRule.py | ansible-middleware/ansible-lint-custom-rules | 181ec6b8e562fc136caf6fe67a488c9e996686a3 | [
"MIT"
] | 1 | 2022-02-18T07:43:41.000Z | 2022-02-18T07:43:41.000Z | tests/TestNoUnspecifiedArgumentRule.py | ansible-middleware/ansible-lint-custom-rules | 181ec6b8e562fc136caf6fe67a488c9e996686a3 | [
"MIT"
] | null | null | null | tests/TestNoUnspecifiedArgumentRule.py | ansible-middleware/ansible-lint-custom-rules | 181ec6b8e562fc136caf6fe67a488c9e996686a3 | [
"MIT"
] | null | null | null | # Copyright (C) 2022 Guido Grazioli <guido.grazioli@gmail.com>
# SPDX-License-Identifier: MIT
#
# pylint: disable=invalid-name
# pylint: disable=too-few-public-methods,missing-class-docstring
# pylint: disable=missing-function-docstring
"""Test cases for the rule, NoUnspecifiedArgumentRule.
"""
import pytest
from rule... | 24.410256 | 67 | 0.735294 |
735643fa1c6996d4e576bcd86548784488cffcd5 | 473 | py | Python | python/models/vertex.py | leonoverweel/graph-coloring | 48654a2e4cb3ddd786ac6193f9d73271c43eabf0 | [
"MIT"
] | null | null | null | python/models/vertex.py | leonoverweel/graph-coloring | 48654a2e4cb3ddd786ac6193f9d73271c43eabf0 | [
"MIT"
] | null | null | null | python/models/vertex.py | leonoverweel/graph-coloring | 48654a2e4cb3ddd786ac6193f9d73271c43eabf0 | [
"MIT"
] | null | null | null | class Vertex:
def __init__(self, adjacent_to=None, data=None):
self.adjacent_to = adjacent_to if adjacent_to is not None else []
self.data = data if data is not None else {}
def add_edge(self, id):
if not id in self.adjacent_to:
self.adjacent_to.append(i... | 33.785714 | 73 | 0.589852 |
735664c0dbfbaa500ea094da894b0928a299a2d8 | 2,114 | py | Python | refinery/bnpy/bnpy-dev/bnpy/util/RandUtil.py | csa0001/Refinery | 0d5de8fc3d680a2c79bd0e9384b506229787c74f | [
"MIT"
] | 103 | 2015-01-13T00:48:14.000Z | 2021-11-08T10:53:22.000Z | refinery/bnpy/bnpy-dev/bnpy/util/RandUtil.py | csa0001/Refinery | 0d5de8fc3d680a2c79bd0e9384b506229787c74f | [
"MIT"
] | 7 | 2015-02-21T04:03:40.000Z | 2021-08-23T20:24:54.000Z | refinery/bnpy/bnpy-dev/bnpy/util/RandUtil.py | csa0001/Refinery | 0d5de8fc3d680a2c79bd0e9384b506229787c74f | [
"MIT"
] | 27 | 2015-01-23T00:54:31.000Z | 2020-12-30T14:30:50.000Z | '''
RandUtil.py
Utilities for sampling (pseudo) random numbers
'''
import numpy as np
def choice(candidates, ps=None, randstate=np.random):
''' Choose one element at random from list of candidates.
ps[k] gives probability of candidate k
ps need not sum to one, but all entries must be positive
'''
if... | 32.523077 | 89 | 0.663198 |
7356707516992dacebf542fc306e4a2be6758fb9 | 6,593 | py | Python | venv/lib/python3.6/site-packages/kubernetes/client/models/v1_node.py | DiptoChakrabarty/Kube-Automate | 2072d1aadd58eb405c7308ff5cfecbf50300ead3 | [
"MIT"
] | null | null | null | venv/lib/python3.6/site-packages/kubernetes/client/models/v1_node.py | DiptoChakrabarty/Kube-Automate | 2072d1aadd58eb405c7308ff5cfecbf50300ead3 | [
"MIT"
] | null | null | null | venv/lib/python3.6/site-packages/kubernetes/client/models/v1_node.py | DiptoChakrabarty/Kube-Automate | 2072d1aadd58eb405c7308ff5cfecbf50300ead3 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
OpenAPI spec version: release-1.15
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
class V1Nod... | 29.832579 | 295 | 0.593508 |
7356bf4671cbb6f5b7c61f4bd400c56e067a75c0 | 32,659 | py | Python | src/python/pants/testutil/test_base.py | tpasternak/pants | edf5716283d449852309fff1a10dd351dfbf3493 | [
"Apache-2.0"
] | 1 | 2021-05-05T18:58:28.000Z | 2021-05-05T18:58:28.000Z | src/python/pants/testutil/test_base.py | tpasternak/pants | edf5716283d449852309fff1a10dd351dfbf3493 | [
"Apache-2.0"
] | null | null | null | src/python/pants/testutil/test_base.py | tpasternak/pants | edf5716283d449852309fff1a10dd351dfbf3493 | [
"Apache-2.0"
] | 3 | 2020-06-30T08:28:13.000Z | 2021-07-28T09:35:57.000Z | # Copyright 2019 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
import itertools
import logging
import os
import unittest
import warnings
from abc import ABC, ABCMeta, abstractmethod
from collections import defaultdict
from contextlib import contextman... | 37.975581 | 105 | 0.640007 |
7356bf49c50bdb012646594b4bbb6c9b63767f5e | 16,853 | py | Python | Practica 1/P1_material/p1_llamadas/corrector_ssoo_p1_2017.py | Pheithar/Sistemas-Operativos-2019 | 5863d7236dfd3bed5d5cfe22bfbcbee8651bce52 | [
"MIT"
] | null | null | null | Practica 1/P1_material/p1_llamadas/corrector_ssoo_p1_2017.py | Pheithar/Sistemas-Operativos-2019 | 5863d7236dfd3bed5d5cfe22bfbcbee8651bce52 | [
"MIT"
] | null | null | null | Practica 1/P1_material/p1_llamadas/corrector_ssoo_p1_2017.py | Pheithar/Sistemas-Operativos-2019 | 5863d7236dfd3bed5d5cfe22bfbcbee8651bce52 | [
"MIT"
] | null | null | null | '''
Sistemas Operativos - Practica 1 - Llamadas al sistema
Este programa verifica que el formato del entregable de la practica es el correcto (sigue las especificaciones de nombrado, y esta bien comprimido).
Tambien realiza una prueba basica de funcionamiento para cada uno de los tres programas solicitados en la... | 32.472062 | 521 | 0.652109 |
7356efe0247f57f4d3adb359a9e965f83408a0ca | 755 | py | Python | cantools/db/internal_database.py | jackjweinstein/cantools | 773c688b7ce5806dfe3d5d699a33c510ef20b983 | [
"MIT"
] | 1 | 2021-09-25T05:59:55.000Z | 2021-09-25T05:59:55.000Z | cantools/db/internal_database.py | danielhrisca/cantools | d489828d070e6d4cd84aaf7be9363b37ee7540fb | [
"MIT"
] | null | null | null | cantools/db/internal_database.py | danielhrisca/cantools | d489828d070e6d4cd84aaf7be9363b37ee7540fb | [
"MIT"
] | null | null | null | # Internal CAN database.
class InternalDatabase(object):
"""Internal CAN database.
"""
def __init__(self,
messages,
nodes,
buses,
version,
attribute_definitions=None,
attribute_definition_defaults=None):... | 26.034483 | 74 | 0.6 |
735700c0a5d433226585b2b2dd88b5031a88b411 | 1,205 | py | Python | commons/atomic_counters.py | cenkcorapci/visual-fashion-item-search | 47b93f97383c1b7f9ec23bb4ff66f90504db3da8 | [
"MIT"
] | 1 | 2021-02-22T00:35:40.000Z | 2021-02-22T00:35:40.000Z | commons/atomic_counters.py | cenkcorapci/visual-fashion-item-search | 47b93f97383c1b7f9ec23bb4ff66f90504db3da8 | [
"MIT"
] | null | null | null | commons/atomic_counters.py | cenkcorapci/visual-fashion-item-search | 47b93f97383c1b7f9ec23bb4ff66f90504db3da8 | [
"MIT"
] | 1 | 2021-08-30T10:24:16.000Z | 2021-08-30T10:24:16.000Z | """An atomic, thread-safe incrementing counter."""
import threading
from tqdm import tqdm, tqdm_notebook
class AtomicCounter:
"""An atomic, thread-safe incrementing counter.
"""
def __init__(self, initial=0):
"""Initialize a new atomic counter to given initial value (default 0)."""
self... | 28.690476 | 106 | 0.623237 |
73573301d09e44be573ff5607065d527ba804e7b | 1,781 | py | Python | SCRAPE/Lib/site-packages/twisted/conch/test/test_scripts.py | Chinmoy-Prasad-Dutta/scrapy_scraper | 09f6abfc3bcf10ee28f486d83b450c89a07e066e | [
"MIT"
] | 4,612 | 2015-01-01T12:57:23.000Z | 2022-03-30T01:08:23.000Z | SCRAPE/Lib/site-packages/twisted/conch/test/test_scripts.py | Chinmoy-Prasad-Dutta/scrapy_scraper | 09f6abfc3bcf10ee28f486d83b450c89a07e066e | [
"MIT"
] | 1,243 | 2015-01-23T17:23:59.000Z | 2022-03-28T13:46:17.000Z | SCRAPE/Lib/site-packages/twisted/conch/test/test_scripts.py | Chinmoy-Prasad-Dutta/scrapy_scraper | 09f6abfc3bcf10ee28f486d83b450c89a07e066e | [
"MIT"
] | 1,236 | 2015-01-13T14:41:26.000Z | 2022-03-17T07:12:36.000Z | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Tests for the command-line interfaces to conch.
"""
from unittest import skipIf
from twisted.python.reflect import requireModule
from twisted.python.test.test_shellcomp import ZshScriptTestMixin
from twisted.scripts.test.test_scripts import S... | 24.736111 | 68 | 0.686693 |
7357523fdf0a904d5c98264d9b74f7ec876743fd | 48,613 | py | Python | pixell/enplot.py | simonsobs/pixell | 65fd9e028f9b1a67be9850d0ba0a8833c90a916a | [
"BSD-3-Clause"
] | 24 | 2018-10-16T18:11:57.000Z | 2022-03-16T23:21:29.000Z | pixell/enplot.py | simonsobs/pixell | 65fd9e028f9b1a67be9850d0ba0a8833c90a916a | [
"BSD-3-Clause"
] | 118 | 2018-10-09T22:13:48.000Z | 2022-03-21T15:23:25.000Z | pixell/enplot.py | simonsobs/pixell | 65fd9e028f9b1a67be9850d0ba0a8833c90a916a | [
"BSD-3-Clause"
] | 19 | 2018-10-22T16:13:20.000Z | 2021-12-16T17:34:01.000Z | from __future__ import division, print_function
import numpy as np, argparse, time, sys, warnings, os, shlex, glob, PIL.Image, PIL.ImageDraw
from scipy import ndimage
from . import enmap, colorize, mpi, cgrid, utils, memory, bunch, wcsutils
# Optional dependency array_ops needed for contour drawing
try: from . import a... | 46.210076 | 467 | 0.696686 |
735777cba74d430204e44d5b46578347dfa59ee5 | 3,646 | py | Python | intersight/models/sdcard_user_partition_ref.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/models/sdcard_user_partition_ref.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/models/sdcard_user_partition_ref.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Intersight REST API
This is Intersight REST API
OpenAPI spec version: 1.0.9-255
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
class SdcardUserPartitionRef(object):
"""
NOTE: Thi... | 24.306667 | 77 | 0.546078 |
73577cdf99c40afa900192edf5116a564ebcce59 | 6,484 | py | Python | tests/lib/path.py | di/pip | 491294f61e37d766720aead97b4fb008cfc2e51d | [
"MIT"
] | 1 | 2022-01-24T12:05:27.000Z | 2022-01-24T12:05:27.000Z | tests/lib/path.py | tiran/pip | 2552da3f27ed902fb1fe1b3d26e3e9c138aaeced | [
"MIT"
] | null | null | null | tests/lib/path.py | tiran/pip | 2552da3f27ed902fb1fe1b3d26e3e9c138aaeced | [
"MIT"
] | null | null | null | # flake8: noqa
# -*- coding: utf-8 -*-
# Author: Aziz Köksal
from __future__ import absolute_import
import glob
import os
import sys
import shutil
try:
from os import supports_fd
except ImportError:
supports_fd = set()
from pip._vendor import six
_base = six.text_type if os.path.supports_unicode_filenames ... | 21.905405 | 77 | 0.522517 |
73577d98870058fb3bd6cd5cce2de95c9a37de98 | 25,546 | py | Python | intersight/apis/ls_service_profile_api.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/apis/ls_service_profile_api.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/apis/ls_service_profile_api.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Intersight REST API
This is Intersight REST API
OpenAPI spec version: 1.0.9-255
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import sys
import os
import re
# python 2 and python 3 compatibility library
from s... | 50.586139 | 818 | 0.618218 |
735786cf70e23426987b8e03d7345ee9b63b3cb5 | 20,822 | py | Python | scripts/artifact_report.py | JamieSharpe/ALEAPP | acb06736d772d75c9dc0fd58b9f2a1726e795fb4 | [
"MIT"
] | null | null | null | scripts/artifact_report.py | JamieSharpe/ALEAPP | acb06736d772d75c9dc0fd58b9f2a1726e795fb4 | [
"MIT"
] | null | null | null | scripts/artifact_report.py | JamieSharpe/ALEAPP | acb06736d772d75c9dc0fd58b9f2a1726e795fb4 | [
"MIT"
] | null | null | null | import html
import os
import sys
import uuid
import shutil
from distutils.dir_util import copy_tree
from datetime import datetime
from scripts.ilapfuncs import get_next_unused_name
from jinja2 import Environment, select_autoescape, FileSystemLoader
from scripts.html_parts import *
from scripts.ilapfuncs import is_plat... | 42.407332 | 172 | 0.621266 |
73578a03f893ebc0ed9fd4883b205cd1f44a2334 | 2,422 | py | Python | api/graphql/tests/test_purposes.py | iivoraitahila/tilavarauspalvelu-core | ed809dd74dffc1e21141564a005fcdf138a49448 | [
"MIT"
] | null | null | null | api/graphql/tests/test_purposes.py | iivoraitahila/tilavarauspalvelu-core | ed809dd74dffc1e21141564a005fcdf138a49448 | [
"MIT"
] | null | null | null | api/graphql/tests/test_purposes.py | iivoraitahila/tilavarauspalvelu-core | ed809dd74dffc1e21141564a005fcdf138a49448 | [
"MIT"
] | null | null | null | import json
import snapshottest
from assertpy import assert_that
from graphene_django.utils import GraphQLTestCase
from rest_framework.test import APIClient
from reservation_units.tests.factories import PurposeFactory
class PurposeTestCase(GraphQLTestCase, snapshottest.TestCase):
@classmethod
def setUpTestD... | 29.180723 | 93 | 0.535095 |
7357af3b62053d86364e1399cf87413044c8c23a | 7,126 | py | Python | production/pygsl-0.9.5/pygsl/multifit_nlin.py | juhnowski/FishingRod | 457e7afb5cab424296dff95e1acf10ebf70d32a9 | [
"MIT"
] | null | null | null | production/pygsl-0.9.5/pygsl/multifit_nlin.py | juhnowski/FishingRod | 457e7afb5cab424296dff95e1acf10ebf70d32a9 | [
"MIT"
] | null | null | null | production/pygsl-0.9.5/pygsl/multifit_nlin.py | juhnowski/FishingRod | 457e7afb5cab424296dff95e1acf10ebf70d32a9 | [
"MIT"
] | 1 | 2018-10-02T06:18:07.000Z | 2018-10-02T06:18:07.000Z | #!/usr/bin/env python
# Author : Pierre Schnizer
"""
Wrapper over the functions as described in Chapter 33 of the
reference manual.
Routines for approximating a data set with a non linear function
"""
import _callback
from gsl_function import gsl_multifit_function_fdf, gsl_multifit_function
from _generic_solver imp... | 35.809045 | 74 | 0.695902 |
7357b21ff2dc8403139973c7d318957e3ad266d2 | 278 | py | Python | component/parameter/file_params.py | sepal-contrib/se.plan | a534d0f15e371310b6bc483867685f8a21f790c0 | [
"MIT"
] | 5 | 2020-11-06T17:24:57.000Z | 2021-12-21T23:06:22.000Z | component/parameter/file_params.py | sepal-contrib/se.plan | a534d0f15e371310b6bc483867685f8a21f790c0 | [
"MIT"
] | 90 | 2020-11-22T13:19:45.000Z | 2022-02-18T14:00:35.000Z | component/parameter/file_params.py | sepal-contrib/se.plan | a534d0f15e371310b6bc483867685f8a21f790c0 | [
"MIT"
] | 2 | 2020-11-06T17:25:03.000Z | 2021-06-09T23:03:24.000Z | from pathlib import Path
# list of available layers for the optimisation based on the layer_list in data
layer_list = Path(__file__).parents[2] / "utils" / "layer_list.csv"
# list of the lmic countries
country_list = Path(__file__).parents[2] / "utils" / "lmic_countries.csv"
| 34.75 | 79 | 0.755396 |
7357c626c3f231c92cf6c70355bf161da30dcf96 | 5,521 | py | Python | packages/rabbitmq-tutorial/pub-sub/consumer/consumer.py | WallaceLiu/python_learn | ea8c4c20856a25491c756f74b3b572463ea7d7ea | [
"Apache-2.0"
] | null | null | null | packages/rabbitmq-tutorial/pub-sub/consumer/consumer.py | WallaceLiu/python_learn | ea8c4c20856a25491c756f74b3b572463ea7d7ea | [
"Apache-2.0"
] | null | null | null | packages/rabbitmq-tutorial/pub-sub/consumer/consumer.py | WallaceLiu/python_learn | ea8c4c20856a25491c756f74b3b572463ea7d7ea | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#
# Sample RabbitMQ receiver.
#
# This creates a fanout exchange named "exchange", binds a queue named
# "exchange.receiver" to it, and prints any content it receives.
#
# This is largely boilerplate for the pika Python AMQP client library;
# see https://pika.readthedocs.org/ for details. This us... | 34.291925 | 83 | 0.700235 |
7357df9465e1df8c5805a8de419ea4b5a38065af | 4,845 | py | Python | simulator.py | mcba1n/nanopore_dna_storage | fd91f4c88f7d602aadcdcb5c3f14e2d41902aef2 | [
"MIT"
] | 10 | 2020-07-26T22:06:25.000Z | 2022-03-27T13:20:57.000Z | simulator.py | mcba1n/nanopore_dna_storage | fd91f4c88f7d602aadcdcb5c3f14e2d41902aef2 | [
"MIT"
] | null | null | null | simulator.py | mcba1n/nanopore_dna_storage | fd91f4c88f7d602aadcdcb5c3f14e2d41902aef2 | [
"MIT"
] | 6 | 2020-08-10T09:14:14.000Z | 2021-07-25T09:08:16.000Z | import sys
import numpy as np
import scrappy
import subprocess
from fast5_research import Fast5
import os
import distance
import helper
import argparse
import math
import warnings
warnings.filterwarnings("ignore", category=DeprecationWarning)
parser = argparse.ArgumentParser(description='Simulation for convolutional... | 38.149606 | 230 | 0.712281 |
7358153848fd83a1f15d8778d4dcf1a57492d92e | 2,275 | py | Python | src/extract_annotations.py | AndyYangjd/data_fuse_demo | 3e19e42c2e02795e8b11aa60e5310c02a3e04316 | [
"BSD-3-Clause"
] | 8 | 2020-10-09T13:43:51.000Z | 2022-01-17T06:18:52.000Z | src/extract_annotations.py | AndyYangjd/data_fuse_demo | 3e19e42c2e02795e8b11aa60e5310c02a3e04316 | [
"BSD-3-Clause"
] | null | null | null | src/extract_annotations.py | AndyYangjd/data_fuse_demo | 3e19e42c2e02795e8b11aa60e5310c02a3e04316 | [
"BSD-3-Clause"
] | null | null | null | # extract_annotations.py
#
# extract Anno-Info from nuScenes-dataset
#
import os
import json
from nuscenes.nuscenes import NuScenes
nuscens_dataset_pth = r"F:\datasets\data\sets\nuscenes"
nusc = NuScenes(version='v1.0-mini',
dataroot=nuscens_dataset_pth,
verbose=True)
extracted_data ... | 32.042254 | 78 | 0.698022 |
735816dc38cfbe3b2694ae5b2c559eed2c347142 | 212 | py | Python | week11/word_counter/word_counter.py | AnaRita93/spiced_projects | 64f0caec4008cc9ccb528e71ec16afba78728b8e | [
"MIT"
] | null | null | null | week11/word_counter/word_counter.py | AnaRita93/spiced_projects | 64f0caec4008cc9ccb528e71ec16afba78728b8e | [
"MIT"
] | null | null | null | week11/word_counter/word_counter.py | AnaRita93/spiced_projects | 64f0caec4008cc9ccb528e71ec16afba78728b8e | [
"MIT"
] | null | null | null | """
Automated Testing
pip install pytest
"""
NUMBERS = '12345678'
def count_words(text):
for digit in NUMBERS:
text = text.replace(digit, '')
words = text.split()
return len(words)
| 16.307692 | 38 | 0.613208 |
735825f75c0e77976cf956fcb87c4e07f822e88a | 1,046 | py | Python | src/steampunk_scanner/api.py | xlab-steampunk/steampunk-scanner-cli | d2206f72b29bf1e1d3c9dcc330413117df4838e9 | [
"Apache-2.0"
] | 3 | 2021-11-04T14:22:48.000Z | 2022-02-03T21:49:03.000Z | src/steampunk_scanner/api.py | xlab-steampunk/steampunk-scanner-cli | d2206f72b29bf1e1d3c9dcc330413117df4838e9 | [
"Apache-2.0"
] | 8 | 2021-11-17T16:41:10.000Z | 2022-03-18T10:29:12.000Z | src/steampunk_scanner/api.py | xlab-steampunk/steampunk-scanner-cli | d2206f72b29bf1e1d3c9dcc330413117df4838e9 | [
"Apache-2.0"
] | 1 | 2022-02-03T22:11:32.000Z | 2022-02-03T22:11:32.000Z | import os
from typing import Optional
import requests
ENDPOINT = os.environ.get("SCANNER_ENDPOINT", "https://scanner.steampunk.si/api")
class Client:
"""A client interface for interacting with Steampunk Scanner API"""
def __init__(self, url: str, username: Optional[str] = None, password: Optional[str] = No... | 30.764706 | 97 | 0.622371 |
73589b39140d85ac4f4125a82308145c8333a5a9 | 831 | py | Python | var/spack/repos/builtin/packages/conmon/package.py | BenWibking/spack | 49b3b43a4a9375210b578635d9240875a5f3106b | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2,360 | 2017-11-06T08:47:01.000Z | 2022-03-31T14:45:33.000Z | var/spack/repos/builtin/packages/conmon/package.py | BenWibking/spack | 49b3b43a4a9375210b578635d9240875a5f3106b | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 13,838 | 2017-11-04T07:49:45.000Z | 2022-03-31T23:38:39.000Z | var/spack/repos/builtin/packages/conmon/package.py | joequant/spack | e028ee0d5903045e1cdeb57550cbff61f2ffb2fa | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 1,793 | 2017-11-04T07:45:50.000Z | 2022-03-30T14:31:53.000Z | # Copyright 2013-2021 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 Conmon(MakefilePackage):
"""An OCI container runtime monitor"""
homepage = 'https:... | 31.961538 | 96 | 0.690734 |
7358b488cc7497c61a56eab20fe532b497ce2b68 | 7,814 | py | Python | embed/lpmodels.py | 3lLobo/embed | d77c2af78e88908afc5f81a1f681a9b3e4c5d6d6 | [
"MIT"
] | null | null | null | embed/lpmodels.py | 3lLobo/embed | d77c2af78e88908afc5f81a1f681a9b3e4c5d6d6 | [
"MIT"
] | null | null | null | embed/lpmodels.py | 3lLobo/embed | d77c2af78e88908afc5f81a1f681a9b3e4c5d6d6 | [
"MIT"
] | null | null | null | import torch, os, sys, random
from torch import nn
import torch.nn.functional as F
import util
from util import d, tic, toc
from abc import abstractmethod
class Decoder(nn.Module):
def __init__(self, e):
super().__init__()
self.e = e
def s_dim(self):
return self.e
def p_dim(s... | 31.893878 | 124 | 0.571922 |
7358de525a67d840fab485d1ec63522e941a1a31 | 1,574 | py | Python | tests/test_revert.py | jayvdb/python-quilt | f09799e28ac3ced07dff91b1b677b3db00781ae9 | [
"MIT"
] | 4 | 2016-12-28T23:28:02.000Z | 2022-03-15T02:46:10.000Z | tests/test_revert.py | jayvdb/python-quilt | f09799e28ac3ced07dff91b1b677b3db00781ae9 | [
"MIT"
] | 17 | 2017-02-24T09:16:14.000Z | 2019-04-08T08:37:17.000Z | tests/test_revert.py | jayvdb/python-quilt | f09799e28ac3ced07dff91b1b677b3db00781ae9 | [
"MIT"
] | 2 | 2017-01-03T00:55:59.000Z | 2019-03-28T15:42:12.000Z | import os, os.path
from helpers import make_file, tmp_series
from unittest import TestCase
import quilt.revert
from quilt.db import Db, Patch
from quilt.refresh import Refresh
class Test(TestCase):
def test_unreverted(self):
""" Test when the patch modifies unreverted files """
with tmp_series... | 39.35 | 76 | 0.565438 |
7358e35f2322c659b18fa9db5772e3603d33a557 | 670 | py | Python | setup.py | StarWatch27/Scalpel | 8853e6e84f318f3cfeda0e03d274748b2fbe30fa | [
"Apache-2.0"
] | 1 | 2022-01-12T06:00:32.000Z | 2022-01-12T06:00:32.000Z | setup.py | StarWatch27/Scalpel | 8853e6e84f318f3cfeda0e03d274748b2fbe30fa | [
"Apache-2.0"
] | null | null | null | setup.py | StarWatch27/Scalpel | 8853e6e84f318f3cfeda0e03d274748b2fbe30fa | [
"Apache-2.0"
] | null | null | null |
from setuptools import setup, find_packages
setup(
name = "Scalpel",
version = "1.0beta",
description = "Scalpel: A Python Program Analysis Framework",
author = "Jiawei Wang and Li Li",
author_email = "jiawei.wang1@monash.edu, li.li@monash.edu",
url = "https://www.monash.edu",
packages= fi... | 24.814815 | 65 | 0.553731 |
7358e905a65142e7ce5cd55770bd5b7c1ed04911 | 7,244 | py | Python | password.py | kenmutuma001/Password-Locker | 5fb96851d1e52ae5b339ec40e696c045271ca33e | [
"Unlicense"
] | null | null | null | password.py | kenmutuma001/Password-Locker | 5fb96851d1e52ae5b339ec40e696c045271ca33e | [
"Unlicense"
] | null | null | null | password.py | kenmutuma001/Password-Locker | 5fb96851d1e52ae5b339ec40e696c045271ca33e | [
"Unlicense"
] | null | null | null | from userinfo import Userinfo
from account import Account
import random
import getpass
def create_userinfo(username,password):
'''
Function to create new userinfo
'''
new_userinfo = Userinfo(username,password)
return new_userinfo
def create_account(username,accountFrom,acc_username,acc_password):
... | 27.861538 | 138 | 0.490337 |
7358f0fafc96e85329ee754cd1fae3fed317a9ff | 2,627 | py | Python | asyncmongo/backends/glib2_backend.py | bufferx/asyncmongo | c68ba72a79507e21f28c5525e1f6954cc68db4cf | [
"Apache-2.0"
] | null | null | null | asyncmongo/backends/glib2_backend.py | bufferx/asyncmongo | c68ba72a79507e21f28c5525e1f6954cc68db4cf | [
"Apache-2.0"
] | null | null | null | asyncmongo/backends/glib2_backend.py | bufferx/asyncmongo | c68ba72a79507e21f28c5525e1f6954cc68db4cf | [
"Apache-2.0"
] | null | null | null | #!/bin/env python
#
# Copyright 2010 bit.ly
#
# 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... | 29.188889 | 75 | 0.627332 |
7359086f9244512c0a4efd7b473e385af1350709 | 8,068 | py | Python | sasstastic/compile.py | mateuszz0000/sasstastic | 562b41c201c4d02bbc403044b1f946f4ab46f9ab | [
"MIT"
] | null | null | null | sasstastic/compile.py | mateuszz0000/sasstastic | 562b41c201c4d02bbc403044b1f946f4ab46f9ab | [
"MIT"
] | null | null | null | sasstastic/compile.py | mateuszz0000/sasstastic | 562b41c201c4d02bbc403044b1f946f4ab46f9ab | [
"MIT"
] | null | null | null | import hashlib
import json
import logging
import re
import shutil
import tempfile
from pathlib import Path
from time import time
from typing import Union
import click
import sass
from .common import SasstasticError
from .config import ConfigModel
__all__ = ('compile_sass',)
logger = logging.getLogger('sasstastic.bui... | 35.231441 | 111 | 0.585895 |
73592289b0697776d81e1ce1277877522faa9ead | 1,862 | py | Python | Implement_google_AdaptiveFL/test/test_mnist.py | kuihao/KuihaoFL | 69c9161497f2a82ab8ef2d785a0c7e2e6975a328 | [
"Apache-2.0"
] | 4 | 2021-12-13T06:03:35.000Z | 2022-03-22T05:12:41.000Z | Implement_google_AdaptiveFL/test/test_mnist.py | kuihao/KuihaoFL | 69c9161497f2a82ab8ef2d785a0c7e2e6975a328 | [
"Apache-2.0"
] | null | null | null | Implement_google_AdaptiveFL/test/test_mnist.py | kuihao/KuihaoFL | 69c9161497f2a82ab8ef2d785a0c7e2e6975a328 | [
"Apache-2.0"
] | null | null | null | import tensorflow as tf
import numpy as np
#assert idx in range(10) # limit it can't more than 10...
(x_train, y_train), (x_test, y_test) = tf.keras.datasets.mnist.load_data() # Train 60000-5000, Test 10000
print(y_train[0])
# Data preprocessing
x_train = x_train.astype("float32") / 255
x_test = x_test.astype("float3... | 38 | 109 | 0.654672 |
73595bf5b92a01805aa900c3cd9a5e0a19578131 | 246 | py | Python | arjun_ra/main.py | ekarjun/Arjun_RA | b155d504718979922363739c76f491ba8818b551 | [
"Apache-2.0"
] | null | null | null | arjun_ra/main.py | ekarjun/Arjun_RA | b155d504718979922363739c76f491ba8818b551 | [
"Apache-2.0"
] | null | null | null | arjun_ra/main.py | ekarjun/Arjun_RA | b155d504718979922363739c76f491ba8818b551 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright(c) 2016, Ciena All rights reserved.
import os
from rasdk.engine import run
def main():
os.environ.setdefault('RASDK_SETTINGS_MODULE', 'arjun_ra.settings')
run()
if __name__ == '__main__':
main()
| 16.4 | 71 | 0.695122 |
73596b4d28156a2c26336206a542733215eff378 | 6,271 | py | Python | utils.py | automatewithme/named_entity_recognition | bd0377b4eb15292f70b29b10a2819dad0818fafa | [
"Apache-2.0"
] | null | null | null | utils.py | automatewithme/named_entity_recognition | bd0377b4eb15292f70b29b10a2819dad0818fafa | [
"Apache-2.0"
] | null | null | null | utils.py | automatewithme/named_entity_recognition | bd0377b4eb15292f70b29b10a2819dad0818fafa | [
"Apache-2.0"
] | null | null | null | from collections import defaultdict
from evaluation import precision_recall_f1
import numpy as np
def read_data(file_path):
tokens = []
tags = []
tweet_tokens = []
tweet_tags = []
for line in open(file_path, encoding='utf-8'):
line = line.strip()
if not line:
if twe... | 38.006061 | 112 | 0.600383 |
735997b6ac48e06cd726843c7cfbd754bd51fab8 | 386 | py | Python | terrascript/provider/azurecaf.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 507 | 2017-07-26T02:58:38.000Z | 2022-01-21T12:35:13.000Z | terrascript/provider/azurecaf.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 135 | 2017-07-20T12:01:59.000Z | 2021-10-04T22:25:40.000Z | terrascript/provider/azurecaf.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 81 | 2018-02-20T17:55:28.000Z | 2022-01-31T07:08:40.000Z | # terrascript/provider/azurecaf.py
# Automatically generated by tools/makecode.py (24-Sep-2021 15:12:56 UTC)
#
# For imports without namespace, e.g.
#
# >>> import terrascript.provider.azurecaf
#
# instead of
#
# >>> import terrascript.provider.aztfmod.azurecaf
#
# This is only available for 'official' and 'partner... | 25.733333 | 73 | 0.748705 |
73599fc3f9a9ca9a38b8332745b89edd819eb8f1 | 6,256 | py | Python | src/CountTab.py | ubco-mds-2021-labs/dashboard1-group-f | 9de5ffc12974ff0f2f1b0585e3c81410578ed41d | [
"MIT"
] | 4 | 2022-02-16T22:30:24.000Z | 2022-02-17T01:24:46.000Z | src/CountTab.py | ubco-mds-2021-labs/dashboard1-group-f | 9de5ffc12974ff0f2f1b0585e3c81410578ed41d | [
"MIT"
] | 26 | 2022-02-16T23:02:02.000Z | 2022-03-25T20:12:36.000Z | src/CountTab.py | ubco-mds-2021-labs/dashboard1-group-f | 9de5ffc12974ff0f2f1b0585e3c81410578ed41d | [
"MIT"
] | 1 | 2022-03-11T01:54:37.000Z | 2022-03-11T01:54:37.000Z | from dash import html
import dash_bootstrap_components as dbc
import altair as alt
import pandas as pd
import numpy as np
## Plotting
# Waiting and completed case count line plot
def line_plot_tc(all_by_autho):
"""
Plot a line plot to show the count of the waiting and completed cases for a certain region by ... | 35.146067 | 152 | 0.62468 |
7359bcd43656961c42d08aeac0054f938aa6d722 | 4,065 | py | Python | asa/nep5.py | nickfujita/asura-coin | ce8a42f734101755ea051a8e556b96d2cb341c26 | [
"MIT"
] | 10 | 2018-04-12T13:46:57.000Z | 2018-06-28T20:28:28.000Z | asa/nep5.py | asuracoin/smart-contract | ce8a42f734101755ea051a8e556b96d2cb341c26 | [
"MIT"
] | null | null | null | asa/nep5.py | asuracoin/smart-contract | ce8a42f734101755ea051a8e556b96d2cb341c26 | [
"MIT"
] | null | null | null | from boa.interop.Neo.Runtime import CheckWitness, Notify
from boa.interop.Neo.Action import RegisterAction
from boa.interop.Neo.Storage import Get, Put, Delete
from boa.builtins import concat
from asa.token import TOKEN_NAME, TOKEN_DECIMALS, TOKEN_SYMBOL, TOKEN_CIRC_KEY
OnTransfer = RegisterAction('transfer', 'addr_f... | 22.966102 | 125 | 0.614514 |
7359bda6777faa226efad1676c000db096209b0f | 8,947 | py | Python | airflow_client/test/test_config.py | sptsakcg/airflow-client-python | 38a14e8641988f8cc88a5b27632ef4198bdb2843 | [
"Apache-2.0"
] | null | null | null | airflow_client/test/test_config.py | sptsakcg/airflow-client-python | 38a14e8641988f8cc88a5b27632ef4198bdb2843 | [
"Apache-2.0"
] | null | null | null | airflow_client/test/test_config.py | sptsakcg/airflow-client-python | 38a14e8641988f8cc88a5b27632ef4198bdb2843 | [
"Apache-2.0"
] | null | null | null | """
Airflow API (Stable)
# Overview To facilitate management, Apache Airflow supports a range of REST API endpoints across its objects. This section provides an overview of the API design, methods, and supported use cases. Most of the endpoints accept `JSON` as input and return `JSON` responses. This means t... | 229.410256 | 8,173 | 0.758578 |
735a248cb811e2267746c5db65e464053f67810d | 4,270 | py | Python | testAI.py | Adi-UA/AI-Plays-Flappy-Bird | a91519f2365d65e3014438e2c1390abeff5b1540 | [
"MIT"
] | null | null | null | testAI.py | Adi-UA/AI-Plays-Flappy-Bird | a91519f2365d65e3014438e2c1390abeff5b1540 | [
"MIT"
] | null | null | null | testAI.py | Adi-UA/AI-Plays-Flappy-Bird | a91519f2365d65e3014438e2c1390abeff5b1540 | [
"MIT"
] | null | null | null | import pygame
import time
import os
import pickle
from resources.reference import *
from gamesrc.bird import Bird
from gamesrc.ground import Ground
from gamesrc.pipe import Pipe
from gamesrc.hardpipe import HardPipe
from gamesrc.randompipe import RandomPipe
def draw_window(window, bird, pipes, ground, score):
"""... | 29.86014 | 80 | 0.589227 |
735a4f3a4370fc88a3a272672d1e396331f66c59 | 1,477 | py | Python | src/12/defining_an_actor_task/actor.py | tuanavu/python-gitbook | 948a05e065b0f40afbfd22f697dff16238163cde | [
"MIT"
] | 14 | 2017-05-20T04:06:46.000Z | 2022-01-23T06:48:45.000Z | src/12/defining_an_actor_task/actor.py | tuanavu/python-gitbook | 948a05e065b0f40afbfd22f697dff16238163cde | [
"MIT"
] | 1 | 2021-06-10T20:17:55.000Z | 2021-06-10T20:17:55.000Z | src/12/defining_an_actor_task/actor.py | tuanavu/python-gitbook | 948a05e065b0f40afbfd22f697dff16238163cde | [
"MIT"
] | 15 | 2017-03-29T17:57:33.000Z | 2021-08-24T02:20:08.000Z | from queue import Queue
from threading import Thread, Event
# Sentinel used for shutdown
class ActorExit(Exception):
pass
class Actor:
def __init__(self):
self._mailbox = Queue()
def send(self, msg):
'''
Send a message to the actor
'''
self._mailbox.put(msg)
d... | 19.434211 | 48 | 0.516588 |
735a6cae2c604c0c3892b2de75d4f98210a77959 | 8,980 | py | Python | tests/integration/utils/chroma_log_collector.py | AlexTalker/integrated-manager-for-lustre | 251099e5c776f3c1898af50bb7cc77924c7cf7c7 | [
"MIT"
] | 1 | 2021-02-08T16:59:14.000Z | 2021-02-08T16:59:14.000Z | tests/integration/utils/chroma_log_collector.py | AlexTalker/integrated-manager-for-lustre | 251099e5c776f3c1898af50bb7cc77924c7cf7c7 | [
"MIT"
] | null | null | null | tests/integration/utils/chroma_log_collector.py | AlexTalker/integrated-manager-for-lustre | 251099e5c776f3c1898af50bb7cc77924c7cf7c7 | [
"MIT"
] | null | null | null | #
# Simple script to gather all of the relevant logs from a cluster.
#
# Usage: ./chroma_log_collection.py destination_path cluster_cfg_path
# destination_path - the directory to copy all of the log files into
# cluster_cfg_path - the path to the cluster config file
#
# Ex usage: ./chroma_log_collection.py ss_log_c... | 37.573222 | 118 | 0.609577 |
735a73d7516f413269d27051d0f58ede00b4da9e | 1,197 | py | Python | location/models.py | WillieIlus/jobscorner | ed3734468ea0e88a306a1d29bc876562e940f4fb | [
"bzip2-1.0.6"
] | 2 | 2020-04-12T13:18:35.000Z | 2021-04-02T04:18:17.000Z | location/models.py | WillieIlus/jobscorner | ed3734468ea0e88a306a1d29bc876562e940f4fb | [
"bzip2-1.0.6"
] | 3 | 2020-02-11T23:58:53.000Z | 2020-09-06T18:46:17.000Z | location/models.py | WillieIlus/jobscorner | ed3734468ea0e88a306a1d29bc876562e940f4fb | [
"bzip2-1.0.6"
] | 1 | 2020-08-17T08:29:41.000Z | 2020-08-17T08:29:41.000Z | from __future__ import unicode_literals
from builtins import super
from django.db import models
from django.urls import reverse
from django.utils.text import slugify
from country.models import Country
class Location(models.Model):
name = models.CharField(max_length=50, unique=True)
slug = models.SlugField(... | 28.5 | 90 | 0.691729 |
735a9abede0f6872d565aab7efbc3e8114ffa227 | 9,982 | py | Python | modules/dbnd/src/dbnd/utils/api_client.py | dmytrostriletskyi/dbnd | d4a5f5167523e80439c9d64182cdc87b40cbc48f | [
"Apache-2.0"
] | null | null | null | modules/dbnd/src/dbnd/utils/api_client.py | dmytrostriletskyi/dbnd | d4a5f5167523e80439c9d64182cdc87b40cbc48f | [
"Apache-2.0"
] | null | null | null | modules/dbnd/src/dbnd/utils/api_client.py | dmytrostriletskyi/dbnd | d4a5f5167523e80439c9d64182cdc87b40cbc48f | [
"Apache-2.0"
] | null | null | null | import logging
from datetime import datetime, timedelta
from time import sleep
from typing import Dict, Optional, Tuple, Union
import requests
from six.moves.urllib_parse import urljoin
from dbnd._core.current import try_get_databand_run
from dbnd._core.errors.base import (
DatabandApiError,
DatabandAuthent... | 33.496644 | 112 | 0.602384 |
735aa45b626c5be516f99aaa2bce59fa0ade705d | 705 | py | Python | src/python/grpcio_reflection/grpc_version.py | tomerv/grpc | 27662173e750107a4520d5d6972544d67a6a0203 | [
"Apache-2.0"
] | 4 | 2018-10-12T17:18:41.000Z | 2020-06-21T19:31:47.000Z | src/python/grpcio_reflection/grpc_version.py | stanley-cheung/grpc | 7d6000082a0e79a5307d04454a572a924a4d940d | [
"BSD-3-Clause"
] | 9 | 2021-06-01T23:18:19.000Z | 2022-02-22T17:54:02.000Z | src/python/grpcio_reflection/grpc_version.py | stanley-cheung/grpc | 7d6000082a0e79a5307d04454a572a924a4d940d | [
"BSD-3-Clause"
] | 1 | 2022-01-18T07:59:33.000Z | 2022-01-18T07:59:33.000Z | # Copyright 2016 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... | 39.166667 | 101 | 0.763121 |
735ac80ac8eb5a6f08d90b64987c2fc3a1cc35ef | 21,899 | py | Python | taf/testlib/clicmd_iss.py | stepanandr/taf | 75cb85861f8e9703bab7dc6195f3926b8394e3d0 | [
"Apache-2.0"
] | 10 | 2016-12-16T00:05:58.000Z | 2018-10-30T17:48:25.000Z | taf/testlib/clicmd_iss.py | stepanandr/taf | 75cb85861f8e9703bab7dc6195f3926b8394e3d0 | [
"Apache-2.0"
] | 40 | 2017-01-04T23:07:05.000Z | 2018-04-16T19:52:02.000Z | taf/testlib/clicmd_iss.py | stepanandr/taf | 75cb85861f8e9703bab7dc6195f3926b8394e3d0 | [
"Apache-2.0"
] | 23 | 2016-12-30T05:03:53.000Z | 2020-04-01T08:40:24.000Z | # Copyright (c) 2011 - 2017, 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 agre... | 37.69191 | 153 | 0.513083 |
735ad5729aa6477b68daaec66d2f709211a3bacc | 954 | py | Python | tests/utils.py | demitasse/wfstpy | 6da4247365df7b5e9e03e7a4722b81d76fae89e5 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2 | 2019-06-26T08:34:09.000Z | 2021-04-12T00:46:46.000Z | tests/utils.py | demitasse/wfstpy | 6da4247365df7b5e9e03e7a4722b81d76fae89e5 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | tests/utils.py | demitasse/wfstpy | 6da4247365df7b5e9e03e7a4722b81d76fae89e5 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 1 | 2020-01-08T02:51:04.000Z | 2020-01-08T02:51:04.000Z | from copy import deepcopy
def walk_all(wfst, remove_epsilon=True):
"""Walk all paths (depth-first) and return input label sequences and
path weights. Obviously if the WFST contains cycles this will
not return.
"""
s = wfst.get_start()
paths = []
curr = [[], wfst.W.one()]
_dfs_ne... | 31.8 | 72 | 0.601677 |
735b2c200858e7652d7312fde326756b79285207 | 852 | py | Python | dakotathon/method/sampling.py | csdms/dakotathon | 6af575b0c21384b2a1ab51e26b6a08512313bd84 | [
"MIT"
] | 8 | 2019-09-11T12:59:57.000Z | 2021-08-11T16:31:58.000Z | dakotathon/method/sampling.py | csdms/dakota | 6af575b0c21384b2a1ab51e26b6a08512313bd84 | [
"MIT"
] | 66 | 2015-04-06T17:11:21.000Z | 2019-02-03T18:09:52.000Z | dakotathon/method/sampling.py | csdms/dakota | 6af575b0c21384b2a1ab51e26b6a08512313bd84 | [
"MIT"
] | 5 | 2015-03-24T22:39:34.000Z | 2018-04-21T12:14:05.000Z | #! /usr/bin/env python
"""Implementation of the Dakota sampling method."""
from .base import UncertaintyQuantificationBase
classname = "Sampling"
class Sampling(UncertaintyQuantificationBase):
"""The Dakota sampling method."""
def __init__(self, **kwargs):
"""Create a new Dakota sampling study.
... | 22.421053 | 68 | 0.616197 |
735b4b1e47f39239e05e51d86bd47f4a7609d4fb | 70,321 | py | Python | renpy/parser.py | swaggyp-14/renpy-7.4.4-sdk | 43a26d67d35fd345c40550f367a1ab0c389ab9dc | [
"Apache-2.0"
] | null | null | null | renpy/parser.py | swaggyp-14/renpy-7.4.4-sdk | 43a26d67d35fd345c40550f367a1ab0c389ab9dc | [
"Apache-2.0"
] | null | null | null | renpy/parser.py | swaggyp-14/renpy-7.4.4-sdk | 43a26d67d35fd345c40550f367a1ab0c389ab9dc | [
"Apache-2.0"
] | null | null | null | # Copyright 2004-2021 Tom Rothamel <pytom@bishoujo.us>
#
# 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, m... | 23.669135 | 183 | 0.537478 |
735b54212928c13446abca62f3e0d3244d915f48 | 3,807 | py | Python | doctoreval/tests/test_doctoreval.py | progrium/DrEval | 8cda2e93f7356656e50d41ab02a06343e8a7b4fe | [
"MIT"
] | 17 | 2015-02-05T17:10:25.000Z | 2021-01-07T20:56:16.000Z | doctoreval/tests/test_doctoreval.py | progrium/DrEval | 8cda2e93f7356656e50d41ab02a06343e8a7b4fe | [
"MIT"
] | null | null | null | doctoreval/tests/test_doctoreval.py | progrium/DrEval | 8cda2e93f7356656e50d41ab02a06343e8a7b4fe | [
"MIT"
] | 3 | 2015-11-05T12:15:52.000Z | 2016-08-02T17:09:33.000Z | from twisted.trial import unittest
from twisted.internet import defer, reactor
import doctoreval
from doctoreval import web
from doctoreval.tests import Bigglesworth
TEST_STRING = "One million dollars!"
class TestDoctorEval(unittest.TestCase):
@Bigglesworth(timeout=1)
def testTimeout(self):
return di... | 30.214286 | 104 | 0.545049 |
735b5fbc4ac94190208e263f7b11fff1a00a59e1 | 2,396 | py | Python | maildir2mbox.py | axfelix/maildir2mbox | 671417695c483c12756e8c3b11fd285bf5b52061 | [
"Unlicense"
] | null | null | null | maildir2mbox.py | axfelix/maildir2mbox | 671417695c483c12756e8c3b11fd285bf5b52061 | [
"Unlicense"
] | null | null | null | maildir2mbox.py | axfelix/maildir2mbox | 671417695c483c12756e8c3b11fd285bf5b52061 | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python3
import os
import sys
import mailbox
import email
USAGE = u"""
$ python maildir2mbox.py [maildir_path] [mbox_path]
"""
def maildir_to_mailbox(maildir_path, mbox_path):
"""
slightly adapted from maildir2mbox.py,
Nathan R. Yergler, 6 June 2010
http://yergler.net/blog/2010/06/06/bat... | 34.228571 | 83 | 0.626461 |
735b842627f0e704cbee0f196cd186fa4146addf | 1,302 | py | Python | slice_db/cli/schema_filter.py | rivethealth/slice-db | 2f94ae7e6c8970bd4ff42b10b0d612c4df179ab8 | [
"MIT"
] | 1 | 2021-04-07T18:13:56.000Z | 2021-04-07T18:13:56.000Z | slice_db/cli/schema_filter.py | rivethealth/slice-db | 2f94ae7e6c8970bd4ff42b10b0d612c4df179ab8 | [
"MIT"
] | null | null | null | slice_db/cli/schema_filter.py | rivethealth/slice-db | 2f94ae7e6c8970bd4ff42b10b0d612c4df179ab8 | [
"MIT"
] | null | null | null | import json
from ..dump import Schema, Table
from ..formats.dump import DUMP_DATA_JSON_FORMAT, DumpReferenceDirection, DumpSchema
from .common import open_str_read, open_str_write
def filter_main(args):
input_config = DUMP_DATA_JSON_FORMAT.load(lambda: open_str_read(args.input))
if args.subcommand == "child... | 28.933333 | 84 | 0.675883 |
735ba316d0a3c02ecf83fa2820ce234ef36e2f6f | 211,998 | py | Python | tensorflow/python/framework/ops.py | zhong110020/tensorflow | b79ce0029dce3264266ced739590bc238b17096c | [
"Apache-2.0"
] | 2 | 2018-12-05T17:34:20.000Z | 2019-01-07T01:59:19.000Z | tensorflow/python/framework/ops.py | qins0426/tensorflow | b79ce0029dce3264266ced739590bc238b17096c | [
"Apache-2.0"
] | null | null | null | tensorflow/python/framework/ops.py | qins0426/tensorflow | b79ce0029dce3264266ced739590bc238b17096c | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 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... | 36.047951 | 116 | 0.681973 |
735bb382db587d7cf326729a90b25af929d9900b | 9,350 | py | Python | test/functional/multiwallet.py | biblepay/biblepay | 6af4517c623620f60cabc228cc2f63c35d1beb5b | [
"MIT"
] | 63 | 2017-07-25T21:57:21.000Z | 2022-02-05T02:58:03.000Z | test/functional/multiwallet.py | biblepay/biblepay | 6af4517c623620f60cabc228cc2f63c35d1beb5b | [
"MIT"
] | 105 | 2017-09-04T00:52:17.000Z | 2021-05-22T13:58:37.000Z | test/functional/multiwallet.py | biblepay/biblepay | 6af4517c623620f60cabc228cc2f63c35d1beb5b | [
"MIT"
] | 62 | 2017-08-04T19:48:40.000Z | 2021-07-07T12:21:12.000Z | #!/usr/bin/env python3
# Copyright (c) 2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test multiwallet.
Verify that a biblepayd node can load multiple wallet files
"""
import os
import shutil
... | 48.445596 | 177 | 0.670695 |
735bdf68b72dfdea12df9b9b2c6e9bc8ea7cab0f | 2,370 | py | Python | ote_sdk/ote_sdk/tests/entities/test_media.py | ntyukaev/training_extensions | c897d42e50828fea853ceda0795e1f0e7d6e9909 | [
"Apache-2.0"
] | 775 | 2019-03-01T02:13:33.000Z | 2020-09-07T22:49:15.000Z | ote_sdk/ote_sdk/tests/entities/test_media.py | ntyukaev/training_extensions | c897d42e50828fea853ceda0795e1f0e7d6e9909 | [
"Apache-2.0"
] | 229 | 2019-02-28T21:37:08.000Z | 2020-09-07T15:11:49.000Z | ote_sdk/ote_sdk/tests/entities/test_media.py | ntyukaev/training_extensions | c897d42e50828fea853ceda0795e1f0e7d6e9909 | [
"Apache-2.0"
] | 290 | 2019-02-28T20:32:11.000Z | 2020-09-07T05:51:41.000Z | # Copyright (C) 2020-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 applicable law or agreed to i... | 28.902439 | 76 | 0.691561 |
735bfe196ca3cf30f7a787d56e3c400fcce8953d | 16,063 | py | Python | tofnet/train.py | victorjoos/tof2net | 068f5f08a241dbfb950251bea52fd9379466bf2f | [
"MIT"
] | null | null | null | tofnet/train.py | victorjoos/tof2net | 068f5f08a241dbfb950251bea52fd9379466bf2f | [
"MIT"
] | 8 | 2021-02-02T23:07:37.000Z | 2022-03-12T00:51:26.000Z | tofnet/train.py | victorjoos/tof2net | 068f5f08a241dbfb950251bea52fd9379466bf2f | [
"MIT"
] | 2 | 2020-10-01T08:23:24.000Z | 2020-11-09T22:01:47.000Z | import argparse
import inspect
import json
import logging
import math
import os
import sys
import warnings
from collections import OrderedDict
from datetime import datetime
from functools import reduce
from math import ceil
from os import path
from pathlib import Path
from itertools import cycle
import gpustat
import ... | 39.858561 | 159 | 0.628899 |
735c37d756da2a3caa6f2c873bce8122c75a9c46 | 1,907 | py | Python | tdmelodic/nn/lang/japanese/kana/mora_sep.py | tachi-hi/tdmelodic | 9b146c9c788eb730855376c86a8b0eab4d8438ca | [
"BSD-3-Clause"
] | 73 | 2020-09-18T06:37:11.000Z | 2022-03-15T12:40:47.000Z | tdmelodic/nn/lang/japanese/kana/mora_sep.py | tachi-hi/tdmelodic | 9b146c9c788eb730855376c86a8b0eab4d8438ca | [
"BSD-3-Clause"
] | 4 | 2021-02-06T14:52:39.000Z | 2021-11-04T10:02:45.000Z | tdmelodic/nn/lang/japanese/kana/mora_sep.py | tachi-hi/tdmelodic | 9b146c9c788eb730855376c86a8b0eab4d8438ca | [
"BSD-3-Clause"
] | 9 | 2020-09-18T14:49:15.000Z | 2022-03-18T02:53:54.000Z | # -----------------------------------------------------------------------------
# Copyright (c) 2019-, PKSHA Technology Inc.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
# --------------------------------------... | 26.859155 | 114 | 0.460933 |
735c8d021febf0f5e1fc8dfa00aac6f8a3f10393 | 2,898 | py | Python | tests/_internal/test_project_data.py | ARMmbed/mbed-project | 9ab0a7f519196560f53a028e2d796179297b7321 | [
"Apache-2.0"
] | 4 | 2020-03-05T23:24:13.000Z | 2021-09-04T22:36:16.000Z | tests/_internal/test_project_data.py | ARMmbed/mbed-project | 9ab0a7f519196560f53a028e2d796179297b7321 | [
"Apache-2.0"
] | 19 | 2020-03-26T14:00:22.000Z | 2020-07-09T21:53:46.000Z | tests/_internal/test_project_data.py | ARMmbed/mbed-project | 9ab0a7f519196560f53a028e2d796179297b7321 | [
"Apache-2.0"
] | null | null | null | #
# Copyright (C) 2020 Arm Mbed. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
"""Tests for project_data.py."""
import pathlib
from unittest import TestCase
from mbed_project._internal.project_data import MbedProgramFiles, MbedOS
from tests.factories import make_mbed_lib_reference, make_mbed_program_fi... | 30.1875 | 105 | 0.698413 |
735c997d724dc059d0b35f33dbb05ef8380423c8 | 331 | py | Python | join_sampling_python/src/relation.py | ixlab/join_sampling_public | ca3e1faced5d248ad81d935badbbb5eb580b3c9e | [
"Apache-2.0"
] | 3 | 2016-05-13T20:50:35.000Z | 2022-03-25T22:07:33.000Z | join_sampling_python/src/relation.py | ixlab/join_sampling | ca3e1faced5d248ad81d935badbbb5eb580b3c9e | [
"Apache-2.0"
] | null | null | null | join_sampling_python/src/relation.py | ixlab/join_sampling | ca3e1faced5d248ad81d935badbbb5eb580b3c9e | [
"Apache-2.0"
] | null | null | null | class Relation(object):
def __init__(self, input_map):
self.input_map = input_map
def is_present_key(self, row):
return row.key in self.input_map
def add_row(self, row):
rows = []
if row.key in self.input_map:
rows = self.input_map.get(row.key)
rows.append(row)
self.input_map[row.k... | 23.642857 | 40 | 0.670695 |
735ca6a4abc473df119272676283949e749d24f7 | 9,420 | py | Python | src/config/fabric-ansible/job_manager/playbook_helper.py | sasikrishna2014/contrail-controller | 27ec672dc0ea720fe2ed10743ddefbe09f6305e0 | [
"Apache-2.0"
] | null | null | null | src/config/fabric-ansible/job_manager/playbook_helper.py | sasikrishna2014/contrail-controller | 27ec672dc0ea720fe2ed10743ddefbe09f6305e0 | [
"Apache-2.0"
] | null | null | null | src/config/fabric-ansible/job_manager/playbook_helper.py | sasikrishna2014/contrail-controller | 27ec672dc0ea720fe2ed10743ddefbe09f6305e0 | [
"Apache-2.0"
] | null | null | null | #
# Copyright (c) 2018 Juniper Networks, Inc. All rights reserved.
#
"""
Contains functions that invoke the playbook.
"""
import sys
import json
import traceback
import argparse
from collections import namedtuple
import errno
from ansible.module_utils._text import to_bytes, to_text
from ansible.utils.color import stri... | 38.606557 | 79 | 0.588854 |
735cb82b407f183ae986512a67dcb5c657d90865 | 786 | py | Python | setup.py | znstrider/highlight_text | a5f19e41c09a259a40bf60d7dc36821eed53304a | [
"MIT"
] | 71 | 2020-02-15T10:11:28.000Z | 2022-03-24T05:32:57.000Z | setup.py | znstrider/highlight_text | a5f19e41c09a259a40bf60d7dc36821eed53304a | [
"MIT"
] | 3 | 2020-10-03T19:48:42.000Z | 2021-05-01T11:22:50.000Z | setup.py | znstrider/highlight_text | a5f19e41c09a259a40bf60d7dc36821eed53304a | [
"MIT"
] | 3 | 2020-09-07T14:39:42.000Z | 2022-01-05T06:38:29.000Z | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="highlight_text",
version="0.2",
author="znstrider",
author_email="mindfulstrider@gmail.com",
description="matplotlib functions to plot text with color highlighted substrings",
long_des... | 32.75 | 86 | 0.676845 |
735cf302e72f86ff05a0f1d2fa052bc427d3a3bb | 848 | py | Python | askci/settings/applications.py | hpsee/askci | ef1e2e75481b71db7fbe774cb81938055aa596d0 | [
"MIT"
] | 3 | 2019-11-21T09:04:36.000Z | 2019-11-23T13:29:43.000Z | askci/settings/applications.py | hpsee/askci | ef1e2e75481b71db7fbe774cb81938055aa596d0 | [
"MIT"
] | 13 | 2019-11-21T20:28:23.000Z | 2019-11-26T19:34:22.000Z | askci/settings/applications.py | hpsee/askci | ef1e2e75481b71db7fbe774cb81938055aa596d0 | [
"MIT"
] | null | null | null | """
Copyright (C) 2019 Vanessa Sochat.
This Source Code Form is subject to the terms of the
Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed
with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
"""
INSTALLED_APPS = [
"django.contrib.admin",
"django.contrib.auth",
"... | 21.2 | 72 | 0.676887 |
735d18ef8210b7bac538e23040108523c8f8f366 | 1,909 | py | Python | txdav/who/test/test_augment.py | eventable/CalendarServer | 384444edb1966b530bc391789afbe3fb9cd6fd3e | [
"Apache-2.0"
] | 1 | 2017-02-18T19:22:19.000Z | 2017-02-18T19:22:19.000Z | txdav/who/test/test_augment.py | eventable/CalendarServer | 384444edb1966b530bc391789afbe3fb9cd6fd3e | [
"Apache-2.0"
] | null | null | null | txdav/who/test/test_augment.py | eventable/CalendarServer | 384444edb1966b530bc391789afbe3fb9cd6fd3e | [
"Apache-2.0"
] | null | null | null | ##
# Copyright (c) 2014-2015 Apple 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 required by applicable l... | 30.301587 | 78 | 0.675746 |
735d2c3793125ea766d77b36a38953bc74bd0947 | 277 | py | Python | fabric/demo/upload.py | ihaolin/script-repo | 16fef25dd613dcfaf71f59d783932c5a4bdf9f19 | [
"MIT"
] | null | null | null | fabric/demo/upload.py | ihaolin/script-repo | 16fef25dd613dcfaf71f59d783932c5a4bdf9f19 | [
"MIT"
] | null | null | null | fabric/demo/upload.py | ihaolin/script-repo | 16fef25dd613dcfaf71f59d783932c5a4bdf9f19 | [
"MIT"
] | null | null | null | from fabric.api import env, roles, task, execute, run, runs_once, put
env.roledefs = {
'zoo': ['zooserver'],
'mysql': ['mysqlmaster'],
}
@roles('zoo', 'mysql')
@task
#@runs_once This will make mysql task can't be executed
def upload():
put('~/logs/snz', '~/')
| 21.307692 | 69 | 0.620939 |
735d3b4e3f715983bb0da1142f531b9168325fa2 | 700 | py | Python | python/myCode/bounce.py | dgole/ledBasic | 4a8e77f103022c7f7014ca2b15b73f2b3f56755a | [
"BSD-2-Clause"
] | null | null | null | python/myCode/bounce.py | dgole/ledBasic | 4a8e77f103022c7f7014ca2b15b73f2b3f56755a | [
"BSD-2-Clause"
] | null | null | null | python/myCode/bounce.py | dgole/ledBasic | 4a8e77f103022c7f7014ca2b15b73f2b3f56755a | [
"BSD-2-Clause"
] | null | null | null | import time
from neopixel import *
import lib
import numpy as np
strip = Adafruit_NeoPixel(lib.LED_COUNT, lib.LED_PIN, lib.LED_FREQ_HZ, lib.LED_DMA, lib.LED_INVERT, lib.LED_BRIGHTNESS, lib.LED_CHANNEL, lib.LED_STRIP)
strip.begin()
a = np.zeros([strip.numPixels(), 3])
center = 30
width = 5
for i in range(center-width... | 26.923077 | 151 | 0.728571 |
735d40a43c7fcccb157e1db5176f46121e72f687 | 57,486 | py | Python | bob_dylan_lyrics/htmlify.py | mulhod/bob_dylan_lyrics | a892345ad9932269f37e90f9c7fc999a023cb9bb | [
"MIT"
] | 5 | 2016-12-01T18:35:24.000Z | 2021-08-07T19:33:11.000Z | bob_dylan_lyrics/htmlify.py | mulhod/bob_dylan_lyrics | a892345ad9932269f37e90f9c7fc999a023cb9bb | [
"MIT"
] | 3 | 2016-06-20T06:43:53.000Z | 2017-05-19T02:28:27.000Z | bob_dylan_lyrics/htmlify.py | mulhod/bob_dylan_lyrics | a892345ad9932269f37e90f9c7fc999a023cb9bb | [
"MIT"
] | 4 | 2016-07-08T17:47:53.000Z | 2020-10-01T05:54:06.000Z | """
Command-line utility (and module consisting of functions/methods) for
"HTMLifying" raw song lyrics text files accompanied by album/song
metadata and some other content, including images and homepage content.
Usage:
```htmlify```
- Will generate all of the website pages.
```htmlify --make_downloa... | 41.596237 | 86 | 0.573305 |
735d4e0ec8ef223640366a7b7eec74ee33915ae2 | 22,784 | py | Python | tests/test_cardlookup.py | FreakyDug/r2-d7 | c1af24d177ecad63f2d011127fc9505459783b11 | [
"MIT"
] | 13 | 2016-07-06T12:47:15.000Z | 2022-02-03T21:18:06.000Z | tests/test_cardlookup.py | FreakyDug/r2-d7 | c1af24d177ecad63f2d011127fc9505459783b11 | [
"MIT"
] | 35 | 2017-01-31T17:36:07.000Z | 2022-03-30T02:52:42.000Z | tests/test_cardlookup.py | Apollonaut13/r2-d7 | dab40911e4ebacccdc57ea500b4d4429d5b0d816 | [
"MIT"
] | 13 | 2016-09-22T05:22:30.000Z | 2022-03-14T23:18:08.000Z | import pytest
from r2d7.cardlookup import CardLookup
from r2d7.core import UserError
from r2d7.slackdroid import SlackDroid
print_card_tests = (
('tacticalofficer', [
':crew: *<https://xwingtmgwiki.com/Tactical_Officer|Tactical Officer>* [3]',
'_Restrictions: :redcoordinate:_',
... | 62.939227 | 626 | 0.649052 |
735d5c45e735316acb8dbff0e2a102685214a60b | 69,254 | py | Python | keras/layers/preprocessing/image_preprocessing.py | Sambesia/keras | 4313a1c9594ef5fb15d9f6ca1e862c419aa12bc8 | [
"Apache-2.0"
] | null | null | null | keras/layers/preprocessing/image_preprocessing.py | Sambesia/keras | 4313a1c9594ef5fb15d9f6ca1e862c419aa12bc8 | [
"Apache-2.0"
] | null | null | null | keras/layers/preprocessing/image_preprocessing.py | Sambesia/keras | 4313a1c9594ef5fb15d9f6ca1e862c419aa12bc8 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 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... | 39.573714 | 92 | 0.667413 |
735d81de18e3ad236ff0b2b6cfbc3ca818ce6fc7 | 3,934 | py | Python | scorpio_slam/scripts/crop_map.py | applejenny66/goldpaint | cbb368d2d21cc1e26177314eb1e6fceb7c6e6c8d | [
"MIT"
] | null | null | null | scorpio_slam/scripts/crop_map.py | applejenny66/goldpaint | cbb368d2d21cc1e26177314eb1e6fceb7c6e6c8d | [
"MIT"
] | 1 | 2020-08-10T05:33:02.000Z | 2020-08-10T05:33:02.000Z | scorpio_slam/scripts/crop_map.py | applejenny66/goldpaint | cbb368d2d21cc1e26177314eb1e6fceb7c6e6c8d | [
"MIT"
] | 1 | 2021-05-20T09:08:05.000Z | 2021-05-20T09:08:05.000Z | #!/usr/bin/env python
# Software License Agreement (BSD License)
#
# Copyright (c) 2008, Willow Garage, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code... | 35.763636 | 108 | 0.680732 |
735def383951f64cf0a628766d4dcb1c6896613a | 1,390 | py | Python | array/validsquare.py | mengyangbai/leetcode | e7a6906ecc5bce665dec5d0f057b302a64d50f40 | [
"MIT"
] | null | null | null | array/validsquare.py | mengyangbai/leetcode | e7a6906ecc5bce665dec5d0f057b302a64d50f40 | [
"MIT"
] | null | null | null | array/validsquare.py | mengyangbai/leetcode | e7a6906ecc5bce665dec5d0f057b302a64d50f40 | [
"MIT"
] | null | null | null | import collections
class BestSolution:
def validSquare(self, p1, p2, p3, p4):
"""
:type p1: List[int]
:type p2: List[int]
:type p3: List[int]
:type p4: List[int]
:rtype: bool
"""
d1=(p1[0]-p2[0])**2+(p1[1]-p2[1])**2
d2=(p2[0]-p3[0])**2+(p2[1]-p... | 29.574468 | 84 | 0.441727 |
735e077847c383fdc7748ad0a97d892dea5016c0 | 1,373 | py | Python | do_aramco849_sz.py | Meso272/PyTorch-VAE | b1f80082a92c706969a63162ae083b9f7d15d9aa | [
"Apache-2.0"
] | null | null | null | do_aramco849_sz.py | Meso272/PyTorch-VAE | b1f80082a92c706969a63162ae083b9f7d15d9aa | [
"Apache-2.0"
] | null | null | null | do_aramco849_sz.py | Meso272/PyTorch-VAE | b1f80082a92c706969a63162ae083b9f7d15d9aa | [
"Apache-2.0"
] | 1 | 2022-02-11T23:22:41.000Z | 2022-02-11T23:22:41.000Z | import os
import numpy as np
datafolder="/home/jliu447/lossycompression/aramco_849"
ebs=[i*1e-4 for i in range(1,10)]+[i*1e-3 for i in range(1,10)]+[i*1e-2 for i in range(1,11)]
idxlist=range(1400,1700,50)
cr=np.zeros((29,len(idxlist)+1),dtype=np.float32)
psnr=np.zeros((29,len(idxlist)+1),dtype=np.float32)
for i,eb... | 32.690476 | 95 | 0.566642 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.