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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6289106ac09f170e1ac2aabf28b3690d5395b0b5 | 4,965 | py | Python | protonets/models/few_shot_quantum.py | sss441803/QFSL | ddf4508d25e7ccb3e5a036746fcf4ddf546d63f8 | [
"MIT"
] | null | null | null | protonets/models/few_shot_quantum.py | sss441803/QFSL | ddf4508d25e7ccb3e5a036746fcf4ddf546d63f8 | [
"MIT"
] | null | null | null | protonets/models/few_shot_quantum.py | sss441803/QFSL | ddf4508d25e7ccb3e5a036746fcf4ddf546d63f8 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
import torch
from torch import nn
from .Metric_Learning import MetricLearning
from qtensor_ai import TamakiOptimizer
from protonets.models import register_model
from .utils import euclidean_dist
class Protonet(nn.... | 33.547297 | 131 | 0.604632 |
62891211991f2f4c0163e5edd0bb6af1af0d794d | 14,671 | py | Python | gammapy/modeling/models/tests/test_spatial.py | isu-veritas/gammapy | 715b041d7d3925bd51109dc9534634263a2f2d12 | [
"BSD-3-Clause"
] | null | null | null | gammapy/modeling/models/tests/test_spatial.py | isu-veritas/gammapy | 715b041d7d3925bd51109dc9534634263a2f2d12 | [
"BSD-3-Clause"
] | null | null | null | gammapy/modeling/models/tests/test_spatial.py | isu-veritas/gammapy | 715b041d7d3925bd51109dc9534634263a2f2d12 | [
"BSD-3-Clause"
] | null | null | null | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import pytest
import numpy as np
from numpy.testing import assert_allclose
import astropy.units as u
from astropy.coordinates import SkyCoord
from astropy.wcs import WCS
from regions import (
CircleAnnulusSkyRegion,
CircleSkyRegion,
EllipseSkyR... | 32.529933 | 101 | 0.662259 |
628917667b294f350f9f3345c23e0193b6fd0777 | 3,626 | py | Python | optim/adamax.py | luffy06/BNAF | da43f564aa335a5a32922118316c70bb5c3d861c | [
"MIT"
] | 156 | 2019-04-10T06:38:35.000Z | 2022-03-30T20:32:45.000Z | optim/adamax.py | luffy06/BNAF | da43f564aa335a5a32922118316c70bb5c3d861c | [
"MIT"
] | 4 | 2019-06-13T19:37:00.000Z | 2020-10-23T07:06:48.000Z | optim/adamax.py | luffy06/BNAF | da43f564aa335a5a32922118316c70bb5c3d861c | [
"MIT"
] | 32 | 2019-04-10T15:34:56.000Z | 2022-02-10T01:37:38.000Z | import torch
class Adamax(torch.optim.Optimizer):
def __init__(
self, params, lr=2e-3, betas=(0.9, 0.999), eps=1e-8, weight_decay=0, polyak=0
):
if not 0.0 <= lr:
raise ValueError("Invalid learning rate: {}".format(lr))
if not 0.0 <= eps:
raise ValueError("Inval... | 36.626263 | 114 | 0.5 |
6289185747058d4f1e9e56a9296643c78c70a3af | 2,491 | py | Python | sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_generated/v7_3/_configuration.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-02-01T18:50:12.000Z | 2022-02-01T18:50:12.000Z | sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_generated/v7_3/_configuration.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_generated/v7_3/_configuration.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 ... | 42.948276 | 108 | 0.670413 |
628945b9dbc173237f8fe3615ecbb43b738ff914 | 11,088 | py | Python | O365/utils/token.py | riptusk331/python-o365 | 1e0da3b1019df592718115a0f08af219e7a8f061 | [
"Apache-2.0"
] | 1 | 2019-11-10T18:59:06.000Z | 2019-11-10T18:59:06.000Z | O365/utils/token.py | riptusk331/python-o365 | 1e0da3b1019df592718115a0f08af219e7a8f061 | [
"Apache-2.0"
] | 2 | 2019-11-11T16:43:00.000Z | 2019-11-12T03:56:52.000Z | O365/utils/token.py | riptusk331/python-o365 | 1e0da3b1019df592718115a0f08af219e7a8f061 | [
"Apache-2.0"
] | null | null | null | import logging
import json
import datetime as dt
from pathlib import Path
from abc import ABC, abstractmethod
log = logging.getLogger(__name__)
EXPIRES_ON_THRESHOLD = 1 * 60 # 1 minute
class Token(dict):
""" A dict subclass with extra methods to resemble a token """
@property
def is_long_lived(self):... | 34.758621 | 99 | 0.614538 |
6289487f3804a247eccf4abe67f7479d3ccc2f12 | 2,873 | py | Python | src/vocabulary.py | abid58/Neural-Image-Captioning | 6f86f4a9de9af4de45f4963486f8855af982cb98 | [
"MIT"
] | 1 | 2020-05-10T21:13:09.000Z | 2020-05-10T21:13:09.000Z | src/vocabulary.py | abid58/Neural-Image-Captioning | 6f86f4a9de9af4de45f4963486f8855af982cb98 | [
"MIT"
] | null | null | null | src/vocabulary.py | abid58/Neural-Image-Captioning | 6f86f4a9de9af4de45f4963486f8855af982cb98 | [
"MIT"
] | null | null | null |
""" This file generates the vocabulary for captions of a specific datset"""
# Reference: <https://github.com/yunjey/pytorch-tutorial/blob/master/tutorials/03-advanced/image_captioning/build_vocab.py
class Vocabulary(object):
"""Simple vocabulary wrapper."""
def __init__(self):
self.word2idx = {}
... | 31.922222 | 122 | 0.630352 |
628956d2d28ec07d740c889c3627773cf63f2408 | 207,511 | py | Python | sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2020_11_01_preview/models/_models_py3.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2020_11_01_preview/models/_models_py3.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2020_11_01_preview/models/_models_py3.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 ... | 41.12386 | 152 | 0.663362 |
628983fd206d60397c7784b8cfb67e6149b8cd0c | 1,456 | py | Python | vespene/config/workers.py | webknjaz/vespene | 32e82ce37db33a106c0c58d50762f24a7c90bc2f | [
"Apache-2.0"
] | 1 | 2019-01-26T12:05:45.000Z | 2019-01-26T12:05:45.000Z | vespene/config/workers.py | webknjaz/vespene | 32e82ce37db33a106c0c58d50762f24a7c90bc2f | [
"Apache-2.0"
] | 92 | 2019-06-03T18:52:41.000Z | 2021-04-12T12:24:31.000Z | vespene/config/workers.py | webknjaz/vespene | 32e82ce37db33a106c0c58d50762f24a7c90bc2f | [
"Apache-2.0"
] | null | null | null | # Copyright 2018, Michael DeHaan LLC
# License: Apache License Version 2.0 + Commons Clause
# ---------------------------------------------------------------------------
# workers.py - configuration related to worker setup. This file *CAN* be
# different per worker.
# ------------------------------------------------... | 41.6 | 86 | 0.643544 |
62899b94dae685e731b04499588952de96a42d97 | 4,070 | py | Python | openapi_client/models/active_period.py | hypostulate/mbta-api-client | f18903b6269c523c733a31574ff4579349fed3f8 | [
"MIT"
] | null | null | null | openapi_client/models/active_period.py | hypostulate/mbta-api-client | f18903b6269c523c733a31574ff4579349fed3f8 | [
"MIT"
] | null | null | null | openapi_client/models/active_period.py | hypostulate/mbta-api-client | f18903b6269c523c733a31574ff4579349fed3f8 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
MBTA
MBTA service API. https://www.mbta.com Source code: https://github.com/mbta/api # noqa: E501
The version of the OpenAPI document: 3.0
Contact: developer@mbta.com
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
from op... | 26.776316 | 97 | 0.561425 |
6289b808ea1f020e64d64e269ee9b1917122f0bd | 7,240 | py | Python | homeworkmanager.py | molguin92/MoulinetteBackend | b742da52f4613d457bcdf718a305976c20b62711 | [
"BSD-3-Clause"
] | null | null | null | homeworkmanager.py | molguin92/MoulinetteBackend | b742da52f4613d457bcdf718a305976c20b62711 | [
"BSD-3-Clause"
] | null | null | null | homeworkmanager.py | molguin92/MoulinetteBackend | b742da52f4613d457bcdf718a305976c20b62711 | [
"BSD-3-Clause"
] | null | null | null | import sys
import click
from moulinette import hwserializer, itemserializer, testserializer
from moulinette.homework.models import *
from moulinette.stats_and_logs.models import RequestLog
def startup():
value = click.prompt(
'Please select an action:\n'
'1. Create a homework assignment.\n'
... | 29.917355 | 78 | 0.595442 |
6289ce5b053279221adb8f9c96749aabbcc29088 | 2,888 | py | Python | python/trees/tests/test_trees.py | RoaaMustafa/data-structures-and-algorithms | 3a756dd5b3feae338eaac28e9229bc37ad6013e2 | [
"MIT"
] | null | null | null | python/trees/tests/test_trees.py | RoaaMustafa/data-structures-and-algorithms | 3a756dd5b3feae338eaac28e9229bc37ad6013e2 | [
"MIT"
] | 2 | 2021-08-06T13:44:01.000Z | 2021-08-07T10:18:07.000Z | python/trees/tests/test_trees.py | RoaaMustafa/data-structures-and-algorithms | 3a756dd5b3feae338eaac28e9229bc37ad6013e2 | [
"MIT"
] | 1 | 2021-12-06T22:12:31.000Z | 2021-12-06T22:12:31.000Z | from trees import __version__
from trees.binary_tree import *
def test_version():
assert __version__ == '0.1.0'
@pytest.fixture
def data():
root = Node("A")
root.left = Node("B")
root.left.left = Node("D")
root.left.right = Node("E")
root.right = Node("C")
root.right.left = Node("F")
... | 20.055556 | 65 | 0.61669 |
628a04c631039207915909e023b1edd664b19e87 | 51 | py | Python | nlproar/explain/__init__.py | AndreasMadsen/nlp-roar-interpretability | ad30f756cd744dfb05d1b57de744c5ff60d9f20c | [
"MIT"
] | 17 | 2021-11-04T02:15:30.000Z | 2021-12-26T16:31:27.000Z | nlproar/explain/__init__.py | AndreasMadsen/nlp-roar-interpretability | ad30f756cd744dfb05d1b57de744c5ff60d9f20c | [
"MIT"
] | null | null | null | nlproar/explain/__init__.py | AndreasMadsen/nlp-roar-interpretability | ad30f756cd744dfb05d1b57de744c5ff60d9f20c | [
"MIT"
] | 1 | 2021-11-04T10:45:25.000Z | 2021-11-04T10:45:25.000Z |
from .importance_measure import ImportanceMeasure
| 17 | 49 | 0.882353 |
628a22365745d1fedc90fdf65281111ce16b88e4 | 1,371 | py | Python | src/test/tests/simulation/multiblock.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/test/tests/simulation/multiblock.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/simulation/multiblock.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: multiblock.py
#
# Tests: libsim - connecting to simulation and retrieving data from it.
# mesh - 2D structured mesh.
# scalars
# domain boundaries
#
# Progr... | 24.482143 | 78 | 0.582786 |
628a3ff7b73db2527f7c3ad22650d8c85478775a | 2,129 | py | Python | test/language/enumeration_types/python/UInt64EnumTest.py | PeachOS/zserio | ea01f6906c125a6baab7e8ed865eeb08cd46c37c | [
"BSD-3-Clause"
] | null | null | null | test/language/enumeration_types/python/UInt64EnumTest.py | PeachOS/zserio | ea01f6906c125a6baab7e8ed865eeb08cd46c37c | [
"BSD-3-Clause"
] | null | null | null | test/language/enumeration_types/python/UInt64EnumTest.py | PeachOS/zserio | ea01f6906c125a6baab7e8ed865eeb08cd46c37c | [
"BSD-3-Clause"
] | null | null | null | import unittest
import zserio
from testutils import getZserioApi
class UInt64EnumTest(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.api = getZserioApi(__file__, "enumeration_types.zs").uint64_enum
def testValues(self):
self.assertEqual(NONE_VALUE, self.api.DarkColor.NONE.valu... | 41.745098 | 102 | 0.747299 |
628a44a73bec65d4285e4843f7807efee7e84be8 | 7,384 | py | Python | src/rayoptics/raytr/waveabr.py | JakeWags/ray-optics | c64baf0a77df249477ec5b54265a1cd16b3cbb7a | [
"BSD-3-Clause"
] | null | null | null | src/rayoptics/raytr/waveabr.py | JakeWags/ray-optics | c64baf0a77df249477ec5b54265a1cd16b3cbb7a | [
"BSD-3-Clause"
] | null | null | null | src/rayoptics/raytr/waveabr.py | JakeWags/ray-optics | c64baf0a77df249477ec5b54265a1cd16b3cbb7a | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright © 2022 Michael J. Hayford
"""Wavefront aberration calculations
Functions for setting up and calculating wavefront aberrations for
(fld, wvl, foc), including focus and image shift.
.. Created on Thu Mar 31 22:28:44 2022
.. codeauthor: Michael J. Hayfor... | 34.02765 | 84 | 0.64247 |
628a4ae92e438f0288a13d3f124777de26271c14 | 4,912 | py | Python | configs/recognition/swin/swin_small_patch244_window877_kinetics400_pretrained_charades.py | visaVita/mmaction2 | 2d7107a2d79b990b7facd3d6f7ac0b6ad974c153 | [
"Apache-2.0"
] | null | null | null | configs/recognition/swin/swin_small_patch244_window877_kinetics400_pretrained_charades.py | visaVita/mmaction2 | 2d7107a2d79b990b7facd3d6f7ac0b6ad974c153 | [
"Apache-2.0"
] | null | null | null | configs/recognition/swin/swin_small_patch244_window877_kinetics400_pretrained_charades.py | visaVita/mmaction2 | 2d7107a2d79b990b7facd3d6f7ac0b6ad974c153 | [
"Apache-2.0"
] | null | null | null | model=dict(
type='Recognizer3D',
backbone=dict(
type='SwinTransformer3D',
patch_size=(2,4,4),
embed_dim=96,
depths=[2, 2, 18, 2],
num_heads=[3, 6, 12, 24],
window_size=(8,7,7),
mlp_ratio=4.,
qkv_bias=True,
qk_scale=None,
drop_rate=0... | 30.7 | 101 | 0.625611 |
628a61ed2e61749e8d01e2f4c71b9822b2d6aaec | 18,189 | py | Python | mindspore/dataset/core/config.py | LaiYongqiang/mindspore | 1b7a38ccd86b55af50a0ea55c7f2f43813ed3e0e | [
"Apache-2.0"
] | 1 | 2021-11-19T14:21:45.000Z | 2021-11-19T14:21:45.000Z | mindspore/dataset/core/config.py | LaiYongqiang/mindspore | 1b7a38ccd86b55af50a0ea55c7f2f43813ed3e0e | [
"Apache-2.0"
] | null | null | null | mindspore/dataset/core/config.py | LaiYongqiang/mindspore | 1b7a38ccd86b55af50a0ea55c7f2f43813ed3e0e | [
"Apache-2.0"
] | null | null | null | # Copyright 2019-2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agre... | 35.805118 | 115 | 0.686459 |
628acf3adb0cc33d46ed6e9c62d61f24a642b372 | 1,800 | py | Python | tests/test_unparser.py | yuagnun/HauntedTweet | 04b31ac23cb52e68aa60f7d22e5ae0da96c35646 | [
"MIT"
] | 2 | 2020-01-28T07:45:40.000Z | 2020-02-22T11:41:02.000Z | tests/test_unparser.py | Sidus-smg/HauntedTweet | 04b31ac23cb52e68aa60f7d22e5ae0da96c35646 | [
"MIT"
] | 4 | 2019-09-29T06:59:58.000Z | 2019-11-26T15:01:39.000Z | tests/test_unparser.py | yuagnun/HauntedTweet | 04b31ac23cb52e68aa60f7d22e5ae0da96c35646 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import unittest
import os
import sys
from generator.unparser import Unparser
class UnparserTest(unittest.TestCase):
def test_Unparser_stats(self):
filename = "test_unparser.txt"
data = [ "('<go>', 'Token') ('<go>', 'Token') ('하루', 'Noun') ('라도', 'Josa') ('전', 'Noun') ('에', 'Jo... | 66.666667 | 421 | 0.468333 |
628b32983969d93c4bc9cfa0b3f682aa7036bd9f | 4,105 | py | Python | chemspacedim/notebooks/PJ2019/case12w.py | npricejones/chemspacedim | 47d63d9e14200c0acf68f8e48c24326ed6d80662 | [
"MIT"
] | null | null | null | chemspacedim/notebooks/PJ2019/case12w.py | npricejones/chemspacedim | 47d63d9e14200c0acf68f8e48c24326ed6d80662 | [
"MIT"
] | null | null | null | chemspacedim/notebooks/PJ2019/case12w.py | npricejones/chemspacedim | 47d63d9e14200c0acf68f8e48c24326ed6d80662 | [
"MIT"
] | null | null | null | from case_template import *
# run parameters
nstars = 5e4 # number of stars
sample= 'allStar_chemscrub_teffcut_dr14.npy'#'red_giant_teffcut_dr14.npy' # APOGEE sample to draw from
abundancefac = 1... | 60.367647 | 152 | 0.684531 |
628b3c844100384ab80efcd9c47a7fda3b873f16 | 829 | py | Python | data/transcoder_evaluation_gfg/python/MODULAR_EXPONENTIATION_POWER_IN_MODULAR_ARITHMETIC.py | mxl1n/CodeGen | e5101dd5c5e9c3720c70c80f78b18f13e118335a | [
"MIT"
] | 241 | 2021-07-20T08:35:20.000Z | 2022-03-31T02:39:08.000Z | data/transcoder_evaluation_gfg/python/MODULAR_EXPONENTIATION_POWER_IN_MODULAR_ARITHMETIC.py | mxl1n/CodeGen | e5101dd5c5e9c3720c70c80f78b18f13e118335a | [
"MIT"
] | 49 | 2021-07-22T23:18:42.000Z | 2022-03-24T09:15:26.000Z | data/transcoder_evaluation_gfg/python/MODULAR_EXPONENTIATION_POWER_IN_MODULAR_ARITHMETIC.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 ( x , y , p ) :
res = 1
x = x % p
while ( y > 0 ) :
if ( ( y & 1 ) == 1 ) :
res = ( r... | 22.405405 | 64 | 0.495778 |
628b4116ebd3ab43ca35cd11b53d299fb862b483 | 1,836 | py | Python | tests/test_game_elements.py | osmith93/str8ts | 41e7942bdd1c3c58c81f3a9b5109a8486eb48dae | [
"MIT"
] | null | null | null | tests/test_game_elements.py | osmith93/str8ts | 41e7942bdd1c3c58c81f3a9b5109a8486eb48dae | [
"MIT"
] | null | null | null | tests/test_game_elements.py | osmith93/str8ts | 41e7942bdd1c3c58c81f3a9b5109a8486eb48dae | [
"MIT"
] | null | null | null | import pytest
from board import Cell, Board
@pytest.fixture
def box():
new_box = Cell((5, 5), False, 9, Cell.EMPTY)
return new_box
class TestBox:
@staticmethod
def test_init():
box = Cell((5, 5), False, 9, Cell.EMPTY)
assert box.guesses == [1, 2, 3, 4, 5, 6, 7, 8, 9]
assert b... | 26.608696 | 69 | 0.596405 |
628b44747c3c32c1cd2896764d14545f5b8ee0aa | 3,530 | py | Python | utils/magic_module_schema/resource.py | zengchen1024/developing_util | 071ab31b3946eea0e1c982dc5f8b9a3e5231a5f9 | [
"Apache-2.0"
] | null | null | null | utils/magic_module_schema/resource.py | zengchen1024/developing_util | 071ab31b3946eea0e1c982dc5f8b9a3e5231a5f9 | [
"Apache-2.0"
] | null | null | null | utils/magic_module_schema/resource.py | zengchen1024/developing_util | 071ab31b3946eea0e1c982dc5f8b9a3e5231a5f9 | [
"Apache-2.0"
] | 1 | 2018-09-28T01:52:15.000Z | 2018-09-28T01:52:15.000Z | import pystache
import re
from custom_config import custom_config
from resource_api import build_resource_api_info
from resource_parameters import build_resource_params
from utils import build_path
def build_resource_config(api_yaml, all_models, tag_info, custom_configs):
api_info = build_resource_api_info(
... | 32.685185 | 79 | 0.587252 |
628b851f5206b85a699024b5b9e8d02be039884f | 1,426 | py | Python | rl_baseline/tester.py | mit-acl/dc2g | 6f739e191c51acd5fb4ecb50609e1c26a10782fd | [
"MIT"
] | 11 | 2019-08-28T04:09:38.000Z | 2022-02-27T16:04:06.000Z | rl_baseline/tester.py | mit-acl/dc2g | 6f739e191c51acd5fb4ecb50609e1c26a10782fd | [
"MIT"
] | null | null | null | rl_baseline/tester.py | mit-acl/dc2g | 6f739e191c51acd5fb4ecb50609e1c26a10782fd | [
"MIT"
] | 3 | 2020-07-08T15:11:02.000Z | 2020-10-23T07:17:00.000Z | from misc.utils import preprocess_obs
total_eps = 0
def eval_progress(env, agent, n_eval, log, tb_writer, args):
global total_eps
eval_reward = 0.
ep_timesteps = 0.
for i_eval in range(n_eval):
obs = env.reset()
obs = preprocess_obs(obs)
while True:
env.render()... | 26.90566 | 96 | 0.617812 |
628bbe4166da42cfc532f0429c2c209b9a5a7954 | 8,587 | py | Python | pollination_sdk/models/dag_generic_output.py | pollination/python-sdk | 599e8dbfc6e547c5e18aa903b27c70d7ffef84e5 | [
"RSA-MD"
] | 2 | 2020-01-30T23:28:59.000Z | 2020-05-06T16:43:47.000Z | pollination_sdk/models/dag_generic_output.py | pollination/python-sdk | 599e8dbfc6e547c5e18aa903b27c70d7ffef84e5 | [
"RSA-MD"
] | 1 | 2020-10-02T18:00:25.000Z | 2020-10-02T18:00:25.000Z | pollination_sdk/models/dag_generic_output.py | pollination/python-sdk | 599e8dbfc6e547c5e18aa903b27c70d7ffef84e5 | [
"RSA-MD"
] | null | null | null | # coding: utf-8
"""
pollination-server
Pollination Server OpenAPI Definition # noqa: E501
The version of the OpenAPI document: 0.16.0
Contact: info@pollination.cloud
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
from pollination_sdk.configu... | 32.403774 | 254 | 0.626528 |
628c144707ac01bee308aa5d1bffda3f77572254 | 8,228 | py | Python | pector/vec3.py | defgsus/pector | 8ac7a42030c6502b25b34133f3972ff109e34ccc | [
"MIT"
] | null | null | null | pector/vec3.py | defgsus/pector | 8ac7a42030c6502b25b34133f3972ff109e34ccc | [
"MIT"
] | null | null | null | pector/vec3.py | defgsus/pector | 8ac7a42030c6502b25b34133f3972ff109e34ccc | [
"MIT"
] | null | null | null | import math
from . import tools, const
from .vec_base import vec_base
class vec3(vec_base):
"""
Class vec3 implementation.
It behaves like a list of floats of length 3
Arguments to member functions can be any list-like objects,
containing float-convertible elements,
typically of length 3 as w... | 31.166667 | 120 | 0.509115 |
628c2d0e0b7dbfddd2c60caef66ac2ea93f2ab6a | 3,159 | py | Python | geojsonvalidation/tests/nosetests.py | om-henners/GeoJSON_Validation | ef3ce38502861bda7b79131fa4a8c9467a897343 | [
"Apache-2.0"
] | 4 | 2016-02-08T09:57:33.000Z | 2021-04-27T07:05:28.000Z | geojsonvalidation/tests/nosetests.py | om-henners/GeoJSON_Validation | ef3ce38502861bda7b79131fa4a8c9467a897343 | [
"Apache-2.0"
] | null | null | null | geojsonvalidation/tests/nosetests.py | om-henners/GeoJSON_Validation | ef3ce38502861bda7b79131fa4a8c9467a897343 | [
"Apache-2.0"
] | null | null | null | #! /usr/bin/env python
# -*- coding: utf-8 -*-
"""
Basic test classes for testing the geojson validator
"""
import os.path
from glob import glob
from itertools import chain
try:
import simplejson as json
except ImportError:
import json
import nose
from jsonschema import ValidationError
import geojsonvalidatio... | 26.546218 | 109 | 0.644824 |
628c39bc1a05ca2fbac61787e96f3877c2e457e7 | 3,591 | py | Python | powerline/bindings/ipython/pre_0_11.py | zhaocai/powerline | 8aae1145835b4b2a71f1ed71b81d490e2907bd39 | [
"MIT"
] | 19 | 2015-09-01T20:49:16.000Z | 2022-01-08T22:13:23.000Z | powerline/bindings/ipython/pre_0_11.py | zhaocai/powerline | 8aae1145835b4b2a71f1ed71b81d490e2907bd39 | [
"MIT"
] | null | null | null | powerline/bindings/ipython/pre_0_11.py | zhaocai/powerline | 8aae1145835b4b2a71f1ed71b81d490e2907bd39 | [
"MIT"
] | 6 | 2019-04-25T03:42:35.000Z | 2020-06-05T15:25:23.000Z | # vim:fileencoding=utf-8:noet
from powerline.ipython import IpythonPowerline
from IPython.Prompts import BasePrompt
from IPython.ipapi import get as get_ipython
from IPython.ipapi import TryNext
import re
def string(s):
if type(s) is not str:
return s.encode('utf-8')
else:
return s
# HACK: ipython tries to o... | 26.404412 | 138 | 0.750766 |
628c3eeb0b4896bde77ecfb61aaa99e6e48d60fb | 6,184 | py | Python | collective/ckeditor/browser/vocabularies.py | vindula/collective.ckeditor | 43129d98c77fa567fca4ffc0ce4a911f47b721d0 | [
"ZPL-1.1"
] | null | null | null | collective/ckeditor/browser/vocabularies.py | vindula/collective.ckeditor | 43129d98c77fa567fca4ffc0ce4a911f47b721d0 | [
"ZPL-1.1"
] | null | null | null | collective/ckeditor/browser/vocabularies.py | vindula/collective.ckeditor | 43129d98c77fa567fca4ffc0ce4a911f47b721d0 | [
"ZPL-1.1"
] | null | null | null | # -*- coding: utf-8 -*-
""" Vocabularies used by control panel or widget
"""
try:
from zope.schema.interfaces import IVocabularyFactory
except ImportError:
from zope.app.schema.vocabulary import IVocabularyFactory
from zope.interface import implements
from zope.schema.vocabulary import SimpleVocabulary
from ... | 36.163743 | 78 | 0.661708 |
628c51cfc9041589b28708fec08cd99eaba85b18 | 731 | py | Python | configs/selfsup/simsiam_kd/simsiamkd_resnet18_8xb32-coslr-200e_in30p.py | dungdinhanh/mmselfsup | 67fc764f4f5512701f93e8e1fa39e09ee008a54a | [
"Apache-2.0"
] | null | null | null | configs/selfsup/simsiam_kd/simsiamkd_resnet18_8xb32-coslr-200e_in30p.py | dungdinhanh/mmselfsup | 67fc764f4f5512701f93e8e1fa39e09ee008a54a | [
"Apache-2.0"
] | null | null | null | configs/selfsup/simsiam_kd/simsiamkd_resnet18_8xb32-coslr-200e_in30p.py | dungdinhanh/mmselfsup | 67fc764f4f5512701f93e8e1fa39e09ee008a54a | [
"Apache-2.0"
] | 1 | 2022-03-15T11:31:48.000Z | 2022-03-15T11:31:48.000Z | _base_ = [
'../_base_/models/resnet18_simsiam_kd.py',
'../_base_/datasets/imagenet30p_mocov2_b32_cluster.py',
'../_base_/schedules/sgd_coslr-200e_in30p_kd.py',
'../_base_/default_runtime.py',
]
# set base learning rate
lr = 0.05
# additional hooks
custom_hooks = [
dict(type='SimSiamHook', priority... | 30.458333 | 75 | 0.73461 |
628c5948df5b128c406c6c3fc103fe569cdda20d | 6,500 | py | Python | marble/representation.py | carnby/marble | 00992e630d391052d2803f54ff7ecb52cc2e2110 | [
"BSD-3-Clause"
] | null | null | null | marble/representation.py | carnby/marble | 00992e630d391052d2803f54ff7ecb52cc2e2110 | [
"BSD-3-Clause"
] | null | null | null | marble/representation.py | carnby/marble | 00992e630d391052d2803f54ff7ecb52cc2e2110 | [
"BSD-3-Clause"
] | 1 | 2019-10-29T20:57:32.000Z | 2019-10-29T20:57:32.000Z | # -*- coding: utf-8 -*-
"""representation.py
Compute the representation of the different populations in the areal units
provided as an input.
See [Louf:2015]_ for the definition of the different quantities
"""
from __future__ import division
import marble as mb
from .common import (regroup_per_class,
... | 31.25 | 78 | 0.623077 |
628c68a8fd3924eec0a0e45cc09f425eb5a51649 | 234 | py | Python | youchoose/data/ingestion/graph.py | csmithchicago/analyze_instacart_data | c2040ad1f0ceba468667ea952e2a617fd7355473 | [
"MIT"
] | 1 | 2021-03-19T22:13:43.000Z | 2021-03-19T22:13:43.000Z | youchoose/data/ingestion/graph.py | csmithchicago/YouChoose | c2040ad1f0ceba468667ea952e2a617fd7355473 | [
"MIT"
] | 218 | 2019-07-03T03:14:35.000Z | 2022-03-31T14:48:06.000Z | youchoose/data/ingestion/graph.py | csmithchicago/analyze_instacart_data | c2040ad1f0ceba468667ea952e2a617fd7355473 | [
"MIT"
] | 1 | 2022-02-28T02:51:42.000Z | 2022-02-28T02:51:42.000Z | # Copyright (c) 2019, Corey Smith
# Distributed under the MIT License.
# See LICENCE file in root directory for full terms.
"""
Library for reading and writting data in graph structures to flat files or graph
databases (Neo4j).
"""
| 29.25 | 81 | 0.747863 |
628ca5252b10e77a357765f268e6cc86b161f668 | 1,971 | py | Python | tests/algo_test.py | dabane-ghassan/dnazip | 08ea951782fb3d4bfe50adc23485c88c7f0a6f10 | [
"MIT"
] | 5 | 2021-03-16T08:16:53.000Z | 2022-01-12T22:38:25.000Z | tests/algo_test.py | dabane-ghassan/dnazip | 08ea951782fb3d4bfe50adc23485c88c7f0a6f10 | [
"MIT"
] | 1 | 2022-03-28T01:45:12.000Z | 2022-03-28T01:45:12.000Z | tests/algo_test.py | dabane-ghassan/dnazip | 08ea951782fb3d4bfe50adc23485c88c7f0a6f10 | [
"MIT"
] | 2 | 2021-03-16T23:03:54.000Z | 2022-02-15T00:45:16.000Z | # coding: utf-8
"""Unitary test for the algorithms.
@author: Ghassan Dabane
"""
from __future__ import absolute_import
import unittest
import sys
sys.path.append('../')
from src.burros_wheeler import BurrosWheeler
from src.huffman import HuffmanTree
class AlgorithmsTest(unittest.TestCase):
"""Test class to try ou... | 31.790323 | 71 | 0.669711 |
628cbd24cdc5c7749477f23f92f282df39767dca | 405 | py | Python | vespene/migrations/0006_auto_20181105_2044.py | webknjaz/vespene | 32e82ce37db33a106c0c58d50762f24a7c90bc2f | [
"Apache-2.0"
] | 680 | 2018-10-29T12:12:10.000Z | 2019-04-27T09:52:58.000Z | vespene/migrations/0006_auto_20181105_2044.py | webknjaz/vespene | 32e82ce37db33a106c0c58d50762f24a7c90bc2f | [
"Apache-2.0"
] | 110 | 2018-10-29T12:33:34.000Z | 2019-02-14T02:31:43.000Z | vespene/migrations/0006_auto_20181105_2044.py | webknjaz/vespene | 32e82ce37db33a106c0c58d50762f24a7c90bc2f | [
"Apache-2.0"
] | 92 | 2018-10-29T12:21:12.000Z | 2019-06-08T11:08:08.000Z | # Generated by Django 2.1.2 on 2018-11-05 20:44
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('vespene', '0005_auto_20181105_2042'),
]
operations = [
migrations.AlterField(
model_name='workerpool',
name='multipl... | 21.315789 | 61 | 0.607407 |
628cc85287ddb3dd5c03e451d46d1aae42e4890a | 2,798 | py | Python | utils/plotutils.py | ins-amu/SeizureSpreadOnACorticalSurface | f5bcecc1d6c382819f11c7a55bfc708167a48f33 | [
"MIT"
] | null | null | null | utils/plotutils.py | ins-amu/SeizureSpreadOnACorticalSurface | f5bcecc1d6c382819f11c7a55bfc708167a48f33 | [
"MIT"
] | null | null | null | utils/plotutils.py | ins-amu/SeizureSpreadOnACorticalSurface | f5bcecc1d6c382819f11c7a55bfc708167a48f33 | [
"MIT"
] | null | null | null | # coding=utf-8
from __future__ import unicode_literals
import itertools
import string
import matplotlib
import matplotlib.pyplot as plt
from mpl_toolkits.axes_grid1.inset_locator import inset_axes
import numpy as np
import scalebars
def add_panel_letters(fig, axes=None, fontsize=30, xpos=-0.04, ypos=1.05):
if... | 28.845361 | 93 | 0.569693 |
628cccd96107fc499d2ae7e46b99f35495657e71 | 5,917 | py | Python | sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_outbound_network_dependencies_endpoints_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_outbound_network_dependencies_endpoints_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_outbound_network_dependencies_endpoints_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 ... | 43.82963 | 217 | 0.708467 |
628cd75edaef503d1059580ee8439a925590100a | 3,224 | py | Python | jumpscale/packages/marketplace/bottle/solutions.py | threefoldtech/js-sdk | 811f783ac34a60225175bab2d806802a87b9d5c7 | [
"Apache-2.0"
] | 13 | 2020-09-02T09:05:08.000Z | 2022-03-12T02:43:24.000Z | jumpscale/packages/marketplace/bottle/solutions.py | threefoldtech/js-sdk | 811f783ac34a60225175bab2d806802a87b9d5c7 | [
"Apache-2.0"
] | 1,998 | 2020-06-15T11:46:10.000Z | 2022-03-24T22:12:41.000Z | jumpscale/packages/marketplace/bottle/solutions.py | threefoldtech/js-sdk | 811f783ac34a60225175bab2d806802a87b9d5c7 | [
"Apache-2.0"
] | 8 | 2020-09-29T06:50:35.000Z | 2021-06-14T03:30:52.000Z | from bottle import Bottle, request, HTTPResponse
from jumpscale.loader import j
from jumpscale.packages.auth.bottle.auth import login_required, get_user_info, authenticated
from jumpscale.packages.marketplace.bottle.models import UserEntry
from jumpscale.core.base import StoredFactory
app = Bottle()
@app.route("/ap... | 37.057471 | 118 | 0.701613 |
628cfa0ac332f23d496522e025fd33cc8ab13c9f | 4,506 | py | Python | src/python/covid_db_api/__init__.py | rockmind/LoveAndMarriage | 2877d6af626eff2a3134a05ab7f03c52f14fde5c | [
"Apache-2.0"
] | null | null | null | src/python/covid_db_api/__init__.py | rockmind/LoveAndMarriage | 2877d6af626eff2a3134a05ab7f03c52f14fde5c | [
"Apache-2.0"
] | 1 | 2021-12-18T16:07:39.000Z | 2021-12-18T16:07:39.000Z | src/python/covid_db_api/__init__.py | rockmind/LoveAndMarriage | 2877d6af626eff2a3134a05ab7f03c52f14fde5c | [
"Apache-2.0"
] | null | null | null | import uvicorn
import logging
from os import getenv
from jsonrpcserver import Result, Success, method, Error
from pandas import read_json as pd_read_json
from services.base_app import get_base_rpc_app
from covid_db_service import CovidDbService
from services.log_config import config_logging
config_logging()
logger = ... | 35.480315 | 117 | 0.667332 |
628d02be3ccceb6d0359ed1ca97c23d67247acc9 | 2,697 | py | Python | src/python/pants/backend/python/lint/pyupgrade/subsystem.py | xyzst/pants | d6a357fe67ee7e8e1aefeae625e107f5609f1717 | [
"Apache-2.0"
] | null | null | null | src/python/pants/backend/python/lint/pyupgrade/subsystem.py | xyzst/pants | d6a357fe67ee7e8e1aefeae625e107f5609f1717 | [
"Apache-2.0"
] | 6 | 2022-01-25T15:49:26.000Z | 2022-02-09T11:21:13.000Z | src/python/pants/backend/python/lint/pyupgrade/subsystem.py | thejcannon/pants | 7c24f42cb78cc462b63698cef736eda7a85c40e0 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import annotations
from typing import cast
from pants.backend.python.goals import lockfile
from pants.backend.python.goals.lockfile import GeneratePythonLockfile
from pan... | 31.729412 | 100 | 0.690026 |
628d043528f4dd33feebf081be96851eec6a7189 | 755 | py | Python | main/repl.py | xieguo/sublime_db | f2a7b0e55e9f0b77b90a9aa2ea4c4f9136db1315 | [
"MIT"
] | 1 | 2019-01-21T17:37:32.000Z | 2019-01-21T17:37:32.000Z | main/repl.py | xieguo/sublime_db | f2a7b0e55e9f0b77b90a9aa2ea4c4f9136db1315 | [
"MIT"
] | null | null | null | main/repl.py | xieguo/sublime_db | f2a7b0e55e9f0b77b90a9aa2ea4c4f9136db1315 | [
"MIT"
] | null | null | null |
from sublime_db import core
from .debugger import DebugAdapterClient, DebuggerState, Variable
from .components.console_panel import ConsolePanel
@core.async
def run_repl_command(command: str, debugger: DebuggerState, console: ConsolePanel) -> core.awaitable[None]:
console.Add(command)
adapter = debugger.adapter
... | 26.034483 | 107 | 0.780132 |
628d370fbed20d6099b5d07f82f26e37d253587d | 4,258 | py | Python | fact-bounty-flask/api/crawler/controller.py | ashu8912/fact-Bounty | 9ecf86faa1829753c285424d68ac2adfd626ba1f | [
"Apache-2.0"
] | 57 | 2019-01-23T16:19:12.000Z | 2020-07-05T09:19:52.000Z | fact-bounty-flask/api/crawler/controller.py | ashu8912/fact-Bounty | 9ecf86faa1829753c285424d68ac2adfd626ba1f | [
"Apache-2.0"
] | 402 | 2019-02-09T10:41:57.000Z | 2020-07-05T06:51:29.000Z | fact-bounty-flask/api/crawler/controller.py | ashu8912/fact-Bounty | 9ecf86faa1829753c285424d68ac2adfd626ba1f | [
"Apache-2.0"
] | 173 | 2019-01-24T06:15:04.000Z | 2020-09-08T14:07:38.000Z | from flask.views import MethodView
from flask import make_response, request, jsonify, current_app
import dateutil.parser as dparser
from datetime import datetime
from .utils import cron_crawlers
class SetCronJob(MethodView):
def get(self):
try:
jobs = []
for job in current_app.sche... | 32.503817 | 79 | 0.507515 |
628d69da9ce443d719fcdd6a0e1bb6d8a354b9c7 | 754 | py | Python | deep-learning/neural_networks/tensorflow.py | ds-praveenkumar/algorithm-from-scratch | f157529f562de62103cf33a0edee78cb269577da | [
"Apache-2.0"
] | null | null | null | deep-learning/neural_networks/tensorflow.py | ds-praveenkumar/algorithm-from-scratch | f157529f562de62103cf33a0edee78cb269577da | [
"Apache-2.0"
] | null | null | null | deep-learning/neural_networks/tensorflow.py | ds-praveenkumar/algorithm-from-scratch | f157529f562de62103cf33a0edee78cb269577da | [
"Apache-2.0"
] | null | null | null | import tensorflow as tf
import numpy as np
def get_ae( n_in: int , n_out: int, dropout: float):
"""
Builds an Autoencoder
"""
x_in = tf.keras.Input( shape=n_in.shape[1])
# encoder
x = tf.keras.layers.Dense(512, activation='relu')(x_in)
x = tf.keras.layers.Dense(256, activation='relu')(... | 26.928571 | 85 | 0.643236 |
628d6ccac29c274a2a297ddd4ab133edbaa2f84f | 4,369 | py | Python | src/buildstream/exceptions.py | doraskayo/buildstream | 1c72d4342ae7df360808de22c5e49f55dbb6bec6 | [
"Apache-2.0"
] | null | null | null | src/buildstream/exceptions.py | doraskayo/buildstream | 1c72d4342ae7df360808de22c5e49f55dbb6bec6 | [
"Apache-2.0"
] | null | null | null | src/buildstream/exceptions.py | doraskayo/buildstream | 1c72d4342ae7df360808de22c5e49f55dbb6bec6 | [
"Apache-2.0"
] | null | null | null | #
# Copyright (C) 2018 Codethink Limited
#
# 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... | 27.30625 | 81 | 0.682078 |
628d7f2a8f984ca256bee17f5adcd350e0f25d8a | 2,517 | py | Python | src/pivx_hashlib.py | PIVX-Project/PET4L | 0019d21071722dad91bab39a16c766f8bb8e19ae | [
"MIT"
] | 9 | 2018-05-12T01:42:04.000Z | 2021-05-10T07:39:51.000Z | src/pivx_hashlib.py | PIVX-Project/PET4L | 0019d21071722dad91bab39a16c766f8bb8e19ae | [
"MIT"
] | 8 | 2020-01-13T18:55:05.000Z | 2021-11-15T11:10:16.000Z | src/pivx_hashlib.py | PIVX-Project/PET4L | 0019d21071722dad91bab39a16c766f8bb8e19ae | [
"MIT"
] | 7 | 2018-06-18T20:43:05.000Z | 2020-09-27T20:57:57.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2017-2019 Random.Zebra (https://github.com/random-zebra/)
# Distributed under the MIT software license, see the accompanying
# file LICENSE.txt or http://www.opensource.org/licenses/mit-license.php.
import bitcoin
import hashlib
from constants import WIF_... | 31.4625 | 113 | 0.70878 |
628dbaeec656745c5d08f4a8d80d3d7d9b870052 | 9,493 | py | Python | diffuser_cam/algorithm.py | matthewachan/DiffuserCam | 60b40234c2ef26b669b33dc1faa518aeb33848fe | [
"MIT"
] | null | null | null | diffuser_cam/algorithm.py | matthewachan/DiffuserCam | 60b40234c2ef26b669b33dc1faa518aeb33848fe | [
"MIT"
] | 3 | 2022-02-03T05:06:24.000Z | 2022-02-04T06:25:48.000Z | diffuser_cam/algorithm.py | matthewachan/DiffuserCam | 60b40234c2ef26b669b33dc1faa518aeb33848fe | [
"MIT"
] | null | null | null | """
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 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT... | 38.589431 | 239 | 0.623301 |
628dc68c1715679713ee6738744b2a4501c6eee1 | 35,483 | py | Python | Tools/Scripts/webkitpy/w3c/test_importer.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | 6 | 2021-07-05T16:09:39.000Z | 2022-03-06T22:44:42.000Z | Tools/Scripts/webkitpy/w3c/test_importer.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | 7 | 2022-03-15T13:25:39.000Z | 2022-03-15T13:25:44.000Z | Tools/Scripts/webkitpy/w3c/test_importer.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
# Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
# Copyright (C) 2015 Canon Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions ... | 52.334808 | 324 | 0.671336 |
628ddfeac118d65ef82d12772fca615d7bd48fa5 | 937 | py | Python | unit_tests/glhe/aggregation/test_agg_method_factory.py | stianchris/GLHE | 80c3eecca81ffd50d5077f87027c9441292452f5 | [
"MIT"
] | 2 | 2018-11-06T08:04:04.000Z | 2020-10-09T14:52:36.000Z | unit_tests/glhe/aggregation/test_agg_method_factory.py | stianchris/GLHE | 80c3eecca81ffd50d5077f87027c9441292452f5 | [
"MIT"
] | 68 | 2018-03-27T01:43:22.000Z | 2019-09-09T12:05:44.000Z | unit_tests/glhe/aggregation/test_agg_method_factory.py | mitchute/GLHE | 80c3eecca81ffd50d5077f87027c9441292452f5 | [
"MIT"
] | 4 | 2018-05-24T03:02:44.000Z | 2021-08-16T13:54:09.000Z | # import unittest
#
# from glhe.aggregation.dynamic import Dynamic
# from glhe.aggregation.agg_factory import make_agg_method
# from glhe.aggregation.no_agg import NoAgg
# from glhe.aggregation.static import Static
#
#
# class TestFactory(unittest.TestCase):
#
# def test_static(self):
# inputs = {'type': 's... | 32.310345 | 79 | 0.669157 |
628dfb52a4dc9a4b2b8254a3a7b70dbb219c5d07 | 21,846 | py | Python | hypothesis_gufunc/extra/xr.py | uber/hypothesis-gufunc | 65aaf717b9b57f3aa6379a836fe28dfc9b4f671b | [
"Apache-2.0"
] | 34 | 2019-08-13T18:28:15.000Z | 2021-09-12T23:41:11.000Z | hypothesis_gufunc/extra/xr.py | uber/hypothesis-gufunc | 65aaf717b9b57f3aa6379a836fe28dfc9b4f671b | [
"Apache-2.0"
] | 3 | 2019-10-10T21:22:51.000Z | 2021-06-25T08:18:14.000Z | hypothesis_gufunc/extra/xr.py | uber/hypothesis-gufunc | 65aaf717b9b57f3aa6379a836fe28dfc9b4f671b | [
"Apache-2.0"
] | 3 | 2019-09-17T19:44:36.000Z | 2021-02-10T18:16:20.000Z | # Copyright (c) 2019 Uber Technologies, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed... | 37.34359 | 121 | 0.69491 |
628e08a85f4247c7f5276900e177aa432bd198b0 | 15,446 | py | Python | twilio/rest/api/v2010/account/outgoing_caller_id.py | theDrinkMD/twibbage | c0aba60bd2df50f0a5688db4a01048ea1efd1a45 | [
"MIT"
] | 1 | 2021-02-24T04:59:03.000Z | 2021-02-24T04:59:03.000Z | twilio/rest/api/v2010/account/outgoing_caller_id.py | theDrinkMD/twibbage | c0aba60bd2df50f0a5688db4a01048ea1efd1a45 | [
"MIT"
] | null | null | null | twilio/rest/api/v2010/account/outgoing_caller_id.py | theDrinkMD/twibbage | c0aba60bd2df50f0a5688db4a01048ea1efd1a45 | [
"MIT"
] | 1 | 2018-12-09T00:53:21.000Z | 2018-12-09T00:53:21.000Z | # coding=utf-8
"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from twilio.base import deserialize
from twilio.base import values
from twilio.base.instance_context import InstanceContext
from twilio.base.instance_resource import InstanceResource
from twilio.base.... | 33.505423 | 99 | 0.628059 |
628e15ee00d7750bdfe5f2952adce65adfd4ec1b | 1,601 | py | Python | ghwht/hooks/installation.py | flyingdice/github-webhook-types | 38edff89ec3ce809a510328463a43d7bea56ae36 | [
"Apache-2.0"
] | null | null | null | ghwht/hooks/installation.py | flyingdice/github-webhook-types | 38edff89ec3ce809a510328463a43d7bea56ae36 | [
"Apache-2.0"
] | null | null | null | ghwht/hooks/installation.py | flyingdice/github-webhook-types | 38edff89ec3ce809a510328463a43d7bea56ae36 | [
"Apache-2.0"
] | null | null | null | """
ghwht/events/installation
~~~~~~~~~~~~~~~~~~~~~~~~
Contains types for the 'installation' webhook.
https://docs.github.com/en/free-pro-team@latest/developers/webhooks-and-events/webhook-events-and-payloads#installation
"""
from datetime import datetime
from typing import List, Optional
from pydant... | 23.202899 | 123 | 0.723298 |
628e398d0f5af4f12fd95a1babdeb640c1553a60 | 4,782 | py | Python | More/E01_Sketch/E01_HkpgxH110FromSketch.py | freder/PageBotExamples | eb4ced53a673b9376e8357afa9ea0795b022b13c | [
"Ruby",
"MIT"
] | 5 | 2020-06-20T22:01:23.000Z | 2021-08-06T04:39:50.000Z | More/E01_Sketch/E01_HkpgxH110FromSketch.py | freder/PageBotExamples | eb4ced53a673b9376e8357afa9ea0795b022b13c | [
"Ruby",
"MIT"
] | 5 | 2020-05-17T09:32:27.000Z | 2021-03-15T19:45:52.000Z | More/E01_Sketch/E01_HkpgxH110FromSketch.py | freder/PageBotExamples | eb4ced53a673b9376e8357afa9ea0795b022b13c | [
"Ruby",
"MIT"
] | 2 | 2021-02-25T19:07:45.000Z | 2022-01-09T21:14:06.000Z | #!/usr/bin/env python3
# -*- coding: UTF-8 -*-
# -----------------------------------------------------------------------------
#
# P A G E B O T E X A M P L E S
#
# Copyright (c) 2017 Thom Janssen <https://github.com/thomgb>
# www.pagebot.io
# Licensed under MIT conditions
#
# Supporting DrawBot, w... | 38.564516 | 110 | 0.712045 |
628e4f33e0364241db6e6cc83e236e251a2dec7c | 1,734 | py | Python | jina/types/document/helper.py | Rohitpandit021/jina | f3db4d5e480375d8dc3bceda814ac1963dee76d7 | [
"Apache-2.0"
] | 4 | 2021-06-29T04:14:31.000Z | 2021-08-01T07:01:08.000Z | jina/types/document/helper.py | Rohitpandit021/jina | f3db4d5e480375d8dc3bceda814ac1963dee76d7 | [
"Apache-2.0"
] | 1 | 2021-12-25T09:06:13.000Z | 2021-12-25T09:06:13.000Z | jina/types/document/helper.py | Rohitpandit021/jina | f3db4d5e480375d8dc3bceda814ac1963dee76d7 | [
"Apache-2.0"
] | 1 | 2021-07-30T07:07:01.000Z | 2021-07-30T07:07:01.000Z | from typing import Iterable
__all__ = ['DocGroundtruthPair']
if False:
from . import Document
class DocGroundtruthPair:
"""
Helper class to expose common interface to the traversal logic of the BaseExecutable Driver.
It is important to note that it checks the matching structure of `docs` and `ground... | 36.125 | 119 | 0.686275 |
628e59fba1468219bb2dc077977aeae16d158f55 | 4,278 | py | Python | applications/timeflow/pages/demands.py | dyvenia/timesheets | 5120acd66cbeb3ce43bff5acfee4cd6b14882962 | [
"MIT"
] | 13 | 2021-09-27T14:53:15.000Z | 2022-02-15T05:48:01.000Z | applications/timeflow/pages/demands.py | dyvenia/timesheets | 5120acd66cbeb3ce43bff5acfee4cd6b14882962 | [
"MIT"
] | 45 | 2021-10-13T08:47:28.000Z | 2022-02-15T09:16:51.000Z | applications/timeflow/pages/demands.py | dyvenia/timesheets | 5120acd66cbeb3ce43bff5acfee4cd6b14882962 | [
"MIT"
] | null | null | null | from idom import html, use_state, component, event
from .utils import switch_state
from uiflow.components.input import Input, Selector2
from uiflow.components.layout import Row, Column, Container
from uiflow.components.table import SimpleTable
from uiflow.components.controls import Button
from ..data.common import ... | 26.7375 | 104 | 0.588593 |
628ea71373fb713ba7145fcf6e6b1926b470bd41 | 2,733 | py | Python | alchemist_lib/__main__.py | Dodo33/alchemist-lib | 40c2d3b48d5f46315eb09e7f572d578b7e5324b4 | [
"MIT"
] | 5 | 2018-07-11T05:38:51.000Z | 2021-12-19T03:06:51.000Z | alchemist_lib/__main__.py | Dodo33/alchemist-lib | 40c2d3b48d5f46315eb09e7f572d578b7e5324b4 | [
"MIT"
] | null | null | null | alchemist_lib/__main__.py | Dodo33/alchemist-lib | 40c2d3b48d5f46315eb09e7f572d578b7e5324b4 | [
"MIT"
] | 2 | 2019-07-12T08:51:11.000Z | 2021-09-29T22:22:46.000Z | import sys
import os
import argparse
import configparser
def main():
args = sys.argv
parser = argparse.ArgumentParser()
parser.add_argument("populate", type = str, default = "localhost", help = "Populate the database.")
parser.add_argument("-l", "--hostname", type = str, default = "localhost"... | 34.594937 | 157 | 0.626418 |
628eb41d34527f2ff9d87cc9fe5ba5e536c4441f | 871 | py | Python | atom/nucleus/python/test/test_permission_vo.py | AbhiGupta03/SDK | f3a61aae7a847f07f0c22a154ca88dc378e9d25e | [
"Apache-2.0"
] | null | null | null | atom/nucleus/python/test/test_permission_vo.py | AbhiGupta03/SDK | f3a61aae7a847f07f0c22a154ca88dc378e9d25e | [
"Apache-2.0"
] | null | null | null | atom/nucleus/python/test/test_permission_vo.py | AbhiGupta03/SDK | f3a61aae7a847f07f0c22a154ca88dc378e9d25e | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Hydrogen Nucleus API
The Hydrogen Nucleus API # noqa: E501
OpenAPI spec version: 1.9.5
Contact: info@hydrogenplatform.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import nucleus_api
from nu... | 21.243902 | 79 | 0.698048 |
628ecf5ac631cacb3eab77c5e255a9fcf97057cd | 2,734 | py | Python | tests/settings.py | d1g1tinc/drf-haystack | 7bf138948562ebcf3470954a4627dc12f6b09b96 | [
"MIT"
] | null | null | null | tests/settings.py | d1g1tinc/drf-haystack | 7bf138948562ebcf3470954a4627dc12f6b09b96 | [
"MIT"
] | null | null | null | tests/settings.py | d1g1tinc/drf-haystack | 7bf138948562ebcf3470954a4627dc12f6b09b96 | [
"MIT"
] | null | null | null | import os
BASE_DIR = os.path.abspath(os.path.join(os.path.dirname(os.path.dirname(__file__)), "tests"))
SECRET_KEY = "NOBODY expects the Spanish Inquisition!"
DEBUG = True
ALLOWED_HOSTS = ["*"]
DATABASES = {"default": {"ENGINE": "django.db.backends.sqlite3", "NAME": os.path.join(BASE_DIR, os.pardir, "test.db")}}
I... | 29.085106 | 119 | 0.619605 |
628ee6dad2ca2064a2bd5436a1ad38f66321235c | 9,315 | py | Python | configs/mvxnet/actr/dv_mvx-fpn_second_dbsamp_secfpn_adamw_2x8_80e_kitti-3d-3class_actr_dpe_cat_fade.py | rasd3/mmdet3d_actr | d1c86d54f498fca166e957d249b109645ea13627 | [
"Apache-2.0"
] | null | null | null | configs/mvxnet/actr/dv_mvx-fpn_second_dbsamp_secfpn_adamw_2x8_80e_kitti-3d-3class_actr_dpe_cat_fade.py | rasd3/mmdet3d_actr | d1c86d54f498fca166e957d249b109645ea13627 | [
"Apache-2.0"
] | null | null | null | configs/mvxnet/actr/dv_mvx-fpn_second_dbsamp_secfpn_adamw_2x8_80e_kitti-3d-3class_actr_dpe_cat_fade.py | rasd3/mmdet3d_actr | d1c86d54f498fca166e957d249b109645ea13627 | [
"Apache-2.0"
] | null | null | null | _base_ = [
'../../_base_/schedules/cosine.py', '../../_base_/default_runtime.py'
]
# model settings
voxel_size = [0.05, 0.05, 0.1]
point_cloud_range = [0, -40, -3, 70.4, 40, 1]
model = dict(
type='DynamicMVXFasterRCNN',
img_backbone=dict(
type='ResNet',
depth=50,
num_stages=4,
... | 33.872727 | 193 | 0.57971 |
628f01883a54dd2efbb1d7e6067d6dc2a3a8a4f5 | 6,563 | py | Python | deterministic_alignment.py | clemsciences/sequence_alignment | ad7148b3619a17534fc5af26156664d7b590ea35 | [
"MIT"
] | null | null | null | deterministic_alignment.py | clemsciences/sequence_alignment | ad7148b3619a17534fc5af26156664d7b590ea35 | [
"MIT"
] | null | null | null | deterministic_alignment.py | clemsciences/sequence_alignment | ad7148b3619a17534fc5af26156664d7b590ea35 | [
"MIT"
] | null | null | null | # -*-coding:utf-8-*-
"""
Algorithms implemented here are originally for the French Linux magazine.
"""
import enum
import numpy as np
__author__ = "Clément Besnier <clemsciences@aol.com>"
alphabet_adn = list('acgt')
human_alphabet = list('azertyuiopqsfghjklmwxcvbn')
class States(enum.IntEnum):
MATCHING = 0
... | 40.263804 | 114 | 0.563005 |
628f22eaccaa747a8a899a1318701d8fcc6e82c5 | 283 | py | Python | tests/megawing/papilioone/_timer.py | splhack/loam | 10b08bd622b7cfd63eabaec4729f6238e4521b30 | [
"MIT"
] | 14 | 2017-10-08T09:16:10.000Z | 2021-11-27T19:12:24.000Z | tests/megawing/papilioone/_timer.py | splhack/loam | 10b08bd622b7cfd63eabaec4729f6238e4521b30 | [
"MIT"
] | 7 | 2018-04-12T21:33:49.000Z | 2018-08-21T22:14:20.000Z | tests/megawing/papilioone/_timer.py | splhack/loam | 10b08bd622b7cfd63eabaec4729f6238e4521b30 | [
"MIT"
] | 3 | 2018-07-24T04:55:02.000Z | 2019-12-30T08:12:39.000Z | import sys
from magma import *
from mantle import *
from loam.boards.papilio import Papilio
papilio = Papilio()
papilio.Clock.on()
papilio.Timer.on()
papilio.C[8].rename('LED').output().on()
main = papilio.main()
wire( main.systimer.O[24], main.LED )
compile(sys.argv[1], main)
| 16.647059 | 40 | 0.713781 |
628f58e933c4c2b2ea7e4d359b17ad9ac28775ba | 14,236 | py | Python | losses/general_adaptive_loss/distribution.py | gvalvano/idas | e1b112c8d0cd17b2b8486435dfe9de477bca2221 | [
"Apache-2.0"
] | 29 | 2020-07-04T00:04:28.000Z | 2022-03-18T01:49:34.000Z | idas/losses/general_adaptive_loss/distribution.py | gvalvano/unet_crf_as_rnn | 31b79741b77614764dcf3d2690fe0b0fab44934d | [
"Apache-2.0"
] | 2 | 2020-10-31T14:41:02.000Z | 2021-11-21T18:16:19.000Z | losses/general_adaptive_loss/distribution.py | gvalvano/idas | e1b112c8d0cd17b2b8486435dfe9de477bca2221 | [
"Apache-2.0"
] | 7 | 2020-10-21T01:02:52.000Z | 2021-11-14T16:52:18.000Z | # coding=utf-8
# Copyright 2019 Gabriele Valvano
#
# 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... | 44.34891 | 90 | 0.67526 |
628f94eeab280bcb1cc9b3573e5c3a1265cae357 | 5,959 | py | Python | deeppavlov/deep.py | ineersa/DeepPavlov | 8200bf9a0f0b378baad4ee0eb75b59453f516004 | [
"Apache-2.0"
] | 1 | 2019-09-09T20:21:30.000Z | 2019-09-09T20:21:30.000Z | deeppavlov/deep.py | ineersa/DeepPavlov | 8200bf9a0f0b378baad4ee0eb75b59453f516004 | [
"Apache-2.0"
] | null | null | null | deeppavlov/deep.py | ineersa/DeepPavlov | 8200bf9a0f0b378baad4ee0eb75b59453f516004 | [
"Apache-2.0"
] | 1 | 2019-03-17T13:47:44.000Z | 2019-03-17T13:47:44.000Z | """
Copyright 2017 Neural Networks and Deep Learning lab, MIPT
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 a... | 45.143939 | 118 | 0.681994 |
628f9ed3d61513e6634592c82ff1412d1cbb2807 | 43 | py | Python | mvqag/data/__init__.py | VirkSaab/Medical-VQA | 6d77963cc81940fc680a18d931e0d88a3264f5fa | [
"MIT"
] | null | null | null | mvqag/data/__init__.py | VirkSaab/Medical-VQA | 6d77963cc81940fc680a18d931e0d88a3264f5fa | [
"MIT"
] | null | null | null | mvqag/data/__init__.py | VirkSaab/Medical-VQA | 6d77963cc81940fc680a18d931e0d88a3264f5fa | [
"MIT"
] | null | null | null | from .data import *
from .generate import * | 21.5 | 23 | 0.744186 |
628fa15f9f029a7f12b84935b569f540971a37d5 | 5,327 | py | Python | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/storage_account_create_parameters_py3.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/storage_account_create_parameters_py3.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/storage_account_create_parameters_py3.py | xiafu-msft/azure-sdk-for-python | 4d9560cfd519ee60667f3cc2f5295a58c18625db | [
"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 ... | 51.718447 | 286 | 0.686503 |
628fd3102f3b525a61afd1c64815c4a13a4e41e2 | 6,495 | py | Python | nvflare/app_common/homomorphic_encryption/he_model_shareable_generator.py | Can-Zhao/NVFlare | 52d9dee9972b32d49d9a8add52a652ce3bb878b5 | [
"Apache-2.0"
] | 155 | 2021-08-05T18:05:09.000Z | 2022-03-27T15:32:56.000Z | nvflare/app_common/homomorphic_encryption/he_model_shareable_generator.py | Can-Zhao/NVFlare | 52d9dee9972b32d49d9a8add52a652ce3bb878b5 | [
"Apache-2.0"
] | 216 | 2021-12-01T06:07:12.000Z | 2022-03-30T23:34:02.000Z | nvflare/app_common/homomorphic_encryption/he_model_shareable_generator.py | Can-Zhao/NVFlare | 52d9dee9972b32d49d9a8add52a652ce3bb878b5 | [
"Apache-2.0"
] | 44 | 2021-11-24T16:03:29.000Z | 2022-03-24T23:28:39.000Z | # Copyright (c) 2021-2022, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... | 42.730263 | 119 | 0.673441 |
628ff9041532aba058998678991a84a99c0aee64 | 14,422 | py | Python | openxc/generator/coder.py | hopper-maker/openxc-python | 2054c3d7a7ba09b8f0eeecc2348185857dc22f5f | [
"BSD-3-Clause"
] | 81 | 2015-01-17T04:21:55.000Z | 2022-01-12T16:54:26.000Z | openxc/generator/coder.py | hopper-maker/openxc-python | 2054c3d7a7ba09b8f0eeecc2348185857dc22f5f | [
"BSD-3-Clause"
] | 84 | 2015-01-14T20:17:44.000Z | 2020-10-19T21:46:25.000Z | openxc/generator/coder.py | hopper-maker/openxc-python | 2054c3d7a7ba09b8f0eeecc2348185857dc22f5f | [
"BSD-3-Clause"
] | 32 | 2015-03-08T14:03:53.000Z | 2022-01-04T12:21:59.000Z | """
C++ source code generator for the vehicle interface firmware.
"""
import os
import operator
import logging
from openxc.utils import find_file
LOG = logging.getLogger(__name__)
class CodeGenerator(object):
"""This class is used to build an implementation of the signals.h functions
from one or more CAN me... | 39.190217 | 123 | 0.543545 |
629043b6a3a025b3009878d0d7fb6080ea715b70 | 3,987 | py | Python | torchblocks/models/layers/attentions.py | deepframwork/TorchBlocks | 35f6e1bb83d2b9b05ba914a21fd365cb26ac4a32 | [
"MIT"
] | 1 | 2021-04-26T08:01:25.000Z | 2021-04-26T08:01:25.000Z | torchblocks/models/layers/attentions.py | deepframwork/TorchBlocks | 35f6e1bb83d2b9b05ba914a21fd365cb26ac4a32 | [
"MIT"
] | null | null | null | torchblocks/models/layers/attentions.py | deepframwork/TorchBlocks | 35f6e1bb83d2b9b05ba914a21fd365cb26ac4a32 | [
"MIT"
] | null | null | null | import math
import torch
import torch.nn as nn
class MultiHeadAttention(nn.Module):
def __init__(self, num_heads,d_model,dropout):
super().__init__()
if d_model % num_heads != 0:
raise ValueError(
"The d_model (%d) is not a multiple of the number of attention "
... | 41.968421 | 102 | 0.654126 |
62905b5cff39f078968d2ef8fd6e583c6fa251cc | 3,350 | py | Python | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2017_10_01/aio/_configuration.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2017_10_01/aio/_configuration.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2017_10_01/aio/_configuration.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 ... | 49.264706 | 181 | 0.705075 |
62905ddd3d398b6890b0308d77f04c59a6a5e531 | 69,064 | py | Python | pandas/tests/computation/test_eval.py | MaxVanDeursen/pandas | 9821b77de692716d7c2b62db1a68cac9ffc456c3 | [
"BSD-3-Clause"
] | 1 | 2019-03-25T09:31:34.000Z | 2019-03-25T09:31:34.000Z | pandas/tests/computation/test_eval.py | MaxVanDeursen/pandas | 9821b77de692716d7c2b62db1a68cac9ffc456c3 | [
"BSD-3-Clause"
] | null | null | null | pandas/tests/computation/test_eval.py | MaxVanDeursen/pandas | 9821b77de692716d7c2b62db1a68cac9ffc456c3 | [
"BSD-3-Clause"
] | null | null | null | from distutils.version import LooseVersion
from itertools import product
import operator
import warnings
import numpy as np
from numpy.random import rand, randint, randn
import pytest
from pandas.compat import reduce
from pandas.errors import PerformanceWarning
import pandas.util._test_decorators as td
from pandas.c... | 36.677642 | 79 | 0.562652 |
629062817475f52acee0323d4c4638036820d4dc | 3,278 | py | Python | d17/a1.py | nikosgraser/aoc-2020 | f6b197eca161028f3e62cebc1b8e756898d545f5 | [
"0BSD"
] | null | null | null | d17/a1.py | nikosgraser/aoc-2020 | f6b197eca161028f3e62cebc1b8e756898d545f5 | [
"0BSD"
] | null | null | null | d17/a1.py | nikosgraser/aoc-2020 | f6b197eca161028f3e62cebc1b8e756898d545f5 | [
"0BSD"
] | null | null | null | from collections import defaultdict
from itertools import product
from typing import Dict, List, Tuple
with open('input', 'r') as fd:
initial = fd.read().strip().splitlines()
class ConwaySystem:
INPUT_SPEC_ACTIVE = '#'
INPUT_SPEC_INACTIVE = '.'
STAY_ACTIVE_NEIGHBORS = [2, 3]
BECOME_ACTIVE_NEIGHBO... | 38.116279 | 97 | 0.556742 |
62908d9e89a02367a035964bdf240f5cc926a354 | 2,023 | py | Python | History/20211230-011142_76_best/eval.py | oldpaws/AI3601_RL_Final_Project_MAGAIL | 6e53d5c4ad21c9e3907e6d14b20c04b3287800cf | [
"MIT"
] | null | null | null | History/20211230-011142_76_best/eval.py | oldpaws/AI3601_RL_Final_Project_MAGAIL | 6e53d5c4ad21c9e3907e6d14b20c04b3287800cf | [
"MIT"
] | null | null | null | History/20211230-011142_76_best/eval.py | oldpaws/AI3601_RL_Final_Project_MAGAIL | 6e53d5c4ad21c9e3907e6d14b20c04b3287800cf | [
"MIT"
] | null | null | null | import pickle as pk
import os
from utils_psgail import sampling
import sys
import numpy as np
from multiagent_visual import MATrafficSimV
from smarts.env.wrappers.parallel_env import ParallelEnv
from utils_psgail import *
# {
# 'model': psgail,
# 'epoch': i_episode,
# 'rewards_log': rewards_log,
# 'ep... | 28.492958 | 88 | 0.638161 |
62908ffb505705c87a4ad848cd2c4d77279491b1 | 524 | py | Python | sunpy/time/julian.py | Naman9639/sunpy | 24c0cfbd9b03d7f9554bc86036fac2b78a5fcc56 | [
"BSD-2-Clause"
] | null | null | null | sunpy/time/julian.py | Naman9639/sunpy | 24c0cfbd9b03d7f9554bc86036fac2b78a5fcc56 | [
"BSD-2-Clause"
] | null | null | null | sunpy/time/julian.py | Naman9639/sunpy | 24c0cfbd9b03d7f9554bc86036fac2b78a5fcc56 | [
"BSD-2-Clause"
] | null | null | null | from __future__ import absolute_import
from astropy.time import Time
from sunpy.time import parse_time
__all__ = ['julian_day', 'julian_centuries']
def julian_day(t='now'):
"""
Wrap a UTC -> JD conversion from astropy.
"""
return Time(parse_time(t)).jd
def julian_centuries(t='now'):
"""Returns... | 23.818182 | 88 | 0.704198 |
6290a87d42e7c4eafb991adca1163236ef8fc40e | 6,693 | py | Python | python_modules/dagster-test/dagster_test/toys/schedules.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | python_modules/dagster-test/dagster_test/toys/schedules.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | python_modules/dagster-test/dagster_test/toys/schedules.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | import datetime
from collections import defaultdict
from dagster import (
PartitionSetDefinition,
ScheduleEvaluationContext,
daily_schedule,
hourly_schedule,
monthly_schedule,
weekly_schedule,
)
from dagster.core.storage.pipeline_run import PipelineRunStatus, RunsFilter
from dagster.utils.parti... | 31.275701 | 108 | 0.715075 |
6290ab184a599db23102b4d4afcc7372a577a83e | 577 | bzl | Python | example/third_party/commons_httpclient.bzl | wix-playground/rules_maven_third_party | ff0b486df194779d7d8e6c9102cd12138e3305c3 | [
"Apache-2.0"
] | null | null | null | example/third_party/commons_httpclient.bzl | wix-playground/rules_maven_third_party | ff0b486df194779d7d8e6c9102cd12138e3305c3 | [
"Apache-2.0"
] | null | null | null | example/third_party/commons_httpclient.bzl | wix-playground/rules_maven_third_party | ff0b486df194779d7d8e6c9102cd12138e3305c3 | [
"Apache-2.0"
] | null | null | null | load("@rules_maven_third_party//:import_external.bzl", import_external = "import_external")
def dependencies():
import_external(
name = "commons_httpclient_commons_httpclient",
artifact = "commons-httpclient:commons-httpclient:3.0",
artifact_sha256 = "7afd18f30e98c92bf873b64bafeea43b4abdeab... | 36.0625 | 93 | 0.684575 |
6290abeaa647b018e559d355a42bcf766179a960 | 5,789 | py | Python | data_structure/python/tree_binarysearch.py | yennanliu/CS_basics | 3c50c819897a572ff38179bfb0083a19b2325fde | [
"Unlicense"
] | 18 | 2019-08-01T07:45:02.000Z | 2022-03-31T18:05:44.000Z | data_structure/python/tree_binarysearch.py | yennanliu/CS_basics | 3c50c819897a572ff38179bfb0083a19b2325fde | [
"Unlicense"
] | null | null | null | data_structure/python/tree_binarysearch.py | yennanliu/CS_basics | 3c50c819897a572ff38179bfb0083a19b2325fde | [
"Unlicense"
] | 15 | 2019-12-29T08:46:20.000Z | 2022-03-08T14:14:05.000Z |
# #################################################################
# # DATA STRUCTURE & Algorithm DEMO : Binary search algorithm
# #################################################################
# # Binary search algorithm demo
# # https://github.com/yennanliu/Data-Structures-using-Python/blob/master/Trees/Bina... | 30.151042 | 118 | 0.474866 |
6290d01117adf3f586871180203c7319939d3895 | 12,369 | py | Python | onadata/apps/logger/south_migrations/0040_auto__add_field_instance_geom.py | ubpd/kobocat | 45906e07e8f05c30e3e26bab5570a8ab1ee264db | [
"BSD-2-Clause"
] | null | null | null | onadata/apps/logger/south_migrations/0040_auto__add_field_instance_geom.py | ubpd/kobocat | 45906e07e8f05c30e3e26bab5570a8ab1ee264db | [
"BSD-2-Clause"
] | null | null | null | onadata/apps/logger/south_migrations/0040_auto__add_field_instance_geom.py | ubpd/kobocat | 45906e07e8f05c30e3e26bab5570a8ab1ee264db | [
"BSD-2-Clause"
] | null | null | null | # coding: utf-8
from __future__ import unicode_literals, print_function, division, absolute_import
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Instance.geom'
db... | 76.351852 | 182 | 0.564557 |
629103f2d17ac695cbe25afd2ecebc73b75d1bd1 | 649 | py | Python | migrations/versions/caf427204e3b_add_posted.py | trevor-ngugi/Drew-Of-Lines | 83d0ea0c5d6fc292d593de394f7a12c4106941fc | [
"Unlicense"
] | null | null | null | migrations/versions/caf427204e3b_add_posted.py | trevor-ngugi/Drew-Of-Lines | 83d0ea0c5d6fc292d593de394f7a12c4106941fc | [
"Unlicense"
] | null | null | null | migrations/versions/caf427204e3b_add_posted.py | trevor-ngugi/Drew-Of-Lines | 83d0ea0c5d6fc292d593de394f7a12c4106941fc | [
"Unlicense"
] | null | null | null | """add posted
Revision ID: caf427204e3b
Revises: 5a64e235c7e2
Create Date: 2020-01-20 12:29:33.996363
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'caf427204e3b'
down_revision = '5a64e235c7e2'
branch_labels = None
depends_on = None
def upgrade():
# ##... | 22.37931 | 77 | 0.687211 |
62911690d090ccc13953f5f31f6c12a7a7eabed0 | 4,327 | py | Python | taro/jobs/process.py | PetrSixta/taro | afe0caf0e0feb6948c4cc80217b5c5d11418859b | [
"MIT"
] | null | null | null | taro/jobs/process.py | PetrSixta/taro | afe0caf0e0feb6948c4cc80217b5c5d11418859b | [
"MIT"
] | 26 | 2021-04-05T12:32:21.000Z | 2022-03-22T12:53:44.000Z | taro/jobs/process.py | PetrSixta/taro | afe0caf0e0feb6948c4cc80217b5c5d11418859b | [
"MIT"
] | 1 | 2021-04-16T21:04:53.000Z | 2021-04-16T21:04:53.000Z | import logging
import sys
import traceback
from contextlib import contextmanager
from multiprocessing import Queue
from multiprocessing.context import Process
from queue import Full
from threading import Thread
from typing import Union
from taro import ExecutionState
from taro.jobs.execution import OutputExecution, Ex... | 31.355072 | 116 | 0.626993 |
62914e3218ac8f59773b390383f98ca583616438 | 2,891 | py | Python | ros_atlas/model_processors/HandGestureProcessor.py | patrick-ubc/Huawei_HiFly_Drone | 5dae1b56f49c2b86c3b852bbc5e3a63e84ccd490 | [
"Apache-2.0"
] | 1 | 2021-09-21T23:23:59.000Z | 2021-09-21T23:23:59.000Z | ros_atlas/model_processors/HandGestureProcessor.py | patrick-ubc/Huawei_HiFly_Drone | 5dae1b56f49c2b86c3b852bbc5e3a63e84ccd490 | [
"Apache-2.0"
] | 8 | 2021-07-05T21:41:53.000Z | 2022-02-15T19:46:13.000Z | ros_atlas/model_processors/HandGestureProcessor.py | patrick-ubc/Huawei_HiFly_Drone | 5dae1b56f49c2b86c3b852bbc5e3a63e84ccd490 | [
"Apache-2.0"
] | 4 | 2021-06-11T22:47:04.000Z | 2021-07-29T19:57:13.000Z | """
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License ... | 30.755319 | 123 | 0.639225 |
629165adb21df1d58070316cd92390336e0280f2 | 151 | py | Python | seadssite/templatetags/json_tag.py | seadsystem/website | d7e8110c012d94c494895fde9951eef728266798 | [
"MIT"
] | 5 | 2016-03-20T07:07:17.000Z | 2018-04-12T16:34:12.000Z | seadssite/templatetags/json_tag.py | seadsystem/website | d7e8110c012d94c494895fde9951eef728266798 | [
"MIT"
] | 22 | 2015-11-04T23:11:41.000Z | 2016-05-19T00:08:54.000Z | seadssite/templatetags/json_tag.py | seadsystem/website | d7e8110c012d94c494895fde9951eef728266798 | [
"MIT"
] | 4 | 2015-10-29T01:46:44.000Z | 2018-04-09T22:05:28.000Z | import simplejson
from django import template
register = template.Library()
@register.filter
def dumpjson(data):
return simplejson.dumps(data)
| 13.727273 | 33 | 0.774834 |
629173dc0bbfe08f1659dd1238c31629d8ab07f3 | 1,590 | py | Python | nicos_mlz/reseda/devices/powersupply.py | mlz-ictrl/nicos | a6de0bc194ba42e3dc04a033713b41b5499ba8e1 | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 12 | 2019-11-06T15:40:36.000Z | 2022-01-01T16:23:00.000Z | nicos_mlz/reseda/devices/powersupply.py | ess-dmsc/nicos | 755d61d403ff7123f804c45fc80c7ff4d762993b | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 91 | 2020-08-18T09:20:26.000Z | 2022-02-01T11:07:14.000Z | nicos_mlz/reseda/devices/powersupply.py | mlz-ictrl/nicos | a6de0bc194ba42e3dc04a033713b41b5499ba8e1 | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 6 | 2020-01-11T10:52:30.000Z | 2022-02-25T12:35:23.000Z | # -*- coding: utf-8 -*-
# *****************************************************************************
# NICOS, the Networked Instrument Control System of the MLZ
# Copyright (c) 2009-2021 by the NICOS contributors (see AUTHORS)
#
# This program is free software; you can redistribute it and/or modify it under
# the t... | 38.780488 | 79 | 0.646541 |
6291a29c0c42f1e3424aa0fda6c4e36c8653403b | 3,743 | py | Python | em/deep_segmentation/extreme_points/SegmentationAgent.py | tecdatalab/biostructure | a30e907e83fa5bbfb934d951b7c663b622104fcc | [
"Apache-2.0"
] | null | null | null | em/deep_segmentation/extreme_points/SegmentationAgent.py | tecdatalab/biostructure | a30e907e83fa5bbfb934d951b7c663b622104fcc | [
"Apache-2.0"
] | 15 | 2019-06-17T16:13:39.000Z | 2022-02-27T05:23:59.000Z | em/deep_segmentation/extreme_points/SegmentationAgent.py | tecdatalab/biostructure | a30e907e83fa5bbfb934d951b7c663b622104fcc | [
"Apache-2.0"
] | null | null | null | import numpy as np
from torch.optim import Adam
from torch.utils.data import DataLoader
from SegmentationDataset import SegmentationDataset
from SegmentationUNet import SegmentationUNet
from CrossEntropyLoss import CrossEntropyLoss
from em.molecule import Molecule
from scipy.ndimage import zoom
import pandas as pd
... | 41.588889 | 168 | 0.6786 |
6291a59c2cf4c761b559428fd4530af022672b50 | 3,295 | py | Python | leetcode/2-medium/2-llist/3-intersect/list_intersect.py | ai7/study | be490336dc70ade62a8ff8d7866af7ac52bef4c1 | [
"MIT"
] | null | null | null | leetcode/2-medium/2-llist/3-intersect/list_intersect.py | ai7/study | be490336dc70ade62a8ff8d7866af7ac52bef4c1 | [
"MIT"
] | null | null | null | leetcode/2-medium/2-llist/3-intersect/list_intersect.py | ai7/study | be490336dc70ade62a8ff8d7866af7ac52bef4c1 | [
"MIT"
] | null | null | null | # https://leetcode.com/explore/interview/card/top-interview-questions-medium/107/linked-list/785/
# https://leetcode.com/problems/intersection-of-two-linked-lists/description/
# Intersection of Two Linked Lists
#
# Write a program to find the node at which the intersection of two
# singly linked lists begins.
import ... | 29.684685 | 97 | 0.621244 |
6291a86504563c64faf63be79467784ff65a6cfa | 2,058 | py | Python | arraycontext/metadata.py | thomasgibson/arraycontext | 93140738460531f4fe6391bdfe745912b7f9676d | [
"MIT"
] | 1 | 2021-07-28T20:50:33.000Z | 2021-07-28T20:50:33.000Z | arraycontext/metadata.py | thomasgibson/arraycontext | 93140738460531f4fe6391bdfe745912b7f9676d | [
"MIT"
] | 96 | 2021-05-05T22:11:41.000Z | 2022-03-17T03:03:25.000Z | arraycontext/metadata.py | kaushikcfd/arraycontext | 1db13f2e0f810af413022d5bbcce281bdaa3b61b | [
"MIT"
] | 7 | 2021-05-20T21:00:18.000Z | 2021-08-24T22:51:45.000Z | __copyright__ = """
Copyright (C) 2020-1 University of Illinois Board of Trustees
"""
__license__ = """
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 limit... | 35.482759 | 79 | 0.731293 |
6291ba40118e435ee54150a6edf25eebdababe67 | 691 | py | Python | Adyen/settings.py | alainburindi/adyen-python-api-library | 26c0cf27ce70e41b43c9cb46883f0d8b299aec91 | [
"MIT"
] | 43 | 2017-08-08T17:01:11.000Z | 2021-12-08T12:44:19.000Z | Adyen/settings.py | alainburindi/adyen-python-api-library | 26c0cf27ce70e41b43c9cb46883f0d8b299aec91 | [
"MIT"
] | 124 | 2017-04-12T10:17:38.000Z | 2022-03-15T11:56:18.000Z | Adyen/settings.py | alainburindi/adyen-python-api-library | 26c0cf27ce70e41b43c9cb46883f0d8b299aec91 | [
"MIT"
] | 44 | 2017-07-13T07:51:49.000Z | 2022-02-24T07:58:44.000Z | # Those constants are used from the library only
BASE_PAL_URL = "https://pal-{}.adyen.com/pal/servlet"
PAL_LIVE_ENDPOINT_URL_TEMPLATE = "https://{}-pal-live" \
".adyenpayments.com/pal/servlet"
BASE_HPP_URL = "https://{}.adyen.com/hpp"
ENDPOINT_CHECKOUT_TEST = "https://checkout-test.adye... | 40.647059 | 65 | 0.691751 |
6291ca65eab695ee11fe0fc3ad7edfef9c5f9fb3 | 11,840 | py | Python | nautobot_device_lifecycle_mgmt/tests/test_software_filters.py | jdrew82/nautobot-plugin-device-lifecycle-mgmt | 7ac9a479f7912b7c082f61cccc4b48e6aad16e46 | [
"Apache-2.0"
] | 21 | 2021-11-05T18:20:09.000Z | 2022-03-19T16:41:27.000Z | nautobot_device_lifecycle_mgmt/tests/test_software_filters.py | jdrew82/nautobot-plugin-device-lifecycle-mgmt | 7ac9a479f7912b7c082f61cccc4b48e6aad16e46 | [
"Apache-2.0"
] | 34 | 2021-11-05T16:52:35.000Z | 2022-03-22T21:02:14.000Z | nautobot_device_lifecycle_mgmt/tests/test_software_filters.py | jdrew82/nautobot-plugin-device-lifecycle-mgmt | 7ac9a479f7912b7c082f61cccc4b48e6aad16e46 | [
"Apache-2.0"
] | 8 | 2021-11-05T22:04:43.000Z | 2022-03-28T15:15:31.000Z | """nautobot_device_lifecycle_mgmt test class for software queryset filters."""
from django.test import TestCase
from nautobot.dcim.models import Device, DeviceRole, DeviceType, InventoryItem, Manufacturer, Platform, Site
from nautobot.extras.models import Relationship, RelationshipAssociation, Tag
from nautobot_devic... | 40 | 119 | 0.67576 |
6291d2b17612df25020c0b4750211ca05cbc3905 | 5,238 | py | Python | delfin/task_manager/scheduler/schedulers/telemetry/failed_telemetry_job.py | noelmcloughlin/delfin | 6dfa9bdb86d850410c82201f6fa621b4e5ea2917 | [
"Apache-2.0"
] | null | null | null | delfin/task_manager/scheduler/schedulers/telemetry/failed_telemetry_job.py | noelmcloughlin/delfin | 6dfa9bdb86d850410c82201f6fa621b4e5ea2917 | [
"Apache-2.0"
] | 3 | 2020-05-23T03:24:56.000Z | 2020-06-06T02:24:27.000Z | delfin/task_manager/scheduler/schedulers/telemetry/failed_telemetry_job.py | noelmcloughlin/delfin | 6dfa9bdb86d850410c82201f6fa621b4e5ea2917 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 The SODA 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 wri... | 41.904 | 79 | 0.593547 |
6291e015d943c08555b5b5a6e2ef43237ec8fdf8 | 3,918 | py | Python | axonius_api_client/cli/grp_adapters/grp_cnx/cmd_add_multiple_from_json.py | kf-careem/axonius_api_client | 27767c896ca446e74ca5d69e087e1a0dcf7157ec | [
"MIT"
] | 11 | 2020-01-31T00:28:26.000Z | 2022-03-25T20:27:08.000Z | axonius_api_client/cli/grp_adapters/grp_cnx/cmd_add_multiple_from_json.py | kf-careem/axonius_api_client | 27767c896ca446e74ca5d69e087e1a0dcf7157ec | [
"MIT"
] | 83 | 2020-01-22T12:52:38.000Z | 2022-02-07T16:20:18.000Z | axonius_api_client/cli/grp_adapters/grp_cnx/cmd_add_multiple_from_json.py | kf-careem/axonius_api_client | 27767c896ca446e74ca5d69e087e1a0dcf7157ec | [
"MIT"
] | 16 | 2019-08-23T17:44:31.000Z | 2022-01-06T00:57:34.000Z | # -*- coding: utf-8 -*-
"""Command line interface for Axonius API Client."""
import textwrap
from ....exceptions import CnxAddError
from ....parsers.tables import tablize
from ....tools import coerce_bool, json_dump
from ...context import CONTEXT_SETTINGS, click
from ...options import AUTH, INPUT_FILE, add_options, ge... | 35.944954 | 98 | 0.583461 |
629224c33e804e187cb13ca6acf152acd0067986 | 6,809 | py | Python | src/fetchers/voltStatsFetcher.py | rohit98077/wrldc_mis_weekly_report_generator | 13969db6bf6359e1bd9663d289f903c22d8b7e61 | [
"MIT"
] | null | null | null | src/fetchers/voltStatsFetcher.py | rohit98077/wrldc_mis_weekly_report_generator | 13969db6bf6359e1bd9663d289f903c22d8b7e61 | [
"MIT"
] | null | null | null | src/fetchers/voltStatsFetcher.py | rohit98077/wrldc_mis_weekly_report_generator | 13969db6bf6359e1bd9663d289f903c22d8b7e61 | [
"MIT"
] | null | null | null | import cx_Oracle
import pandas as pd
import datetime as dt
from typing import List, Tuple, TypedDict
class VoltStatsFetcher():
"""repo class to fetch derived voltage from mis_warehouse db.
"""
def __init__(self, con_string):
"""constructor method
Args:
con_string ([type]): con... | 55.357724 | 357 | 0.587605 |
62923d2723a480e94e9c2fab57390b4ec53283b0 | 11,966 | py | Python | image_remeshing_cnn/opinterplayer.py | Qualcomm-AI-research/ProbabilisticNumericCNNs | e9dd84b3bf3e6ea0a621cd2d1a260dafb455d985 | [
"BSD-3-Clause-Clear"
] | 4 | 2021-07-09T12:23:44.000Z | 2022-03-13T21:45:52.000Z | image_remeshing_cnn/opinterplayer.py | Qualcomm-AI-research/ProbabilisticNumericCNNs | e9dd84b3bf3e6ea0a621cd2d1a260dafb455d985 | [
"BSD-3-Clause-Clear"
] | null | null | null | image_remeshing_cnn/opinterplayer.py | Qualcomm-AI-research/ProbabilisticNumericCNNs | e9dd84b3bf3e6ea0a621cd2d1a260dafb455d985 | [
"BSD-3-Clause-Clear"
] | null | null | null | # Copyright (c) 2021 Qualcomm Technologies, Inc.
# All Rights Reserved.
import torch
import torch.nn as nn
import torch.nn.functional as F
import numpy as np
import gpytorch#
import gpytorch.kernels as kernels
import matplotlib.pyplot as plt
import torchvision.utils as vutils
from oil.utils.utils import expor... | 46.379845 | 130 | 0.56134 |
629246e3bde6f6474078f20d103109f66998d702 | 234 | py | Python | src/compas_singular/datastructures/mesh_quad_pseudo/__init__.py | christiandimitri/compas_singular | 4a80b30664b07e15eb799229171bbc02c27e0efc | [
"MIT"
] | 1 | 2021-04-19T15:09:21.000Z | 2021-04-19T15:09:21.000Z | src/compas_singular/datastructures/mesh_quad_pseudo/__init__.py | christiandimitri/compas_singular | 4a80b30664b07e15eb799229171bbc02c27e0efc | [
"MIT"
] | null | null | null | src/compas_singular/datastructures/mesh_quad_pseudo/__init__.py | christiandimitri/compas_singular | 4a80b30664b07e15eb799229171bbc02c27e0efc | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
from .mesh_quad_pseudo import *
from .grammar_poles import *
__all__ = [name for name in dir() if not name.startswith('_')] | 29.25 | 62 | 0.807692 |
629265bb9d9f89aa1f2b9938c2e5229d1b8cd993 | 967 | py | Python | scripts/authentication/service_principal.py | ts-azure-services/aml-automl-pipeline | 1626724b00f4ed29909d15ab193f5412d197451e | [
"MIT"
] | null | null | null | scripts/authentication/service_principal.py | ts-azure-services/aml-automl-pipeline | 1626724b00f4ed29909d15ab193f5412d197451e | [
"MIT"
] | null | null | null | scripts/authentication/service_principal.py | ts-azure-services/aml-automl-pipeline | 1626724b00f4ed29909d15ab193f5412d197451e | [
"MIT"
] | 1 | 2021-09-28T23:09:29.000Z | 2021-09-28T23:09:29.000Z | import os
from dotenv import load_dotenv
from azureml.core import Workspace
from azureml.core.authentication import ServicePrincipalAuthentication
# Load env variables
env_var=load_dotenv('./variables.env')
auth_dict = {
"client_id":os.environ['CLIENT_ID'],
"client_key":os.environ['CLIENT_SECRET'],
... | 31.193548 | 70 | 0.700103 |
6292adf21689c503e6bf4cdcb010c19160d1b5bc | 1,364 | py | Python | obsolete/reports/pipeline_chipseq/trackers/BioProspector.py | kevinrue/cgat-flow | 02b5a1867253c2f6fd6b4f3763e0299115378913 | [
"MIT"
] | 49 | 2015-04-13T16:49:25.000Z | 2022-03-29T10:29:14.000Z | obsolete/reports/pipeline_chipseq/trackers/BioProspector.py | kevinrue/cgat-flow | 02b5a1867253c2f6fd6b4f3763e0299115378913 | [
"MIT"
] | 252 | 2015-04-08T13:23:34.000Z | 2019-03-18T21:51:29.000Z | obsolete/reports/pipeline_chipseq/trackers/BioProspector.py | kevinrue/cgat-flow | 02b5a1867253c2f6fd6b4f3763e0299115378913 | [
"MIT"
] | 22 | 2015-05-21T00:37:52.000Z | 2019-09-25T05:04:27.000Z | from ChipseqReport import *
import glob
class BioProspectorMotifs(ChipseqTracker):
pattern = "(.*)_bioprospector$"
def __call__(self, track, slice=None):
resultsdir = os.path.join(EXPORTDIR, "bioprospector")
if not os.path.exists(resultsdir):
return []
data = odict()
... | 32.47619 | 110 | 0.531525 |
6292c1840feb5616d14a59e49967fd146582e025 | 23,244 | py | Python | jukoro/pg/db.py | ysegorov/jukoro | 8be1d01b471c6091056df77ffacaee5cc8c470d0 | [
"MIT"
] | null | null | null | jukoro/pg/db.py | ysegorov/jukoro | 8be1d01b471c6091056df77ffacaee5cc8c470d0 | [
"MIT"
] | null | null | null | jukoro/pg/db.py | ysegorov/jukoro | 8be1d01b471c6091056df77ffacaee5cc8c470d0 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Module to provide abstractions to work with PostgreSQL built on top of
``psycopg2.extensions.connection`` and ``psycopg2.extensions.cursor``.
- :class:`PgDbPool <jukoro.pg.db.PgDbPool>` - abstraction for a pool of
connections
- :class:`PgConnection <jukoro.pg.db.PgConnection>` - abstracti... | 28.520245 | 120 | 0.58699 |
6292eb7da1b9a52b6b7e11c358b53ab38a9186b6 | 5,164 | py | Python | tensorflow/python/estimator/inputs/queues/feeding_queue_runner_test.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 522 | 2016-06-08T02:15:50.000Z | 2022-03-02T05:30:36.000Z | tensorflow/python/estimator/inputs/queues/feeding_queue_runner_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/python/estimator/inputs/queues/feeding_queue_runner_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 108 | 2016-06-16T15:34:05.000Z | 2022-03-12T13:23:11.000Z | # Copyright 2017 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.624113 | 80 | 0.646204 |
62931442cb60ff96c7029d0d8c9495982ae09569 | 24,315 | py | Python | dpp_nets/utils/language.py | mbp28/dpp_nets | 86859b7612433cc6349b427b47c54986224e702a | [
"MIT"
] | 1 | 2021-06-05T11:14:13.000Z | 2021-06-05T11:14:13.000Z | dpp_nets/utils/language.py | mbp28/dpp_nets | 86859b7612433cc6349b427b47c54986224e702a | [
"MIT"
] | null | null | null | dpp_nets/utils/language.py | mbp28/dpp_nets | 86859b7612433cc6349b427b47c54986224e702a | [
"MIT"
] | null | null | null | import numpy as np
import gzip
import string
import spacy
import torch
import torch.nn as nn
import nltk
from collections import OrderedDict, defaultdict
from torch.utils.data import Dataset
from dpp_nets.my_torch.utilities import pad_tensor
from torch.autograd import Variable
import json
import gzip
import random
... | 31.293436 | 119 | 0.531359 |
629332ae5c29c56a0e1303079c42faf3df53c68a | 2,063 | py | Python | mi/dataset/driver/PARAD_K/STC_IMODEM/parad_k_stc_imodem_driver.py | rmanoni/mi-dataset | c1012a0cd8f2ea075e008cdd1ab291ed54f44d43 | [
"BSD-2-Clause"
] | null | null | null | mi/dataset/driver/PARAD_K/STC_IMODEM/parad_k_stc_imodem_driver.py | rmanoni/mi-dataset | c1012a0cd8f2ea075e008cdd1ab291ed54f44d43 | [
"BSD-2-Clause"
] | null | null | null | mi/dataset/driver/PARAD_K/STC_IMODEM/parad_k_stc_imodem_driver.py | rmanoni/mi-dataset | c1012a0cd8f2ea075e008cdd1ab291ed54f44d43 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/local/bin/python2.7
import sys
import os
#try:
# if basePythonCodePath is not None:
# pass
#except NameError:
# basePythonCodePath = os.curdir
#sys.path.append(basePythonCodePath)
def parse(basePythonCodePath, sourceFilePath, particleDataHdlrObj):
from mi.logging import config
config.add... | 26.792208 | 97 | 0.639845 |
62936563c78f3452c6d4e9e4b53bd835f0529b85 | 2,505 | py | Python | oscar/lib/python2.7/site-packages/PIL/MicImagePlugin.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/PIL/MicImagePlugin.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/PIL/MicImagePlugin.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | #
# The Python Imaging Library.
# $Id$
#
# Microsoft Image Composer support for PIL
#
# Notes:
# uses TiffImagePlugin.py to read the actual image streams
#
# History:
# 97-01-20 fl Created
#
# Copyright (c) Secret Labs AB 1997.
# Copyright (c) Fredrik Lundh 1997.
#
# See the README file f... | 23.411215 | 75 | 0.561277 |
62937c77726308fe9a195e80cf29e2fa1c1084a2 | 28 | py | Python | recOrder/compute/__init__.py | mehta-lab/recOrder | 67f2edb9ab13114dfe41d57e465ae24f961b0004 | [
"Unlicense"
] | 2 | 2022-01-19T21:13:32.000Z | 2022-02-24T19:40:24.000Z | recOrder/compute/__init__.py | mehta-lab/recOrder | 67f2edb9ab13114dfe41d57e465ae24f961b0004 | [
"Unlicense"
] | 55 | 2021-06-24T18:53:18.000Z | 2022-03-30T21:05:14.000Z | recOrder/compute/__init__.py | mehta-lab/recOrder | 67f2edb9ab13114dfe41d57e465ae24f961b0004 | [
"Unlicense"
] | null | null | null | from .qlipp_compute import * | 28 | 28 | 0.821429 |
6293c96138463c6939c3a00af4f0944d4442ee90 | 13,099 | py | Python | neutron/tests/fullstack/resources/config.py | kklimonda/neutron | ccdddad358a4bf802d59b3fbbfe88a1e9881c96c | [
"Apache-2.0"
] | null | null | null | neutron/tests/fullstack/resources/config.py | kklimonda/neutron | ccdddad358a4bf802d59b3fbbfe88a1e9881c96c | [
"Apache-2.0"
] | null | null | null | neutron/tests/fullstack/resources/config.py | kklimonda/neutron | ccdddad358a4bf802d59b3fbbfe88a1e9881c96c | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agre... | 36.589385 | 79 | 0.611573 |
6293d868b091d47ee726522047caea15720d35fb | 1,132 | py | Python | maths/maximumProductAfterKIncrements.py | Jiganesh/High-On-DSA | 044a3941cec443a87e79d97962551d75a9639a57 | [
"MIT"
] | 76 | 2021-12-12T08:42:20.000Z | 2022-03-31T19:48:46.000Z | maths/maximumProductAfterKIncrements.py | Jiganesh/High-On-DSA | 044a3941cec443a87e79d97962551d75a9639a57 | [
"MIT"
] | 4 | 2022-01-04T09:58:39.000Z | 2022-03-30T17:00:39.000Z | maths/maximumProductAfterKIncrements.py | Jiganesh/High-On-DSA | 044a3941cec443a87e79d97962551d75a9639a57 | [
"MIT"
] | 13 | 2021-12-12T14:44:41.000Z | 2022-03-10T14:08:20.000Z | # https://leetcode.com/problems/maximum-product-after-k-increments/
import heapq
class Solution:
# TC : O(N log N)
# SC : O(N)
# Runtime: 1864 ms, faster than 20.00% of Python3 online submissions for Maximum Product After K Increments.
# Memory Usage: 24.7 MB, less than 10.00% of Python3 onl... | 33.294118 | 121 | 0.584806 |
6293dc6d5afce22c2ff56d971b55f234f46fc05d | 2,995 | py | Python | datalad/metadata/extractors/tests/test_base.py | soichih/datalad | 797dde3ab7497be170e2c4ea8824f33a4b38e5d8 | [
"MIT"
] | null | null | null | datalad/metadata/extractors/tests/test_base.py | soichih/datalad | 797dde3ab7497be170e2c4ea8824f33a4b38e5d8 | [
"MIT"
] | null | null | null | datalad/metadata/extractors/tests/test_base.py | soichih/datalad | 797dde3ab7497be170e2c4ea8824f33a4b38e5d8 | [
"MIT"
] | null | null | null | # emacs: -*- mode: python-mode; py-indent-offset: 4; tab-width: 4; indent-tabs-mode: nil; coding: utf-8 -*-
# ex: set sts=4 ts=4 sw=4 et:
# ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
#
# See COPYING file distributed along with the datalad package for the
# copyright and license te... | 34.825581 | 107 | 0.596661 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.