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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f7acb388722ff1a56e67b4a22a572714d05193bb | 216 | py | Python | trebelge/trebelge/doctype/tr_ubl_billingreference/tr_ubl_billingreference.py | askmetoo/trebelge | bff1b13edf41d1a9afd9ddb039f5b4089cb83dd6 | [
"MIT"
] | null | null | null | trebelge/trebelge/doctype/tr_ubl_billingreference/tr_ubl_billingreference.py | askmetoo/trebelge | bff1b13edf41d1a9afd9ddb039f5b4089cb83dd6 | [
"MIT"
] | null | null | null | trebelge/trebelge/doctype/tr_ubl_billingreference/tr_ubl_billingreference.py | askmetoo/trebelge | bff1b13edf41d1a9afd9ddb039f5b4089cb83dd6 | [
"MIT"
] | 1 | 2022-03-17T21:53:07.000Z | 2022-03-17T21:53:07.000Z | # Copyright (c) 2021, Framras AS-Izmir and contributors
# For license information, please see license.txt
# import frappe
from frappe.model.document import Document
class TRUBLBillingReference(Document):
pass
| 21.6 | 55 | 0.787037 |
f7acc2ce8ccb1be95b140f8414975001161bd4e4 | 20,600 | py | Python | cinder/tests/unit/volume/drivers/test_reduxio.py | mail2nsrajesh/cinder | a688b872bec6d1abd4dcd852bdb8e8a921369d2e | [
"Apache-2.0"
] | null | null | null | cinder/tests/unit/volume/drivers/test_reduxio.py | mail2nsrajesh/cinder | a688b872bec6d1abd4dcd852bdb8e8a921369d2e | [
"Apache-2.0"
] | 2 | 2018-10-25T13:04:01.000Z | 2019-08-17T13:15:24.000Z | cinder/tests/unit/volume/drivers/test_reduxio.py | mail2nsrajesh/cinder | a688b872bec6d1abd4dcd852bdb8e8a921369d2e | [
"Apache-2.0"
] | 2 | 2018-10-17T13:32:50.000Z | 2018-11-08T08:39:39.000Z | # Copyright (c) 2016 Reduxio Systems
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... | 31.692308 | 79 | 0.571359 |
f7acca43bf2c7af677815ee64a65d7e99d750a14 | 2,286 | py | Python | MFAEngine/apps/api/models.py | justicevR/mfa_authentication_factor_v0.1 | b7302904c3eaa00801ca4d78fb47797b16427ad4 | [
"MIT"
] | null | null | null | MFAEngine/apps/api/models.py | justicevR/mfa_authentication_factor_v0.1 | b7302904c3eaa00801ca4d78fb47797b16427ad4 | [
"MIT"
] | null | null | null | MFAEngine/apps/api/models.py | justicevR/mfa_authentication_factor_v0.1 | b7302904c3eaa00801ca4d78fb47797b16427ad4 | [
"MIT"
] | null | null | null | from django.db import models
from django.db.models.deletion import CASCADE
from django.db.models.fields import BooleanField
import uuid
from oauth2_provider.models import AbstractApplication
from apps.users.models import User
# Create your models here.
class App(AbstractApplication):
id = models.CharField(max_le... | 34.636364 | 86 | 0.723097 |
f7acd9ef8b25c04bbfce09bd78c3a0de86afb1e6 | 33,218 | py | Python | models/meta_detr.py | genggng/Meta-DETR | 45f9dcb4d3402b0e308e06537284fe2c8443b3f6 | [
"MIT"
] | 184 | 2021-03-23T03:19:48.000Z | 2022-03-31T07:42:03.000Z | models/meta_detr.py | genggng/Meta-DETR | 45f9dcb4d3402b0e308e06537284fe2c8443b3f6 | [
"MIT"
] | 24 | 2021-03-31T19:12:27.000Z | 2022-03-20T06:04:22.000Z | models/meta_detr.py | genggng/Meta-DETR | 45f9dcb4d3402b0e308e06537284fe2c8443b3f6 | [
"MIT"
] | 36 | 2021-03-26T15:51:06.000Z | 2022-03-31T02:15:23.000Z | import copy
import math
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.nn.utils.weight_norm import WeightNorm
from util import box_ops
from util.misc import (NestedTensor, nested_tensor_from_tensor_list,
accuracy, get_world_size, is_dist_avail_and_initialized, inve... | 48.00289 | 171 | 0.620507 |
f7acfa95c1d73a47959a1331f0b250e522410fb5 | 6,804 | py | Python | figmap/cellmap.py | TrasgoGroup/Cell-Viewer | 4f2421e278b22926cd34e0600d0ecb12026d58c9 | [
"Apache-2.0"
] | null | null | null | figmap/cellmap.py | TrasgoGroup/Cell-Viewer | 4f2421e278b22926cd34e0600d0ecb12026d58c9 | [
"Apache-2.0"
] | 2 | 2021-02-04T10:32:13.000Z | 2021-02-12T10:11:46.000Z | figmap/cellmap.py | MCruces-fz/Cell-Viewer | 4f2421e278b22926cd34e0600d0ecb12026d58c9 | [
"Apache-2.0"
] | 1 | 2021-04-30T11:37:37.000Z | 2021-04-30T11:37:37.000Z | """
A P A C H E L I C E N S E
------------
Version 2.0, January 2004
Copyright 2021 Miguel Cruces Fernández
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 cop... | 31.211009 | 105 | 0.56746 |
f7ad0f03289e460e7fadbdf2443a815a436a125a | 6,343 | py | Python | baselineDiversityPruning.py | git-disl/HQ-Ensemble | c588f2979476e50efd429c9d9d5bb2f854b9ad41 | [
"Apache-2.0"
] | 1 | 2022-03-13T17:43:55.000Z | 2022-03-13T17:43:55.000Z | baselineDiversityPruning.py | git-disl/HQ-Ensemble | c588f2979476e50efd429c9d9d5bb2f854b9ad41 | [
"Apache-2.0"
] | null | null | null | baselineDiversityPruning.py | git-disl/HQ-Ensemble | c588f2979476e50efd429c9d9d5bb2f854b9ad41 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
import os
import time
import timeit
import torch
import torch.nn as nn
import torch.nn.parallel
import torch.backends.cudnn as cudnn
import torch.optim
import torch.utils.data
import torchvision.transforms as transforms
import torchvision.datasets as datasets
from collections im... | 32.865285 | 167 | 0.708971 |
f7ad18c6d3a65e1637312179235f0483c6f0b4ad | 2,915 | py | Python | tests/conftest.py | cprovencher/dcos-e2e | c54b3d41f246efe3f90dcf225b0bffdc1f615daa | [
"Apache-2.0"
] | null | null | null | tests/conftest.py | cprovencher/dcos-e2e | c54b3d41f246efe3f90dcf225b0bffdc1f615daa | [
"Apache-2.0"
] | null | null | null | tests/conftest.py | cprovencher/dcos-e2e | c54b3d41f246efe3f90dcf225b0bffdc1f615daa | [
"Apache-2.0"
] | null | null | null | """
Helpers for running tests with `pytest`.
"""
import os
from pathlib import Path
import pytest
from dcos_e2e.backends import ClusterBackend, Docker
@pytest.fixture(scope='session')
def cluster_backend() -> ClusterBackend:
"""
Return a cluster backend to use.
"""
return Docker()
@pytest.fixture(... | 23.893443 | 75 | 0.67753 |
f7ad19a368859a5c5a8f13934c98df0df6e70cff | 12,852 | py | Python | fci/cistring.py | gmwang18/pyscf | fcd6877751661c8a9743c1c872a4a2b65f6dd7ac | [
"BSD-2-Clause"
] | null | null | null | fci/cistring.py | gmwang18/pyscf | fcd6877751661c8a9743c1c872a4a2b65f6dd7ac | [
"BSD-2-Clause"
] | null | null | null | fci/cistring.py | gmwang18/pyscf | fcd6877751661c8a9743c1c872a4a2b65f6dd7ac | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
#
# Author: Qiming Sun <osirpt.sun@gmail.com>
#
import sys
import ctypes
import math
import numpy
from pyscf import lib
libfci = lib.load_library('libfci')
def gen_strings4orblist(orb_list, nelec):
'''Generate string from the given orbital list.
Returns:
list of int64. One int... | 36.305085 | 82 | 0.596016 |
f7adda4980a092a9b03eabca6f519ff0515ee4b2 | 3,393 | py | Python | model/config.py | dallal9/sequence_tagging | 14f05127767bfdac251d87017c7fd4a7a4439969 | [
"Apache-2.0"
] | 1 | 2022-03-21T21:40:52.000Z | 2022-03-21T21:40:52.000Z | model/config.py | dallal9/sequence_tagging | 14f05127767bfdac251d87017c7fd4a7a4439969 | [
"Apache-2.0"
] | null | null | null | model/config.py | dallal9/sequence_tagging | 14f05127767bfdac251d87017c7fd4a7a4439969 | [
"Apache-2.0"
] | null | null | null | import os
from .general_utils import get_logger
from .data_utils import get_trimmed_glove_vectors, load_vocab, \
get_processing_word
class Config():
def __init__(self, load=True):
"""Initialize hyperparameters and load vocabs
Args:
load_embeddings: (bool) if True, load embed... | 31.416667 | 75 | 0.64191 |
f7ade485ef5af27ee62b01fe6e4cb1d31fabfb44 | 865 | py | Python | jackal/models.py | joyongjin/Jackal | 63d637e92228d669cf8a6fc4b219a8c08471f5e3 | [
"MIT"
] | 6 | 2018-11-09T05:48:42.000Z | 2020-06-25T07:14:40.000Z | jackal/models.py | jrog612/Jackal | 63d637e92228d669cf8a6fc4b219a8c08471f5e3 | [
"MIT"
] | 1 | 2020-05-16T16:06:02.000Z | 2020-05-16T16:06:02.000Z | jackal/models.py | jrog612/Jackal | 63d637e92228d669cf8a6fc4b219a8c08471f5e3 | [
"MIT"
] | null | null | null | from django.db import models
from django.utils import timezone
from jackal.managers import SoftDeleteManager
class JackalModel(models.Model):
soft_delete = True
NAME_FIELD = 'name'
created_at = models.DateTimeField(auto_now_add=True, null=True)
deleted_at = models.DateTimeField(null=True)
objec... | 27.03125 | 67 | 0.654335 |
f7ade97735713aef9ed493753e33df703de6024d | 3,615 | py | Python | spinup/algos/pytorch/stochastic_td3/core.py | LinghengMeng/lstm_td3 | 2306a4f0e84417e92b9d77627abc8a7f1925f2b1 | [
"MIT"
] | 2 | 2021-04-22T01:17:37.000Z | 2021-07-22T09:56:44.000Z | spinup/algos/pytorch/stochastic_td3/core.py | LinghengMeng/lstm_td3 | 2306a4f0e84417e92b9d77627abc8a7f1925f2b1 | [
"MIT"
] | null | null | null | spinup/algos/pytorch/stochastic_td3/core.py | LinghengMeng/lstm_td3 | 2306a4f0e84417e92b9d77627abc8a7f1925f2b1 | [
"MIT"
] | 3 | 2021-05-05T10:27:12.000Z | 2021-07-23T14:42:42.000Z | import numpy as np
import scipy.signal
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.distributions.normal import Normal
def combined_shape(length, shape=None):
if shape is None:
return (length,)
return (length, shape) if np.isscalar(shape) else (length, *shape)
def ml... | 36.515152 | 97 | 0.653112 |
f7ae071d4e53a2eecf195e944d3ba2ac4e797760 | 1,476 | py | Python | battleforcastile/cli/cards.py | battleforcastile/battleforcastile | 65223fcb56ecc550f1a7c7b70beadff22c866d85 | [
"MIT"
] | null | null | null | battleforcastile/cli/cards.py | battleforcastile/battleforcastile | 65223fcb56ecc550f1a7c7b70beadff22c866d85 | [
"MIT"
] | 1 | 2021-08-21T10:16:03.000Z | 2021-08-21T10:16:03.000Z | battleforcastile/cli/cards.py | battleforcastile/battleforcastile | 65223fcb56ecc550f1a7c7b70beadff22c866d85 | [
"MIT"
] | null | null | null | import click
import os
from battleforcastile.utils.select_all_files import select_all_files
from battleforcastile.utils.display_card import display_card
from battleforcastile.constants import CARDS_FOLDER_NAME
CURRENT_PATH = os.path.dirname(os.path.abspath(__file__))
@click.group(help='List of cards in the game')
... | 36 | 81 | 0.691734 |
f7ae267653213a093f937f07490115efa2b935af | 13,301 | py | Python | qiskit/opflow/primitive_ops/pauli_op.py | bartek-bartlomiej/qiskit-terra | 247f44ef87b08302514e512e4ed36601e95f33cd | [
"Apache-2.0"
] | null | null | null | qiskit/opflow/primitive_ops/pauli_op.py | bartek-bartlomiej/qiskit-terra | 247f44ef87b08302514e512e4ed36601e95f33cd | [
"Apache-2.0"
] | null | null | null | qiskit/opflow/primitive_ops/pauli_op.py | bartek-bartlomiej/qiskit-terra | 247f44ef87b08302514e512e4ed36601e95f33cd | [
"Apache-2.0"
] | null | null | null | # This code is part of Qiskit.
#
# (C) Copyright IBM 2020.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivative wo... | 39.58631 | 99 | 0.619728 |
f7ae2bc3c85d6792d3ef5072908de3c468a3b16c | 4,411 | py | Python | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/lib/adafruit_rsa/common.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 47 | 2021-02-15T23:02:36.000Z | 2022-03-04T21:30:03.000Z | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/lib/adafruit_rsa/common.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 7 | 2021-02-19T20:00:08.000Z | 2022-01-14T10:51:12.000Z | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/lib/adafruit_rsa/common.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 14 | 2021-02-20T17:40:56.000Z | 2022-01-01T19:53:38.000Z | # -*- coding: utf-8 -*-
# SPDX-FileCopyrightText: 2011 Sybren A. Stüvel <sybren@stuvel.eu>
#
# SPDX-License-Identifier: Apache-2.0
"""Common functionality shared by several modules."""
# pylint: disable=invalid-name
__version__ = "1.2.2"
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_RSA.git"
def b... | 23.338624 | 79 | 0.564044 |
f7ae353cf0450e282f56734bace1269efac88f3c | 14,823 | py | Python | tools/plot-compare-sources.py | valueanalyticslabs/covid-19-germany-gae | 75542cdab7df1e2977ca5bbdef2ec8c54c0680a4 | [
"MIT"
] | null | null | null | tools/plot-compare-sources.py | valueanalyticslabs/covid-19-germany-gae | 75542cdab7df1e2977ca5bbdef2ec8c54c0680a4 | [
"MIT"
] | null | null | null | tools/plot-compare-sources.py | valueanalyticslabs/covid-19-germany-gae | 75542cdab7df1e2977ca5bbdef2ec8c54c0680a4 | [
"MIT"
] | null | null | null | # MIT License
# Copyright (c) 2020 Dr. Jan-Philip Gehrcke
# 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... | 32.721854 | 86 | 0.648384 |
f7ae97aa770084e0017d31d3194c4f0bca78f5a1 | 11,849 | py | Python | code/price_paths.py | LautaroParada/variance-test | bc88de3dc324f622560b781aae8a0280f4c99b29 | [
"MIT"
] | 4 | 2021-03-03T18:09:41.000Z | 2021-08-28T05:51:38.000Z | code/price_paths.py | LautaroParada/variance-test | bc88de3dc324f622560b781aae8a0280f4c99b29 | [
"MIT"
] | 1 | 2021-02-09T15:43:16.000Z | 2021-02-09T15:43:16.000Z | code/price_paths.py | LautaroParada/variance-test | bc88de3dc324f622560b781aae8a0280f4c99b29 | [
"MIT"
] | 1 | 2021-06-27T10:05:00.000Z | 2021-06-27T10:05:00.000Z | import numpy as np
from scipy.stats import halfnorm
class PricePaths(object):
def __init__(self, n:int, T:int, s0:float):
self.n = n # number of paths to generate
self.T = T # number of observations to generate
self.s0 = s0 ... | 38.976974 | 137 | 0.516162 |
f7ae9ad9028c1a294858d1f39536b02d84b113ea | 1,844 | py | Python | tests/adaptors/interfaceadaptortestcase.py | tlb-lab/credoscript | 32bdf08d84703dc2062dae4df1a95587d36c3cf7 | [
"MIT"
] | null | null | null | tests/adaptors/interfaceadaptortestcase.py | tlb-lab/credoscript | 32bdf08d84703dc2062dae4df1a95587d36c3cf7 | [
"MIT"
] | null | null | null | tests/adaptors/interfaceadaptortestcase.py | tlb-lab/credoscript | 32bdf08d84703dc2062dae4df1a95587d36c3cf7 | [
"MIT"
] | null | null | null | from credoscript import adaptors, models
from tests import CredoAdaptorTestCase
class InterfaceAdaptorTestCase(CredoAdaptorTestCase):
def setUp(self):
self.adaptor = adaptors.InterfaceAdaptor()
self.expected_entity = models.Interface
def test_fetch_by_interface_id(self):
"""Fetch a sin... | 42.883721 | 74 | 0.705531 |
f7ae9e99e64fd6f3c676643cae9afd696e30d8ed | 11,565 | py | Python | src/snowflake/connector/remote_storage_util.py | 666Chao666/snowflake-connector-python | 81a10e522fcf19d45580c79bc066b7a4eab25485 | [
"Apache-2.0"
] | null | null | null | src/snowflake/connector/remote_storage_util.py | 666Chao666/snowflake-connector-python | 81a10e522fcf19d45580c79bc066b7a4eab25485 | [
"Apache-2.0"
] | null | null | null | src/snowflake/connector/remote_storage_util.py | 666Chao666/snowflake-connector-python | 81a10e522fcf19d45580c79bc066b7a4eab25485 | [
"Apache-2.0"
] | 2 | 2021-03-16T12:41:29.000Z | 2021-03-16T14:50:08.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2012-2021 Snowflake Computing Inc. All right reserved.
#
from __future__ import division
import os
import shutil
import time
from collections import namedtuple
from io import BytesIO
from logging import getLogger
from typing import TYPE_CHECKING
from .a... | 42.675277 | 112 | 0.593428 |
f7aea2ba05f8815781491441fe4f60b4778a973f | 1,179 | py | Python | sender/test.py | schc-over-sigfox/schc-over-sigfox | d03e26cf5524ebd6bd64b4ca33a83149eec5e59f | [
"MIT"
] | null | null | null | sender/test.py | schc-over-sigfox/schc-over-sigfox | d03e26cf5524ebd6bd64b4ca33a83149eec5e59f | [
"MIT"
] | null | null | null | sender/test.py | schc-over-sigfox/schc-over-sigfox | d03e26cf5524ebd6bd64b4ca33a83149eec5e59f | [
"MIT"
] | 1 | 2022-03-19T12:36:30.000Z | 2022-03-19T12:36:30.000Z | from Entities.SigfoxProfile import SigfoxProfile
from Messages.ACK import ACK
from Messages.ACKHeader import ACKHeader
from Messages.Fragment import Fragment
from Messages.FragmentHeader import FragmentHeader
from Messages.ReceiverAbort import ReceiverAbort
from Messages.SenderAbort import SenderAbort
from schc_utils i... | 43.666667 | 71 | 0.802375 |
f7af022179222f08c7011396934c7e5adde3b85c | 27,957 | py | Python | src/containerapp/azext_containerapp/tests/latest/test_containerapp_scenario.py | saisankargochhayat/azure-cli-extensions | f89443a766961f984977a2cf1b682973fcb61edd | [
"MIT"
] | null | null | null | src/containerapp/azext_containerapp/tests/latest/test_containerapp_scenario.py | saisankargochhayat/azure-cli-extensions | f89443a766961f984977a2cf1b682973fcb61edd | [
"MIT"
] | null | null | null | src/containerapp/azext_containerapp/tests/latest/test_containerapp_scenario.py | saisankargochhayat/azure-cli-extensions | f89443a766961f984977a2cf1b682973fcb61edd | [
"MIT"
] | null | null | null | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 61.579295 | 214 | 0.679901 |
f7af09ef654f95284aa3aaf25d810c3a3064f40b | 23,776 | py | Python | salt/modules/boto_elb.py | jbq/pkg-salt | b6742e03cbbfb82f4ce7db2e21a3ff31b270cdb3 | [
"Apache-2.0"
] | 1 | 2020-09-16T21:31:02.000Z | 2020-09-16T21:31:02.000Z | salt/modules/boto_elb.py | jbq/pkg-salt | b6742e03cbbfb82f4ce7db2e21a3ff31b270cdb3 | [
"Apache-2.0"
] | null | null | null | salt/modules/boto_elb.py | jbq/pkg-salt | b6742e03cbbfb82f4ce7db2e21a3ff31b270cdb3 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Connection module for Amazon ELB
.. versionadded:: 2014.7.0
:configuration: This module accepts explicit elb credentials but can also utilize
IAM roles assigned to the instance trough Instance Profiles. Dynamic
credentials are then automatically obtained from AWS API and no further... | 35.067847 | 189 | 0.638207 |
f7af1c12183170e0e0b11fc0c8140a2b74c380b3 | 12,157 | py | Python | measurements/referenceaudioanalyzer/reference_audio_analyzer_crawler.py | vinzmc/AutoEq | 4b42aa25e5f4933528be44e7356afe1fde75a3af | [
"MIT"
] | 6,741 | 2018-07-27T10:54:04.000Z | 2022-03-31T20:22:57.000Z | measurements/referenceaudioanalyzer/reference_audio_analyzer_crawler.py | davidvandamage/AutoEq | e6b1648ea09ae3eade14f92c6f9d5afd87e400ac | [
"MIT"
] | 428 | 2018-08-08T17:12:40.000Z | 2022-03-31T05:53:36.000Z | measurements/referenceaudioanalyzer/reference_audio_analyzer_crawler.py | davidvandamage/AutoEq | e6b1648ea09ae3eade14f92c6f9d5afd87e400ac | [
"MIT"
] | 1,767 | 2018-07-27T16:50:12.000Z | 2022-03-31T19:26:39.000Z | # -*- coding: utf-8 -*-
import os
import sys
import numpy as np
import pandas as pd
import re
import matplotlib.pyplot as plt
from PIL import Image, ImageDraw
import colorsys
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from measurements.name_prompt import NamePrompt
sys.path.... | 42.65614 | 119 | 0.584437 |
f7af2ae536939c547645a9e929fdfa1b38e1840b | 1,696 | py | Python | alipay/aop/api/domain/ScheduleConfigItem.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/ScheduleConfigItem.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/ScheduleConfigItem.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class ScheduleConfigItem(object):
def __init__(self):
self._config_name = None
self._date = None
self._id = None
@property
def config_name(self):
return self._c... | 23.887324 | 73 | 0.541274 |
f7af65292f82f3a4ab15f298f4eda016d919b46c | 8,410 | py | Python | seleniumdirector/webelement.py | cshanu/seleniumdirector | c2e7a343225bcca35e9119fd4d5854626e1ac48a | [
"MIT"
] | 5 | 2018-05-02T15:01:46.000Z | 2021-11-05T20:26:56.000Z | seleniumdirector/webelement.py | cshanu/seleniumdirector | c2e7a343225bcca35e9119fd4d5854626e1ac48a | [
"MIT"
] | null | null | null | seleniumdirector/webelement.py | cshanu/seleniumdirector | c2e7a343225bcca35e9119fd4d5854626e1ac48a | [
"MIT"
] | 1 | 2020-02-09T11:43:06.000Z | 2020-02-09T11:43:06.000Z | from selenium.common import exceptions as seleniumexceptions
from selenium.webdriver.support import expected_conditions
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.common.by import By
from seleniumdirector import exceptions
from selenium.webdriver.common.action_chains import ActionCh... | 36.724891 | 88 | 0.57503 |
f7af75cbf10dab3159180893035080a5f963bb91 | 962 | py | Python | graphtik/__init__.py | ankostis/graphkit | 9b72592b51571952802d865b162b5fbbd2dc460e | [
"Apache-2.0"
] | 1 | 2021-03-23T15:23:06.000Z | 2021-03-23T15:23:06.000Z | graphtik/__init__.py | ankostis/graphtik | 9b72592b51571952802d865b162b5fbbd2dc460e | [
"Apache-2.0"
] | null | null | null | graphtik/__init__.py | ankostis/graphtik | 9b72592b51571952802d865b162b5fbbd2dc460e | [
"Apache-2.0"
] | 1 | 2019-10-29T18:40:02.000Z | 2019-10-29T18:40:02.000Z | # Copyright 2016, Yahoo Inc.
# Licensed under the terms of the Apache License, Version 2.0. See the LICENSE file associated with the project for terms.
"""Lightweight :term:`computation` graphs for Python."""
__version__ = "10.3.0"
__release_date__ = "22 Aug 2020, 18:24"
__title__ = "graphtik"
__summary__ = __doc__.sp... | 28.294118 | 122 | 0.723493 |
f7af8a7e163beae29b0df6cb72ac9dfbb9174e87 | 4,552 | py | Python | profiles_api/views.py | OmerEliyahu/profiles-rest-api | c24979ce69a15c6969b86e4a4425ca7b3f8a5760 | [
"MIT"
] | null | null | null | profiles_api/views.py | OmerEliyahu/profiles-rest-api | c24979ce69a15c6969b86e4a4425ca7b3f8a5760 | [
"MIT"
] | 6 | 2021-03-19T11:50:59.000Z | 2022-02-10T12:51:11.000Z | profiles_api/views.py | OmerEliyahu/profiles-rest-api | c24979ce69a15c6969b86e4a4425ca7b3f8a5760 | [
"MIT"
] | null | null | null | from django.shortcuts import render
from rest_framework.views import APIView
from rest_framework.response import Response
from rest_framework import status
from rest_framework import viewsets
from rest_framework.authentication import TokenAuthentication
from rest_framework import filters
from rest_framework.authtoken.v... | 33.718519 | 78 | 0.667179 |
f7af910fcac7c33968105740e508d923dd66b66b | 649 | py | Python | examples/gauss/vi_gauss.py | MichaelLutter/mimo | 8a6a770ee90cbd6fd5cc12141d19442a3477af2c | [
"MIT"
] | null | null | null | examples/gauss/vi_gauss.py | MichaelLutter/mimo | 8a6a770ee90cbd6fd5cc12141d19442a3477af2c | [
"MIT"
] | null | null | null | examples/gauss/vi_gauss.py | MichaelLutter/mimo | 8a6a770ee90cbd6fd5cc12141d19442a3477af2c | [
"MIT"
] | null | null | null | import numpy as np
import numpy.random as npr
from mimo import distributions
dim, nb_samples, nb_datasets = 3, 500, 5
dist = distributions.Gaussian(mu=npr.randn(dim), sigma=5. * np.diag(npr.rand(dim)))
data = [dist.rvs(size=nb_samples) for _ in range(nb_datasets)]
print("True mean" + "\n", dist.mu.T, "\n" + "True sig... | 38.176471 | 83 | 0.708783 |
f7afa3588ea56a3ac2f68d78af4cb8bf0cbfbb6a | 2,922 | py | Python | src/ros_cosypose/object_information_service.py | CentralLabFacilities/ros_cosypose | b45cc3a5bf1586d8d7e29d6bbc4e40ae92ac309e | [
"MIT"
] | 1 | 2021-06-10T15:08:22.000Z | 2021-06-10T15:08:22.000Z | src/ros_cosypose/object_information_service.py | CentralLabFacilities/ros_cosypose | b45cc3a5bf1586d8d7e29d6bbc4e40ae92ac309e | [
"MIT"
] | null | null | null | src/ros_cosypose/object_information_service.py | CentralLabFacilities/ros_cosypose | b45cc3a5bf1586d8d7e29d6bbc4e40ae92ac309e | [
"MIT"
] | 1 | 2021-06-11T21:50:26.000Z | 2021-06-11T21:50:26.000Z | """This module describes the ObjectRecognitionServer."""
import traceback
import os
import numpy as np
import rospy
import trimesh
from cosypose.datasets.datasets_cfg import make_urdf_dataset
from geometry_msgs.msg import Point
from object_recognition_msgs.msg import ObjectInformation
from object_recognition_msgs.srv... | 32.466667 | 87 | 0.595825 |
f7afacc130331fd42f1daf5fd23826a362b84bce | 52 | py | Python | tests/conftest.py | Rubilmax/python-p2p | ff12cd65a745cfb3828a4a692289a39e850e9114 | [
"MIT"
] | 2 | 2020-07-02T13:22:53.000Z | 2020-10-17T17:00:58.000Z | tests/conftest.py | Rubilmax/peerpy | ff12cd65a745cfb3828a4a692289a39e850e9114 | [
"MIT"
] | 1 | 2020-06-26T15:19:14.000Z | 2020-07-02T13:21:54.000Z | tests/conftest.py | Rubilmax/python-p2p | ff12cd65a745cfb3828a4a692289a39e850e9114 | [
"MIT"
] | null | null | null | import peerpy
peerpy.protocol.default_timeout = .4
| 13 | 36 | 0.807692 |
f7afb8d287beaa63028c47d6e395c36210d00ba8 | 10,662 | py | Python | tensorflow/python/training/training.py | smarthi/tensorflow | 55b01593515817992821423fec19733bca91c918 | [
"Apache-2.0"
] | 2 | 2019-10-09T08:06:48.000Z | 2021-01-07T03:16:09.000Z | tensorflow/python/training/training.py | gjmulder/tensorflow | 55b01593515817992821423fec19733bca91c918 | [
"Apache-2.0"
] | 1 | 2017-02-06T08:12:22.000Z | 2017-02-06T08:12:22.000Z | tensorflow/python/training/training.py | gjmulder/tensorflow | 55b01593515817992821423fec19733bca91c918 | [
"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... | 38.352518 | 97 | 0.8142 |
f7afcd7fb4f75c01cb4195af86c3d7a6d3b0763b | 4,728 | py | Python | docs/source/examples/tutorial-02-diffusion-1D-solvers-FTCS.py | vxsharma-14/DIFFUS | d70633890b8fb2e7b3dde918eb13b263f7a035ef | [
"MIT"
] | 14 | 2021-01-28T06:52:15.000Z | 2021-03-05T01:34:30.000Z | docs/source/examples/tutorial-02-diffusion-1D-solvers-FTCS.py | vxsharma-14/project-NAnPack | fad644ec9a614605f84562745a317e5512db1d58 | [
"MIT"
] | 2 | 2021-01-22T22:55:08.000Z | 2021-01-22T22:56:13.000Z | docs/source/examples/tutorial-02-diffusion-1D-solvers-FTCS.py | vxsharma-14/DIFFUS | d70633890b8fb2e7b3dde918eb13b263f7a035ef | [
"MIT"
] | 2 | 2021-01-28T06:52:17.000Z | 2021-01-30T12:35:52.000Z | # ***********************************************************************
#
# FILE tutorial-02-diffusion-1D-solvers-FTCS.py
#
# AUTHOR Dr. Vishal Sharma
#
# VERSION 1.0.0-alpha4
#
# WEBSITE https://github.com/vxsharma-14/project-NAnPack
#
# NAnPack Learner's Edition is dist... | 36.369231 | 76 | 0.622673 |
f7afeb2fe6dc0e158d6f33985f0162b2e7d5005e | 40,173 | py | Python | appengine/findit/services/flake_issue_util.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | appengine/findit/services/flake_issue_util.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 7 | 2022-02-15T01:11:37.000Z | 2022-03-02T12:46:13.000Z | appengine/findit/services/flake_issue_util.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2018 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Utilities for assisting in bug management for flaky tests."""
from collections import defaultdict
import datetime
import logging
from google.appengine.ex... | 38.40631 | 80 | 0.736291 |
f7b0112ff7d86e7c32d8a62db8c3d6c14adf9e67 | 851 | py | Python | oscar/apps/wishlists/forms.py | makielab/django-oscar | 0a325cd0f04a4278201872b2e163868b72b6fabe | [
"BSD-3-Clause"
] | null | null | null | oscar/apps/wishlists/forms.py | makielab/django-oscar | 0a325cd0f04a4278201872b2e163868b72b6fabe | [
"BSD-3-Clause"
] | null | null | null | oscar/apps/wishlists/forms.py | makielab/django-oscar | 0a325cd0f04a4278201872b2e163868b72b6fabe | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from django import forms
from django.db.models import get_model
from django.forms.models import inlineformset_factory, fields_for_model
WishList = get_model('wishlists', 'WishList')
Line = get_model('wishlists', 'Line')
class WishListForm(forms.ModelForm):
def __init__(self, user, *args,... | 27.451613 | 71 | 0.687427 |
f7b01d39eb373ad89c6c3d622bb0bbbba7737998 | 65,589 | py | Python | cla-backend/cla/models/github_models.py | dealako/easycla | ba7c6e481361ee1f416f0a58df77d79745f07761 | [
"Apache-2.0",
"CC-BY-4.0",
"MIT"
] | null | null | null | cla-backend/cla/models/github_models.py | dealako/easycla | ba7c6e481361ee1f416f0a58df77d79745f07761 | [
"Apache-2.0",
"CC-BY-4.0",
"MIT"
] | 11 | 2020-10-19T22:54:29.000Z | 2021-01-11T03:46:27.000Z | cla-backend/cla/models/github_models.py | dealako/easycla | ba7c6e481361ee1f416f0a58df77d79745f07761 | [
"Apache-2.0",
"CC-BY-4.0",
"MIT"
] | null | null | null | # Copyright The Linux Foundation and each contributor to CommunityBridge.
# SPDX-License-Identifier: MIT
"""
Holds the GitHub repository service.
"""
import json
import os
import uuid
from typing import List, Union, Optional
import falcon
import github
from github import PullRequest
from github.GithubException import... | 48.728826 | 186 | 0.631478 |
f7b03b9b85836b50ff0dc6edc081ad68a6e75130 | 16,388 | py | Python | akamatsu/commands.py | rmed/akamatsu | 0dbcd2a67ce865d29fb7d7049e627d322ea8e361 | [
"MIT"
] | 10 | 2016-08-03T14:22:23.000Z | 2021-03-12T10:49:08.000Z | akamatsu/commands.py | rmed/akamatsu | 0dbcd2a67ce865d29fb7d7049e627d322ea8e361 | [
"MIT"
] | 27 | 2017-06-08T20:47:05.000Z | 2019-12-20T23:12:18.000Z | akamatsu/commands.py | rmed/akamatsu | 0dbcd2a67ce865d29fb7d7049e627d322ea8e361 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Akamatsu CMS
# https://github.com/rmed/akamatsu
#
# MIT License
#
# Copyright (c) 2020 Rafael Medina García <rafamedgar@gmail.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
... | 25.368421 | 81 | 0.552294 |
f7b03c9e2c56140fa7fc057338dcb208cb9d7e8e | 1,505 | py | Python | src/loggingConfig.py | SolOasis/SolOasisAPIServer- | 0a84cee99cfa91dab06f8a622b6c7ca4ba1c84a6 | [
"BSD-3-Clause"
] | null | null | null | src/loggingConfig.py | SolOasis/SolOasisAPIServer- | 0a84cee99cfa91dab06f8a622b6c7ca4ba1c84a6 | [
"BSD-3-Clause"
] | null | null | null | src/loggingConfig.py | SolOasis/SolOasisAPIServer- | 0a84cee99cfa91dab06f8a622b6c7ca4ba1c84a6 | [
"BSD-3-Clause"
] | null | null | null | import logging
from logging.handlers import TimedRotatingFileHandler
import os
formatter = logging.Formatter('%(asctime)s %(name)-12s ' +
'%(levelname)-8s %(message)s')
log_debug = True
# Unit of time interval
LOG_TIME_WHEN = "midnight"
# Chang log file interval
LOG_TIME_INTERVAL = 1
# Kee... | 30.1 | 75 | 0.645847 |
f7b0534601ea8eaf87964860e085d15a162157cf | 93 | py | Python | hbkit/libs/__init__.py | graycarl/hbk | d4c90807b2558a2b61fb1253d9804fbaf373443f | [
"MIT"
] | 1 | 2021-07-22T05:25:35.000Z | 2021-07-22T05:25:35.000Z | hbkit/libs/__init__.py | graycarl/hbk | d4c90807b2558a2b61fb1253d9804fbaf373443f | [
"MIT"
] | 37 | 2017-07-27T06:07:25.000Z | 2020-12-11T12:57:31.000Z | hbkit/libs/__init__.py | graycarl/hbk | d4c90807b2558a2b61fb1253d9804fbaf373443f | [
"MIT"
] | 1 | 2019-04-02T08:36:32.000Z | 2019-04-02T08:36:32.000Z | # -*- coding: utf-8 -*-
from . import config, datastructures, dns, fs, git, github # noqa
| 31 | 68 | 0.623656 |
f7b05bd03ec74e5584e2814b1517478c17ac0cc5 | 2,494 | py | Python | contrast/motors/PseudoMotor.py | alexbjorling/acquisition-framework | 4090381344aabca05155612845ba4e4a47455dc3 | [
"MIT"
] | null | null | null | contrast/motors/PseudoMotor.py | alexbjorling/acquisition-framework | 4090381344aabca05155612845ba4e4a47455dc3 | [
"MIT"
] | 2 | 2018-09-19T06:49:03.000Z | 2019-06-28T10:47:37.000Z | contrast/motors/PseudoMotor.py | alexbjorling/acquisition-framework | 4090381344aabca05155612845ba4e4a47455dc3 | [
"MIT"
] | null | null | null | """
Provides base and example classes for pseudo motors, which are
combinations of other motors.
"""
from . import Motor
class PseudoMotor(Motor):
"""
Pseudo motor base class.
"""
def __init__(self, motors, dry_run=False, *args, **kwargs):
"""
Abstract base class for pseudo motors. Th... | 28.022472 | 88 | 0.619888 |
f7b0799796f778fac33c872937e3557980baf13c | 13,949 | py | Python | strawberryfields/backends/fockbackend/backend.py | SubhashishQPIT/strawberryfields | dae6ae8b1b3eb188fc2c874bd6c943bebf697ab9 | [
"Apache-2.0"
] | 646 | 2018-03-26T15:12:35.000Z | 2022-03-21T18:52:42.000Z | strawberryfields/backends/fockbackend/backend.py | SubhashishQPIT/strawberryfields | dae6ae8b1b3eb188fc2c874bd6c943bebf697ab9 | [
"Apache-2.0"
] | 666 | 2018-03-27T20:21:27.000Z | 2022-03-25T18:35:33.000Z | strawberryfields/backends/fockbackend/backend.py | SubhashishQPIT/strawberryfields | dae6ae8b1b3eb188fc2c874bd6c943bebf697ab9 | [
"Apache-2.0"
] | 182 | 2018-04-11T17:09:39.000Z | 2022-03-29T15:38:43.000Z | # Copyright 2019 Xanadu Quantum 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 agre... | 42.269697 | 151 | 0.646856 |
f7b0a329971e6a6eb5d58ece62dffbe5a67e5a00 | 32,162 | py | Python | coral_model/utils.py | pmjherman/CoralModel | 37fe169448052f46c4aec858c6e414070edf14b1 | [
"MIT"
] | null | null | null | coral_model/utils.py | pmjherman/CoralModel | 37fe169448052f46c4aec858c6e414070edf14b1 | [
"MIT"
] | null | null | null | coral_model/utils.py | pmjherman/CoralModel | 37fe169448052f46c4aec858c6e414070edf14b1 | [
"MIT"
] | null | null | null | """
coral_model - utils
@author: Gijs G. Hendrickx
@contributor: Peter M.J. Herman
"""
import os
# TODO: Restructure all utils-related files, methods, and methods.
import numpy as np
from netCDF4 import Dataset
class SpaceTime:
"""Spacetime-object, which validates the definition of the spacetime dimensions."""
... | 38.563549 | 143 | 0.563149 |
f7b0aefb39866683031651025a6c8471fd3e345a | 748 | py | Python | examples/dot3k/basic/bargraph.py | axelsimon/displayotron | 42315c47eb50d2f95d1fcade389ff57ad73e1b83 | [
"MIT"
] | 49 | 2017-06-07T05:09:23.000Z | 2021-10-08T14:32:05.000Z | examples/dot3k/basic/bargraph.py | axelsimon/displayotron | 42315c47eb50d2f95d1fcade389ff57ad73e1b83 | [
"MIT"
] | 19 | 2017-08-07T21:17:00.000Z | 2022-01-07T09:02:42.000Z | examples/dot3k/basic/bargraph.py | axelsimon/displayotron | 42315c47eb50d2f95d1fcade389ff57ad73e1b83 | [
"MIT"
] | 22 | 2017-06-07T05:09:25.000Z | 2021-08-17T10:52:58.000Z | #!/usr/bin/env python
import time
import dot3k.backlight as backlight
import dot3k.lcd as lcd
print("""
This example shows you different ways of setting the bargraph.
You should see the graph light up in sequence and then fade in.
Press CTRL+C to exit.
""")
# Clear the LCD and display Hello World
lcd.clear()
lcd... | 18.243902 | 63 | 0.709893 |
f7b0d7568c0cb6086acdc57366e887e40b192e1e | 23,835 | py | Python | train/paths_lstm_classifier_tf.py | vered1986/LexNET | 4beb38119bd7bc367154f56e2e16012420959717 | [
"Apache-2.0"
] | 62 | 2016-10-26T02:04:57.000Z | 2022-02-08T20:24:57.000Z | train/paths_lstm_classifier_tf.py | vered1986/LexNET | 4beb38119bd7bc367154f56e2e16012420959717 | [
"Apache-2.0"
] | 11 | 2017-06-02T17:59:31.000Z | 2021-04-02T23:57:29.000Z | train/paths_lstm_classifier_tf.py | vered1986/LexNET | 4beb38119bd7bc367154f56e2e16012420959717 | [
"Apache-2.0"
] | 22 | 2016-10-21T01:51:31.000Z | 2021-03-05T20:15:15.000Z | import os
os.environ['TF_CPP_MIN_LOG_LEVEL']='2'
import math
import json
import tensorflow as tf
from lstm_common import *
from sklearn import metrics
from sklearn.base import BaseEstimator
NUM_LAYERS = 2
LSTM_HIDDEN_DIM = 60
LEMMA_DIM = 50
POS_DIM = 4
DEP_DIM = 5
DIR_DIM = 1
EMPTY_PATH = ((0, 0, 0, 0),)
MAX_PATH_... | 45.573614 | 127 | 0.663604 |
f7b0fa38965abe2b57d5c112d53b312890ddc086 | 3,615 | py | Python | amg/tests/test_fgdcmetadata.py | ladoramkershner/automated-metadata-generation | 38890c77f9224b9d769ad30796fd25afd60fd5bd | [
"CC0-1.0"
] | null | null | null | amg/tests/test_fgdcmetadata.py | ladoramkershner/automated-metadata-generation | 38890c77f9224b9d769ad30796fd25afd60fd5bd | [
"CC0-1.0"
] | null | null | null | amg/tests/test_fgdcmetadata.py | ladoramkershner/automated-metadata-generation | 38890c77f9224b9d769ad30796fd25afd60fd5bd | [
"CC0-1.0"
] | null | null | null | import os
import xml.etree.ElementTree as ET
import pytest
from amg import fgdcmetadata as fgdc
@pytest.fixture
def fgdc_metadata_equi(datadir):
return fgdc.FGDCMetadata(os.path.join(datadir, 'fgdc_template.xml'), proj='equirect')
@pytest.fixture
def fgdc_metadata_ortho(datadir):
return fgdc.FGDCMetadata(os... | 36.887755 | 98 | 0.650069 |
f7b10cabf9d35a36a3572c1ef69b8e26fa94986a | 296 | py | Python | tests/test_scripts.py | jefalon/WindSE | bf7e0dbad85552b32327bda2b5c29a0fac5286bb | [
"Apache-2.0"
] | 35 | 2019-07-14T17:08:10.000Z | 2022-03-15T11:09:44.000Z | tests/test_scripts.py | jefalon/WindSE | bf7e0dbad85552b32327bda2b5c29a0fac5286bb | [
"Apache-2.0"
] | 45 | 2020-11-16T16:40:12.000Z | 2022-03-30T20:04:37.000Z | tests/test_scripts.py | jefalon/WindSE | bf7e0dbad85552b32327bda2b5c29a0fac5286bb | [
"Apache-2.0"
] | 21 | 2020-02-11T12:01:36.000Z | 2022-03-18T19:07:14.000Z | # import pathlib
# import runpy
# import pytest
# scripts = pathlib.Path(__file__, '..').resolve().glob('*/*.py')
# @pytest.mark.parametrize('script', scripts, ids=lambda script: script.parts[-2]+"/"+script.parts[-1])
# def test_script_execution(script):
# runpy.run_path(script.as_posix()) | 32.888889 | 103 | 0.692568 |
f7b11a0f953c9ef8f0d67f27bac0c25bf79c65ca | 3,609 | py | Python | main.py | fbr1/textmining-eac | d35965fad15a54765c29afe76c98d2a634b36ef0 | [
"MIT"
] | null | null | null | main.py | fbr1/textmining-eac | d35965fad15a54765c29afe76c98d2a634b36ef0 | [
"MIT"
] | null | null | null | main.py | fbr1/textmining-eac | d35965fad15a54765c29afe76c98d2a634b36ef0 | [
"MIT"
] | null | null | null | import numpy as np
import scipy.cluster.hierarchy as hr
import scipy.spatial as spa
import clustering
import matplotlib.pyplot as plt
from sklearn.cluster import AgglomerativeClustering
import filter
class textMiningEac:
def __init__(self,k,N,low,high=0):
self.k = k
# Leer datos desde ... | 34.701923 | 129 | 0.52951 |
f7b13b12197c11aaf9abafcce8259713a993ae15 | 757 | py | Python | tests/xlfunctions_vs_excel/double_minus_test.py | ckp95/xlcalculator | 8f3f04a2a0a2ecb12c3d5837a5b13519137ae427 | [
"MIT"
] | 54 | 2020-04-26T09:18:29.000Z | 2022-03-30T08:47:45.000Z | tests/xlfunctions_vs_excel/double_minus_test.py | st-lo/xlcalculator | 19190ec90e948b7ab1eceb06448b96cc1728bc51 | [
"MIT"
] | 41 | 2020-05-04T04:12:36.000Z | 2022-01-31T02:41:05.000Z | tests/xlfunctions_vs_excel/double_minus_test.py | st-lo/xlcalculator | 19190ec90e948b7ab1eceb06448b96cc1728bc51 | [
"MIT"
] | 21 | 2020-05-21T20:49:23.000Z | 2022-02-20T14:15:56.000Z | from .. import testing
class DoubleMinusTest(testing.FunctionalTestCase):
filename = "double_minus.xlsx"
def test_evaluation_double_unary_A_eq_B(self):
excel_value = self.evaluator.get_cell_value('Sheet1!A1')
value = self.evaluator.evaluate('Sheet1!A1')
self.assertEqual(excel_value, v... | 36.047619 | 64 | 0.721268 |
f7b15f42fe742d07884507791def62afafd037ea | 135,807 | py | Python | leafmap/common.py | irrelevantRyan/leafmap | 20c349b69c057881846a7c174c1970edcba11d81 | [
"MIT"
] | null | null | null | leafmap/common.py | irrelevantRyan/leafmap | 20c349b69c057881846a7c174c1970edcba11d81 | [
"MIT"
] | null | null | null | leafmap/common.py | irrelevantRyan/leafmap | 20c349b69c057881846a7c174c1970edcba11d81 | [
"MIT"
] | null | null | null | """This module contains some common functions for both folium and ipyleaflet.
"""
import csv
import os
import requests
import shutil
import tarfile
import urllib.request
import zipfile
import folium
import ipyleaflet
import ipywidgets as widgets
import whitebox
from IPython.display import display, IFrame
class Titil... | 33.359617 | 311 | 0.622508 |
f7b1926403f7f5a9f3c352b3f1aebe697121c5e2 | 717 | py | Python | chapter11/02 Stock Item class failed.py | munnep/begin_to_code_with_python | 3ef14d90785526b6b26d262a7627eee73791d7d0 | [
"MIT"
] | null | null | null | chapter11/02 Stock Item class failed.py | munnep/begin_to_code_with_python | 3ef14d90785526b6b26d262a7627eee73791d7d0 | [
"MIT"
] | null | null | null | chapter11/02 Stock Item class failed.py | munnep/begin_to_code_with_python | 3ef14d90785526b6b26d262a7627eee73791d7d0 | [
"MIT"
] | null | null | null | # EG11-02 Stock Item class failed
class StockItem(object):
'''
Stock item for the fashion shop
'''
def __init__(self, stock_ref, price, color):
self.stock_ref = stock_ref
self.__price = price
self.__stock_level = 0
self.color = color
@property
def price(self)... | 21.088235 | 77 | 0.62901 |
f7b1db1433b2ee9f10c9fbae2d91d4fa1d63f3de | 8,875 | py | Python | bulk_analysis_figs.py | dgketchum/irr_impacts | 4a09296eb5cc6f36b63ecd4ca2a82b075e1581d5 | [
"Apache-2.0"
] | null | null | null | bulk_analysis_figs.py | dgketchum/irr_impacts | 4a09296eb5cc6f36b63ecd4ca2a82b075e1581d5 | [
"Apache-2.0"
] | null | null | null | bulk_analysis_figs.py | dgketchum/irr_impacts | 4a09296eb5cc6f36b63ecd4ca2a82b075e1581d5 | [
"Apache-2.0"
] | null | null | null | import os
from calendar import monthrange
from datetime import date
from matplotlib import rcParams, pyplot as plt
from pandas import read_csv, concat
import numpy as np
from hydrograph import hydrograph
from county_list import included_counties
from state_county_names_codes import state_fips_code, state_county_code
... | 39.096916 | 108 | 0.535549 |
f7b2084aadfe41a6496302572712001b4ceb9e87 | 159 | py | Python | example/postgres_tests/apps.py | netzkolchose/django-fast-update | 13bfd99b3ac90d3fc04fde1c3350f84dae7a4be4 | [
"MIT"
] | null | null | null | example/postgres_tests/apps.py | netzkolchose/django-fast-update | 13bfd99b3ac90d3fc04fde1c3350f84dae7a4be4 | [
"MIT"
] | null | null | null | example/postgres_tests/apps.py | netzkolchose/django-fast-update | 13bfd99b3ac90d3fc04fde1c3350f84dae7a4be4 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class PostgresTestsConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'postgres_tests'
| 22.714286 | 56 | 0.779874 |
f7b214ac67024119d1ad59aa759a757f404eab59 | 286 | py | Python | blog/pagination.py | florimondmanca/personal-api | 6300f965d3f51d1bf5f10cf1eb15d673bd627631 | [
"MIT"
] | 4 | 2018-08-17T08:06:06.000Z | 2020-02-20T15:15:56.000Z | blog/pagination.py | florimondmanca/personal-api | 6300f965d3f51d1bf5f10cf1eb15d673bd627631 | [
"MIT"
] | 2 | 2018-10-08T15:59:58.000Z | 2018-10-20T16:50:13.000Z | blog/pagination.py | florimondmanca/personal-api | 6300f965d3f51d1bf5f10cf1eb15d673bd627631 | [
"MIT"
] | 1 | 2019-09-14T23:15:10.000Z | 2019-09-14T23:15:10.000Z | """Blog pagination classes."""
from rest_framework.pagination import CursorPagination
class PostPagination(CursorPagination):
"""Pagination configuration for blog posts."""
page_size = 10 # Must be set, non-configurable by client
ordering = "-published" # The default
| 26 | 61 | 0.737762 |
f7b2311259269f8f279bb34f31067f473a5bf921 | 3,642 | py | Python | tests/lowlevel/test_ctle2.py | sgherbst/msdsl | e38d5ecdb88b3574bda62f22a4f91ce3e4173d12 | [
"MIT"
] | 15 | 2019-05-14T10:12:23.000Z | 2022-03-29T15:29:52.000Z | tests/lowlevel/test_ctle2.py | sgherbst/msdsl | e38d5ecdb88b3574bda62f22a4f91ce3e4173d12 | [
"MIT"
] | 19 | 2020-01-22T21:44:33.000Z | 2021-06-05T02:10:41.000Z | tests/lowlevel/test_ctle2.py | sgherbst/msdsl | e38d5ecdb88b3574bda62f22a4f91ce3e4173d12 | [
"MIT"
] | 5 | 2019-10-21T09:53:17.000Z | 2021-08-10T17:32:20.000Z | import pytest
import numpy as np
from pathlib import Path
from scipy.interpolate import interp1d
from scipy.signal import lfilter
from scipy.signal import cont2discrete
from msdsl.interp.interp import calc_interp_w
from msdsl.interp.lds import SplineLDS
from msdsl.interp.ctle import calc_ctle_abcd, calc_ctle_num_den
fr... | 35.705882 | 94 | 0.643328 |
f7b2431c6b0d449a940ac4f3cc5ed441ef346bd1 | 19,651 | py | Python | google/appengine/tools/appengine_rpc.py | luduvigo/app-blog-code | 2de41573955f8dfb5f6d964d3cae2bbee6db2f9a | [
"Apache-2.0"
] | null | null | null | google/appengine/tools/appengine_rpc.py | luduvigo/app-blog-code | 2de41573955f8dfb5f6d964d3cae2bbee6db2f9a | [
"Apache-2.0"
] | null | null | null | google/appengine/tools/appengine_rpc.py | luduvigo/app-blog-code | 2de41573955f8dfb5f6d964d3cae2bbee6db2f9a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#
# Copyright 2007 Google 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 o... | 32.861204 | 80 | 0.637372 |
f7b2be7cd2239e0d1b62b8c6cdcfb802b080ebe8 | 67,113 | py | Python | leviathan/leviathan.py | scottywz/leviathan-player | 31e19efd0e88959455371dd605981d98bddd388b | [
"Apache-2.0"
] | null | null | null | leviathan/leviathan.py | scottywz/leviathan-player | 31e19efd0e88959455371dd605981d98bddd388b | [
"Apache-2.0"
] | null | null | null | leviathan/leviathan.py | scottywz/leviathan-player | 31e19efd0e88959455371dd605981d98bddd388b | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
# Leviathan Music Manager
# A command-line utility to manage your music collection.
#
# Copyright (C) 2010-2013, 2020 S. Zeid
# https://code.s.zeid.me/leviathan
#
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU G... | 34.38166 | 100 | 0.658576 |
f7b2deaeb0b5e5133fda7bdfd21a0613f3a44f38 | 1,541 | py | Python | scripts/results/view_history.py | bagustris/emotion | 5bd83d3ca8a6eb930f449b7a990fefd75d0c7d36 | [
"MIT"
] | 3 | 2020-11-03T14:54:22.000Z | 2021-04-12T12:23:10.000Z | scripts/results/view_history.py | bagustris/emotion | 5bd83d3ca8a6eb930f449b7a990fefd75d0c7d36 | [
"MIT"
] | null | null | null | scripts/results/view_history.py | bagustris/emotion | 5bd83d3ca8a6eb930f449b7a990fefd75d0c7d36 | [
"MIT"
] | 2 | 2020-12-03T06:21:59.000Z | 2021-01-16T04:47:12.000Z | from pathlib import Path
import click
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from ertk.utils import PathlibPath
@click.command()
@click.argument("input", type=PathlibPath(exists=True, dir_okay=False))
@click.option("--individual", help="Plot individual folds for each metric.")
def ma... | 31.44898 | 79 | 0.617132 |
f7b2df4500f8c88d09a7af61f5946fd73fc576b0 | 2,842 | py | Python | deeppavlov/dataset_iterators/file_paths_iterator.py | ineersa/DeepPavlov | 8200bf9a0f0b378baad4ee0eb75b59453f516004 | [
"Apache-2.0"
] | 1 | 2019-05-22T08:34:33.000Z | 2019-05-22T08:34:33.000Z | deeppavlov/dataset_iterators/file_paths_iterator.py | ineersa/DeepPavlov | 8200bf9a0f0b378baad4ee0eb75b59453f516004 | [
"Apache-2.0"
] | null | null | null | deeppavlov/dataset_iterators/file_paths_iterator.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 applicab... | 37.893333 | 101 | 0.661858 |
f7b3037d70c1db3894a6ef1704049599311f3ff5 | 1,398 | py | Python | mediagoblin/tests/resources.py | acidburn0zzz/mediagoblin | 8fc57eaaa6e22358a1220a0baf589a4b20dd8cfe | [
"CC0-1.0"
] | 1 | 2018-12-19T00:05:55.000Z | 2018-12-19T00:05:55.000Z | mediagoblin/tests/resources.py | acidburn0zzz/mediagoblin | 8fc57eaaa6e22358a1220a0baf589a4b20dd8cfe | [
"CC0-1.0"
] | null | null | null | mediagoblin/tests/resources.py | acidburn0zzz/mediagoblin | 8fc57eaaa6e22358a1220a0baf589a4b20dd8cfe | [
"CC0-1.0"
] | null | null | null | # GNU MediaGoblin -- federated, autonomous media hosting
# Copyright (C) 2013 MediaGoblin contributors. See AUTHORS.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of... | 33.285714 | 80 | 0.756795 |
f7b30679025bd36da1ce7b65645102c452218cfd | 1,960 | py | Python | nova/cmd/baseproxy.py | ebalduf/nova-backports | 6bf97ec73467de522d34ab7a17ca0e0874baa7f9 | [
"Apache-2.0"
] | 1 | 2019-07-29T10:30:24.000Z | 2019-07-29T10:30:24.000Z | nova/cmd/baseproxy.py | ebalduf/nova-backports | 6bf97ec73467de522d34ab7a17ca0e0874baa7f9 | [
"Apache-2.0"
] | 11 | 2017-06-19T01:28:55.000Z | 2017-06-23T02:01:47.000Z | nova/cmd/baseproxy.py | ebalduf/nova-backports | 6bf97ec73467de522d34ab7a17ca0e0874baa7f9 | [
"Apache-2.0"
] | 7 | 2015-01-20T10:30:08.000Z | 2020-02-05T10:29:05.000Z | #
# Copyright (C) 2014 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... | 28.405797 | 78 | 0.704592 |
f7b311dad816aea435a622706c1904cda851c020 | 4,448 | py | Python | pollination_sdk/models/policy_subject.py | pollination/python-sdk | 599e8dbfc6e547c5e18aa903b27c70d7ffef84e5 | [
"RSA-MD"
] | 2 | 2020-01-30T23:28:59.000Z | 2020-05-06T16:43:47.000Z | pollination_sdk/models/policy_subject.py | pollination/python-sdk | 599e8dbfc6e547c5e18aa903b27c70d7ffef84e5 | [
"RSA-MD"
] | 1 | 2020-10-02T18:00:25.000Z | 2020-10-02T18:00:25.000Z | pollination_sdk/models/policy_subject.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... | 29.263158 | 103 | 0.592851 |
f7b3202c8226d14d72ad2b2e63f2e173e349c54b | 409 | py | Python | rinex_webservice/asgi.py | marcozecchini/rinex_webservice | f36e7175dcede93d3acefab988fc5916b24e10e6 | [
"Apache-2.0"
] | null | null | null | rinex_webservice/asgi.py | marcozecchini/rinex_webservice | f36e7175dcede93d3acefab988fc5916b24e10e6 | [
"Apache-2.0"
] | 4 | 2020-07-01T14:05:43.000Z | 2021-09-22T19:27:39.000Z | rinex_webservice/asgi.py | marcozecchini/rinex_webservice | f36e7175dcede93d3acefab988fc5916b24e10e6 | [
"Apache-2.0"
] | null | null | null | """
ASGI config for rinex_webservice project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJA... | 24.058824 | 78 | 0.794621 |
f7b34ce874df38063086215a4a968a889f3e794d | 700 | py | Python | mantistablex/signals.py | TvvH05ozL6/table-summarisation | 2549ec29844a6e2b7350a9ba37c0b45d1c76a5ba | [
"MIT"
] | 1 | 2021-12-06T10:35:14.000Z | 2021-12-06T10:35:14.000Z | mantistablex/signals.py | TvvH05ozL6/table-summarisation | 2549ec29844a6e2b7350a9ba37c0b45d1c76a5ba | [
"MIT"
] | null | null | null | mantistablex/signals.py | TvvH05ozL6/table-summarisation | 2549ec29844a6e2b7350a9ba37c0b45d1c76a5ba | [
"MIT"
] | null | null | null | from django.db.models.signals import post_migrate
from django.dispatch import receiver
from mantistablex.models import Tables
from mantistablex.process.utils.assets.assets import Assets
from mantistablex.process.utils.assets import importer
@receiver(post_migrate)
def on_init_db(**kwargs):
filenames = Assets().l... | 38.888889 | 82 | 0.732857 |
f7b374d3f222bbb2121f53ceb00c6016c7028e76 | 5,071 | py | Python | contrib/node/tests/python/pants_test/contrib/node/tasks/test_node_task.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | contrib/node/tests/python/pants_test/contrib/node/tasks/test_node_task.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | contrib/node/tests/python/pants_test/contrib/node/tasks/test_node_task.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import absolute_import, division, print_function, unicode_literals
import json
import os
import string
from textwrap import dedent
from pants.build_graph.t... | 33.582781 | 97 | 0.668113 |
f7b3a015a9af196b43f4cedc6cacecdb7a645e94 | 1,069 | py | Python | atom/proton/python/test/test_mortgage_calculator_home_price_request.py | AbhiGupta03/SDK | f3a61aae7a847f07f0c22a154ca88dc378e9d25e | [
"Apache-2.0"
] | 11 | 2019-04-16T02:11:17.000Z | 2021-12-16T22:51:40.000Z | atom/proton/python/test/test_mortgage_calculator_home_price_request.py | AbhiGupta03/SDK | f3a61aae7a847f07f0c22a154ca88dc378e9d25e | [
"Apache-2.0"
] | 81 | 2019-11-19T23:24:28.000Z | 2022-03-28T11:35:47.000Z | atom/proton/python/test/test_mortgage_calculator_home_price_request.py | AbhiGupta03/SDK | f3a61aae7a847f07f0c22a154ca88dc378e9d25e | [
"Apache-2.0"
] | 11 | 2020-07-08T02:29:56.000Z | 2022-03-28T10:05:33.000Z | # coding: utf-8
"""
Hydrogen Proton API
Financial engineering module of Hydrogen Atom # noqa: E501
OpenAPI spec version: 1.9.2
Contact: info@hydrogenplatform.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import... | 26.073171 | 125 | 0.752105 |
f7b3a4416e82efe42d042f1f27ee5260a03c0b7b | 8,362 | py | Python | encoder.py | lebyanelm/mf_code | 88b5d28224d6fc29d0b26a3011d046f30bdcedc8 | [
"Apache-2.0"
] | null | null | null | encoder.py | lebyanelm/mf_code | 88b5d28224d6fc29d0b26a3011d046f30bdcedc8 | [
"Apache-2.0"
] | null | null | null | encoder.py | lebyanelm/mf_code | 88b5d28224d6fc29d0b26a3011d046f30bdcedc8 | [
"Apache-2.0"
] | null | null | null | """
GENARATES A MACHINE READABLE CODE THAT CAN STORE A USER'S USERNAME, TO EFFICIENTLY FIND
THIER PROFILES AND SOCIAL MEDIA LINKS. FORMAT THE DATA WILL BE STORED IN IS MORSE CODE.
THEN WILL USE THE HELP BINARY FORMAT TO ASSIST WITH THE DECODING.
MORSE CODE FORMATTING RULES FOR THE FACE CODE: (NAME :=> SIZE :=> MEANING... | 37.666667 | 124 | 0.618393 |
f7b3a6319aa3274655cec54b3e171c54f33b88e1 | 5,524 | py | Python | source/job-builder/m2c2-job-builder/m2c2_json_checks.py | guikcd/machine-to-cloud-connectivity-framework | 83de873d4df58224f73c6263239681fdd5246186 | [
"Apache-2.0",
"MIT"
] | null | null | null | source/job-builder/m2c2-job-builder/m2c2_json_checks.py | guikcd/machine-to-cloud-connectivity-framework | 83de873d4df58224f73c6263239681fdd5246186 | [
"Apache-2.0",
"MIT"
] | null | null | null | source/job-builder/m2c2-job-builder/m2c2_json_checks.py | guikcd/machine-to-cloud-connectivity-framework | 83de873d4df58224f73c6263239681fdd5246186 | [
"Apache-2.0",
"MIT"
] | null | null | null | ## Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
## SPDX-License-Identifier: Apache-2.0
import json
import m2c2_globals as var
import logging
import os
import m2c2_post_handler as post
import m2c2_globals as var
import m2c2_protocol_converter as build
import m2c2_utils as utils
logger = log... | 35.63871 | 169 | 0.590876 |
f7b3be1da9a518807f82ca2571842132a41e8238 | 5,857 | py | Python | lampe/simulators/hh.py | francois-rozet/lampe | 50e53c767ee5d98502ec8520b3bca554f2169eb7 | [
"MIT"
] | 3 | 2022-03-20T19:23:27.000Z | 2022-03-25T06:55:28.000Z | lampe/simulators/hh.py | francois-rozet/lampe | 50e53c767ee5d98502ec8520b3bca554f2169eb7 | [
"MIT"
] | null | null | null | lampe/simulators/hh.py | francois-rozet/lampe | 50e53c767ee5d98502ec8520b3bca554f2169eb7 | [
"MIT"
] | null | null | null | r"""Hodgkin-Huxley (HH) benchmark.
HH is a widespread non-linear mechanistic model of neural dynamics.
References:
A quantitative description of membrane current and its application to conduction and excitation in nerve
(Hodgkin et al., 1952)
https://link.springer.com/article/10.1007/BF02459568
Train... | 26.866972 | 108 | 0.527915 |
f7b4173d1a97385617b3027a33756539dd79b189 | 2,754 | py | Python | hytra/plugins/image_provider/dvid_image_loader.py | m-novikov/hytra | 0dc28deaa2571fa8bea63ca178f0e53cc1cd7508 | [
"MIT"
] | null | null | null | hytra/plugins/image_provider/dvid_image_loader.py | m-novikov/hytra | 0dc28deaa2571fa8bea63ca178f0e53cc1cd7508 | [
"MIT"
] | null | null | null | hytra/plugins/image_provider/dvid_image_loader.py | m-novikov/hytra | 0dc28deaa2571fa8bea63ca178f0e53cc1cd7508 | [
"MIT"
] | null | null | null | from hytra.pluginsystem import image_provider_plugin
import numpy as np
from libdvid import DVIDNodeService
try:
import json_tricks as json
except ImportError:
import json
class DvidImageLoader(image_provider_plugin.ImageProviderPlugin):
"""
Computes the subtraction of features in the feature vector
... | 34 | 82 | 0.664488 |
f7b451c89633bc11495e163dc993c5694e9e11a7 | 242 | py | Python | multp_table.py | abdullahi318/learn-python | 62ea4750ff291c9be90362018f77047e1af9d63d | [
"MIT"
] | null | null | null | multp_table.py | abdullahi318/learn-python | 62ea4750ff291c9be90362018f77047e1af9d63d | [
"MIT"
] | 2 | 2021-04-17T10:22:21.000Z | 2021-04-25T11:36:08.000Z | multp_table.py | abdullahi318/learn-python | 62ea4750ff291c9be90362018f77047e1af9d63d | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Multiplication table (from 2 to 6)
numbers = [2,3,4,5,6]
for num in numbers:
# Iterate 12 times from i = 1 to 12
for i in range(1, 13):
print(i, 'x', num, '=', num*i, end="\t")
| 16.133333 | 48 | 0.520661 |
f7b494ea900dd5c502c5cda9710c60017670828e | 2,205 | py | Python | src/rubrix/client/sdk/text2text/api.py | sakares/rubrix | 791ffb29815b5d24f2bbbb0fa422f85f8b30098f | [
"Apache-2.0"
] | null | null | null | src/rubrix/client/sdk/text2text/api.py | sakares/rubrix | 791ffb29815b5d24f2bbbb0fa422f85f8b30098f | [
"Apache-2.0"
] | null | null | null | src/rubrix/client/sdk/text2text/api.py | sakares/rubrix | 791ffb29815b5d24f2bbbb0fa422f85f8b30098f | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2021-present, the Recognai S.L. 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 ... | 31.5 | 84 | 0.709751 |
f7b498a9d4de4833baf3ef5466a70e70013f6e8d | 5,908 | py | Python | python/odml/scripts/rdf_crcns_query.py | mpsonntag/snippets | fc3cc42ea49b885c1f29c0aef1379055a931a978 | [
"BSD-3-Clause"
] | null | null | null | python/odml/scripts/rdf_crcns_query.py | mpsonntag/snippets | fc3cc42ea49b885c1f29c0aef1379055a931a978 | [
"BSD-3-Clause"
] | null | null | null | python/odml/scripts/rdf_crcns_query.py | mpsonntag/snippets | fc3cc42ea49b885c1f29c0aef1379055a931a978 | [
"BSD-3-Clause"
] | null | null | null | """
Example queries of a CRCNS data RDF graph.
"""
import os
import pathlib
from odml.tools.rdf_converter import ODML_NS
from rdflib import Graph, Namespace, RDF, RDFS
from rdflib.plugins.sparql import prepareQuery
# Prepare graph from RDF file.
CURR_PATH = pathlib.Path(__file__).parent.resolve()
FILE_NAME = "rdf_c... | 32.640884 | 87 | 0.629993 |
f7b49d161b007ccbe4c47a1daaa6afb12c1ba920 | 2,678 | py | Python | testing methods/testing_angle_based.py | jainyk/package-outlier | f1f8206f0d01ad7bf1b25f2cf551381ebe0ba1ed | [
"MIT"
] | 2 | 2020-12-21T08:50:46.000Z | 2021-06-29T08:23:54.000Z | testing methods/testing_angle_based.py | jainyk/package-outlier | f1f8206f0d01ad7bf1b25f2cf551381ebe0ba1ed | [
"MIT"
] | 2 | 2020-11-30T15:56:37.000Z | 2020-12-27T12:36:21.000Z | testing methods/testing_angle_based.py | jainyk/package-outlier | f1f8206f0d01ad7bf1b25f2cf551381ebe0ba1ed | [
"MIT"
] | 1 | 2020-11-30T06:17:32.000Z | 2020-11-30T06:17:32.000Z | import scipy
import scipy.stats as ss
import numpy as np
import matplotlib
import pandas as pd
import random
import math
def iqr_threshold_method(scores, margin):
q1 = np.percentile(scores, 25, interpolation='midpoint')
q3 = np.percentile(scores, 75, interpolation='midpoint')
iqr = q3-q1
lower_range =... | 29.428571 | 102 | 0.672517 |
f7b4eb1a33469466e806be09feb6fb0356cdfc01 | 2,909 | py | Python | cities_light/geonames.py | affan2/django-cities-light | 5b65d47adc63e203879dc55bff5a360380adc5e4 | [
"MIT"
] | 4 | 2015-10-05T09:20:35.000Z | 2019-07-30T17:47:03.000Z | cities_light/geonames.py | affan2/django-cities-light | 5b65d47adc63e203879dc55bff5a360380adc5e4 | [
"MIT"
] | 1 | 2020-01-25T13:02:17.000Z | 2020-01-25T13:02:17.000Z | cities_light/geonames.py | gpichot/django-cities-light | d0e5891fd7505c588e39304b961de96aeef7dfb5 | [
"MIT"
] | 2 | 2019-11-29T15:55:46.000Z | 2020-01-08T09:06:33.000Z | from __future__ import unicode_literals
import six
import time
import os
import os.path
import zipfile
import logging
try:
from urllib.request import urlopen
except ImportError:
from urllib import urlopen
from .settings import *
class Geonames(object):
logger = logging.getLogger('cities_light')
de... | 29.383838 | 73 | 0.596769 |
f7b4eb7d9977e3ec676340fb40beb96bc23a309e | 5,491 | py | Python | backend/corpora/lambdas/api/v1/dataset.py | HumanCellAtlas/dcp-prototype | 44ca66a266004124f39d7d3e3dd75e9076012ff0 | [
"MIT"
] | 2 | 2020-02-07T18:12:12.000Z | 2020-02-11T14:59:03.000Z | backend/corpora/lambdas/api/v1/dataset.py | HumanCellAtlas/dcp-prototype | 44ca66a266004124f39d7d3e3dd75e9076012ff0 | [
"MIT"
] | 173 | 2020-01-29T17:48:02.000Z | 2020-03-20T02:52:58.000Z | backend/corpora/lambdas/api/v1/dataset.py | HumanCellAtlas/dcp-prototype | 44ca66a266004124f39d7d3e3dd75e9076012ff0 | [
"MIT"
] | null | null | null | from flask import make_response, jsonify, g
from .common import delete_dataset_common
from ....common.corpora_orm import CollectionVisibility, DatasetArtifactFileType
from ....common.entities import Dataset, Collection
from ....common.entities.geneset import GenesetDatasetLink
from ....api_server.db import dbconnect
f... | 33.895062 | 119 | 0.716263 |
f7b50e34d05f4bc4b0d1bb3d59b7080ad425c19b | 3,573 | py | Python | model_prototype/utils/data_transformation_utils.py | EfficientAI/efficient_cv | e308f229e4d99da86ad56f87f3a78b2c81f27ca5 | [
"MIT"
] | null | null | null | model_prototype/utils/data_transformation_utils.py | EfficientAI/efficient_cv | e308f229e4d99da86ad56f87f3a78b2c81f27ca5 | [
"MIT"
] | null | null | null | model_prototype/utils/data_transformation_utils.py | EfficientAI/efficient_cv | e308f229e4d99da86ad56f87f3a78b2c81f27ca5 | [
"MIT"
] | null | null | null | import numpy as np
from scipy.signal import resample
from sklearn.preprocessing import StandardScaler
from sklearn.preprocessing import MinMaxScaler
from sklearn.preprocessing import RobustScaler
def upsample_signal(data, sampling_factor, sampler=None):
"""
data is a time series sequence(nd_array) numpy data
... | 29.528926 | 79 | 0.646516 |
f7b517b3b0a7f4b64e5f5b7b2a02b8580f758f74 | 135,106 | py | Python | aux_gps.py | mfkiwl/PW_from_GPS | fa0b0b9e1325a055ce884f79c14d24148348886b | [
"MIT"
] | null | null | null | aux_gps.py | mfkiwl/PW_from_GPS | fa0b0b9e1325a055ce884f79c14d24148348886b | [
"MIT"
] | null | null | null | aux_gps.py | mfkiwl/PW_from_GPS | fa0b0b9e1325a055ce884f79c14d24148348886b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Jun 10 14:33:19 2019
@author: ziskin
"""
from PW_paths import work_yuval
from pathlib import Path
cwd = Path().cwd()
# TODO: build curve fit tool with various function model: power, sum of sin ...
# TODO: no need to build it, use lmfit instead:
# TODO: ... | 38.176321 | 176 | 0.588945 |
f7b51d23c8d001928f8fddde07c78665da4be10a | 4,118 | py | Python | src/epivizFileParser/GtfParsedFile.py | epiviz/parser | 255dc6409db3f55b6f967df079ada469862cd02c | [
"MIT"
] | 4 | 2018-09-14T19:00:16.000Z | 2020-04-08T07:58:34.000Z | src/epivizFileParser/GtfParsedFile.py | epiviz/parser | 255dc6409db3f55b6f967df079ada469862cd02c | [
"MIT"
] | 6 | 2019-04-27T21:08:49.000Z | 2021-12-21T01:03:11.000Z | src/epivizFileParser/GtfParsedFile.py | epiviz/epivizFileParser | bba301db40458b6666653c77a446db8778ee07f8 | [
"MIT"
] | 2 | 2021-01-11T17:09:24.000Z | 2021-01-28T16:17:11.000Z | import pysam
from .utils import toDataFrame
from .Helper import get_range_helper
import pandas as pd
from aiocache import cached, Cache
from aiocache.serializers import JsonSerializer, PickleSerializer
__author__ = "Jayaram Kancherla"
__copyright__ = "jkanche"
__license__ = "mit"
class GtfParsedFile(object):
"""... | 35.196581 | 129 | 0.560223 |
f7b52adcabd771e84551775bd6cf88c11793bb4a | 2,375 | py | Python | main.py | feverra/fakku-downloader | 4ac8494ea2e82ce5247584c6b0daa8279dcb0b2d | [
"MIT"
] | null | null | null | main.py | feverra/fakku-downloader | 4ac8494ea2e82ce5247584c6b0daa8279dcb0b2d | [
"MIT"
] | null | null | null | main.py | feverra/fakku-downloader | 4ac8494ea2e82ce5247584c6b0daa8279dcb0b2d | [
"MIT"
] | null | null | null | import argparse
from downloader import (FDownloader,
program_exit,
TIMEOUT,
URLS_FILE,
COOKIES_FILE,
)
def main():
argparser = argparse.ArgumentParser()
argparser.add_argument(
"-f",
... | 30.844156 | 92 | 0.566316 |
f7b570e810d3935408f1565455ede3d9181bdfc7 | 9,841 | py | Python | flow_models/lib/kde.py | piotrjurkiewicz/flow_stats | cc97a8381275cb9dd23ed0c3432abffaf4198431 | [
"MIT"
] | 9 | 2019-07-08T09:53:22.000Z | 2021-11-19T07:50:11.000Z | flow_models/lib/kde.py | ElsevierSoftwareX/SOFTX-D-21-00003 | cc97a8381275cb9dd23ed0c3432abffaf4198431 | [
"MIT"
] | 1 | 2021-02-23T16:01:21.000Z | 2021-04-03T02:06:32.000Z | flow_models/lib/kde.py | ElsevierSoftwareX/SOFTX-D-21-00003 | cc97a8381275cb9dd23ed0c3432abffaf4198431 | [
"MIT"
] | 5 | 2019-09-27T14:52:54.000Z | 2022-01-25T07:58:24.000Z | # Taken from SciPy
# scipy/stats/kde.py at 79ed161bf603dc3af3986efe7064df79212c4dd4
# Weighted KDE computation based on:
# https://stackoverflow.com/a/27623920/2178047
# https://gist.github.com/tillahoffmann/f844bce2ec264c1c8cb5
# Weighted KDE computation using FFT based on:
# https://github.com/scipy/scipy/issues/61... | 37.561069 | 146 | 0.574738 |
f7b57b10889a8a348dce05812f167951e10ad87b | 21,571 | py | Python | pex/vendor/_vendored/setuptools/setuptools/config.py | tdyas/pex | e2d6bab09f8e9245f608402a904421268223ee58 | [
"Apache-2.0"
] | 2,160 | 2015-01-06T17:57:39.000Z | 2022-03-30T19:59:01.000Z | pex/vendor/_vendored/setuptools/setuptools/config.py | tdyas/pex | e2d6bab09f8e9245f608402a904421268223ee58 | [
"Apache-2.0"
] | 1,242 | 2015-01-22T14:56:46.000Z | 2022-03-31T18:02:38.000Z | pex/vendor/_vendored/setuptools/setuptools/config.py | tdyas/pex | e2d6bab09f8e9245f608402a904421268223ee58 | [
"Apache-2.0"
] | 248 | 2015-01-15T13:34:50.000Z | 2022-03-26T01:24:18.000Z | from __future__ import absolute_import, unicode_literals
import io
import os
import sys
import warnings
import functools
from collections import defaultdict
from functools import partial
from functools import wraps
from importlib import import_module
from distutils.errors import DistutilsOptionError, DistutilsFileErr... | 31.53655 | 93 | 0.619026 |
f7b5ce746a25e68e44781ab45e0d44ef9058f366 | 1,646 | py | Python | model/models/classifier.py | elviva404/food-detection-yolov5 | 796a0c1df6e9c9a705dff7782b3f9b213344f11b | [
"MIT"
] | 24 | 2021-08-09T00:47:22.000Z | 2022-03-06T09:38:48.000Z | model/models/classifier.py | elviva404/food-detection-yolov5 | 796a0c1df6e9c9a705dff7782b3f9b213344f11b | [
"MIT"
] | 3 | 2021-07-19T16:01:37.000Z | 2022-03-03T07:09:03.000Z | model/models/classifier.py | elviva404/food-detection-yolov5 | 796a0c1df6e9c9a705dff7782b3f9b213344f11b | [
"MIT"
] | 8 | 2021-11-08T12:39:05.000Z | 2022-01-30T14:59:37.000Z | import torch
from .base_model import BaseModel
class Classifier(BaseModel):
def __init__(self, model, **kwargs):
super(Classifier, self).__init__(**kwargs)
self.model = model
self.model_name = self.model.name
if self.optimizer is not None:
self.optimizer = self.optimizer... | 34.291667 | 75 | 0.602673 |
f7b5edc1fbdcf8011517a8210cf3fd98ff72c527 | 3,886 | py | Python | configs/top_down/resnet/coco/res152_coco_256x192.py | irvingzhang0512/mmpose | 17557522ce3e41f830973079c5b4321935c41439 | [
"Apache-2.0"
] | null | null | null | configs/top_down/resnet/coco/res152_coco_256x192.py | irvingzhang0512/mmpose | 17557522ce3e41f830973079c5b4321935c41439 | [
"Apache-2.0"
] | null | null | null | configs/top_down/resnet/coco/res152_coco_256x192.py | irvingzhang0512/mmpose | 17557522ce3e41f830973079c5b4321935c41439 | [
"Apache-2.0"
] | null | null | null | log_level = 'INFO'
load_from = None
resume_from = None
dist_params = dict(backend='nccl')
workflow = [('train', 1)]
checkpoint_config = dict(interval=10)
evaluation = dict(interval=10, metric='mAP', key_indicator='AP')
optimizer = dict(
type='Adam',
lr=5e-4,
)
optimizer_config = dict(grad_clip=None)
# learning... | 27.560284 | 79 | 0.62738 |
f7b62db5788d6afd3c3d95e13ab1150bc7f82a6e | 406 | py | Python | servers/python/coweb/bayeux/__init__.py | opencoweb/coweb | 7b3a87ee9eda735a859447d404ee16edde1c5671 | [
"AFL-2.1"
] | 83 | 2015-01-05T19:02:57.000Z | 2021-11-19T02:48:09.000Z | servers/python/coweb/bayeux/__init__.py | xuelingxiao/coweb | 7b3a87ee9eda735a859447d404ee16edde1c5671 | [
"AFL-2.1"
] | 3 | 2015-12-16T13:49:33.000Z | 2019-06-17T13:38:50.000Z | servers/python/coweb/bayeux/__init__.py | xuelingxiao/coweb | 7b3a87ee9eda735a859447d404ee16edde1c5671 | [
"AFL-2.1"
] | 14 | 2015-04-29T22:36:53.000Z | 2021-11-18T03:24:29.000Z | '''
Supports the Bayeux protocol over long-polling and WebSocket transports in
Tornado.
Copyright (c) The Dojo Foundation 2011. All Rights Reserved.
Copyright (c) IBM Corporation 2008, 2011. All Rights Reserved.
'''
from .manager import BayeuxManager
from .session import BayeuxSession
from .connection import BayeuxCo... | 29 | 75 | 0.79803 |
f7b6573e4336df25f7d131a14558c39e7e6b96a1 | 22,556 | py | Python | hs_modelinstance/tests/test_modelinstance_metadata.py | hydroshare/hydroshare | bf9888bbe61507aff070b1dfcec2fdec1921468d | [
"BSD-3-Clause"
] | 178 | 2015-01-08T23:03:36.000Z | 2022-03-03T13:56:45.000Z | hs_modelinstance/tests/test_modelinstance_metadata.py | hydroshare/hydroshare | bf9888bbe61507aff070b1dfcec2fdec1921468d | [
"BSD-3-Clause"
] | 4,125 | 2015-01-01T14:26:15.000Z | 2022-03-31T16:38:55.000Z | hs_modelinstance/tests/test_modelinstance_metadata.py | hydroshare/hydroshare | bf9888bbe61507aff070b1dfcec2fdec1921468d | [
"BSD-3-Clause"
] | 53 | 2015-03-15T17:56:51.000Z | 2022-03-17T00:32:16.000Z | import os
import tempfile
import shutil
from xml.etree import ElementTree as ET
from django.test import TransactionTestCase
from django.core.files.uploadedfile import UploadedFile
from django.contrib.auth.models import Group
from django.db import IntegrityError
from hs_core import hydroshare
from hs_core.hydroshare ... | 53.072941 | 116 | 0.713602 |
f7b67aaa20012a2c3a6783a1badaba27a83e66d3 | 1,106 | py | Python | terraform/common.tf.json.template.py | VIIgit/azul | bb61965f625c667979a2f255f6bc39dcafaaf40b | [
"Apache-2.0"
] | null | null | null | terraform/common.tf.json.template.py | VIIgit/azul | bb61965f625c667979a2f255f6bc39dcafaaf40b | [
"Apache-2.0"
] | null | null | null | terraform/common.tf.json.template.py | VIIgit/azul | bb61965f625c667979a2f255f6bc39dcafaaf40b | [
"Apache-2.0"
] | null | null | null | import os
from azul import config, require
from azul.template import emit
expected_component_path = os.path.join(os.path.abspath(config.project_root), 'terraform', config.terraform_component)
actual_component_path = os.path.dirname(os.path.abspath(__file__))
require(os.path.samefile(expected_component_path, actual_co... | 30.722222 | 117 | 0.588608 |
f7b6802eb379ef3a21144093c67e0f8d1b2deb85 | 556 | py | Python | tools/wav2dur.py | 121898/wenet | 132954a9ce27d0381ed3879c4f43cc158860167e | [
"Apache-2.0"
] | 1 | 2021-03-01T16:00:02.000Z | 2021-03-01T16:00:02.000Z | tools/wav2dur.py | 121898/wenet | 132954a9ce27d0381ed3879c4f43cc158860167e | [
"Apache-2.0"
] | null | null | null | tools/wav2dur.py | 121898/wenet | 132954a9ce27d0381ed3879c4f43cc158860167e | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# encoding: utf-8
import sys
import wave
scp = sys.argv[1]
dur_scp = sys.argv[2]
with open(scp, 'r') as f, open(dur_scp, 'w') as fout:
cnt = 0
for l in f:
items = l.strip().split(' ')
wav_id = items[0]
fname = items[1]
cnt += 1
with wave.open(fnam... | 25.272727 | 58 | 0.53777 |
f7b6ac481a9bd43978e723678ac1ae1025f5da84 | 1,231 | py | Python | oscar/lib/python2.7/site-packages/phonenumbers/data/region_OM.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/phonenumbers/data/region_OM.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/phonenumbers/data/region_OM.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | """Auto-generated file, do not edit by hand. OM metadata"""
from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata
PHONE_METADATA_OM = PhoneMetadata(id='OM', country_code=968, international_prefix='00',
general_desc=PhoneNumberDesc(national_number_pattern='(?:5|[279]\\d)\\d{6}|800\\d{5,6}', p... | 87.928571 | 143 | 0.691308 |
f7b6b681e5f73ac115844afd5f7b5d60d439765d | 910 | py | Python | readingshark.py | sgriffith3/2021-08-30-PYNA | af9bfc595ef0dc2385d7a4751515050b9c6eb56f | [
"MIT"
] | null | null | null | readingshark.py | sgriffith3/2021-08-30-PYNA | af9bfc595ef0dc2385d7a4751515050b9c6eb56f | [
"MIT"
] | null | null | null | readingshark.py | sgriffith3/2021-08-30-PYNA | af9bfc595ef0dc2385d7a4751515050b9c6eb56f | [
"MIT"
] | null | null | null | #!/usr/bin/python3
"""
Open a pcap file.
"""
import pyshark
def main():
# open the pcap file pythoncapture.pcap
cap = pyshark.FileCapture("pythoncapture.pcap")
# what protocol should we scan the pcap for?
scanfor = input("What protocol should we scan the PCAP for (DNS, ICMP, TCP, etc.)? ")
# loo... | 26.764706 | 92 | 0.637363 |
f7b6b72c95ba27cfc015576d730f82d3e9e4fc78 | 4,087 | py | Python | models/problem_2.py | taoyilee/ml_final_project | 0ac5ee3938d70e9ffcae8e186e0ef1a621391980 | [
"Unlicense"
] | null | null | null | models/problem_2.py | taoyilee/ml_final_project | 0ac5ee3938d70e9ffcae8e186e0ef1a621391980 | [
"Unlicense"
] | null | null | null | models/problem_2.py | taoyilee/ml_final_project | 0ac5ee3938d70e9ffcae8e186e0ef1a621391980 | [
"Unlicense"
] | null | null | null | import numpy as np
from sklearn.linear_model import SGDClassifier
from sklearn.metrics import roc_auc_score
from sklearn.preprocessing import StandardScaler
from multiprocessing import Pool
import matplotlib.pyplot as plt
import pickle
def sample_and_split(raw_data, train_percentage=10, dev_percentage=10):
np.ran... | 46.443182 | 113 | 0.655493 |
f7b6c7744c7fd370d9b09e5e450ef2c6c05b5f16 | 23,235 | py | Python | tesa/modeling/modeling_task.py | clementjumel/master_thesis | 5a39657a212f794690e7c426f60e10ba70d50da9 | [
"Apache-2.0"
] | 2 | 2020-07-08T19:33:52.000Z | 2020-07-18T16:52:59.000Z | tesa/modeling/modeling_task.py | clementjumel/master_thesis | 5a39657a212f794690e7c426f60e10ba70d50da9 | [
"Apache-2.0"
] | null | null | null | tesa/modeling/modeling_task.py | clementjumel/master_thesis | 5a39657a212f794690e7c426f60e10ba70d50da9 | [
"Apache-2.0"
] | null | null | null | from modeling.ranking_task import RankingTask
from modeling.utils import format_context, format_targets
from collections import defaultdict
from numpy import asarray, split, concatenate
from numpy.random import seed, shuffle
from pickle import dump, load
from re import findall
from csv import writer
from os import mak... | 38.789649 | 118 | 0.639811 |
f7b73b422f2e49f918290038ca09583e4684ffa4 | 41,899 | gyp | Python | gpu/gpu.gyp | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 2 | 2019-01-28T08:09:58.000Z | 2021-11-15T15:32:10.000Z | gpu/gpu.gyp | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | gpu/gpu.gyp | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 6 | 2020-09-23T08:56:12.000Z | 2021-11-18T03:40:49.000Z | # Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'variables': {
'nacl_win64_target': 0,
'build_angle_deqp_tests%': 0,
},
'includes': [
'gpu_common.gypi',
],
'targets': [
{
... | 34.259199 | 94 | 0.555312 |
f7b742f90e8fbce460cff9e81a614e6a14c8e531 | 2,392 | py | Python | textwiser/transformations/base.py | vishalbelsare/textwiser | da500f24c8d35d29e3ff77702b7c5ece244562cc | [
"Apache-2.0"
] | 24 | 2020-07-02T13:31:46.000Z | 2022-03-25T02:27:24.000Z | textwiser/transformations/base.py | fmr-llc/textwiser | 2c5bdd73c26bd3fb7bd2f324f57d99233aa9c17f | [
"Apache-2.0"
] | 5 | 2020-07-23T16:43:02.000Z | 2022-02-23T17:05:38.000Z | textwiser/transformations/base.py | fmr-llc/textwiser | 2c5bdd73c26bd3fb7bd2f324f57d99233aa9c17f | [
"Apache-2.0"
] | 6 | 2021-01-03T08:09:39.000Z | 2022-03-25T02:18:59.000Z | # Copyright 2019 FMR LLC <opensource@fidelity.com>
# SPDX-License-Identifer: Apache-2.0
import numpy as np
import torch
from textwiser.base import BaseFeaturizer
from textwiser.utils import convert, OutputType
class _BaseTransformation(BaseFeaturizer):
def __init__(self, wrap_list_input=True):
"""Initia... | 32.767123 | 124 | 0.617475 |
f7b74a1246b6560548e77e2731ed897567f972aa | 374 | py | Python | terrascript/provider/null.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 507 | 2017-07-26T02:58:38.000Z | 2022-01-21T12:35:13.000Z | terrascript/provider/null.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 135 | 2017-07-20T12:01:59.000Z | 2021-10-04T22:25:40.000Z | terrascript/provider/null.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 81 | 2018-02-20T17:55:28.000Z | 2022-01-31T07:08:40.000Z | # terrascript/provider/null.py
# Automatically generated by tools/makecode.py (24-Sep-2021 15:22:59 UTC)
#
# For imports without namespace, e.g.
#
# >>> import terrascript.provider.null
#
# instead of
#
# >>> import terrascript.provider.hashicorp.null
#
# This is only available for 'official' and 'partner' provider... | 24.933333 | 73 | 0.740642 |
f7b76caed7d871b70cadc239d7c47aaaa5a19012 | 1,326 | py | Python | conpaas-services/src/conpaas/services/htc/agent/client.py | bopopescu/conpaas | e0a2955ae3e7da7525d799bed411e9f76ecf0919 | [
"BSD-3-Clause"
] | 1 | 2015-09-20T18:20:01.000Z | 2015-09-20T18:20:01.000Z | conpaas-services/src/conpaas/services/htc/agent/client.py | bopopescu/conpaas | e0a2955ae3e7da7525d799bed411e9f76ecf0919 | [
"BSD-3-Clause"
] | 1 | 2020-07-27T11:56:18.000Z | 2020-07-27T11:56:18.000Z | conpaas-services/src/conpaas/services/htc/agent/client.py | bopopescu/conpaas | e0a2955ae3e7da7525d799bed411e9f76ecf0919 | [
"BSD-3-Clause"
] | 3 | 2018-09-14T16:54:14.000Z | 2020-07-26T03:14:56.000Z | # -*- coding: utf-8 -*-
"""
:copyright: (C) 2010-2013 by Contrail Consortium.
"""
import json
import httplib
from conpaas.core import https
def _check(response):
"""Check the given HTTP response, returning the result if everything went
fine"""
code, body = response
if code != httplib.OK:
... | 28.212766 | 77 | 0.644042 |
f7b77d63a123b94d593ca1207fd89878313f4e4a | 2,646 | py | Python | AirBnbModel/run.py | nicolastolosa/AirBnbModel | be865804bfbf5a5a67e134db9f87c682af8dbc69 | [
"MIT"
] | null | null | null | AirBnbModel/run.py | nicolastolosa/AirBnbModel | be865804bfbf5a5a67e134db9f87c682af8dbc69 | [
"MIT"
] | null | null | null | AirBnbModel/run.py | nicolastolosa/AirBnbModel | be865804bfbf5a5a67e134db9f87c682af8dbc69 | [
"MIT"
] | null | null | null | """
Contains the main function of the package, which defines the execution of the
package. main() has been decorated with 'click' so it can process command
parameters.
"""
import logging
import click
from AirBnbModel.model.predict import main as model_predict
from AirBnbModel.model.train_eval import main as model_tr... | 30.068182 | 87 | 0.695767 |
f7b7a1be7fe38f9bbd5ce14097876a7c8d451e4c | 3,618 | py | Python | cogs/general.py | Brettanda/friday-bot | d103b1c103052b8d6d12f44456fea3823bd22447 | [
"CC0-1.0"
] | 5 | 2021-09-04T09:08:55.000Z | 2022-02-08T00:28:08.000Z | cogs/general.py | Brettanda/friday-bot | d103b1c103052b8d6d12f44456fea3823bd22447 | [
"CC0-1.0"
] | 2 | 2021-10-11T21:44:08.000Z | 2021-11-05T07:41:23.000Z | cogs/general.py | Brettanda/friday-bot | d103b1c103052b8d6d12f44456fea3823bd22447 | [
"CC0-1.0"
] | 3 | 2021-09-04T09:12:34.000Z | 2021-12-16T20:02:03.000Z | import asyncio
from typing import Optional
import discord
from discord.ext import commands
from typing_extensions import TYPE_CHECKING
from functions import MyContext, config, embed, MessageColors, views
if TYPE_CHECKING:
from index import Friday as Bot
GENERAL_CHANNEL_NAMES = {"welcome", "general", "lounge", "ch... | 42.564706 | 173 | 0.69707 |
f7b7b81c241994dfc7ea2c695533e2b40cbf07e0 | 3,409 | py | Python | mmdet/models/losses/cross_entropy_loss.py | cizhenshi/mmdetection | b0fe89677020ebe9e6a736b98d3e791ca0e6536d | [
"Apache-2.0"
] | 1 | 2020-05-12T16:47:39.000Z | 2020-05-12T16:47:39.000Z | mmdet/models/losses/cross_entropy_loss.py | cizhenshi/mmdetection | b0fe89677020ebe9e6a736b98d3e791ca0e6536d | [
"Apache-2.0"
] | null | null | null | mmdet/models/losses/cross_entropy_loss.py | cizhenshi/mmdetection | b0fe89677020ebe9e6a736b98d3e791ca0e6536d | [
"Apache-2.0"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as F
from ..registry import LOSSES
from .utils import weight_reduce_loss
from icecream import ic
def cross_entropy(pred, label, weight=None, reduction='mean', avg_factor=None):
# element-wise losses
loss = F.cross_entropy(pred, label, reduction='no... | 32.778846 | 79 | 0.62775 |
f7b7ba86365328000bb230321ffe07a01cb859cf | 1,263 | py | Python | app/tests/test_b3_github_search.py | OmarThinks/Gemography-Challenge-1 | 79da3c6f1a79a8d9834d302be4bbafd2b4190a8c | [
"MIT"
] | null | null | null | app/tests/test_b3_github_search.py | OmarThinks/Gemography-Challenge-1 | 79da3c6f1a79a8d9834d302be4bbafd2b4190a8c | [
"MIT"
] | null | null | null | app/tests/test_b3_github_search.py | OmarThinks/Gemography-Challenge-1 | 79da3c6f1a79a8d9834d302be4bbafd2b4190a8c | [
"MIT"
] | null | null | null | import unittest
from rest_api.serializers import GithubSearchRepoSerializer
import json
"""
Here we will test the rest_api/github_search.py
"""
"""
To run the tests
pytest
pytest -rP
pytest -rP --junitxml=test-reports/junit.xml --html=test-reports/pytest_report.html --self-contained-html
"""
class GithubSearchRep... | 24.764706 | 105 | 0.727633 |
f7b81a28a394ff583b369cb74170db56e6494b8e | 5,216 | py | Python | prometheus/tests/test_prometheus.py | dvanderveer/integrations-core | 41dd9950296455457c9b7342584153678503d5aa | [
"BSD-3-Clause"
] | 2 | 2019-04-03T17:21:38.000Z | 2020-02-04T16:28:05.000Z | prometheus/tests/test_prometheus.py | dvanderveer/integrations-core | 41dd9950296455457c9b7342584153678503d5aa | [
"BSD-3-Clause"
] | 10 | 2018-02-27T19:06:07.000Z | 2021-08-30T03:23:26.000Z | prometheus/tests/test_prometheus.py | dvanderveer/integrations-core | 41dd9950296455457c9b7342584153678503d5aa | [
"BSD-3-Clause"
] | 6 | 2018-01-09T21:37:20.000Z | 2020-05-26T09:28:09.000Z | # (C) Datadog, Inc. 2010-2018
# All rights reserved
# Licensed under Simplified BSD License (see LICENSE)
import pytest
import mock
# 3p
from prometheus_client import generate_latest, CollectorRegistry, Gauge
# project
from datadog_checks.prometheus import PrometheusCheck
instance = {
'prometheus_url': 'http://... | 35.243243 | 169 | 0.606787 |
f7b839d97f9dcb2110be4db3d39044a85844b7f7 | 2,189 | py | Python | python/v2.6/get_report_files.py | byagihas/googleads-dfa-reporting-samples | b525662330e0e2ca863458a4e530eccf868ac7eb | [
"Apache-2.0"
] | 103 | 2015-01-11T12:23:46.000Z | 2022-03-31T02:06:12.000Z | python/v2.6/get_report_files.py | byagihas/googleads-dfa-reporting-samples | b525662330e0e2ca863458a4e530eccf868ac7eb | [
"Apache-2.0"
] | 32 | 2015-03-03T13:39:35.000Z | 2021-07-16T01:31:06.000Z | python/v2.6/get_report_files.py | byagihas/googleads-dfa-reporting-samples | b525662330e0e2ca863458a4e530eccf868ac7eb | [
"Apache-2.0"
] | 194 | 2015-01-05T22:02:16.000Z | 2022-03-01T17:01:39.000Z | #!/usr/bin/python
#
# Copyright 2015 Google 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 b... | 31.271429 | 79 | 0.709913 |
f7b86d42e5fa2a876409a9171a8cb2c44f46576c | 18,633 | py | Python | tests/components/media_player/test_universal.py | SKarthick5121995/karthickmaduraai | d5498dfb83e9bb57fff16db854ae3e15c1e15425 | [
"MIT"
] | null | null | null | tests/components/media_player/test_universal.py | SKarthick5121995/karthickmaduraai | d5498dfb83e9bb57fff16db854ae3e15c1e15425 | [
"MIT"
] | null | null | null | tests/components/media_player/test_universal.py | SKarthick5121995/karthickmaduraai | d5498dfb83e9bb57fff16db854ae3e15c1e15425 | [
"MIT"
] | null | null | null | """The tests for the Universal Media player platform."""
from copy import copy
import unittest
from homeassistant.const import (
STATE_OFF, STATE_ON, STATE_UNKNOWN, STATE_PLAYING, STATE_PAUSED)
import homeassistant.components.switch as switch
import homeassistant.components.media_player as media_player
import home... | 35.832692 | 79 | 0.65384 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.